@slickgrid-universal/vanilla-bundle 0.19.2 → 1.2.1

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 (37) hide show
  1. package/CHANGELOG.md +67 -3
  2. package/LICENSE +1 -1
  3. package/README.md +30 -30
  4. package/dist/commonjs/components/slick-vanilla-grid-bundle.d.ts +151 -43
  5. package/dist/commonjs/components/slick-vanilla-grid-bundle.js +27 -63
  6. package/dist/commonjs/components/slick-vanilla-grid-bundle.js.map +1 -1
  7. package/dist/commonjs/index.d.ts +16 -26
  8. package/dist/commonjs/index.js +1 -3
  9. package/dist/commonjs/index.js.map +1 -1
  10. package/dist/esm/components/slick-vanilla-grid-bundle.d.ts +151 -44
  11. package/dist/esm/components/slick-vanilla-grid-bundle.js +30 -68
  12. package/dist/esm/components/slick-vanilla-grid-bundle.js.map +1 -1
  13. package/dist/esm/index.d.ts +16 -27
  14. package/dist/esm/index.js +1 -2
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/interfaces/index.d.ts +0 -1
  17. package/dist/esm/interfaces/slickerGridInstance.interface.d.ts +0 -1
  18. package/dist/esm/services/index.d.ts +0 -1
  19. package/dist/esm/services/universalContainer.service.d.ts +0 -1
  20. package/package.json +10 -25
  21. package/dist/bundle/index.d.ts +0 -451
  22. package/dist/bundle/slickgrid-vanilla-bundle.js +0 -3
  23. package/dist/bundle/slickgrid-vanilla-bundle.js.LICENSE.txt +0 -189
  24. package/dist/bundle/slickgrid-vanilla-bundle.js.map +0 -1
  25. package/dist/commonjs/salesforce-global-grid-options.d.ts +0 -3
  26. package/dist/commonjs/salesforce-global-grid-options.js +0 -82
  27. package/dist/commonjs/salesforce-global-grid-options.js.map +0 -1
  28. package/dist/esm/components/slick-vanilla-grid-bundle.d.ts.map +0 -1
  29. package/dist/esm/index.d.ts.map +0 -1
  30. package/dist/esm/interfaces/index.d.ts.map +0 -1
  31. package/dist/esm/interfaces/slickerGridInstance.interface.d.ts.map +0 -1
  32. package/dist/esm/salesforce-global-grid-options.d.ts +0 -4
  33. package/dist/esm/salesforce-global-grid-options.d.ts.map +0 -1
  34. package/dist/esm/salesforce-global-grid-options.js +0 -79
  35. package/dist/esm/salesforce-global-grid-options.js.map +0 -1
  36. package/dist/esm/services/index.d.ts.map +0 -1
  37. package/dist/esm/services/universalContainer.service.d.ts.map +0 -1
@@ -1,3 +0,0 @@
1
- /*! For license information please see slickgrid-vanilla-bundle.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Slickgrid-Universal",[],t):"object"==typeof exports?exports["Slickgrid-Universal"]=t():e["Slickgrid-Universal"]=t()}(self,(function(){return function(){var __webpack_modules__={409:function(e,t,i){"use strict";const n=Object.prototype.toString,o=i(179),s=e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e,r=e.exports=(e,...t)=>{let i=0;var n;for(("object"==typeof(n=e)?null===n:"function"!=typeof n)&&(e=t[i++]),e||(e={});i<t.length;i++)if(l(t[i])){for(const n of Object.keys(t[i]))s(n)&&(l(e[n])&&l(t[i][n])?r(e[n],t[i][n]):e[n]=t[i][n]);o(e,t[i])}return e};function l(e){return"function"==typeof e||"[object Object]"===n.call(e)}},179:function(e){"use strict";const t=Object.prototype.toString,i=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;e.exports=(e,...o)=>{if("function"!=typeof(s=e)&&"[object Object]"!==t.call(s)&&!Array.isArray(s))throw new TypeError("expected the first argument to be an object");var s;if(0===o.length||"function"!=typeof Symbol||"function"!=typeof n)return e;for(let t of o){let o=n(t);for(let n of o)i.call(t,n)&&(e[n]=t[n])}return e}},943:function(){"use strict";"function"!=typeof Object.assign&&(Object.assign=function(e,...t){if(!e)throw TypeError("Cannot convert undefined or null to object");for(const i of t)i&&Object.keys(i).forEach((t=>e[t]=i[t]));return e})},618:function(e,t){!function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={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(e){return e>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};t.l10ns.fr=i;var n=t.l10ns;e.French=i,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}(t)},605:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo((function(t){return function(i){return!!e.data(i,t)}})):function(t,i,n){return!!e.data(t,n[3])}})})?n.apply(t,o):n)||(e.exports=s)},420:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?n.apply(t,o):n)||(e.exports=s)},894:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?n.apply(t,o):n)||(e.exports=s)},208:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.ui.plugin={add:function(t,i,n){var o,s=e.ui[t].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(e,t,i,n){var o,s=e.plugins[t];if(s&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)e.options[s[o][0]]&&s[o][1].apply(e.element,i)}}})?n.apply(t,o):n)||(e.exports=s)},565:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return function(){var t,i=Math.max,n=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,d=e.fn.position;function u(e,t,i){return[parseFloat(e[0])*(a.test(e[0])?t/100:1),parseFloat(e[1])*(a.test(e[1])?i/100:1)]}function c(t,i){return parseInt(e.css(t,i),10)||0}function h(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.position={scrollbarWidth:function(){if(void 0!==t)return t;var i,n,o=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=o.children()[0];return e("body").append(o),i=s.offsetWidth,o.css("overflow","scroll"),i===(n=s.offsetWidth)&&(n=o[0].clientWidth),o.remove(),t=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:n||o?{left:0,top:0}:e(t).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return d.apply(this,arguments);t=e.extend({},t);var a,p,m,f,g,v,_=e(t.of),C=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(C),y=(t.collision||"flip").split(" "),w={};return v=h(_),_[0].preventDefault&&(t.at="left top"),p=v.width,m=v.height,f=v.offset,g=e.extend({},f),e.each(["my","at"],(function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=o.test(n[0])?n.concat(["center"]):s.test(n[0])?["center"].concat(n):["center","center"]),n[0]=o.test(n[0])?n[0]:"center",n[1]=s.test(n[1])?n[1]:"center",e=r.exec(n[0]),i=r.exec(n[1]),w[this]=[e?e[0]:0,i?i[0]:0],t[this]=[l.exec(n[0])[0],l.exec(n[1])[0]]})),1===y.length&&(y[1]=y[0]),"right"===t.at[0]?g.left+=p:"center"===t.at[0]&&(g.left+=p/2),"bottom"===t.at[1]?g.top+=m:"center"===t.at[1]&&(g.top+=m/2),a=u(w.at,p,m),g.left+=a[0],g.top+=a[1],this.each((function(){var o,s,r=e(this),l=r.outerWidth(),d=r.outerHeight(),h=c(this,"marginLeft"),v=c(this,"marginTop"),S=l+h+c(this,"marginRight")+b.width,E=d+v+c(this,"marginBottom")+b.height,T=e.extend({},g),x=u(w.my,r.outerWidth(),r.outerHeight());"right"===t.my[0]?T.left-=l:"center"===t.my[0]&&(T.left-=l/2),"bottom"===t.my[1]?T.top-=d:"center"===t.my[1]&&(T.top-=d/2),T.left+=x[0],T.top+=x[1],o={marginLeft:h,marginTop:v},e.each(["left","top"],(function(i,n){e.ui.position[y[i]]&&e.ui.position[y[i]][n](T,{targetWidth:p,targetHeight:m,elemWidth:l,elemHeight:d,collisionPosition:o,collisionWidth:S,collisionHeight:E,offset:[a[0]+x[0],a[1]+x[1]],my:t.my,at:t.at,within:C,elem:r})})),t.using&&(s=function(e){var o=f.left-T.left,s=o+p-l,a=f.top-T.top,u=a+m-d,c={target:{element:_,left:f.left,top:f.top,width:p,height:m},element:{element:r,left:T.left,top:T.top,width:l,height:d},horizontal:s<0?"left":o>0?"right":"center",vertical:u<0?"top":a>0?"bottom":"middle"};p<l&&n(o+s)<p&&(c.horizontal="center"),m<d&&n(a+u)<m&&(c.vertical="middle"),i(n(o),n(s))>i(n(a),n(u))?c.important="horizontal":c.important="vertical",t.using.call(this,e,c)}),r.offset(e.extend(T,{using:s}))}))},e.ui.position={fit:{left:function(e,t){var n,o=t.within,s=o.isWindow?o.scrollLeft:o.offset.left,r=o.width,l=e.left-t.collisionPosition.marginLeft,a=s-l,d=l+t.collisionWidth-r-s;t.collisionWidth>r?a>0&&d<=0?(n=e.left+a+t.collisionWidth-r-s,e.left+=a-n):e.left=d>0&&a<=0?s:a>d?s+r-t.collisionWidth:s:a>0?e.left+=a:d>0?e.left-=d:e.left=i(e.left-l,e.left)},top:function(e,t){var n,o=t.within,s=o.isWindow?o.scrollTop:o.offset.top,r=t.within.height,l=e.top-t.collisionPosition.marginTop,a=s-l,d=l+t.collisionHeight-r-s;t.collisionHeight>r?a>0&&d<=0?(n=e.top+a+t.collisionHeight-r-s,e.top+=a-n):e.top=d>0&&a<=0?s:a>d?s+r-t.collisionHeight:s:a>0?e.top+=a:d>0?e.top-=d:e.top=i(e.top-l,e.top)}},flip:{left:function(e,t){var i,o,s=t.within,r=s.offset.left+s.scrollLeft,l=s.width,a=s.isWindow?s.scrollLeft:s.offset.left,d=e.left-t.collisionPosition.marginLeft,u=d-a,c=d+t.collisionWidth-l-a,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,m=-2*t.offset[0];u<0?((i=e.left+h+p+m+t.collisionWidth-l-r)<0||i<n(u))&&(e.left+=h+p+m):c>0&&((o=e.left-t.collisionPosition.marginLeft+h+p+m-a)>0||n(o)<c)&&(e.left+=h+p+m)},top:function(e,t){var i,o,s=t.within,r=s.offset.top+s.scrollTop,l=s.height,a=s.isWindow?s.scrollTop:s.offset.top,d=e.top-t.collisionPosition.marginTop,u=d-a,c=d+t.collisionHeight-l-a,h="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];u<0?((o=e.top+h+p+m+t.collisionHeight-l-r)<0||o<n(u))&&(e.top+=h+p+m):c>0&&((i=e.top-t.collisionPosition.marginTop+h+p+m-a)>0||n(i)<c)&&(e.top+=h+p+m)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position})?n.apply(t,o):n)||(e.exports=s)},370:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(i){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t}})?n.apply(t,o):n)||(e.exports=s)},997:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")}})?n.apply(t,o):n)||(e.exports=s)},647:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.fn.scrollParent=function(t){var i=this.css("position"),n="absolute"===i,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter((function(){var t=e(this);return(!n||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==i&&s.length?s:e(this[0].ownerDocument||document)}})?n.apply(t,o):n)||(e.exports=s)},416:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){return e.fn.extend({uniqueId:(t=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++t)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")}))}});var t})?n.apply(t,o):n)||(e.exports=s)},62:function(e,t,i){var n,o,s;o=[i(291)],void 0===(s="function"==typeof(n=function(e){return e.ui=e.ui||{},e.ui.version="1.12.1"})?n.apply(t,o):n)||(e.exports=s)},827:function(e,t,i){var n,o,s;o=[i(291),i(62)],void 0===(s="function"==typeof(n=function(e){var t,i=0,n=Array.prototype.slice;return e.cleanData=(t=e.cleanData,function(i){var n,o,s;for(s=0;null!=(o=i[s]);s++)try{(n=e._data(o,"events"))&&n.remove&&e(o).triggerHandler("remove")}catch(e){}t(i)}),e.widget=function(t,i,n){var o,s,r,l={},a=t.split(".")[0],d=a+"-"+(t=t.split(".")[1]);return n||(n=i,i=e.Widget),e.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr[":"][d.toLowerCase()]=function(t){return!!e.data(t,d)},e[a]=e[a]||{},o=e[a][t],s=e[a][t]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t)},e.extend(s,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),(r=new i).options=e.widget.extend({},r.options),e.each(n,(function(t,n){e.isFunction(n)?l[t]=function(){function e(){return i.prototype[t].apply(this,arguments)}function o(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,s=this._superApply;return this._super=e,this._superApply=o,t=n.apply(this,arguments),this._super=i,this._superApply=s,t}}():l[t]=n})),s.prototype=e.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||t},l,{constructor:s,namespace:a,widgetName:t,widgetFullName:d}),o?(e.each(o._childConstructors,(function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,s,i._proto)})),delete o._childConstructors):i._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var i,o,s=n.call(arguments,1),r=0,l=s.length;r<l;r++)for(i in s[r])o=s[r][i],s[r].hasOwnProperty(i)&&void 0!==o&&(e.isPlainObject(o)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],o):e.widget.extend({},o):t[i]=o);return t},e.widget.bridge=function(t,i){var o=i.prototype.widgetFullName||t;e.fn[t]=function(s){var r="string"==typeof s,l=n.call(arguments,1),a=this;return r?this.length||"instance"!==s?this.each((function(){var i,n=e.data(this,o);return"instance"===s?(a=n,!1):n?e.isFunction(n[s])&&"_"!==s.charAt(0)?(i=n[s].apply(n,l))!==n&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0:e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")})):a=void 0:(l.length&&(s=e.widget.extend.apply(null,[s].concat(l))),this.each((function(){var t=e.data(this,o);t?(t.option(s||{}),t._init&&t._init()):e.data(this,o,new i(s,this))}))),a}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,i){t._removeClass(i,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,o,s,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},n=t.split("."),t=n.shift(),n.length){for(o=r[t]=e.widget.extend({},this.options[t]),s=0;s<n.length-1;s++)o[n[s]]=o[n[s]]||{},o=o[n[s]];if(t=n.pop(),1===arguments.length)return void 0===o[t]?null:o[t];o[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,n,o;for(i in t)o=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&o&&o.length&&(n=e(o.get()),this._removeClass(o,i),n.addClass(this._classes({element:n,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var i=[],n=this;function o(o,s){var r,l;for(l=0;l<o.length;l++)r=n.classesElementLookup[o[l]]||e(),r=t.add?e(e.unique(r.get().concat(t.element.get()))):e(r.not(t.element).get()),n.classesElementLookup[o[l]]=r,i.push(o[l]),s&&t.classes[o[l]]&&i.push(t.classes[o[l]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&o(t.keys.match(/\S+/g)||[],!0),t.extra&&o(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,(function(n,o){-1!==e.inArray(t.target,o)&&(i.classesElementLookup[n]=e(o.not(t.target).get()))}))},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,n){n="boolean"==typeof n?n:i;var o="string"==typeof e||null===e,s={extra:o?t:i,keys:o?e:t,element:o?this.element:e,add:n};return s.element.toggleClass(this._classes(s),n),this},_on:function(t,i,n){var o,s=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=o=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),e.each(n,(function(n,r){function l(){if(t||!0!==s.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(l.guid=r.guid=r.guid||l.guid||e.guid++);var a=n.match(/^([\w:-]*)\s*(.*)$/),d=a[1]+s.eventNamespace,u=a[2];u?o.on(d,u,l):i.on(d,l)}))},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i).off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var i=this;return setTimeout((function(){return("string"==typeof e?i[e]:e).apply(i,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,n){var o,s,r=this.options[t];if(n=n||{},(i=e.Event(i)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(o in s)o in i||(i[o]=s[o]);return this.element.trigger(i,n),!(e.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,i){e.Widget.prototype["_"+t]=function(n,o,s){var r;"string"==typeof o&&(o={effect:o});var l=o?!0===o||"number"==typeof o?i:o.effect||i:t;"number"==typeof(o=o||{})&&(o={duration:o}),r=!e.isEmptyObject(o),o.complete=s,o.delay&&n.delay(o.delay),r&&e.effects&&e.effects.effect[l]?n[t](o):l!==t&&n[l]?n[l](o.duration,o.easing,s):n.queue((function(i){e(this)[t](),s&&s.call(n[0]),i()}))}})),e.widget})?n.apply(t,o):n)||(e.exports=s)},863:function(e,t,i){var n,o,s;o=[i(291),i(809),i(894),i(565),i(370),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){return e.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,o=this.element[0].nodeName.toLowerCase(),s="textarea"===o,r="input"===o;this.isMultiLine=s||!r&&this._isContentEditable(this.element),this.valueMethod=this.element[s||r?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var s=e.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",o);break;case s.UP:t=!0,this._keyEvent("previous",o);break;case s.DOWN:t=!0,this._keyEvent("next",o);break;case s.ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=e.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(e){if(n)return n=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=e("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,this.element[0]!==e.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")}))},menufocus:function(t,i){var n,o;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){e(t.target).trigger(t.originalEvent)}));o=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:o})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(o.value),(n=i.item.attr("aria-label")||o.value)&&e.trim(n).length&&(this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(t,i){var n=i.item.data("ui-autocomplete-item"),o=this.previous;this.element[0]!==e.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=o,this._delay((function(){this.previous=o,this.selectedItem=n}))),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=e("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var i=this.menu.element[0];return t.target===this.element[0]||t.target===i||e.contains(i,t.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,o){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay((function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),n=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;t&&(!t||i||n)||(this.selectedItem=null,this.search(null,e))}),this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy((function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}),this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,(function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})}))},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,(function(e,i){n._renderItemData(t,i)}))},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<div>").text(i.label)).appendTo(t)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,(function(e){return n.test(e.label||e.value||e)}))}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete})?n.apply(t,o):n)||(e.exports=s)},817:function(e,t,i){var n,o,s;o=[i(291),i(791),i(605),i(208),i(370),i(997),i(647),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){return e.widget("ui.draggable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var i=this.options;return!(this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(t),!this.handle||(this._blurActiveElement(t),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),0)))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map((function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=e.ui.safeActiveElement(this.document[0]);e(t.target).closest(i).length||e.ui.safeBlur(i)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===e(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",t,n))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",t)&&i._clear()})):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper),o=n?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,o=this.options,s=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(n=(i=e(o.containment))[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=o.containment:this.containment=[0,0,e(s).width()-this.helperProportions.width-this.margins.left,(e(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,n,o,s,r=this.options,l=this._isRootNode(this.scrollParent[0]),a=e.pageX,d=e.pageY;return l&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(a=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(d=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(a=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(d=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((d-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,d=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1]:o,s=r.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,a=i?s-this.offset.click.left>=i[0]||s-this.offset.click.left>i[2]?s:s-this.offset.click.left>=i[0]?s-r.grid[0]:s+r.grid[0]:s),"y"===r.axis&&(a=this.originalPageX),"x"===r.axis&&(d=this.originalPageY)),{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:l?0:this.offset.scroll.top),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:l?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,n){var o=e.extend({},i,{item:n.element});n.sortables=[],e(n.options.connectToSortable).each((function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,o))}))},stop:function(t,i,n){var o=e.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,e.each(n.sortables,(function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,o))}))},drag:function(t,i,n){e.each(n.sortables,(function(){var o=!1,s=this;s.positionAbs=n.positionAbs,s.helperProportions=n.helperProportions,s.offset.click=n.offset.click,s._intersectsWith(s.containerCache)&&(o=!0,e.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==s&&this._intersectsWith(this.containerCache)&&e.contains(s.element[0],this.element[0])&&(o=!1),o}))),o?(s.isOver||(s.isOver=1,n._parent=i.helper.parent(),s.currentItem=i.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return i.helper[0]},t.target=s.currentItem[0],s._mouseCapture(t,!0),s._mouseStart(t,!0,!0),s.offset.click.top=n.offset.click.top,s.offset.click.left=n.offset.click.left,s.offset.parent.left-=n.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=n.offset.parent.top-s.offset.parent.top,n._trigger("toSortable",t),n.dropped=s.element,e.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,s.fromOutside=n),s.currentItem&&(s._mouseDrag(t),i.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",t,s._uiHash(s)),s._mouseStop(t,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(t),i.position=n._generatePosition(t,!0),n._trigger("fromSortable",t),n.dropped=!1,e.each(n.sortables,(function(){this.refreshPositions()})))}))}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,n){var o=e("body"),s=n.options;o.css("cursor")&&(s._cursor=o.css("cursor")),o.css("cursor",s.cursor)},stop:function(t,i,n){var o=n.options;o._cursor&&e("body").css("cursor",o._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,n){var o=e(i.helper),s=n.options;o.css("opacity")&&(s._opacity=o.css("opacity")),o.css("opacity",s.opacity)},stop:function(t,i,n){var o=n.options;o._opacity&&e(i.helper).css("opacity",o._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,n){var o=n.options,s=!1,r=n.scrollParentNotHidden[0],l=n.document[0];r!==l&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+r.offsetHeight-t.pageY<o.scrollSensitivity?r.scrollTop=s=r.scrollTop+o.scrollSpeed:t.pageY-n.overflowOffset.top<o.scrollSensitivity&&(r.scrollTop=s=r.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(n.overflowOffset.left+r.offsetWidth-t.pageX<o.scrollSensitivity?r.scrollLeft=s=r.scrollLeft+o.scrollSpeed:t.pageX-n.overflowOffset.left<o.scrollSensitivity&&(r.scrollLeft=s=r.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(t.pageY-e(l).scrollTop()<o.scrollSensitivity?s=e(l).scrollTop(e(l).scrollTop()-o.scrollSpeed):e(window).height()-(t.pageY-e(l).scrollTop())<o.scrollSensitivity&&(s=e(l).scrollTop(e(l).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(t.pageX-e(l).scrollLeft()<o.scrollSensitivity?s=e(l).scrollLeft(e(l).scrollLeft()-o.scrollSpeed):e(window).width()-(t.pageX-e(l).scrollLeft())<o.scrollSensitivity&&(s=e(l).scrollLeft(e(l).scrollLeft()+o.scrollSpeed)))),!1!==s&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,n){var o=n.options;n.snapElements=[],e(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var t=e(this),i=t.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})}))},drag:function(t,i,n){var o,s,r,l,a,d,u,c,h,p,m=n.options,f=m.snapTolerance,g=i.offset.left,v=g+n.helperProportions.width,_=i.offset.top,C=_+n.helperProportions.height;for(h=n.snapElements.length-1;h>=0;h--)d=(a=n.snapElements[h].left-n.margins.left)+n.snapElements[h].width,c=(u=n.snapElements[h].top-n.margins.top)+n.snapElements[h].height,v<a-f||g>d+f||C<u-f||_>c+f||!e.contains(n.snapElements[h].item.ownerDocument,n.snapElements[h].item)?(n.snapElements[h].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=!1):("inner"!==m.snapMode&&(o=Math.abs(u-C)<=f,s=Math.abs(c-_)<=f,r=Math.abs(a-v)<=f,l=Math.abs(d-g)<=f,o&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),s&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:a-n.helperProportions.width}).left),l&&(i.position.left=n._convertPositionTo("relative",{top:0,left:d}).left)),p=o||s||r||l,"outer"!==m.snapMode&&(o=Math.abs(u-_)<=f,s=Math.abs(c-C)<=f,r=Math.abs(a-g)<=f,l=Math.abs(d-v)<=f,o&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),s&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:a}).left),l&&(i.position.left=n._convertPositionTo("relative",{top:0,left:d-n.helperProportions.width}).left)),!n.snapElements[h].snapping&&(o||s||r||l||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[h].item})),n.snapElements[h].snapping=o||s||r||l||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,n){var o,s=n.options,r=e.makeArray(e(s.stack)).sort((function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)}));r.length&&(o=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each((function(t){e(this).css("zIndex",o+t)})),this.css("zIndex",o+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,n){var o=e(i.helper),s=n.options;o.css("zIndex")&&(s._zIndex=o.css("zIndex")),o.css("zIndex",s.zIndex)},stop:function(t,i,n){var o=n.options;o._zIndex&&e(i.helper).css("zIndex",o._zIndex)}}),e.ui.draggable})?n.apply(t,o):n)||(e.exports=s)},290:function(e,t,i){var n,o,s;o=[i(291),i(817),i(791),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){e.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var n=e.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(i)))},_drop:function(i,n){var o=n||e.ui.ddmanager.current,s=!1;return!(!o||(o.currentItem||o.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var n=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===o.options.scope&&n.accept.call(n.element[0],o.currentItem||o.element)&&t(o,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,i))return s=!0,!1})),!s&&!!this.accept.call(this.element[0],o.currentItem||o.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",i,this.ui(o)),this.element))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var t=e.ui.intersect=function(){function e(e,t,i){return e>=t&&e<t+i}return function(t,i,n,o){if(!i.offset)return!1;var s=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,l=s+t.helperProportions.width,a=r+t.helperProportions.height,d=i.offset.left,u=i.offset.top,c=d+i.proportions().width,h=u+i.proportions().height;switch(n){case"fit":return d<=s&&l<=c&&u<=r&&a<=h;case"intersect":return d<s+t.helperProportions.width/2&&l-t.helperProportions.width/2<c&&u<r+t.helperProportions.height/2&&a-t.helperProportions.height/2<h;case"pointer":return e(o.pageY,u,i.proportions().height)&&e(o.pageX,d,i.proportions().width);case"touch":return(r>=u&&r<=h||a>=u&&a<=h||r<u&&a>h)&&(s>=d&&s<=c||l>=d&&l<=c||s<d&&l>c);default:return!1}}}();return e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,i){var n,o,s=e.ui.ddmanager.droppables[t.options.scope]||[],r=i?i.type:null,l=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<s.length;n++)if(!(s[n].options.disabled||t&&!s[n].accept.call(s[n].element[0],t.currentItem||t.element))){for(o=0;o<l.length;o++)if(l[o]===s[n].element[0]){s[n].proportions().height=0;continue e}s[n].visible="none"!==s[n].element.css("display"),s[n].visible&&("mousedown"===r&&s[n]._activate.call(s[n],i),s[n].offset=s[n].element.offset(),s[n].proportions({width:s[n].element[0].offsetWidth,height:s[n].element[0].offsetHeight}))}},drop:function(i,n){var o=!1;return e.each((e.ui.ddmanager.droppables[i.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t(i,this,this.options.tolerance,n)&&(o=this._drop.call(this,n)||o),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))})),o},dragStart:function(t,i){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}))},drag:function(i,n){i.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(i,n),e.each(e.ui.ddmanager.droppables[i.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var o,s,r,l=t(i,this,this.options.tolerance,n),a=!l&&this.isover?"isout":l&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===s}))).length&&((o=e(r[0]).droppable("instance")).greedyChild="isover"===a)),o&&"isover"===a&&(o.isover=!1,o.isout=!0,o._out.call(o,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),o&&"isout"===a&&(o.isout=!1,o.isover=!0,o._over.call(o,n)))}}))},dragStop:function(t,i){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable})?n.apply(t,o):n)||(e.exports=s)},809:function(e,t,i){var n,o,s;o=[i(291),i(894),i(565),i(370),i(416),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){return e.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target),n=e(e.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.target).closest(".ui-menu-item"),n=e(t.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay((function(){!e.contains(this.element[0],e.ui.safeActiveElement(this.document[0]))&&this.collapseAll(t)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each((function(){var t=e(this);t.data("ui-menu-submenu-caret")&&t.remove()}))},_keydown:function(t){var i,n,o,s,r=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,n=this.previousFilter||"",s=!1,o=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),o===n?s=!0:o=n+o,i=this._filterMenuItems(o),(i=s&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(o=String.fromCharCode(t.keyCode),i=this._filterMenuItems(o)),i.length?(this.focus(t,i),this.previousFilter=o,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i,n,o,s=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var t=e(this),i=t.prev(),n=e("<span>").data("ui-menu-submenu-caret",!0);s._addClass(n,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(t=l.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var t=e(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")})),o=(n=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i,n,o;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),o=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(o,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,o,s,r,l;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,o=t.offset().top-this.activeMenu.offset().top-i-n,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),l=t.outerHeight(),o<0?this.activeMenu.scrollTop(s+o):o+l>r&&this.activeMenu.scrollTop(s+o-r+l))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay((function(){this._close(),this._open(e)}),this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay((function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n}),this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay((function(){this.focus(e,t)})))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[t]()),this.focus(i,n)},nextPage:function(t){var i,n,o;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each((function(){return(i=e(this)).offset().top-n-o<0})),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var i,n,o;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each((function(){return(i=e(this)).offset().top-n+o>0})),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter((function(){return n.test(e.trim(e(this).children(".ui-menu-item-wrapper").text()))}))}})})?n.apply(t,o):n)||(e.exports=s)},791:function(e,t,i){var n,o,s;o=[i(291),i(420),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){var t=!1;return e(document).on("mouseup",(function(){t=!1})),e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(i){if(!0===e.data(i.target,t.widgetName+".preventClickEvent"))return e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,o=1===i.which,s=!("string"!=typeof this.options.cancel||!i.target.nodeName)&&e(i.target).closest(this.options.cancel).length;return!(o&&!s&&this._mouseCapture(i)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){n.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=!1!==this._mouseStart(i),!this._mouseStarted)?(i.preventDefault(),0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,0)))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(i){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,i.target===this._mouseDownEvent.target&&e.data(i.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(i)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,t=!1,i.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?n.apply(t,o):n)||(e.exports=s)},971:function(e,t,i){var n,o,s;o=[i(291),i(791),i(894),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){return e.widget("ui.slider",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,o=this.element.find(".ui-slider-handle"),s=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),t=o.length;t<i;t++)s.push("<span tabindex='0'></span>");this.handles=o.add(e(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(t){e(this).data("ui-slider-handle-index",t).attr("tabIndex",0)}))},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,n,o,s,r,l,a,d=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each((function(t){var i=Math.abs(n-d.values(t));(o>i||o===i&&(t===d._lastChangedValue||d.values(t)===u.min))&&(o=i,s=e(this),r=t)})),!1!==this._start(t,r)&&(this._mouseSliding=!0,this._handleIndex=r,this._addClass(s,null,"ui-state-active"),s.trigger("focus"),l=s.offset(),a=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-l.left-s.width()/2,top:t.pageY-l.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,o,s;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(n=i/t)>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),s=this._valueMin()+n*o,this._trimAlignValue(s)},_uiHash:function(e,t,i){var n={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==t?t:this.values(e),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var n,o=this.value(),s=this.values();this._hasMultipleValues()&&(n=this.values(t?0:1),o=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(n,i):Math.max(n,i)),s[t]=i),i!==o&&!1!==this._trigger("slide",e,this._uiHash(t,i,s))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,i){var n,o,s;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):this.value();for(n=this.options.values,o=arguments[0],s=0;s<n.length;s+=1)n[s]=this._trimAlignValue(o[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,i){var n,o=0;switch("range"===t&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(o=this.options.values.length),this._super(t,i),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=o-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],this._trimAlignValue(t);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,n,o,s,r=this.options.range,l=this.options,a=this,d=!this._animateOff&&l.animate,u={};this._hasMultipleValues()?this.handles.each((function(n){i=(a.values(n)-a._valueMin())/(a._valueMax()-a._valueMin())*100,u["horizontal"===a.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[d?"animate":"css"](u,l.animate),!0===a.options.range&&("horizontal"===a.orientation?(0===n&&a.range.stop(1,1)[d?"animate":"css"]({left:i+"%"},l.animate),1===n&&a.range[d?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:l.animate})):(0===n&&a.range.stop(1,1)[d?"animate":"css"]({bottom:i+"%"},l.animate),1===n&&a.range[d?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:l.animate}))),t=i})):(n=this.value(),o=this._valueMin(),s=this._valueMax(),i=s!==o?(n-o)/(s-o)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[d?"animate":"css"](u,l.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[d?"animate":"css"]({width:i+"%"},l.animate),"max"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[d?"animate":"css"]({width:100-i+"%"},l.animate),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[d?"animate":"css"]({height:i+"%"},l.animate),"max"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[d?"animate":"css"]({height:100-i+"%"},l.animate))},_handleEvents:{keydown:function(t){var i,n,o,s=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(e(t.target),null,"ui-state-active"),!1===this._start(t,s)))return}switch(o=this.options.step,i=n=this._hasMultipleValues()?this.values(s):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-o)}this._slide(t,s,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),this._removeClass(e(t.target),null,"ui-state-active"))}}})})?n.apply(t,o):n)||(e.exports=s)},669:function(e,t,i){var n,o,s;o=[i(291),i(791),i(605),i(420),i(647),i(62),i(827)],void 0===(s="function"==typeof(n=function(e){return e.widget("ui.sortable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&e<t+i},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,(function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var n=null,o=!1,s=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),e(t.target).parents().each((function(){if(e.data(this,s.widgetName+"-item")===s)return n=e(this),!1})),e.data(t.target,s.widgetName+"-item")===s&&(n=e(t.target)),!n||this.options.handle&&!i&&(e(this.options.handle,n).find("*").addBack().each((function(){this===t.target&&(o=!0)})),!o)||(this.currentItem=n,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,i,n){var o,s,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,o,s,r=this.options,l=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=l=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=l=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=l=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=l=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-this.document.scrollTop()<r.scrollSensitivity?l=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<r.scrollSensitivity&&(l=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),t.pageX-this.document.scrollLeft()<r.scrollSensitivity?l=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(l=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==l&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(n=this.items[i]).item[0],(s=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===o||e.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,r={};s&&"x"!==s||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){n._clear(t)}))}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each((function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))})),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each((function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")})),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=e.left,r=s+e.width,l=e.top,a=l+e.height,d=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||n+d>l&&n+d<a,h="y"===this.options.axis||t+u>s&&t+u<r,p=c&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:s<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&l<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<a},_intersectsWithPointer:function(e){var t,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!n||!o)&&(t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:n&&("down"===n&&t||"up"===n&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i,n,o,s,r=[],l=[],a=this._connectWith();if(a&&t)for(i=a.length-1;i>=0;i--)for(n=(o=e(a[i],this.document[0])).length-1;n>=0;n--)(s=e.data(o[n],this.widgetFullName))&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);function d(){r.push(this)}for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(d);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,o,s,r,l,a,d,u=this.items,c=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(i=h.length-1;i>=0;i--)for(n=(o=e(h[i],this.document[0])).length-1;n>=0;n--)(s=e.data(o[n],this.widgetFullName))&&s!==this&&!s.options.disabled&&(c.push([e.isFunction(s.options.items)?s.options.items.call(s.element[0],t,{item:this.currentItem}):e(s.options.items,s.element),s]),this.containers.push(s));for(i=c.length-1;i>=0;i--)for(r=c[i][1],n=0,d=(l=c[i][0]).length;n<d;n++)(a=e(l[n])).data(this.widgetName+"-item",r),u.push({item:a,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var i,n,o,s;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(n=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){var i,n=(t=t||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=e("<"+n+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",i||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===n?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(o)):"tr"===n?t._createTrPlaceholder(t.currentItem,o):"img"===n&&o.attr("src",t.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(e,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var n=this;t.children().each((function(){e("<td>&#160;</td>",n.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(t){var i,n,o,s,r,l,a,d,u,c,h=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,s=null,r=(u=h.floating||this._isFloating(this.currentItem))?"left":"top",l=u?"width":"height",c=u?"pageX":"pageY",n=this.items.length-1;n>=0;n--)e.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(a=this.items[n].item.offset()[r],d=!1,t[c]-a>this.items[n][l]/2&&(d=!0),Math.abs(t[c]-a)<o&&(o=Math.abs(t[c]-a),s=this.items[n],this.direction=d?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(t=e(o.containment)[0],i=e(o.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())*n}},_generatePosition:function(t){var i,n,o=this.options,s=t.pageX,r=t.pageY,l="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(l[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:l.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:l.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!n)}))},_clear:function(e,t){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}for(this.fromOutside&&!t&&n.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(n.push((function(e){this._trigger("remove",e,this._uiHash())})),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||n.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<n.length;i++)n[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})})?n.apply(t,o):n)||(e.exports=s)},291:function(e,t){var i;!function(t,i){"use strict";"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var s=[],r=Object.getPrototypeOf,l=s.slice,a=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},d=s.push,u=s.indexOf,c={},h=c.toString,p=c.hasOwnProperty,m=p.toString,f=m.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},C=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,i){var n,o,s=(i=i||C).createElement("script");if(s.text=e,t)for(n in b)(o=t[n]||t.getAttribute&&t.getAttribute(n))&&s.setAttribute(n,o);i.head.appendChild(s).parentNode.removeChild(s)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[h.call(e)]||"object":typeof e}var S="3.5.1",E=function(e,t){return new E.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,i=w(e);return!v(e)&&!_(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}E.fn=E.prototype={jquery:S,constructor:E,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:s.sort,splice:s.splice},E.extend=E.fn.extend=function(){var e,t,i,n,o,s,r=arguments[0]||{},l=1,a=arguments.length,d=!1;for("boolean"==typeof r&&(d=r,r=arguments[l]||{},l++),"object"==typeof r||v(r)||(r={}),l===a&&(r=this,l--);l<a;l++)if(null!=(e=arguments[l]))for(t in e)n=e[t],"__proto__"!==t&&r!==n&&(d&&n&&(E.isPlainObject(n)||(o=Array.isArray(n)))?(i=r[t],s=o&&!Array.isArray(i)?[]:o||E.isPlainObject(i)?i:{},o=!1,r[t]=E.extend(d,s,n)):void 0!==n&&(r[t]=n));return r},E.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==h.call(e)||(t=r(e))&&("function"!=typeof(i=p.call(t,"constructor")&&t.constructor)||m.call(i)!==f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){y(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(T(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},makeArray:function(e,t){var i=t||[];return null!=e&&(T(Object(e))?E.merge(i,"string"==typeof e?[e]:e):d.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:u.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,o=e.length;n<i;n++)e[o++]=t[n];return e.length=o,e},grep:function(e,t,i){for(var n=[],o=0,s=e.length,r=!i;o<s;o++)!t(e[o],o)!==r&&n.push(e[o]);return n},map:function(e,t,i){var n,o,s=0,r=[];if(T(e))for(n=e.length;s<n;s++)null!=(o=t(e[s],s,i))&&r.push(o);else for(s in e)null!=(o=t(e[s],s,i))&&r.push(o);return a(r)},guid:1,support:g}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=s[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){c["[object "+t+"]"]=t.toLowerCase()}));var x=function(e){var t,i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_,C,b="sizzle"+1*new Date,y=e.document,w=0,S=0,E=ae(),T=ae(),x=ae(),O=ae(),k=function(e,t){return e===t&&(c=!0),0},D={}.hasOwnProperty,A=[],R=A.pop,I=A.push,P=A.push,M=A.slice,F=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",H="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+L+"*\\]",V=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z=new RegExp(L+"+","g"),B=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),W=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),G=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(L+"|>"),j=new RegExp(V),Y=new RegExp("^"+$+"$"),q={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+V),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=function(){h()},re=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(A=M.call(y.childNodes),y.childNodes),A[y.childNodes.length].nodeType}catch(e){P={apply:A.length?function(e,t){I.apply(e,M.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function le(e,t,n,o){var s,l,d,u,c,m,v,_=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!o&&(h(t),t=t||p,f)){if(11!==y&&(c=J.exec(e)))if(s=c[1]){if(9===y){if(!(d=t.getElementById(s)))return n;if(d.id===s)return n.push(d),n}else if(_&&(d=_.getElementById(s))&&C(t,d)&&d.id===s)return n.push(d),n}else{if(c[2])return P.apply(n,t.getElementsByTagName(e)),n;if((s=c[3])&&i.getElementsByClassName&&t.getElementsByClassName)return P.apply(n,t.getElementsByClassName(s)),n}if(i.qsa&&!O[e+" "]&&(!g||!g.test(e))&&(1!==y||"object"!==t.nodeName.toLowerCase())){if(v=e,_=t,1===y&&(U.test(e)||G.test(e))){for((_=ee.test(e)&&ve(t.parentNode)||t)===t&&i.scope||((u=t.getAttribute("id"))?u=u.replace(ne,oe):t.setAttribute("id",u=b)),l=(m=r(e)).length;l--;)m[l]=(u?"#"+u:":scope")+" "+Ce(m[l]);v=m.join(",")}try{return P.apply(n,_.querySelectorAll(v)),n}catch(t){O(e,!0)}finally{u===b&&t.removeAttribute("id")}}}return a(e.replace(B,"$1"),t,n,o)}function ae(){var e=[];return function t(i,o){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=o}}function de(e){return e[b]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var i=e.split("|"),o=i.length;o--;)n.attrHandle[i[o]]=t}function he(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function me(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return de((function(t){return t=+t,de((function(i,n){for(var o,s=e([],i.length,t),r=s.length;r--;)i[o=s[r]]&&(i[o]=!(n[o]=i[o]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=le.support={},s=le.isXML=function(e){var t=e.namespaceURI,i=(e.ownerDocument||e).documentElement;return!X.test(t||i&&i.nodeName||"HTML")},h=le.setDocument=function(e){var t,o,r=e?e.ownerDocument||e:y;return r!=p&&9===r.nodeType&&r.documentElement?(m=(p=r).documentElement,f=!s(p),y!=p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",se,!1):o.attachEvent&&o.attachEvent("onunload",se)),i.scope=ue((function(e){return m.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=Z.test(p.getElementsByClassName),i.getById=ue((function(e){return m.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),i.getById?(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var i,n,o,s=t.getElementById(e);if(s){if((i=s.getAttributeNode("id"))&&i.value===e)return[s];for(o=t.getElementsByName(e),n=0;s=o[n++];)if((i=s.getAttributeNode("id"))&&i.value===e)return[s]}return[]}}),n.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],o=0,s=t.getElementsByTagName(e);if("*"===e){for(;i=s[o++];)1===i.nodeType&&n.push(i);return n}return s},n.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},v=[],g=[],(i.qsa=Z.test(p.querySelectorAll))&&(ue((function(e){var t;m.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+N+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),m.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(i.matchesSelector=Z.test(_=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&ue((function(e){i.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),v.push("!=",V)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(m.compareDocumentPosition),C=t||Z.test(m.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===n?e==p||e.ownerDocument==y&&C(y,e)?-1:t==p||t.ownerDocument==y&&C(y,t)?1:u?F(u,e)-F(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var i,n=0,o=e.parentNode,s=t.parentNode,r=[e],l=[t];if(!o||!s)return e==p?-1:t==p?1:o?-1:s?1:u?F(u,e)-F(u,t):0;if(o===s)return he(e,t);for(i=e;i=i.parentNode;)r.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;r[n]===l[n];)n++;return n?he(r[n],l[n]):r[n]==y?-1:l[n]==y?1:0},p):p},le.matches=function(e,t){return le(e,null,null,t)},le.matchesSelector=function(e,t){if(h(e),i.matchesSelector&&f&&!O[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var n=_.call(e,t);if(n||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){O(t,!0)}return le(t,p,null,[e]).length>0},le.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),C(e,t)},le.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var o=n.attrHandle[t.toLowerCase()],s=o&&D.call(n.attrHandle,t.toLowerCase())?o(e,t,!f):void 0;return void 0!==s?s:i.attributes||!f?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},le.escape=function(e){return(e+"").replace(ne,oe)},le.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},le.uniqueSort=function(e){var t,n=[],o=0,s=0;if(c=!i.detectDuplicates,u=!i.sortStable&&e.slice(0),e.sort(k),c){for(;t=e[s++];)t===e[s]&&(o=n.push(s));for(;o--;)e.splice(n[o],1)}return u=null,e},o=le.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=o(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n++];)i+=o(t);return i},(n=le.selectors={cacheLength:50,createPseudo:de,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||le.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&le.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&j.test(i)&&(t=r(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+L+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var o=le.attr(n,e);return null==o?"!="===t:!t||(o+="","="===t?o===i:"!="===t?o!==i:"^="===t?i&&0===o.indexOf(i):"*="===t?i&&o.indexOf(i)>-1:"$="===t?i&&o.slice(-i.length)===i:"~="===t?(" "+o.replace(z," ")+" ").indexOf(i)>-1:"|="===t&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,o){var s="nth"!==e.slice(0,3),r="last"!==e.slice(-4),l="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,i,a){var d,u,c,h,p,m,f=s!==r?"nextSibling":"previousSibling",g=t.parentNode,v=l&&t.nodeName.toLowerCase(),_=!a&&!l,C=!1;if(g){if(s){for(;f;){for(h=t;h=h[f];)if(l?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;m=f="only"===e&&!m&&"nextSibling"}return!0}if(m=[r?g.firstChild:g.lastChild],r&&_){for(C=(p=(d=(u=(c=(h=g)[b]||(h[b]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===w&&d[1])&&d[2],h=p&&g.childNodes[p];h=++p&&h&&h[f]||(C=p=0)||m.pop();)if(1===h.nodeType&&++C&&h===t){u[e]=[w,p,C];break}}else if(_&&(C=p=(d=(u=(c=(h=t)[b]||(h[b]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]||[])[0]===w&&d[1]),!1===C)for(;(h=++p&&h&&h[f]||(C=p=0)||m.pop())&&((l?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++C||(_&&((u=(c=h[b]||(h[b]={}))[h.uniqueID]||(c[h.uniqueID]={}))[e]=[w,C]),h!==t)););return(C-=o)===n||C%n==0&&C/n>=0}}},PSEUDO:function(e,t){var i,o=n.pseudos[e]||n.setFilters[e.toLowerCase()]||le.error("unsupported pseudo: "+e);return o[b]?o(t):o.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?de((function(e,i){for(var n,s=o(e,t),r=s.length;r--;)e[n=F(e,s[r])]=!(i[n]=s[r])})):function(e){return o(e,0,i)}):o}},pseudos:{not:de((function(e){var t=[],i=[],n=l(e.replace(B,"$1"));return n[b]?de((function(e,t,i,o){for(var s,r=n(e,null,o,[]),l=e.length;l--;)(s=r[l])&&(e[l]=!(t[l]=s))})):function(e,o,s){return t[0]=e,n(t,null,s,i),t[0]=null,!i.pop()}})),has:de((function(e){return function(t){return le(e,t).length>0}})),contains:de((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||o(t)).indexOf(e)>-1}})),lang:de((function(e){return Y.test(e||"")||le.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===m},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,i){return[i<0?i+t:i]})),even:ge((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ge((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ge((function(e,t,i){for(var n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:ge((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=me(t);function _e(){}function Ce(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function be(e,t,i){var n=t.dir,o=t.next,s=o||n,r=i&&"parentNode"===s,l=S++;return t.first?function(t,i,o){for(;t=t[n];)if(1===t.nodeType||r)return e(t,i,o);return!1}:function(t,i,a){var d,u,c,h=[w,l];if(a){for(;t=t[n];)if((1===t.nodeType||r)&&e(t,i,a))return!0}else for(;t=t[n];)if(1===t.nodeType||r)if(u=(c=t[b]||(t[b]={}))[t.uniqueID]||(c[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[n]||t;else{if((d=u[s])&&d[0]===w&&d[1]===l)return h[2]=d[2];if(u[s]=h,h[2]=e(t,i,a))return!0}return!1}}function ye(e){return e.length>1?function(t,i,n){for(var o=e.length;o--;)if(!e[o](t,i,n))return!1;return!0}:e[0]}function we(e,t,i,n,o){for(var s,r=[],l=0,a=e.length,d=null!=t;l<a;l++)(s=e[l])&&(i&&!i(s,n,o)||(r.push(s),d&&t.push(l)));return r}function Se(e,t,i,n,o,s){return n&&!n[b]&&(n=Se(n)),o&&!o[b]&&(o=Se(o,s)),de((function(s,r,l,a){var d,u,c,h=[],p=[],m=r.length,f=s||function(e,t,i){for(var n=0,o=t.length;n<o;n++)le(e,t[n],i);return i}(t||"*",l.nodeType?[l]:l,[]),g=!e||!s&&t?f:we(f,h,e,l,a),v=i?o||(s?e:m||n)?[]:r:g;if(i&&i(g,v,l,a),n)for(d=we(v,p),n(d,[],l,a),u=d.length;u--;)(c=d[u])&&(v[p[u]]=!(g[p[u]]=c));if(s){if(o||e){if(o){for(d=[],u=v.length;u--;)(c=v[u])&&d.push(g[u]=c);o(null,v=[],d,a)}for(u=v.length;u--;)(c=v[u])&&(d=o?F(s,c):h[u])>-1&&(s[d]=!(r[d]=c))}}else v=we(v===r?v.splice(m,v.length):v),o?o(null,r,v,a):P.apply(r,v)}))}function Ee(e){for(var t,i,o,s=e.length,r=n.relative[e[0].type],l=r||n.relative[" "],a=r?1:0,u=be((function(e){return e===t}),l,!0),c=be((function(e){return F(t,e)>-1}),l,!0),h=[function(e,i,n){var o=!r&&(n||i!==d)||((t=i).nodeType?u(e,i,n):c(e,i,n));return t=null,o}];a<s;a++)if(i=n.relative[e[a].type])h=[be(ye(h),i)];else{if((i=n.filter[e[a].type].apply(null,e[a].matches))[b]){for(o=++a;o<s&&!n.relative[e[o].type];o++);return Se(a>1&&ye(h),a>1&&Ce(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(B,"$1"),i,a<o&&Ee(e.slice(a,o)),o<s&&Ee(e=e.slice(o)),o<s&&Ce(e))}h.push(i)}return ye(h)}return _e.prototype=n.filters=n.pseudos,n.setFilters=new _e,r=le.tokenize=function(e,t){var i,o,s,r,l,a,d,u=T[e+" "];if(u)return t?0:u.slice(0);for(l=e,a=[],d=n.preFilter;l;){for(r in i&&!(o=W.exec(l))||(o&&(l=l.slice(o[0].length)||l),a.push(s=[])),i=!1,(o=G.exec(l))&&(i=o.shift(),s.push({value:i,type:o[0].replace(B," ")}),l=l.slice(i.length)),n.filter)!(o=q[r].exec(l))||d[r]&&!(o=d[r](o))||(i=o.shift(),s.push({value:i,type:r,matches:o}),l=l.slice(i.length));if(!i)break}return t?l.length:l?le.error(e):T(e,a).slice(0)},l=le.compile=function(e,t){var i,o=[],s=[],l=x[e+" "];if(!l){for(t||(t=r(e)),i=t.length;i--;)(l=Ee(t[i]))[b]?o.push(l):s.push(l);(l=x(e,function(e,t){var i=t.length>0,o=e.length>0,s=function(s,r,l,a,u){var c,m,g,v=0,_="0",C=s&&[],b=[],y=d,S=s||o&&n.find.TAG("*",u),E=w+=null==y?1:Math.random()||.1,T=S.length;for(u&&(d=r==p||r||u);_!==T&&null!=(c=S[_]);_++){if(o&&c){for(m=0,r||c.ownerDocument==p||(h(c),l=!f);g=e[m++];)if(g(c,r||p,l)){a.push(c);break}u&&(w=E)}i&&((c=!g&&c)&&v--,s&&C.push(c))}if(v+=_,i&&_!==v){for(m=0;g=t[m++];)g(C,b,r,l);if(s){if(v>0)for(;_--;)C[_]||b[_]||(b[_]=R.call(a));b=we(b)}P.apply(a,b),u&&!s&&b.length>0&&v+t.length>1&&le.uniqueSort(a)}return u&&(w=E,d=y),C};return i?de(s):s}(s,o))).selector=e}return l},a=le.select=function(e,t,i,o){var s,a,d,u,c,h="function"==typeof e&&e,p=!o&&r(e=h.selector||e);if(i=i||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(d=a[0]).type&&9===t.nodeType&&f&&n.relative[a[1].type]){if(!(t=(n.find.ID(d.matches[0].replace(te,ie),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(s=q.needsContext.test(e)?0:a.length;s--&&(d=a[s],!n.relative[u=d.type]);)if((c=n.find[u])&&(o=c(d.matches[0].replace(te,ie),ee.test(a[0].type)&&ve(t.parentNode)||t))){if(a.splice(s,1),!(e=o.length&&Ce(a)))return P.apply(i,o),i;break}}return(h||l(e,p))(o,t,!f,i,!t||ee.test(e)&&ve(t.parentNode)||t),i},i.sortStable=b.split("").sort(k).join("")===b,i.detectDuplicates=!!c,h(),i.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ce("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ce("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||ce(N,(function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),le}(n);E.find=x,E.expr=x.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=x.uniqueSort,E.text=x.getText,E.isXMLDoc=x.isXML,E.contains=x.contains,E.escapeSelector=x.escape;var O=function(e,t,i){for(var n=[],o=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&E(e).is(i))break;n.push(e)}return n},k=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},D=E.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,i){return v(t)?E.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?E.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?E.grep(e,(function(e){return u.call(t,e)>-1!==i})):E.filter(t,e,i)}E.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?E.find.matchesSelector(n,e)?[n]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,i,n=this.length,o=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t<n;t++)if(E.contains(o[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)E.find(e,o[t],i);return n>1?E.uniqueSort(i):i},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&D.test(e)?E(e):e||[],!1).length}});var P,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,i){var n,o;if(!e)return this;if(i=i||P,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),R.test(n[1])&&E.isPlainObject(t))for(n in t)v(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(o=C.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,P=E(C);var F=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function L(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(E.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,o=this.length,s=[],r="string"!=typeof e&&E(e);if(!D.test(e))for(;n<o;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&E.find.matchesSelector(i,e))){s.push(i);break}return this.pushStack(s.length>1?E.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?u.call(E(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,i){return O(e,"parentNode",i)},next:function(e){return L(e,"nextSibling")},prev:function(e){return L(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,i){return O(e,"nextSibling",i)},prevUntil:function(e,t,i){return O(e,"previousSibling",i)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(i,n){var o=E.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=E.filter(n,o)),this.length>1&&(N[e]||E.uniqueSort(o),F.test(e)&&o.reverse()),this.pushStack(o)}}));var $=/[^\x20\t\r\n\f]+/g;function H(e){return e}function V(e){throw e}function z(e,t,i,n){var o;try{e&&v(o=e.promise)?o.call(e).done(t).fail(i):e&&v(o=e.then)?o.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match($)||[],(function(e,i){t[i]=!0})),t}(e):E.extend({},e);var t,i,n,o,s=[],r=[],l=-1,a=function(){for(o=o||e.once,n=t=!0;r.length;l=-1)for(i=r.shift();++l<s.length;)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1);e.memory||(i=!1),t=!1,o&&(s=i?[]:"")},d={add:function(){return s&&(i&&!t&&(l=s.length-1,r.push(i)),function t(i){E.each(i,(function(i,n){v(n)?e.unique&&d.has(n)||s.push(n):n&&n.length&&"string"!==w(n)&&t(n)}))}(arguments),i&&!t&&a()),this},remove:function(){return E.each(arguments,(function(e,t){for(var i;(i=E.inArray(t,s,i))>-1;)s.splice(i,1),i<=l&&l--})),this},has:function(e){return e?E.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=r=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=r=[],i||t||(s=i=""),this},locked:function(){return!!o},fireWith:function(e,i){return o||(i=[e,(i=i||[]).slice?i.slice():i],r.push(i),t||a()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(i){E.each(t,(function(t,n){var o=v(e[n[4]])&&e[n[4]];s[n[1]]((function(){var e=o&&o.apply(this,arguments);e&&v(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,i,o){var s=0;function r(e,t,i,o){return function(){var l=this,a=arguments,d=function(){var n,d;if(!(e<s)){if((n=i.apply(l,a))===t.promise())throw new TypeError("Thenable self-resolution");d=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(d)?o?d.call(n,r(s,t,H,o),r(s,t,V,o)):(s++,d.call(n,r(s,t,H,o),r(s,t,V,o),r(s,t,H,t.notifyWith))):(i!==H&&(l=void 0,a=[n]),(o||t.resolveWith)(l,a))}},u=o?d:function(){try{d()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,u.stackTrace),e+1>=s&&(i!==V&&(l=void 0,a=[n]),t.rejectWith(l,a))}};e?u():(E.Deferred.getStackHook&&(u.stackTrace=E.Deferred.getStackHook()),n.setTimeout(u))}}return E.Deferred((function(n){t[0][3].add(r(0,n,v(o)?o:H,n.notifyWith)),t[1][3].add(r(0,n,v(e)?e:H)),t[2][3].add(r(0,n,v(i)?i:V))})).promise()},promise:function(e){return null!=e?E.extend(e,o):o}},s={};return E.each(t,(function(e,n){var r=n[2],l=n[5];o[n[1]]=r.add,l&&r.add((function(){i=l}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),r.add(n[3].fire),s[n[0]]=function(){return s[n[0]+"With"](this===s?void 0:this,arguments),this},s[n[0]+"With"]=r.fireWith})),o.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,i=t,n=Array(i),o=l.call(arguments),s=E.Deferred(),r=function(e){return function(i){n[e]=this,o[e]=arguments.length>1?l.call(arguments):i,--t||s.resolveWith(n,o)}};if(t<=1&&(z(e,s.done(r(i)).resolve,s.reject,!t),"pending"===s.state()||v(o[i]&&o[i].then)))return s.then();for(;i--;)z(o[i],r(i),s.reject);return s.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){n.setTimeout((function(){throw e}))};var W=E.Deferred();function G(){C.removeEventListener("DOMContentLoaded",G),n.removeEventListener("load",G),E.ready()}E.fn.ready=function(e){return W.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||W.resolveWith(C,[E]))}}),E.ready.then=W.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?n.setTimeout(E.ready):(C.addEventListener("DOMContentLoaded",G),n.addEventListener("load",G));var U=function(e,t,i,n,o,s,r){var l=0,a=e.length,d=null==i;if("object"===w(i))for(l in o=!0,i)U(e,t,l,i[l],!0,s,r);else if(void 0!==n&&(o=!0,v(n)||(r=!0),d&&(r?(t.call(e,n),t=null):(d=t,t=function(e,t,i){return d.call(E(e),i)})),t))for(;l<a;l++)t(e[l],i,r?n:n.call(e[l],l,t(e[l],i)));return o?e:d?t.call(e):a?t(e[0],i):s},j=/^-ms-/,Y=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function X(e){return e.replace(j,"ms-").replace(Y,q)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=E.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,o=this.cache(e);if("string"==typeof t)o[X(t)]=i;else for(n in t)o[X(n)]=t[n];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(X):(t=X(t))in n?[t]:t.match($)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||E.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var Z=new Q,J=new Q,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ie(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(i)}catch(e){}J.set(e,t,i)}else i=void 0;return i}E.extend({hasData:function(e){return J.hasData(e)||Z.hasData(e)},data:function(e,t,i){return J.access(e,t,i)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,i){return Z.access(e,t,i)},_removeData:function(e,t){Z.remove(e,t)}}),E.fn.extend({data:function(e,t){var i,n,o,s=this[0],r=s&&s.attributes;if(void 0===e){if(this.length&&(o=J.get(s),1===s.nodeType&&!Z.get(s,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&0===(n=r[i].name).indexOf("data-")&&(n=X(n.slice(5)),ie(s,n,o[n]));Z.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each((function(){J.set(this,e)})):U(this,(function(t){var i;if(s&&void 0===t)return void 0!==(i=J.get(s,e))||void 0!==(i=ie(s,e))?i:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),E.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=Z.get(e,t),i&&(!n||Array.isArray(i)?n=Z.access(e,t,E.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=E.queue(e,t),n=i.length,o=i.shift(),s=E._queueHooks(e,t);"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===t&&i.unshift("inprogress"),delete s.stop,o.call(e,(function(){E.dequeue(e,t)}),s)),!n&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return Z.get(e,i)||Z.access(e,i,{empty:E.Callbacks("once memory").add((function(){Z.remove(e,[t+"queue",i])}))})}}),E.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?E.queue(this[0],e):void 0===t?this:this.each((function(){var i=E.queue(this,e,t);E._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&E.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){E.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,o=E.Deferred(),s=this,r=this.length,l=function(){--n||o.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)(i=Z.get(s[r],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(l));return l(),o.promise(t)}});var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,oe=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),se=["Top","Right","Bottom","Left"],re=C.documentElement,le=function(e){return E.contains(e.ownerDocument,e)},ae={composed:!0};re.getRootNode&&(le=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var de=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&le(e)&&"none"===E.css(e,"display")};function ue(e,t,i,n){var o,s,r=20,l=n?function(){return n.cur()}:function(){return E.css(e,t,"")},a=l(),d=i&&i[3]||(E.cssNumber[t]?"":"px"),u=e.nodeType&&(E.cssNumber[t]||"px"!==d&&+a)&&oe.exec(E.css(e,t));if(u&&u[3]!==d){for(a/=2,d=d||u[3],u=+a||1;r--;)E.style(e,t,u+d),(1-s)*(1-(s=l()/a||.5))<=0&&(r=0),u/=s;u*=2,E.style(e,t,u+d),i=i||[]}return i&&(u=+u||+a||0,o=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=d,n.start=u,n.end=o)),o}var ce={};function he(e){var t,i=e.ownerDocument,n=e.nodeName,o=ce[n];return o||(t=i.body.appendChild(i.createElement(n)),o=E.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),ce[n]=o,o)}function pe(e,t){for(var i,n,o=[],s=0,r=e.length;s<r;s++)(n=e[s]).style&&(i=n.style.display,t?("none"===i&&(o[s]=Z.get(n,"display")||null,o[s]||(n.style.display="")),""===n.style.display&&de(n)&&(o[s]=he(n))):"none"!==i&&(o[s]="none",Z.set(n,"display",i)));for(s=0;s<r;s++)null!=o[s]&&(e[s].style.display=o[s]);return e}E.fn.extend({show:function(){return pe(this,!0)},hide:function(){return pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){de(this)?E(this).show():E(this).hide()}))}});var me,fe,ge=/^(?:checkbox|radio)$/i,ve=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,_e=/^$|^module$|\/(?:java|ecma)script/i;me=C.createDocumentFragment().appendChild(C.createElement("div")),(fe=C.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),me.appendChild(fe),g.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue,me.innerHTML="<option></option>",g.option=!!me.lastChild;var Ce={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],i):i}function ye(e,t){for(var i=0,n=e.length;i<n;i++)Z.set(e[i],"globalEval",!t||Z.get(t[i],"globalEval"))}Ce.tbody=Ce.tfoot=Ce.colgroup=Ce.caption=Ce.thead,Ce.th=Ce.td,g.option||(Ce.optgroup=Ce.option=[1,"<select multiple='multiple'>","</select>"]);var we=/<|&#?\w+;/;function Se(e,t,i,n,o){for(var s,r,l,a,d,u,c=t.createDocumentFragment(),h=[],p=0,m=e.length;p<m;p++)if((s=e[p])||0===s)if("object"===w(s))E.merge(h,s.nodeType?[s]:s);else if(we.test(s)){for(r=r||c.appendChild(t.createElement("div")),l=(ve.exec(s)||["",""])[1].toLowerCase(),a=Ce[l]||Ce._default,r.innerHTML=a[1]+E.htmlPrefilter(s)+a[2],u=a[0];u--;)r=r.lastChild;E.merge(h,r.childNodes),(r=c.firstChild).textContent=""}else h.push(t.createTextNode(s));for(c.textContent="",p=0;s=h[p++];)if(n&&E.inArray(s,n)>-1)o&&o.push(s);else if(d=le(s),r=be(c.appendChild(s),"script"),d&&ye(r),i)for(u=0;s=r[u++];)_e.test(s.type||"")&&i.push(s);return c}var Ee=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function Oe(){return!0}function ke(){return!1}function De(e,t){return e===function(){try{return C.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,i,n,o,s){var r,l;if("object"==typeof t){for(l in"string"!=typeof i&&(n=n||i,i=void 0),t)Ae(e,l,i,n,t[l],s);return e}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=ke;else if(!o)return e;return 1===s&&(r=o,(o=function(e){return E().off(e),r.apply(this,arguments)}).guid=r.guid||(r.guid=E.guid++)),e.each((function(){E.event.add(this,t,o,n,i)}))}function Re(e,t,i){i?(Z.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,o,s=Z.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=l.call(arguments),Z.set(this,t,s),n=i(this,t),this[t](),s!==(o=Z.get(this,t))||n?Z.set(this,t,!1):o={},s!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else s.length&&(Z.set(this,t,{value:E.event.trigger(E.extend(s[0],E.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Z.get(e,t)&&E.event.add(e,t,Oe)}E.event={global:{},add:function(e,t,i,n,o){var s,r,l,a,d,u,c,h,p,m,f,g=Z.get(e);if(K(e))for(i.handler&&(i=(s=i).handler,o=s.selector),o&&E.find.matchesSelector(re,o),i.guid||(i.guid=E.guid++),(a=g.events)||(a=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),d=(t=(t||"").match($)||[""]).length;d--;)p=f=(l=xe.exec(t[d])||[])[1],m=(l[2]||"").split(".").sort(),p&&(c=E.event.special[p]||{},p=(o?c.delegateType:c.bindType)||p,c=E.event.special[p]||{},u=E.extend({type:p,origType:f,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&E.expr.match.needsContext.test(o),namespace:m.join(".")},s),(h=a[p])||((h=a[p]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,n,m,r)||e.addEventListener&&e.addEventListener(p,r)),c.add&&(c.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),E.event.global[p]=!0)},remove:function(e,t,i,n,o){var s,r,l,a,d,u,c,h,p,m,f,g=Z.hasData(e)&&Z.get(e);if(g&&(a=g.events)){for(d=(t=(t||"").match($)||[""]).length;d--;)if(p=f=(l=xe.exec(t[d])||[])[1],m=(l[2]||"").split(".").sort(),p){for(c=E.event.special[p]||{},h=a[p=(n?c.delegateType:c.bindType)||p]||[],l=l[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=h.length;s--;)u=h[s],!o&&f!==u.origType||i&&i.guid!==u.guid||l&&!l.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(s,1),u.selector&&h.delegateCount--,c.remove&&c.remove.call(e,u));r&&!h.length&&(c.teardown&&!1!==c.teardown.call(e,m,g.handle)||E.removeEvent(e,p,g.handle),delete a[p])}else for(p in a)E.event.remove(e,p+t[d],i,n,!0);E.isEmptyObject(a)&&Z.remove(e,"handle events")}},dispatch:function(e){var t,i,n,o,s,r,l=new Array(arguments.length),a=E.event.fix(e),d=(Z.get(this,"events")||Object.create(null))[a.type]||[],u=E.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(r=E.event.handlers.call(this,a,d),t=0;(o=r[t++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,i=0;(s=o.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==s.namespace&&!a.rnamespace.test(s.namespace)||(a.handleObj=s,a.data=s.data,void 0!==(n=((E.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(a.result=n)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var i,n,o,s,r,l=[],a=t.delegateCount,d=e.target;if(a&&d.nodeType&&!("click"===e.type&&e.button>=1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(s=[],r={},i=0;i<a;i++)void 0===r[o=(n=t[i]).selector+" "]&&(r[o]=n.needsContext?E(o,this).index(d)>-1:E.find(o,this,null,[d]).length),r[o]&&s.push(n);s.length&&l.push({elem:d,handlers:s})}return d=this,a<t.length&&l.push({elem:d,handlers:t.slice(a)}),l},addProp:function(e,t){Object.defineProperty(E.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&A(t,"input")&&Re(t,"click",Oe),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&A(t,"input")&&Re(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&A(t,"input")&&Z.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Oe:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ee.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(e,t){E.event.special[e]={setup:function(){return Re(this,e,De),!1},trigger:function(){return Re(this,e),!0},delegateType:t}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){E.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,o=e.relatedTarget,s=e.handleObj;return o&&(o===n||E.contains(n,o))||(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=t),i}}})),E.fn.extend({on:function(e,t,i,n){return Ae(this,e,t,i,n)},one:function(e,t,i,n){return Ae(this,e,t,i,n,1)},off:function(e,t,i){var n,o;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,E(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=ke),this.each((function(){E.event.remove(this,e,i,t)}))}});var Ie=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Fe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Ne(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function $e(e,t){var i,n,o,s,r,l;if(1===t.nodeType){if(Z.hasData(e)&&(l=Z.get(e).events))for(o in Z.remove(t,"handle events"),l)for(i=0,n=l[o].length;i<n;i++)E.event.add(t,o,l[o][i]);J.hasData(e)&&(s=J.access(e),r=E.extend({},s),J.set(t,r))}}function He(e,t){var i=t.nodeName.toLowerCase();"input"===i&&ge.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function Ve(e,t,i,n){t=a(t);var o,s,r,l,d,u,c=0,h=e.length,p=h-1,m=t[0],f=v(m);if(f||h>1&&"string"==typeof m&&!g.checkClone&&Pe.test(m))return e.each((function(o){var s=e.eq(o);f&&(t[0]=m.call(this,o,s.html())),Ve(s,t,i,n)}));if(h&&(s=(o=Se(t,e[0].ownerDocument,!1,e,n)).firstChild,1===o.childNodes.length&&(o=s),s||n)){for(l=(r=E.map(be(o,"script"),Ne)).length;c<h;c++)d=o,c!==p&&(d=E.clone(d,!0,!0),l&&E.merge(r,be(d,"script"))),i.call(e[c],d,c);if(l)for(u=r[r.length-1].ownerDocument,E.map(r,Le),c=0;c<l;c++)d=r[c],_e.test(d.type||"")&&!Z.access(d,"globalEval")&&E.contains(u,d)&&(d.src&&"module"!==(d.type||"").toLowerCase()?E._evalUrl&&!d.noModule&&E._evalUrl(d.src,{nonce:d.nonce||d.getAttribute("nonce")},u):y(d.textContent.replace(Me,""),d,u))}return e}function ze(e,t,i){for(var n,o=t?E.filter(t,e):e,s=0;null!=(n=o[s]);s++)i||1!==n.nodeType||E.cleanData(be(n)),n.parentNode&&(i&&le(n)&&ye(be(n,"script")),n.parentNode.removeChild(n));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,o,s,r,l=e.cloneNode(!0),a=le(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(r=be(l),n=0,o=(s=be(e)).length;n<o;n++)He(s[n],r[n]);if(t)if(i)for(s=s||be(e),r=r||be(l),n=0,o=s.length;n<o;n++)$e(s[n],r[n]);else $e(e,l);return(r=be(l,"script")).length>0&&ye(r,!a&&be(e,"script")),l},cleanData:function(e){for(var t,i,n,o=E.event.special,s=0;void 0!==(i=e[s]);s++)if(K(i)){if(t=i[Z.expando]){if(t.events)for(n in t.events)o[n]?E.event.remove(i,n):E.removeEvent(i,n,t.handle);i[Z.expando]=void 0}i[J.expando]&&(i[J.expando]=void 0)}}}),E.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return U(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Fe(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Fe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return U(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ie.test(e)&&!Ce[(ve.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(E.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,(function(t){var i=this.parentNode;E.inArray(this,e)<0&&(E.cleanData(be(this)),i&&i.replaceChild(t,this))}),e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){E.fn[e]=function(e){for(var i,n=[],o=E(e),s=o.length-1,r=0;r<=s;r++)i=r===s?this:this.clone(!0),E(o[r])[t](i),d.apply(n,i.get());return this.pushStack(n)}}));var Be=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),We=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ge=function(e,t,i){var n,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in n=i.call(e),t)e.style[o]=s[o];return n},Ue=new RegExp(se.join("|"),"i");function je(e,t,i){var n,o,s,r,l=e.style;return(i=i||We(e))&&(""!==(r=i.getPropertyValue(t)||i[t])||le(e)||(r=E.style(e,t)),!g.pixelBoxStyles()&&Be.test(r)&&Ue.test(t)&&(n=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=i.width,l.width=n,l.minWidth=o,l.maxWidth=s)),void 0!==r?r+"":r}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){d.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(d).appendChild(u);var e=n.getComputedStyle(u);i="1%"!==e.top,a=12===t(e.marginLeft),u.style.right="60%",r=36===t(e.right),o=36===t(e.width),u.style.position="absolute",s=12===t(u.offsetWidth/3),re.removeChild(d),u=null}}function t(e){return Math.round(parseFloat(e))}var i,o,s,r,l,a,d=C.createElement("div"),u=C.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===u.style.backgroundClip,E.extend(g,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),r},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,t,i,o;return null==l&&(e=C.createElement("table"),t=C.createElement("tr"),i=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",i.style.height="9px",re.appendChild(e).appendChild(t).appendChild(i),o=n.getComputedStyle(t),l=parseInt(o.height)>3,re.removeChild(e)),l}}))}();var qe=["Webkit","Moz","ms"],Xe=C.createElement("div").style,Ke={};function Qe(e){return E.cssProps[e]||Ke[e]||(e in Xe?e:Ke[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=qe.length;i--;)if((e=qe[i]+t)in Xe)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,Je=/^--/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function it(e,t,i){var n=oe.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function nt(e,t,i,n,o,s){var r="width"===t?1:0,l=0,a=0;if(i===(n?"border":"content"))return 0;for(;r<4;r+=2)"margin"===i&&(a+=E.css(e,i+se[r],!0,o)),n?("content"===i&&(a-=E.css(e,"padding"+se[r],!0,o)),"margin"!==i&&(a-=E.css(e,"border"+se[r]+"Width",!0,o))):(a+=E.css(e,"padding"+se[r],!0,o),"padding"!==i?a+=E.css(e,"border"+se[r]+"Width",!0,o):l+=E.css(e,"border"+se[r]+"Width",!0,o));return!n&&s>=0&&(a+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-a-l-.5))||0),a}function ot(e,t,i){var n=We(e),o=(!g.boxSizingReliable()||i)&&"border-box"===E.css(e,"boxSizing",!1,n),s=o,r=je(e,t,n),l="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(r)){if(!i)return r;r="auto"}return(!g.boxSizingReliable()&&o||!g.reliableTrDimensions()&&A(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===E.css(e,"display",!1,n))&&e.getClientRects().length&&(o="border-box"===E.css(e,"boxSizing",!1,n),(s=l in e)&&(r=e[l])),(r=parseFloat(r)||0)+nt(e,t,i||(o?"border":"content"),s,n,r)+"px"}function st(e,t,i,n,o){return new st.prototype.init(e,t,i,n,o)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=je(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,s,r,l=X(t),a=Je.test(t),d=e.style;if(a||(t=Qe(l)),r=E.cssHooks[t]||E.cssHooks[l],void 0===i)return r&&"get"in r&&void 0!==(o=r.get(e,!1,n))?o:d[t];"string"==(s=typeof i)&&(o=oe.exec(i))&&o[1]&&(i=ue(e,t,o),s="number"),null!=i&&i==i&&("number"!==s||a||(i+=o&&o[3]||(E.cssNumber[l]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(d[t]="inherit"),r&&"set"in r&&void 0===(i=r.set(e,i,n))||(a?d.setProperty(t,i):d[t]=i))}},css:function(e,t,i,n){var o,s,r,l=X(t);return Je.test(t)||(t=Qe(l)),(r=E.cssHooks[t]||E.cssHooks[l])&&"get"in r&&(o=r.get(e,!0,i)),void 0===o&&(o=je(e,t,n)),"normal"===o&&t in tt&&(o=tt[t]),""===i||i?(s=parseFloat(o),!0===i||isFinite(s)?s||0:o):o}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,i,n){if(i)return!Ze.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,n):Ge(e,et,(function(){return ot(e,t,n)}))},set:function(e,i,n){var o,s=We(e),r=!g.scrollboxSize()&&"absolute"===s.position,l=(r||n)&&"border-box"===E.css(e,"boxSizing",!1,s),a=n?nt(e,t,n,l,s):0;return l&&r&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-nt(e,t,"border",!1,s)-.5)),a&&(o=oe.exec(i))&&"px"!==(o[3]||"px")&&(e.style[t]=i,i=E.css(e,t)),it(0,i,a)}}})),E.cssHooks.marginLeft=Ye(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(je(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(i){for(var n=0,o={},s="string"==typeof i?i.split(" "):[i];n<4;n++)o[e+se[n]+t]=s[n]||s[n-2]||s[0];return o}},"margin"!==e&&(E.cssHooks[e+t].set=it)})),E.fn.extend({css:function(e,t){return U(this,(function(e,t,i){var n,o,s={},r=0;if(Array.isArray(t)){for(n=We(e),o=t.length;r<o;r++)s[t[r]]=E.css(e,t[r],!1,n);return s}return void 0!==i?E.style(e,t,i):E.css(e,t)}),e,t,arguments.length>1)}}),E.Tween=st,st.prototype={constructor:st,init:function(e,t,i,n,o,s){this.elem=e,this.prop=i,this.easing=o||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=s||(E.cssNumber[i]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,i=st.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=st.prototype.init,E.fx.step={};var rt,lt,at=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ut(){lt&&(!1===C.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ut):n.setTimeout(ut,E.fx.interval),E.fx.tick())}function ct(){return n.setTimeout((function(){rt=void 0})),rt=Date.now()}function ht(e,t){var i,n=0,o={height:e};for(t=t?1:0;n<4;n+=2-t)o["margin"+(i=se[n])]=o["padding"+i]=e;return t&&(o.opacity=o.width=e),o}function pt(e,t,i){for(var n,o=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),s=0,r=o.length;s<r;s++)if(n=o[s].call(i,t,e))return n}function mt(e,t,i){var n,o,s=0,r=mt.prefilters.length,l=E.Deferred().always((function(){delete a.elem})),a=function(){if(o)return!1;for(var t=rt||ct(),i=Math.max(0,d.startTime+d.duration-t),n=1-(i/d.duration||0),s=0,r=d.tweens.length;s<r;s++)d.tweens[s].run(n);return l.notifyWith(e,[d,n,i]),n<1&&r?i:(r||l.notifyWith(e,[d,1,0]),l.resolveWith(e,[d]),!1)},d=l.promise({elem:e,props:E.extend({},t),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},i),originalProperties:t,originalOptions:i,startTime:rt||ct(),duration:i.duration,tweens:[],createTween:function(t,i){var n=E.Tween(e,d.opts,t,i,d.opts.specialEasing[t]||d.opts.easing);return d.tweens.push(n),n},stop:function(t){var i=0,n=t?d.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)d.tweens[i].run(1);return t?(l.notifyWith(e,[d,1,0]),l.resolveWith(e,[d,t])):l.rejectWith(e,[d,t]),this}}),u=d.props;for(function(e,t){var i,n,o,s,r;for(i in e)if(o=t[n=X(i)],s=e[i],Array.isArray(s)&&(o=s[1],s=e[i]=s[0]),i!==n&&(e[n]=s,delete e[i]),(r=E.cssHooks[n])&&"expand"in r)for(i in s=r.expand(s),delete e[n],s)i in e||(e[i]=s[i],t[i]=o);else t[n]=o}(u,d.opts.specialEasing);s<r;s++)if(n=mt.prefilters[s].call(d,e,u,d.opts))return v(n.stop)&&(E._queueHooks(d.elem,d.opts.queue).stop=n.stop.bind(n)),n;return E.map(u,pt,d),v(d.opts.start)&&d.opts.start.call(e,d),d.progress(d.opts.progress).done(d.opts.done,d.opts.complete).fail(d.opts.fail).always(d.opts.always),E.fx.timer(E.extend(a,{elem:e,anim:d,queue:d.opts.queue})),d}E.Animation=E.extend(mt,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ue(i.elem,e,oe.exec(t),i),i}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match($);for(var i,n=0,o=e.length;n<o;n++)i=e[n],mt.tweeners[i]=mt.tweeners[i]||[],mt.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,o,s,r,l,a,d,u,c="width"in t||"height"in t,h=this,p={},m=e.style,f=e.nodeType&&de(e),g=Z.get(e,"fxshow");for(n in i.queue||(null==(r=E._queueHooks(e,"fx")).unqueued&&(r.unqueued=0,l=r.empty.fire,r.empty.fire=function(){r.unqueued||l()}),r.unqueued++,h.always((function(){h.always((function(){r.unqueued--,E.queue(e,"fx").length||r.empty.fire()}))}))),t)if(o=t[n],at.test(o)){if(delete t[n],s=s||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!g||void 0===g[n])continue;f=!0}p[n]=g&&g[n]||E.style(e,n)}if((a=!E.isEmptyObject(t))||!E.isEmptyObject(p))for(n in c&&1===e.nodeType&&(i.overflow=[m.overflow,m.overflowX,m.overflowY],null==(d=g&&g.display)&&(d=Z.get(e,"display")),"none"===(u=E.css(e,"display"))&&(d?u=d:(pe([e],!0),d=e.style.display||d,u=E.css(e,"display"),pe([e]))),("inline"===u||"inline-block"===u&&null!=d)&&"none"===E.css(e,"float")&&(a||(h.done((function(){m.display=d})),null==d&&(u=m.display,d="none"===u?"":u)),m.display="inline-block")),i.overflow&&(m.overflow="hidden",h.always((function(){m.overflow=i.overflow[0],m.overflowX=i.overflow[1],m.overflowY=i.overflow[2]}))),a=!1,p)a||(g?"hidden"in g&&(f=g.hidden):g=Z.access(e,"fxshow",{display:d}),s&&(g.hidden=!f),f&&pe([e],!0),h.done((function(){for(n in f||pe([e]),Z.remove(e,"fxshow"),p)E.style(e,n,p[n])}))),a=pt(f?g[n]:0,n,h),n in g||(g[n]=a.start,f&&(a.end=a.start,a.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),E.speed=function(e,t,i){var n=e&&"object"==typeof e?E.extend({},e):{complete:i||!i&&t||v(e)&&e,duration:e,easing:i&&t||t&&!v(t)&&t};return E.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in E.fx.speeds?n.duration=E.fx.speeds[n.duration]:n.duration=E.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v(n.old)&&n.old.call(this),n.queue&&E.dequeue(this,n.queue)},n},E.fn.extend({fadeTo:function(e,t,i,n){return this.filter(de).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var o=E.isEmptyObject(e),s=E.speed(t,i,n),r=function(){var t=mt(this,E.extend({},e),s);(o||Z.get(this,"finish"))&&t.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",s=E.timers,r=Z.get(this);if(o)r[o]&&r[o].stop&&n(r[o]);else for(o in r)r[o]&&r[o].stop&&dt.test(o)&&n(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=e&&s[o].queue!==e||(s[o].anim.stop(i),t=!1,s.splice(o,1));!t&&i||E.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=Z.get(this),n=i[e+"queue"],o=i[e+"queueHooks"],s=E.timers,r=n?n.length:0;for(i.finish=!0,E.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<r;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),E.each(["toggle","show","hide"],(function(e,t){var i=E.fn[t];E.fn[t]=function(e,n,o){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ht(t,!0),e,n,o)}})),E.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){E.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),E.timers=[],E.fx.tick=function(){var e,t=0,i=E.timers;for(rt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||E.fx.stop(),rt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){lt||(lt=!0,ut())},E.fx.stop=function(){lt=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(e,t){return e=E.fx&&E.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,i){var o=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(o)}}))},function(){var e=C.createElement("input"),t=C.createElement("select").appendChild(C.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=C.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var ft,gt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return U(this,E.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,i){var n,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?E.prop(e,t,i):(1===s&&E.isXMLDoc(e)||(o=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?ft:void 0)),void 0!==i?null===i?void E.removeAttr(e,t):o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:(e.setAttribute(t,i+""),i):o&&"get"in o&&null!==(n=o.get(e,t))?n:null==(n=E.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&A(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,o=t&&t.match($);if(o&&1===e.nodeType)for(;i=o[n++];)e.removeAttribute(i)}}),ft={set:function(e,t,i){return!1===t?E.removeAttr(e,i):e.setAttribute(i,i),i}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=gt[t]||E.find.attr;gt[t]=function(e,t,n){var o,s,r=t.toLowerCase();return n||(s=gt[r],gt[r]=o,o=null!=i(e,t,n)?r:null,gt[r]=s),o}}));var vt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;function Ct(e){return(e.match($)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match($)||[]}E.fn.extend({prop:function(e,t){return U(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,i){var n,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&E.isXMLDoc(e)||(t=E.propFix[t]||t,o=E.propHooks[t]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:e[t]=i:o&&"get"in o&&null!==(n=o.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,i,n,o,s,r,l,a=0;if(v(e))return this.each((function(t){E(this).addClass(e.call(this,t,bt(this)))}));if((t=yt(e)).length)for(;i=this[a++];)if(o=bt(i),n=1===i.nodeType&&" "+Ct(o)+" "){for(r=0;s=t[r++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");o!==(l=Ct(n))&&i.setAttribute("class",l)}return this},removeClass:function(e){var t,i,n,o,s,r,l,a=0;if(v(e))return this.each((function(t){E(this).removeClass(e.call(this,t,bt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;i=this[a++];)if(o=bt(i),n=1===i.nodeType&&" "+Ct(o)+" "){for(r=0;s=t[r++];)for(;n.indexOf(" "+s+" ")>-1;)n=n.replace(" "+s+" "," ");o!==(l=Ct(n))&&i.setAttribute("class",l)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(i){E(this).toggleClass(e.call(this,i,bt(this),t),t)})):this.each((function(){var t,o,s,r;if(n)for(o=0,s=E(this),r=yt(e);t=r[o++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==i||((t=bt(this))&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Z.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+Ct(bt(i))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;E.fn.extend({val:function(e){var t,i,n,o=this[0];return arguments.length?(n=v(e),this.each((function(i){var o;1===this.nodeType&&(null==(o=n?e.call(this,i,E(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=E.map(o,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=E.valHooks[o.type]||E.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(o,"value"))?i:"string"==typeof(i=o.value)?i.replace(wt,""):null==i?"":i:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:Ct(E.text(e))}},select:{get:function(e){var t,i,n,o=e.options,s=e.selectedIndex,r="select-one"===e.type,l=r?null:[],a=r?s+1:o.length;for(n=s<0?a:r?s:0;n<a;n++)if(((i=o[n]).selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!A(i.parentNode,"optgroup"))){if(t=E(i).val(),r)return t;l.push(t)}return l},set:function(e,t){for(var i,n,o=e.options,s=E.makeArray(t),r=o.length;r--;)((n=o[r]).selected=E.inArray(E.valHooks.option.get(n),s)>-1)&&(i=!0);return i||(e.selectedIndex=-1),s}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},g.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in n;var St=/^(?:focusinfocus|focusoutblur)$/,Et=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,i,o){var s,r,l,a,d,u,c,h,m=[i||C],f=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(r=h=l=i=i||C,3!==i.nodeType&&8!==i.nodeType&&!St.test(f+E.event.triggered)&&(f.indexOf(".")>-1&&(g=f.split("."),f=g.shift(),g.sort()),d=f.indexOf(":")<0&&"on"+f,(e=e[E.expando]?e:new E.Event(f,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:E.makeArray(t,[e]),c=E.event.special[f]||{},o||!c.trigger||!1!==c.trigger.apply(i,t))){if(!o&&!c.noBubble&&!_(i)){for(a=c.delegateType||f,St.test(a+f)||(r=r.parentNode);r;r=r.parentNode)m.push(r),l=r;l===(i.ownerDocument||C)&&m.push(l.defaultView||l.parentWindow||n)}for(s=0;(r=m[s++])&&!e.isPropagationStopped();)h=r,e.type=s>1?a:c.bindType||f,(u=(Z.get(r,"events")||Object.create(null))[e.type]&&Z.get(r,"handle"))&&u.apply(r,t),(u=d&&r[d])&&u.apply&&K(r)&&(e.result=u.apply(r,t),!1===e.result&&e.preventDefault());return e.type=f,o||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(m.pop(),t)||!K(i)||d&&v(i[f])&&!_(i)&&((l=i[d])&&(i[d]=null),E.event.triggered=f,e.isPropagationStopped()&&h.addEventListener(f,Et),i[f](),e.isPropagationStopped()&&h.removeEventListener(f,Et),E.event.triggered=void 0,l&&(i[d]=l)),e.result}},simulate:function(e,t,i){var n=E.extend(new E.Event,i,{type:e,isSimulated:!0});E.event.trigger(n,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return E.event.trigger(e,t,i,!0)}}),g.focusin||E.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){E.event.simulate(t,e.target,E.event.fix(e))};E.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,o=Z.access(n,t);o||n.addEventListener(e,i,!0),Z.access(n,t,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,o=Z.access(n,t)-1;o?Z.access(n,t,o):(n.removeEventListener(e,i,!0),Z.remove(n,t))}}}));var Tt=n.location,xt={guid:Date.now()},Ot=/\?/;E.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||E.error("Invalid XML: "+e),t};var kt=/\[\]$/,Dt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function It(e,t,i,n){var o;if(Array.isArray(t))E.each(t,(function(t,o){i||kt.test(e)?n(e,o):It(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,i,n)}));else if(i||"object"!==w(t))n(e,t);else for(o in t)It(e+"["+o+"]",t[o],i,n)}E.param=function(e,t){var i,n=[],o=function(e,t){var i=v(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){o(this.name,this.value)}));else for(i in e)It(i,e[i],t,o);return n.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Rt.test(this.nodeName)&&!At.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var i=E(this).val();return null==i?null:Array.isArray(i)?E.map(i,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:i.replace(Dt,"\r\n")}})).get()}});var Pt=/%20/g,Mt=/#.*$/,Ft=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,$t=/^\/\//,Ht={},Vt={},zt="*/".concat("*"),Bt=C.createElement("a");function Wt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,o=0,s=t.toLowerCase().match($)||[];if(v(i))for(;n=s[o++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Gt(e,t,i,n){var o={},s=e===Vt;function r(l){var a;return o[l]=!0,E.each(e[l]||[],(function(e,l){var d=l(t,i,n);return"string"!=typeof d||s||o[d]?s?!(a=d):void 0:(t.dataTypes.unshift(d),r(d),!1)})),a}return r(t.dataTypes[0])||!o["*"]&&r("*")}function Ut(e,t){var i,n,o=E.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&E.extend(!0,e,n),e}Bt.href=Tt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,E.ajaxSettings),t):Ut(E.ajaxSettings,e)},ajaxPrefilter:Wt(Ht),ajaxTransport:Wt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,s,r,l,a,d,u,c,h,p=E.ajaxSetup({},t),m=p.context||p,f=p.context&&(m.nodeType||m.jquery)?E(m):E.event,g=E.Deferred(),v=E.Callbacks("once memory"),_=p.statusCode||{},b={},y={},w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(d){if(!r)for(r={};t=Nt.exec(s);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return d?s:null},setRequestHeader:function(e,t){return null==d&&(e=y[e.toLowerCase()]=y[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==d&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)S.always(e[S.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||w;return i&&i.abort(t),T(0,t),this}};if(g.promise(S),p.url=((e||p.url||Tt.href)+"").replace($t,Tt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match($)||[""],null==p.crossDomain){a=C.createElement("a");try{a.href=p.url,a.href=a.href,p.crossDomain=Bt.protocol+"//"+Bt.host!=a.protocol+"//"+a.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Gt(Ht,p,t,S),d)return S;for(c in(u=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Lt.test(p.type),o=p.url.replace(Mt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Pt,"+")):(h=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(Ot.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Ft,"$1"),h=(Ot.test(o)?"&":"?")+"_="+xt.guid+++h),p.url=o+h),p.ifModified&&(E.lastModified[o]&&S.setRequestHeader("If-Modified-Since",E.lastModified[o]),E.etag[o]&&S.setRequestHeader("If-None-Match",E.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(c,p.headers[c]);if(p.beforeSend&&(!1===p.beforeSend.call(m,S,p)||d))return S.abort();if(w="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),i=Gt(Vt,p,t,S)){if(S.readyState=1,u&&f.trigger("ajaxSend",[S,p]),d)return S;p.async&&p.timeout>0&&(l=n.setTimeout((function(){S.abort("timeout")}),p.timeout));try{d=!1,i.send(b,T)}catch(e){if(d)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,r,a){var c,h,C,b,y,w=t;d||(d=!0,l&&n.clearTimeout(l),i=void 0,s=a||"",S.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(b=function(e,t,i){for(var n,o,s,r,l=e.contents,a=e.dataTypes;"*"===a[0];)a.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(o in l)if(l[o]&&l[o].test(n)){a.unshift(o);break}if(a[0]in i)s=a[0];else{for(o in i){if(!a[0]||e.converters[o+" "+a[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==a[0]&&a.unshift(s),i[s]}(p,S,r)),!c&&E.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),b=function(e,t,i,n){var o,s,r,l,a,d={},u=e.dataTypes.slice();if(u[1])for(r in e.converters)d[r.toLowerCase()]=e.converters[r];for(s=u.shift();s;)if(e.responseFields[s]&&(i[e.responseFields[s]]=t),!a&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=u.shift())if("*"===s)s=a;else if("*"!==a&&a!==s){if(!(r=d[a+" "+s]||d["* "+s]))for(o in d)if((l=o.split(" "))[1]===s&&(r=d[a+" "+l[0]]||d["* "+l[0]])){!0===r?r=d[o]:!0!==d[o]&&(s=l[0],u.unshift(l[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+a+" to "+s}}}return{state:"success",data:t}}(p,b,S,c),c?(p.ifModified&&((y=S.getResponseHeader("Last-Modified"))&&(E.lastModified[o]=y),(y=S.getResponseHeader("etag"))&&(E.etag[o]=y)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=b.state,h=b.data,c=!(C=b.error))):(C=w,!e&&w||(w="error",e<0&&(e=0))),S.status=e,S.statusText=(t||w)+"",c?g.resolveWith(m,[h,w,S]):g.rejectWith(m,[S,w,C]),S.statusCode(_),_=void 0,u&&f.trigger(c?"ajaxSuccess":"ajaxError",[S,p,c?h:C]),v.fireWith(m,[S,w]),u&&(f.trigger("ajaxComplete",[S,p]),--E.active||E.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,i){return E.get(e,t,i,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,i,n,o){return v(i)&&(o=o||n,n=i,i=void 0),E.ajax(E.extend({url:e,type:t,dataType:o,data:i,success:n},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,i){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,i)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(i){E(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var jt={0:200,1223:204},Yt=E.ajaxSettings.xhr();g.cors=!!Yt&&"withCredentials"in Yt,g.ajax=Yt=!!Yt,E.ajaxTransport((function(e){var t,i;if(g.cors||Yt&&!e.crossDomain)return{send:function(o,s){var r,l=e.xhr();if(l.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)l[r]=e.xhrFields[r];for(r in e.mimeType&&l.overrideMimeType&&l.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)l.setRequestHeader(r,o[r]);t=function(e){return function(){t&&(t=i=l.onload=l.onerror=l.onabort=l.ontimeout=l.onreadystatechange=null,"abort"===e?l.abort():"error"===e?"number"!=typeof l.status?s(0,"error"):s(l.status,l.statusText):s(jt[l.status]||l.status,l.statusText,"text"!==(l.responseType||"text")||"string"!=typeof l.responseText?{binary:l.response}:{text:l.responseText},l.getAllResponseHeaders()))}},l.onload=t(),i=l.onerror=l.ontimeout=t("error"),void 0!==l.onabort?l.onabort=i:l.onreadystatechange=function(){4===l.readyState&&n.setTimeout((function(){t&&i()}))},t=t("abort");try{l.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,o){t=E("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&o("error"===e.type?404:200,e.type)}),C.head.appendChild(t[0])},abort:function(){i&&i()}}}));var qt,Xt=[],Kt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+xt.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",(function(e,t,i){var o,s,r,l=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(l||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,l?e[l]=e[l].replace(Kt,"$1"+o):!1!==e.jsonp&&(e.url+=(Ot.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||E.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=n[o],n[o]=function(){r=arguments},i.always((function(){void 0===s?E(n).removeProp(o):n[o]=s,e[o]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(o)),r&&v(s)&&s(r[0]),r=s=void 0})),"script"})),g.createHTMLDocument=((qt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===qt.childNodes.length),E.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(g.createHTMLDocument?((n=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(n)):t=C),s=!i&&[],(o=R.exec(e))?[t.createElement(o[1])]:(o=Se([e],t,s),s&&s.length&&E(s).remove(),E.merge([],o.childNodes)));var n,o,s},E.fn.load=function(e,t,i){var n,o,s,r=this,l=e.indexOf(" ");return l>-1&&(n=Ct(e.slice(l)),e=e.slice(0,l)),v(t)?(i=t,t=void 0):t&&"object"==typeof t&&(o="POST"),r.length>0&&E.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){s=arguments,r.html(n?E("<div>").append(E.parseHTML(e)).find(n):e)})).always(i&&function(e,t){r.each((function(){i.apply(this,s||[e.responseText,t,e])}))}),this},E.expr.pseudos.animated=function(e){return E.grep(E.timers,(function(t){return e===t.elem})).length},E.offset={setOffset:function(e,t,i){var n,o,s,r,l,a,d=E.css(e,"position"),u=E(e),c={};"static"===d&&(e.style.position="relative"),l=u.offset(),s=E.css(e,"top"),a=E.css(e,"left"),("absolute"===d||"fixed"===d)&&(s+a).indexOf("auto")>-1?(r=(n=u.position()).top,o=n.left):(r=parseFloat(s)||0,o=parseFloat(a)||0),v(t)&&(t=t.call(e,i,E.extend({},l))),null!=t.top&&(c.top=t.top-l.top+r),null!=t.left&&(c.left=t.left-l.left+o),"using"in t?t.using.call(e,c):("number"==typeof c.top&&(c.top+="px"),"number"==typeof c.left&&(c.left+="px"),u.css(c))}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){E.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],o={top:0,left:0};if("fixed"===E.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===E.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((o=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),o.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-E.css(n,"marginTop",!0),left:t.left-o.left-E.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||re}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;E.fn[e]=function(n){return U(this,(function(e,n,o){var s;if(_(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===o)return s?s[t]:e[n];s?s.scrollTo(i?s.pageXOffset:o,i?o:s.pageYOffset):e[n]=o}),e,n,arguments.length)}})),E.each(["top","left"],(function(e,t){E.cssHooks[t]=Ye(g.pixelPosition,(function(e,i){if(i)return i=je(e,t),Be.test(i)?E(e).position()[t]+"px":i}))})),E.each({Height:"height",Width:"width"},(function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){E.fn[n]=function(o,s){var r=arguments.length&&(i||"boolean"!=typeof o),l=i||(!0===o||!0===s?"margin":"border");return U(this,(function(t,i,o){var s;return _(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===o?E.css(t,i,l):E.style(t,i,o,l)}),t,r?o:void 0,r)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){E.fn[t]=function(e){return this.on(t,e)}})),E.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){E.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Qt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var i,n,o;if("string"==typeof t&&(i=e[t],t=e,e=i),v(e))return n=l.call(arguments,2),(o=function(){return e.apply(t||this,n.concat(l.call(arguments)))}).guid=e.guid=e.guid||E.guid++,o},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=A,E.isFunction=v,E.isWindow=_,E.camelCase=X,E.type=w,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(Qt,"")},void 0===(i=function(){return E}.apply(t,[]))||(e.exports=i);var Zt=n.jQuery,Jt=n.$;return E.noConflict=function(e){return n.$===E&&(n.$=Jt),e&&n.jQuery===E&&(n.jQuery=Zt),E},void 0===o&&(n.jQuery=n.$=E),E}))},394:function(){},155:function(e,t,i){var n={"./locale":394,"./locale.js":394};function o(e){var t=s(e);return i(t)}function s(e){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}o.keys=function(){return Object.keys(n)},o.resolve=s,e.exports=o,o.id=155},475:function(e,t,i){(e=i.nmd(e)).exports=function(){"use strict";var t,n;function o(){return t.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var i,n=[];for(i=0;i<e.length;++i)n.push(t(e[i],i));return n}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var i in t)c(t,i)&&(e[i]=t[i]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,i,n){return Ct(e,t,i,n,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var t=m(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function g(e){var t=p(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,n=0;n<i;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};var v=o.momentProperties=[];function _(e,t){var i,n,o;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),0<v.length)for(i=0;i<v.length;i++)l(o=t[n=v[i]])||(e[n]=o);return e}var C=!1;function b(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===C&&(C=!0,o.updateOffset(this),C=!1)}function y(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=w(t)),i}function E(e,t,i){var n,o=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0;for(n=0;n<o;n++)(i&&e[n]!==t[n]||!i&&S(e[n])!==S(t[n]))&&r++;return r+s}function T(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var i=!0;return h((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),i){for(var n,s=[],r=0;r<arguments.length;r++){if(n="","object"==typeof arguments[r]){for(var l in n+="\n["+r+"] ",arguments[0])n+=l+": "+arguments[0][l]+", ";n=n.slice(0,-2)}else n=arguments[r];s.push(n)}T(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var O,k={};function D(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),k[e]||(T(t),k[e]=!0)}function A(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function R(e,t){var i,n=h({},e);for(i in t)c(t,i)&&(r(e[i])&&r(t[i])?(n[i]={},h(n[i],e[i]),h(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)c(e,i)&&!c(t,i)&&r(e[i])&&(n[i]=h({},n[i]));return n}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)c(e,t)&&i.push(t);return i};var P={};function M(e,t){var i=e.toLowerCase();P[i]=P[i+"s"]=P[t]=e}function F(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function N(e){var t,i,n={};for(i in e)c(e,i)&&(t=F(i))&&(n[t]=e[i]);return n}var L={};function $(e,t){L[e]=t}function H(e,t,i){var n=""+Math.abs(e),o=t-n.length;return(0<=e?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var V=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function G(e,t,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return H(o.apply(this,arguments),t[1],t[2])}),i&&(W[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=j(t,e.localeData()),B[t]=B[t]||function(e){var t,i,n,o=e.match(V);for(t=0,i=o.length;t<i;t++)W[o[t]]?o[t]=W[o[t]]:o[t]=(n=o[t]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(t){var n,s="";for(n=0;n<i;n++)s+=A(o[n])?o[n].call(t,e):o[n];return s}}(t),B[t](e)):e.localeData().invalidDate()}function j(e,t){var i=5;function n(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;0<=i&&z.test(e);)e=e.replace(z,n),z.lastIndex=0,i-=1;return e}var Y=/\d/,q=/\d\d/,X=/\d{3}/,K=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ie=/\d{1,4}/,ne=/[+-]?\d{1,6}/,oe=/\d+/,se=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[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,de={};function ue(e,t,i){de[e]=A(t)?t:function(e,n){return e&&i?i:t}}function ce(e,t){return c(de,e)?de[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,o){return t||i||n||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function me(e,t){var i,n=t;for("string"==typeof e&&(e=[e]),a(t)&&(n=function(e,i){i[t]=S(e)}),i=0;i<e.length;i++)pe[e[i]]=n}function fe(e,t){me(e,(function(e,i,n,o){n._w=n._w||{},t(e,n._w,n,o)}))}function ge(e){return ve(e)?366:365}function ve(e){return e%4==0&&e%100!=0||e%400==0}G("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),G(0,["YY",2],0,(function(){return this.year()%100})),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),M("year","y"),$("year",1),ue("Y",se),ue("YY",Z,q),ue("YYYY",ie,K),ue("YYYYY",ne,Q),ue("YYYYYY",ne,Q),me(["YYYYY","YYYYYY"],0),me("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):S(e)})),me("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),me("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return S(e)+(68<S(e)?1900:2e3)};var _e,Ce=be("FullYear",!0);function be(e,t){return function(i){return null!=i?(we(this,e,i),o.updateOffset(this,t),this):ye(this,e)}}function ye(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function we(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&ve(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),Se(i,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](i))}function Se(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=(t%12+12)%12;return e+=(t-i)/12,1===i?ve(e)?29:28:31-i%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},G("M",["MM",2],"Mo",(function(){return this.month()+1})),G("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),G("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),M("month","M"),$("month",8),ue("M",Z),ue("MM",Z,q),ue("MMM",(function(e,t){return t.monthsShortRegex(e)})),ue("MMMM",(function(e,t){return t.monthsRegex(e)})),me(["M","MM"],(function(e,t){t[1]=S(e)-1})),me(["MMM","MMMM"],(function(e,t,i,n){var o=i._locale.monthsParse(e,n,i._strict);null!=o?t[1]=o:m(i).invalidMonth=e}));var Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Oe(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!a(t=e.localeData().monthsParse(t)))return e;return i=Math.min(e.date(),Se(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function ke(e){return null!=e?(Oe(this,e),o.updateOffset(this,!0),this):ye(this,"Month")}var De=ae,Ae=ae;function Re(){function e(e,t){return t.length-e.length}var t,i,n=[],o=[],s=[];for(t=0;t<12;t++)i=p([2e3,t]),n.push(this.monthsShort(i,"")),o.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(e),o.sort(e),s.sort(e),t=0;t<12;t++)n[t]=he(n[t]),o[t]=he(o[t]);for(t=0;t<24;t++)s[t]=he(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ie(e){var t;if(e<100&&0<=e){var i=Array.prototype.slice.call(arguments);i[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Pe(e,t,i){var n=7+t-i;return-(7+Ie(e,0,n).getUTCDay()-t)%7+n-1}function Me(e,t,i,n,o){var s,r,l=1+7*(t-1)+(7+i-n)%7+Pe(e,n,o);return r=l<=0?ge(s=e-1)+l:l>ge(e)?(s=e+1,l-ge(e)):(s=e,l),{year:s,dayOfYear:r}}function Fe(e,t,i){var n,o,s=Pe(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?n=r+Ne(o=e.year()-1,t,i):r>Ne(e.year(),t,i)?(n=r-Ne(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function Ne(e,t,i){var n=Pe(e,t,i),o=Pe(e+1,t,i);return(ge(e)-n+o)/7}function Le(e,t){return e.slice(t,7).concat(e.slice(0,t))}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),$("week",5),$("isoWeek",5),ue("w",Z),ue("ww",Z,q),ue("W",Z),ue("WW",Z,q),fe(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=S(e)})),G("d",0,"do","day"),G("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),G("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),G("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),$("day",11),$("weekday",11),$("isoWeekday",11),ue("d",Z),ue("e",Z),ue("E",Z),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:m(i).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,i,n){t[n]=S(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),He="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ze=ae,Be=ae,We=ae;function Ge(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],l=[],a=[],d=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),l.push(o),a.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),l.sort(e),a.sort(e),d.sort(e),t=0;t<7;t++)l[t]=he(l[t]),a[t]=he(a[t]),d[t]=he(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ue(){return this.hours()%12||12}function je(e,t){G(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ye(e,t){return t._meridiemParse}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Ue),G("k",["kk",2],0,(function(){return this.hours()||24})),G("hmm",0,0,(function(){return""+Ue.apply(this)+H(this.minutes(),2)})),G("hmmss",0,0,(function(){return""+Ue.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)})),G("Hmm",0,0,(function(){return""+this.hours()+H(this.minutes(),2)})),G("Hmmss",0,0,(function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)})),je("a",!0),je("A",!1),M("hour","h"),$("hour",13),ue("a",Ye),ue("A",Ye),ue("H",Z),ue("h",Z),ue("k",Z),ue("HH",Z,q),ue("hh",Z,q),ue("kk",Z,q),ue("hmm",J),ue("hmmss",ee),ue("Hmm",J),ue("Hmmss",ee),me(["H","HH"],3),me(["k","kk"],(function(e,t,i){var n=S(e);t[3]=24===n?0:n})),me(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),me(["h","hh"],(function(e,t,i){t[3]=S(e),m(i).bigHour=!0})),me("hmm",(function(e,t,i){var n=e.length-2;t[3]=S(e.substr(0,n)),t[4]=S(e.substr(n)),m(i).bigHour=!0})),me("hmmss",(function(e,t,i){var n=e.length-4,o=e.length-2;t[3]=S(e.substr(0,n)),t[4]=S(e.substr(n,2)),t[5]=S(e.substr(o)),m(i).bigHour=!0})),me("Hmm",(function(e,t,i){var n=e.length-2;t[3]=S(e.substr(0,n)),t[4]=S(e.substr(n))})),me("Hmmss",(function(e,t,i){var n=e.length-4,o=e.length-2;t[3]=S(e.substr(0,n)),t[4]=S(e.substr(n,2)),t[5]=S(e.substr(o))}));var qe,Xe=be("Hours",!0),Ke={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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:xe,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Ve,weekdaysShort:He,meridiemParse:/[ap]\.?m?\.?/i},Qe={},Ze={};function Je(e){return e?e.toLowerCase().replace("_","-"):e}function et(t){var n=null;if(!Qe[t]&&e&&e.exports)try{n=qe._abbr,i(155)("./"+t),tt(n)}catch(t){}return Qe[t]}function tt(e,t){var i;return e&&((i=l(t)?nt(e):it(e,t))?qe=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),qe._abbr}function it(e,t){if(null===t)return delete Qe[e],null;var i,n=Ke;if(t.abbr=e,null!=Qe[e])D("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."),n=Qe[e]._config;else if(null!=t.parentLocale)if(null!=Qe[t.parentLocale])n=Qe[t.parentLocale]._config;else{if(null==(i=et(t.parentLocale)))return Ze[t.parentLocale]||(Ze[t.parentLocale]=[]),Ze[t.parentLocale].push({name:e,config:t}),null;n=i._config}return Qe[e]=new I(R(n,t)),Ze[e]&&Ze[e].forEach((function(e){it(e.name,e.config)})),tt(e),Qe[e]}function nt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return qe;if(!s(e)){if(t=et(e))return t;e=[e]}return function(e){for(var t,i,n,o,s=0;s<e.length;){for(t=(o=Je(e[s]).split("-")).length,i=(i=Je(e[s+1]))?i.split("-"):null;0<t;){if(n=et(o.slice(0,t).join("-")))return n;if(i&&i.length>=t&&E(o,i,!0)>=t-1)break;t--}s++}return qe}(e)}function ot(e){var t,i=e._a;return i&&-2===m(e).overflow&&(t=i[1]<0||11<i[1]?1:i[2]<1||i[2]>Se(i[0],i[1])?2:i[3]<0||24<i[3]||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||59<i[4]?4:i[5]<0||59<i[5]?5:i[6]<0||999<i[6]?6:-1,m(e)._overflowDayOfYear&&(t<0||2<t)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}function st(e,t,i){return null!=e?e:null!=t?t:i}function rt(e){var t,i,n,s,r,l=[];if(!e._d){var a,d;for(a=e,d=new Date(o.now()),n=a._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()],e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,i,n,o,s,r,l,a;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)s=1,r=4,i=st(t.GG,e._a[0],Fe(bt(),1,4).year),n=st(t.W,1),((o=st(t.E,1))<1||7<o)&&(a=!0);else{s=e._locale._week.dow,r=e._locale._week.doy;var d=Fe(bt(),s,r);i=st(t.gg,e._a[0],d.year),n=st(t.w,d.week),null!=t.d?((o=t.d)<0||6<o)&&(a=!0):null!=t.e?(o=t.e+s,(t.e<0||6<t.e)&&(a=!0)):o=s}n<1||n>Ne(i,s,r)?m(e)._overflowWeeks=!0:null!=a?m(e)._overflowWeekday=!0:(l=Me(i,n,o,s,r),e._a[0]=l.year,e._dayOfYear=l.dayOfYear)}(e),null!=e._dayOfYear&&(r=st(e._a[0],n[0]),(e._dayOfYear>ge(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),i=Ie(r,0,e._dayOfYear),e._a[1]=i.getUTCMonth(),e._a[2]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=l[t]=n[t];for(;t<7;t++)e._a[t]=l[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ie:function(e,t,i,n,o,s,r){var l;return e<100&&0<=e?(l=new Date(e+400,t,i,n,o,s,r),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,i,n,o,s,r),l}).apply(null,l),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}var lt=/^\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)?)?$/,at=/^\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)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,ut=[["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}/]],ct=[["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/]],ht=/^\/?Date\((\-?\d+)/i;function pt(e){var t,i,n,o,s,r,l=e._i,a=lt.exec(l)||at.exec(l);if(a){for(m(e).iso=!0,t=0,i=ut.length;t<i;t++)if(ut[t][1].exec(a[1])){o=ut[t][0],n=!1!==ut[t][2];break}if(null==o)return void(e._isValid=!1);if(a[3]){for(t=0,i=ct.length;t<i;t++)if(ct[t][1].exec(a[3])){s=(a[2]||" ")+ct[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(a[4]){if(!dt.exec(a[4]))return void(e._isValid=!1);r="Z"}e._f=o+(s||"")+(r||""),vt(e)}else e._isValid=!1}var mt=/^(?:(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}))$/;var ft={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function gt(e){var t,i,n,o=mt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(o){var s=function(e,t,i,n,o,s){var r=[function(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}(e),xe.indexOf(t),parseInt(i,10),parseInt(n,10),parseInt(o,10)];return s&&r.push(parseInt(s,10)),r}(o[4],o[3],o[2],o[5],o[6],o[7]);if(i=s,n=e,(t=o[1])&&He.indexOf(t)!==new Date(i[0],i[1],i[2]).getDay()&&(m(n).weekdayMismatch=!0,!(n._isValid=!1)))return;e._a=s,e._tzm=function(e,t,i){if(e)return ft[e];if(t)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}(o[8],o[9],o[10]),e._d=Ie.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function vt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,i,n,s,r,l,a,d,u=""+e._i,h=u.length,p=0;for(n=j(e._f,e._locale).match(V)||[],t=0;t<n.length;t++)s=n[t],(i=(u.match(ce(s,e))||[])[0])&&(0<(r=u.substr(0,u.indexOf(i))).length&&m(e).unusedInput.push(r),u=u.slice(u.indexOf(i)+i.length),p+=i.length),W[s]?(i?m(e).empty=!1:m(e).unusedTokens.push(s),l=s,d=e,null!=(a=i)&&c(pe,l)&&pe[l](a,d._a,d,l)):e._strict&&!i&&m(e).unusedTokens.push(s);m(e).charsLeftOver=h-p,0<u.length&&m(e).unusedInput.push(u),e._a[3]<=12&&!0===m(e).bigHour&&0<e._a[3]&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,i){var n;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):(null!=e.isPM&&((n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0)),t)}(e._locale,e._a[3],e._meridiem),rt(e),ot(e)}else gt(e);else pt(e)}function _t(e){var t,i,n,c,p=e._i,v=e._f;return e._locale=e._locale||nt(e._l),null===p||void 0===v&&""===p?g({nullInput:!0}):("string"==typeof p&&(e._i=p=e._locale.preparse(p)),y(p)?new b(ot(p)):(d(p)?e._d=p:s(v)?function(e){var t,i,n,o,s;if(0===e._f.length)return m(e).invalidFormat=!0,e._d=new Date(NaN);for(o=0;o<e._f.length;o++)s=0,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],vt(t),f(t)&&(s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,(null==n||s<n)&&(n=s,i=t));h(e,i||t)}(e):v?vt(e):l(i=(t=e)._i)?t._d=new Date(o.now()):d(i)?t._d=new Date(i.valueOf()):"string"==typeof i?(n=t,null===(c=ht.exec(n._i))?(pt(n),!1===n._isValid&&(delete n._isValid,gt(n),!1===n._isValid&&(delete n._isValid,o.createFromInputFallback(n)))):n._d=new Date(+c[1])):s(i)?(t._a=u(i.slice(0),(function(e){return parseInt(e,10)})),rt(t)):r(i)?function(e){if(!e._d){var t=N(e._i);e._a=u([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),rt(e)}}(t):a(i)?t._d=new Date(i):o.createFromInputFallback(t),f(e)||(e._d=null),e))}function Ct(e,t,i,n,o){var l,a={};return!0!==i&&!1!==i||(n=i,i=void 0),(r(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||s(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=i,a._i=e,a._f=t,a._strict=n,(l=new b(ot(_t(a))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function bt(e,t,i,n){return Ct(e,t,i,n,!1)}o.createFromInputFallback=x("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 and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var yt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),wt=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:g()}));function St(e,t){var i,n;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return bt();for(i=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](i)||(i=t[n]);return i}var Et=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tt(e){var t=N(e),i=t.year||0,n=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,r=t.day||0,l=t.hour||0,a=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===_e.call(Et,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var i=!1,n=0;n<Et.length;++n)if(e[Et[n]]){if(i)return!1;parseFloat(e[Et[n]])!==S(e[Et[n]])&&(i=!0)}return!0}(t),this._milliseconds=+u+1e3*d+6e4*a+1e3*l*60*60,this._days=+r+7*s,this._months=+o+3*n+12*i,this._data={},this._locale=nt(),this._bubble()}function xt(e){return e instanceof Tt}function Ot(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function kt(e,t){G(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+H(~~(e/60),2)+t+H(~~e%60,2)}))}kt("Z",":"),kt("ZZ",""),ue("Z",le),ue("ZZ",le),me(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=At(le,e)}));var Dt=/([\+\-]|\d\d)/gi;function At(e,t){var i=(t||"").match(e);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Dt)||["-",0,0],o=60*n[1]+S(n[2]);return 0===o?0:"+"===n[0]?o:-o}function Rt(e,t){var i,n;return t._isUTC?(i=t.clone(),n=(y(e)||d(e)?e.valueOf():bt(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),o.updateOffset(i,!1),i):bt(e).local()}function It(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Pt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Mt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ft=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nt(e,t){var i,n,o,s=e,r=null;return xt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:a(e)?(s={},t?s[t]=e:s.milliseconds=e):(r=Mt.exec(e))?(i="-"===r[1]?-1:1,s={y:0,d:S(r[2])*i,h:S(r[3])*i,m:S(r[4])*i,s:S(r[5])*i,ms:S(Ot(1e3*r[6]))*i}):(r=Ft.exec(e))?(i="-"===r[1]?-1:1,s={y:Lt(r[2],i),M:Lt(r[3],i),w:Lt(r[4],i),d:Lt(r[5],i),h:Lt(r[6],i),m:Lt(r[7],i),s:Lt(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=function(e,t){var i;return e.isValid()&&t.isValid()?(t=Rt(t,e),e.isBefore(t)?i=$t(e,t):((i=$t(t,e)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}(bt(s.from),bt(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new Tt(s),xt(e)&&c(e,"_locale")&&(n._locale=e._locale),n}function Lt(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function $t(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Ht(e,t){return function(i,n){var o;return null===n||isNaN(+n)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),Vt(this,Nt(i="string"==typeof i?+i:i,n),e),this}}function Vt(e,t,i,n){var s=t._milliseconds,r=Ot(t._days),l=Ot(t._months);e.isValid()&&(n=null==n||n,l&&Oe(e,ye(e,"Month")+l*i),r&&we(e,"Date",ye(e,"Date")+r*i),s&&e._d.setTime(e._d.valueOf()+s*i),n&&o.updateOffset(e,r||l))}Nt.fn=Tt.prototype,Nt.invalid=function(){return Nt(NaN)};var zt=Ht(1,"add"),Bt=Ht(-1,"subtract");function Wt(e,t){var i=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(i,"months");return-(i+(t-n<0?(t-n)/(n-e.clone().add(i-1,"months")):(t-n)/(e.clone().add(i+1,"months")-n)))||0}function Gt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=nt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ut=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function jt(){return this._locale}var Yt=126227808e5;function qt(e,t){return(e%t+t)%t}function Xt(e,t,i){return e<100&&0<=e?new Date(e+400,t,i)-Yt:new Date(e,t,i).valueOf()}function Kt(e,t,i){return e<100&&0<=e?Date.UTC(e+400,t,i)-Yt:Date.UTC(e,t,i)}function Qt(e,t){G(0,[e,e.length],0,t)}function Zt(e,t,i,n,o){var s;return null==e?Fe(this,n,o).year:((s=Ne(e,n,o))<t&&(t=s),function(e,t,i,n,o){var s=Me(e,t,i,n,o),r=Ie(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}.call(this,e,t,i,n,o))}G(0,["gg",2],0,(function(){return this.weekYear()%100})),G(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qt("gggg","weekYear"),Qt("ggggg","weekYear"),Qt("GGGG","isoWeekYear"),Qt("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),$("weekYear",1),$("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",Z,q),ue("gg",Z,q),ue("GGGG",ie,K),ue("gggg",ie,K),ue("GGGGG",ne,Q),ue("ggggg",ne,Q),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=S(e)})),fe(["gg","GG"],(function(e,t,i,n){t[n]=o.parseTwoDigitYear(e)})),G("Q",0,"Qo","quarter"),M("quarter","Q"),$("quarter",7),ue("Q",Y),me("Q",(function(e,t){t[1]=3*(S(e)-1)})),G("D",["DD",2],"Do","date"),M("date","D"),$("date",9),ue("D",Z),ue("DD",Z,q),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),me(["D","DD"],2),me("Do",(function(e,t){t[2]=S(e.match(Z)[0])}));var Jt=be("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),$("dayOfYear",4),ue("DDD",te),ue("DDDD",X),me(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=S(e)})),G("m",["mm",2],0,"minute"),M("minute","m"),$("minute",14),ue("m",Z),ue("mm",Z,q),me(["m","mm"],4);var ei=be("Minutes",!1);G("s",["ss",2],0,"second"),M("second","s"),$("second",15),ue("s",Z),ue("ss",Z,q),me(["s","ss"],5);var ti,ii=be("Seconds",!1);for(G("S",0,0,(function(){return~~(this.millisecond()/100)})),G(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),G(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),G(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),G(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),G(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),G(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),M("millisecond","ms"),$("millisecond",16),ue("S",te,Y),ue("SS",te,q),ue("SSS",te,X),ti="SSSS";ti.length<=9;ti+="S")ue(ti,oe);function ni(e,t){t[6]=S(1e3*("0."+e))}for(ti="S";ti.length<=9;ti+="S")me(ti,ni);var oi=be("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var si=b.prototype;function ri(e){return e}si.add=zt,si.calendar=function(e,t){var i=e||bt(),n=Rt(i,this).startOf("day"),s=o.calendarFormat(this,n)||"sameElse",r=t&&(A(t[s])?t[s].call(this,i):t[s]);return this.format(r||this.localeData().calendar(s,this,bt(i)))},si.clone=function(){return new b(this)},si.diff=function(e,t,i){var n,o,s;if(!this.isValid())return NaN;if(!(n=Rt(e,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),t=F(t)){case"year":s=Wt(this,n)/12;break;case"month":s=Wt(this,n);break;case"quarter":s=Wt(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return i?s:w(s)},si.endOf=function(e){var t;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?Kt:Xt;switch(e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-qt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-qt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},si.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},si.from=function(e,t){return this.isValid()&&(y(e)&&e.isValid()||bt(e).isValid())?Nt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},si.fromNow=function(e){return this.from(bt(),e)},si.to=function(e,t){return this.isValid()&&(y(e)&&e.isValid()||bt(e).isValid())?Nt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},si.toNow=function(e){return this.to(bt(),e)},si.get=function(e){return A(this[e=F(e)])?this[e]():this},si.invalidAt=function(){return m(this).overflow},si.isAfter=function(e,t){var i=y(e)?e:bt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())},si.isBefore=function(e,t){var i=y(e)?e:bt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())},si.isBetween=function(e,t,i,n){var o=y(e)?e:bt(e),s=y(t)?t:bt(t);return!!(this.isValid()&&o.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,i):!this.isBefore(o,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i))},si.isSame=function(e,t){var i,n=y(e)?e:bt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))},si.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},si.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},si.isValid=function(){return f(this)},si.lang=Ut,si.locale=Gt,si.localeData=jt,si.max=wt,si.min=yt,si.parsingFlags=function(){return h({},m(this))},si.set=function(e,t){if("object"==typeof e)for(var i=function(e){var t=[];for(var i in e)t.push({unit:i,priority:L[i]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=N(e)),n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit]);else if(A(this[e=F(e)]))return this[e](t);return this},si.startOf=function(e){var t;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?Kt:Xt;switch(e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=qt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=qt(t,6e4);break;case"second":t=this._d.valueOf(),t-=qt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},si.subtract=Bt,si.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},si.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},si.toDate=function(){return new Date(this.valueOf())},si.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||9999<i.year()?U(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(i,"Z")):U(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},si.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var i="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+o)},si.toJSON=function(){return this.isValid()?this.toISOString():null},si.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},si.unix=function(){return Math.floor(this.valueOf()/1e3)},si.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},si.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},si.year=Ce,si.isLeapYear=function(){return ve(this.year())},si.weekYear=function(e){return Zt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},si.isoWeekYear=function(e){return Zt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},si.quarter=si.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},si.month=ke,si.daysInMonth=function(){return Se(this.year(),this.month())},si.week=si.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},si.isoWeek=si.isoWeeks=function(e){var t=Fe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},si.weeksInYear=function(){var e=this.localeData()._week;return Ne(this.year(),e.dow,e.doy)},si.isoWeeksInYear=function(){return Ne(this.year(),1,4)},si.date=Jt,si.day=si.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,i=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=i.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-n,"d")):n},si.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},si.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,i,n=(t=e,i=this.localeData(),"string"==typeof t?i.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?n:n-7)},si.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},si.hour=si.hours=Xe,si.minute=si.minutes=ei,si.second=si.seconds=ii,si.millisecond=si.milliseconds=oi,si.utcOffset=function(e,t,i){var n,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?s:It(this);if("string"==typeof e){if(null===(e=At(le,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(n=It(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),s!==e&&(!t||this._changeInProgress?Vt(this,Nt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this},si.utc=function(e){return this.utcOffset(0,e)},si.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(It(this),"m")),this},si.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=At(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},si.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},si.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},si.isLocal=function(){return!!this.isValid()&&!this._isUTC},si.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},si.isUtc=Pt,si.isUTC=Pt,si.zoneAbbr=function(){return this._isUTC?"UTC":""},si.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},si.dates=x("dates accessor is deprecated. Use date instead.",Jt),si.months=x("months accessor is deprecated. Use month instead",ke),si.years=x("years accessor is deprecated. Use year instead",Ce),si.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),si.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(_(e,this),(e=_t(e))._a){var t=e._isUTC?p(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0<E(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var li=I.prototype;function ai(e,t,i,n){var o=nt(),s=p().set(n,t);return o[i](s,e)}function di(e,t,i){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return ai(e,t,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=ai(e,n,i,"month");return o}function ui(e,t,i,n){"boolean"==typeof e?a(t)&&(i=t,t=void 0):(t=e,e=!1,a(i=t)&&(i=t,t=void 0)),t=t||"";var o,s=nt(),r=e?s._week.dow:0;if(null!=i)return ai(t,(i+r)%7,n,"day");var l=[];for(o=0;o<7;o++)l[o]=ai(t,(o+r)%7,n,"day");return l}li.calendar=function(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,i):n},li.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},li.invalidDate=function(){return this._invalidDate},li.ordinal=function(e){return this._ordinal.replace("%d",e)},li.preparse=ri,li.postformat=ri,li.relativeTime=function(e,t,i,n){var o=this._relativeTime[i];return A(o)?o(e,t,i,n):o.replace(/%d/i,e)},li.pastFuture=function(e,t){var i=this._relativeTime[0<e?"future":"past"];return A(i)?i(t):i.replace(/%s/i,t)},li.set=function(e){var t,i;for(i in e)A(t=e[i])?this[i]=t:this["_"+i]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},li.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},li.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},li.monthsParse=function(e,t,i){var n,o,s;if(this._monthsParseExact)return function(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,r))?o:null:-1!==(o=_e.call(this._longMonthsParse,r))?o:null:"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,r))||-1!==(o=_e.call(this._longMonthsParse,r))?o:null:-1!==(o=_e.call(this._longMonthsParse,r))||-1!==(o=_e.call(this._shortMonthsParse,r))?o:null}.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},li.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ae),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},li.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=De),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},li.week=function(e){return Fe(e,this._week.dow,this._week.doy).week},li.firstDayOfYear=function(){return this._week.doy},li.firstDayOfWeek=function(){return this._week.dow},li.weekdays=function(e,t){var i=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Le(i,this._week.dow):e?i[e.day()]:i},li.weekdaysMin=function(e){return!0===e?Le(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},li.weekdaysShort=function(e){return!0===e?Le(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},li.weekdaysParse=function(e,t,i){var n,o,s;if(this._weekdaysParseExact)return function(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,r))||-1!==(o=_e.call(this._shortWeekdaysParse,r))||-1!==(o=_e.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,r))||-1!==(o=_e.call(this._weekdaysParse,r))||-1!==(o=_e.call(this._minWeekdaysParse,r))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,r))||-1!==(o=_e.call(this._weekdaysParse,r))||-1!==(o=_e.call(this._shortWeekdaysParse,r))?o:null}.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}},li.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},li.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},li.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=We),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},li.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},li.meridiem=function(e,t,i){return 11<e?i?"pm":"PM":i?"am":"AM"},tt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=x("moment.lang is deprecated. Use moment.locale instead.",tt),o.langData=x("moment.langData is deprecated. Use moment.localeData instead.",nt);var ci=Math.abs;function hi(e,t,i,n){var o=Nt(t,i);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function pi(e){return e<0?Math.floor(e):Math.ceil(e)}function mi(e){return 4800*e/146097}function fi(e){return 146097*e/4800}function gi(e){return function(){return this.as(e)}}var vi=gi("ms"),_i=gi("s"),Ci=gi("m"),bi=gi("h"),yi=gi("d"),wi=gi("w"),Si=gi("M"),Ei=gi("Q"),Ti=gi("y");function xi(e){return function(){return this.isValid()?this._data[e]:NaN}}var Oi=xi("milliseconds"),ki=xi("seconds"),Di=xi("minutes"),Ai=xi("hours"),Ri=xi("days"),Ii=xi("months"),Pi=xi("years"),Mi=Math.round,Fi={ss:44,s:45,m:45,h:22,d:26,M:11},Ni=Math.abs;function Li(e){return(0<e)-(e<0)||+e}function $i(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i=Ni(this._milliseconds)/1e3,n=Ni(this._days),o=Ni(this._months);t=w((e=w(i/60))/60),i%=60,e%=60;var s=w(o/12),r=o%=12,l=n,a=t,d=e,u=i?i.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var h=c<0?"-":"",p=Li(this._months)!==Li(c)?"-":"",m=Li(this._days)!==Li(c)?"-":"",f=Li(this._milliseconds)!==Li(c)?"-":"";return h+"P"+(s?p+s+"Y":"")+(r?p+r+"M":"")+(l?m+l+"D":"")+(a||d||u?"T":"")+(a?f+a+"H":"")+(d?f+d+"M":"")+(u?f+u+"S":"")}var Hi=Tt.prototype;return Hi.isValid=function(){return this._isValid},Hi.abs=function(){var e=this._data;return this._milliseconds=ci(this._milliseconds),this._days=ci(this._days),this._months=ci(this._months),e.milliseconds=ci(e.milliseconds),e.seconds=ci(e.seconds),e.minutes=ci(e.minutes),e.hours=ci(e.hours),e.months=ci(e.months),e.years=ci(e.years),this},Hi.add=function(e,t){return hi(this,e,t,1)},Hi.subtract=function(e,t){return hi(this,e,t,-1)},Hi.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+mi(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(fi(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Hi.asMilliseconds=vi,Hi.asSeconds=_i,Hi.asMinutes=Ci,Hi.asHours=bi,Hi.asDays=yi,Hi.asWeeks=wi,Hi.asMonths=Si,Hi.asQuarters=Ei,Hi.asYears=Ti,Hi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Hi._bubble=function(){var e,t,i,n,o,s=this._milliseconds,r=this._days,l=this._months,a=this._data;return 0<=s&&0<=r&&0<=l||s<=0&&r<=0&&l<=0||(s+=864e5*pi(fi(l)+r),l=r=0),a.milliseconds=s%1e3,e=w(s/1e3),a.seconds=e%60,t=w(e/60),a.minutes=t%60,i=w(t/60),a.hours=i%24,l+=o=w(mi(r+=w(i/24))),r-=pi(fi(o)),n=w(l/12),l%=12,a.days=r,a.months=l,a.years=n,this},Hi.clone=function(){return Nt(this)},Hi.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():NaN},Hi.milliseconds=Oi,Hi.seconds=ki,Hi.minutes=Di,Hi.hours=Ai,Hi.days=Ri,Hi.weeks=function(){return w(this.days()/7)},Hi.months=Ii,Hi.years=Pi,Hi.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,i,n,o,s,r,l,a,d,u,c=this.localeData(),h=(t=!e,i=c,n=Nt(this).abs(),o=Mi(n.as("s")),s=Mi(n.as("m")),r=Mi(n.as("h")),l=Mi(n.as("d")),a=Mi(n.as("M")),d=Mi(n.as("y")),(u=o<=Fi.ss&&["s",o]||o<Fi.s&&["ss",o]||s<=1&&["m"]||s<Fi.m&&["mm",s]||r<=1&&["h"]||r<Fi.h&&["hh",r]||l<=1&&["d"]||l<Fi.d&&["dd",l]||a<=1&&["M"]||a<Fi.M&&["MM",a]||d<=1&&["y"]||["yy",d])[2]=t,u[3]=0<+this,u[4]=i,function(e,t,i,n,o){return o.relativeTime(t||1,!!i,e,n)}.apply(null,u));return e&&(h=c.pastFuture(+this,h)),c.postformat(h)},Hi.toISOString=$i,Hi.toString=$i,Hi.toJSON=$i,Hi.locale=Gt,Hi.localeData=jt,Hi.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$i),Hi.lang=Ut,G("X",0,0,"unix"),G("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),me("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))})),me("x",(function(e,t,i){i._d=new Date(S(e))})),o.version="2.24.0",t=bt,o.fn=si,o.min=function(){return St("isBefore",[].slice.call(arguments,0))},o.max=function(){return St("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(e){return bt(1e3*e)},o.months=function(e,t){return di(e,t,"months")},o.isDate=d,o.locale=tt,o.invalid=g,o.duration=Nt,o.isMoment=y,o.weekdays=function(e,t,i){return ui(e,t,i,"weekdays")},o.parseZone=function(){return bt.apply(null,arguments).parseZone()},o.localeData=nt,o.isDuration=xt,o.monthsShort=function(e,t){return di(e,t,"monthsShort")},o.weekdaysMin=function(e,t,i){return ui(e,t,i,"weekdaysMin")},o.defineLocale=it,o.updateLocale=function(e,t){if(null!=t){var i,n,o=Ke;null!=(n=et(e))&&(o=n._config),(i=new I(t=R(o,t))).parentLocale=Qe[e],Qe[e]=i,tt(e)}else null!=Qe[e]&&(null!=Qe[e].parentLocale?Qe[e]=Qe[e].parentLocale:null!=Qe[e]&&delete Qe[e]);return Qe[e]},o.locales=function(){return O(Qe)},o.weekdaysShort=function(e,t,i){return ui(e,t,i,"weekdaysShort")},o.normalizeUnits=F,o.relativeTimeRounding=function(e){return void 0===e?Mi:"function"==typeof e&&(Mi=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Fi[e]&&(void 0===t?Fi[e]:(Fi[e]=t,"s"===e&&(Fi.ss=t-1),!0))},o.calendarFormat=function(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},o.prototype=si,o.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"},o}()},89:function(){!function(e){"use strict";var t=function(e){var t=arguments,i=!0,n=1;return e=e.replace(/%s/g,(function(){var e=t[n++];return void 0===e?(i=!1,""):e})),i?e:""},i=function(e){for(var t=[{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}],i=0;i<t.length;i++)e=e.replace(t[i].letters,t[i].base);return e};function n(i,n){var s=i.attr("name")||n.name||"";this.options=n,this.$el=i.hide(),this.$label=this.$el.closest("label"),0===this.$label.length&&this.$el.attr("id")&&(this.$label=e(t('label[for="%s"]',this.$el.attr("id").replace(/:/g,"\\:")))),this.$parent=e(t('<div class="ms-parent %s" %s/>',i.attr("class")||"",t('title="%s"',i.attr("title")))),this.$choice=e(t(['<button type="button" class="ms-choice">','<span class="placeholder">%s</span>',"<div></div>","</button>"].join(""),this.options.placeholder)),this.$drop=e(t('<div name="%s" class="ms-drop %s"%s></div>',i.attr("name")||n.name||"",this.options.position,t(' style="width: %s"',this.options.dropWidth))),this.$el.after(this.$parent),this.$parent.append(this.$choice),this.$parent.append(this.$drop),this.$el.prop("disabled")&&this.$choice.addClass("disabled"),this.$parent.css("width",this.options.width||this.$el.css("width")||this.$el.outerWidth()+20),this.selectAllName='data-name="selectAll'+s+'"',this.selectGroupName='data-name="selectGroup'+s+'"',this.selectItemName='data-name="selectItem'+s+'"',this.options.keepOpen||e("body").on("click",o.bind(this,i)),this.options.onAfterCreate()}function o(t,i){var n=e(i.target),o=n&&n[0],s=this.$choice&&this.$choice[0],r=this.$drop&&this.$drop[0],l=n.parents(".ms-choice"),a=l&&l[0],d=n.parents(".ms-drop"),u=d&&d[0],c=t&&t[0];o!==s&&a!==s&&(o===r||u!==r&&i.target!==c)&&this.options&&this.options.isOpen&&this.close()}n.prototype={constructor:n,init:function(){var i=this,n=e("<ul></ul>");this.$drop.html(""),this.options.filter&&this.$drop.append(['<div class="ms-search">','<input type="text" autocomplete="off" autocorrect="off" autocapitilize="off" spellcheck="false">',"</div>"].join("")),this.options.selectAll&&!this.options.single&&this.$drop.append(['<div class="ms-select-all" style="width: 100%">','<label style="width: 100%">',t('<input type="checkbox" %s />',this.selectAllName),t("<span>%s%s%s</span>",this.options.selectAllDelimiter[0],this.options.selectAllText,this.options.selectAllDelimiter[1]),"</label>","</div>"].join("")),e.each(this.$el.children(),(function(e,t){n.append(i.optionToHtml(e,t))})),n.append(t('<li class="ms-no-results">%s</li>',this.options.noMatchesFound)),this.$drop.append(n),this.options.okButton&&(this.$okButton=e('<button type="button" class="ms-ok-button">'+this.options.okButtonText+"</button>"),this.$drop.append(this.$okButton));var o=isNaN(this.options.width)?this.options.width:this.options.width+"px";this.$drop.css("width",o),this.$drop.find("ul").css("max-height",this.options.maxHeight+"px"),this.$drop.find(".multiple").css("width",this.options.multipleWidth+"px"),this.$searchInput=this.$drop.find(".ms-search input"),this.$selectAll=this.$drop.find("input["+this.selectAllName+"]"),this.$selectGroups=this.$drop.find("input["+this.selectGroupName+"]"),this.$selectItems=this.$drop.find("input["+this.selectItemName+"]:enabled"),this.$disableItems=this.$drop.find("input["+this.selectItemName+"]:disabled"),this.$noResults=this.$drop.find(".ms-no-results"),this.events(),this.updateSelectAll(!0),this.update(!0),this.options.isOpen&&this.open(),this.options.openOnHover&&e(".ms-parent").hover((function(e){i.open()}))},optionToHtml:function(i,n,o,s){var r,l=this,a=e(n),d=a.attr("class")||"",u=t('label="%s"',a.attr("label")||""),c=t('title="%s"',a.attr("title")),h=this.options.multiple?"multiple":"",p=this.options.single?"radio":"checkbox";if(a.is("option")){var m,f=a.val(),g=l.options.textTemplate(a),v=a.prop("selected"),_=t('style="%s"',this.options.styler(f));return r=s||a.prop("disabled"),(m=e([t('<li class="%s %s" %s %s %s>',h,d,c,_,u),t('<label class="%s">',r?"disabled":""),t('<input type="%s" %s%s%s%s>',p,this.selectItemName,v?' checked="checked"':"",r?' disabled="disabled"':"",t(' data-group="%s"',o)),t("<span>%s</span>",g),"</label>","</li>"].join(""))).find("input").val(f),m}if(a.is("optgroup")){u=l.options.labelTemplate(a);var C=e("<div/>");return o="group_"+i,r=a.prop("disabled"),C.append(['<li class="group">',t('<label class="optgroup %s" data-group="%s">',r?"disabled":"",o),this.options.hideOptgroupCheckboxes||this.options.single?"":t('<input type="checkbox" %s %s>',this.selectGroupName,r?'disabled="disabled"':""),u,"</label>","</li>"].join("")),e.each(a.children(),(function(e,t){C.append(l.optionToHtml(e,t,o,r))})),C.html()}},events:function(){var i=this,n=function(e){e.preventDefault(),i[i.options.isOpen?"close":"open"]()};this.$label&&this.$label.off("click").on("click",(function(e){"label"===e.target.nodeName.toLowerCase()&&e.target===this&&(n(e),i.options.filter&&i.options.isOpen||i.focus(),e.stopPropagation())})),this.options.okButton&&this.$okButton.off("click").on("click",(function(e){n(e),e.stopPropagation()})),this.$choice.off("click").on("click",n).off("focus").on("focus",this.options.onFocus).off("blur").on("blur",this.options.onBlur),this.$parent.off("keydown").on("keydown",(function(e){switch(e.which){case 27:i.close(),i.$choice.focus()}})),this.$searchInput.off("keydown").on("keydown",(function(e){9===e.keyCode&&e.shiftKey&&i.close()})).off("keyup").on("keyup",(function(e){if(i.options.filterAcceptOnEnter&&(13===e.which||32===e.which)&&i.$searchInput.val())return i.$selectAll.click(),i.close(),void i.focus();i.filter()})),this.$selectAll.off("click").on("click",(function(){var t=e(this).prop("checked"),n=i.$selectItems.filter(":visible");n.length===i.$selectItems.length?i[t?"checkAll":"uncheckAll"]():(i.$selectGroups&&i.$selectGroups.prop("checked",t),n&&n.prop("checked",t),i.options[t?"onCheckAll":"onUncheckAll"](),i.update())})),this.$selectGroups.off("click").on("click",(function(){var n=e(this).parent().attr("data-group"),o=i.$selectItems.filter(":visible").filter(t('[data-group="%s"]',n)),s=o.length!==o.filter(":checked").length;o&&o.prop("checked",s),i.updateSelectAll(),i.update(),i.options.onOptgroupClick({label:e(this).parent().text(),checked:s,children:o.get(),instance:i})})),this.$selectItems.off("click").on("click",(function(){if(i.updateSelectAll(),i.update(),i.updateOptGroupSelect(),i.options.onClick({label:e(this).parent().text(),value:e(this).val(),checked:e(this).prop("checked"),instance:i}),i.options.single){var t=e(this).val();i.$selectItems.filter((function(){return e(this).val()!==t})).each((function(){e(this).prop("checked",!1)})),i.update()}i.options.single&&i.options.isOpen&&!i.options.keepOpen&&i.close()}))},open:function(){if(!this.$choice.hasClass("disabled")){if(this.options.isOpen=!0,this.$parent.addClass("ms-parent-open"),this.$choice.find(">div").addClass("open"),this.$drop[this.animateMethod("show")](),this.$selectAll&&this.$selectAll.parent().show(),this.$noResults&&this.$noResults.hide(),this.$el.children().length||(this.$selectAll&&this.$selectAll.parent().hide(),this.$noResults&&this.$noResults.show()),this.options.offsetLeft){var t=(i=this.$drop.offset()).left-this.options.offsetLeft;this.$drop.offset({top:i.top,left:t})}if(this.options.container){var i=this.$drop.offset();t=this.options.offsetLeft?i.left-this.options.offsetLeft:i.left,this.$drop.appendTo(e(this.options.container)),this.$drop.offset({top:i.top,left:t})}this.options.filter&&(this.$searchInput.val(""),this.$searchInput.focus(),this.filter()),this.options.autoAdjustDropWidthByTextSize?this.adjustDropWidthByText():!this.options.width&&this.options.autoDropWidth&&this.$drop.css("width",this.$parent.width());var n=this.options.position;if(this.options.autoAdjustDropHeight){if(this.options.autoAdjustDropPosition){var o=this.availableSpaceBottom(),s=this.availableSpaceTop();n=o<(this.$drop.outerHeight()||0)&&s>o?"top":"bottom"}this.adjustDropHeight(n)}this.options.autoAdjustDropPosition&&this.adjustDropPosition(this.options.autoAdjustDropHeight),this.options.onOpen()}},close:function(){this.options.isOpen=!1,this.$parent.removeClass("ms-parent-open"),this.$choice.find(">div").removeClass("open"),this.$drop[this.animateMethod("hide")](),this.options.container&&(this.$parent.append(this.$drop),this.$drop.css({top:"auto",left:"auto"})),this.options.onClose()},animateMethod:function(e){return{show:{fade:"fadeIn",slide:"slideDown"},hide:{fade:"fadeOut",slide:"slideUp"}}[e][this.options.animate]||e},adjustDropHeight:function(e){var t="top"!==e,i=(this.options.filter?this.options.domElmFilterHeight:0)+(this.options.single?0:this.options.domElmOkButtonHeight)+(this.options.single?0:this.options.domElmSelectAllHeight)+5,n=this.availableSpaceBottom(),o=this.availableSpaceTop(),s=this.options.maxHeight;return s=t?n-i-this.options.adjustHeightPadding:o-i-this.options.adjustHeightPadding,!(this.options.maxHeight&&!(this.options.maxHeight&&s<this.options.maxHeight)||(this.$drop.find("ul").css("max-height",s+"px"),0))},adjustDropPosition:function(t){var i="bottom",n=this.$drop.outerHeight()||0,o=this.$drop.outerWidth()||0,s=this.$parent.offset().top,r=this.$parent.offset().left,l=this.$parent.width(),a=this.availableSpaceBottom(),d=this.availableSpaceTop(),u=e(window).width();if(a>n)i="bottom";else if(n>a&&d>a){if(this.options.container){var c=s-n;c<0&&(c=0),(c>0||t)&&(i="top",this.$drop.offset({top:c<0?0:c}))}else i="top",this.$drop.addClass(i);this.$drop.removeClass("bottom")}if(u-o<r){var h=r-(o-l);this.$drop.offset({left:h})}return i},adjustDropWidthByText:function(){var t=this.$parent.width();(this.options.dropWidth||this.options.width)&&(t=this.options.dropWidth||this.options.width);var i=this.$parent.width(),n=e("span",this.$drop).width()+this.options.domElmSelectSidePadding,o=e("ul",this.$drop).hasScrollBar()?this.getScrollbarWidth():0,s=0;e("li span",this.$drop).each((function(t,i){var n=e(i).width();n>s&&(s=n)})),(s+=this.options.domElmSelectSidePadding+o)<n&&(s=n),this.options.maxWidth&&s>this.options.maxWidth&&(s=this.options.maxWidth),this.options.minWidth&&s<this.options.minWidth&&(s=this.options.minWidth),s<i&&(s=i),(t>s||this.$drop.width()>s||"100%"===t)&&this.$drop.css({width:s,"max-width":s})},availableSpaceBottom:function(){var t=e(window).innerHeight()||this.options.maxHeight,i=e(window).scrollTop()||0;return t-(this.$drop.offset().top-i)},availableSpaceTop:function(){var t=e(window).scrollTop()||0;return this.$parent.offset().top-t},update:function(t){var i=this.options.displayValues?this.getSelects():this.getSelects("text"),n=this.$choice.find(">span"),o=i.length;if(0===o)n.addClass("placeholder").html(this.options.placeholder);else if(this.options.allSelected&&o===this.$selectItems.length+this.$disableItems.length)n.removeClass("placeholder").html(this.options.allSelected);else if(this.options.ellipsis&&o>this.options.minimumCountSelected)n.removeClass("placeholder").text(i.slice(0,this.options.minimumCountSelected).join(this.options.delimiter)+"...");else if(this.options.countSelected&&o>this.options.minimumCountSelected)n.removeClass("placeholder").html(this.options.countSelected.replace("#",i.length).replace("%",this.$selectItems.length+this.$disableItems.length));else if(this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml){var s=this.getSelects("label").join(this.options.delimiter);if(this.options.useSelectOptionLabelToHtml){var r=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.getElementsByTagName("script"),n=i.length;n--;)i[n].parentNode.removeChild(i[n]);return t.innerHTML}(s);n.removeClass("placeholder").html(r)}else n.removeClass("placeholder").text(s)}else n.removeClass("placeholder").text(i.join(this.options.delimiter));if(this.options.addTitle){var l=this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml?"label":"text";n&&n.prop("title",this.getSelects(l).join(this.options.delimiter))}this.$el.val(this.getSelects()),this.$drop.find("li").removeClass("selected"),this.$drop.find("input:checked").each((function(){e(this).parents("li").first().addClass("selected")})),t||this.$el.trigger("change")},updateSelectAll:function(e){var t=this.$selectItems;e||(t=t.filter(":visible")),this.$selectAll&&(this.$selectAll.prop("checked",t.length&&t.length===t.filter(":checked").length),!e&&this.$selectAll.prop("checked")&&this.options.onCheckAll())},updateOptGroupSelect:function(){var i=this.$selectItems.filter(":visible");e.each(this.$selectGroups,(function(n,o){var s=e(o).parent().attr("data-group"),r=i.filter(t('[data-group="%s"]',s));e(o).prop("checked",r.length&&r.length===r.filter(":checked").length)}))},getOptions:function(){const t=e.extend({},this.options);return delete t.data,e.extend(!0,{},t)},refreshOptions:function(t){(function(e,t,i){var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var s=0;s<n.length;s++){var r=n[s];if(o.indexOf(r)>=0&&e[r]!==t[r])return!1}return!0})(this.options,t)||(this.options=e.extend(this.options,t),this.init())},getSelects:function(i){var n=this,o=[],s=[],r=[];switch(this.$drop.find(t("input[%s]:checked",this.selectItemName)).each((function(){o.push(e(this).parents("li").first().text()),s.push(e(this).parents("li").attr("label")||""),r.push(e(this).val())})),"text"===i&&this.$selectGroups&&this.$selectGroups.length?(o=[],this.$selectGroups.each((function(){var i=[],s=e.trim(e(this).parent().text()),r=e(this).parent().data("group"),l=n.$drop.find(t('[%s][data-group="%s"]',n.selectItemName,r)),a=l.filter(":checked");if(a&&a.length){if(i.push("["),i.push(s),(l&&l.length)>(a&&a.length)){var d=[];a.each((function(){d.push(e(this).parent().text())})),i.push(": "+d.join(", "))}i.push("]"),o.push(i.join(""))}}))):"label"===i&&this.$selectGroups&&this.$selectGroups.length&&(s=[],this.$selectGroups.each((function(){var i=[],o=e.trim(e(this).attr("label")||""),r=e(this).parent().data("group"),l=n.$drop.find(t('[%s][data-group="%s"]',n.selectItemName,r)),a=l.filter(":checked");if(a&&a.length){if(i.push("["),i.push(o),(l&&l.length)>(a&&a.length)){var d=[];a.each((function(){d.push(e(this).attr("label")||"")})),i.push(": "+d.join(", "))}i.push("]"),s.push(i.join(""))}}))),i){case"text":return o;case"label":return s;default:return r}},getScrollbarWidth:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),t-n},setSelects:function(i){var n=this;this.$selectItems&&this.$disableItems&&(this.$selectItems.prop("checked",!1),this.$disableItems.prop("checked",!1),e.each(i,(function(e,i){var o=n.$selectItems.filter(t('[value="%s"]',i)),s=n.$disableItems.filter(t('[value="%s"]',i));o&&o.prop("checked",!0),s&&s.prop("checked",!0)})),this.$selectItems&&this.$selectAll&&this.$selectAll.prop("checked",this.$selectItems.length===this.$selectItems.filter(":checked").length+this.$disableItems.filter(":checked").length),e.each(n.$selectGroups,(function(t,i){var o=e(i).parent().attr("data-group"),s=n.$selectItems.filter('[data-group="'+o+'"]');e(i).prop("checked",s.length&&s.length===s.filter(":checked").length)}))),this.update(!1)},enable:function(){this.$choice.removeClass("disabled")},disable:function(){this.$choice.addClass("disabled")},destroy:function(){e("body").off("click"),this.$el.before(this.$parent).show(),this.$parent.remove(),this.$choice=null,this.$el=null,this.$selectItems=null,this.$selectGroups=null,this.$noResults=null,this.options=null,this.$parent=null},checkAll:function(){this.$selectItems&&this.$selectItems.prop("checked",!0),this.$selectGroups&&this.$selectGroups.prop("checked",!0),this.$selectAll&&this.$selectAll.prop("checked",!0),this.update(),this.options.onCheckAll()},uncheckAll:function(){this.$selectItems&&this.$selectItems.prop("checked",!1),this.$selectGroups&&this.$selectGroups.prop("checked",!1),this.$selectAll&&this.$selectAll.prop("checked",!1),this.update(),this.options.onUncheckAll()},focus:function(){this.$choice&&this.$choice.focus(),this.options.onFocus()},blur:function(){this.$choice&&this.$choice.blur(),this.options.onBlur()},refresh:function(){this.init()},filter:function(){var n=this,o=e.trim(this.$searchInput.val()).toLowerCase();0===o.length?(this.$selectAll&&this.$selectAll.parent().show(),this.$selectItems&&this.$selectItems.parent().show(),this.$disableItems&&this.$disableItems.parent().show(),this.$selectGroups&&this.$selectGroups.parent().show(),this.$noResults.hide()):(this.$selectItems.each((function(){var t=e(this).parent();t[i(t.text().toLowerCase()).indexOf(i(o))<0?"hide":"show"]()})),this.$disableItems&&this.$disableItems.parent().hide(),this.$selectGroups.each((function(){var i=e(this).parent(),o=i.attr("data-group");i[n.$selectItems.filter(":visible").filter(t('[data-group="%s"]',o)).length?"show":"hide"]()})),this.$selectItems&&this.$selectItems.parent().filter(":visible").length?(this.$selectAll.parent().show(),this.$noResults.hide()):(this.$selectAll&&this.$selectAll.parent().hide(),this.$noResults.show())),this.updateOptGroupSelect(),this.updateSelectAll(),this.options.onFilter(o)}},e.fn.hasScrollBar=function(){return this.get(0)&&this.get(0).scrollHeight&&this.get(0).scrollHeight>this.height()},e.fn.multipleSelect=function(){var t,i=arguments[0],o=arguments,s=["getSelects","setSelects","getOptions","refreshOptions","enable","disable","open","close","checkAll","uncheckAll","focus","blur","refresh","destroy"];return this.each((function(){var r=e(this),l=r.data("multipleSelect"),a=e.extend({},e.fn.multipleSelect.defaults,r.data(),"object"==typeof i&&i);if(l||(l=new n(r,a),r.data("multipleSelect",l)),"string"==typeof i){if(e.inArray(i,s)<0)throw"Unknown method: "+i;t=l[i](o[1])}else l.init(),o[1]&&(t=l[o[1]].apply(l,[].slice.call(o,2)))})),void 0!==t?t:this},e.fn.multipleSelect.defaults={domElmFilterHeight:32,domElmSelectSidePadding:26,domElmOkButtonHeight:26,domElmSelectAllHeight:39,adjustHeightPadding:10,name:"",isOpen:!1,placeholder:"",selectAll:!0,selectAllDelimiter:["[","]"],minimumCountSelected:3,ellipsis:!1,multiple:!1,multipleWidth:80,single:!1,filter:!1,offsetLeft:0,autoAdjustDropHeight:!1,autoAdjustDropPosition:!1,autoDropWidth:!1,autoAdjustDropWidthByTextSize:!1,width:void 0,dropWidth:void 0,maxHeight:250,maxWidth:500,minWidth:void 0,container:null,position:"bottom",keepOpen:!1,animate:"none",displayValues:!1,delimiter:", ",addTitle:!1,filterAcceptOnEnter:!1,hideOptgroupCheckboxes:!1,openOnHover:!1,okButton:!1,okButtonText:"OK",selectAllText:"Select all",allSelected:"All selected",countSelected:"# of % selected",noMatchesFound:"No matches found",styler:function(){return!1},textTemplate:function(e){return e.html()},labelTemplate:function(e){return e.attr("label")},onOpen:function(){return!1},onClose:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onFocus:function(){return!1},onBlur:function(){return!1},onOptgroupClick:function(){return!1},onClick:function(){return!1},onFilter:function(){return!1},onAfterCreate:function(){return!1}}}(jQuery)},448:function(){!function(e){"use strict";e.extend(!0,window,{Slick:{Controls:{ColumnPicker:function(t,i,n){var o,s,r,l,a=i,d=n,u=i&&i.getUID?i.getUID():"",c=new Slick.Event,h={fadeSpeed:250,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",syncResizeTitle:"Synchronous resize",headerColumnValueExtractor:function(e){return e.name}};function p(t){if(t.onHeaderContextMenu.subscribe(g),t.onColumnsReordered.subscribe(v),d=e.extend({},h,n),r=e("<div class='slick-columnpicker "+u+"' style='display:none' />").appendTo(document.body),e("<button type='button' class='close' data-dismiss='slick-columnpicker' aria-label='Close'><span class='close' aria-hidden='true'>&times;</span></button>").appendTo(r),d.columnPickerTitle||d.columnPicker&&d.columnPicker.columnTitle){var i=d.columnPickerTitle||d.columnPicker.columnTitle;(o=e("<div class='title'/>").append(i)).appendTo(r)}r.on("click",_),s=e("<span class='slick-columnpicker-list' />"),e(document.body).on("mousedown",f),e(window).on("beforeunload",m)}function m(){a.onHeaderContextMenu.unsubscribe(g),a.onColumnsReordered.unsubscribe(v),s&&s.remove(),r&&r.off("click").remove(),e(document.body).off("mousedown",f),e(".slick-columnpicker."+u).hide(d&&d.columnPicker&&d.columnPicker.fadeSpeed),o=null,s=null,r=null,e(window).off("beforeunload")}function f(t){(r&&r[0]!=t.target&&!e.contains(r[0],t.target)||"close"==t.target.className)&&r.hide(d&&d.columnPicker&&d.columnPicker.fadeSpeed)}function g(i){var n,o,c,p,m;i.preventDefault(),s.empty(),v(),l=[];for(var f=0;f<t.length;f++)c=t[f].id,m=t[f].excludeFromColumnPicker?"hidden":"",n=e('<li class="'+m+'" />').appendTo(s),o=e("<input type='checkbox' id='"+u+"colpicker-"+c+"' />").data("column-id",c).appendTo(n),l.push(o),null!=a.getColumnIndex(c)&&o.attr("checked","checked"),p=d&&d.columnPicker&&d.columnPicker.headerColumnValueExtractor?d.columnPicker.headerColumnValueExtractor(t[f],d):h.headerColumnValueExtractor(t[f],d),e("<label for='"+u+"colpicker-"+c+"' />").html(p).appendTo(n);if(!d.columnPicker||d.columnPicker.hideForceFitButton&&d.columnPicker.hideSyncResizeButton||e("<hr/>").appendTo(s),!d.columnPicker||!d.columnPicker.hideForceFitButton){var g=d.columnPicker&&d.columnPicker.forceFitTitle||d.forceFitTitle;n=e("<li />").appendTo(s),o=e("<input type='checkbox' id='"+u+"colpicker-forcefit' />").data("option","autoresize").appendTo(n),e("<label for='"+u+"colpicker-forcefit' />").text(g).appendTo(n),a.getOptions().forceFitColumns&&o.attr("checked","checked")}if(!d.columnPicker||!d.columnPicker.hideSyncResizeButton){var _=d.columnPicker&&d.columnPicker.syncResizeTitle||d.syncResizeTitle;n=e("<li />").appendTo(s),o=e("<input type='checkbox' id='"+u+"colpicker-syncresize' />").data("option","syncresize").appendTo(n),e("<label for='"+u+"colpicker-syncresize' />").text(_).appendTo(n),a.getOptions().syncColumnCellResize&&o.attr("checked","checked")}r.css("top",i.pageY-10).css("left",i.pageX-10).css("max-height",e(window).height()-i.pageY-10).fadeIn(d&&d.columnPicker&&d.columnPicker.fadeSpeed),s.appendTo(r),n=null,o=null}function v(){for(var e=a.getColumns().slice(0),i=new Array(t.length),n=0;n<i.length;n++)void 0===a.getColumnIndex(t[n].id)?i[n]=t[n]:i[n]=e.shift();t=i}function _(i){if("autoresize"==e(i.target).data("option")){var n=C(),o=i.target.checked;return a.setOptions({forceFitColumns:o}),void a.setColumns(n)}if("syncresize"!=e(i.target).data("option")){if(e(i.target).is(":checkbox")){o=i.target.checked;var s=e(i.target).data("column-id")||"",r=[];if(e.each(l,(function(i){e(this).is(":checked")&&r.push(t[i])})),!r.length)return void e(i.target).attr("checked","checked");a.setColumns(r),c.notify({columnId:s,showing:o,allColumns:t,columns:r,grid:a})}}else i.target.checked?a.setOptions({syncColumnCellResize:!0}):a.setOptions({syncColumnCellResize:!1})}function C(){return a.getColumns()}return p(a),{init:p,getAllColumns:function(){return t},getVisibleColumns:C,destroy:m,updateAllTitles:function(e){o&&o.text&&o.text(e.columnTitle)},onColumnsChanged:c}}}}})}(jQuery)},829:function(){"use strict";!function(e){e.extend(!0,window,{Slick:{Controls:{GridMenu:function(t,i,n){var o,s,r,l,a,d,u,c,h,p=i,m=i&&i.getUID?i.getUID():"",f=!1,g=n,v=this,_={showButton:!0,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",marginBottom:15,menuWidth:18,contentMinWidth:0,resizeOnShowHeaderRow:!1,syncResizeTitle:"Synchronous resize",useClickToRepositionMenu:!0,headerColumnValueExtractor:function(e){return e.name}};function C(t){o=t.getOptions(),function(){var t=g.gridMenu&&g.gridMenu.menuWidth||_.menuWidth;if((a=o&&o.hasOwnProperty("frozenColumn")&&o.frozenColumn>=0?e("."+m+" .slick-header-right"):e("."+m+" .slick-header-left")).attr("style","width: calc(100% - "+t+"px)"),(g.gridMenu&&null!=g.gridMenu.resizeOnShowHeaderRow?g.gridMenu.resizeOnShowHeaderRow:_.resizeOnShowHeaderRow)&&g.showHeaderRow&&e("."+m+".slick-headerrow").attr("style","width: calc(100% - "+t+"px)"),g.gridMenu&&void 0!==g.gridMenu.showButton?g.gridMenu.showButton:_.showButton){if(u=e('<button class="slick-gridmenu-button"/>'),g.gridMenu&&g.gridMenu.iconCssClass)u.addClass(g.gridMenu.iconCssClass);else{var i=g.gridMenu&&g.gridMenu.iconImage?g.gridMenu.iconImage:"../images/drag-handle.png";e('<img src="'+i+'"/>').appendTo(u)}u.insertBefore(a),u.on("click."+m,E)}c=e('<div class="slick-gridmenu '+m+'" style="display: none" />').appendTo(document.body),e('<button type="button" class="close" data-dismiss="slick-gridmenu" aria-label="Close"><span class="close" aria-hidden="true">&times;</span></button>').appendTo(c),(l=e('<div class="slick-gridmenu-custom" />')).appendTo(c),w(g,l),p.onColumnsReordered.subscribe(k),(g=e.extend({},_,g)).gridMenu&&g.gridMenu.columnTitle&&(r=e('<div class="title"/>').append(g.gridMenu.columnTitle)).appendTo(c),c.on("click",D),d=e('<span class="slick-gridmenu-list" />'),e(document.body).on("mousedown."+m,T),e(window).on("beforeunload",b)}(),t.onBeforeDestroy.subscribe(b)}function b(){v.onAfterMenuShow.unsubscribe(),v.onBeforeMenuShow.unsubscribe(),v.onMenuClose.unsubscribe(),v.onCommand.unsubscribe(),v.onColumnsChanged.unsubscribe(),p.onColumnsReordered.unsubscribe(k),p.onBeforeDestroy.unsubscribe(),p.onSetOptions.unsubscribe(),e("div.slick-gridmenu."+m).remove(),y(),e(window).off("beforeunload")}function y(){e(document.body).off("mousedown."+m,T),e("div.slick-gridmenu."+m).hide(),u&&u.remove(),c&&c.remove(),l&&l.remove(),a&&a.attr("style","width: 100%"),s=null,r=null,l=null,a=null,d=null,u=null,c=null}function w(i,n){if(i.gridMenu&&i.gridMenu.customItems){g.gridMenu&&g.gridMenu.customTitle&&(s=e('<div class="title"/>').append(g.gridMenu.customTitle)).appendTo(n);for(var o=0,r=i.gridMenu.customItems.length;o<r;o++){var l=i.gridMenu.customItems[o],a={grid:p,menu:c,columns:t,visibleColumns:A()},d=R(l.itemVisibilityOverride,a),u=R(l.itemUsabilityOverride,a);if(d){Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!u);var h=e("<div class='slick-gridmenu-item'></div>").data("command",void 0!==l.command?l.command:"").data("item",l).on("click",x).appendTo(n);if(l.divider||"divider"===l)h.addClass("slick-gridmenu-item-divider");else{l.disabled&&h.addClass("slick-gridmenu-item-disabled"),l.hidden&&h.addClass("slick-gridmenu-item-hidden"),l.cssClass&&h.addClass(l.cssClass),l.tooltip&&h.attr("title",l.tooltip);var m=e("<div class='slick-gridmenu-icon'></div>").appendTo(h);l.iconCssClass&&m.addClass(l.iconCssClass),l.iconImage&&m.css("background-image","url("+l.iconImage+")");var f=e("<span class='slick-gridmenu-content'></span>").text(l.title).appendTo(h);l.textCssClass&&f.addClass(l.textCssClass),m=null,h=null,f=null}}}}}function S(){y(),C(p)}function E(i){i.preventDefault(),d.empty(),l.empty(),w(g,l),k(),h=[];var n={grid:p,menu:c,allColumns:t,visibleColumns:A()};if((!g||!g.gridMenu||R(g.gridMenu.menuUsabilityOverride,n))&&("function"!=typeof i.isPropagationStopped||0!=v.onBeforeMenuShow.notify(n,i,v))){for(var s,r,a,u,C,b=0;b<t.length;b++)a=t[b].id,C=t[b].excludeFromGridMenu?"hidden":"",s=e('<li class="'+C+'" />').appendTo(d),r=e("<input type='checkbox' id='"+m+"-gridmenu-colpicker-"+a+"' />").data("column-id",t[b].id).appendTo(s),h.push(r),null!=p.getColumnIndex(t[b].id)&&r.attr("checked","checked"),u=g&&g.gridMenu&&g.gridMenu.headerColumnValueExtractor?g.gridMenu.headerColumnValueExtractor(t[b],o):_.headerColumnValueExtractor(t[b],o),e("<label for='"+m+"-gridmenu-colpicker-"+a+"' />").html(u).appendTo(s);if(!g.gridMenu||g.gridMenu.hideForceFitButton&&g.gridMenu.hideSyncResizeButton||e("<hr/>").appendTo(d),!g.gridMenu||!g.gridMenu.hideForceFitButton){var y=g.gridMenu&&g.gridMenu.forceFitTitle||_.forceFitTitle;s=e("<li />").appendTo(d),r=e("<input type='checkbox' id='"+m+"-gridmenu-colpicker-forcefit' />").data("option","autoresize").appendTo(s),e("<label for='"+m+"-gridmenu-colpicker-forcefit' />").text(y).appendTo(s),p.getOptions().forceFitColumns&&r.attr("checked","checked")}if(!g.gridMenu||!g.gridMenu.hideSyncResizeButton){var S=g.gridMenu&&g.gridMenu.syncResizeTitle||_.syncResizeTitle;s=e("<li />").appendTo(d),r=e("<input type='checkbox' id='"+m+"-gridmenu-colpicker-syncresize' />").data("option","syncresize").appendTo(s),e("<label for='"+m+"-gridmenu-colpicker-syncresize' />").text(S).appendTo(s),p.getOptions().syncColumnCellResize&&r.attr("checked","checked")}var E="button"==e(i.target).prop("nodeName")?e(i.target).offset():e(i.target).parent("button").offset();E||(E=e(i.target).offset());var T=c.width(),x=g.gridMenu&&void 0!==g.gridMenu.useClickToRepositionMenu?g.gridMenu.useClickToRepositionMenu:_.useClickToRepositionMenu,O=g.gridMenu&&g.gridMenu.menuWidth||_.menuWidth,D=g.gridMenu&&g.gridMenu.contentMinWidth?g.gridMenu.contentMinWidth:_.contentMinWidth,I=D>T?D:T+O,P=x&&i.pageY>0?i.pageY:E.top+10,M=x&&i.pageX>0?i.pageX:E.left+10,F=g.gridMenu&&void 0!==g.gridMenu.marginBottom?g.gridMenu.marginBottom:_.marginBottom;c.css("top",P+10).css("left",M-I+10),D>0&&c.css("min-width",D),g.gridMenu&&void 0!==g.gridMenu.height?c.css("height",g.gridMenu.height):c.css("max-height",e(window).height()-i.clientY-F),c.show(),d.appendTo(c),f=!0,"function"==typeof i.isPropagationStopped&&0==v.onAfterMenuShow.notify(n,i,v)||(r=null)}}function T(t){(c&&c[0]!=t.target&&!e.contains(c[0],t.target)&&f||"close"==t.target.className)&&O(t)}function x(i){var n=e(this).data("command"),o=e(this).data("item");if(!o.disabled&&!o.divider&&"divider"!==o){if(null!=n&&""!=n){var s={grid:p,command:n,item:o,allColumns:t,visibleColumns:A()};v.onCommand.notify(s,i,v),"function"==typeof o.action&&o.action.call(this,i,s)}!(!g.gridMenu||!g.gridMenu.leaveOpen)||i.isDefaultPrevented()||O(i),i.preventDefault(),i.stopPropagation()}}function O(e){if(c){c.hide(),f=!1;var i={grid:p,menu:c,allColumns:t,visibleColumns:A()};if(0==v.onMenuClose.notify(i,e,v))return}}function k(){for(var e=p.getColumns().slice(0),i=new Array(t.length),n=0;n<i.length;n++)void 0===p.getColumnIndex(t[n].id)?i[n]=t[n]:i[n]=e.shift();t=i}function D(i){if("autoresize"==e(i.target).data("option")){var n=A(),o=i.target.checked;return p.setOptions({forceFitColumns:o}),void p.setColumns(n)}if("syncresize"!=e(i.target).data("option")){if(e(i.target).is(":checkbox")){o=i.target.checked;var s=e(i.target).data("column-id")||"",r=[];if(e.each(h,(function(i){e(this).is(":checked")&&r.push(t[i])})),!r.length)return void e(i.target).attr("checked","checked");var l={columnId:s,showing:o,grid:p,allColumns:t,columns:r};p.setColumns(r),v.onColumnsChanged.notify(l,i,v)}}else i.target.checked?p.setOptions({syncColumnCellResize:!0}):p.setOptions({syncColumnCellResize:!1})}function A(){return p.getColumns()}function R(e,t){return"function"!=typeof e||e.call(this,t)}i.onSetOptions.subscribe((function(e,t){if(t&&t.optionsBefore&&t.optionsAfter){var i=t.optionsBefore.frozenColumn>=0&&-1===t.optionsAfter.frozenColumn,n=-1===t.optionsBefore.frozenColumn&&t.optionsAfter.frozenColumn>=0;(i||n)&&S()}})),C(p),e.extend(this,{init:C,getAllColumns:function(){return t},getVisibleColumns:A,destroy:b,deleteMenu:y,recreateGridMenu:S,showGridMenu:E,setOptions:function(t){n=e.extend({},n,t)},updateAllTitles:function(e){s&&s.text&&s.text(e.customTitle),r&&r.text&&r.text(e.columnTitle)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onMenuClose:new Slick.Event,onCommand:new Slick.Event,onColumnsChanged:new Slick.Event})}}}})}(jQuery)},204:function(){!function(e){e.fn.drag=function(t,i,n){var o="string"==typeof t?t:"",s=e.isFunction(t)?t:e.isFunction(i)?i:null;return 0!==o.indexOf("drag")&&(o="drag"+o),n=(t==s?i:n)||{},s?this.on(o,n,s):this.trigger(o)};var t=e.event,i=t.special,n=i.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(t){var i=e.data(this,n.datakey),o=t.data||{};i.related+=1,e.each(n.defaults,(function(e,t){void 0!==o[e]&&(i[e]=o[e])}))},remove:function(){e.data(this,n.datakey).related-=1},setup:function(){if(!e.data(this,n.datakey)){var i=e.extend({related:0},n.defaults);e.data(this,n.datakey,i),t.add(this,"touchstart mousedown",n.init,i),this.attachEvent&&this.attachEvent("ondragstart",n.dontstart)}},teardown:function(){(e.data(this,n.datakey)||{}).related||(e.removeData(this,n.datakey),t.remove(this,"touchstart mousedown",n.init),n.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",n.dontstart))},init:function(o){if(!n.touched){var s,r=o.data;if(!(0!=o.which&&r.which>0&&o.which!=r.which)){var l=e(o.target).attr("class")||"";if(!e(o.target).is(r.not)&&l&&-1!==l.toString().indexOf("slick")&&(!r.handle||e(o.target).closest(r.handle,o.currentTarget).length)&&(n.touched="touchstart"==o.type?this:null,r.propagates=1,r.mousedown=this,r.interactions=[n.interaction(this,r)],r.target=o.target,r.pageX=o.pageX,r.pageY=o.pageY,r.dragging=null,s=n.hijack(o,"draginit",r),r.propagates))return(s=n.flatten(s))&&s.length&&(r.interactions=[],e.each(s,(function(){r.interactions.push(n.interaction(this,r))}))),r.propagates=r.interactions.length,!1!==r.drop&&i.drop&&i.drop.handler(o,r),n.textselect(!1),n.touched?t.add(n.touched,"touchmove touchend",n.handler,r):t.add(document,"mousemove mouseup",n.handler,r),!(!n.touched||r.live)&&void 0}}},interaction:function(t,i){var o=t&&t.ownerDocument&&e(t)[i.relative?"position":"offset"]()||{top:0,left:0};return{drag:t,callback:new n.callback,droppable:[],offset:o}},handler:function(o){var s=o.data;switch(o.type){case!s.dragging&&"touchmove":o.preventDefault();case!s.dragging&&"mousemove":if(Math.pow(o.pageX-s.pageX,2)+Math.pow(o.pageY-s.pageY,2)<Math.pow(s.distance,2))break;o.target=s.target,n.hijack(o,"dragstart",s),s.propagates&&(s.dragging=!0);case"touchmove":o.preventDefault();case"mousemove":if(s.dragging){if(n.hijack(o,"drag",s),s.propagates){!1!==s.drop&&i.drop&&i.drop.handler(o,s);break}o.type="mouseup"}case"touchend":case"mouseup":default:n.touched?t.remove(n.touched,"touchmove touchend",n.handler):t.remove(document,"mousemove mouseup",n.handler),s.dragging&&(!1!==s.drop&&i.drop&&i.drop.handler(o,s),n.hijack(o,"dragend",s)),n.textselect(!0),!1===s.click&&s.dragging&&e.data(s.mousedown,"suppress.click",(new Date).getTime()+5),s.dragging=n.touched=!1}},hijack:function(i,o,s,r,l){if(s){var a,d,u,c={event:i.originalEvent,type:i.type},h=o.indexOf("drop")?"drag":"drop",p=r||0,m=isNaN(r)?s.interactions.length:r;i.type=o;var f=function(){};i.originalEvent=new jQuery.Event(c.event,{preventDefault:f,stopPropagation:f,stopImmediatePropagation:f}),s.results=[];do{if(d=s.interactions[p]){if("dragend"!==o&&d.cancelled)continue;u=n.properties(i,s,d),d.results=[],e(l||d[h]||s.droppable).each((function(r,l){if(u.target=l,i.isPropagationStopped=function(){return!1},!1===(a=l?t.dispatch.call(l,i,u):null)?("drag"==h&&(d.cancelled=!0,s.propagates-=1),"drop"==o&&(d[h][r]=null)):"dropinit"==o&&d.droppable.push(n.element(a)||l),"dragstart"==o&&(d.proxy=e(n.element(a)||d.drag)[0]),d.results.push(a),delete i.result,"dropinit"!==o)return a})),s.results[p]=n.flatten(d.results),"dropinit"==o&&(d.droppable=n.flatten(d.droppable)),"dragstart"!=o||d.cancelled||u.update()}}while(++p<m);return i.type=c.type,i.originalEvent=c.event,n.flatten(s.results)}},properties:function(e,t,i){var o=i.callback;return o.drag=i.drag,o.proxy=i.proxy||i.drag,o.startX=t.pageX,o.startY=t.pageY,o.deltaX=e.pageX-t.pageX,o.deltaY=e.pageY-t.pageY,o.originalX=i.offset.left,o.originalY=i.offset.top,o.offsetX=o.originalX+o.deltaX,o.offsetY=o.originalY+o.deltaY,o.drop=n.flatten((i.drop||[]).slice()),o.available=n.flatten((i.droppable||[]).slice()),o},element:function(e){if(e&&(e.jquery||1==e.nodeType))return e},flatten:function(t){return e.map(t,(function(t){return t&&t.jquery?e.makeArray(t):t&&t.length?n.flatten(t):t}))},textselect:function(t){e(document)[t?"off":"on"]("selectstart",n.dontstart).css("MozUserSelect",t?"":"none"),document.unselectable=t?"off":"on"},dontstart:function(){return!1},callback:function(){}};n.callback.prototype={update:function(){i.drop&&this.available.length&&e.each(this.available,(function(e){i.drop.locate(this,e)}))}};var o=t.dispatch;t.dispatch=function(t){if(!(e.data(this,"suppress."+t.type)-(new Date).getTime()>0))return o.apply(this,arguments);e.removeData(this,"suppress."+t.type)},i.draginit=i.dragstart=i.dragend=n}(jQuery)},850:function(){!function(e){var t=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var i=t.length;i;)e.event.fixHooks[t[--i]]=e.event.mouseHooks;function n(t){var i=t||window.event,n=[].slice.call(arguments,1),o=0,s=0,r=0;return(t=e.event.fix(i)).type="mousewheel",i.wheelDelta&&(o=i.wheelDelta/120),i.detail&&(o=-i.detail/3),r=o,void 0!==i.axis&&i.axis===i.HORIZONTAL_AXIS&&(r=0,s=-1*o),void 0!==i.wheelDeltaY&&(r=i.wheelDeltaY/120),void 0!==i.wheelDeltaX&&(s=-1*i.wheelDeltaX/120),n.unshift(t,o,s,r),(e.event.dispatch||e.event.handle).apply(this,n)}e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery)},854:function(){!function(e){e.extend(!0,window,{Slick:{AutoTooltips:function(t){var i,n={enableForCells:!0,enableForHeaderCells:!1,maxToolTipLength:null,replaceExisting:!0};function o(n){var o=i.getCellFromEvent(n);if(o){var s,r=e(i.getCellNode(o.row,o.cell));r.attr("title")&&!t.replaceExisting||(r.innerWidth()<r[0].scrollWidth?(s=e.trim(r.text()),t.maxToolTipLength&&s.length>t.maxToolTipLength&&(s=s.substr(0,t.maxToolTipLength-3)+"...")):s="",r.attr("title",s)),r=null}}function s(t,i){var n=i.column,o=e(t.target).closest(".slick-header-column");n&&!n.toolTip&&o.attr("title",o.innerWidth()<o[0].scrollWidth?n.name:""),o=null}e.extend(this,{init:function(r){t=e.extend(!0,{},n,t),i=r,t.enableForCells&&i.onMouseEnter.subscribe(o),t.enableForHeaderCells&&i.onHeaderMouseEnter.subscribe(s)},destroy:function(){t.enableForCells&&i.onMouseEnter.unsubscribe(o),t.enableForHeaderCells&&i.onHeaderMouseEnter.unsubscribe(s)},pluginName:"AutoTooltips"})}}})}(jQuery)},183:function(){!function(e){e.extend(!0,window,{Slick:{CellExternalCopyManager:function(t){var i,n,o=this,s=t||{},r=s.copiedCellStyleLayerKey||"copy-manager",l=s.copiedCellStyle||"copied",a=0,d=s.bodyElement||document.body,u=s.onCopyInit||null,c=s.onCopySuccess||null,h=67,p=86,m=27,f=45;function g(e){if(s.headerColumnValueExtractor){var t=s.headerColumnValueExtractor(e);if(t)return t}return e.name}function v(t,n,o){if(s.dataItemColumnValueExtractor){var r=s.dataItemColumnValueExtractor(t,n);if(r)return r}var l="";if(n.editor){var a={container:e("<p>"),column:n,position:{top:0,left:0},grid:i,event:o},d=new n.editor(a);d.loadValue(t),l=d.serializeValue(),d.destroy()}else l=t[n.field];return l}function _(t,n,o){if(n.denyPaste)return null;if(s.dataItemColumnValueSetter)return s.dataItemColumnValueSetter(t,n,o);if(n.editor){var r={container:e("body"),column:n,position:{top:0,left:0},grid:i},l=new n.editor(r);l.loadValue(t),l.applyValue(t,o),l.destroy()}else t[n.field]=o}function C(e){var t=document.createElement("textarea");return t.style.position="absolute",t.style.left="-1000px",t.style.top=document.body.scrollTop+"px",t.value=e,d.appendChild(t),t.select(),t}function b(e,t){var r;if(!i.getEditorLock().isActive()||i.getOptions().autoEdit){if(e.which==m&&n&&(e.preventDefault(),w(),o.onCopyCancelled.notify({ranges:n}),n=null),(e.which===h||e.which===f)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&(u&&u.call(),0!==(r=i.getSelectionModel().getSelectedRanges()).length)){n=r,y(r),o.onCopyCells.notify({ranges:r});for(var l=i.getColumns(),a="",b=0;b<r.length;b++){for(var S=r[b],E=[],T=S.fromRow;T<S.toRow+1;T++){var x=[],O=i.getDataItem(T);if(0===E.length&&s.includeHeaderWhenCopying){for(var k=[],D=S.fromCell;D<S.toCell+1;D++)l[D].name.length>0&&k.push(g(l[D]));E.push(k.join("\t"))}for(D=S.fromCell;D<S.toCell+1;D++)x.push(v(O,l[D],e));E.push(x.join("\t"))}a+=E.join("\r\n")+"\r\n"}if(window.clipboardData)return window.clipboardData.setData("Text",a),!0;var A=document.activeElement;if((I=C(a)).focus(),setTimeout((function(){d.removeChild(I),A?A.focus():console.log("Not element to restore focus to after copy?")}),100),c){var R;R=1===r.length?r[0].toRow+1-r[0].fromRow:r.length,c.call(this,R)}return!1}if(!s.readOnlyMode&&(e.which===p&&(e.ctrlKey||e.metaKey)&&!e.shiftKey||e.which===f&&e.shiftKey&&!e.ctrlKey)){var I=C("");return setTimeout((function(){!function(e,t){var i=e.getColumns(),n=t.value.split(/[\n\f\r]/);""===n[n.length-1]&&n.pop();var r=[],l=0;d.removeChild(t);for(var a=0;a<n.length;a++)""!==n[a]?r[l++]=n[a].split("\t"):r[l++]=[""];var u=e.getActiveCell(),c=e.getSelectionModel().getSelectedRanges(),h=c&&c.length?c[0]:null,p=null,m=null;if(h)p=h.fromRow,m=h.fromCell;else{if(!u)return;p=u.row,m=u.cell}var f=!1,g=r.length,v=r.length?r[0].length:0;1==r.length&&1==r[0].length&&h&&(f=!0,g=h.toRow-h.fromRow+1,v=h.toCell-h.fromCell+1);var C=e.getData().length-p,b=0;if(C<g&&s.newRowCreator){var w=e.getData();for(b=1;b<=g-C;b++)w.push({});e.setData(w),e.render()}var S=p+g>e.getDataLength();if(s.newRowCreator&&S){var E=p+g-e.getDataLength();s.newRowCreator(E)}var T={isClipboardCommand:!0,clippedRange:r,oldValues:[],cellExternalCopyManager:o,_options:s,setDataItemValueForColumn:_,markCopySelection:y,oneCellToMultiple:f,activeRow:p,activeCell:m,destH:g,destW:v,maxDestY:e.getDataLength(),maxDestX:e.getColumns().length,h:0,w:0,execute:function(){this.h=0;for(var t=0;t<this.destH;t++){this.oldValues[t]=[],this.w=0,this.h++;for(var n=0;n<this.destW;n++){this.w++;var o=p+t,s=m+n;if(o<this.maxDestY&&s<this.maxDestX){e.getCellNode(o,s);var l=e.getDataItem(o);this.oldValues[t][n]=l[i[s].field],f?this.setDataItemValueForColumn(l,i[s],r[0][0]):this.setDataItemValueForColumn(l,i[s],r[t]?r[t][n]:""),e.updateCell(o,s),e.onCellChange.notify({row:o,cell:s,item:l,grid:e})}}}var a={fromCell:m,fromRow:p,toCell:m+this.w-1,toRow:p+this.h-1};this.markCopySelection([a]),e.getSelectionModel().setSelectedRanges([a]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[a]})},undo:function(){for(var t=0;t<this.destH;t++)for(var n=0;n<this.destW;n++){var o=p+t,s=m+n;if(o<this.maxDestY&&s<this.maxDestX){e.getCellNode(o,s);var r=e.getDataItem(o);f?this.setDataItemValueForColumn(r,i[s],this.oldValues[0][0]):this.setDataItemValueForColumn(r,i[s],this.oldValues[t][n]),e.updateCell(o,s),e.onCellChange.notify({row:o,cell:s,item:r,grid:e})}}var l={fromCell:m,fromRow:p,toCell:m+this.w-1,toRow:p+this.h-1};if(this.markCopySelection([l]),e.getSelectionModel().setSelectedRanges([l]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[l]}),b>1){for(var a=e.getData();b>1;b--)a.splice(a.length-1,1);e.setData(a),e.render()}}};s.clipboardCommandHandler?s.clipboardCommandHandler(T):T.execute()}(i,I)}),100),!1}}}function y(e){w();for(var t=i.getColumns(),n={},s=0;s<e.length;s++)for(var d=e[s].fromRow;d<=e[s].toRow;d++){n[d]={};for(var u=e[s].fromCell;u<=e[s].toCell&&u<t.length;u++)n[d][t[u].id]=l}i.setCellCssStyles(r,n),clearTimeout(a),a=setTimeout((function(){o.clearCopySelection()}),2e3)}function w(){i.removeCellCssStyles(r)}e.extend(this,{init:function(e){(i=e).onKeyDown.subscribe(b);var t=e.getSelectionModel();if(!t)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())");t.onSelectedRangesChanged.subscribe((function(e,t){i.focus()}))},destroy:function(){i.onKeyDown.unsubscribe(b)},pluginName:"CellExternalCopyManager",clearCopySelection:w,handleKeyDown:b,onCopyCells:new Slick.Event,onCopyCancelled:new Slick.Event,onPasteCells:new Slick.Event,setIncludeHeaderWhenCopying:function(e){s.includeHeaderWhenCopying=e}})}}})}(jQuery)},399:function(){!function(e){e.extend(!0,window,{Slick:{Plugins:{CellMenu:function(t){var i,n,o,s,r=-1,l=-1,a="",d=new Slick.EventHandler,u=this,c={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!0,maxHeight:"none",width:"auto"};function h(e){e.isDefaultPrevented()||p(e)}function p(t,i){if((s=s||e(".slick-cell-menu."+a))&&s.remove){if(s.length>0&&0==u.onBeforeMenuClose.notify({cell:i&&i.cell,row:i&&i.row,grid:n,menu:s},t,u))return;s.remove(),s=null}}function m(t,d){var c=n.getCellFromEvent(t),m=n.getDataItem(c.row),g=n.getColumns()[c.cell];g&&g.cellMenu&&t.preventDefault(),i=e.extend({},i,g.cellMenu),d||(d={}),d.columnDef=g,d.dataContext=m,d.grid=n,C(i.menuUsabilityOverride,d)&&((s=function(t){var o=n.getCellFromEvent(t);r=o&&o.cell,l=o&&o.row;var s=n.getColumns()[r],d=n.getDataItem(l),c=i.commandItems||[],m=i.optionItems||[];if(s&&s.cellMenu&&(c.length||m.length)&&(p(),0!=u.onBeforeMenuShow.notify({cell:r,row:l,grid:n},t,u))){var f=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",g=isNaN(i.width)?i.width:i.width+"px",b=e('<div class="slick-cell-menu '+a+'" style="width: '+g+"; max-height: "+f+'" />').css("top",t.pageY+5).css("left",t.pageX).css("display","none"),y='<button type="button" class="close" data-dismiss="slick-cell-menu" aria-label="Close"><span class="close" aria-hidden="true">&times;</span></button>';if(!i.hideOptionSection&&m.length>0){var w=e('<div class="slick-cell-menu-option-list" />');i.hideCloseButton||e(y).on("click",h).appendTo(b),w.appendTo(b),function(t,i,n,o){if(o&&n&&t){t&&t.optionTitle&&e('<div class="title"/>').append(t.optionTitle).appendTo(i);for(var s=0,r=n.length;s<r;s++){var l=n[s],a=C(l.itemVisibilityOverride,o),d=C(l.itemUsabilityOverride,o);if(a){Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!d);var u=e('<div class="slick-cell-menu-item"></div>').data("option",void 0!==l.option?l.option:"").data("item",l).on("click",_).appendTo(i);if(l.divider||"divider"===l)u.addClass("slick-cell-menu-item-divider");else{!l.disabled&&d||u.addClass("slick-cell-menu-item-disabled"),l.hidden&&u.addClass("slick-cell-menu-item-hidden"),l.cssClass&&u.addClass(l.cssClass),l.tooltip&&u.attr("title",l.tooltip);var c=e('<div class="slick-cell-menu-icon"></div>').appendTo(u);l.iconCssClass&&c.addClass(l.iconCssClass),l.iconImage&&c.css("background-image","url("+l.iconImage+")");var h=e('<span class="slick-cell-menu-content"></span>').text(l.title).appendTo(u);l.textCssClass&&h.addClass(l.textCssClass)}}}}}(i,w,m,{cell:r,row:l,column:s,dataContext:d,grid:n})}if(!i.hideCommandSection&&c.length>0){var S=e('<div class="slick-cell-menu-command-list" />');i.hideCloseButton||0!==m.length&&!i.hideOptionSection||e(y).on("click",h).appendTo(b),S.appendTo(b),function(t,i,n,o){if(o&&n&&t){t&&t.commandTitle&&e('<div class="title"/>').append(t.commandTitle).appendTo(i);for(var s=0,r=n.length;s<r;s++){var l=n[s],a=C(l.itemVisibilityOverride,o),d=C(l.itemUsabilityOverride,o);if(a){Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!d);var u=e('<div class="slick-cell-menu-item"></div>').data("command",void 0!==l.command?l.command:"").data("item",l).on("click",v).appendTo(i);if(l.divider||"divider"===l)u.addClass("slick-cell-menu-item-divider");else{!l.disabled&&d||u.addClass("slick-cell-menu-item-disabled"),l.hidden&&u.addClass("slick-cell-menu-item-hidden"),l.cssClass&&u.addClass(l.cssClass),l.tooltip&&u.attr("title",l.tooltip);var c=e('<div class="slick-cell-menu-icon"></div>').appendTo(u);l.iconCssClass&&c.addClass(l.iconCssClass),l.iconImage&&c.css("background-image","url("+l.iconImage+")");var h=e('<span class="slick-cell-menu-content"></span>').text(l.title).appendTo(u);l.textCssClass&&h.addClass(l.textCssClass)}}}}}(i,S,c,{cell:r,row:l,column:s,dataContext:d,grid:n})}if(b.show(),b.appendTo("body"),0!=u.onAfterMenuShow.notify({cell:r,row:l,grid:n},t,u))return b}}(t))&&(function(t){var r,l,a,d=e(t.target).closest(".slick-cell"),u=d?d.offset().left:t.pageX,c=d?d.offset().top:t.pageY,h=d.outerWidth(),p=s.outerHeight()||0,m=s.outerWidth()||i.width||0,f=o.rowHeight,g=i.autoAdjustDropOffset,v=i.autoAlignSideOffset;if(i.autoAdjustDrop){var _=(r=d,l=e(window).innerHeight()||0,a=e(window).scrollTop()||0,r&&r.offset&&r.length>0?l-(r.offset().top-a):0),C=function(t){var i=e(window).scrollTop()||0;return t&&t.offset&&t.length>0?t.offset().top-i:0}(d),b=_+g-f;"top"==(b<p&&C-g+f>b?"top":"bottom")?(s.removeClass("dropdown").addClass("dropup"),c=c-p-g):(s.removeClass("dropup").addClass("dropdown"),c=c+f+g)}i.autoAlignSide&&("left"==(u+m>=n.getGridPosition().width?"left":"right")?(s.removeClass("dropright").addClass("dropleft"),u=u-(m-h)-v):(s.removeClass("dropleft").addClass("dropright"),u+=v)),s.css("top",c),s.css("left",u)}(t),s.data("cell",r).data("row",l).show()),e("body").on("mousedown."+a,f))}function f(t){s&&s[0]!=t.target&&!e.contains(s[0],t.target)&&(t.isDefaultPrevented()||g(t,{cell:r,row:l}))}function g(e,t){if(s&&s.length>0){if(0==u.onBeforeMenuClose.notify({cell:t&&t.cell,row:t&&t.row,grid:n,menu:s},e,u))return;s&&s.remove&&(s.remove(),s=null)}}function v(t){var i=e(this).data("command"),o=e(this).data("item");if(o&&!o.disabled&&!o.divider&&"divider"!==o){var r=s.data("row"),l=s.data("cell"),a=n.getColumns()[l],d=n.getDataItem(r);if(null!==i&&""!==i){var c={cell:l,row:r,grid:n,command:i,item:o,column:a,dataContext:d};u.onCommand.notify(c,t,u),"function"==typeof o.action&&o.action.call(this,t,c),t.isDefaultPrevented()||g(t,{cell:l,row:r})}}}function _(t){var i=e(this).data("option"),o=e(this).data("item");if(o&&!o.disabled&&!o.divider&&"divider"!==o&&n.getEditorLock().commitCurrentEdit()){var r=s.data("row"),l=s.data("cell"),a=n.getColumns()[l],d=n.getDataItem(r);if(void 0!==i){var c={cell:l,row:r,grid:n,option:i,item:o,column:a,dataContext:d};u.onOptionSelected.notify(c,t,u),"function"==typeof o.action&&o.action.call(this,t,c),t.isDefaultPrevented()||g(t,{cell:l,row:r})}}}function C(e,t){return"function"!=typeof e||e.call(this,t)}e.extend(this,{init:function(s){n=s,o=s.getOptions(),i=e.extend({},c,t),a=s&&s.getUID?s.getUID():"",d.subscribe(n.onClick,m),i.hideMenuOnScroll&&d.subscribe(n.onScroll,p)},closeMenu:p,destroy:function(){u.onAfterMenuShow.unsubscribe(),u.onBeforeMenuShow.unsubscribe(),u.onBeforeMenuClose.unsubscribe(),u.onCommand.unsubscribe(),u.onOptionSelected.unsubscribe(),d.unsubscribeAll(),s&&s.remove&&s.remove(),s=null},pluginName:"CellMenu",setOptions:function(t){i=e.extend({},i,t)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onBeforeMenuClose:new Slick.Event,onCommand:new Slick.Event,onOptionSelected:new Slick.Event})}}}})}(jQuery)},633:function(){!function(e){e.extend(!0,window,{Slick:{CellRangeDecorator:function(t,i){var n;function o(){n&&(n.remove(),n=null)}i=e.extend(!0,{},{selectionCssClass:"slick-range-decorator",selectionCss:{zIndex:"9999",border:"2px dashed red"},offset:{top:-1,left:-1,height:-2,width:-2}},i),e.extend(this,{pluginName:"CellRangeDecorator",show:function(o){n||(n=e("<div></div>",{css:i.selectionCss}).addClass(i.selectionCssClass).css("position","absolute").appendTo(t.getActiveCanvasNode()));var s=t.getCellNodeBox(o.fromRow,o.fromCell),r=t.getCellNodeBox(o.toRow,o.toCell);return s&&r&&i&&i.offset&&n.css({top:s.top+i.offset.top,left:s.left+i.offset.left,height:r.bottom-s.top+i.offset.height,width:r.right-s.left+i.offset.width}),n},hide:o,destroy:function(){o()}})}}})}(jQuery)},97:function(){!function(e){e.extend(!0,window,{Slick:{CellRangeSelector:function(t){var i,n,o,s,r,l,a,d,u,c,h,p=this,m=new Slick.EventHandler,f={selectionCss:{border:"2px dashed blue"}},g=0,v=0;function _(e,t){g=t.scrollTop,v=t.scrollLeft}function C(t,n){(r=e(i.getActiveCanvasNode(t))).offset(),d=0,u=0,h=r.hasClass("grid-canvas-bottom"),s.frozenRow>-1&&h&&(d=s.frozenBottom?e("."+i.getUID()+" .grid-canvas-bottom").height():e("."+i.getUID()+" .grid-canvas-top").height()),c=r.hasClass("grid-canvas-right"),s.frozenColumn>-1&&c&&(u=e("."+i.getUID()+" .grid-canvas-left").width()),t.stopImmediatePropagation()}function b(t,r){var d=i.getCellFromEvent(t);if(!1!==p.onBeforeCellRangeSelected.notify(d)&&i.canCellBeSelected(d.row,d.cell)&&(l=!0,t.stopImmediatePropagation()),l){i.focus();var u=r.startX-e(o).offset().left;s.frozenColumn>=0&&c&&(u+=v);var m=r.startY-e(o).offset().top;s.frozenRow>=0&&h&&(m+=g);var f=i.getCellFromPoint(u,m);return r.range={start:f,end:{}},n=r.range,a.show(new Slick.Range(f.row,f.cell))}}function y(e,t){if(l){e.stopImmediatePropagation();var n=i.getCellFromPoint(e.pageX-r.offset().left+u,e.pageY-r.offset().top+d);s.frozenColumn>=0&&!c&&n.cell>s.frozenColumn||c&&n.cell<=s.frozenColumn||s.frozenRow>=0&&!h&&n.row>=s.frozenRow||h&&n.row<s.frozenRow||i.canCellBeSelected(n.row,n.cell)&&(t.range.end=n,a.show(new Slick.Range(t.range.start.row,t.range.start.cell,n.row,n.cell)))}}function w(e,t){l&&(l=!1,e.stopImmediatePropagation(),a.hide(),p.onCellRangeSelected.notify({range:new Slick.Range(t.range.start.row,t.range.start.cell,t.range.end.row,t.range.end.cell)}))}e.extend(this,{init:function(n){t=e.extend(!0,{},f,t),a=t.cellDecorator||new Slick.CellRangeDecorator(n,t),o=(i=n).getCanvasNode(),s=i.getOptions(),m.subscribe(i.onScroll,_).subscribe(i.onDragInit,C).subscribe(i.onDragStart,b).subscribe(i.onDrag,y).subscribe(i.onDragEnd,w)},destroy:function(){m.unsubscribeAll(),r=null,o=null,a&&a.destroy&&a.destroy()},pluginName:"CellRangeSelector",getCellDecorator:function(){return a},getCurrentRange:function(){return n},onBeforeCellRangeSelected:new Slick.Event,onCellRangeSelected:new Slick.Event})}}})}(jQuery)},638:function(){!function(e){e.extend(!0,window,{Slick:{CellSelectionModel:function(t){var i,n,o,s=[],r=this;n=void 0===t||void 0===t.cellRangeSelector?new Slick.CellRangeSelector({selectionCss:{border:"2px solid black"}}):t.cellRangeSelector;var l={selectActiveCell:!0};function a(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];i.canCellBeSelected(o.fromRow,o.fromCell)&&i.canCellBeSelected(o.toRow,o.toCell)&&t.push(o)}return t}function d(e){if(s&&0!==s.length||e&&0!==e.length){var t=!function(e,t){var i=e.length!==t.length;if(!i)for(var n=0;n<e.length;n++)if(e[n].fromCell!==t[n].fromCell||e[n].fromRow!==t[n].fromRow||e[n].toCell!==t[n].toCell||e[n].toRow!==t[n].toRow){i=!0;break}return!i}(s,e);s=a(e),t&&r.onSelectedRangesChanged.notify(s)}}function u(){return s}function c(e,t){if(i.getEditorLock().isActive())return e.stopPropagation(),!1}function h(e,t){i.setActiveCell(t.range.fromRow,t.range.fromCell,!1,!1,!0),d([t.range])}function p(e,t){o.selectActiveCell&&null!=t.row&&null!=t.cell?d([new Slick.Range(t.row,t.cell)]):o.selectActiveCell||d([])}function m(e){var t,n,o=i.getActiveCell(),s=e.ctrlKey||e.metaKey;if(o&&e.shiftKey&&!s&&!e.altKey&&(37==e.which||39==e.which||38==e.which||40==e.which)){(t=u().slice()).length||t.push(new Slick.Range(o.row,o.cell)),(n=t.pop()).contains(o.row,o.cell)||(n=new Slick.Range(o.row,o.cell));var r=n.toRow-n.fromRow,l=n.toCell-n.fromCell,c=o.row==n.fromRow?1:-1,h=o.cell==n.fromCell?1:-1;37==e.which?l-=h:39==e.which?l+=h:38==e.which?r-=c:40==e.which&&(r+=c);var p=new Slick.Range(o.row,o.cell,o.row+c*r,o.cell+h*l);if(a([p]).length){t.push(p);var m=c>0?p.toRow:p.fromRow,f=h>0?p.toCell:p.fromCell;i.scrollRowIntoView(m),i.scrollCellIntoView(m,f)}else t.push(n);d(t),e.preventDefault(),e.stopPropagation()}}e.extend(this,{getSelectedRanges:u,setSelectedRanges:d,init:function(s){o=e.extend(!0,{},l,t),(i=s).getCanvasNode(),i.onActiveCellChanged.subscribe(p),i.onKeyDown.subscribe(m),s.registerPlugin(n),n.onCellRangeSelected.subscribe(h),n.onBeforeCellRangeSelected.subscribe(c)},destroy:function(){i.onActiveCellChanged.unsubscribe(p),i.onKeyDown.unsubscribe(m),n.onCellRangeSelected.unsubscribe(h),n.onBeforeCellRangeSelected.unsubscribe(c),i.unregisterPlugin(n),n&&n.destroy&&n.destroy()},pluginName:"CellSelectionModel",onSelectedRangesChanged:new Slick.Event})}}})}(jQuery)},780:function(){!function(e){e.extend(!0,window,{Slick:{CheckboxSelectColumn:function(t){var i,n=null,o=v(),s=new Slick.EventHandler,r={},l=!1,a=e.extend(!0,{},{columnId:"_checkbox_selector",cssClass:null,hideSelectAllCheckbox:!1,toolTip:"Select/Deselect All",width:30,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},t);function d(){i.updateColumnHeader(a.columnId,"","")}function u(){e("#filter-checkbox-selectall-container").hide()}function c(t,s){var d,u,c,h=i.getSelectedRows(),p={},m=0;if("function"==typeof n)for(c=0;c<i.getDataLength();c++)C(u,i.getDataItem(c),i)||m++;var f=[];for(u=0;u<h.length;u++)d=h[u],C(u,i.getDataItem(d),i)?(p[d]=!0,p[d]!==r[d]&&(i.invalidateRow(d),delete r[d])):f.push(d);for(u in r)i.invalidateRow(u);if(r=p,i.render(),l=h.length&&h.length+m>=i.getDataLength(),a.hideInColumnTitleRow||a.hideSelectAllCheckbox||b(l),a.hideInFilterHeaderRow||e("#header-filter-selector"+o).prop("checked",l),f.length>0){for(u=0;u<f.length;u++){var g=h.indexOf(f[u]);h.splice(g,1)}i.setSelectedRows(h)}}function h(e,t){32==e.which&&i.getColumns()[t.cell].id===a.columnId&&(i.getEditorLock().isActive()&&!i.getEditorLock().commitCurrentEdit()||m(t.row),e.preventDefault(),e.stopImmediatePropagation())}function p(t,n){if(i.getColumns()[n.cell].id===a.columnId&&e(t.target).is(":checkbox")){if(i.getEditorLock().isActive()&&!i.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();m(n.row),t.stopPropagation(),t.stopImmediatePropagation()}}function m(t){var n=i.getDataItem(t);C(t,n,i)&&(r[t]?i.setSelectedRows(e.grep(i.getSelectedRows(),(function(e){return e!=t}))):i.setSelectedRows(i.getSelectedRows().concat(t)),i.setActiveCell(t,function(){if(null===g){g=0;for(var e=i.getColumns(),t=0;t<e.length;t++)e[t].id==a.columnId&&(g=t)}return g}()))}function f(t,n){if(n.column.id==a.columnId&&e(t.target).is(":checkbox")){if(i.getEditorLock().isActive()&&!i.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();if(e(t.target).is(":checked")){for(var o=[],s=0;s<i.getDataLength();s++){var r=i.getDataItem(s);r.__group||r.__groupTotals||!C(s,r,i)||o.push(s)}i.setSelectedRows(o)}else i.setSelectedRows([]);t.stopPropagation(),t.stopImmediatePropagation()}}"function"==typeof a.selectableOverride&&y(a.selectableOverride);var g=null;function v(){return Math.round(1e7*Math.random())}function _(e,t,i,n,o,s){var l=v()+e;return o&&C(e,o,s)?r[e]?"<input id='selector"+l+"' type='checkbox' checked='checked'><label for='selector"+l+"'></label>":"<input id='selector"+l+"' type='checkbox'><label for='selector"+l+"'></label>":null}function C(e,t,i){return"function"!=typeof n||n(e,t,i)}function b(e){e?i.updateColumnHeader(a.columnId,"<input id='header-selector"+o+"' type='checkbox' checked='checked'><label for='header-selector"+o+"'></label>",a.toolTip):i.updateColumnHeader(a.columnId,"<input id='header-selector"+o+"' type='checkbox'><label for='header-selector"+o+"'></label>",a.toolTip)}function y(e){n=e}e.extend(this,{init:function(t){i=t,s.subscribe(i.onSelectedRowsChanged,c).subscribe(i.onClick,p).subscribe(i.onKeyDown,h),a.hideInFilterHeaderRow||function(t){s.subscribe(t.onHeaderRowCellRendered,(function(t,i){"sel"===i.column.field&&(e(i.node).empty(),e("<span id='filter-checkbox-selectall-container'><input id='header-filter-selector"+o+"' type='checkbox'><label for='header-filter-selector"+o+"'></label></span>").appendTo(i.node).on("click",(function(e){f(e,i)})))}))}(t),a.hideInColumnTitleRow||s.subscribe(i.onHeaderClick,f)},destroy:function(){s.unsubscribeAll()},pluginName:"CheckboxSelectColumn",deSelectRows:function(t){var n,o=t.length,s=[];for(n=0;n<o;n++)r[t[n]]&&(s[s.length]=t[n]);i.setSelectedRows(e.grep(i.getSelectedRows(),(function(e){return s.indexOf(e)<0})))},selectRows:function(e){var t,n=e.length,o=[];for(t=0;t<n;t++)r[e[t]]||(o[o.length]=e[t]);i.setSelectedRows(i.getSelectedRows().concat(o))},getColumnDefinition:function(){return{id:a.columnId,name:a.hideSelectAllCheckbox||a.hideInColumnTitleRow?"":"<input id='header-selector"+o+"' type='checkbox'><label for='header-selector"+o+"'></label>",toolTip:a.hideSelectAllCheckbox||a.hideInColumnTitleRow?"":a.toolTip,field:"sel",width:a.width,resizable:!1,sortable:!1,cssClass:a.cssClass,hideSelectAllCheckbox:a.hideSelectAllCheckbox,formatter:_}},getOptions:function(){return a},selectableOverride:y,setOptions:function(t){if((a=e.extend(!0,{},a,t)).hideSelectAllCheckbox)d(),u();else if(a.hideInColumnTitleRow?d():(b(l),s.subscribe(i.onHeaderClick,f)),a.hideInFilterHeaderRow)u();else{var n=e("#filter-checkbox-selectall-container");n.show(),n.find('input[type="checkbox"]').prop("checked",l)}}})}}})}(jQuery)},368:function(){!function(e){e.extend(!0,window,{Slick:{Plugins:{ContextMenu:function(t){var i,n,o,s,r=-1,l=-1,a="",d=new Slick.EventHandler,u=this,c={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:-4,autoAlignSideOffset:0,hideMenuOnScroll:!1,maxHeight:"none",width:"auto",optionShownOverColumnIds:[],commandShownOverColumnIds:[]};function h(e){e.isDefaultPrevented()||p(e)}function p(t,i){if((s=s||e(".slick-context-menu."+a))&&s.length>0){if(0==u.onBeforeMenuClose.notify({cell:i&&i.cell,row:i&&i.row,grid:n,menu:s},t,u))return;s&&s.remove&&(s.remove(),s=null)}}function m(e,t){var i=!1;if(e&&e.length>0)for(var n=0,o=e.length;n<o;n++)e[n]===t&&(i=!0);else i=!0;return i}function f(t,d){t.preventDefault();var c=n.getCellFromEvent(t),f=n.getColumns()[c.cell],C=n.getDataItem(c.row);d||(d={}),d.cell=c.cell,d.row=c.row,d.columnDef=f,d.dataContext=C,d.grid=n,_(i.menuUsabilityOverride,d)&&((s=function(t){var o=n.getCellFromEvent(t);r=o&&o.cell,l=o&&o.row;var s=n.getColumns()[r],d=n.getDataItem(l),c=m(i.optionShownOverColumnIds,s.id),f=m(i.commandShownOverColumnIds,s.id),C=i.commandItems||[],b=i.optionItems||[];if(s&&(f||c)&&(C.length||b.length)&&(p(t),0!=u.onBeforeMenuShow.notify({cell:r,row:l,grid:n},t,u))){var y=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",w=isNaN(i.width)?i.width:i.width+"px",S=e('<div class="slick-context-menu '+a+'" style="width: '+w+"; max-height: "+y+'" />').css("top",t.pageY).css("left",t.pageX).css("display","none"),E='<button type="button" class="close" data-dismiss="slick-context-menu" aria-label="Close"><span class="close" aria-hidden="true">&times;</span></button>';if(!i.hideOptionSection&&c&&b.length>0){var T=e('<div class="slick-context-menu-option-list" />');i.hideCloseButton||e(E).on("click",h).appendTo(S),T.appendTo(S),function(t,i,n,o){if(o&&n&&t){t&&t.optionTitle&&e('<div class="title"/>').append(t.optionTitle).appendTo(i);for(var s=0,r=n.length;s<r;s++){var l=n[s],a=_(l.itemVisibilityOverride,o),d=_(l.itemUsabilityOverride,o);if(a){Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!d);var u=e('<div class="slick-context-menu-item"></div>').data("option",void 0!==l.option?l.option:"").data("item",l).on("click",v).appendTo(i);if(l.divider||"divider"===l)u.addClass("slick-context-menu-item-divider");else{!l.disabled&&d||u.addClass("slick-context-menu-item-disabled"),l.hidden&&u.addClass("slick-context-menu-item-hidden"),l.cssClass&&u.addClass(l.cssClass),l.tooltip&&u.attr("title",l.tooltip);var c=e('<div class="slick-context-menu-icon"></div>').appendTo(u);l.iconCssClass&&c.addClass(l.iconCssClass),l.iconImage&&c.css("background-image","url("+l.iconImage+")");var h=e('<span class="slick-context-menu-content"></span>').text(l.title).appendTo(u);l.textCssClass&&h.addClass(l.textCssClass)}}}}}(i,T,b,{cell:r,row:l,column:s,dataContext:d,grid:n})}if(!i.hideCommandSection&&f&&C.length>0){var x=e('<div class="slick-context-menu-command-list" />');i.hideCloseButton||c&&0!==b.length&&!i.hideOptionSection||e(E).on("click",h).appendTo(S),x.appendTo(S),function(t,i,n,o){if(o&&n&&t){t&&t.commandTitle&&e('<div class="title"/>').append(t.commandTitle).appendTo(i);for(var s=0,r=n.length;s<r;s++){var l=n[s],a=_(l.itemVisibilityOverride,o),d=_(l.itemUsabilityOverride,o);if(a){Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!d);var u=e('<div class="slick-context-menu-item"></div>').data("command",void 0!==l.command?l.command:"").data("item",l).on("click",g).appendTo(i);if(l.divider||"divider"===l)u.addClass("slick-context-menu-item-divider");else{!l.disabled&&d||u.addClass("slick-context-menu-item-disabled"),l.hidden&&u.addClass("slick-context-menu-item-hidden"),l.cssClass&&u.addClass(l.cssClass),l.tooltip&&u.attr("title",l.tooltip);var c=e('<div class="slick-context-menu-icon"></div>').appendTo(u);l.iconCssClass&&c.addClass(l.iconCssClass),l.iconImage&&c.css("background-image","url("+l.iconImage+")");var h=e('<span class="slick-context-menu-content"></span>').text(l.title).appendTo(u);l.textCssClass&&h.addClass(l.textCssClass)}}}}}(i,x,C,{cell:r,row:l,column:s,dataContext:d,grid:n})}if(S.show(),S.appendTo("body"),0!=u.onAfterMenuShow.notify({cell:r,row:l,grid:n},t,u))return S}}(t))&&(function(t){var r,l,a,d=e(t.target).closest(".slick-cell"),u=t.pageX,c=d?d.offset().top:t.pageY,h=s.outerHeight()||0,p=s.outerWidth()||i.width||0,m=o.rowHeight,f=i.autoAdjustDropOffset,g=i.autoAlignSideOffset;if(i.autoAdjustDrop){var v=(r=d,l=e(window).innerHeight()||0,a=e(window).scrollTop()||0,r&&r.offset&&r.length>0?l-(r.offset().top-a):0),_=function(t){var i=e(window).scrollTop()||0;return t&&t.offset&&t.length>0?t.offset().top-i:0}(d),C=v+f-m;"top"==(C<h&&_-f+m>C?"top":"bottom")?(s.removeClass("dropdown").addClass("dropup"),c=c-h-f):(s.removeClass("dropup").addClass("dropdown"),c=c+m+f)}i.autoAlignSide&&("left"==(u+p>=n.getGridPosition().width?"left":"right")?(s.removeClass("dropright").addClass("dropleft"),u=u-p-g):(s.removeClass("dropleft").addClass("dropright"),u+=g)),s.css("top",c),s.css("left",u)}(t),s.data("cell",r).data("row",l).show()),e("body").one("click",(function(e){e.isDefaultPrevented()||p(e,{cell:r,row:l})})))}function g(t){var i=e(this).data("command"),o=e(this).data("item");if(o&&!o.disabled&&!o.divider){var r,l=s.data("row"),a=s.data("cell"),d=n.getColumns()[a],c=n.getDataItem(l);if(Object.prototype.hasOwnProperty.call(c,d&&d.field)&&(r=c[d.field]),null!=i&&""!==i){var h={cell:a,row:l,grid:n,command:i,item:o,column:d,dataContext:c,value:r};u.onCommand.notify(h,t,u),"function"==typeof o.action&&o.action.call(this,t,h)}}}function v(t){var i=e(this).data("option"),o=e(this).data("item");if(!o.disabled&&!o.divider&&n.getEditorLock().commitCurrentEdit()){var r=s.data("row"),l=s.data("cell"),a=n.getColumns()[l],d=n.getDataItem(r);if(void 0!==i){var c={cell:l,row:r,grid:n,option:i,item:o,column:a,dataContext:d};u.onOptionSelected.notify(c,t,u),"function"==typeof o.action&&o.action.call(this,t,c)}}}function _(e,t){return"function"!=typeof e||e.call(this,t)}e.extend(this,{init:function(s){n=s,o=s.getOptions(),i=e.extend({},c,t),a=s&&s.getUID?s.getUID():"",d.subscribe(n.onContextMenu,f),i.hideMenuOnScroll&&d.subscribe(n.onScroll,p)},closeMenu:p,destroy:function(){u.onAfterMenuShow.unsubscribe(),u.onBeforeMenuShow.unsubscribe(),u.onBeforeMenuClose.unsubscribe(),u.onCommand.unsubscribe(),u.onOptionSelected.unsubscribe(),d.unsubscribeAll(),s&&s.remove&&s.remove(),s=null},pluginName:"ContextMenu",setOptions:function(t){i=e.extend({},i,t),t.commandShownOverColumnIds&&(i.commandShownOverColumnIds=t.commandShownOverColumnIds),t.optionShownOverColumnIds&&(i.optionShownOverColumnIds=t.optionShownOverColumnIds)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onBeforeMenuClose:new Slick.Event,onCommand:new Slick.Event,onOptionSelected:new Slick.Event})}}}})}(jQuery)},544:function(){!function(e){e.extend(!0,window,{Slick:{DraggableGrouping:function(t){var i,n,o,s,r,l,a,d={},u=new Slick.Event,c=new Slick.EventHandler,h=[];function p(i,s){var r=s.attr("id").replace(n,""),d=!0;h.forEach((function(e,t,i){e.id==r&&(d=!1)})),d&&(o.forEach((function(a,d,u){if(a.id==r&&null!=a.grouping&&!e.isEmptyObject(a.grouping)){var c=e("<div id='"+n+a.id+"_entry' data-id='"+a.id+"' class='slick-dropped-grouping'>"),p=s.children(".slick-column-name").first();e("<div style='display: inline-flex'>"+(p.length?p.text():s.text())+"</div>").appendTo(c);var f=e("<div class='slick-groupby-remove'>&nbsp;</div>");t.deleteIconCssClass&&f.addClass(t.deleteIconCssClass),t.deleteIconImage&&f.css("background","url("+t.deleteIconImage+") no-repeat center right"),t.deleteIconCssClass||t.deleteIconImage||f.addClass("slick-groupby-remove-image"),f.appendTo(c),e("</div>").appendTo(c),c.appendTo(i),function(e){h.push(e),m("add-group")}(a),function(t,i,s,r){var a=r;e("#"+n+t+"_entry >.slick-groupby-remove").on("click",(function(){e(this).off("click"),function(e,t,i){i.remove();var n=[];o.forEach((function(e,t,i){n[e.id]=e})),function(e){for(var t,i,n=arguments,o=n.length;o>1&&e.length;)for(t=n[--o];-1!=(i=e.indexOf(t));)e.splice(i,1)}(h,n[e]),0===h.length&&l.show(),m("remove-group")}(t,0,a)}))}(a.id,0,0,c)}})),a.css("display","block"))}function m(e){if(0===h.length)return s.setGrouping([]),void u.notify({caller:e,groupColumns:[]});var t=[];h.forEach((function(e,i,n){t.push(e.grouping)})),s.setGrouping(t),u.notify({caller:e,groupColumns:t})}e.extend(this,{init:function(u){t=e.extend(!0,{},d,t),n=(i=u).getUID(),o=i.getColumns(),s=i.getData(),r=e(i.getPreHeaderPanel());var f=t.dropPlaceHolderText||"Drop a column header here to group by the column";r.html("<div class='slick-placeholder'>"+f+"</div><div class='slick-group-toggle-all expanded' style='display:none'></div>"),l=r.find(".slick-placeholder"),a=r.find(".slick-group-toggle-all"),r.droppable({activeClass:"ui-state-default",hoverClass:"ui-state-hover",accept:":not(.ui-sortable-helper)",deactivate:function(e,t){r.removeClass("slick-header-column-denied")},drop:function(e,t){p(this,t.draggable)},over:function(e,t){var i=t.draggable.attr("id").replace(n,"");o.forEach((function(e,t,n){e.id==i&&null==e.grouping&&r.addClass("slick-header-column-denied")}))}}),r.sortable({items:"div.slick-dropped-grouping",cursor:"default",tolerance:"pointer",helper:"clone",update:function(t,i){for(var n=e(this).sortable("toArray",{attribute:"data-id"}),o=[],s=0,r=n.length;s<r;s++)for(var l=0,a=h.length;l<a;l++)if(h[l].id==n[s]){o.push(h[l]);break}h=o,m("sort-group")}}),r.html(),a.on("click",(function(e){this.classList.contains("collapsed")?(this.classList.remove("collapsed"),this.classList.add("expanded"),s.expandAllGroups()):(this.classList.add("collapsed"),this.classList.remove("expanded"),s.collapseAllGroups())})),c.subscribe(i.onHeaderCellRendered,(function(i,n){var o=n.column,s=n.node;if(!e.isEmptyObject(o.grouping)){var r=e("<span class='slick-column-groupable' />");t.groupIconCssClass&&r.addClass(t.groupIconCssClass),t.groupIconImage&&r.css("background","url("+t.groupIconImage+") no-repeat center center"),e(s).css("cursor","pointer").append(r)}}));for(var g=0;g<o.length;g++){var v=o[g].field;i.updateColumnHeader(v)}},destroy:function(){u.unsubscribe(),c.unsubscribeAll()},pluginName:"DraggableGrouping",onGroupChanged:u,setDroppedGroups:function(t){var n=t instanceof Array?t:[t];l.hide();for(var o=0;o<n.length;o++){var s=e(i.getHeaderColumn(n[o]));p(r,s)}},clearDroppedGroups:function(){h=[],m("clear-all"),r.find(".slick-dropped-grouping").remove(),a.css("display","none"),l.show()},getSetupColumnReorder:function(t,i,n,o,s,r,l,a,d){i.filter(":ui-sortable").sortable("destroy");var u=e(t.getPreHeaderPanel());i.sortable({distance:3,cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"slick-sortable-placeholder ui-state-default slick-header-column",forcePlaceholderSize:!0,appendTo:"body",start:function(t,i){e(i.helper).addClass("slick-header-column-active"),u.find(".slick-placeholder").show(),u.find(".slick-dropped-grouping").hide()},beforeStop:function(t,i){e(i.helper).removeClass("slick-header-column-active"),u.find(".slick-dropped-grouping").length>0&&(u.find(".slick-placeholder").hide(),u.find(".slick-dropped-grouping").show())},stop:function(n){if(t.getEditorLock().commitCurrentEdit()){var u=i.sortable("toArray");if(i.length>1)for(var c=1,h=i.length;c<h;c+=1)for(var p=e(i[c]).sortable("toArray"),m=0,f=p.length;m<f;m+=1)u.push(p[m]);for(var g=[],v=0;v<u.length;v++)g.push(r[l(u[v].replace(a,""))]);o(g),d(t.onColumnsReordered,{grid:t}),n.stopPropagation(),s()}else e(this).sortable("cancel")}})}})}}})}(jQuery)},25:function(){!function(e){e.extend(!0,window,{Slick:{Plugins:{HeaderButtons:function(t){var i,n=this,o=new Slick.EventHandler,s={buttonCssClass:"slick-header-button"};function r(i,n){var o=n.column;if(o.header&&o.header.buttons)for(var s=o.header.buttons.length;s--;){var r=o.header.buttons[s],l=d(r.itemVisibilityOverride,n),u=d(r.itemUsabilityOverride,n);if(l){Object.prototype.hasOwnProperty.call(r,"itemUsabilityOverride")&&(r.disabled=!u);var c=e("<div></div>").addClass(t.buttonCssClass).data("column",o).data("button",r);r.disabled&&c.addClass("slick-header-button-disabled"),r.showOnHover&&c.addClass("slick-header-button-hidden"),r.image&&c.css("backgroundImage","url("+r.image+")"),r.cssClass&&c.addClass(r.cssClass),r.tooltip&&c.attr("title",r.tooltip),r.command&&c.data("command",r.command),r.handler&&c.on("click",r.handler),c.on("click",a).appendTo(n.node)}}}function l(i,n){var o=n.column;o.header&&o.header.buttons&&e(n.node).find("."+t.buttonCssClass).remove()}function a(t){var o=e(this).data("command"),s=e(this).data("column"),r=e(this).data("button"),l={grid:i,column:s,button:r};null!=o&&(l.command=o),"function"==typeof r.action&&r.action.call(this,t,l),null==o||r.disabled||(n.onCommand.notify(l,t,n),i.updateColumnHeader(s.id)),t.preventDefault(),t.stopPropagation()}function d(e,t){return"function"!=typeof e||e.call(this,t)}e.extend(this,{init:function(n){t=e.extend(!0,{},s,t),i=n,o.subscribe(i.onHeaderCellRendered,r).subscribe(i.onBeforeHeaderCellDestroy,l),i.setColumns(i.getColumns())},destroy:function(){o.unsubscribeAll()},pluginName:"HeaderButtons",onCommand:new Slick.Event})}}}})}(jQuery)},681:function(){!function(e){e.extend(!0,window,{Slick:{Plugins:{HeaderMenu:function(t){var i,n,o,s=this,r=new Slick.EventHandler,l={buttonCssClass:null,buttonImage:null,minWidth:100,autoAlign:!0,autoAlignOffset:0};function a(t){n&&n[0]!=t.target&&!e.contains(n[0],t.target)&&d()}function d(){n&&(n.remove(),n=null,o.removeClass("slick-header-column-active"))}function u(i,n){var o=n.column,s=o.header&&o.header.menu;if(s){if(!m(t.menuUsabilityOverride,n))return;var r=e("<div></div>").addClass("slick-header-menubutton").data("column",o).data("menu",s);t.buttonCssClass&&r.addClass(t.buttonCssClass),t.buttonImage&&r.css("background-image","url("+t.buttonImage+")"),t.tooltip&&r.attr("title",t.tooltip),r.on("click",h).appendTo(n.node),r=null}}function c(t,i){var n=i.column;n.header&&n.header.menu&&e(i.node).find(".slick-header-menubutton").remove()}function h(r){var l=e(this),a=l.data("menu"),d=l.data("column"),u={grid:i,column:d,menu:a};if(0!=s.onBeforeMenuShow.notify(u,r,s)){n||(n=e("<div class='slick-header-menu' style='min-width: "+t.minWidth+"px'></div>").appendTo(i.getContainerNode())),n.empty();for(var c=0;c<a.items.length;c++){var h=a.items[c],f=m(h.itemVisibilityOverride,u),g=m(h.itemUsabilityOverride,u);if(f){Object.prototype.hasOwnProperty.call(h,"itemUsabilityOverride")&&(h.disabled=!g);var v=e("<div class='slick-header-menuitem'></div>").data("command",void 0!==h.command?h.command:"").data("column",d).data("item",h).on("click",p).appendTo(n);if(h.divider||"divider"===h)v.addClass("slick-header-menuitem-divider");else{h.disabled&&v.addClass("slick-header-menuitem-disabled"),h.hidden&&v.addClass("slick-header-menuitem-hidden"),h.cssClass&&v.addClass(h.cssClass),h.tooltip&&v.attr("title",h.tooltip);var _=e("<div class='slick-header-menuicon'></div>").appendTo(v);h.iconCssClass&&_.addClass(h.iconCssClass),h.iconImage&&_.css("background-image","url("+h.iconImage+")");var C=e("<span class='slick-header-menucontent'></span>").text(h.title).appendTo(v);h.textCssClass&&C.addClass(h.textCssClass),_=null,C=null,v=null}}}var b=e(this).offset().left;if(t.autoAlign){var y=i.getGridPosition();b+n.width()>=y.width&&(b=b+l.outerWidth()-n.outerWidth()+t.autoAlignOffset)}n.offset({top:e(this).offset().top+e(this).height(),left:b}),(o=l.closest(".slick-header-column")).addClass("slick-header-column-active"),0!=s.onAfterMenuShow.notify(u,r,s)&&(r.preventDefault(),r.stopPropagation(),l=null)}}function p(t){var n=e(this).data("command"),o=e(this).data("column"),r=e(this).data("item");if(!r.disabled&&!r.divider&&"divider"!==r){if(null!=n&&""!==n){var l={grid:i,column:o,command:n,item:r};s.onCommand.notify(l,t,s),"function"==typeof r.action&&r.action.call(this,t,l)}t.isDefaultPrevented()||d(),t.preventDefault(),t.stopPropagation()}}function m(e,t){return"function"!=typeof e||e.call(this,t)}e.extend(this,{init:function(n){t=e.extend(!0,{},l,t),i=n,r.subscribe(i.onHeaderCellRendered,u).subscribe(i.onBeforeHeaderCellDestroy,c),i.setColumns(i.getColumns()),e(document.body).on("mousedown",a)},destroy:function(){r.unsubscribeAll(),e(document.body).off("mousedown",a),n&&n.remove(),n=null,o=null,n=null},pluginName:"HeaderMenu",setOptions:function(i){t=e.extend(!0,{},t,i)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onCommand:new Slick.Event})}}}})}(jQuery)},378:function(){!function(e){e.extend(!0,window,{Slick:{RowMoveManager:function(t){var i,n,o,s=this,r=null,l=new Slick.EventHandler,a={columnId:"_move",cssClass:null,cancelEditOnDrag:!1,disableRowSelection:!1,hideRowMoveShadow:!0,rowMoveShadowMarginTop:0,rowMoveShadowMarginLeft:0,rowMoveShadowOpacity:.95,rowMoveShadowScale:.75,singleRowMove:!1,width:40};function d(e){e.stopImmediatePropagation()}function u(s,r){var l=i.getCellFromEvent(s),a=l&&l.row;if(m(a,i.getDataItem(a),i)){if(t.cancelEditOnDrag&&i.getEditorLock().isActive()&&i.getEditorLock().cancelCurrentEdit(),i.getEditorLock().isActive()||!/move|selectAndMove/.test(i.getColumns()[l.cell].behavior))return!1;if(o=!0,s.stopImmediatePropagation(),!t.hideRowMoveShadow){var d=e(i.getCellNode(l.row,l.cell)).closest(".slick-row");d&&(r.clonedSlickRow=d.clone(),r.clonedSlickRow.addClass("slick-reorder-shadow-row").css("marginTop",t.rowMoveShadowMarginTop||0).css("marginLeft",t.rowMoveShadowMarginLeft||0).css("opacity",t.rowMoveShadowOpacity||.95).css("transform","scale("+t.rowMoveShadowScale+")").hide().appendTo(n))}var u=t.singleRowMove?[l.row]:i.getSelectedRows();0!==u.length&&-1!=e.inArray(l.row,u)||(u=[l.row],t.disableRowSelection||i.setSelectedRows(u));var c=i.getOptions().rowHeight;r.selectedRows=u,r.selectionProxy=e("<div class='slick-reorder-proxy'/>").css("position","absolute").css("zIndex","99999").css("width",e(n).innerWidth()).css("height",c*u.length).hide().appendTo(n),r.guide=e("<div class='slick-reorder-guide'/>").css("position","absolute").css("zIndex","99998").css("width",e(n).innerWidth()).css("top",-1e3).appendTo(n),r.insertBefore=-1}}function c(t,l){if(o){t.stopImmediatePropagation();var a=t.pageY-e(n).offset().top;if(l.selectionProxy.css("top",a-5).show(),l.clonedSlickRow){var d=t.pageY-e(n).offset().top;l.clonedSlickRow.css("top",d-6).show()}var u=Math.max(0,Math.min(Math.round(a/i.getOptions().rowHeight),i.getDataLength()));if(u!==l.insertBefore){var c={grid:i,rows:l.selectedRows,insertBefore:u};if(!1===s.onBeforeMoveRows.notify(c)?l.canMove=!1:l.canMove=!0,r&&l.canMove){var h=i.getDataItem(u);l.canMove=m(u,h,i)}l.canMove?l.guide.css("top",u*i.getOptions().rowHeight):l.guide.css("top",-1e3),l.insertBefore=u}}}function h(e,t){if(o&&(o=!1,e.stopImmediatePropagation(),t.guide.remove(),t.selectionProxy.remove(),t.clonedSlickRow&&(t.clonedSlickRow.remove(),t.clonedSlickRow=null),t.canMove)){var n={grid:i,rows:t.selectedRows,insertBefore:t.insertBefore};s.onMoveRows.notify(n)}}function p(e,t,i,n,o,s){return m(e,o,s)?{addClasses:"cell-reorder dnd",text:""}:null}function m(e,t,i){return"function"!=typeof r||r(e,t,i)}function f(e){r=e}t&&"function"==typeof t.usabilityOverride&&f(t.usabilityOverride),e.extend(this,{onBeforeMoveRows:new Slick.Event,onMoveRows:new Slick.Event,init:function(o){t=e.extend(!0,{},a,t),n=(i=o).getCanvasNode(),l.subscribe(i.onDragInit,d).subscribe(i.onDragStart,u).subscribe(i.onDrag,c).subscribe(i.onDragEnd,h)},destroy:function(){l.unsubscribeAll()},getColumnDefinition:function(){return{id:t.columnId||"_move",name:"",field:"move",width:t.width||40,behavior:"selectAndMove",selectable:!1,resizable:!1,cssClass:t.cssClass,formatter:p}},setOptions:function(i){t=e.extend({},t,i)},usabilityOverride:f,pluginName:"RowMoveManager"})}}})}(jQuery)},339:function(){!function(e){e.extend(!0,window,{Slick:{RowSelectionModel:function(t){var i,n,o,s=[],r=this,l=new Slick.EventHandler,a={selectActiveRow:!0};function d(e){return function(){n||(n=!0,e.apply(this,arguments),n=!1)}}function u(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i].fromRow;n<=e[i].toRow;n++)t.push(n);return t}function c(e){for(var t=[],n=i.getColumns().length-1,o=0;o<e.length;o++)t.push(new Slick.Range(e[o],0,e[o],n));return t}function h(){return u(s)}function p(e){(s&&0!==s.length||e&&0!==e.length)&&(s=e,r.onSelectedRangesChanged.notify(s))}function m(e,t){o.selectActiveRow&&null!=t.row&&p([new Slick.Range(t.row,0,t.row,i.getColumns().length-1)])}function f(e){var t=i.getActiveCell();if(i.getOptions().multiSelect&&t&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.which==Slick.keyCode.UP||e.which==Slick.keyCode.DOWN)){var n=h();n.sort((function(e,t){return e-t})),n.length||(n=[t.row]);var o,s=n[0],r=n[n.length-1];(o=e.which==Slick.keyCode.DOWN?t.row<r||s==r?++r:++s:t.row<r?--r:--s)>=0&&o<i.getDataLength()&&(i.scrollRowIntoView(o),p(c(function(e,t){var i,n=[];for(i=e;i<=t;i++)n.push(i);for(i=t;i<e;i++)n.push(i);return n}(s,r)))),e.preventDefault(),e.stopPropagation()}}function g(t){var n=i.getCellFromEvent(t);if(!n||!i.canCellBeActive(n.row,n.cell))return!1;if(!i.getOptions().multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;var o=u(s),r=e.inArray(n.row,o);if(-1===r&&(t.ctrlKey||t.metaKey))o.push(n.row),i.setActiveCell(n.row,n.cell);else if(-1!==r&&(t.ctrlKey||t.metaKey))o=e.grep(o,(function(e,t){return e!==n.row})),i.setActiveCell(n.row,n.cell);else if(o.length&&t.shiftKey){var l=o.pop(),a=Math.min(n.row,l),d=Math.max(n.row,l);o=[];for(var h=a;h<=d;h++)h!==l&&o.push(h);o.push(l),i.setActiveCell(n.row,n.cell)}return p(c(o)),t.stopImmediatePropagation(),!0}e.extend(this,{getSelectedRows:h,setSelectedRows:function(e){p(c(e))},getSelectedRanges:function(){return s},setSelectedRanges:p,init:function(n){o=e.extend(!0,{},a,t),i=n,l.subscribe(i.onActiveCellChanged,d(m)),l.subscribe(i.onKeyDown,d(f)),l.subscribe(i.onClick,d(g))},destroy:function(){l.unsubscribeAll()},pluginName:"RowSelectionModel",onSelectedRangesChanged:new Slick.Event})}}})}(jQuery)},942:function(){!function(e){function t(){var e=!1,t=!1;this.stopPropagation=function(){e=!0},this.isPropagationStopped=function(){return e},this.stopImmediatePropagation=function(){t=!0},this.isImmediatePropagationStopped=function(){return t}}function i(){this.__nonDataRow=!0}function n(){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}function o(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function s(){var e=null;this.isActive=function(t){return t?e===t:null!==e},this.activate=function(t){if(t!==e){if(null!==e)throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");if(!t.commitCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!t.cancelCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");e=t}},this.deactivate=function(t){if(e){if(e!==t)throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");e=null}},this.commitCurrentEdit=function(){return!e||e.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!e||e.cancelCurrentEdit()}}n.prototype=new i,n.prototype.equals=function(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title},o.prototype=new i;var r="Map"in window?window.Map:function(){var e={};this.get=function(t){return e[t]},this.set=function(t,i){e[t]=i},this.has=function(t){return t in e},this.delete=function(t){delete e[t]}};e.extend(!0,window,{Slick:{Event:function(){var e=[];this.subscribe=function(t){e.push(t)},this.unsubscribe=function(t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1)},this.notify=function(i,n,o){var s;n=n||new t,o=o||this;for(var r=0;r<e.length&&!n.isPropagationStopped()&&!n.isImmediatePropagationStopped();r++)s=e[r].call(o,n,i);return s}},EventData:t,EventHandler:function(){var e=[];this.subscribe=function(t,i){return e.push({event:t,handler:i}),t.subscribe(i),this},this.unsubscribe=function(t,i){for(var n=e.length;n--;)if(e[n].event===t&&e[n].handler===i)return e.splice(n,1),void t.unsubscribe(i);return this},this.unsubscribeAll=function(){for(var t=e.length;t--;)e[t].event.unsubscribe(e[t].handler);return e=[],this}},Range:function(e,t,i,n){void 0===i&&void 0===n&&(i=e,n=t),this.fromRow=Math.min(e,i),this.fromCell=Math.min(t,n),this.toRow=Math.max(e,i),this.toCell=Math.max(t,n),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(e,t){return e>=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}},Map:r,NonDataRow:i,Group:n,GroupTotals:o,EditorLock:s,GlobalEditorLock:new s,TreeColumns:function(t){var i={};function n(e,t){return e.filter((function(e){var i=t.call(e);return i&&e.columns&&(e.columns=n(e.columns,t)),i&&(!e.columns||e.columns.length)}))}function o(e,t){e.sort((function(e,i){return s(t.getColumnIndex(e.id))-s(t.getColumnIndex(i.id))})).forEach((function(e){e.columns&&o(e.columns,t)}))}function s(e){return void 0===e?-1:e}function r(e){if(!e.length)return e.columns?1+r(e.columns):1;for(var t in e)return r(e[t])}function l(e,t,i){var n=[];if(t==(i=i||0))return e.length&&e.forEach((function(e){e.columns&&(e.extractColumns=function(){return a(e)})})),e;for(var o in e)e[o].columns&&(n=n.concat(l(e[o].columns,t,i+1)));return n}function a(e){var t=[];if(e.hasOwnProperty("length"))for(var i=0;i<e.length;i++)t=t.concat(a(e[i]));else{if(!e.hasOwnProperty("columns"))return e;t=t.concat(a(e.columns))}return t}function d(){return e.extend(!0,[],t)}(function e(t){t.forEach((function(t){i[t.id]=t,t.columns&&e(t.columns)}))})(t),this.hasDepth=function(){for(var e in t)if(t[e].hasOwnProperty("columns"))return!0;return!1},this.getTreeColumns=function(){return t},this.extractColumns=function(){return this.hasDepth()?a(t):t},this.getDepth=function(){return r(t)},this.getColumnsInDepth=function(e){return l(t,e)},this.getColumnsInGroup=function(e){return a(e)},this.visibleColumns=function(){return n(d(),(function(){return this.visible}))},this.filter=function(e){return n(d(),e)},this.reOrder=function(e){return o(t,e)},this.getById=function(e){return i[e]},this.getInIds=function(e){return e.map((function(e){return i[e]}))}},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",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{CanvasTextSize:"CANV",HTML:"HTML"}}})}(jQuery)},803:function(){!function(e){e.extend(!0,window,{Slick:{Data:{DataView:function(t){var i,n,o,s,r,l=this,a="id",d=[],u=[],c=new Slick.Map,h=null,p=null,m=null,f=!1,g=!1,v=new Slick.Map,_=!0,C={},b={},y=[],w=[],S=null,E={getter:null,formatter:null,comparer:function(e,t){return e.value===t.value?0:e.value>t.value?1:-1},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},T=[],x=[],O=[],k=":|:",D=null,A=0,R=0,I=0,P=new Slick.Event,M=new Slick.Event,F=new Slick.Event,N=new Slick.Event,L=new Slick.Event,$=new Slick.Event,H=new Slick.Event,V=new Slick.Event;function z(e){if(!g)for(var t,i=e=e||0,n=d.length;i<n;i++){if(void 0===(t=d[i][a]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");c.set(t,i)}}function B(){if(!g)for(var e,t=0,i=d.length;t<i;t++)if(void 0===(e=d[t][a])||c.get(e)!==t)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}function W(){var e=A?Math.max(1,Math.ceil(I/A)):1;return{pageSize:A,pageNum:R,totalRows:I,totalPages:e,dataView:l}}function G(e,t){_=t,n=e,i=null,!1===t&&d.reverse(),d.sort(e),!1===t&&d.reverse(),c=new Slick.Map,z(),me()}function U(e,t){_=t,i=e,n=null;var o=Object.prototype.toString;Object.prototype.toString="function"==typeof e?e:function(){return this[e]},!1===t&&d.reverse(),d.sort(),Object.prototype.toString=o,!1===t&&d.reverse(),c=new Slick.Map,z(),me()}function j(i){t.groupItemMetadataProvider||(t.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider),x=[],O=[],T=(i=i||[])instanceof Array?i:[i];for(var n=0;n<T.length;n++){var o=T[n]=e.extend(!0,{},E,T[n]);o.getterIsAFn="function"==typeof o.getter,o.compiledAccumulators=[];for(var s=o.aggregators.length;s--;)o.compiledAccumulators[s]=ae(o.aggregators[s]);O[n]={}}me()}function Y(){if(!h){h={};for(var e=0,t=u.length;e<t;e++)h[u[e][a]]=e}}function q(e){return d[c.get(e)]}function X(e,t){if(!c.has(e))throw new Error("[SlickGrid DataView] Invalid id");if(e!==t[a]){var i=t[a];if(null==i)throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(c.has(i))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");c.set(i,c.get(e)),c.delete(e),m&&m[e]&&delete m[e],e=i}d[c.get(e)]=t,m||(m={}),m[e]=!0}function K(e,t){X(e,t),me()}function Q(e,t){d.splice(e,0,t),z(e),me()}function Z(e){if(g)v.set(e,!0);else{var t=c.get(e);if(void 0===t)throw new Error("[SlickGrid DataView] Invalid id");c.delete(e),d.splice(t,1),z(t),me()}}function J(e){if(!n)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");Q(function(e){for(var t=0,i=d.length;t<i;){var o=t+i>>>1;-1===n(d[o],e)?t=o+1:i=o}return t}(e),e)}function ee(e,t){if(null==e)for(var i=0;i<T.length;i++)O[i]={},T[i].collapsed=t,!0===t?V.notify({level:i,groupingKey:null}):H.notify({level:i,groupingKey:null});else O[e]={},T[e].collapsed=t,!0===t?V.notify({level:e,groupingKey:null}):H.notify({level:e,groupingKey:null});me()}function te(e,t,i){O[e][t]=T[e].collapsed^i,me()}function ie(e,t){for(var i,n,o,s=[],r={},l=t?t.level+1:0,a=T[l],d=0,u=a.predefinedValues.length;d<u;d++)(i=r[n=a.predefinedValues[d]])||((i=new Slick.Group).value=n,i.level=l,i.groupingKey=(t?t.groupingKey+k:"")+n,s[s.length]=i,r[n]=i);for(d=0,u=e.length;d<u;d++)o=e[d],(i=r[n=a.getterIsAFn?a.getter(o):o[a.getter]])||((i=new Slick.Group).value=n,i.level=l,i.groupingKey=(t?t.groupingKey+k:"")+n,s[s.length]=i,r[n]=i),i.rows[i.count++]=o;if(l<T.length-1)for(d=0;d<s.length;d++)(i=s[d]).groups=ie(i.rows,i);return s.length&&se(s,l),s.sort(T[l].comparer),s}function ne(e){var t,i=e.group,n=T[i.level],o=i.level==T.length,s=n.aggregators.length;if(!o&&n.aggregateChildGroups)for(var r=i.groups.length;r--;)i.groups[r].totals.initialized||ne(i.groups[r].totals);for(;s--;)(t=n.aggregators[s]).init(),!o&&n.aggregateChildGroups?n.compiledAccumulators[s].call(t,i.groups):n.compiledAccumulators[s].call(t,i.rows),t.storeResult(e);e.initialized=!0}function oe(e){var t=T[e.level],i=new Slick.GroupTotals;i.group=e,e.totals=i,t.lazyTotalsCalculation||ne(i)}function se(e,t){for(var i,n=T[t=t||0],o=n.collapsed,s=O[t],r=e.length;r--;)(i=e[r]).collapsed&&!n.aggregateCollapsed||(i.groups&&se(i.groups,t+1),n.aggregators.length&&(n.aggregateEmpty||i.rows.length||i.groups&&i.groups.length)&&oe(i),i.collapsed=o^s[i.groupingKey],i.title=n.formatter?n.formatter(i):i.value)}function re(e,t){for(var i,n,o=T[t=t||0],s=[],r=0,l=0,a=e.length;l<a;l++){if(n=e[l],s[r++]=n,!n.collapsed)for(var d=0,u=(i=n.groups?re(n.groups,t+1):n.rows).length;d<u;d++)s[r++]=i[d];n.totals&&o.displayTotalsRow&&(!n.collapsed||o.aggregateCollapsed)&&(s[r++]=n.totals)}return s}function le(e){var t=e.toString().indexOf("function")>=0?/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/:/^[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/,i=e.toString().match(t);return{params:i[1].split(","),body:i[2]}}function ae(e){if(e.accumulate){var t=le(e.accumulate),i=new Function("_items","for (var "+t.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+t.params[0]+" = _items[_i]; "+t.body+"}"),n="compiledAccumulatorLoop";return i.displayName=n,i.name=de(i,n),i}return function(){}}function de(e,t){try{Object.defineProperty(e,"name",{writable:!0,value:t})}catch(i){e.name=t}}function ue(e,t){for(var i=[],n=0,o=0,s=e.length;o<s;o++)p(e[o],t)&&(i[n++]=e[o]);return i}function ce(e,t,i){for(var n,o=[],s=0,r=0,l=e.length;r<l;r++)n=e[r],i[r]?o[s++]=n:p(n,t)&&(o[s++]=n,i[r]=!0);return o}function he(e){if(p){var i=t.inlineFilters?s:ue,n=t.inlineFilters?r:ce;C.isFilterNarrowing?y=i(y,o):C.isFilterExpanding?y=n(e,o,w):C.isFilterUnchanged||(y=i(e,o))}else y=A?e:e.concat();var l;return A?(y.length<=R*A&&(R=0===y.length?0:Math.floor((y.length-1)/A)),l=y.slice(A*R,A*R+A)):l=y,{totalRows:y.length,rows:l}}function pe(e){h=null,C.isFilterNarrowing==b.isFilterNarrowing&&C.isFilterExpanding==b.isFilterExpanding||(w=[]);var t=he(e);I=t.totalRows;var i=t.rows;x=[],T.length&&(x=ie(i)).length&&(i=re(x));var n=function(e,t){var i,n,o,s=[],r=0,l=Math.max(t.length,e.length);C&&C.ignoreDiffsBefore&&(r=Math.max(0,Math.min(t.length,C.ignoreDiffsBefore))),C&&C.ignoreDiffsAfter&&(l=Math.min(t.length,Math.max(0,C.ignoreDiffsAfter)));for(var d=r,u=e.length;d<l;d++)d>=u?s[s.length]=d:(i=t[d],n=e[d],(!i||T.length&&(o=i.__nonDataRow||n.__nonDataRow)&&i.__group!==n.__group||i.__group&&!i.equals(n)||o&&(i.__groupTotals||n.__groupTotals)||i[a]!=n[a]||m&&m[i[a]])&&(s[s.length]=d));return s}(u,i);return u=i,n}function me(){if(!f){var t=e.extend(!0,{},W()),i=u.length,n=I,o=pe(d);A&&I<R*A&&(R=Math.max(0,Math.ceil(I/A)-1),o=pe(d)),m=null,b=C,C={},n!==I&&!1!==L.notify(t,null,l)&&$.notify(W(),null,l),i!==u.length&&M.notify({previous:i,current:u.length,itemCount:d.length,dataView:l,callingOnRowsChanged:o.length>0},null,l),o.length>0&&F.notify({rows:o,itemCount:d.length,dataView:l,calledOnRowCountChanged:i!==u.length},null,l),(i!==u.length||o.length>0)&&N.notify({rowsDiff:o,previousRowCount:i,currentRowCount:u.length,itemCount:d.length,rowCountChanged:i!==u.length,rowsChanged:o.length>0,dataView:l},null,l)}}function fe(){return D}t=e.extend(!0,{},{groupItemMetadataProvider:null,inlineFilters:!1},t),e.extend(this,{beginUpdate:function(e){f=!0,g=!0===e},endUpdate:function(){var e=g;g=!1,f=!1,e&&(function(){for(var e,t,i=0,n=0,o=d.length;n<o;n++){if(void 0===(e=(t=d[n])[a]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");v.has(e)?c.delete(e):(d[i]=t,c.set(e,i),++i)}d.length=i,v=new Slick.Map}(),B()),me()},destroy:function(){d=[],c=null,h=null,p=null,m=null,n=null,w=[],y=[],s=null,r=null,S&&S.onSelectedRowsChanged&&S.onCellCssStylesChanged&&(S.onSelectedRowsChanged.unsubscribe(),S.onCellCssStylesChanged.unsubscribe()),l.onRowsOrCountChanged&&l.onRowsOrCountChanged.unsubscribe()},setPagingOptions:function(e){!1!==L.notify(W(),null,l)&&(null!=e.pageSize&&(A=e.pageSize,R=A?Math.min(R,Math.max(0,Math.ceil(I/A)-1)):0),null!=e.pageNum&&(R=Math.min(e.pageNum,Math.max(0,Math.ceil(I/A)-1))),$.notify(W(),null,l),me())},getPagingInfo:W,getIdPropertyName:function(){return a},getItems:function(){return d},setItems:function(e,t){void 0!==t&&(a=t),d=y=e,P.notify({idProperty:t,itemCount:d.length},null,l),c=new Slick.Map,z(),B(),me()},setFilter:function(e){p=e,t.inlineFilters&&(s=function(){var e=le(p),t="{ continue _coreloop; }$1",i="{ _retval[_idx++] = $item$; continue _coreloop; }$1",n=e.body.replace(/return false\s*([;}]|\}|$)/gi,t).replace(/return!1([;}]|\}|$)/gi,t).replace(/return true\s*([;}]|\}|$)/gi,i).replace(/return!0([;}]|\}|$)/gi,i).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),o=["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("");o=(o=(o=o.replace(/\$filter\$/gi,n)).replace(/\$item\$/gi,e.params[0])).replace(/\$args\$/gi,e.params[1]);var s=new Function("_items,_args",o),r="compiledFilter";return s.displayName=r,s.name=de(s,r),s}(),r=function(){var e=le(p),t="{ continue _coreloop; }$1",i="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",n=e.body.replace(/return false\s*([;}]|\}|$)/gi,t).replace(/return!1([;}]|\}|$)/gi,t).replace(/return true\s*([;}]|\}|$)/gi,i).replace(/return!0([;}]|\}|$)/gi,i).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),o=["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("");o=(o=(o=o.replace(/\$filter\$/gi,n)).replace(/\$item\$/gi,e.params[0])).replace(/\$args\$/gi,e.params[1]);var s=new Function("_items,_args,_cache",o),r="compiledFilterWithCaching";return s.displayName=r,s.name=de(s,r),s}()),me()},getFilter:function(){return p},getFilteredItems:function(){return y},getFilteredItemCount:function(){return y.length},sort:G,fastSort:U,reSort:function(){n?G(n,_):i&&U(i,_)},setGrouping:j,getGrouping:function(){return T},groupBy:function(e,t,i){j(null!=e?{getter:e,formatter:t,comparer:i}:[])},setAggregators:function(e,t){if(!T.length)throw new Error("[SlickGrid DataView] At least one grouping must be specified before calling setAggregators().");T[0].aggregators=e,T[0].aggregateCollapsed=t,j(T)},collapseAllGroups:function(e){ee(e,!0)},expandAllGroups:function(e){ee(e,!1)},collapseGroup:function(e){var t,i,n=Array.prototype.slice.call(arguments),o=n[0];1===n.length&&-1!==o.indexOf(k)?(t=o,i=o.split(k).length-1):(t=n.join(k),i=n.length-1),te(i,t,!0),V.notify({level:i,groupingKey:t})},expandGroup:function(e){var t,i,n=Array.prototype.slice.call(arguments),o=n[0];1===n.length&&-1!==o.indexOf(k)?(i=o.split(k).length-1,t=o):(i=n.length-1,t=n.join(k)),te(i,t,!1),H.notify({level:i,groupingKey:t})},getGroups:function(){return x},getAllSelectedIds:fe,getAllSelectedItems:function(){var e=[];return fe().forEach((function(t){e.push(l.getItemById(t))})),e},getIdxById:function(e){return c.get(e)},getRowByItem:function(e){return Y(),h[e[a]]},getRowById:function(e){return Y(),h[e]},getItemById:q,getItemByIdx:function(e){return d[e]},mapItemsToRows:function(e){var t=[];Y();for(var i=0,n=e.length;i<n;i++){var o=h[e[i][a]];null!=o&&(t[t.length]=o)}return t},mapRowsToIds:function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]<u.length&&(t[t.length]=u[e[i]][a]);return t},mapIdsToRows:function(e){var t=[];Y();for(var i=0,n=e.length;i<n;i++){var o=h[e[i]];null!=o&&(t[t.length]=o)}return t},setRefreshHints:function(e){C=e},setFilterArgs:function(e){o=e},refresh:me,updateItem:K,updateItems:function(e,t){if(e.length!==t.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(var i=0,n=t.length;i<n;i++)X(e[i],t[i]);me()},insertItem:Q,insertItems:function(e,t){Array.prototype.splice.apply(d,[e,0].concat(t)),z(e),me()},addItem:function(e){d.push(e),z(d.length-1),me()},addItems:function(e){z((d=d.concat(e)).length-e.length),me()},deleteItem:Z,deleteItems:function(e){if(0!==e.length)if(g)for(var t=0,i=e.length;t<i;t++){var n=e[t];if(void 0===(s=c.get(n)))throw new Error("[SlickGrid DataView] Invalid id");v.set(n,!0)}else{var o=[];for(t=0,i=e.length;t<i;t++){var s;if(n=e[t],void 0===(s=c.get(n)))throw new Error("[SlickGrid DataView] Invalid id");c.delete(n),o.push(s)}for(o.sort(),t=o.length-1;t>=0;--t)d.splice(o[t],1);z(o[0]),me()}},sortedAddItem:J,sortedUpdateItem:function(e,t){if(!c.has(e)||e!==t[a])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+c.get(e));if(!n)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");var i=q(e);0!==n(i,t)?(Z(e),J(t)):K(e,t)},syncGridSelection:function(t,i,n){var o,s=this;S=t,D=s.mapRowsToIds(t.getSelectedRows());var r=new Slick.Event;function l(e){D.join(",")!=e.join(",")&&(D=e,r.notify({grid:t,ids:D,dataView:s},new Slick.EventData,s))}return t.onSelectedRowsChanged.subscribe((function(i,r){if(!o){var a=s.mapRowsToIds(t.getSelectedRows());n&&t.getOptions().multiSelect?l(e.grep(D,(function(e){return void 0===s.getRowById(e)})).concat(a)):l(a)}})),this.onRowsOrCountChanged.subscribe((function(){if(D.length>0){o=!0;var e=s.mapIdsToRows(D);i||l(s.mapRowsToIds(e)),t.setSelectedRows(e),o=!1}})),r},syncGridCellCssStyles:function(e,t){var i,n;function o(e){for(var t in i={},e){var n=u[t][a];i[n]=e[t]}}function s(){if(i){n=!0,Y();var o={};for(var s in i){var r=h[s];null!=r&&(o[r]=i[s])}e.setCellCssStyles(t,o),n=!1}}o(e.getCellCssStyles(t)),e.onCellCssStylesChanged.subscribe((function(i,r){n||t==r.key&&(r.hash?o(r.hash):(e.onCellCssStylesChanged.unsubscribe(),l.onRowsOrCountChanged.unsubscribe(s)))})),this.onRowsOrCountChanged.subscribe(s)},getItemCount:function(){return d.length},getLength:function(){return u.length},getItem:function(e){var t=u[e];if(t&&t.__group&&t.totals&&!t.totals.initialized){var i=T[t.level];i.displayTotalsRow||(ne(t.totals),t.title=i.formatter?i.formatter(t):t.value)}else t&&t.__groupTotals&&!t.initialized&&ne(t);return t},getItemMetadata:function(e){var i=u[e];return void 0===i?null:i.__group?t.groupItemMetadataProvider.getGroupRowMetadata(i):i.__groupTotals?t.groupItemMetadataProvider.getTotalsRowMetadata(i):null},onSetItemsCalled:P,onRowCountChanged:M,onRowsChanged:F,onRowsOrCountChanged:N,onBeforePagingInfoChanged:L,onPagingInfoChanged:$,onGroupExpanded:H,onGroupCollapsed:V})},Aggregators:{Avg:function(e){this.field_=e,this.init=function(){this.count_=0,this.nonNullCount_=0,this.sum_=0},this.accumulate=function(e){var t=e[this.field_];this.count_++,null==t||""===t||isNaN(t)||(this.nonNullCount_++,this.sum_+=parseFloat(t))},this.storeResult=function(e){e.avg||(e.avg={}),0!==this.nonNullCount_&&(e.avg[this.field_]=this.sum_/this.nonNullCount_)}},Min:function(e){this.field_=e,this.init=function(){this.min_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(null==this.min_||t<this.min_)&&(this.min_=t)},this.storeResult=function(e){e.min||(e.min={}),e.min[this.field_]=this.min_}},Max:function(e){this.field_=e,this.init=function(){this.max_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(null==this.max_||t>this.max_)&&(this.max_=t)},this.storeResult=function(e){e.max||(e.max={}),e.max[this.field_]=this.max_}},Sum:function(e){this.field_=e,this.init=function(){this.sum_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(this.sum_+=parseFloat(t))},this.storeResult=function(e){e.sum||(e.sum={}),e.sum[this.field_]=this.sum_}},Count:function(e){this.field_=e,this.init=function(){},this.storeResult=function(e){e.count||(e.count={}),e.count[this.field_]=e.group.rows.length}}}}}})}(jQuery)},810:function(){if("undefined"==typeof jQuery)throw new Error("SlickGrid requires jquery module to be loaded");if(!jQuery.fn.drag)throw new Error("SlickGrid requires jquery.event.drag module to be loaded");if("undefined"==typeof Slick)throw new Error("slick.core.js not loaded");(function($){"use strict";var scrollbarDimensions,maxSupportedCssHeight;function SlickGrid(container,data,columns,options){var defaults={alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,autoHeight:!1,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,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:defaultFormatter,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},columnDefaults={name:"",resizable:!0,sortable:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},columnAutosizeDefaults={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.CanvasTextSize,sizeToRemaining:void 0,widthPx:void 0,colDataTypeOf:void 0},th,h,ph,n,cj,page=0,offset=0,vScrollDir=1,initialized=!1,$container,uid="slickgrid_"+Math.round(1e6*Math.random()),self=this,$focusSink,$focusSink2,$groupHeaders=$(),$headerScroller,$headers,$headerRow,$headerRowScroller,$headerRowSpacerL,$headerRowSpacerR,$footerRow,$footerRowScroller,$footerRowSpacerL,$footerRowSpacerR,$preHeaderPanel,$preHeaderPanelScroller,$preHeaderPanelSpacer,$preHeaderPanelR,$preHeaderPanelScrollerR,$preHeaderPanelSpacerR,$topPanelScroller,$topPanel,$viewport,$canvas,$style,$boundAncestors,treeColumns,stylesheet,columnCssRulesL,columnCssRulesR,viewportH,viewportW,canvasWidth,canvasWidthL,canvasWidthR,headersWidth,headersWidthL,headersWidthR,viewportHasHScroll,viewportHasVScroll,headerColumnWidthDiff=0,headerColumnHeightDiff=0,cellWidthDiff=0,cellHeightDiff=0,jQueryNewWidthBehaviour=!1,absoluteColumnMinWidth,hasFrozenRows=!1,frozenRowsHeight=0,actualFrozenRow=-1,paneTopH=0,paneBottomH=0,viewportTopH=0,viewportBottomH=0,topPanelH=0,headerRowH=0,footerRowH=0,tabbingDirection=1,$activeCanvasNode,$activeViewportNode,activePosX,activeRow,activeCell,activeCellNode=null,currentEditor=null,serializedEditorValue,editController,rowsCache={},renderedRows=0,numVisibleRows=0,prevScrollTop=0,scrollTop=0,lastRenderedScrollTop=0,lastRenderedScrollLeft=0,prevScrollLeft=0,scrollLeft=0,selectionModel,selectedRows=[],plugins=[],cellCssClasses={},columnsById={},sortColumns=[],columnPosLeft=[],columnPosRight=[],pagingActive=!1,pagingIsLastPage=!1,scrollThrottle=ActionThrottle(render,50),h_editorLoader=null,h_render=null,h_postrender=null,h_postrenderCleanup=null,postProcessedRows={},postProcessToRow=null,postProcessFromRow=null,postProcessedCleanupQueue=[],postProcessgroupId=0,counter_rows_rendered=0,counter_rows_removed=0,$paneHeaderL,$paneHeaderR,$paneTopL,$paneTopR,$paneBottomL,$paneBottomR,$headerScrollerL,$headerScrollerR,$headerL,$headerR,$groupHeadersL,$groupHeadersR,$headerRowScrollerL,$headerRowScrollerR,$footerRowScrollerL,$footerRowScrollerR,$headerRowL,$headerRowR,$footerRowL,$footerRowR,$topPanelScrollerL,$topPanelScrollerR,$topPanelL,$topPanelR,$viewportTopL,$viewportTopR,$viewportBottomL,$viewportBottomR,$canvasTopL,$canvasTopR,$canvasBottomL,$canvasBottomR,$viewportScrollContainerX,$viewportScrollContainerY,$headerScrollContainer,$headerRowScrollContainer,$footerRowScrollContainer,cssShow={position:"absolute",visibility:"hidden",display:"block"},$hiddenParents,oldProps=[],columnResizeDragging=!1;function init(){if(($container=container instanceof jQuery?container:$(container)).length<1)throw new Error("SlickGrid requires a valid container, "+container+" does not exist in the DOM.");if(maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,options.suppressCssChangesOnHiddenInit||cacheCssForHiddenInit(),treeColumns=new Slick.TreeColumns(columns),columns=treeColumns.extractColumns(),updateColumnProps(),options.enableColumnReorder&&!$.fn.sortable)throw new Error("SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded");if(editController={commitCurrentEdit:commitCurrentEdit,cancelCurrentEdit:cancelCurrentEdit},$container.empty().css("overflow","hidden").css("outline",0).addClass(uid).addClass("ui-widget"),/relative|absolute|fixed/.test($container.css("position"))||$container.css("position","relative"),$focusSink=$("<div tabIndex='0' hideFocus style='position:fixed;width:0;height:0;top:0;left:0;outline:0;'></div>").appendTo($container),$paneHeaderL=$("<div class='slick-pane slick-pane-header slick-pane-left' tabIndex='0' />").appendTo($container),$paneHeaderR=$("<div class='slick-pane slick-pane-header slick-pane-right' tabIndex='0' />").appendTo($container),$paneTopL=$("<div class='slick-pane slick-pane-top slick-pane-left' tabIndex='0' />").appendTo($container),$paneTopR=$("<div class='slick-pane slick-pane-top slick-pane-right' tabIndex='0' />").appendTo($container),$paneBottomL=$("<div class='slick-pane slick-pane-bottom slick-pane-left' tabIndex='0' />").appendTo($container),$paneBottomR=$("<div class='slick-pane slick-pane-bottom slick-pane-right' tabIndex='0' />").appendTo($container),options.createPreHeaderPanel&&($preHeaderPanelScroller=$("<div class='slick-preheader-panel ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($paneHeaderL),$preHeaderPanel=$("<div />").appendTo($preHeaderPanelScroller),$preHeaderPanelSpacer=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($preHeaderPanelScroller),$preHeaderPanelScrollerR=$("<div class='slick-preheader-panel ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($paneHeaderR),$preHeaderPanelR=$("<div />").appendTo($preHeaderPanelScrollerR),$preHeaderPanelSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($preHeaderPanelScrollerR),options.showPreHeaderPanel||($preHeaderPanelScroller.hide(),$preHeaderPanelScrollerR.hide())),$headerScrollerL=$("<div class='slick-header ui-state-default slick-header-left' />").appendTo($paneHeaderL),$headerScrollerR=$("<div class='slick-header ui-state-default slick-header-right' />").appendTo($paneHeaderR),$headerScroller=$().add($headerScrollerL).add($headerScrollerR),treeColumns.hasDepth()){$groupHeadersL=[],$groupHeadersR=[];for(var e=0;e<treeColumns.getDepth()-1;e++)$groupHeadersL[e]=$("<div class='slick-group-header-columns slick-group-header-columns-left' style='left:-1000px' />").appendTo($headerScrollerL),$groupHeadersR[e]=$("<div class='slick-group-header-columns slick-group-header-columns-right' style='left:-1000px' />").appendTo($headerScrollerR);$groupHeaders=$().add($groupHeadersL).add($groupHeadersR)}$headerL=$("<div class='slick-header-columns slick-header-columns-left' style='left:-1000px' />").appendTo($headerScrollerL),$headerR=$("<div class='slick-header-columns slick-header-columns-right' style='left:-1000px' />").appendTo($headerScrollerR),$headers=$().add($headerL).add($headerR),$headerRowScrollerL=$("<div class='slick-headerrow ui-state-default' />").appendTo($paneTopL),$headerRowScrollerR=$("<div class='slick-headerrow ui-state-default' />").appendTo($paneTopR),$headerRowScroller=$().add($headerRowScrollerL).add($headerRowScrollerR),$headerRowSpacerL=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($headerRowScrollerL),$headerRowSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($headerRowScrollerR),$headerRowL=$("<div class='slick-headerrow-columns slick-headerrow-columns-left' />").appendTo($headerRowScrollerL),$headerRowR=$("<div class='slick-headerrow-columns slick-headerrow-columns-right' />").appendTo($headerRowScrollerR),$headerRow=$().add($headerRowL).add($headerRowR),$topPanelScrollerL=$("<div class='slick-top-panel-scroller ui-state-default' />").appendTo($paneTopL),$topPanelScrollerR=$("<div class='slick-top-panel-scroller ui-state-default' />").appendTo($paneTopR),$topPanelScroller=$().add($topPanelScrollerL).add($topPanelScrollerR),$topPanelL=$("<div class='slick-top-panel' style='width:10000px' />").appendTo($topPanelScrollerL),$topPanelR=$("<div class='slick-top-panel' style='width:10000px' />").appendTo($topPanelScrollerR),$topPanel=$().add($topPanelL).add($topPanelR),options.showColumnHeader||$headerScroller.hide(),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewportTopL=$("<div class='slick-viewport slick-viewport-top slick-viewport-left' tabIndex='0' hideFocus />").appendTo($paneTopL),$viewportTopR=$("<div class='slick-viewport slick-viewport-top slick-viewport-right' tabIndex='0' hideFocus />").appendTo($paneTopR),$viewportBottomL=$("<div class='slick-viewport slick-viewport-bottom slick-viewport-left' tabIndex='0' hideFocus />").appendTo($paneBottomL),$viewportBottomR=$("<div class='slick-viewport slick-viewport-bottom slick-viewport-right' tabIndex='0' hideFocus />").appendTo($paneBottomR),$viewport=$().add($viewportTopL).add($viewportTopR).add($viewportBottomL).add($viewportBottomR),$activeViewportNode=$viewportTopL,$canvasTopL=$("<div class='grid-canvas grid-canvas-top grid-canvas-left' tabIndex='0' hideFocus />").appendTo($viewportTopL),$canvasTopR=$("<div class='grid-canvas grid-canvas-top grid-canvas-right' tabIndex='0' hideFocus />").appendTo($viewportTopR),$canvasBottomL=$("<div class='grid-canvas grid-canvas-bottom grid-canvas-left' tabIndex='0' hideFocus />").appendTo($viewportBottomL),$canvasBottomR=$("<div class='grid-canvas grid-canvas-bottom grid-canvas-right' tabIndex='0' hideFocus />").appendTo($viewportBottomR),options.viewportClass&&$viewport.toggleClass(options.viewportClass,!0),$canvas=$().add($canvasTopL).add($canvasTopR).add($canvasBottomL).add($canvasBottomR),scrollbarDimensions=scrollbarDimensions||measureScrollbar(),$activeCanvasNode=$canvasTopL,$preHeaderPanelSpacer&&$preHeaderPanelSpacer.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),$headers.width(getHeadersWidth()),$headerRowSpacerL.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),$headerRowSpacerR.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),options.createFooterRow&&($footerRowScrollerR=$("<div class='slick-footerrow ui-state-default' />").appendTo($paneTopR),$footerRowScrollerL=$("<div class='slick-footerrow ui-state-default' />").appendTo($paneTopL),$footerRowScroller=$().add($footerRowScrollerL).add($footerRowScrollerR),$footerRowSpacerL=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($footerRowScrollerL),$footerRowSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($footerRowScrollerR),$footerRowL=$("<div class='slick-footerrow-columns slick-footerrow-columns-left' />").appendTo($footerRowScrollerL),$footerRowR=$("<div class='slick-footerrow-columns slick-footerrow-columns-right' />").appendTo($footerRowScrollerR),$footerRow=$().add($footerRowL).add($footerRowR),options.showFooterRow||$footerRowScroller.hide()),$focusSink2=$focusSink.clone().appendTo($container),options.explicitInitialization||finishInitialization()}function finishInitialization(){initialized||(initialized=!0,getViewportWidth(),getViewportHeight(),measureCellPaddingAndBorder(),disableSelection($headers),options.enableTextSelectionOnCells||$viewport.on("selectstart.ui",(function(e){return $(e.target).is("input,textarea")})),setFrozenOptions(),setPaneVisibility(),setScroller(),setOverflow(),updateColumnCaches(),createColumnHeaders(),createColumnGroupHeaders(),createColumnFooter(),setupColumnSort(),createCssRules(),resizeCanvas(),bindAncestorScrollEvents(),$container.on("resize.slickgrid",resizeCanvas),$viewport.on("scroll",handleScroll),jQuery.fn.mousewheel&&options.enableMouseWheelScrollHandler&&$viewport.on("mousewheel",handleMouseWheel),$headerScroller.on("contextmenu",handleHeaderContextMenu).on("click",handleHeaderClick).on("mouseenter",".slick-header-column",handleHeaderMouseEnter).on("mouseleave",".slick-header-column",handleHeaderMouseLeave),$headerRowScroller.on("scroll",handleHeaderRowScroll),options.showHeaderRow&&$headerRow.on("mouseenter",".slick-headerrow-column",handleHeaderRowMouseEnter).on("mouseleave",".slick-headerrow-column",handleHeaderRowMouseLeave),options.createFooterRow&&($footerRow.on("contextmenu",handleFooterContextMenu).on("click",handleFooterClick),$footerRowScroller.on("scroll",handleFooterRowScroll)),options.createPreHeaderPanel&&$preHeaderPanelScroller.on("scroll",handlePreHeaderPanelScroll),$focusSink.add($focusSink2).on("keydown",handleKeyDown),$canvas.on("keydown",handleKeyDown).on("click",handleClick).on("dblclick",handleDblClick).on("contextmenu",handleContextMenu).on("draginit",handleDragInit).on("dragstart",{distance:3},handleDragStart).on("drag",handleDrag).on("dragend",handleDragEnd).on("mouseenter",".slick-cell",handleMouseEnter).on("mouseleave",".slick-cell",handleMouseLeave),options.suppressCssChangesOnHiddenInit||restoreCssFromHiddenInit())}function cacheCssForHiddenInit(){($hiddenParents=$container.parents().addBack().not(":visible")).each((function(){var e={};for(var t in cssShow)e[t]=this.style[t],this.style[t]=cssShow[t];oldProps.push(e)}))}function restoreCssFromHiddenInit(){$hiddenParents.each((function(e){var t=oldProps[e];for(var i in cssShow)this.style[i]=t[i]}))}function hasFrozenColumns(){return options.frozenColumn>-1}function registerPlugin(e){plugins.unshift(e),e.init(self)}function unregisterPlugin(e){for(var t=plugins.length;t>=0;t--)if(plugins[t]===e){plugins[t].destroy&&plugins[t].destroy(),plugins.splice(t,1);break}}function getPluginByName(e){for(var t=plugins.length-1;t>=0;t--)if(plugins[t].pluginName===e)return plugins[t]}function setSelectionModel(e){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),(selectionModel=e)&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(e,t){return _getContainerElement(getCanvases(),e,t)}function getActiveCanvasNode(e){return setActiveCanvasNode(e),$activeCanvasNode[0]}function getCanvases(){return $canvas}function setActiveCanvasNode(e){e&&($activeCanvasNode=$(e.target).closest(".grid-canvas"))}function getViewportNode(e,t){return _getContainerElement(getViewports(),e,t)}function getViewports(){return $viewport}function getActiveViewportNode(e){return setActiveViewportNode(e),$activeViewportNode[0]}function setActiveViewportNode(e){e&&($activeViewportNode=$(e.target).closest(".slick-viewport"))}function _getContainerElement(e,t,i){if(e){t||(t=0),i||(i=0);var n="number"==typeof t?t:getColumnIndex(t);return e[(hasFrozenRows&&i>=actualFrozenRow+(options.frozenBottom?0:1)?2:0)+(hasFrozenColumns()&&n>options.frozenColumn?1:0)]}}function measureScrollbar(){var e=$('<div class="'+$viewport.className+'" style="position:absolute; top:-10000px; left:-10000px; overflow:auto; width:100px; height:100px;"></div>').appendTo("body"),t=$('<div style="width:200px; height:200px; overflow:auto;"></div>').appendTo(e),i={width:e[0].offsetWidth-e[0].clientWidth,height:e[0].offsetHeight-e[0].clientHeight};return t.remove(),e.remove(),i}function getHeadersWidth(){headersWidth=headersWidthL=headersWidthR=0;for(var e=!options.autoHeight,t=0,i=columns.length;t<i;t++){var n=columns[t].width;options.frozenColumn>-1&&t>options.frozenColumn?headersWidthR+=n:headersWidthL+=n}return e&&(options.frozenColumn>-1&&t>options.frozenColumn?headersWidthR+=scrollbarDimensions.width:headersWidthL+=scrollbarDimensions.width),hasFrozenColumns()?(headersWidthL+=1e3,headersWidthR=Math.max(headersWidthR,viewportW)+headersWidthL,headersWidthR+=scrollbarDimensions.width):(headersWidthL+=scrollbarDimensions.width,headersWidthL=Math.max(headersWidthL,viewportW)+1e3),headersWidth=headersWidthL+headersWidthR,Math.max(headersWidth,viewportW)+1e3}function getHeadersWidthL(){return headersWidthL=0,columns.forEach((function(e,t){options.frozenColumn>-1&&t>options.frozenColumn||(headersWidthL+=e.width)})),hasFrozenColumns()?headersWidthL+=1e3:(headersWidthL+=scrollbarDimensions.width,headersWidthL=Math.max(headersWidthL,viewportW)+1e3),headersWidthL}function getHeadersWidthR(){return headersWidthR=0,columns.forEach((function(e,t){options.frozenColumn>-1&&t>options.frozenColumn&&(headersWidthR+=e.width)})),hasFrozenColumns()&&(headersWidthR=Math.max(headersWidthR,viewportW)+getHeadersWidthL(),headersWidthR+=scrollbarDimensions.width),headersWidthR}function getCanvasWidth(){var e=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,t=columns.length;for(canvasWidthL=canvasWidthR=0;t--;)hasFrozenColumns()&&t>options.frozenColumn?canvasWidthR+=columns[t].width:canvasWidthL+=columns[t].width;var i=canvasWidthL+canvasWidthR;return options.fullWidthRows?Math.max(i,e):i}function updateCanvasWidth(e){var t,i=canvasWidth,n=canvasWidthL,o=canvasWidthR;((t=(canvasWidth=getCanvasWidth())!==i||canvasWidthL!==n||canvasWidthR!==o)||hasFrozenColumns()||hasFrozenRows)&&($canvasTopL.width(canvasWidthL),getHeadersWidth(),$headerL.width(headersWidthL),$headerR.width(headersWidthR),hasFrozenColumns()?($canvasTopR.width(canvasWidthR),$paneHeaderL.width(canvasWidthL),$paneHeaderR.css("left",canvasWidthL),$paneHeaderR.css("width",viewportW-canvasWidthL),$paneTopL.width(canvasWidthL),$paneTopR.css("left",canvasWidthL),$paneTopR.css("width",viewportW-canvasWidthL),$headerRowScrollerL.width(canvasWidthL),$headerRowScrollerR.width(viewportW-canvasWidthL),$headerRowL.width(canvasWidthL),$headerRowR.width(canvasWidthR),options.createFooterRow&&($footerRowScrollerL.width(canvasWidthL),$footerRowScrollerR.width(viewportW-canvasWidthL),$footerRowL.width(canvasWidthL),$footerRowR.width(canvasWidthR)),options.createPreHeaderPanel&&$preHeaderPanel.width(canvasWidth),$viewportTopL.width(canvasWidthL),$viewportTopR.width(viewportW-canvasWidthL),hasFrozenRows&&($paneBottomL.width(canvasWidthL),$paneBottomR.css("left",canvasWidthL),$viewportBottomL.width(canvasWidthL),$viewportBottomR.width(viewportW-canvasWidthL),$canvasBottomL.width(canvasWidthL),$canvasBottomR.width(canvasWidthR))):($paneHeaderL.width("100%"),$paneTopL.width("100%"),$headerRowScrollerL.width("100%"),$headerRowL.width(canvasWidth),options.createFooterRow&&($footerRowScrollerL.width("100%"),$footerRowL.width(canvasWidth)),options.createPreHeaderPanel&&($preHeaderPanel.width("100%"),$preHeaderPanel.width(canvasWidth)),$viewportTopL.width("100%"),hasFrozenRows&&($viewportBottomL.width("100%"),$canvasBottomL.width(canvasWidthL))),viewportHasHScroll=canvasWidth>=viewportW-scrollbarDimensions.width),$headerRowSpacerL.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),$headerRowSpacerR.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),options.createFooterRow&&($footerRowSpacerL.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),$footerRowSpacerR.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0))),(t||e)&&applyColumnWidths()}function disableSelection(e){e&&e.jquery&&e.attr("unselectable","on").css("MozUserSelect","none").on("selectstart.ui",(function(){return!1}))}function getMaxSupportedCssHeight(){for(var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$("<div style='display:none' />").appendTo(document.body);;){var n=2*e;if(i.css("height",n),n>t||i.height()!==n)break;e=n}return i.remove(),e}function getUID(){return uid}function getHeaderColumnWidthDiff(){return headerColumnWidthDiff}function getScrollbarDimensions(){return scrollbarDimensions}function bindAncestorScrollEvents(){for(var e=hasFrozenRows&&!options.frozenBottom?$canvasBottomL[0]:$canvasTopL[0];(e=e.parentNode)!=document.body&&null!=e;)if(e==$viewportTopL[0]||e.scrollWidth!=e.clientWidth||e.scrollHeight!=e.clientHeight){var t=$(e);$boundAncestors=$boundAncestors?$boundAncestors.add(t):t,t.on("scroll."+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.off("scroll."+uid),$boundAncestors=null)}function updateColumnHeader(e,t,i){if(initialized){var n=getColumnIndex(e);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==t&&(columns[n].name=t),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o,grid:self}),s.attr("title",i||"").children().eq(0).html(t),trigger(self.onHeaderCellRendered,{node:s[0],column:o,grid:self}))}}}function getHeader(e){if(!e)return hasFrozenColumns()?$headers:$headerL;var t=getColumnIndex(e.id);return hasFrozenColumns()?t<=options.frozenColumn?$headerL:$headerR:$headerL}function getHeaderColumn(e){var t="number"==typeof e?e:getColumnIndex(e),i=hasFrozenColumns()?t<=options.frozenColumn?$headerL:$headerR:$headerL,n=hasFrozenColumns()?t<=options.frozenColumn?t:t-options.frozenColumn-1:t,o=i.children().eq(n);return o&&o[0]}function getHeaderRow(){return hasFrozenColumns()?$headerRow:$headerRow[0]}function getFooterRow(){return hasFrozenColumns()?$footerRow:$footerRow[0]}function getPreHeaderPanel(){return $preHeaderPanel[0]}function getPreHeaderPanelRight(){return $preHeaderPanelR[0]}function getHeaderRowColumn(e){var t,i="number"==typeof e?e:getColumnIndex(e);hasFrozenColumns()?i<=options.frozenColumn?t=$headerRowL:(t=$headerRowR,i-=options.frozenColumn+1):t=$headerRowL;var n=t.children().eq(i);return n&&n[0]}function getFooterRowColumn(e){var t,i="number"==typeof e?e:getColumnIndex(e);hasFrozenColumns()?i<=options.frozenColumn?t=$footerRowL:(t=$footerRowR,i-=options.frozenColumn+1):t=$footerRowL;var n=t&&t.children().eq(i);return n&&n[0]}function createColumnFooter(){if(options.createFooterRow){$footerRow.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowL.empty(),$footerRowR.empty();for(var e=0;e<columns.length;e++){var t=columns[e],i=$("<div class='ui-state-default slick-footerrow-column l"+e+" r"+e+"'></div>").data("column",t).addClass(hasFrozenColumns()&&e<=options.frozenColumn?"frozen":"").appendTo(hasFrozenColumns()&&e>options.frozenColumn?$footerRowR:$footerRowL);trigger(self.onFooterRowCellRendered,{node:i[0],column:t,grid:self})}}}function createColumnGroupHeaders(){var e=0,t=!1;if(treeColumns.hasDepth()){for(var i=0;i<$groupHeadersL.length;i++){$groupHeadersL[i].empty(),$groupHeadersR[i].empty();var n=treeColumns.getColumnsInDepth(i);for(var o in n){var s=n[o];e+=s.extractColumns().length,hasFrozenColumns()&&0===i&&e-1===options.frozenColumn&&(t=!0),$("<div class='ui-state-default slick-group-header-column' />").html("<span class='slick-column-name'>"+s.name+"</span>").attr("id",""+uid+s.id).attr("title",s.toolTip||"").data("column",s).addClass(s.headerCssClass||"").addClass(hasFrozenColumns()&&e-1>options.frozenColumn?"frozen":"").appendTo(hasFrozenColumns()&&e-1>options.frozenColumn?$groupHeadersR[i]:$groupHeadersL[i])}if(hasFrozenColumns()&&0===i&&!t){$groupHeadersL[i].empty(),$groupHeadersR[i].empty(),alert("All columns of group should to be grouped!");break}}applyColumnGroupHeaderWidths()}}function createColumnHeaders(){function e(){$(this).addClass("ui-state-hover")}function t(){$(this).removeClass("ui-state-hover")}$headers.find(".slick-header-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:e,grid:self})})),$headerL.empty(),$headerR.empty(),getHeadersWidth(),$headerL.width(headersWidthL),$headerR.width(headersWidthR),$headerRow.find(".slick-headerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:e,grid:self})})),$headerRowL.empty(),$headerRowR.empty(),options.createFooterRow&&($footerRowL.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowL.empty(),hasFrozenColumns()&&($footerRowR.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowR.empty()));for(var i=0;i<columns.length;i++){var n=columns[i],o=hasFrozenColumns()?i<=options.frozenColumn?$headerL:$headerR:$headerL,s=hasFrozenColumns()?i<=options.frozenColumn?$headerRowL:$headerRowR:$headerRowL,r=$("<div class='ui-state-default slick-header-column' />").html("<span class='slick-column-name'>"+n.name+"</span>").width(n.width-headerColumnWidthDiff).attr("id",""+uid+n.id).attr("title",n.toolTip||"").data("column",n).addClass(n.headerCssClass||"").addClass(hasFrozenColumns()&&i<=options.frozenColumn?"frozen":"").appendTo(o);if((options.enableColumnReorder||n.sortable)&&r.on("mouseenter",e).on("mouseleave",t),n.hasOwnProperty("headerCellAttrs")&&n.headerCellAttrs instanceof Object)for(var l in n.headerCellAttrs)n.headerCellAttrs.hasOwnProperty(l)&&r.attr(l,n.headerCellAttrs[l]);if(n.sortable&&(r.addClass("slick-header-sortable"),r.append("<span class='slick-sort-indicator"+(options.numberedMultiColumnSort&&!options.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":"")+"' />"),options.numberedMultiColumnSort&&options.sortColNumberInSeparateSpan&&r.append("<span class='slick-sort-indicator-numbered' />")),trigger(self.onHeaderCellRendered,{node:r[0],column:n,grid:self}),options.showHeaderRow){var a=$("<div class='ui-state-default slick-headerrow-column l"+i+" r"+i+"'></div>").data("column",n).addClass(hasFrozenColumns()&&i<=options.frozenColumn?"frozen":"").appendTo(s);trigger(self.onHeaderRowCellRendered,{node:a[0],column:n,grid:self})}if(options.createFooterRow&&options.showFooterRow){var d=$("<div class='ui-state-default slick-footerrow-column l"+i+" r"+i+"'></div>").data("column",n).appendTo($footerRow);trigger(self.onFooterRowCellRendered,{node:d[0],column:n,grid:self})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&("function"==typeof options.enableColumnReorder?options.enableColumnReorder(self,$headers,headerColumnWidthDiff,setColumns,setupColumnResize,columns,getColumnIndex,uid,trigger):setupColumnReorder())}function setupColumnSort(){$headers.click((function(e){if(!columnResizeDragging&&(e.metaKey=e.metaKey||e.ctrlKey,!$(e.target).hasClass("slick-resizable-handle"))){var t=$(e.target).closest(".slick-header-column");if(t.length){var i=t.data("column");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=$.extend(!0,[],sortColumns),o=null,s=0;s<sortColumns.length;s++)if(sortColumns[s].columnId==i.id){(o=sortColumns[s]).sortAsc=!o.sortAsc;break}var r,l=!!o;options.tristateMultiColumnSort?(o||(o={columnId:i.id,sortAsc:i.defaultSortAsc}),l&&o.sortAsc&&(sortColumns.splice(s,1),o=null),options.multiColumnSort||(sortColumns=[]),!o||l&&options.multiColumnSort||sortColumns.push(o)):e.metaKey&&options.multiColumnSort?o&&sortColumns.splice(s,1):((e.shiftKey||e.metaKey)&&options.multiColumnSort||(sortColumns=[]),o?0===sortColumns.length&&sortColumns.push(o):(o={columnId:i.id,sortAsc:i.defaultSortAsc},sortColumns.push(o))),r=options.multiColumnSort?{multiColumnSort:!0,previousSortColumns:n,sortCols:$.map(sortColumns,(function(e){return{columnId:columns[getColumnIndex(e.columnId)].id,sortCol:columns[getColumnIndex(e.columnId)],sortAsc:e.sortAsc}}))}:{multiColumnSort:!1,previousSortColumns:n,columnId:sortColumns.length>0?i.id:null,sortCol:sortColumns.length>0?i:null,sortAsc:!(sortColumns.length>0)||sortColumns[0].sortAsc},!1!==trigger(self.onBeforeSort,r,e)&&(setSortColumns(sortColumns),trigger(self.onSort,r,e))}}}}))}function currentPositionInHeader(e){var t=0;return $headers.find(".slick-header-column").each((function(i){if(this.id==e)return t=i,!1})),t}function limitPositionInGroup(e){var t,i=0,n=0;return treeColumns.getColumnsInDepth($groupHeadersL.length-1).some((function(o){return i=n,n+=o.columns.length,o.columns.some((function(i){return i.id===e&&(t=o),t})),t})),n--,{start:i,end:n,group:t}}function remove(e,t){var i=e.lastIndexOf(t);i>-1&&(e.splice(i,1),remove(e,t))}function columnPositionValidInGroup(e){var t=currentPositionInHeader(e[0].id),i=limitPositionInGroup(e.data("column").id),n=i.start<=t&&t<=i.end;return{limit:i,valid:n,message:n?"":'Column "'.concat(e.text(),'" can be reordered only within the "',i.group.name,'" group!')}}function setupColumnReorder(){$headers.filter(":ui-sortable").sortable("destroy");var e,t=null;function i(){$viewportScrollContainerX[0].scrollLeft=$viewportScrollContainerX[0].scrollLeft+10}function n(){$viewportScrollContainerX[0].scrollLeft=$viewportScrollContainerX[0].scrollLeft-10}$headers.sortable({containment:"parent",distance:3,axis:"x",cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"slick-sortable-placeholder ui-state-default slick-header-column",start:function(t,i){i.placeholder.width(i.helper.outerWidth()-headerColumnWidthDiff),e=!hasFrozenColumns()||i.placeholder.offset().left+i.placeholder.width()>$viewportScrollContainerX.offset().left,$(i.helper).addClass("slick-header-column-active")},beforeStop:function(e,t){$(t.helper).removeClass("slick-header-column-active")},sort:function(o,s){e&&o.originalEvent.pageX>$container[0].clientWidth?t||(t=setInterval(i,100)):e&&o.originalEvent.pageX<$viewportScrollContainerX.offset().left?t||(t=setInterval(n,100)):(clearInterval(t),t=null)},stop:function(e,i){var n=!1;clearInterval(t),t=null;var o=null;if(treeColumns.hasDepth()){var s=columnPositionValidInGroup(i.item);o=s.limit,(n=!s.valid)&&alert(s.message)}if(!n&&getEditorLock().commitCurrentEdit()){var r=$headerL.sortable("toArray");r=r.concat($headerR.sortable("toArray"));for(var l=[],a=0;a<r.length;a++)l.push(columns[getColumnIndex(r[a].replace(uid,""))]);setColumns(l),trigger(self.onColumnsReordered,{impactedColumns:getImpactedColumns(o)}),e.stopPropagation(),setupColumnResize()}else $(this).sortable("cancel")}})}function getImpactedColumns(e){var t=[];if(e)for(var i=e.start;i<=e.end;i++)t.push(columns[i]);else t=columns;return t}function setupColumnResize(){var e,t,i,n,o,s,r,l,a,d=0;(o=$headers.children()).find(".slick-resizable-handle").remove(),o.each((function(e,t){e>=columns.length||columns[e].resizable&&(void 0===l&&(l=e),a=e)})),void 0!==l&&o.each((function(u,c){u>=columns.length||u<l||options.forceFitColumns&&u>=a||($(c),$("<div class='slick-resizable-handle' />").appendTo(c).on("dragstart",(function(t,l){if(!getEditorLock().commitCurrentEdit())return!1;n=t.pageX,d=0,$(this).parent().addClass("slick-header-column-active");var a=null,c=null;if(o.each((function(e,t){e>=columns.length||(columns[e].previousWidth=$(t).outerWidth())})),options.forceFitColumns)for(a=0,c=0,e=u+1;e<columns.length;e++)(i=columns[e]).resizable&&(null!==c&&(i.maxWidth?c+=i.maxWidth-i.previousWidth:c=null),a+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));var h=0,p=0;for(e=0;e<=u;e++)(i=columns[e]).resizable&&(null!==p&&(i.maxWidth?p+=i.maxWidth-i.previousWidth:p=null),h+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));null===a&&(a=1e5),null===h&&(h=1e5),null===c&&(c=1e5),null===p&&(p=1e5),r=n+Math.min(a,p),s=n-Math.min(h,c)})).on("drag",(function(o,l){columnResizeDragging=!0;var a,c,h=Math.min(r,Math.max(s,o.pageX))-n,p=0,m=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;if(h<0){for(c=h,e=u;e>=0;e--)(i=columns[e]).resizable&&(a=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<a?(c+=i.previousWidth-a,i.width=a):(i.width=i.previousWidth+c,c=0));for(t=0;t<=u;t++)i=columns[t],hasFrozenColumns()&&t>options.frozenColumn?i.width:p+=i.width;if(options.forceFitColumns)for(c=-h,e=u+1;e<columns.length;e++)(i=columns[e]).resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0),hasFrozenColumns()&&e>options.frozenColumn?i.width:p+=i.width);else for(e=u+1;e<columns.length;e++)i=columns[e],hasFrozenColumns()&&e>options.frozenColumn?i.width:p+=i.width;if(options.forceFitColumns)for(c=-h,e=u+1;e<columns.length;e++)(i=columns[e]).resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0))}else{for(c=h,p=0,e=u;e>=0;e--)if((i=columns[e]).resizable)if(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c)c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth;else{var f=i.previousWidth+c,g=canvasWidthL+c;hasFrozenColumns()&&e<=options.frozenColumn?(f>d&&g<m-options.frozenRightViewportMinWidth&&(d=f),i.width=g+options.frozenRightViewportMinWidth>m?d:f):i.width=f,c=0}for(t=0;t<=u;t++)i=columns[t],hasFrozenColumns()&&t>options.frozenColumn?i.width:p+=i.width;if(options.forceFitColumns)for(c=-h,e=u+1;e<columns.length;e++)(i=columns[e]).resizable&&(a=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<a?(c+=i.previousWidth-a,i.width=a):(i.width=i.previousWidth+c,c=0),hasFrozenColumns()&&e>options.frozenColumn?i.width:p+=i.width);else for(e=u+1;e<columns.length;e++)i=columns[e],hasFrozenColumns()&&e>options.frozenColumn?i.width:p+=i.width}hasFrozenColumns()&&p!=canvasWidthL&&($headerL.width(p+1e3),$paneHeaderR.css("left",p)),applyColumnHeaderWidths(),applyColumnGroupHeaderWidths(),options.syncColumnCellResize&&applyColumnWidths(),trigger(self.onColumnsDrag,{triggeredByColumn:$(this).parent().attr("id").replace(uid,""),resizeHandle:$(this)})})).on("dragend",(function(t,n){$(this).parent().removeClass("slick-header-column-active");var s,r=$(this).parent().attr("id").replace(uid,"");for(!0===trigger(self.onBeforeColumnsResize,{triggeredByColumn:r})&&(applyColumnHeaderWidths(),applyColumnGroupHeaderWidths()),e=0;e<columns.length;e++)i=columns[e],s=$(o[e]).outerWidth(),i.previousWidth!==s&&i.rerenderOnResize&&invalidateAllRows();updateCanvasWidth(!0),render(),trigger(self.onColumnsResized,{triggeredByColumn:r}),setTimeout((function(){columnResizeDragging=!1}),300)})).on("dblclick",(function(){var e=$(this).parent().attr("id").replace(uid,"");trigger(self.onColumnsResizeDblClick,{triggeredByColumn:e})})))}))}function getVBoxDelta(e){var t=0;return e&&"function"==typeof e.css&&$.each(["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],(function(i,n){t+=parseFloat(e.css(n))||0})),t}function setFrozenOptions(){if(options.frozenColumn=options.frozenColumn>=0&&options.frozenColumn<columns.length?parseInt(options.frozenColumn):-1,options.frozenRow>-1){hasFrozenRows=!0,frozenRowsHeight=options.frozenRow*options.rowHeight;var e=getDataLength();actualFrozenRow=options.frozenBottom?e-options.frozenRow:options.frozenRow}else hasFrozenRows=!1}function setPaneVisibility(){hasFrozenColumns()?($paneHeaderR.show(),$paneTopR.show(),hasFrozenRows?($paneBottomL.show(),$paneBottomR.show()):($paneBottomR.hide(),$paneBottomL.hide())):($paneHeaderR.hide(),$paneTopR.hide(),$paneBottomR.hide(),hasFrozenRows?$paneBottomL.show():($paneBottomR.hide(),$paneBottomL.hide()))}function setOverflow(){$viewportTopL.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"scroll":hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"auto","overflow-y":!hasFrozenColumns()&&options.alwaysShowVerticalScroll?"scroll":hasFrozenColumns()?"hidden":hasFrozenRows?"scroll":"auto"}),$viewportTopR.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"scroll":hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"auto","overflow-y":options.alwaysShowVerticalScroll?"scroll":(hasFrozenColumns(),hasFrozenRows?"scroll":"auto")}),$viewportBottomL.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"scroll":"auto":(hasFrozenRows&&options.alwaysAllowHorizontalScroll,"auto"),"overflow-y":!hasFrozenColumns()&&options.alwaysShowVerticalScroll?"scroll":hasFrozenColumns()?"hidden":hasFrozenRows?"scroll":"auto"}),$viewportBottomR.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"scroll":"auto":(hasFrozenRows&&options.alwaysAllowHorizontalScroll,"auto"),"overflow-y":options.alwaysShowVerticalScroll?"scroll":(hasFrozenColumns(),"auto")}),options.viewportClass&&($viewportTopL.toggleClass(options.viewportClass,!0),$viewportTopR.toggleClass(options.viewportClass,!0),$viewportBottomL.toggleClass(options.viewportClass,!0),$viewportBottomR.toggleClass(options.viewportClass,!0))}function setScroller(){hasFrozenColumns()?($headerScrollContainer=$headerScrollerR,$headerRowScrollContainer=$headerRowScrollerR,$footerRowScrollContainer=$footerRowScrollerR,hasFrozenRows?options.frozenBottom?($viewportScrollContainerX=$viewportBottomR,$viewportScrollContainerY=$viewportTopR):$viewportScrollContainerX=$viewportScrollContainerY=$viewportBottomR:$viewportScrollContainerX=$viewportScrollContainerY=$viewportTopR):($headerScrollContainer=$headerScrollerL,$headerRowScrollContainer=$headerRowScrollerL,$footerRowScrollContainer=$footerRowScrollerL,hasFrozenRows?options.frozenBottom?($viewportScrollContainerX=$viewportBottomL,$viewportScrollContainerY=$viewportTopL):$viewportScrollContainerX=$viewportScrollContainerY=$viewportBottomL:$viewportScrollContainerX=$viewportScrollContainerY=$viewportTopL)}function measureCellPaddingAndBorder(){var e,t=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=$.fn.jquery.split(".");jQueryNewWidthBehaviour=1==n[0]&&n[1]>=8||n[0]>=2,e=$("<div class='ui-state-default slick-header-column' style='visibility:hidden'>-</div>").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,(function(t,i){headerColumnWidthDiff+=parseFloat(e.css(i))||0})),$.each(i,(function(t,i){headerColumnHeightDiff+=parseFloat(e.css(i))||0}))),e.remove();var o=$("<div class='slick-row' />").appendTo($canvas);e=$("<div class='slick-cell' id='' style='visibility:hidden'>-</div>").appendTo(o),cellWidthDiff=cellHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,(function(t,i){cellWidthDiff+=parseFloat(e.css(i))||0})),$.each(i,(function(t,i){cellHeightDiff+=parseFloat(e.css(i))||0}))),o.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$("<style type='text/css' rel='stylesheet' />").appendTo($("head"));for(var e=options.rowHeight-cellHeightDiff,t=["."+uid+" .slick-group-header-column { left: 1000px; }","."+uid+" .slick-header-column { left: 1000px; }","."+uid+" .slick-top-panel { height:"+options.topPanelHeight+"px; }","."+uid+" .slick-preheader-panel { height:"+options.preHeaderPanelHeight+"px; }","."+uid+" .slick-headerrow-columns { height:"+options.headerRowHeight+"px; }","."+uid+" .slick-footerrow-columns { height:"+options.footerRowHeight+"px; }","."+uid+" .slick-cell { height:"+e+"px; }","."+uid+" .slick-row { height:"+options.rowHeight+"px; }"],i=0;i<columns.length;i++)t.push("."+uid+" .l"+i+" { }"),t.push("."+uid+" .r"+i+" { }");$style[0].styleSheet?$style[0].styleSheet.cssText=t.join(" "):$style[0].appendChild(document.createTextNode(t.join(" ")))}function getColumnCssRules(e){var t;if(!stylesheet){var i=document.styleSheets;for(t=0;t<i.length;t++)if((i[t].ownerNode||i[t].owningElement)==$style[0]){stylesheet=i[t];break}if(!stylesheet)throw new Error("SlickGrid Cannot find stylesheet.");columnCssRulesL=[],columnCssRulesR=[];var n,o,s=stylesheet.cssRules||stylesheet.rules;for(t=0;t<s.length;t++){var r=s[t].selectorText;(n=/\.l\d+/.exec(r))?(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesL[o]=s[t]):(n=/\.r\d+/.exec(r))&&(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesR[o]=s[t])}}return{left:columnCssRulesL[e],right:columnCssRulesR[e]}}function removeCssRules(){$style.remove(),stylesheet=null}function destroy(e){getEditorLock().cancelCurrentEdit(),trigger(self.onBeforeDestroy,{});for(var t=plugins.length;t--;)unregisterPlugin(plugins[t]);options.enableColumnReorder&&$headers.filter(":ui-sortable").sortable("destroy"),unbindAncestorScrollEvents(),$container.off(".slickgrid"),removeCssRules(),$canvas.off(),$viewport.off(),$headerScroller.off(),$headerRowScroller.off(),$footerRow&&$footerRow.off(),$footerRowScroller&&$footerRowScroller.off(),$preHeaderPanelScroller&&$preHeaderPanelScroller.off(),$focusSink.off(),$(".slick-resizable-handle").off(),$(".slick-header-column").off(),$container.empty().removeClass(uid),e&&destroyAllElements()}function destroyAllElements(){$activeCanvasNode=null,$activeViewportNode=null,$boundAncestors=null,$canvas=null,$canvasTopL=null,$canvasTopR=null,$canvasBottomL=null,$canvasBottomR=null,$container=null,$focusSink=null,$focusSink2=null,$groupHeaders=null,$groupHeadersL=null,$groupHeadersR=null,$headerL=null,$headerR=null,$headers=null,$headerRow=null,$headerRowL=null,$headerRowR=null,$headerRowSpacerL=null,$headerRowSpacerR=null,$headerRowScrollContainer=null,$headerRowScroller=null,$headerRowScrollerL=null,$headerRowScrollerR=null,$headerScrollContainer=null,$headerScroller=null,$headerScrollerL=null,$headerScrollerR=null,$hiddenParents=null,$footerRow=null,$footerRowL=null,$footerRowR=null,$footerRowSpacerL=null,$footerRowSpacerR=null,$footerRowScroller=null,$footerRowScrollerL=null,$footerRowScrollerR=null,$footerRowScrollContainer=null,$preHeaderPanel=null,$preHeaderPanelR=null,$preHeaderPanelScroller=null,$preHeaderPanelScrollerR=null,$preHeaderPanelSpacer=null,$preHeaderPanelSpacerR=null,$topPanel=null,$topPanelScroller=null,$style=null,$topPanelScrollerL=null,$topPanelScrollerR=null,$topPanelL=null,$topPanelR=null,$paneHeaderL=null,$paneHeaderR=null,$paneTopL=null,$paneTopR=null,$paneBottomL=null,$paneBottomR=null,$viewport=null,$viewportTopL=null,$viewportTopR=null,$viewportBottomL=null,$viewportBottomR=null,$viewportScrollContainerX=null,$viewportScrollContainerY=null}var canvas=null,canvas_context=null;function autosizeColumn(e,t){var i=e;if("number"==typeof e)i=columns[e];else if("string"==typeof e)for(var n=0;n<columns.length;n++)columns[n].Id===e&&(i=columns[n]);getColAutosizeWidth(i,$(getCanvasNode(0,0)),t)}function autosizeColumns(e,t){if((e=e||options.autosizeColsMode)!==Slick.GridAutosizeColsMode.LegacyForceFit&&e!==Slick.GridAutosizeColsMode.LegacyOff){if(e!==Slick.GridAutosizeColsMode.None){(canvas=document.createElement("canvas"))&&canvas.getContext&&(canvas_context=canvas.getContext("2d"));var i,n,o,s,r=$(getCanvasNode(0,0)),l=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,a=0,d=0,u=0,c=0,h=0;for(i=0;i<columns.length;i++)getColAutosizeWidth(n=columns[i],r,t),h+=n.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?n.width:0,c+=n.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?n.width:n.minWidth,a+=n.autoSize.widthPx,d+=n.autoSize.sizeToRemaining?0:n.autoSize.widthPx,u+=n.autoSize.sizeToRemaining&&n.minWidth||0;var p=a-d;if(e===Slick.GridAutosizeColsMode.FitViewportToCols){var m=a+scrollbarDimensions.width;e=Slick.GridAutosizeColsMode.IgnoreViewport,options.viewportMaxWidthPx&&m>options.viewportMaxWidthPx?(m=options.viewportMaxWidthPx,e=Slick.GridAutosizeColsMode.FitColsToViewport):options.viewportMinWidthPx&&m<options.viewportMinWidthPx&&(m=options.viewportMinWidthPx,e=Slick.GridAutosizeColsMode.FitColsToViewport),$container.width(m)}if(e===Slick.GridAutosizeColsMode.FitColsToViewport)if(p>0&&d<l-u)for(i=0;i<columns.length;i++){var f=l-d;o=(n=columns[i]).autoSize.sizeToRemaining?f*n.autoSize.widthPx/p:n.autoSize.widthPx,n.rerenderOnResize&&n.width!=o&&(s=!0),n.width=o}else if(options.viewportSwitchToScrollModeWidthPercent&&d+u>l*options.viewportSwitchToScrollModeWidthPercent/100||c>l)e=Slick.GridAutosizeColsMode.IgnoreViewport;else{var g=d-h,v=l-h-u;for(i=0;i<columns.length;i++)o=(n=columns[i]).width,n.autoSize.autosizeMode!==Slick.ColAutosizeMode.Locked&&(n.autoSize.sizeToRemaining?o=n.minWidth:((o=v/g*n.autoSize.widthPx)<n.minWidth&&(o=n.minWidth),g-=n.autoSize.widthPx,v-=o)),n.rerenderOnResize&&n.width!=o&&(s=!0),n.width=o}if(e===Slick.GridAutosizeColsMode.IgnoreViewport)for(i=0;i<columns.length;i++)o=columns[i].autoSize.widthPx,columns[i].rerenderOnResize&&columns[i].width!=o&&(s=!0),columns[i].width=o;reRenderColumns(s)}}else legacyAutosizeColumns()}function LogColWidths(){for(var e="Col Widths:",t=0;t<columns.length;t++)e+=" "+columns[t].width;console.log(e)}function getColAutosizeWidth(e,t,i){var n=e.autoSize;if(n.widthPx=e.width,n.autosizeMode!==Slick.ColAutosizeMode.Locked&&n.autosizeMode!==Slick.ColAutosizeMode.Guide){var o=getDataLength();if(n.autosizeMode===Slick.ColAutosizeMode.ContentIntelligent){var s,r=n.colDataTypeOf;if(o>0){var l=getDataItem(0);l&&"object"==(r=typeof(s=l[e.field]))&&(s instanceof Date&&(r="date"),"undefined"!=typeof moment&&s instanceof moment&&(r="moment"))}"boolean"===r&&(n.colValueArray=[!0,!1]),"number"===r&&(n.valueFilterMode=Slick.ValueFilterMode.GetGreatestAndSub,n.rowSelectionMode=Slick.RowSelectionMode.AllRows),"string"===r&&(n.valueFilterMode=Slick.ValueFilterMode.GetLongestText,n.rowSelectionMode=Slick.RowSelectionMode.AllRows,n.allowAddlPercent=5),"date"===r&&(n.colValueArray=[new Date(2009,8,30,12,20,20)]),"moment"===r&&"undefined"!=typeof moment&&(n.colValueArray=[moment([2009,8,30,12,20,20])])}var a=getColContentSize(e,t,i);a=a*(n.allowAddlPercent?1+n.allowAddlPercent/100:1)+options.autosizeColPaddingPx,e.minWidth&&a<e.minWidth&&(a=e.minWidth),e.maxWidth&&a>e.maxWidth&&(a=e.maxWidth),n.widthPx=a}}function getColContentSize(e,t,i){var n,o=e.autoSize,s=1,r=0,l=0;if(o.ignoreHeaderText||(l=getColHeaderWidth(e)),0===l&&(l=e.width?e.width:e.maxWidth?e.maxWidth:e.minWidth?e.minWidth:20),o.colValueArray)return r=getColWidth(e,t,o.colValueArray),Math.max(l,r);var a=getData();if(a.getItems&&(a=a.getItems()),0===a.length)return l;var d=(i?o.rowSelectionModeOnInit:void 0)||o.rowSelectionMode;if(d===Slick.RowSelectionMode.FirstRow&&(a=a.slice(0,1)),d===Slick.RowSelectionMode.LastRow&&(a=a.slice(a.length-1,a.length)),d===Slick.RowSelectionMode.FirstNRows&&(a=a.slice(0,o.rowSelectionCount)),o.valueFilterMode===Slick.ValueFilterMode.DeDuplicate){var u={};for(c=0,n=a.length;c<n;c++)u[a[c][e.field]]=!0;if(Object.keys)a=Object.keys(u);else for(var c in a=[],u)a.push(c)}if(o.valueFilterMode===Slick.ValueFilterMode.GetGreatestAndSub){var h=0,p=0;for(c=0,n=a.length;c<n;c++)f=a[c][e.field],Math.abs(f)>p&&(h=f,p=Math.abs(f));h=""+h,a=[h=+(h=Array(h.length+1).join("9"))]}if(o.valueFilterMode===Slick.ValueFilterMode.GetLongestTextAndSub){var m=0;for(c=0,n=a.length;c<n;c++)((f=a[c][e.field])||"").length>m&&(m=f.length);f=Array(m+1).join("m"),s=options.autosizeTextAvgToMWidthRatio,a=[f]}if(o.valueFilterMode===Slick.ValueFilterMode.GetLongestText){var f="",g=(m=0,0);for(c=0,n=a.length;c<n;c++)((f=a[c][e.field])||"").length>m&&(m=f.length,g=c);a=[f=a[g][e.field]]}return r=getColWidth(e,t,a)*s,Math.max(l,r)}function getColWidth(e,t,i){var n=getColumnIndex(e.id),o=$('<div class="slick-row ui-widget-content"></div>'),s=$('<div class="slick-cell"></div>');s.css({position:"absolute",visibility:"hidden","text-overflow":"initial","white-space":"nowrap"}),o.append(s),t.append(o);var r,l,a,d,u=0;return canvas_context&&e.autoSize.widthEvalMode===Slick.WidthEvalMode.CanvasTextSize?(canvas_context.font=s.css("font-size")+" "+s.css("font-family"),$(i).each((function(t,i){d=Array.isArray(i)?i[e.field]:i,(r=(l=""+d)?canvas_context.measureText(l).width:0)>u&&(u=r,a=l)})),s.html(a),r=s.outerWidth(),o.remove(),s=null,r):($(i).each((function(t,i){d=Array.isArray(i)?i[e.field]:i,applyFormatResultToCellNode(e.formatterOverride?e.formatterOverride(t,n,d,e,i,self):e.formatter?e.formatter(t,n,d,e,i,self):""+d,s[0]),(r=s.outerWidth())>u&&(u=r)})),o.remove(),s=null,u)}function getColHeaderWidth(e){var t=0,i=getUID()+e.id,n=document.getElementById(i),o=i+"_";if(n){var s=n.cloneNode(!0);s.id=o,s.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",n.parentNode.insertBefore(s,n),t=s.offsetWidth,s.parentNode.removeChild(s)}else{var r=getHeader(e);t=(n=$("<div class='ui-state-default slick-header-column' />").html("<span class='slick-column-name'>"+e.name+"</span>").attr("id",o).css({position:"absolute",visibility:"hidden",right:"auto","text-overflow:":"initial","white-space":"nowrap"}).addClass(e.headerCssClass||"").appendTo(r))[0].offsetWidth,r[0].removeChild(n[0])}return t}function legacyAutosizeColumns(){var e,t,i,n=[],o=0,s=0,r=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;for(e=0;e<columns.length;e++)t=columns[e],n.push(t.width),s+=t.width,t.resizable&&(o+=t.width-Math.max(t.minWidth,absoluteColumnMinWidth));for(i=s;s>r&&o;){var l=(s-r)/o;for(e=0;e<columns.length&&s>r;e++){t=columns[e];var a=n[e];if(!(!t.resizable||a<=t.minWidth||a<=absoluteColumnMinWidth)){var d=Math.max(t.minWidth,absoluteColumnMinWidth),u=Math.floor(l*(a-d))||1;s-=u=Math.min(u,a-d),o-=u,n[e]-=u}}if(i<=s)break;i=s}for(i=s;s<r;){var c=r/s;for(e=0;e<columns.length&&s<r;e++){t=columns[e];var h,p=n[e];s+=h=!t.resizable||t.maxWidth<=p?0:Math.min(Math.floor(c*p)-p,t.maxWidth-p||1e6)||1,n[e]+=s<=r?h:0}if(i>=s)break;i=s}var m=!1;for(e=0;e<columns.length;e++)columns[e].rerenderOnResize&&columns[e].width!=n[e]&&(m=!0),columns[e].width=n[e];reRenderColumns(m)}function reRenderColumns(e){applyColumnHeaderWidths(),applyColumnGroupHeaderWidths(),updateCanvasWidth(!0),trigger(self.onAutosizeColumns,{columns:columns}),e&&(invalidateAllRows(),render())}function trigger(e,t,i){return i=i||new Slick.EventData,(t=t||{}).grid=self,e.notify(t,i,self)}function getEditorLock(){return options.editorLock}function getEditController(){return editController}function getColumnIndex(e){return columnsById[e]}function applyColumnGroupHeaderWidths(){if(treeColumns.hasDepth())for(var e=$groupHeadersL.length-1;e>=0;e--)treeColumns.getColumnsInDepth(e),$().add($groupHeadersL[e]).add($groupHeadersR[e]).each((function(e){var t=$(this),i=0;t.width(0===e?getHeadersWidthL():getHeadersWidthR()),t.children().each((function(){var e=$(this),n=$(this).data("column");n.width=0,n.columns.forEach((function(){var e=t.next().children(":eq("+i+++")");n.width+=e.outerWidth()})),e.width(n.width-headerColumnWidthDiff)}))}))}function applyColumnHeaderWidths(){if(initialized){for(var e,t=0,i=$headers.children(),n=columns.length;t<n;t++)e=$(i[t]),jQueryNewWidthBehaviour?e.outerWidth()!==columns[t].width&&e.outerWidth(columns[t].width):e.width()!==columns[t].width-headerColumnWidthDiff&&e.width(columns[t].width-headerColumnWidthDiff);updateColumnCaches()}}function applyColumnWidths(){for(var e,t,i=0,n=0;n<columns.length;n++)e=columns[n].width,(t=getColumnCssRules(n)).left.style.left=i+"px",t.right.style.right=(-1!=options.frozenColumn&&n>options.frozenColumn?canvasWidthR:canvasWidthL)-i-e+"px",options.frozenColumn==n?i=0:i+=columns[n].width}function setSortColumn(e,t){setSortColumns([{columnId:e,sortAsc:t}])}function setSortColumns(e){sortColumns=e;var t=options.numberedMultiColumnSort&&sortColumns.length>1,i=$headers.children();i.removeClass("slick-header-column-sorted").find(".slick-sort-indicator").removeClass("slick-sort-indicator-asc slick-sort-indicator-desc"),i.find(".slick-sort-indicator-numbered").text(""),$.each(sortColumns,(function(e,n){null==n.sortAsc&&(n.sortAsc=!0);var o=getColumnIndex(n.columnId);null!=o&&(i.eq(o).addClass("slick-header-column-sorted").find(".slick-sort-indicator").addClass(n.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),t&&i.eq(o).find(".slick-sort-indicator-numbered").text(e+1))}))}function getSortColumns(){return sortColumns}function handleSelectedRangesChanged(e,t){var i=selectedRows.slice(0);selectedRows=[];for(var n={},o=0;o<t.length;o++)for(var s=t[o].fromRow;s<=t[o].toRow;s++){n[s]||(selectedRows.push(s),n[s]={});for(var r=t[o].fromCell;r<=t[o].toCell;r++)canCellBeSelected(s,r)&&(n[s][columns[r].id]=options.selectedCellCssClass)}setCellCssStyles(options.selectedCellCssClass,n),simpleArrayEquals(i,selectedRows)&&trigger(self.onSelectedRowsChanged,{rows:getSelectedRows(),previousSelectedRows:i},e)}function simpleArrayEquals(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.sort().toString()!==e.sort().toString()}function getColumns(){return columns}function updateColumnCaches(){columnPosLeft=[],columnPosRight=[];for(var e=0,t=0,i=columns.length;t<i;t++)columnPosLeft[t]=e,columnPosRight[t]=e+columns[t].width,options.frozenColumn==t?e=0:e+=columns[t].width}function updateColumnProps(){columnsById={};for(var e=0;e<columns.length;e++){columns[e].width&&(columns[e].widthRequest=columns[e].width);var t=columns[e]=$.extend({},columnDefaults,columns[e]);t.autoSize=$.extend({},columnAutosizeDefaults,t.autoSize),columnsById[t.id]=e,t.minWidth&&t.width<t.minWidth&&(t.width=t.minWidth),t.maxWidth&&t.width>t.maxWidth&&(t.width=t.maxWidth),t.resizable}}function setColumns(e){trigger(self.onBeforeSetColumns,{previousColumns:columns,newColumns:e,grid:self});var t=new Slick.TreeColumns(e);columns=t.hasDepth()?(treeColumns=t).extractColumns():e,updateColumnProps(),updateColumnCaches(),initialized&&(setPaneVisibility(),setOverflow(),invalidateAllRows(),createColumnHeaders(),createColumnGroupHeaders(),createColumnFooter(),removeCssRules(),createCssRules(),resizeCanvas(),updateCanvasWidth(),applyColumnHeaderWidths(),applyColumnWidths(),handleScroll())}function getOptions(){return options}function setOptions(e,t,i,n){if(getEditorLock().commitCurrentEdit()){makeActiveCellNormal(),void 0!==e.showColumnHeader&&setColumnHeaderVisibility(e.showColumnHeader),options.enableAddRow!==e.enableAddRow&&invalidateRow(getDataLength());var o=$.extend(!0,{},options);if(options=$.extend(options,e),trigger(self.onSetOptions,{optionsBefore:o,optionsAfter:options}),validateAndEnforceOptions(),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),t||render(),setFrozenOptions(),setScroller(),n||setOverflow(),i||setColumns(treeColumns.extractColumns()),options.enableMouseWheelScrollHandler&&$viewport&&jQuery.fn.mousewheel){var s=$._data($viewport[0],"events");s&&s.mousewheel||$viewport.on("mousewheel",handleMouseWheel)}else!1===options.enableMouseWheelScrollHandler&&$viewport.off("mousewheel")}}function validateAndEnforceOptions(){options.autoHeight&&(options.leaveSpaceForNewRows=!1),options.forceFitColumns&&(options.autosizeColsMode=Slick.GridAutosizeColsMode.LegacyForceFit,console.log("forceFitColumns option is deprecated - use autosizeColsMode"))}function setData(e,t){data=e,invalidateAllRows(),updateRowCount(),t&&scrollTo(0)}function getData(){return data}function getDataLength(){return data.getLength?data.getLength():data&&data.length||0}function getDataLengthIncludingAddNew(){return getDataLength()+(!options.enableAddRow||pagingActive&&!pagingIsLastPage?0:1)}function getDataItem(e){return data.getItem?data.getItem(e):data[e]}function getTopPanel(){return $topPanel[0]}function setTopPanelVisibility(e,t){var i=!1!==t;options.showTopPanel!=e&&(options.showTopPanel=e,e?i?$topPanelScroller.slideDown("fast",resizeCanvas):($topPanelScroller.show(),resizeCanvas()):i?$topPanelScroller.slideUp("fast",resizeCanvas):($topPanelScroller.hide(),resizeCanvas()))}function setHeaderRowVisibility(e,t){var i=!1!==t;options.showHeaderRow!=e&&(options.showHeaderRow=e,e?i?$headerRowScroller.slideDown("fast",resizeCanvas):($headerRowScroller.show(),resizeCanvas()):i?$headerRowScroller.slideUp("fast",resizeCanvas):($headerRowScroller.hide(),resizeCanvas()))}function setColumnHeaderVisibility(e,t){options.showColumnHeader!=e&&(options.showColumnHeader=e,e?t?$headerScroller.slideDown("fast",resizeCanvas):($headerScroller.show(),resizeCanvas()):t?$headerScroller.slideUp("fast",resizeCanvas):($headerScroller.hide(),resizeCanvas()))}function setFooterRowVisibility(e,t){var i=!1!==t;options.showFooterRow!=e&&(options.showFooterRow=e,e?i?$footerRowScroller.slideDown("fast",resizeCanvas):($footerRowScroller.show(),resizeCanvas()):i?$footerRowScroller.slideUp("fast",resizeCanvas):($footerRowScroller.hide(),resizeCanvas()))}function setPreHeaderPanelVisibility(e,t){var i=!1!==t;options.showPreHeaderPanel!=e&&(options.showPreHeaderPanel=e,e?i?($preHeaderPanelScroller.slideDown("fast",resizeCanvas),$preHeaderPanelScrollerR.slideDown("fast",resizeCanvas)):($preHeaderPanelScroller.show(),$preHeaderPanelScrollerR.show(),resizeCanvas()):i?($preHeaderPanelScroller.slideUp("fast",resizeCanvas),$preHeaderPanelScrollerR.slideUp("fast",resizeCanvas)):($preHeaderPanelScroller.hide(),$preHeaderPanelScrollerR.hide(),resizeCanvas()))}function getContainerNode(){return $container.get(0)}function getRowTop(e){return options.rowHeight*e-offset}function getRowFromPosition(e){return Math.floor((e+offset)/options.rowHeight)}function scrollTo(e){e=Math.max(e,0),e=Math.min(e,th-$viewportScrollContainerY.height()+(viewportHasHScroll||hasFrozenColumns()?scrollbarDimensions.height:0));var t=offset;page=Math.min(n-1,Math.floor(e/ph));var i=e-(offset=Math.round(page*cj));offset!=t&&(cleanupRows(getVisibleRange(i)),updateRowPositions()),prevScrollTop!=i&&(vScrollDir=prevScrollTop+t<i+offset?1:-1,lastRenderedScrollTop=scrollTop=prevScrollTop=i,hasFrozenColumns()&&($viewportTopL[0].scrollTop=i),hasFrozenRows&&($viewportBottomL[0].scrollTop=$viewportBottomR[0].scrollTop=i),$viewportScrollContainerY[0].scrollTop=i,trigger(self.onViewportChanged,{}))}function defaultFormatter(e,t,i,n,o,s){return null==i?"":(i+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function getFormatter(e,t){var i=data.getItemMetadata&&data.getItemMetadata(e),n=i&&i.columns&&(i.columns[t.id]||i.columns[getColumnIndex(t.id)]);return n&&n.formatter||i&&i.formatter||t.formatter||options.formatterFactory&&options.formatterFactory.getFormatter(t)||options.defaultFormatter}function getEditor(e,t){var i=columns[t],n=data.getItemMetadata&&data.getItemMetadata(e),o=n&&n.columns;return o&&o[i.id]&&void 0!==o[i.id].editor?o[i.id].editor:o&&o[t]&&void 0!==o[t].editor?o[t].editor:i.editor||options.editorFactory&&options.editorFactory.getEditor(i)}function getDataItemValueForColumn(e,t){return options.dataItemColumnValueExtractor?options.dataItemColumnValueExtractor(e,t):e[t.field]}function appendRowHtml(e,t,i,n,o){var s=getDataItem(i),r=i<o&&!s,l="slick-row"+(hasFrozenRows&&i<=options.frozenRow?" frozen":"")+(r?" loading":"")+(i===activeRow&&options.showCellSelection?" active":"")+(i%2==1?" odd":" even");s||(l+=" "+options.addNewRowCssClass);var a=data.getItemMetadata&&data.getItemMetadata(i);a&&a.cssClasses&&(l+=" "+a.cssClasses);var d,u,c=getFrozenRowOffset(i),h="<div class='ui-widget-content "+l+"' style='top:"+(getRowTop(i)-c)+"px'>";e.push(h),hasFrozenColumns()&&t.push(h);for(var p=0,m=columns.length;p<m;p++){if(u=columns[p],d=1,a&&a.columns){var f=a.columns[u.id]||a.columns[p];"*"===(d=f&&f.colspan||1)&&(d=m-p)}if(columnPosRight[Math.min(m-1,p+d-1)]>n.leftPx){if(!u.alwaysRenderColumn&&columnPosLeft[p]>n.rightPx)break;hasFrozenColumns()&&p>options.frozenColumn?appendCellHtml(t,i,p,d,s):appendCellHtml(e,i,p,d,s)}else(u.alwaysRenderColumn||hasFrozenColumns()&&p<=options.frozenColumn)&&appendCellHtml(e,i,p,d,s);d>1&&(p+=d-1)}e.push("</div>"),hasFrozenColumns()&&t.push("</div>")}function appendCellHtml(e,t,i,n,o){var s=columns[i],r="slick-cell l"+i+" r"+Math.min(columns.length-1,i+n-1)+(s.cssClass?" "+s.cssClass:"");for(var l in hasFrozenColumns()&&i<=options.frozenColumn&&(r+=" frozen"),t===activeRow&&i===activeCell&&options.showCellSelection&&(r+=" active"),cellCssClasses)cellCssClasses[l][t]&&cellCssClasses[l][t][s.id]&&(r+=" "+cellCssClasses[l][t][s.id]);var a=null,d="";o&&(a=getDataItemValueForColumn(o,s),null==(d=getFormatter(t,s)(t,i,a,s,o,self))&&(d=""));var u=trigger(self.onBeforeAppendCell,{row:t,cell:i,value:a,dataContext:o})||"";u+=d&&d.addClasses?(u?" ":"")+d.addClasses:"";var c=d&&d.toolTip?"title='"+d.toolTip+"'":"",h="";if(s.hasOwnProperty("cellAttrs")&&s.cellAttrs instanceof Object)for(var l in s.cellAttrs)s.cellAttrs.hasOwnProperty(l)&&(h+=" "+l+'="'+s.cellAttrs[l]+'" ');e.push("<div class='"+r+(u?" "+u:"")+"' "+c+h+">"),o&&e.push("[object Object]"!==Object.prototype.toString.call(d)?d:d.text),e.push("</div>"),rowsCache[t].cellRenderQueue.push(i),rowsCache[t].cellColSpans[i]=n}function cleanupRows(e){for(var t in rowsCache){var i=!0;hasFrozenRows&&(options.frozenBottom&&t>=actualFrozenRow||!options.frozenBottom&&t<=actualFrozenRow)&&(i=!1),(t=parseInt(t,10))!==activeRow&&(t<e.top||t>e.bottom)&&i&&removeRowFromCache(t)}options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}function invalidate(){updateRowCount(),invalidateAllRows(),render()}function invalidateAllRows(){for(var e in currentEditor&&makeActiveCellNormal(),rowsCache)removeRowFromCache(e);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}function queuePostProcessedRowForCleanup(e,t,i){for(var n in postProcessgroupId++,t)t.hasOwnProperty(n)&&postProcessedCleanupQueue.push({actionType:"C",groupId:postProcessgroupId,node:e.cellNodesByColumnIdx[0|n],columnIdx:0|n,rowIdx:i});postProcessedCleanupQueue.push({actionType:"R",groupId:postProcessgroupId,node:e.rowNode}),e.rowNode.detach()}function queuePostProcessedCellForCleanup(e,t,i){postProcessedCleanupQueue.push({actionType:"C",groupId:postProcessgroupId,node:e,columnIdx:t,rowIdx:i}),$(e).detach()}function removeRowFromCache(e){var t=rowsCache[e];t&&(options.enableAsyncPostRenderCleanup&&postProcessedRows[e]?queuePostProcessedRowForCleanup(t,postProcessedRows[e],e):t.rowNode.each((function(){this.parentElement&&this.parentElement.removeChild(this)})),delete rowsCache[e],delete postProcessedRows[e],renderedRows--,counter_rows_removed++)}function invalidateRows(e){var t,i;if(e&&e.length){for(vScrollDir=0,i=e.length,t=0;t<i;t++)currentEditor&&activeRow===e[t]&&makeActiveCellNormal(),rowsCache[e[t]]&&removeRowFromCache(e[t]);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}}function invalidateRow(e){(e||0===e)&&invalidateRows([e])}function applyFormatResultToCellNode(e,t,i){null==e&&(e=""),"[object Object]"===Object.prototype.toString.call(e)?(t.innerHTML=sanitizeHtmlString(e.text),e.removeClasses&&!i&&$(t).removeClass(e.removeClasses),e.addClasses&&$(t).addClass(e.addClasses),e.toolTip&&$(t).attr("title",e.toolTip)):t.innerHTML=sanitizeHtmlString(e)}function updateCell(e,t){var i=getCellNode(e,t);if(i){var n=columns[t],o=getDataItem(e);currentEditor&&activeRow===e&&activeCell===t?currentEditor.loadValue(o):(applyFormatResultToCellNode(o?getFormatter(e,n)(e,t,getDataItemValueForColumn(o,n),n,o,self):"",i),invalidatePostProcessingResults(e))}}function updateRow(e){var t=rowsCache[e];if(t){ensureCellNodesInRowsCache(e);var i=getDataItem(e);for(var n in t.cellNodesByColumnIdx)if(t.cellNodesByColumnIdx.hasOwnProperty(n)){var o=columns[n|=0],s=t.cellNodesByColumnIdx[n][0];e===activeRow&&n===activeCell&&currentEditor?currentEditor.loadValue(i):i?applyFormatResultToCellNode(getFormatter(e,o)(e,n,getDataItemValueForColumn(i,o),o,i,self),s):s.innerHTML=""}invalidatePostProcessingResults(e)}}function getViewportHeight(){if(options.autoHeight&&-1==options.frozenColumn||(topPanelH=options.showTopPanel?options.topPanelHeight+getVBoxDelta($topPanelScroller):0,headerRowH=options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0,footerRowH=options.showFooterRow?options.footerRowHeight+getVBoxDelta($footerRowScroller):0),options.autoHeight){var e=$paneHeaderL.outerHeight();e+=options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0,e+=options.showFooterRow?options.footerRowHeight+getVBoxDelta($footerRowScroller):0,e+=getCanvasWidth()>viewportW?scrollbarDimensions.height:0,viewportH=options.rowHeight*getDataLengthIncludingAddNew()+(-1==options.frozenColumn?e:0)}else{var t=options.showColumnHeader?parseFloat($.css($headerScroller[0],"height"))+getVBoxDelta($headerScroller):0,i=options.createPreHeaderPanel&&options.showPreHeaderPanel?options.preHeaderPanelHeight+getVBoxDelta($preHeaderPanelScroller):0;viewportH=parseFloat($.css($container[0],"height",!0))-parseFloat($.css($container[0],"paddingTop",!0))-parseFloat($.css($container[0],"paddingBottom",!0))-t-topPanelH-headerRowH-footerRowH-i}return numVisibleRows=Math.ceil(viewportH/options.rowHeight),viewportH}function getViewportWidth(){viewportW=parseFloat($container.width())}function resizeCanvas(){if(initialized){paneTopH=0,paneBottomH=0,viewportTopH=0,viewportBottomH=0,getViewportWidth(),getViewportHeight(),hasFrozenRows?options.frozenBottom?(paneTopH=viewportH-frozenRowsHeight-scrollbarDimensions.height,paneBottomH=frozenRowsHeight+scrollbarDimensions.height):(paneTopH=frozenRowsHeight,paneBottomH=viewportH-frozenRowsHeight):paneTopH=viewportH,paneTopH+=topPanelH+headerRowH+footerRowH,hasFrozenColumns()&&options.autoHeight&&(paneTopH+=scrollbarDimensions.height),viewportTopH=paneTopH-topPanelH-headerRowH-footerRowH,options.autoHeight&&(hasFrozenColumns()&&$container.height(paneTopH+parseFloat($.css($headerScrollerL[0],"height"))),$paneTopL.css("position","relative")),$paneTopL.css({top:$paneHeaderL.height()||(options.showHeaderRow?options.headerRowHeight:0)+(options.showPreHeaderPanel?options.preHeaderPanelHeight:0),height:paneTopH});var e=$paneTopL.position().top+paneTopH;options.autoHeight||$viewportTopL.height(viewportTopH),hasFrozenColumns()?($paneTopR.css({top:$paneHeaderL.height(),height:paneTopH}),$viewportTopR.height(viewportTopH),hasFrozenRows&&($paneBottomL.css({top:e,height:paneBottomH}),$paneBottomR.css({top:e,height:paneBottomH}),$viewportBottomR.height(paneBottomH))):hasFrozenRows&&($paneBottomL.css({width:"100%",height:paneBottomH}),$paneBottomL.css("top",e)),hasFrozenRows?($viewportBottomL.height(paneBottomH),options.frozenBottom?($canvasBottomL.height(frozenRowsHeight),hasFrozenColumns()&&$canvasBottomR.height(frozenRowsHeight)):($canvasTopL.height(frozenRowsHeight),hasFrozenColumns()&&$canvasTopR.height(frozenRowsHeight))):$viewportTopR.height(viewportTopH),scrollbarDimensions&&scrollbarDimensions.width||(scrollbarDimensions=measureScrollbar()),options.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&autosizeColumns(),updateRowCount(),handleScroll(),lastRenderedScrollLeft=-1,render()}}function updatePagingStatusFromView(e){pagingActive=0!==e.pageSize,pagingIsLastPage=e.pageNum==e.totalPages-1}function updateRowCount(){if(initialized){var e=getDataLength(),t=getDataLengthIncludingAddNew(),i=0,o=hasFrozenRows&&!options.frozenBottom?$canvasBottomL.height():$canvasTopL.height();i=hasFrozenRows?getDataLength()-options.frozenRow:t+(options.leaveSpaceForNewRows?numVisibleRows-1:0);var s=$viewportScrollContainerY.height(),r=viewportHasVScroll;viewportHasVScroll=options.alwaysShowVerticalScroll||!options.autoHeight&&i*options.rowHeight>s,makeActiveCellNormal();var l=e-1;for(var a in rowsCache)a>l&&removeRowFromCache(a);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup(),activeCellNode&&activeRow>l&&resetActiveCell(),o=h,options.autoHeight?h=options.rowHeight*i:(th=Math.max(options.rowHeight*i,s-scrollbarDimensions.height))<maxSupportedCssHeight?(h=ph=th,n=1,cj=0):(ph=(h=maxSupportedCssHeight)/100,n=Math.floor(th/ph),cj=(th-h)/(n-1)),h!==o&&(hasFrozenRows&&!options.frozenBottom?($canvasBottomL.css("height",h),hasFrozenColumns()&&$canvasBottomR.css("height",h)):($canvasTopL.css("height",h),$canvasTopR.css("height",h)),scrollTop=$viewportScrollContainerY[0].scrollTop);var d=scrollTop+offset<=th-s;0==th||0==scrollTop?page=offset=0:scrollTo(d?scrollTop+offset:th-s),h!=o&&options.autoHeight&&resizeCanvas(),options.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&r!=viewportHasVScroll&&autosizeColumns(),updateCanvasWidth(!1)}}function getVisibleRange(e,t){return null==e&&(e=scrollTop),null==t&&(t=scrollLeft),{top:getRowFromPosition(e),bottom:getRowFromPosition(e+viewportH)+1,leftPx:t,rightPx:t+viewportW}}function getRenderedRange(e,t){var i=getVisibleRange(e,t),n=Math.round(viewportH/options.rowHeight),o=options.minRowBuffer;return-1==vScrollDir?(i.top-=n,i.bottom+=o):1==vScrollDir?(i.top-=o,i.bottom+=n):(i.top-=o,i.bottom+=o),i.top=Math.max(0,i.top),i.bottom=Math.min(getDataLengthIncludingAddNew()-1,i.bottom),i.leftPx-=viewportW,i.rightPx+=viewportW,i.leftPx=Math.max(0,i.leftPx),i.rightPx=Math.min(canvasWidth,i.rightPx),i}function ensureCellNodesInRowsCache(e){var t=rowsCache[e];if(t&&t.cellRenderQueue.length)for(var i=t.rowNode.children().last();t.cellRenderQueue.length;){var n=t.cellRenderQueue.pop();t.cellNodesByColumnIdx[n]=i,0===(i=i.prev()).length&&(i=$(t.rowNode[0]).children().last())}}function cleanUpCells(e,t){if(!hasFrozenRows||!(options.frozenBottom&&t>actualFrozenRow||t<=actualFrozenRow)){var i,n,o=rowsCache[t],s=[];for(var r in o.cellNodesByColumnIdx)if(o.cellNodesByColumnIdx.hasOwnProperty(r)&&!((r|=0)<=options.frozenColumn||Array.isArray(columns)&&columns[r]&&columns[r].alwaysRenderColumn)){var l=o.cellColSpans[r];(columnPosLeft[r]>e.rightPx||columnPosRight[Math.min(columns.length-1,r+l-1)]<e.leftPx)&&(t==activeRow&&r==activeCell||s.push(r))}for(;null!=(i=s.pop());)n=o.cellNodesByColumnIdx[i][0],options.enableAsyncPostRenderCleanup&&postProcessedRows[t]&&postProcessedRows[t][i]?queuePostProcessedCellForCleanup(n,i,t):n.parentElement.removeChild(n),delete o.cellColSpans[i],delete o.cellNodesByColumnIdx[i],postProcessedRows[t]&&delete postProcessedRows[t][i]}}function cleanUpAndRenderCells(e){for(var t,i,n,o=[],s=[],r=e.top,l=e.bottom;r<=l;r++)if(t=rowsCache[r]){ensureCellNodesInRowsCache(r),cleanUpCells(e,r),i=0;var a=data.getItemMetadata&&data.getItemMetadata(r);a=a&&a.columns;for(var d=getDataItem(r),u=0,c=columns.length;u<c&&!(columnPosLeft[u]>e.rightPx);u++)if(null==(n=t.cellColSpans[u])){if(n=1,a){var h=a[columns[u].id]||a[u];"*"===(n=h&&h.colspan||1)&&(n=c-u)}columnPosRight[Math.min(c-1,u+n-1)]>e.leftPx&&(appendCellHtml(o,r,u,n,d),i++),u+=n>1?n-1:0}else u+=n>1?n-1:0;i&&s.push(r)}if(o.length){var p,m,f=document.createElement("div");for(f.innerHTML=sanitizeHtmlString(o.join(""));null!=(p=s.pop());){var g;for(t=rowsCache[p];null!=(g=t.cellRenderQueue.pop());)m=f.lastChild,hasFrozenColumns()&&g>options.frozenColumn?t.rowNode[1].appendChild(m):t.rowNode[0].appendChild(m),t.cellNodesByColumnIdx[g]=$(m)}}}function renderRows(e){for(var t=[],i=[],n=[],o=!1,s=getDataLength(),r=e.top,l=e.bottom;r<=l;r++)rowsCache[r]||hasFrozenRows&&options.frozenBottom&&r==getDataLength()||(renderedRows++,n.push(r),rowsCache[r]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},appendRowHtml(t,i,r,e,s),activeCellNode&&activeRow===r&&(o=!0),counter_rows_rendered++);if(n.length){var a=document.createElement("div"),d=document.createElement("div");for(a.innerHTML=sanitizeHtmlString(t.join("")),d.innerHTML=sanitizeHtmlString(i.join("")),r=0,l=n.length;r<l;r++)hasFrozenRows&&n[r]>=actualFrozenRow?hasFrozenColumns()?(rowsCache[n[r]].rowNode=$().add($(a.firstChild)).add($(d.firstChild)),$canvasBottomL[0].appendChild(a.firstChild),$canvasBottomR[0].appendChild(d.firstChild)):(rowsCache[n[r]].rowNode=$().add($(a.firstChild)),$canvasBottomL[0].appendChild(a.firstChild)):hasFrozenColumns()?(rowsCache[n[r]].rowNode=$().add($(a.firstChild)).add($(d.firstChild)),$canvasTopL[0].appendChild(a.firstChild),$canvasTopR[0].appendChild(d.firstChild)):(rowsCache[n[r]].rowNode=$().add($(a.firstChild)),$canvasTopL[0].appendChild(a.firstChild));o&&(activeCellNode=getCellNode(activeRow,activeCell))}}function startPostProcessing(){options.enableAsyncPostRender&&(clearTimeout(h_postrender),h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}function startPostProcessingCleanup(){options.enableAsyncPostRenderCleanup&&(clearTimeout(h_postrenderCleanup),h_postrenderCleanup=setTimeout(asyncPostProcessCleanupRows,options.asyncPostRenderCleanupDelay))}function invalidatePostProcessingResults(e){for(var t in postProcessedRows[e])postProcessedRows[e].hasOwnProperty(t)&&(postProcessedRows[e][t]="C");postProcessFromRow=Math.min(postProcessFromRow,e),postProcessToRow=Math.max(postProcessToRow,e),startPostProcessing()}function updateRowPositions(){for(var e in rowsCache){var t=e?parseInt(e):0;rowsCache[t].rowNode[0].style.top=getRowTop(t)+"px"}}function render(){if(initialized){scrollThrottle.dequeue();var e=getVisibleRange(),t=getRenderedRange();if(cleanupRows(t),lastRenderedScrollLeft!=scrollLeft){if(hasFrozenRows){var i=jQuery.extend(!0,{},t);options.frozenBottom?(i.top=actualFrozenRow,i.bottom=getDataLength()):(i.top=0,i.bottom=options.frozenRow),cleanUpAndRenderCells(i)}cleanUpAndRenderCells(t)}renderRows(t),hasFrozenRows&&(options.frozenBottom?renderRows({top:actualFrozenRow,bottom:getDataLength()-1,leftPx:t.leftPx,rightPx:t.rightPx}):renderRows({top:0,bottom:options.frozenRow-1,leftPx:t.leftPx,rightPx:t.rightPx})),postProcessFromRow=e.top,postProcessToRow=Math.min(getDataLengthIncludingAddNew()-1,e.bottom),startPostProcessing(),lastRenderedScrollTop=scrollTop,lastRenderedScrollLeft=scrollLeft,h_render=null,trigger(self.onRendered,{startRow:e.top,endRow:e.bottom,grid:self})}}function handleHeaderScroll(){handleElementScroll($headerScrollContainer[0])}function handleHeaderRowScroll(){var e=$headerRowScrollContainer[0].scrollLeft;e!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=e)}function handleFooterRowScroll(){var e=$footerRowScrollContainer[0].scrollLeft;e!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=e)}function handlePreHeaderPanelScroll(){handleElementScroll($preHeaderPanelScroller[0])}function handleElementScroll(e){var t=e.scrollLeft;t!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=t)}function handleScroll(){return scrollTop=$viewportScrollContainerY[0].scrollTop,scrollLeft=$viewportScrollContainerX[0].scrollLeft,_handleScroll(!1)}function _handleScroll(e){var t=$viewportScrollContainerY[0].scrollHeight-$viewportScrollContainerY[0].clientHeight,i=$viewportScrollContainerY[0].scrollWidth-$viewportScrollContainerY[0].clientWidth;t=Math.max(0,t),i=Math.max(0,i),scrollTop>t&&(scrollTop=t),scrollLeft>i&&(scrollLeft=i);var o=Math.abs(scrollTop-prevScrollTop),s=Math.abs(scrollLeft-prevScrollLeft);if(s&&(prevScrollLeft=scrollLeft,$viewportScrollContainerX[0].scrollLeft=scrollLeft,$headerScrollContainer[0].scrollLeft=scrollLeft,$topPanelScroller[0].scrollLeft=scrollLeft,$headerRowScrollContainer[0].scrollLeft=scrollLeft,options.createFooterRow&&($footerRowScrollContainer[0].scrollLeft=scrollLeft),options.createPreHeaderPanel&&(hasFrozenColumns()?$preHeaderPanelScrollerR[0].scrollLeft=scrollLeft:$preHeaderPanelScroller[0].scrollLeft=scrollLeft),hasFrozenColumns()?hasFrozenRows&&($viewportTopR[0].scrollLeft=scrollLeft):hasFrozenRows&&($viewportTopL[0].scrollLeft=scrollLeft)),o)if(vScrollDir=prevScrollTop<scrollTop?1:-1,prevScrollTop=scrollTop,e&&($viewportScrollContainerY[0].scrollTop=scrollTop),hasFrozenColumns()&&(hasFrozenRows&&!options.frozenBottom?$viewportBottomL[0].scrollTop=scrollTop:$viewportTopL[0].scrollTop=scrollTop),o<viewportH)scrollTo(scrollTop+offset);else{var r=offset;page=h==viewportH?0:Math.min(n-1,Math.floor(scrollTop*((th-viewportH)/(h-viewportH))*(1/ph))),r!=(offset=Math.round(page*cj))&&invalidateAllRows()}if(s||o){var l=Math.abs(lastRenderedScrollLeft-scrollLeft),a=Math.abs(lastRenderedScrollTop-scrollTop);(l>20||a>20)&&(options.forceSyncScrolling||a<viewportH&&l<viewportW?render():scrollThrottle.enqueue(),trigger(self.onViewportChanged,{}))}return trigger(self.onScroll,{scrollLeft:scrollLeft,scrollTop:scrollTop}),!(!s&&!o)}function ActionThrottle(e,t){var i=!1,n=!1;function o(){n=!1}function s(){i=!0,setTimeout(r,t),e()}function r(){n?(o(),s()):i=!1}return{enqueue:function(){i?n=!0:s()},dequeue:o}}function asyncPostProcessRows(){for(var e=getDataLength();postProcessFromRow<=postProcessToRow;){var t=vScrollDir>=0?postProcessFromRow++:postProcessToRow--,i=rowsCache[t];if(i&&!(t>=e)){for(var n in postProcessedRows[t]||(postProcessedRows[t]={}),ensureCellNodesInRowsCache(t),i.cellNodesByColumnIdx)if(i.cellNodesByColumnIdx.hasOwnProperty(n)){var o=columns[n|=0],s=postProcessedRows[t][n];if(o.asyncPostRender&&"R"!==s){var r=i.cellNodesByColumnIdx[n];r&&o.asyncPostRender(r,t,getDataItem(t),o,"C"===s),postProcessedRows[t][n]="R"}}return void(h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}}}function asyncPostProcessCleanupRows(){if(postProcessedCleanupQueue.length>0){for(var e=postProcessedCleanupQueue[0].groupId;postProcessedCleanupQueue.length>0&&postProcessedCleanupQueue[0].groupId==e;){var t=postProcessedCleanupQueue.shift();if("R"==t.actionType&&$(t.node).remove(),"C"==t.actionType){var i=columns[t.columnIdx];i.asyncPostRenderCleanup&&t.node&&i.asyncPostRenderCleanup(t.node,t.rowIdx,i)}}h_postrenderCleanup=setTimeout(asyncPostProcessCleanupRows,options.asyncPostRenderCleanupDelay)}}function updateCellCssStylesOnRenderedRows(e,t){var i,n,o,s;for(var r in rowsCache){if(s=t&&t[r],o=e&&e[r],s)for(n in s)o&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)))&&$(i).removeClass(s[n]);if(o)for(n in o)s&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)))&&$(i).addClass(o[n])}}function addCellCssStyles(e,t){if(cellCssClasses[e])throw new Error("SlickGrid addCellCssStyles: cell CSS hash with key '"+e+"' already exists.");cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,null),trigger(self.onCellCssStylesChanged,{key:e,hash:t,grid:self})}function removeCellCssStyles(e){cellCssClasses[e]&&(updateCellCssStylesOnRenderedRows(null,cellCssClasses[e]),delete cellCssClasses[e],trigger(self.onCellCssStylesChanged,{key:e,hash:null,grid:self}))}function setCellCssStyles(e,t){var i=cellCssClasses[e];cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,i),trigger(self.onCellCssStylesChanged,{key:e,hash:t,grid:self})}function getCellCssStyles(e){return cellCssClasses[e]}function flashCell(e,t,i){i=i||100,rowsCache[e]&&function e(t,n){n&&setTimeout((function(){t.queue((function(){t.toggleClass(options.cellFlashingCssClass).dequeue(),e(t,n-1)}))}),i)}($(getCellNode(e,t)),4)}function handleMouseWheel(e,t,i,n){scrollTop=Math.max(0,$viewportScrollContainerY[0].scrollTop-n*options.rowHeight),scrollLeft=$viewportScrollContainerX[0].scrollLeft+10*i,_handleScroll(!0)&&e.preventDefault()}function handleDragInit(e,t){var i=getCellFromEvent(e);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragInit,t,e);return!!e.isImmediatePropagationStopped()&&n}function handleDragStart(e,t){var i=getCellFromEvent(e);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragStart,t,e);return!!e.isImmediatePropagationStopped()&&n}function handleDrag(e,t){return trigger(self.onDrag,t,e)}function handleDragEnd(e,t){trigger(self.onDragEnd,t,e)}function handleKeyDown(e){trigger(self.onKeyDown,{row:activeRow,cell:activeCell},e);var t=e.isImmediatePropagationStopped(),i=Slick.keyCode;if(!t&&!e.shiftKey&&!e.altKey){if(options.editable&&currentEditor&&currentEditor.keyCaptureList&&currentEditor.keyCaptureList.indexOf(e.which)>-1)return;e.which==i.HOME?t=e.ctrlKey?navigateTop():navigateRowStart():e.which==i.END&&(t=e.ctrlKey?navigateBottom():navigateRowEnd())}if(!t)if(e.shiftKey||e.altKey||e.ctrlKey)e.which!=i.TAB||!e.shiftKey||e.ctrlKey||e.altKey||(t=navigatePrev());else{if(options.editable&&currentEditor&&currentEditor.keyCaptureList&&currentEditor.keyCaptureList.indexOf(e.which)>-1)return;if(e.which==i.ESCAPE){if(!getEditorLock().isActive())return;cancelEditAndSetFocus()}else e.which==i.PAGE_DOWN?(navigatePageDown(),t=!0):e.which==i.PAGE_UP?(navigatePageUp(),t=!0):e.which==i.LEFT?t=navigateLeft():e.which==i.RIGHT?t=navigateRight():e.which==i.UP?t=navigateUp():e.which==i.DOWN?t=navigateDown():e.which==i.TAB?t=navigateNext():e.which==i.ENTER&&(options.editable&&(currentEditor?activeRow===getDataLength()?navigateDown():commitEditAndSetFocus():getEditorLock().commitCurrentEdit()&&makeActiveCellEditable(void 0,void 0,e)),t=!0)}if(t){e.stopPropagation(),e.preventDefault();try{e.originalEvent.keyCode=0}catch(e){}}}function handleClick(e){if(!currentEditor&&(e.target!=document.activeElement||$(e.target).hasClass("slick-cell"))){var t=getTextSelection();setFocus(),setTextSelection(t)}var i=getCellFromEvent(e);if(i&&(null===currentEditor||activeRow!=i.row||activeCell!=i.cell)&&(trigger(self.onClick,{row:i.row,cell:i.cell},e),!e.isImmediatePropagationStopped()&&canCellBeActive(i.row,i.cell)&&(!getEditorLock().isActive()||getEditorLock().commitCurrentEdit()))){scrollRowIntoView(i.row,!1);var n=e.target&&e.target.className===Slick.preClickClassName,o=columns[i.cell],s=!!(options.editable&&o&&o.editor&&options.suppressActiveCellChangeOnEdit);setActiveCellInternal(getCellNode(i.row,i.cell),null,n,s,e)}}function handleContextMenu(e){var t=$(e.target).closest(".slick-cell",$canvas);0!==t.length&&(activeCellNode===t[0]&&null!==currentEditor||trigger(self.onContextMenu,{},e))}function handleDblClick(e){var t=getCellFromEvent(e);!t||null!==currentEditor&&activeRow==t.row&&activeCell==t.cell||(trigger(self.onDblClick,{row:t.row,cell:t.cell},e),e.isImmediatePropagationStopped()||options.editable&&gotoCell(t.row,t.cell,!0,e))}function handleHeaderMouseEnter(e){trigger(self.onHeaderMouseEnter,{column:$(this).data("column"),grid:self},e)}function handleHeaderMouseLeave(e){trigger(self.onHeaderMouseLeave,{column:$(this).data("column"),grid:self},e)}function handleHeaderRowMouseEnter(e){trigger(self.onHeaderRowMouseEnter,{column:$(this).data("column"),grid:self},e)}function handleHeaderRowMouseLeave(e){trigger(self.onHeaderRowMouseLeave,{column:$(this).data("column"),grid:self},e)}function handleHeaderContextMenu(e){var t=$(e.target).closest(".slick-header-column",".slick-header-columns"),i=t&&t.data("column");trigger(self.onHeaderContextMenu,{column:i},e)}function handleHeaderClick(e){if(!columnResizeDragging){var t=$(e.target).closest(".slick-header-column",".slick-header-columns"),i=t&&t.data("column");i&&trigger(self.onHeaderClick,{column:i},e)}}function handleFooterContextMenu(e){var t=$(e.target).closest(".slick-footerrow-column",".slick-footerrow-columns"),i=t&&t.data("column");trigger(self.onFooterContextMenu,{column:i},e)}function handleFooterClick(e){var t=$(e.target).closest(".slick-footerrow-column",".slick-footerrow-columns"),i=t&&t.data("column");trigger(self.onFooterClick,{column:i},e)}function handleMouseEnter(e){trigger(self.onMouseEnter,{},e)}function handleMouseLeave(e){trigger(self.onMouseLeave,{},e)}function cellExists(e,t){return!(e<0||e>=getDataLength()||t<0||t>=columns.length)}function getCellFromPoint(e,t){for(var i=getRowFromPosition(t),n=0,o=0,s=0;s<columns.length&&o<e;s++)o+=columns[s].width,n++;return n<0&&(n=0),{row:i,cell:n-1}}function getCellFromNode(e){var t=/l\d+/.exec(e.className);if(!t)throw new Error("SlickGrid getCellFromNode: cannot get cell - "+e.className);return parseInt(t[0].substr(1,t[0].length-1),10)}function getRowFromNode(e){for(var t in rowsCache)for(var i in rowsCache[t].rowNode)if(rowsCache[t].rowNode[i]===e)return t?parseInt(t):0;return null}function getFrozenRowOffset(e){return hasFrozenRows?options.frozenBottom?e>=actualFrozenRow?h<viewportTopH?actualFrozenRow*options.rowHeight:h:0:e>=actualFrozenRow?frozenRowsHeight:0:0}function getCellFromEvent(e){var t,i,n=$(e.target).closest(".slick-cell",$canvas);if(!n.length)return null;if(t=getRowFromNode(n[0].parentNode),hasFrozenRows){var o=n.parents(".grid-canvas").offset(),s=0;n.parents(".grid-canvas-bottom").length&&(s=options.frozenBottom?$canvasTopL.height():frozenRowsHeight),t=getCellFromPoint(e.clientX-o.left,e.clientY-o.top+s+$(document).scrollTop()).row}return i=getCellFromNode(n[0]),null==t||null==i?null:{row:t,cell:i}}function getCellNodeBox(e,t){if(!cellExists(e,t))return null;for(var i=getFrozenRowOffset(e),n=getRowTop(e)-i,o=n+options.rowHeight-1,s=0,r=0;r<t;r++)s+=columns[r].width,options.frozenColumn==r&&(s=0);return{top:n,left:s,bottom:o,right:s+columns[t].width}}function resetActiveCell(){setActiveCellInternal(null,!1)}function setFocus(){-1==tabbingDirection?$focusSink[0].focus():$focusSink2[0].focus()}function scrollCellIntoView(e,t,i){if(scrollRowIntoView(e,i),!(t<=options.frozenColumn)){var n=getColspan(e,t);internalScrollColumnIntoView(columnPosLeft[t],columnPosRight[t+(n>1?n-1:0)])}}function internalScrollColumnIntoView(e,t){var i=scrollLeft+$viewportScrollContainerX.width();e<scrollLeft?($viewportScrollContainerX.scrollLeft(e),handleScroll(),render()):t>i&&($viewportScrollContainerX.scrollLeft(Math.min(e,t-$viewportScrollContainerX[0].clientWidth)),handleScroll(),render())}function scrollColumnIntoView(e){internalScrollColumnIntoView(columnPosLeft[e],columnPosRight[e])}function setActiveCellInternal(e,t,i,n,o){if(null!==activeCellNode&&(makeActiveCellNormal(),$(activeCellNode).removeClass("active"),rowsCache[activeRow]&&rowsCache[activeRow].rowNode.removeClass("active")),null!=(activeCellNode=e)){var s=$(activeCellNode),r=s.offset(),l=Math.floor(s.parents(".grid-canvas").offset().top),a=s.parents(".grid-canvas-bottom").length;hasFrozenRows&&a&&(l-=options.frozenBottom?$canvasTopL.height():frozenRowsHeight);var d=getCellFromPoint(r.left,Math.ceil(r.top)-l);activeRow=d.row,activeCell=activePosX=activeCell=activePosX=getCellFromNode(activeCellNode),null==t&&(t=activeRow==getDataLength()||options.autoEdit),options.showCellSelection&&(s.addClass("active"),rowsCache[activeRow]&&rowsCache[activeRow].rowNode.addClass("active")),options.editable&&t&&isCellPotentiallyEditable(activeRow,activeCell)&&(clearTimeout(h_editorLoader),options.asyncEditorLoading?h_editorLoader=setTimeout((function(){makeActiveCellEditable(void 0,i,o)}),options.asyncEditorLoadDelay):makeActiveCellEditable(void 0,i,o))}else activeRow=activeCell=null;n||trigger(self.onActiveCellChanged,getActiveCell())}function clearTextSelection(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}else if(window.getSelection){var e=window.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}}function isCellPotentiallyEditable(e,t){var i=getDataLength();return!(e<i&&!getDataItem(e)||columns[t].cannotTriggerInsert&&e>=i||!getEditor(e,t))}function makeActiveCellNormal(){if(currentEditor){if(trigger(self.onBeforeCellEditorDestroy,{editor:currentEditor}),currentEditor.destroy(),currentEditor=null,activeCellNode){var e=getDataItem(activeRow);if($(activeCellNode).removeClass("editable invalid"),e){var t=columns[activeCell];applyFormatResultToCellNode(getFormatter(activeRow,t)(activeRow,activeCell,getDataItemValueForColumn(e,t),t,e,self),activeCellNode),invalidatePostProcessingResults(activeRow)}}navigator.userAgent.toLowerCase().match(/msie/)&&clearTextSelection(),getEditorLock().deactivate(editController)}}function makeActiveCellEditable(e,t,i){if(activeCellNode){if(!options.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when options.editable is false");if(clearTimeout(h_editorLoader),isCellPotentiallyEditable(activeRow,activeCell)){var n=columns[activeCell],o=getDataItem(activeRow);if(!1!==trigger(self.onBeforeEditCell,{row:activeRow,cell:activeCell,item:o,column:n,target:"grid"})){getEditorLock().activate(editController),$(activeCellNode).addClass("editable");var s=e||getEditor(activeRow,activeCell);e||s.suppressClearOnEdit||(activeCellNode.innerHTML="");var r=data.getItemMetadata&&data.getItemMetadata(activeRow),l=(r=r&&r.columns)&&(r[n.id]||r[activeCell]);currentEditor=new s({grid:self,gridPosition:absBox($container[0]),position:absBox(activeCellNode),container:activeCellNode,column:n,columnMetaData:l,item:o||{},event:i,commitChanges:commitEditAndSetFocus,cancelChanges:cancelEditAndSetFocus}),o&&(currentEditor.loadValue(o),t&&currentEditor.preClick&&currentEditor.preClick()),serializedEditorValue=currentEditor.serializeValue(),currentEditor.position&&handleActiveCellPositionChange()}else setFocus()}}}function commitEditAndSetFocus(){getEditorLock().commitCurrentEdit()&&(setFocus(),options.autoEdit&&navigateDown())}function cancelEditAndSetFocus(){getEditorLock().cancelCurrentEdit()&&setFocus()}function absBox(e){var t={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:$(e).outerWidth(),height:$(e).outerHeight(),visible:!0};t.bottom=t.top+t.height,t.right=t.left+t.width;for(var i=e.offsetParent;(e=e.parentNode)!=document.body&&null!=e;)t.visible&&e.scrollHeight!=e.offsetHeight&&"visible"!=$(e).css("overflowY")&&(t.visible=t.bottom>e.scrollTop&&t.top<e.scrollTop+e.clientHeight),t.visible&&e.scrollWidth!=e.offsetWidth&&"visible"!=$(e).css("overflowX")&&(t.visible=t.right>e.scrollLeft&&t.left<e.scrollLeft+e.clientWidth),t.left-=e.scrollLeft,t.top-=e.scrollTop,e===i&&(t.left+=e.offsetLeft,t.top+=e.offsetTop,i=e.offsetParent),t.bottom=t.top+t.height,t.right=t.left+t.width;return t}function getActiveCellPosition(){return absBox(activeCellNode)}function getGridPosition(){return absBox($container[0])}function handleActiveCellPositionChange(){if(activeCellNode&&(trigger(self.onActiveCellPositionChanged,{}),currentEditor)){var e=getActiveCellPosition();currentEditor.show&&currentEditor.hide&&(e.visible?currentEditor.show():currentEditor.hide()),currentEditor.position&&currentEditor.position(e)}}function getCellEditor(){return currentEditor}function getActiveCell(){return activeCellNode?{row:activeRow,cell:activeCell}:null}function getActiveCellNode(){return activeCellNode}function getTextSelection(){var e=null;if(window.getSelection){var t=window.getSelection();t.rangeCount>0&&(e=t.getRangeAt(0))}return e}function setTextSelection(e){if(window.getSelection&&e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}function scrollRowIntoView(e,t){if(!hasFrozenRows||!options.frozenBottom&&e>actualFrozenRow-1||options.frozenBottom&&e<actualFrozenRow-1){var i=$viewportScrollContainerY.height(),n=hasFrozenRows&&!options.frozenBottom?e-options.frozenRow:e,o=n*options.rowHeight,s=(n+1)*options.rowHeight-i+(viewportHasHScroll?scrollbarDimensions.height:0);(n+1)*options.rowHeight>scrollTop+i+offset?(scrollTo(t?o:s),render()):n*options.rowHeight<scrollTop+offset&&(scrollTo(t?s:o),render())}}function scrollRowToTop(e){scrollTo(e*options.rowHeight),render()}function scrollPage(e){var t=e*numVisibleRows;if(scrollTo((getRowFromPosition(scrollTop+options.rowHeight-1)+t)*options.rowHeight),render(),options.enableCellNavigation&&null!=activeRow){var i=activeRow+t,n=getDataLengthIncludingAddNew();i>=n&&(i=n-1),i<0&&(i=0);for(var o=0,s=null,r=activePosX;o<=activePosX;)canCellBeActive(i,o)&&(s=o),o+=getColspan(i,o);null!==s?(setActiveCellInternal(getCellNode(i,s)),activePosX=r):resetActiveCell()}}function navigatePageDown(){scrollPage(1)}function navigatePageUp(){scrollPage(-1)}function navigateTop(){navigateToRow(0)}function navigateBottom(){navigateToRow(getDataLength()-1)}function navigateToRow(e){var t=getDataLength();if(!t)return!0;if(e<0?e=0:e>=t&&(e=t-1),scrollCellIntoView(e,0,!0),options.enableCellNavigation&&null!=activeRow){for(var i=0,n=null,o=activePosX;i<=activePosX;)canCellBeActive(e,i)&&(n=i),i+=getColspan(e,i);null!==n?(setActiveCellInternal(getCellNode(e,n)),activePosX=o):resetActiveCell()}return!0}function getColspan(e,t){var i=data.getItemMetadata&&data.getItemMetadata(e);if(!i||!i.columns)return 1;var n=i.columns[columns[t].id]||i.columns[t],o=n&&n.colspan;return"*"===o?columns.length-t:o||1}function findFirstFocusableCell(e){for(var t=0;t<columns.length;){if(canCellBeActive(e,t))return t;t+=getColspan(e,t)}return null}function findLastFocusableCell(e){for(var t=0,i=null;t<columns.length;)canCellBeActive(e,t)&&(i=t),t+=getColspan(e,t);return i}function gotoRight(e,t,i){if(t>=columns.length)return null;do{t+=getColspan(e,t)}while(t<columns.length&&!canCellBeActive(e,t));return t<columns.length?{row:e,cell:t,posX:t}:null}function gotoLeft(e,t,i){if(t<=0)return null;var n=findFirstFocusableCell(e);if(null===n||n>=t)return null;for(var o,s={row:e,cell:n,posX:n};;){if(!(o=gotoRight(s.row,s.cell,s.posX)))return null;if(o.cell>=t)return s;s=o}}function gotoDown(e,t,i){for(var n,o=getDataLengthIncludingAddNew();;){if(++e>=o)return null;for(n=t=0;t<=i;)n=t,t+=getColspan(e,t);if(canCellBeActive(e,n))return{row:e,cell:n,posX:i}}}function gotoUp(e,t,i){for(var n;;){if(--e<0)return null;for(n=t=0;t<=i;)n=t,t+=getColspan(e,t);if(canCellBeActive(e,n))return{row:e,cell:n,posX:i}}}function gotoNext(e,t,i){if(null==e&&null==t&&canCellBeActive(e=t=i=0,t))return{row:e,cell:t,posX:t};var n=gotoRight(e,t,i);if(n)return n;var o=null,s=getDataLengthIncludingAddNew();for(e===s-1&&e--;++e<s;)if(null!==(o=findFirstFocusableCell(e)))return{row:e,cell:o,posX:o};return null}function gotoPrev(e,t,i){if(null==e&&null==t&&canCellBeActive(e=getDataLengthIncludingAddNew()-1,t=i=columns.length-1))return{row:e,cell:t,posX:t};for(var n,o;!n&&!(n=gotoLeft(e,t,i));){if(--e<0)return null;t=0,null!==(o=findLastFocusableCell(e))&&(n={row:e,cell:o,posX:o})}return n}function gotoRowStart(e,t,i){var n=findFirstFocusableCell(e);return null===n?null:{row:e,cell:n,posX:n}}function gotoRowEnd(e,t,i){var n=findLastFocusableCell(e);return null===n?null:{row:e,cell:n,posX:n}}function navigateRight(){return navigate("right")}function navigateLeft(){return navigate("left")}function navigateDown(){return navigate("down")}function navigateUp(){return navigate("up")}function navigateNext(){return navigate("next")}function navigatePrev(){return navigate("prev")}function navigateRowStart(){return navigate("home")}function navigateRowEnd(){return navigate("end")}function navigate(e){if(!options.enableCellNavigation)return!1;if(!activeCellNode&&"prev"!=e&&"next"!=e)return!1;if(!getEditorLock().commitCurrentEdit())return!0;setFocus(),tabbingDirection={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1}[e];var t=(0,{up:gotoUp,down:gotoDown,left:gotoLeft,right:gotoRight,prev:gotoPrev,next:gotoNext,home:gotoRowStart,end:gotoRowEnd}[e])(activeRow,activeCell,activePosX);if(t){if(hasFrozenRows&&options.frozenBottom&t.row==getDataLength())return;var i=t.row==getDataLength();return(!options.frozenBottom&&t.row>=actualFrozenRow||options.frozenBottom&&t.row<actualFrozenRow)&&scrollCellIntoView(t.row,t.cell,!i&&options.emulatePagingWhenScrolling),setActiveCellInternal(getCellNode(t.row,t.cell)),activePosX=t.posX,!0}return setActiveCellInternal(getCellNode(activeRow,activeCell)),!1}function getCellNode(e,t){if(rowsCache[e]){ensureCellNodesInRowsCache(e);try{return rowsCache[e].cellNodesByColumnIdx.length>t?rowsCache[e].cellNodesByColumnIdx[t][0]:null}catch(i){return rowsCache[e].cellNodesByColumnIdx[t]}}return null}function setActiveCell(e,t,i,n,o){initialized&&(e>getDataLength()||e<0||t>=columns.length||t<0||options.enableCellNavigation&&(scrollCellIntoView(e,t,!1),setActiveCellInternal(getCellNode(e,t),i,n,o)))}function setActiveRow(e,t,i){initialized&&(e>getDataLength()||e<0||t>=columns.length||t<0||(activeRow=e,i||scrollCellIntoView(e,t||0,!1)))}function canCellBeActive(e,t){if(!options.enableCellNavigation||e>=getDataLengthIncludingAddNew()||e<0||t>=columns.length||t<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(e);if(i&&void 0!==i.focusable)return!!i.focusable;var n=i&&i.columns;return n&&n[columns[t].id]&&void 0!==n[columns[t].id].focusable?!!n[columns[t].id].focusable:n&&n[t]&&void 0!==n[t].focusable?!!n[t].focusable:!!columns[t].focusable}function canCellBeSelected(e,t){if(e>=getDataLength()||e<0||t>=columns.length||t<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(e);if(i&&void 0!==i.selectable)return!!i.selectable;var n=i&&i.columns&&(i.columns[columns[t].id]||i.columns[t]);return n&&void 0!==n.selectable?!!n.selectable:!!columns[t].selectable}function gotoCell(e,t,i,n){if(initialized&&canCellBeActive(e,t)&&getEditorLock().commitCurrentEdit()){scrollCellIntoView(e,t,!1);var o=getCellNode(e,t),s=columns[t],r=!!(options.editable&&s&&s.editor&&options.suppressActiveCellChangeOnEdit);setActiveCellInternal(o,i||e===getDataLength()||options.autoEdit,null,r,n),currentEditor||setFocus()}}function commitCurrentEdit(){var e=getDataItem(activeRow),t=columns[activeCell];if(currentEditor){if(currentEditor.isValueChanged()){var i=currentEditor.validate();if(i.valid){if(activeRow<getDataLength()){var n={row:activeRow,cell:activeCell,editor:currentEditor,serializedValue:currentEditor.serializeValue(),prevSerializedValue:serializedEditorValue,execute:function(){this.editor.applyValue(e,this.serializedValue),updateRow(this.row),trigger(self.onCellChange,{command:"execute",row:this.row,cell:this.cell,item:e,column:t})},undo:function(){this.editor.applyValue(e,this.prevSerializedValue),updateRow(this.row),trigger(self.onCellChange,{command:"undo",row:this.row,cell:this.cell,item:e,column:t})}};options.editCommandHandler?(makeActiveCellNormal(),options.editCommandHandler(e,t,n)):(n.execute(),makeActiveCellNormal())}else{var o={};currentEditor.applyValue(o,currentEditor.serializeValue()),makeActiveCellNormal(),trigger(self.onAddNewRow,{item:o,column:t})}return!getEditorLock().isActive()}return $(activeCellNode).removeClass("invalid"),$(activeCellNode).width(),$(activeCellNode).addClass("invalid"),trigger(self.onValidationError,{editor:currentEditor,cellNode:activeCellNode,validationResults:i,row:activeRow,cell:activeCell,column:t}),currentEditor.focus(),!1}makeActiveCellNormal()}return!0}function cancelCurrentEdit(){return makeActiveCellNormal(),!0}function rowsToRanges(e){for(var t=[],i=columns.length-1,n=0;n<e.length;n++)t.push(new Slick.Range(e[n],0,e[n],i));return t}function getSelectedRows(){if(!selectionModel)throw new Error("SlickGrid Selection model is not set");return selectedRows.slice(0)}function setSelectedRows(e){if(!selectionModel)throw new Error("SlickGrid Selection model is not set");self&&self.getEditorLock&&!self.getEditorLock().isActive()&&selectionModel.setSelectedRanges(rowsToRanges(e))}function sanitizeHtmlString(e){return"string"==typeof e?e.replace(/(\b)(on\S+)(\s*)=|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;)(\/*)(script|script defer)(.*)(&gt;|&gt;">)/gi,""):e}this.debug=function(){var e="";e+="\ncounter_rows_rendered: "+counter_rows_rendered,e+="\ncounter_rows_removed: "+counter_rows_removed,e+="\nrenderedRows: "+renderedRows,e+="\nnumVisibleRows: "+numVisibleRows,e+="\nmaxSupportedCssHeight: "+maxSupportedCssHeight,e+="\nn(umber of pages): "+n,e+="\n(current) page: "+page,e+="\npage height (ph): "+ph,e+="\nvScrollDir: "+vScrollDir,alert(e)},this.eval=function(expr){return eval(expr)},$.extend(this,{slickGridVersion:"2.4.43",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,onRendered:new Slick.Event,onSetOptions:new Slick.Event,registerPlugin:registerPlugin,unregisterPlugin:unregisterPlugin,getPluginByName:getPluginByName,getColumns:getColumns,setColumns:setColumns,getColumnIndex:getColumnIndex,updateColumnHeader:updateColumnHeader,setSortColumn:setSortColumn,setSortColumns:setSortColumns,getSortColumns:getSortColumns,autosizeColumns:autosizeColumns,autosizeColumn:autosizeColumn,getOptions:getOptions,setOptions:setOptions,getData:getData,getDataLength:getDataLength,getDataItem:getDataItem,setData:setData,getSelectionModel:getSelectionModel,setSelectionModel:setSelectionModel,getSelectedRows:getSelectedRows,setSelectedRows:setSelectedRows,getContainerNode:getContainerNode,updatePagingStatusFromView:updatePagingStatusFromView,applyFormatResultToCellNode:applyFormatResultToCellNode,render:render,reRenderColumns:reRenderColumns,invalidate:invalidate,invalidateRow:invalidateRow,invalidateRows:invalidateRows,invalidateAllRows:invalidateAllRows,updateCell:updateCell,updateRow:updateRow,getViewport:getVisibleRange,getRenderedRange:getRenderedRange,resizeCanvas:resizeCanvas,updateRowCount:updateRowCount,scrollRowIntoView:scrollRowIntoView,scrollRowToTop:scrollRowToTop,scrollCellIntoView:scrollCellIntoView,scrollColumnIntoView:scrollColumnIntoView,getCanvasNode:getCanvasNode,getUID:getUID,getHeaderColumnWidthDiff:getHeaderColumnWidthDiff,getScrollbarDimensions:getScrollbarDimensions,getHeadersWidth:getHeadersWidth,getCanvasWidth:getCanvasWidth,getCanvases:getCanvases,getActiveCanvasNode:getActiveCanvasNode,setActiveCanvasNode:setActiveCanvasNode,getViewportNode:getViewportNode,getViewports:getViewports,getActiveViewportNode:getActiveViewportNode,setActiveViewportNode:setActiveViewportNode,focus:setFocus,scrollTo:scrollTo,cacheCssForHiddenInit:cacheCssForHiddenInit,restoreCssFromHiddenInit:restoreCssFromHiddenInit,getCellFromPoint:getCellFromPoint,getCellFromEvent:getCellFromEvent,getActiveCell:getActiveCell,setActiveCell:setActiveCell,setActiveRow:setActiveRow,getActiveCellNode:getActiveCellNode,getActiveCellPosition:getActiveCellPosition,resetActiveCell:resetActiveCell,editActiveCell:makeActiveCellEditable,getCellEditor:getCellEditor,getCellNode:getCellNode,getCellNodeBox:getCellNodeBox,canCellBeSelected:canCellBeSelected,canCellBeActive:canCellBeActive,navigatePrev:navigatePrev,navigateNext:navigateNext,navigateUp:navigateUp,navigateDown:navigateDown,navigateLeft:navigateLeft,navigateRight:navigateRight,navigatePageUp:navigatePageUp,navigatePageDown:navigatePageDown,navigateTop:navigateTop,navigateBottom:navigateBottom,navigateRowStart:navigateRowStart,navigateRowEnd:navigateRowEnd,gotoCell:gotoCell,getTopPanel:getTopPanel,setTopPanelVisibility:setTopPanelVisibility,getPreHeaderPanel:getPreHeaderPanel,getPreHeaderPanelLeft:getPreHeaderPanel,getPreHeaderPanelRight:getPreHeaderPanelRight,setPreHeaderPanelVisibility:setPreHeaderPanelVisibility,getHeader:getHeader,getHeaderColumn:getHeaderColumn,setHeaderRowVisibility:setHeaderRowVisibility,getHeaderRow:getHeaderRow,getHeaderRowColumn:getHeaderRowColumn,setFooterRowVisibility:setFooterRowVisibility,getFooterRow:getFooterRow,getFooterRowColumn:getFooterRowColumn,getGridPosition:getGridPosition,flashCell:flashCell,addCellCssStyles:addCellCssStyles,setCellCssStyles:setCellCssStyles,removeCellCssStyles:removeCellCssStyles,getCellCssStyles:getCellCssStyles,getFrozenRowOffset:getFrozenRowOffset,setColumnHeaderVisibility:setColumnHeaderVisibility,sanitizeHtmlString:sanitizeHtmlString,init:finishInitialization,destroy:destroy,getEditorLock:getEditorLock,getEditController:getEditController}),init()}$.extend(!0,window,{Slick:{Grid:SlickGrid}})})(jQuery)},50:function(){!function(e){e.extend(!0,window,{Slick:{Data:{GroupItemMetadataProvider:function(t){var i,n={checkboxSelect:!1,checkboxSelectCssClass:"slick-group-select-checkbox",checkboxSelectPlugin:null,groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:function(e,t,i,n,s,r){if(!o.enableExpandCollapse)return s.title;var l=15*s.level+"px";return(o.checkboxSelect?'<span class="'+o.checkboxSelectCssClass+" "+(s.selectChecked?"checked":"unchecked")+'"></span>':"")+"<span class='"+o.toggleCssClass+" "+(s.collapsed?o.toggleCollapsedCssClass:o.toggleExpandedCssClass)+"' style='margin-left:"+l+"'></span><span class='"+o.groupTitleCssClass+"' level='"+s.level+"'>"+s.title+"</span>"},totalsFormatter:function(e,t,i,n,o,s){return n.groupTotalsFormatter&&n.groupTotalsFormatter(o,n,s)||""},includeHeaderTotals:!1},o=e.extend(!0,{},n,t);function s(t,n){var s=e(t.target),r=this.getDataItem(n.row);if(r&&r instanceof Slick.Group&&s.hasClass(o.toggleCssClass)){var l=i.getRenderedRange();this.getData().setRefreshHints({ignoreDiffsBefore:l.top,ignoreDiffsAfter:l.bottom+1}),r.collapsed?this.getData().expandGroup(r.groupingKey):this.getData().collapseGroup(r.groupingKey),t.stopImmediatePropagation(),t.preventDefault()}if(r&&r instanceof Slick.Group&&s.hasClass(o.checkboxSelectCssClass)){r.selectChecked=!r.selectChecked,s.removeClass(r.selectChecked?"unchecked":"checked"),s.addClass(r.selectChecked?"checked":"unchecked");var a=i.getData().mapItemsToRows(r.rows);(r.selectChecked?o.checkboxSelectPlugin.selectRows:o.checkboxSelectPlugin.deSelectRows)(a)}}function r(e,t){if(o.enableExpandCollapse&&e.which==Slick.keyCode.SPACE){var n=this.getActiveCell();if(n){var s=this.getDataItem(n.row);if(s&&s instanceof Slick.Group){var r=i.getRenderedRange();this.getData().setRefreshHints({ignoreDiffsBefore:r.top,ignoreDiffsAfter:r.bottom+1}),s.collapsed?this.getData().expandGroup(s.groupingKey):this.getData().collapseGroup(s.groupingKey),e.stopImmediatePropagation(),e.preventDefault()}}}}return{init:function(e){(i=e).onClick.subscribe(s),i.onKeyDown.subscribe(r)},destroy:function(){i&&(i.onClick.unsubscribe(s),i.onKeyDown.unsubscribe(r))},getGroupRowMetadata:function(e){var t=e&&e.level;return{selectable:!1,focusable:o.groupFocusable,cssClasses:o.groupCssClass+" slick-group-level-"+t,formatter:o.includeHeaderTotals&&o.totalsFormatter,columns:{0:{colspan:o.includeHeaderTotals?"1":"*",formatter:o.groupFormatter,editor:null}}}},getTotalsRowMetadata:function(e){var t=e&&e.group&&e.group.level;return{selectable:!1,focusable:o.totalsFocusable,cssClasses:o.totalsCssClass+" slick-group-level-"+t,formatter:o.totalsFormatter,editor:null}},getOptions:function(){return o},setOptions:function(t){e.extend(!0,o,t)}}}}}})}(jQuery)},404:function(e,t){"use strict";function i(e,t,i){return t<=e&&e<=i}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function o(e){this.tokens=[].slice.call(e)}o.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var s=-1;var r="utf-8";function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():r)!==r)throw new Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function a(e){e.fatal,this.handler=function(e,t){if(-1===t)return s;if(i(t,0,127))return t;var n,o;i(t,128,2047)?(n=1,o=192):i(t,2048,65535)?(n=2,o=224):i(t,65536,1114111)&&(n=3,o=240);for(var r=[(t>>6*n)+o];n>0;){var l=t>>6*(n-1);r.push(128|63&l),n-=1}return r}}l.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new a(this._options)),this._streaming=Boolean(t.stream);for(var i,r=[],l=new o(function(e){for(var t=String(e),i=t.length,n=0,o=[];n<i;){var s=t.charCodeAt(n);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319)if(n===i-1)o.push(65533);else{var r=e.charCodeAt(n+1);if(56320<=r&&r<=57343){var l=1023&s,a=1023&r;o.push(65536+(l<<10)+a),n+=1}else o.push(65533)}n+=1}return o}(e));!l.endOfStream()&&(i=this._encoder.handler(l,l.read()))!==s;)Array.isArray(i)?r.push.apply(r,i):r.push(i);if(!this._streaming){for(;(i=this._encoder.handler(l,l.read()))!==s;)Array.isArray(i)?r.push.apply(r,i):r.push(i);this._encoder=null}return new Uint8Array(r)}},t.p=l}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Aggregators:function(){return Qi},BindingService:function(){return Rn},Editors:function(){return rn},Enums:function(){return n},EventPubSubService:function(){return Pn},Filters:function(){return Yi},Formatters:function(){return Tn},GroupTotalFormatters:function(){return xn},SlickCompositeEditorComponent:function(){return Ln},SlickEmptyWarningComponent:function(){return $n},SlickPaginationComponent:function(){return Hn},SlickVanillaGridBundle:function(){return qn},Slicker:function(){return Xn},SortComparers:function(){return Tt},UniversalContainerService:function(){return Yn},Utilities:function(){return Dn}});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{BackendUtilityService:function(){return a}});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{collectionObserver:function(){return d},propertyObserver:function(){return u}});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{default:function(){return ce}});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{CaseType:function(){return se},DelimiterType:function(){return re},EmitterType:function(){return r},EventNamingStyle:function(){return le},ExtensionName:function(){return ae},FieldType:function(){return fe},FileType:function(){return ge},FilterMultiplePassType:function(){return ve},GridAutosizeColsMode:function(){return _e},GridStateType:function(){return Ce},KeyCode:function(){return be},OperatorType:function(){return ye},SortDirection:function(){return we},SortDirectionNumber:function(){return Se},ToggleStateChangeType:function(){return Ee}});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{CancelledException:function(){return Ae},addToArrayWhenNotExists:function(){return Oe},addTreeLevelByMutation:function(){return Pe},addWhiteSpaces:function(){return ke},arrayRemoveItemByIndex:function(){return De},cancellablePromise:function(){return Re},castObservableToPromise:function(){return Ie},decimalFormatted:function(){return Ye},deepCopy:function(){return Ne},destroyObjectDomElementProps:function(){return qe},emptyElement:function(){return Le},emptyObject:function(){return $e},findItemInHierarchicalStructure:function(){return He},findItemInTreeStructure:function(){return Ve},findOrDefault:function(){return ft},flattenToParentChildArray:function(){return Me},formatNumber:function(){return Xe},getDescendantProperty:function(){return Ke},getHtmlElementOffset:function(){return gt},getTranslationPrefix:function(){return Qe},hasData:function(){return ze},htmlEncode:function(){return Be},htmlEncodedStringWithPadding:function(){return Ge},htmlEntityDecode:function(){return We},isNumber:function(){return Ue},isObjectEmpty:function(){return je},mapFlatpickrDateFormatWithFieldType:function(){return Je},mapMomentDateFormatWithFieldType:function(){return Ze},mapOperatorByFieldType:function(){return it},mapOperatorToShorthandDesignation:function(){return tt},mapOperatorType:function(){return et},objectWithoutKey:function(){return nt},parseBoolean:function(){return ot},parseUtcDate:function(){return st},removeAccentFromText:function(){return rt},sanitizeHtmlToText:function(){return lt},sanitizeTextByAvailableSanitizer:function(){return at},setDeepValue:function(){return dt},thousandSeparatorFormatted:function(){return ut},titleCase:function(){return ct},toCamelCase:function(){return ht},toKebabCase:function(){return pt},toSentenceCase:function(){return mt},toSnakeCase:function(){return vt},unflattenParentChildArrayToTree:function(){return Fe},uniqueArray:function(){return Ct},uniqueObjectArray:function(){return bt},unsubscribeAll:function(){return _t}});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{sortByFieldType:function(){return xt}});var r,l={};__webpack_require__.r(l),__webpack_require__.d(l,{default:function(){return ni}}),__webpack_require__(89),function(e){e.local="local",e.remote="remote"}(r||(r={}));class a{constructor(e){this.rxjs=e}addRxJsResource(e){this.rxjs=e}executeBackendProcessesCallback(e,t,i,n){const o=new Date;t&&(null==i?void 0:i.internalPostProcess)&&i.internalPostProcess(t),void 0!==i.postProcess&&(t instanceof Object&&(t.metrics={startTime:e,endTime:o,executionTime:o.valueOf()-e.valueOf(),itemCount:n,totalItemCount:n}),i.postProcess(t))}onBackendError(e,t){if("function"!=typeof(null==t?void 0:t.onError))throw e;t.onError(e)}executeBackendCallback(e,t,i,n,o,s){var l;if(e){i&&!i.clearFilterTriggered&&!i.clearSortTriggered&&(null==s?void 0:s.emitActionChangedCallback)&&s.emitActionChangedCallback.call(this,r.remote);const a=e.process(t);if(a instanceof Promise&&a.then)a.then((t=>{var r;this.executeBackendProcessesCallback(n,t,e,o),null===(r=null==s?void 0:s.successCallback)||void 0===r||r.call(this,i)})).catch((t=>{var n;null===(n=null==s?void 0:s.errorCallback)||void 0===n||n.call(this,i),this.onBackendError(t,e)}));else if(null===(l=this.rxjs)||void 0===l?void 0:l.isObservable(a)){const t=this.rxjs;t.isObservable(null==s?void 0:s.httpCancelRequestSubject)&&(null==s||s.httpCancelRequestSubject.next()),a.pipe(t.takeUntil(t.iif((()=>t.isObservable(null==s?void 0:s.httpCancelRequestSubject)),null==s?void 0:s.httpCancelRequestSubject,t.EMPTY))).subscribe((t=>{var r;this.executeBackendProcessesCallback(n,t,e,o),null===(r=null==s?void 0:s.successCallback)||void 0===r||r.call(this,i)}),(t=>{var n;null===(n=null==s?void 0:s.errorCallback)||void 0===n||n.call(this,i),this.onBackendError(t,e)}))}}}refreshBackendDataset(e){var t,i;let n="";const o=null==e?void 0:e.backendServiceApi;if(!o||!o.service||!o.process)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');if(o.service&&(n=o.service.buildQuery()),n&&""!==n){const s=new Date;o.preProcess&&o.preProcess();const r=null!==(i=null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.totalItems)&&void 0!==i?i:0;this.executeBackendCallback(o,n,null,s,r)}}}function d(e,t){["pop","push","reverse","shift","unshift","splice","sort"].forEach((i=>{e[i]=(...n)=>{const o=Array.prototype[i].apply(e,n);return t.apply(e,[e,n]),o}}))}function u(e,t,i){let n=e[t];Object.defineProperty(e,t,{configurable:!0,get:()=>n,set(o){n=o,i.apply(e,[o,e[t]])}})}Array.prototype.map,Array.prototype.reduce;const c=e=>e;var h=Object.hasOwnProperty,p=Object.setPrototypeOf,m=Object.isFrozen,f=Object.getPrototypeOf,g=Object.getOwnPropertyDescriptor,v=Object.freeze,_=Object.seal,C=Object.create,b="undefined"!=typeof Reflect&&Reflect,y=b.apply,w=b.construct;y||(y=function(e,t,i){return e.apply(t,i)}),v||(v=function(e){return e}),_||(_=function(e){return e}),w||(w=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(t))))});var S,E=M(Array.prototype.forEach),T=M(Array.prototype.pop),x=M(Array.prototype.push),O=M(String.prototype.toLowerCase),k=M(String.prototype.match),D=M(String.prototype.replace),A=M(String.prototype.indexOf),R=M(String.prototype.trim),I=M(RegExp.prototype.test),P=(S=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return w(S,t)});function M(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return y(e,t,n)}}function F(e,t){p&&p(e,null);for(var i=t.length;i--;){var n=t[i];if("string"==typeof n){var o=O(n);o!==n&&(m(t)||(t[i]=o),n=o)}e[n]=!0}return e}function N(e){var t=C(null),i=void 0;for(i in e)y(h,e,[i])&&(t[i]=e[i]);return t}function L(e,t){for(;null!==e;){var i=g(e,t);if(i){if(i.get)return M(i.get);if("function"==typeof i.value)return M(i.value)}e=f(e)}return function(e){return console.warn("fallback value for",e),null}}var H=v(["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"]),V=v(["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"]),z=v(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=v(["animate","color-profile","cursor","discard","fedropshadow","feimage","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"]),W=v(["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"]),G=v(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=v(["#text"]),j=v(["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","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"]),Y=v(["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","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"]),q=v(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),X=v(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),K=_(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Q=_(/<%[\s\S]*|[\s\S]*%>/gm),Z=_(/^data-[\-\w.\u00B7-\uFFFF]/),J=_(/^aria-[\-\w]+$/),ee=_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),te=_(/^(?:\w+script|data):/i),ie=_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function oe(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var se,re,le,ae,de=function(){return"undefined"==typeof window?null:window},ue=function(e,t){if("object"!==(void 0===e?"undefined":ne(e))||"function"!=typeof e.createPolicy)return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ce=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de(),i=function(t){return e(t)};if(i.version="2.3.3",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,l=t.Node,a=t.Element,d=t.NodeFilter,u=t.NamedNodeMap,c=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.Text,p=t.Comment,m=t.DOMParser,f=t.trustedTypes,g=a.prototype,_=L(g,"cloneNode"),C=L(g,"nextSibling"),b=L(g,"childNodes"),y=L(g,"parentNode");if("function"==typeof r){var w=o.createElement("template");w.content&&w.content.ownerDocument&&(o=w.content.ownerDocument)}var S=ue(f,n),M=S&&Le?S.createHTML(""):"",$=o,se=$.implementation,re=$.createNodeIterator,le=$.createDocumentFragment,ae=$.getElementsByTagName,ce=n.importNode,he={};try{he=N(o).documentMode?o.documentMode:{}}catch(e){}var pe={};i.isSupported="function"==typeof y&&se&&void 0!==se.createHTMLDocument&&9!==he;var me=K,fe=Q,ge=Z,ve=J,_e=te,Ce=ie,be=ee,ye=null,we=F({},[].concat(oe(H),oe(V),oe(z),oe(W),oe(U))),Se=null,Ee=F({},[].concat(oe(j),oe(Y),oe(q),oe(X))),Te=null,xe=null,Oe=!0,ke=!0,De=!1,Ae=!1,Re=!1,Ie=!1,Pe=!1,Me=!1,Fe=!1,Ne=!0,Le=!1,$e=!0,He=!0,Ve=!1,ze={},Be=null,We=F({},["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"]),Ge=null,Ue=F({},["audio","video","img","source","image","track"]),je=null,Ye=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Qe=Ke,Ze=!1,Je=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",it=void 0,nt=null,ot=o.createElement("form"),st=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":ne(e))||(e={}),e=N(e),ye="ALLOWED_TAGS"in e?F({},e.ALLOWED_TAGS):we,Se="ALLOWED_ATTR"in e?F({},e.ALLOWED_ATTR):Ee,je="ADD_URI_SAFE_ATTR"in e?F(N(Ye),e.ADD_URI_SAFE_ATTR):Ye,Ge="ADD_DATA_URI_TAGS"in e?F(N(Ue),e.ADD_DATA_URI_TAGS):Ue,Be="FORBID_CONTENTS"in e?F({},e.FORBID_CONTENTS):We,Te="FORBID_TAGS"in e?F({},e.FORBID_TAGS):{},xe="FORBID_ATTR"in e?F({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,ke=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Re=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ne=!1!==e.RETURN_DOM_IMPORT,Le=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,$e=!1!==e.SANITIZE_DOM,He=!1!==e.KEEP_CONTENT,Ve=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Qe=e.NAMESPACE||Ke,Je=Je=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===Je?function(e){return e}:O,Ae&&(ke=!1),Fe&&(Me=!0),ze&&(ye=F({},[].concat(oe(U))),Se=[],!0===ze.html&&(F(ye,H),F(Se,j)),!0===ze.svg&&(F(ye,V),F(Se,Y),F(Se,X)),!0===ze.svgFilters&&(F(ye,z),F(Se,Y),F(Se,X)),!0===ze.mathMl&&(F(ye,W),F(Se,q),F(Se,X))),e.ADD_TAGS&&(ye===we&&(ye=N(ye)),F(ye,e.ADD_TAGS)),e.ADD_ATTR&&(Se===Ee&&(Se=N(Se)),F(Se,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&F(je,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Be===We&&(Be=N(Be)),F(Be,e.FORBID_CONTENTS)),He&&(ye["#text"]=!0),Re&&F(ye,["html","head","body"]),ye.table&&(F(ye,["tbody"]),delete Te.tbody),v&&v(e),nt=e)},rt=F({},["mi","mo","mn","ms","mtext"]),lt=F({},["foreignobject","desc","title","annotation-xml"]),at=F({},V);F(at,z),F(at,B);var dt=F({},W);F(dt,G);var ut=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var i=O(e.tagName),n=O(t.tagName);if(e.namespaceURI===Xe)return t.namespaceURI===Ke?"svg"===i:t.namespaceURI===qe?"svg"===i&&("annotation-xml"===n||rt[n]):Boolean(at[i]);if(e.namespaceURI===qe)return t.namespaceURI===Ke?"math"===i:t.namespaceURI===Xe?"math"===i&&lt[n]:Boolean(dt[i]);if(e.namespaceURI===Ke){if(t.namespaceURI===Xe&&!lt[n])return!1;if(t.namespaceURI===qe&&!rt[n])return!1;var o=F({},["title","style","font","a","script"]);return!dt[i]&&(o[i]||!at[i])}return!1},ct=function(e){x(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=M}catch(t){e.remove()}}},ht=function(e,t){try{x(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){x(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Me||Fe)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,i=void 0;if(Pe)e="<remove></remove>"+e;else{var n=k(e,/^[\r\n\t ]+/);i=n&&n[0]}"application/xhtml+xml"===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var s=S?S.createHTML(e):e;if(Qe===Ke)try{t=(new m).parseFromString(s,Je)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=Ze?"":s}catch(e){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),Qe===Ke?ae.call(t,Re?"html":"body")[0]:Re?t.documentElement:r},mt=function(e){return re.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},ft=function(e){return!(e instanceof h||e instanceof p||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof c&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},gt=function(e){return"object"===(void 0===l?"undefined":ne(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":ne(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,t,n){pe[e]&&E(pe[e],(function(e){e.call(i,t,n,nt)}))},_t=function(e){var t=void 0;if(vt("beforeSanitizeElements",e,null),ft(e))return ct(e),!0;if(k(e.nodeName,/[\u0080-\uFFFF]/))return ct(e),!0;var n=it(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:n,allowedTags:ye}),!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&I(/<[/\w]/g,e.innerHTML)&&I(/<[/\w]/g,e.textContent))return ct(e),!0;if("select"===n&&I(/<template/i,e.innerHTML))return ct(e),!0;if(!ye[n]||Te[n]){if(He&&!Be[n]){var o=y(e)||e.parentNode,s=b(e)||e.childNodes;if(s&&o)for(var r=s.length-1;r>=0;--r)o.insertBefore(_(s[r],!0),C(e))}return ct(e),!0}return e instanceof a&&!ut(e)?(ct(e),!0):"noscript"!==n&&"noembed"!==n||!I(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(t=e.textContent,t=D(t,me," "),t=D(t,fe," "),e.textContent!==t&&(x(i.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ct(e),!0)},Ct=function(e,t,i){if($e&&("id"===t||"name"===t)&&(i in o||i in ot))return!1;if(ke&&!xe[t]&&I(ge,t));else if(Oe&&I(ve,t));else{if(!Se[t]||xe[t])return!1;if(je[t]);else if(I(be,D(i,Ce,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==A(i,"data:")||!Ge[e])if(De&&!I(_e,D(i,Ce,"")));else if(i)return!1}return!0},bt=function(e){var t=void 0,n=void 0,o=void 0,s=void 0;vt("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(s=r.length;s--;){var a=t=r[s],d=a.name,u=a.namespaceURI;if(n=R(t.value),o=it(d),l.attrName=o,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,l),n=l.attrValue,!l.forceKeepAttr&&(ht(d,e),l.keepAttr))if(I(/\/>/i,n))ht(d,e);else{Ae&&(n=D(n,me," "),n=D(n,fe," "));var c=it(e.nodeName);if(Ct(c,o,n))try{u?e.setAttributeNS(u,d,n):e.setAttribute(d,n),T(i.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},yt=function e(t){var i=void 0,n=mt(t);for(vt("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)vt("uponSanitizeShadowNode",i,null),_t(i)||(i.content instanceof s&&e(i.content),bt(i));vt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,o){var r=void 0,a=void 0,d=void 0,u=void 0,c=void 0;if((Ze=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw P("toString is not a function");if("string"!=typeof(e=e.toString()))throw P("dirty is not a string, aborting")}if(!i.isSupported){if("object"===ne(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(gt(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ie||st(o),i.removed=[],"string"==typeof e&&(Ve=!1),Ve);else if(e instanceof l)1===(a=(r=pt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Me&&!Ae&&!Re&&-1===e.indexOf("<"))return S&&Le?S.createHTML(e):e;if(!(r=pt(e)))return Me?null:M}r&&Pe&&ct(r.firstChild);for(var h=mt(Ve?e:r);d=h.nextNode();)3===d.nodeType&&d===u||_t(d)||(d.content instanceof s&&yt(d.content),bt(d),u=d);if(u=null,Ve)return e;if(Me){if(Fe)for(c=le.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return Ne&&(c=ce.call(n,c,!0)),c}var p=Re?r.outerHTML:r.innerHTML;return Ae&&(p=D(p,me," "),p=D(p,fe," ")),S&&Le?S.createHTML(p):p},i.setConfig=function(e){st(e),Ie=!0},i.clearConfig=function(){nt=null,Ie=!1},i.isValidAttribute=function(e,t,i){nt||st({});var n=it(e),o=it(t);return Ct(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],x(pe[e],t))},i.removeHook=function(e){pe[e]&&T(pe[e])},i.removeHooks=function(e){pe[e]&&(pe[e]=[])},i.removeAllHooks=function(){pe={}},i}(),he=__webpack_require__(475),pe=__webpack_require__.n(he);class me{}me.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_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_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_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"},me.treeDataProperties={CHILDREN_PROP:"children",COLLAPSED_PROP:"__collapsed",HAS_CHILDREN_PROP:"__hasChildren",TREE_LEVEL_PROP:"__treeLevel",PARENT_PROP:"__parentId"},me.VALIDATION_REQUIRED_FIELD="Field is required",me.VALIDATION_EDITOR_VALID_NUMBER="Please enter a valid number",me.VALIDATION_EDITOR_VALID_INTEGER="Please enter a valid integer number",me.VALIDATION_EDITOR_INTEGER_BETWEEN="Please enter a valid integer number between {{minValue}} and {{maxValue}}",me.VALIDATION_EDITOR_INTEGER_MAX="Please enter a valid integer number that is lower than {{maxValue}}",me.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE="Please enter a valid integer number that is lower than or equal to {{maxValue}}",me.VALIDATION_EDITOR_INTEGER_MIN="Please enter a valid integer number that is greater than {{minValue}}",me.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE="Please enter a valid integer number that is greater than or equal to {{minValue}}",me.VALIDATION_EDITOR_NUMBER_BETWEEN="Please enter a valid number between {{minValue}} and {{maxValue}}",me.VALIDATION_EDITOR_NUMBER_MAX="Please enter a valid number that is lower than {{maxValue}}",me.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE="Please enter a valid number that is lower than or equal to {{maxValue}}",me.VALIDATION_EDITOR_NUMBER_MIN="Please enter a valid number that is greater than {{minValue}}",me.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE="Please enter a valid number that is greater than or equal to {{minValue}}",me.VALIDATION_EDITOR_DECIMAL_BETWEEN="Please enter a valid number with a maximum of {{maxDecimal}} decimals",me.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN="Please make sure your text length is between {{minLength}} and {{maxLength}} characters",me.VALIDATION_EDITOR_TEXT_MAX_LENGTH="Please make sure your text is less than {{maxLength}} characters",me.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE="Please make sure your text is less than or equal to {{maxLength}} characters",me.VALIDATION_EDITOR_TEXT_MIN_LENGTH="Please make sure your text is more than {{minLength}} character(s)",me.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE="Please make sure your text is at least {{minLength}} character(s)",function(e){e[e.camelCase=0]="camelCase",e[e.pascalCase=1]="pascalCase",e[e.snakeCase=2]="snakeCase",e[e.kebabCase=3]="kebabCase"}(se||(se={})),function(e){e.colon=":",e.comma=",",e.equalSign="=",e.pipe="|",e.semicolon=";",e.space=" ",e.tab="\t",e.doubleColon="::",e.doublePipe="||",e.doubleSemicolon=";;"}(re||(re={})),function(e){e.camelCase="camelCase",e.kebabCase="kebabCase",e.lowerCase="lowerCase",e.lowerCaseWithoutOnPrefix="lowerCaseWithoutOnPrefix"}(le||(le={})),function(e){e.autoTooltip="autoTooltip",e.cellExternalCopyManager="cellExternalCopyManager",e.cellMenu="cellMenu",e.checkboxSelector="checkboxSelector",e.columnPicker="columnPicker",e.contextMenu="contextMenu",e.customTooltip="customTooltip",e.draggableGrouping="draggableGrouping",e.groupItemMetaProvider="groupItemMetaProvider",e.gridMenu="gridMenu",e.headerButton="headerButton",e.headerMenu="headerMenu",e.rowDetailView="rowDetailView",e.rowMoveManager="rowMoveManager",e.rowSelection="rowSelection"}(ae||(ae={}));const fe={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 ge,ve,_e,Ce,be,ye,we,Se,Ee;!function(e){e.csv="csv",e.txt="txt",e.xls="xls",e.xlsx="xlsx"}(ge||(ge={})),function(e){e.merge="merge",e.chain="chain"}(ve||(ve={})),function(e){e.none="NOA",e.legacyOff="LOF",e.legacyForceFit="LFF",e.ignoreViewport="IGV",e.fitColsToViewport="FCV",e.fitViewportToCols="FVC"}(_e||(_e={})),function(e){e.columns="columns",e.filter="filter",e.pagination="pagination",e.pinning="pinning",e.rowSelection="rowSelection",e.sorter="sorter",e.treeData="treeData"}(Ce||(Ce={})),function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.DELETE=46]="DELETE",e[e.DOWN=40]="DOWN",e[e.END=35]="END",e[e.ENTER=13]="ENTER",e[e.ESCAPE=27]="ESCAPE",e[e.HOME=36]="HOME",e[e.INSERT=45]="INSERT",e[e.LEFT=37]="LEFT",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.PAGE_UP=33]="PAGE_UP",e[e.RIGHT=39]="RIGHT",e[e.TAB=9]="TAB",e[e.UP=38]="UP",e[e.SPACE=32]="SPACE"}(be||(be={})),function(e){e.empty="",e.contains="Contains",e.notContains="Not_Contains",e.lessThan="LT",e.lessThanOrEqual="LE",e.greaterThan="GT",e.greaterThanOrEqual="GE",e.notEqual="NE",e.equal="EQ",e.endsWith="EndsWith",e.rangeInclusive="RangeInclusive",e.rangeExclusive="RangeExclusive",e.startsWith="StartsWith",e.in="IN",e.notIn="NOT_IN",e.inContains="IN_CONTAINS",e.notInContains="NOT_IN_CONTAINS",e.inCollection="IN_COLLECTION",e.notInCollection="NOT_IN_COLLECTION"}(ye||(ye={})),function(e){e.asc="asc",e.ASC="ASC",e.desc="desc",e.DESC="DESC"}(we||(we={})),function(e){e[e.asc=1]="asc",e[e.desc=-1]="desc",e[e.neutral=0]="neutral"}(Se||(Se={})),function(e){e.toggleCollapse="toggle-collapse",e.fullExpand="full-expand",e.fullCollapse="full-collapse",e.toggleExpand="toggle-expand"}(Ee||(Ee={}));const Te=ce||i,xe=pe()||he;function Oe(e,t,i="id"){let n=-1;n="object"==typeof t&&i in t?e.findIndex((e=>e[i]===t[i])):e.findIndex((e=>e===t)),n<0&&e.push(t)}function ke(e,t=" "){let i="";for(let n=0;n<e;n++)i+=t;return i}function De(e,t){return e.filter(((e,i)=>t!==i))}class Ae extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Ae.prototype)}}function Re(e){let t=!1;return e instanceof Promise?{promise:e.then((e=>{if(t)throw new Ae("Cancelled Promise");return e})),cancel:()=>t=!0}:e}function Ie(e,t,i=""){let n=t;if(t instanceof Promise)return t;if(e.isObservable(t)&&(n=e.firstValueFrom(t)),!(n instanceof Promise))throw new Error(`Something went wrong, Slickgrid-Universal ${i} is not able to convert the Observable into a Promise.`);return n}function Pe(e,t,i=0){var n;const o=null!==(n=null==t?void 0:t.childrenPropName)&&void 0!==n?n:me.treeDataProperties.CHILDREN_PROP;if(Array.isArray(e))for(const n of e)n&&(Array.isArray(n[o])&&n[o].length>0&&(i++,Pe(n[o],t,i),i--),n[t.levelPropName]=i)}function Me(e,t){var i,n,o,s,r;const l=null!==(i=null==t?void 0:t.identifierPropName)&&void 0!==i?i:"id",a=null!==(n=null==t?void 0:t.childrenPropName)&&void 0!==n?n:me.treeDataProperties.CHILDREN_PROP,d=null!==(o=null==t?void 0:t.hasChildrenPropName)&&void 0!==o?o:me.treeDataProperties.HAS_CHILDREN_PROP,u=null!==(s=null==t?void 0:t.parentPropName)&&void 0!==s?s:me.treeDataProperties.PARENT_PROP,h=null!==(r=null==t?void 0:t.levelPropName)&&void 0!==r?r:me.treeDataProperties.TREE_LEVEL_PROP;return(null==t?void 0:t.shouldAddTreeLevelNumber)&&Pe(e,{childrenPropName:a,levelPropName:h}),function(e,t,i=c,n=(()=>{})){const o=e&&e.length?[{pointer:e,offset:0}]:[],s=[];let r;for(;o.length;)for(r=o.pop();r.offset<r.pointer.length;){const e=r.pointer[r.offset],l=n(e),a=t(e);s.push(i(e,r.node,l,r.nodeId)),r.offset+=1,a&&(o.push(r),r={pointer:a,offset:0,node:e,nodeId:l})}return s}(e,(e=>e[a]),((e,t)=>({[l]:e[l],[u]:void 0!==t?t[l]:null,[d]:!!e[a],...nt(e,a)})))}function Fe(e,t){var i,n,o,s,r;const l=null!==(i=null==t?void 0:t.identifierPropName)&&void 0!==i?i:"id",a=null!==(n=null==t?void 0:t.childrenPropName)&&void 0!==n?n:me.treeDataProperties.CHILDREN_PROP,d=null!==(o=null==t?void 0:t.parentPropName)&&void 0!==o?o:me.treeDataProperties.PARENT_PROP,u=null!==(s=null==t?void 0:t.levelPropName)&&void 0!==s?s:me.treeDataProperties.TREE_LEVEL_PROP,c=null!==(r=null==t?void 0:t.collapsedPropName)&&void 0!==r?r:me.treeDataProperties.COLLAPSED_PROP,h=[],p={};return(e||[]).forEach((e=>p[e[l]]=e)),Object.keys(p).forEach((e=>{var i;const n=p[e];if(d in n&&null!==n[d]&&void 0!==n[d]&&""!==n[d]){if(n[d]in p){const e=p[n[d]];a in e||(e[a]=[]),e[a].push(n),void 0===e[c]&&(e[c]=null!==(i=null==t?void 0:t.initiallyCollapsed)&&void 0!==i&&i)}}else h.push(n)})),Pe(h,{childrenPropName:a,levelPropName:u},0),h}function Ne(e){const t=Object.prototype.toString.call(e).slice(8,-1).toLowerCase();return"object"===t?(()=>{const t={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=Ne(e[i]));return t})():"array"===t?e.map((e=>Ne(e))):e}function Le(e){if(null==e?void 0:e.firstChild)for(;e.firstChild;)e.lastChild&&e.removeChild(e.lastChild);return e}function $e(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t];return e=null,{}}function He(e,t,i){return Ve(e,t,i)}function Ve(e,t,i){if(!i)throw new Error('findRecursive requires parameter "childrenPropertyName"');const n=e.find(t),o=e.filter((e=>i in e&&e[i]));if(n)return n;if(o.length){const e=[];return o.forEach((t=>{i in t&&e.push(...t[i])})),Ve(e,t,i)}}function ze(e){return null!=e&&""!==e}function Be(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return(e||"").toString().replace(/[&<>"']/g,(e=>t[e]))}function We(e){return e.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(t)))}function Ge(e,t){const i=e.length;let n=Be(e);if(i<t)for(let e=i;e<t;e++)n+="&nbsp;";return n}function Ue(e,t=!1){return t?null!=e&&"string"!=typeof e&&!isNaN(e):null!=e&&""!==e&&!isNaN(+e)}function je(e){return!e||e&&"object"==typeof e&&0===Object.keys(e).length}function Ye(e,t,i,n=".",o=""){if(isNaN(+e))return e;const s=void 0===t?2:t,r=void 0===i?2:i;let l=String(Math.round(+e*Math.pow(10,r))/Math.pow(10,r));for(l.indexOf(".")<0&&s>0&&(l+=".");l.length-l.indexOf(".")<=s;)l+="0";const a=l.split(".");let d,u;d=o?a.length>=1?ut(a[0],o):void 0:a.length>=1?a[0]:l,a.length>1&&(u=a[1]);let c="";return void 0!==d&&void 0!==u?c=`${d}${n}${u}`:null!=d&&(c=d),c}function qe(e){if(e)for(const t of Object.keys(e))Array.isArray(e[t])&&qe(e[t]),e[t]instanceof HTMLElement&&(e[t]=null)}function Xe(e,t,i,n,o="",s="",r=".",l=""){if(isNaN(+e))return e;const a=Math.round(1e6*parseFloat(e))/1e6;if(a<0){const e=Math.abs(a);return n?isNaN(t)&&isNaN(i)?`(${o}${ut(`${e}`,l)}${s})`:`(${o}${Ye(e,t,i,r,l)}${s})`:isNaN(t)&&isNaN(i)?`-${o}${ut(`${e}`,l)}${s}`:`-${o}${Ye(e,t,i,r,l)}${s}`}return isNaN(t)&&isNaN(i)?`${o}${ut(`${e}`,l)}${s}`:`${o}${Ye(e,t,i,r,l)}${s}`}function Ke(e,t){return e&&t?t.split(".").reduce(((e,t)=>e&&e[t]),e):e}function Qe(e){return e&&e.translationNamespace?e.translationNamespace+(e.translationNamespaceSeparator||""):""}function Ze(e){let t;switch(e){case fe.dateTime:case fe.dateTimeIso:t="YYYY-MM-DD HH:mm:ss";break;case fe.dateTimeIsoAmPm:t="YYYY-MM-DD hh:mm:ss a";break;case fe.dateTimeIsoAM_PM:t="YYYY-MM-DD hh:mm:ss A";break;case fe.dateTimeShortIso:t="YYYY-MM-DD HH:mm";break;case fe.dateEuro:t="DD/MM/YYYY";break;case fe.dateEuroShort:t="D/M/YY";break;case fe.dateTimeEuro:t="DD/MM/YYYY HH:mm:ss";break;case fe.dateTimeShortEuro:t="DD/MM/YYYY HH:mm";break;case fe.dateTimeEuroAmPm:t="DD/MM/YYYY hh:mm:ss a";break;case fe.dateTimeEuroAM_PM:t="DD/MM/YYYY hh:mm:ss A";break;case fe.dateTimeEuroShort:t="D/M/YY H:m:s";break;case fe.dateTimeEuroShortAmPm:t="D/M/YY h:m:s a";break;case fe.dateUs:t="MM/DD/YYYY";break;case fe.dateUsShort:t="M/D/YY";break;case fe.dateTimeUs:t="MM/DD/YYYY HH:mm:ss";break;case fe.dateTimeUsAmPm:t="MM/DD/YYYY hh:mm:ss a";break;case fe.dateTimeUsAM_PM:t="MM/DD/YYYY hh:mm:ss A";break;case fe.dateTimeUsShort:t="M/D/YY H:m:s";break;case fe.dateTimeUsShortAmPm:t="M/D/YY h:m:s a";break;case fe.dateTimeShortUs:t="MM/DD/YYYY HH:mm";break;case fe.dateUtc:t="YYYY-MM-DDTHH:mm:ss.SSSZ";break;case fe.date:case fe.dateIso:default:t="YYYY-MM-DD"}return t}function Je(e){let t;switch(e){case fe.dateTime:case fe.dateTimeIso:t="Y-m-d H:i:S";break;case fe.dateTimeShortIso:t="Y-m-d H:i";break;case fe.dateTimeIsoAmPm:case fe.dateTimeIsoAM_PM:t="Y-m-d h:i:S K";break;case fe.dateEuro:t="d/m/Y";break;case fe.dateEuroShort:t="d/m/y";break;case fe.dateTimeEuro:t="d/m/Y H:i:S";break;case fe.dateTimeShortEuro:t="d/m/y H:i";break;case fe.dateTimeEuroAmPm:t="d/m/Y h:i:S K";break;case fe.dateTimeEuroAM_PM:t="d/m/Y h:i:s K";break;case fe.dateTimeEuroShort:t="d/m/y H:i:s";break;case fe.dateTimeEuroShortAmPm:t="d/m/y h:i:s K";break;case fe.dateUs:t="m/d/Y";break;case fe.dateUsShort:t="m/d/y";break;case fe.dateTimeUs:t="m/d/Y H:i:S";break;case fe.dateTimeShortUs:t="m/d/y H:i";break;case fe.dateTimeUsAmPm:t="m/d/Y h:i:S K";break;case fe.dateTimeUsAM_PM:t="m/d/Y h:i:s K";break;case fe.dateTimeUsShort:t="m/d/y H:i:s";break;case fe.dateTimeUsShortAmPm:t="m/d/y h:i:s K";break;case fe.dateUtc:t="Z";break;case fe.date:case fe.dateIso:default:t="Y-m-d"}return t}function et(e){let t;switch(e){case"<":case"LT":t=ye.lessThan;break;case"<=":case"LE":t=ye.lessThanOrEqual;break;case">":case"GT":t=ye.greaterThan;break;case">=":case"GE":t=ye.greaterThanOrEqual;break;case"<>":case"!=":case"NE":t=ye.notEqual;break;case"*":case"a*":case"StartsWith":t=ye.startsWith;break;case"*z":case"EndsWith":t=ye.endsWith;break;case"=":case"==":case"EQ":t=ye.equal;break;case"IN":t=ye.in;break;case"NIN":case"NOT_IN":t=ye.notIn;break;case"Not_Contains":case"NOT_CONTAINS":t=ye.notContains;break;case"Contains":case"CONTAINS":default:t=ye.contains}return t}function tt(e){let t="";switch(e){case ye.greaterThan:case">":t=">";break;case ye.greaterThanOrEqual:case">=":t=">=";break;case ye.lessThan:case"<":t="<";break;case ye.lessThanOrEqual:case"<=":t="<=";break;case ye.notEqual:case"<>":t="<>";break;case ye.equal:case"=":case"==":case"EQ":t="=";break;case ye.startsWith:case"a*":case"*":t="a*";break;case ye.endsWith:case"*z":t="*z";break;default:t=e}return t}function it(e){let t;switch(e){case fe.unknown:case fe.string:case fe.text:case fe.password:case fe.readonly:t=ye.contains;break;case fe.float:case fe.number:case fe.date:case fe.dateIso:case fe.dateUtc:case fe.dateTime:case fe.dateTimeIso:case fe.dateTimeIsoAmPm:case fe.dateTimeIsoAM_PM:case fe.dateEuro:case fe.dateEuroShort:case fe.dateTimeEuro:case fe.dateTimeEuroAmPm:case fe.dateTimeEuroAM_PM:case fe.dateTimeEuroShort:case fe.dateTimeEuroShortAmPm:case fe.dateTimeEuroShortAM_PM:case fe.dateUs:case fe.dateUsShort:case fe.dateTimeUs:case fe.dateTimeUsAmPm:case fe.dateTimeUsAM_PM:case fe.dateTimeUsShort:case fe.dateTimeUsShortAmPm:case fe.dateTimeUsShortAM_PM:default:t=ye.equal}return t}function nt(e,t){return Object.keys(e).reduce(((i,n)=>(n!==t&&(i[n]=e[n]),i)),{})}function ot(e){return/(true|1)/i.test(e+"")}function st(e,t){let i="";if("string"==typeof e&&/^[0-9\-\/]*$/.test(e)){const n=decodeURIComponent(e),o=xe(new Date(n));o.isValid()&&4===o.year().toString().length&&(i=t?o.utc().format():o.format())}return i}function rt(e,t=!1){const i=null==e?void 0:e.normalize("NFD").replace(/[\u0300-\u036f]/g,"");return t?i.toLowerCase():i}function lt(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}function at(e,t,i){let n=t;return"function"==typeof(null==e?void 0:e.sanitizer)?n=e.sanitizer(t||""):"function"==typeof(null==Te?void 0:Te.sanitize)&&(n=(Te.sanitize(t||"",i||{})||"").toString()),n}function dt(e,t,i){if("string"==typeof t&&(t=t.split(".")),t.length>1){const n=t.shift();e&&void 0!==n&&dt(e[n]="[object Object]"===Object.prototype.toString.call(e[n])?e[n]:{},t,i)}else e&&t[0]&&(e[t[0]]=i)}function ut(e,t=","){if(null!=e){const i=`${e}`,n=i.split(".");return 2===n.length?`${n[0].replace(/\B(?=(\d{3})+(?!\d))/g,t)}.${n[1]}`:i.replace(/\B(?=(\d{3})+(?!\d))/g,t)}return e}function ct(e,t=!1){return"string"==typeof e?t?e.replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())):e.charAt(0).toUpperCase()+e.slice(1):e}function ht(e){return"string"==typeof e?e.replace(/(?:^\w|[A-Z]|\b\w|[\s+\-_\/])/g,((e,t)=>/[\s+\-_\/]/.test(e)?"":0===t?e.toLowerCase():e.toUpperCase())):e}function pt(e){return"string"==typeof e?ht(e).replace(/([A-Z])/g,"-$1").toLowerCase():e}function mt(e){if("string"==typeof e){const t=e.replace(/([A-Z])|(\-)/g," $1").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}return e}function ft(e,t,i={}){return Array.isArray(e)?e.find(t)||i:e}function gt(e){var t;const i=null===(t=null==e?void 0:e.getBoundingClientRect)||void 0===t?void 0:t.call(e);let n=0,o=0;return i&&void 0!==i.top&&void 0!==i.left&&(n=i.top+window.pageYOffset,o=i.left+window.pageXOffset),{top:n,left:o}}function vt(e){return"string"==typeof e?ht(e).replace(/([A-Z])/g,"_$1").toLowerCase():e}function _t(e){if(Array.isArray(e))for(;e.length>0;){const t=e.pop();(null==t?void 0:t.unsubscribe)&&t.unsubscribe()}return e}function Ct(e){return Array.isArray(e)&&e.length>0?e.filter(((t,i)=>e.indexOf(t)>=i)):e}function bt(e,t="id"){if(Array.isArray(e)&&e.length>0){const i=[],n=new Map;for(const o of e)o&&!n.has(o[t])&&(n.set(o[t],!0),i.push({id:o[t],name:o.name}));return i}return e}const yt=(e,t,i,n,o)=>{var s,r;const l=null!==(r=null!==(s=null==n?void 0:n.valueCouldBeUndefined)&&void 0!==s?s:null==o?void 0:o.cellValueCouldBeUndefined)&&void 0!==r&&r,a=isNaN(e)||""===e||null===e||l&&void 0===e?-99e10:parseFloat(e),d=isNaN(t)||""===t||null===t||l&&void 0===t?-99e10:parseFloat(t);return i*(a===d?0:a>d?1:-1)},wt=pe()||he;function St(e,t,i,n,o,s,r){var l,a;let d=0;const u=null!==(a=null!==(l=null==n?void 0:n.valueCouldBeUndefined)&&void 0!==l?l:null==o?void 0:o.cellValueCouldBeUndefined)&&void 0!==a&&a,c=wt(e,s,r),h=wt(t,s,r);return d=null===e||""===e||u&&void 0===e||!c.isValid()?-1:null===t||""===t||u&&void 0===t||!h.isValid()?1:c.valueOf()<h.valueOf()?-1:1,i*d}function Et(e){const t=e===fe.date?wt.ISO_8601:Ze(e);return(e,i,n,o,s)=>t===wt.ISO_8601?St(e,i,n,o,s,t,!1):St(e,i,n,o,s,t,!0)}const Tt={date:Et(fe.date),dateIso:Et(fe.dateIso),dateUtc:Et(fe.dateUtc),dateTime:Et(fe.dateTime),dateTimeIso:Et(fe.dateTimeIso),dateTimeIsoAmPm:Et(fe.dateTimeIsoAmPm),dateTimeIsoAM_PM:Et(fe.dateTimeIsoAM_PM),dateTimeShortIso:Et(fe.dateTimeShortIso),dateEuro:Et(fe.dateEuro),dateEuroShort:Et(fe.dateEuroShort),dateTimeShortEuro:Et(fe.dateTimeShortEuro),dateTimeEuro:Et(fe.dateTimeEuro),dateTimeEuroAmPm:Et(fe.dateTimeEuroAmPm),dateTimeEuroAM_PM:Et(fe.dateTimeEuroAM_PM),dateTimeEuroShort:Et(fe.dateTimeEuroShort),dateTimeEuroShortAmPm:Et(fe.dateTimeEuroShortAmPm),dateTimeEuroShortAM_PM:Et(fe.dateTimeEuroShortAM_PM),dateUs:Et(fe.dateUs),dateUsShort:Et(fe.dateUsShort),dateTimeShortUs:Et(fe.dateTimeShortUs),dateTimeUs:Et(fe.dateTimeUs),dateTimeUsAmPm:Et(fe.dateTimeUsAmPm),dateTimeUsAM_PM:Et(fe.dateTimeUsAM_PM),dateTimeUsShort:Et(fe.dateTimeUsShort),dateTimeUsShortAmPm:Et(fe.dateTimeUsShortAmPm),dateTimeUsShortAM_PM:Et(fe.dateTimeUsShortAM_PM),numeric:yt,objectString:(e,t,i,n,o)=>{var s,r;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=(null==e?void 0:e.hasOwnProperty(n.dataKey))?e[n.dataKey]:e,a=(null==t?void 0:t.hasOwnProperty(n.dataKey))?t[n.dataKey]:t,d=null!==(r=null!==(s=null==n?void 0:n.valueCouldBeUndefined)&&void 0!==s?s:null==o?void 0:o.cellValueCouldBeUndefined)&&void 0!==r&&r;null==i&&(i=Se.neutral);let u=0;return u="object"!=typeof e?-99e10:"object"!=typeof t?99e10:null===l||d&&void 0===l?-1:null===a||d&&void 0===a?1:l===a?0:i?l<a?-1:1:l<a?1:-1,i*u},string:(e,t,i,n,o)=>{var s,r;null==i&&(i=Se.neutral);let l=0;const a=null!==(r=null!==(s=null==n?void 0:n.valueCouldBeUndefined)&&void 0!==s?s:null==o?void 0:o.cellValueCouldBeUndefined)&&void 0!==r&&r;return e===t?l=0:null===e||a&&void 0===e?l=-1:null===t||a&&void 0===t?l=1:((null==o?void 0:o.ignoreAccentOnStringFilterAndSort)&&(e=rt(e,!1),t=rt(t,!1)),l=i?e<t?-1:1:e<t?1:-1),i*l}};function xt(e,t,i,n,o,s){let r=0;switch(e){case fe.float:case fe.integer:case fe.number:r=Tt.numeric(t,i,n,o,s);break;case fe.date:case fe.dateIso:case fe.dateUtc:case fe.dateTime:case fe.dateTimeIso:case fe.dateTimeIsoAmPm:case fe.dateTimeIsoAM_PM:case fe.dateTimeShortIso:case fe.dateEuro:case fe.dateEuroShort:case fe.dateTimeShortEuro:case fe.dateTimeEuro:case fe.dateTimeEuroAmPm:case fe.dateTimeEuroAM_PM:case fe.dateTimeEuroShort:case fe.dateTimeEuroShortAmPm:case fe.dateTimeEuroShortAM_PM:case fe.dateUs:case fe.dateUsShort:case fe.dateTimeShortUs:case fe.dateTimeUs:case fe.dateTimeUsAmPm:case fe.dateTimeUsAM_PM:case fe.dateTimeUsShort:case fe.dateTimeUsShortAmPm:case fe.dateTimeUsShortAM_PM:r=Et(e).call(this,t,i,n,o,s);break;case fe.object:r=Tt.objectString(t,i,n,o,s);break;case fe.string:case fe.text:case fe.password:case fe.readonly:default:r=Tt.string(t,i,n,o,s)}return r}var Ot=__webpack_require__(409),kt=__webpack_require__.n(Ot);function Dt(e,t){const i=document.createElement("select");i.className="form-control";for(const n of e){const e=document.createElement("option");e.value=n.operator,e.innerHTML=at(t,`${Ge(n.operator,3)}${n.description}`),i.appendChild(e)}return i}async function At(e,t,i,n,o){var s,r,l;const a=null!==(s=null==t?void 0:t.filter)&&void 0!==s?s:{},d=null!==(r=null==a?void 0:a.collectionOptions)&&void 0!==r?r:{};let u=null;if(e){const s=null!==(l=null==n?void 0:n.isObservable(e))&&void 0!==l&&l;s&&n&&(u=await Ie(n,e));const r=await e;if(Array.isArray(r)?u=r:r instanceof Response&&"function"==typeof r.json?u=await r.json():r&&r.content&&(u=r.content),!Array.isArray(u)&&(null==d?void 0:d.collectionInsideObjectProperty)&&(u=Ke(u||r,d.collectionInsideObjectProperty||"")),!Array.isArray(u))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.');a.collection=u,i(u),s&&function(e,t,i,n){var o;const s=null!==(o=null==e?void 0:e.filter)&&void 0!==o?o:{},r=null==i?void 0:i.createSubject();s.collectionAsync=r,n&&r&&n.push(r.subscribe((i=>function(e,t,i){var n,o;const s=null!==(n=null==t?void 0:t.filter)&&void 0!==n?n:{},r=null!==(o=null==s?void 0:s.collectionOptions)&&void 0!==o?o:{};if(r&&r.collectionInsideObjectProperty&&(e=Ke(e,r.collectionInsideObjectProperty)),!Array.isArray(e))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.');s.collection=e,i(e)}(i,e,t))))}(t,i,n,o)}return u}__webpack_require__(863);const Rt=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],It={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),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:e=>"undefined"!=typeof console&&console.warn(e),getWeek:e=>{const t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var i=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-i.getTime())/864e5-3+(i.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},Pt={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:e=>{const t=e%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};var Mt=Pt;const Ft=(e,t=2)=>`000${e}`.slice(-1*t),Nt=e=>!0===e?1:0;function Lt(e,t){let i;return function(){clearTimeout(i),i=setTimeout((()=>e.apply(this,arguments)),t)}}const $t=e=>e instanceof Array?e:[e];function Ht(e,t,i){if(!0===i)return e.classList.add(t);e.classList.remove(t)}function Vt(e,t,i){const n=window.document.createElement(e);return t=t||"",i=i||"",n.className=t,void 0!==i&&(n.textContent=i),n}function zt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Bt(e,t){return t(e)?e:e.parentNode?Bt(e.parentNode,t):void 0}function Wt(e,t){const i=Vt("div","numInputWrapper"),n=Vt("input","numInput "+e),o=Vt("span","arrowUp"),s=Vt("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==t)for(const e in t)n.setAttribute(e,t[e]);return i.appendChild(n),i.appendChild(o),i.appendChild(s),i}function Gt(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}const Ut=()=>{},jt=(e,t,i)=>i.months[t?"shorthand":"longhand"][e],Yt={D:Ut,F:function(e,t,i){e.setMonth(i.months.longhand.indexOf(t))},G:(e,t)=>{e.setHours(parseFloat(t))},H:(e,t)=>{e.setHours(parseFloat(t))},J:(e,t)=>{e.setDate(parseFloat(t))},K:(e,t,i)=>{e.setHours(e.getHours()%12+12*Nt(new RegExp(i.amPM[1],"i").test(t)))},M:function(e,t,i){e.setMonth(i.months.shorthand.indexOf(t))},S:(e,t)=>{e.setSeconds(parseFloat(t))},U:(e,t)=>new Date(1e3*parseFloat(t)),W:function(e,t,i){const n=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+i.firstDayOfWeek),o},Y:(e,t)=>{e.setFullYear(parseFloat(t))},Z:(e,t)=>new Date(t),d:(e,t)=>{e.setDate(parseFloat(t))},h:(e,t)=>{e.setHours(parseFloat(t))},i:(e,t)=>{e.setMinutes(parseFloat(t))},j:(e,t)=>{e.setDate(parseFloat(t))},l:Ut,m:(e,t)=>{e.setMonth(parseFloat(t)-1)},n:(e,t)=>{e.setMonth(parseFloat(t)-1)},s:(e,t)=>{e.setSeconds(parseFloat(t))},u:(e,t)=>new Date(parseFloat(t)),w:Ut,y:(e,t)=>{e.setFullYear(2e3+parseFloat(t))}},qt={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",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:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Xt={Z:e=>e.toISOString(),D:function(e,t,i){return t.weekdays.shorthand[Xt.w(e,t,i)]},F:function(e,t,i){return jt(Xt.n(e,t,i)-1,!1,t)},G:function(e,t,i){return Ft(Xt.h(e,t,i))},H:e=>Ft(e.getHours()),J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:(e,t)=>t.amPM[Nt(e.getHours()>11)],M:function(e,t){return jt(e.getMonth(),!0,t)},S:e=>Ft(e.getSeconds()),U:e=>e.getTime()/1e3,W:function(e,t,i){return i.getWeek(e)},Y:e=>Ft(e.getFullYear(),4),d:e=>Ft(e.getDate()),h:e=>e.getHours()%12?e.getHours()%12:12,i:e=>Ft(e.getMinutes()),j:e=>e.getDate(),l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:e=>Ft(e.getMonth()+1),n:e=>e.getMonth()+1,s:e=>e.getSeconds(),u:e=>e.getTime(),w:e=>e.getDay(),y:e=>String(e.getFullYear()).substring(2)},Kt=({config:e=It,l10n:t=Pt,isMobile:i=!1})=>(n,o,s)=>{const r=s||t;return void 0===e.formatDate||i?o.split("").map(((t,i,o)=>Xt[t]&&"\\"!==o[i-1]?Xt[t](n,r,e):"\\"!==t?t:"")).join(""):e.formatDate(n,o,r)},Qt=({config:e=It,l10n:t=Pt})=>(i,n,o,s)=>{if(0!==i&&!i)return;const r=s||t;let l;const a=i;if(i instanceof Date)l=new Date(i.getTime());else if("string"!=typeof i&&void 0!==i.toFixed)l=new Date(i);else if("string"==typeof i){const t=n||(e||It).dateFormat,s=String(i).trim();if("today"===s)l=new Date,o=!0;else if(/Z$/.test(s)||/GMT$/.test(s))l=new Date(i);else if(e&&e.parseDate)l=e.parseDate(i,t);else{l=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);let n,o=[];for(let e=0,s=0,a="";e<t.length;e++){const d=t[e],u="\\"===d,c="\\"===t[e-1]||u;if(qt[d]&&!c){a+=qt[d];const e=new RegExp(a).exec(i);e&&(n=!0)&&o["Y"!==d?"push":"unshift"]({fn:Yt[d],val:e[++s]})}else u||(a+=".");o.forEach((({fn:e,val:t})=>l=e(l,t,r)||l))}l=n?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===o&&l.setHours(0,0,0,0),l;e.errorHandler(new Error(`Invalid date provided: ${a}`))};function Zt(e,t,i=!0){return!1!==i?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function Jt(e){let t=e.defaultHour,i=e.defaultMinute,n=e.defaultSeconds;if(void 0!==e.minDate){const o=e.minDate.getHours(),s=e.minDate.getMinutes(),r=e.minDate.getSeconds();t<o&&(t=o),t===o&&i<s&&(i=s),t===o&&i===s&&n<r&&(n=e.minDate.getSeconds())}if(void 0!==e.maxDate){const o=e.maxDate.getHours(),s=e.maxDate.getMinutes();t=Math.min(t,o),t===o&&(i=Math.min(s,i)),t===o&&i===s&&(n=e.maxDate.getSeconds())}return{hours:t,minutes:i,seconds:n}}function ei(e,t){const i={config:Object.assign(Object.assign({},It),ii.defaultConfig),l10n:Mt};function n(e){return e.bind(i)}function o(){const e=i.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==i.calendarContainer&&(i.calendarContainer.style.visibility="hidden",i.calendarContainer.style.display="block"),void 0!==i.daysContainer){const t=(i.days.offsetWidth+1)*e.showMonths;i.daysContainer.style.width=t+"px",i.calendarContainer.style.width=t+(void 0!==i.weekWrapper?i.weekWrapper.offsetWidth:0)+"px",i.calendarContainer.style.removeProperty("visibility"),i.calendarContainer.style.removeProperty("display")}}))}function s(e){if(0===i.selectedDates.length){const e=void 0===i.config.minDate||Zt(new Date,i.config.minDate)>=0?new Date:new Date(i.config.minDate.getTime()),t=Jt(i.config);e.setHours(t.hours,t.minutes,t.seconds,e.getMilliseconds()),i.selectedDates=[e],i.latestSelectedDateObj=e}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();const t="keydown"===e.type,n=Gt(e),o=n;void 0!==i.amPM&&n===i.amPM&&(i.amPM.textContent=i.l10n.amPM[Nt(i.amPM.textContent===i.l10n.amPM[0])]);const s=parseFloat(o.getAttribute("min")),r=parseFloat(o.getAttribute("max")),l=parseFloat(o.getAttribute("step")),a=parseInt(o.value,10);let d=a+l*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==o.value&&2===o.value.length){const e=o===i.hourElement,t=o===i.minuteElement;d<s?(d=r+d+Nt(!e)+(Nt(e)&&Nt(!i.amPM)),t&&m(void 0,-1,i.hourElement)):d>r&&(d=o===i.hourElement?d-r-Nt(!i.amPM):s,t&&m(void 0,1,i.hourElement)),i.amPM&&e&&(1===l?d+a===23:Math.abs(d-a)>l)&&(i.amPM.textContent=i.l10n.amPM[Nt(i.amPM.textContent===i.l10n.amPM[0])]),o.value=Ft(d)}}(e);const t=i._input.value;r(),Q(),i._input.value!==t&&i._debouncedChange()}function r(){if(void 0===i.hourElement||void 0===i.minuteElement)return;let e=(parseInt(i.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(i.minuteElement.value,10)||0)%60,n=void 0!==i.secondElement?(parseInt(i.secondElement.value,10)||0)%60:0;var o,s;void 0!==i.amPM&&(o=e,s=i.amPM.textContent,e=o%12+12*Nt(s===i.l10n.amPM[1]));const r=void 0!==i.config.minTime||i.config.minDate&&i.minDateHasTime&&i.latestSelectedDateObj&&0===Zt(i.latestSelectedDateObj,i.config.minDate,!0);if(void 0!==i.config.maxTime||i.config.maxDate&&i.maxDateHasTime&&i.latestSelectedDateObj&&0===Zt(i.latestSelectedDateObj,i.config.maxDate,!0)){const o=void 0!==i.config.maxTime?i.config.maxTime:i.config.maxDate;e=Math.min(e,o.getHours()),e===o.getHours()&&(t=Math.min(t,o.getMinutes())),t===o.getMinutes()&&(n=Math.min(n,o.getSeconds()))}if(r){const o=void 0!==i.config.minTime?i.config.minTime:i.config.minDate;e=Math.max(e,o.getHours()),e===o.getHours()&&t<o.getMinutes()&&(t=o.getMinutes()),t===o.getMinutes()&&(n=Math.max(n,o.getSeconds()))}a(e,t,n)}function l(e){const t=e||i.latestSelectedDateObj;t&&a(t.getHours(),t.getMinutes(),t.getSeconds())}function a(e,t,n){void 0!==i.latestSelectedDateObj&&i.latestSelectedDateObj.setHours(e%24,t,n||0,0),i.hourElement&&i.minuteElement&&!i.isMobile&&(i.hourElement.value=Ft(i.config.time_24hr?e:(12+e)%12+12*Nt(e%12==0)),i.minuteElement.value=Ft(t),void 0!==i.amPM&&(i.amPM.textContent=i.l10n.amPM[Nt(e>=12)]),void 0!==i.secondElement&&(i.secondElement.value=Ft(n)))}function d(e){const t=Gt(e),i=parseInt(t.value)+(e.delta||0);(i/1e3>1||"Enter"===e.key&&!/[^\d]/.test(i.toString()))&&D(i)}function u(e,t,n,o){return t instanceof Array?t.forEach((t=>u(e,t,n,o))):e instanceof Array?e.forEach((e=>u(e,t,n,o))):(e.addEventListener(t,n,o),void i._handlers.push({remove:()=>e.removeEventListener(t,n)}))}function c(){j("onChange")}function h(e,t){const n=void 0!==e?i.parseDate(e):i.latestSelectedDateObj||(i.config.minDate&&i.config.minDate>i.now?i.config.minDate:i.config.maxDate&&i.config.maxDate<i.now?i.config.maxDate:i.now),o=i.currentYear,s=i.currentMonth;try{void 0!==n&&(i.currentYear=n.getFullYear(),i.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,i.config.errorHandler(e)}t&&i.currentYear!==o&&(j("onYearChange"),y()),!t||i.currentYear===o&&i.currentMonth===s||j("onMonthChange"),i.redraw()}function p(e){const t=Gt(e);~t.className.indexOf("arrow")&&m(e,t.classList.contains("arrowUp")?1:-1)}function m(e,t,i){const n=e&&Gt(e),o=i||n&&n.parentNode&&n.parentNode.firstChild,s=Y("increment");s.delta=t,o&&o.dispatchEvent(s)}function f(e,t,n,o){const s=A(t,!0),r=Vt("span","flatpickr-day "+e,t.getDate().toString());return r.dateObj=t,r.$i=o,r.setAttribute("aria-label",i.formatDate(t,i.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===Zt(t,i.now)&&(i.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),s?(r.tabIndex=-1,q(t)&&(r.classList.add("selected"),i.selectedDateElem=r,"range"===i.config.mode&&(Ht(r,"startRange",i.selectedDates[0]&&0===Zt(t,i.selectedDates[0],!0)),Ht(r,"endRange",i.selectedDates[1]&&0===Zt(t,i.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===i.config.mode&&function(e){return!("range"!==i.config.mode||i.selectedDates.length<2)&&Zt(e,i.selectedDates[0])>=0&&Zt(e,i.selectedDates[1])<=0}(t)&&!q(t)&&r.classList.add("inRange"),i.weekNumbers&&1===i.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&i.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+i.config.getWeek(t)+"</span>"),j("onDayCreate",r),r}function g(e){e.focus(),"range"===i.config.mode&&M(e)}function v(e){const t=e>0?0:i.config.showMonths-1,n=e>0?i.config.showMonths:-1;for(let o=t;o!=n;o+=e){const t=i.daysContainer.children[o],n=e>0?0:t.children.length-1,s=e>0?t.children.length:-1;for(let i=n;i!=s;i+=e){const e=t.children[i];if(-1===e.className.indexOf("hidden")&&A(e.dateObj))return e}}}function _(e,t){const n=R(document.activeElement||document.body),o=void 0!==e?e:n?document.activeElement:void 0!==i.selectedDateElem&&R(i.selectedDateElem)?i.selectedDateElem:void 0!==i.todayDateElem&&R(i.todayDateElem)?i.todayDateElem:v(t>0?1:-1);void 0===o?i._input.focus():n?function(e,t){const n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():i.currentMonth,o=t>0?i.config.showMonths:-1,s=t>0?1:-1;for(let r=n-i.currentMonth;r!=o;r+=s){const o=i.daysContainer.children[r],l=n-i.currentMonth===r?e.$i+t:t<0?o.children.length-1:0,a=o.children.length;for(let i=l;i>=0&&i<a&&i!=(t>0?a:-1);i+=s){const n=o.children[i];if(-1===n.className.indexOf("hidden")&&A(n.dateObj)&&Math.abs(e.$i-i)>=Math.abs(t))return g(n)}}i.changeMonth(s),_(v(s),0)}(o,t):g(o)}function C(e,t){const n=(new Date(e,t,1).getDay()-i.l10n.firstDayOfWeek+7)%7,o=i.utils.getDaysInMonth((t-1+12)%12,e),s=i.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),l=i.config.showMonths>1,a=l?"prevMonthDay hidden":"prevMonthDay",d=l?"nextMonthDay hidden":"nextMonthDay";let u=o+1-n,c=0;for(;u<=o;u++,c++)r.appendChild(f(a,new Date(e,t-1,u),u,c));for(u=1;u<=s;u++,c++)r.appendChild(f("",new Date(e,t,u),u,c));for(let o=s+1;o<=42-n&&(1===i.config.showMonths||c%7!=0);o++,c++)r.appendChild(f(d,new Date(e,t+1,o%s),o,c));const h=Vt("div","dayContainer");return h.appendChild(r),h}function b(){if(void 0===i.daysContainer)return;zt(i.daysContainer),i.weekNumbers&&zt(i.weekNumbers);const e=document.createDocumentFragment();for(let t=0;t<i.config.showMonths;t++){const n=new Date(i.currentYear,i.currentMonth,1);n.setMonth(i.currentMonth+t),e.appendChild(C(n.getFullYear(),n.getMonth()))}i.daysContainer.appendChild(e),i.days=i.daysContainer.firstChild,"range"===i.config.mode&&1===i.selectedDates.length&&M()}function y(){if(i.config.showMonths>1||"dropdown"!==i.config.monthSelectorType)return;const e=function(e){return!(void 0!==i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()&&e<i.config.minDate.getMonth()||void 0!==i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()&&e>i.config.maxDate.getMonth())};i.monthsDropdownContainer.tabIndex=-1,i.monthsDropdownContainer.innerHTML="";for(let t=0;t<12;t++){if(!e(t))continue;const n=Vt("option","flatpickr-monthDropdown-month");n.value=new Date(i.currentYear,t).getMonth().toString(),n.textContent=jt(t,i.config.shorthandCurrentMonth,i.l10n),n.tabIndex=-1,i.currentMonth===t&&(n.selected=!0),i.monthsDropdownContainer.appendChild(n)}}function w(){const e=Vt("div","flatpickr-month"),t=window.document.createDocumentFragment();let n;i.config.showMonths>1||"static"===i.config.monthSelectorType?n=Vt("span","cur-month"):(i.monthsDropdownContainer=Vt("select","flatpickr-monthDropdown-months"),i.monthsDropdownContainer.setAttribute("aria-label",i.l10n.monthAriaLabel),u(i.monthsDropdownContainer,"change",(e=>{const t=Gt(e),n=parseInt(t.value,10);i.changeMonth(n-i.currentMonth),j("onMonthChange")})),y(),n=i.monthsDropdownContainer);const o=Wt("cur-year",{tabindex:"-1"}),s=o.getElementsByTagName("input")[0];s.setAttribute("aria-label",i.l10n.yearAriaLabel),i.config.minDate&&s.setAttribute("min",i.config.minDate.getFullYear().toString()),i.config.maxDate&&(s.setAttribute("max",i.config.maxDate.getFullYear().toString()),s.disabled=!!i.config.minDate&&i.config.minDate.getFullYear()===i.config.maxDate.getFullYear());const r=Vt("div","flatpickr-current-month");return r.appendChild(n),r.appendChild(o),t.appendChild(r),e.appendChild(t),{container:e,yearElement:s,monthElement:n}}function S(){zt(i.monthNav),i.monthNav.appendChild(i.prevMonthNav),i.config.showMonths&&(i.yearElements=[],i.monthElements=[]);for(let e=i.config.showMonths;e--;){const e=w();i.yearElements.push(e.yearElement),i.monthElements.push(e.monthElement),i.monthNav.appendChild(e.container)}i.monthNav.appendChild(i.nextMonthNav)}function E(){i.weekdayContainer?zt(i.weekdayContainer):i.weekdayContainer=Vt("div","flatpickr-weekdays");for(let e=i.config.showMonths;e--;){const e=Vt("div","flatpickr-weekdaycontainer");i.weekdayContainer.appendChild(e)}return T(),i.weekdayContainer}function T(){if(!i.weekdayContainer)return;const e=i.l10n.firstDayOfWeek;let t=[...i.l10n.weekdays.shorthand];e>0&&e<t.length&&(t=[...t.splice(e,t.length),...t.splice(0,e)]);for(let e=i.config.showMonths;e--;)i.weekdayContainer.children[e].innerHTML=`\n <span class='flatpickr-weekday'>\n ${t.join("</span><span class='flatpickr-weekday'>")}\n </span>\n `}function x(e,t=!0){const n=t?e:e-i.currentMonth;n<0&&!0===i._hidePrevMonthArrow||n>0&&!0===i._hideNextMonthArrow||(i.currentMonth+=n,(i.currentMonth<0||i.currentMonth>11)&&(i.currentYear+=i.currentMonth>11?1:-1,i.currentMonth=(i.currentMonth+12)%12,j("onYearChange"),y()),b(),j("onMonthChange"),X())}function O(e){return!(!i.config.appendTo||!i.config.appendTo.contains(e))||i.calendarContainer.contains(e)}function k(e){if(i.isOpen&&!i.config.inline){const t=Gt(e),n=O(t),o=t===i.input||t===i.altInput||i.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(i.input)||~e.path.indexOf(i.altInput)),r="blur"===e.type?o&&e.relatedTarget&&!O(e.relatedTarget):!o&&!n&&!O(e.relatedTarget),l=!i.config.ignoredFocusElements.some((e=>e.contains(t)));r&&l&&(void 0!==i.timeContainer&&void 0!==i.minuteElement&&void 0!==i.hourElement&&""!==i.input.value&&void 0!==i.input.value&&s(),i.close(),i.config&&"range"===i.config.mode&&1===i.selectedDates.length&&(i.clear(!1),i.redraw()))}}function D(e){if(!e||i.config.minDate&&e<i.config.minDate.getFullYear()||i.config.maxDate&&e>i.config.maxDate.getFullYear())return;const t=e,n=i.currentYear!==t;i.currentYear=t||i.currentYear,i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()?i.currentMonth=Math.min(i.config.maxDate.getMonth(),i.currentMonth):i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()&&(i.currentMonth=Math.max(i.config.minDate.getMonth(),i.currentMonth)),n&&(i.redraw(),j("onYearChange"),y())}function A(e,t=!0){var n;const o=i.parseDate(e,void 0,t);if(i.config.minDate&&o&&Zt(o,i.config.minDate,void 0!==t?t:!i.minDateHasTime)<0||i.config.maxDate&&o&&Zt(o,i.config.maxDate,void 0!==t?t:!i.maxDateHasTime)>0)return!1;if(!i.config.enable&&0===i.config.disable.length)return!0;if(void 0===o)return!1;const s=!!i.config.enable,r=null!==(n=i.config.enable)&&void 0!==n?n:i.config.disable;for(let e,t=0;t<r.length;t++){if(e=r[t],"function"==typeof e&&e(o))return s;if(e instanceof Date&&void 0!==o&&e.getTime()===o.getTime())return s;if("string"==typeof e){const t=i.parseDate(e,void 0,!0);return t&&t.getTime()===o.getTime()?s:!s}if("object"==typeof e&&void 0!==o&&e.from&&e.to&&o.getTime()>=e.from.getTime()&&o.getTime()<=e.to.getTime())return s}return!s}function R(e){return void 0!==i.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&i.daysContainer.contains(e)}function I(e){e.target!==i._input||!(i.selectedDates.length>0||i._input.value.length>0)||e.relatedTarget&&O(e.relatedTarget)||i.setDate(i._input.value,!0,e.target===i.altInput?i.config.altFormat:i.config.dateFormat)}function P(t){const n=Gt(t),o=i.config.wrap?e.contains(n):n===i._input,l=i.config.allowInput,a=i.isOpen&&(!l||!o),d=i.config.inline&&o&&!l;if(13===t.keyCode&&o){if(l)return i.setDate(i._input.value,!0,n===i.altInput?i.config.altFormat:i.config.dateFormat),n.blur();i.open()}else if(O(n)||a||d){const e=!!i.timeContainer&&i.timeContainer.contains(n);switch(t.keyCode){case 13:e?(t.preventDefault(),s(),z()):B(t);break;case 27:t.preventDefault(),z();break;case 8:case 46:o&&!i.config.allowInput&&(t.preventDefault(),i.clear());break;case 37:case 39:if(e||o)i.hourElement&&i.hourElement.focus();else if(t.preventDefault(),void 0!==i.daysContainer&&(!1===l||document.activeElement&&R(document.activeElement))){const e=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),x(e),_(v(1),0)):_(void 0,e)}break;case 38:case 40:t.preventDefault();const r=40===t.keyCode?1:-1;i.daysContainer&&void 0!==n.$i||n===i.input||n===i.altInput?t.ctrlKey?(t.stopPropagation(),D(i.currentYear-r),_(v(1),0)):e||_(void 0,7*r):n===i.currentYearElement?D(i.currentYear-r):i.config.enableTime&&(!e&&i.hourElement&&i.hourElement.focus(),s(t),i._debouncedChange());break;case 9:if(e){const e=[i.hourElement,i.minuteElement,i.secondElement,i.amPM].concat(i.pluginElements).filter((e=>e)),o=e.indexOf(n);if(-1!==o){const n=e[o+(t.shiftKey?-1:1)];t.preventDefault(),(n||i._input).focus()}}else!i.config.noCalendar&&i.daysContainer&&i.daysContainer.contains(n)&&t.shiftKey&&(t.preventDefault(),i._input.focus())}}if(void 0!==i.amPM&&n===i.amPM)switch(t.key){case i.l10n.amPM[0].charAt(0):case i.l10n.amPM[0].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[0],r(),Q();break;case i.l10n.amPM[1].charAt(0):case i.l10n.amPM[1].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[1],r(),Q()}(o||O(n))&&j("onKeyDown",t)}function M(e){if(1!==i.selectedDates.length||e&&(!e.classList.contains("flatpickr-day")||e.classList.contains("flatpickr-disabled")))return;const t=e?e.dateObj.getTime():i.days.firstElementChild.dateObj.getTime(),n=i.parseDate(i.selectedDates[0],void 0,!0).getTime(),o=Math.min(t,i.selectedDates[0].getTime()),s=Math.max(t,i.selectedDates[0].getTime());let r=!1,l=0,a=0;for(let e=o;e<s;e+=864e5)A(new Date(e),!0)||(r=r||e>o&&e<s,e<n&&(!l||e>l)?l=e:e>n&&(!a||e<a)&&(a=e));for(let o=0;o<i.config.showMonths;o++){const s=i.daysContainer.children[o];for(let o=0,h=s.children.length;o<h;o++){const h=s.children[o],p=h.dateObj.getTime(),m=l>0&&p<l||a>0&&p>a;m?(h.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((e=>{h.classList.remove(e)}))):r&&!m||(["startRange","inRange","endRange","notAllowed"].forEach((e=>{h.classList.remove(e)})),void 0!==e&&(e.classList.add(t<=i.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&p===n?h.classList.add("startRange"):n>t&&p===n&&h.classList.add("endRange"),p>=l&&(0===a||p<=a)&&(u=n,c=t,(d=p)>Math.min(u,c)&&d<Math.max(u,c))&&h.classList.add("inRange")))}}var d,u,c}function F(){!i.isOpen||i.config.static||i.config.inline||H()}function N(e){return t=>{const n=i.config[`_${e}Date`]=i.parseDate(t,i.config.dateFormat),o=i.config[`_${"min"===e?"max":"min"}Date`];void 0!==n&&(i["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),i.selectedDates&&(i.selectedDates=i.selectedDates.filter((e=>A(e))),i.selectedDates.length||"min"!==e||l(n),Q()),i.daysContainer&&(V(),void 0!==n?i.currentYearElement[e]=n.getFullYear().toString():i.currentYearElement.removeAttribute(e),i.currentYearElement.disabled=!!o&&void 0!==n&&o.getFullYear()===n.getFullYear())}}function L(){return i.config.wrap?e.querySelector("[data-input]"):e}function $(){"object"!=typeof i.config.locale&&void 0===ii.l10ns[i.config.locale]&&i.config.errorHandler(new Error(`flatpickr: invalid locale ${i.config.locale}`)),i.l10n=Object.assign(Object.assign({},ii.l10ns.default),"object"==typeof i.config.locale?i.config.locale:"default"!==i.config.locale?ii.l10ns[i.config.locale]:void 0),qt.K=`(${i.l10n.amPM[0]}|${i.l10n.amPM[1]}|${i.l10n.amPM[0].toLowerCase()}|${i.l10n.amPM[1].toLowerCase()})`,void 0===Object.assign(Object.assign({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===ii.defaultConfig.time_24hr&&(i.config.time_24hr=i.l10n.time_24hr),i.formatDate=Kt(i),i.parseDate=Qt({config:i.config,l10n:i.l10n})}function H(e){if("function"==typeof i.config.position)return void i.config.position(i,e);if(void 0===i.calendarContainer)return;j("onPreCalendarPosition");const t=e||i._positionElement,n=Array.prototype.reduce.call(i.calendarContainer.children,((e,t)=>e+t.offsetHeight),0),o=i.calendarContainer.offsetWidth,s=i.config.position.split(" "),r=s[0],l=s.length>1?s[1]:null,a=t.getBoundingClientRect(),d=window.innerHeight-a.bottom,u="above"===r||"below"!==r&&d<n&&a.top>n,c=window.pageYOffset+a.top+(u?-n-2:t.offsetHeight+2);if(Ht(i.calendarContainer,"arrowTop",!u),Ht(i.calendarContainer,"arrowBottom",u),i.config.inline)return;let h=window.pageXOffset+a.left,p=!1,m=!1;"center"===l?(h-=(o-a.width)/2,p=!0):"right"===l&&(h-=o-a.width,m=!0),Ht(i.calendarContainer,"arrowLeft",!p&&!m),Ht(i.calendarContainer,"arrowCenter",p),Ht(i.calendarContainer,"arrowRight",m);const f=window.document.body.offsetWidth-(window.pageXOffset+a.right),g=h+o>window.document.body.offsetWidth,v=f+o>window.document.body.offsetWidth;if(Ht(i.calendarContainer,"rightMost",g),!i.config.static)if(i.calendarContainer.style.top=`${c}px`,g)if(v){const e=function(){let e=null;for(let t=0;t<document.styleSheets.length;t++){const i=document.styleSheets[t];try{i.cssRules}catch(e){continue}e=i;break}return null!=e?e:function(){const e=document.createElement("style");return document.head.appendChild(e),e.sheet}()}();if(void 0===e)return;const t=window.document.body.offsetWidth,n=Math.max(0,t/2-o/2),s=".flatpickr-calendar.centerMost:before",r=".flatpickr-calendar.centerMost:after",l=e.cssRules.length,d=`{left:${a.left}px;right:auto;}`;Ht(i.calendarContainer,"rightMost",!1),Ht(i.calendarContainer,"centerMost",!0),e.insertRule(`${s},${r}${d}`,l),i.calendarContainer.style.left=`${n}px`,i.calendarContainer.style.right="auto"}else i.calendarContainer.style.left="auto",i.calendarContainer.style.right=`${f}px`;else i.calendarContainer.style.left=`${h}px`,i.calendarContainer.style.right="auto"}function V(){i.config.noCalendar||i.isMobile||(y(),X(),b())}function z(){i._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(i.close,0):i.close()}function B(e){e.preventDefault(),e.stopPropagation();const t=Bt(Gt(e),(e=>e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")));if(void 0===t)return;const n=t,o=i.latestSelectedDateObj=new Date(n.dateObj.getTime()),s=(o.getMonth()<i.currentMonth||o.getMonth()>i.currentMonth+i.config.showMonths-1)&&"range"!==i.config.mode;if(i.selectedDateElem=n,"single"===i.config.mode)i.selectedDates=[o];else if("multiple"===i.config.mode){const e=q(o);e?i.selectedDates.splice(parseInt(e),1):i.selectedDates.push(o)}else"range"===i.config.mode&&(2===i.selectedDates.length&&i.clear(!1,!1),i.latestSelectedDateObj=o,i.selectedDates.push(o),0!==Zt(o,i.selectedDates[0],!0)&&i.selectedDates.sort(((e,t)=>e.getTime()-t.getTime())));if(r(),s){const e=i.currentYear!==o.getFullYear();i.currentYear=o.getFullYear(),i.currentMonth=o.getMonth(),e&&(j("onYearChange"),y()),j("onMonthChange")}if(X(),b(),Q(),s||"range"===i.config.mode||1!==i.config.showMonths?void 0!==i.selectedDateElem&&void 0===i.hourElement&&i.selectedDateElem&&i.selectedDateElem.focus():g(n),void 0!==i.hourElement&&void 0!==i.hourElement&&i.hourElement.focus(),i.config.closeOnSelect){const e="single"===i.config.mode&&!i.config.enableTime,t="range"===i.config.mode&&2===i.selectedDates.length&&!i.config.enableTime;(e||t)&&z()}c()}i.parseDate=Qt({config:i.config,l10n:i.l10n}),i._handlers=[],i.pluginElements=[],i.loadedPlugins=[],i._bind=u,i._setHoursFromDate=l,i._positionCalendar=H,i.changeMonth=x,i.changeYear=D,i.clear=function(e=!0,t=!0){if(i.input.value="",void 0!==i.altInput&&(i.altInput.value=""),void 0!==i.mobileInput&&(i.mobileInput.value=""),i.selectedDates=[],i.latestSelectedDateObj=void 0,!0===t&&(i.currentYear=i._initialDate.getFullYear(),i.currentMonth=i._initialDate.getMonth()),!0===i.config.enableTime){const{hours:e,minutes:t,seconds:n}=Jt(i.config);a(e,t,n)}i.redraw(),e&&j("onChange")},i.close=function(){i.isOpen=!1,i.isMobile||(void 0!==i.calendarContainer&&i.calendarContainer.classList.remove("open"),void 0!==i._input&&i._input.classList.remove("active")),j("onClose")},i._createElement=Vt,i.destroy=function(){void 0!==i.config&&j("onDestroy");for(let e=i._handlers.length;e--;)i._handlers[e].remove();if(i._handlers=[],i.mobileInput)i.mobileInput.parentNode&&i.mobileInput.parentNode.removeChild(i.mobileInput),i.mobileInput=void 0;else if(i.calendarContainer&&i.calendarContainer.parentNode)if(i.config.static&&i.calendarContainer.parentNode){const e=i.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else i.calendarContainer.parentNode.removeChild(i.calendarContainer);i.altInput&&(i.input.type="text",i.altInput.parentNode&&i.altInput.parentNode.removeChild(i.altInput),delete i.altInput),i.input&&(i.input.type=i.input._type,i.input.classList.remove("flatpickr-input"),i.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((e=>{try{delete i[e]}catch(e){}}))},i.isEnabled=A,i.jumpToDate=h,i.open=function(e,t=i._positionElement){if(!0===i.isMobile){if(e){e.preventDefault();const t=Gt(e);t&&t.blur()}return void 0!==i.mobileInput&&(i.mobileInput.focus(),i.mobileInput.click()),void j("onOpen")}if(i._input.disabled||i.config.inline)return;const n=i.isOpen;i.isOpen=!0,n||(i.calendarContainer.classList.add("open"),i._input.classList.add("active"),j("onOpen"),H(t)),!0===i.config.enableTime&&!0===i.config.noCalendar&&(!1!==i.config.allowInput||void 0!==e&&i.timeContainer.contains(e.relatedTarget)||setTimeout((()=>i.hourElement.select()),50))},i.redraw=V,i.set=function(e,t){if(null!==e&&"object"==typeof e){Object.assign(i.config,e);for(const t in e)void 0!==W[t]&&W[t].forEach((e=>e()))}else i.config[e]=t,void 0!==W[e]?W[e].forEach((e=>e())):Rt.indexOf(e)>-1&&(i.config[e]=$t(t));i.redraw(),Q(!0)},i.setDate=function(e,t=!1,n=i.config.dateFormat){if(0!==e&&!e||e instanceof Array&&0===e.length)return i.clear(t);G(e,n),i.latestSelectedDateObj=i.selectedDates[i.selectedDates.length-1],i.redraw(),h(void 0,t),l(),0===i.selectedDates.length&&i.clear(!1),Q(t),t&&j("onChange")},i.toggle=function(e){if(!0===i.isOpen)return i.close();i.open(e)};const W={locale:[$,T],showMonths:[S,o,E],minDate:[h],maxDate:[h],clickOpens:[()=>{!0===i.config.clickOpens?(u(i._input,"focus",i.open),u(i._input,"click",i.open)):(i._input.removeEventListener("focus",i.open),i._input.removeEventListener("click",i.open))}]};function G(e,t){let n=[];if(e instanceof Array)n=e.map((e=>i.parseDate(e,t)));else if(e instanceof Date||"number"==typeof e)n=[i.parseDate(e,t)];else if("string"==typeof e)switch(i.config.mode){case"single":case"time":n=[i.parseDate(e,t)];break;case"multiple":n=e.split(i.config.conjunction).map((e=>i.parseDate(e,t)));break;case"range":n=e.split(i.l10n.rangeSeparator).map((e=>i.parseDate(e,t)))}else i.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(e)}`));i.selectedDates=i.config.allowInvalidPreload?n:n.filter((e=>e instanceof Date&&A(e,!1))),"range"===i.config.mode&&i.selectedDates.sort(((e,t)=>e.getTime()-t.getTime()))}function U(e){return e.slice().map((e=>"string"==typeof e||"number"==typeof e||e instanceof Date?i.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:i.parseDate(e.from,void 0),to:i.parseDate(e.to,void 0)}:e)).filter((e=>e))}function j(e,t){if(void 0===i.config)return;const n=i.config[e];if(void 0!==n&&n.length>0)for(let e=0;n[e]&&e<n.length;e++)n[e](i.selectedDates,i.input.value,i,t);"onChange"===e&&(i.input.dispatchEvent(Y("change")),i.input.dispatchEvent(Y("input")))}function Y(e){const t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function q(e){for(let t=0;t<i.selectedDates.length;t++)if(0===Zt(i.selectedDates[t],e))return""+t;return!1}function X(){i.config.noCalendar||i.isMobile||!i.monthNav||(i.yearElements.forEach(((e,t)=>{const n=new Date(i.currentYear,i.currentMonth,1);n.setMonth(i.currentMonth+t),i.config.showMonths>1||"static"===i.config.monthSelectorType?i.monthElements[t].textContent=jt(n.getMonth(),i.config.shorthandCurrentMonth,i.l10n)+" ":i.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),i._hidePrevMonthArrow=void 0!==i.config.minDate&&(i.currentYear===i.config.minDate.getFullYear()?i.currentMonth<=i.config.minDate.getMonth():i.currentYear<i.config.minDate.getFullYear()),i._hideNextMonthArrow=void 0!==i.config.maxDate&&(i.currentYear===i.config.maxDate.getFullYear()?i.currentMonth+1>i.config.maxDate.getMonth():i.currentYear>i.config.maxDate.getFullYear()))}function K(e){return i.selectedDates.map((t=>i.formatDate(t,e))).filter(((e,t,n)=>"range"!==i.config.mode||i.config.enableTime||n.indexOf(e)===t)).join("range"!==i.config.mode?i.config.conjunction:i.l10n.rangeSeparator)}function Q(e=!0){void 0!==i.mobileInput&&i.mobileFormatStr&&(i.mobileInput.value=void 0!==i.latestSelectedDateObj?i.formatDate(i.latestSelectedDateObj,i.mobileFormatStr):""),i.input.value=K(i.config.dateFormat),void 0!==i.altInput&&(i.altInput.value=K(i.config.altFormat)),!1!==e&&j("onValueUpdate")}function Z(e){const t=Gt(e),n=i.prevMonthNav.contains(t),o=i.nextMonthNav.contains(t);n||o?x(n?-1:1):i.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?i.changeYear(i.currentYear+1):t.classList.contains("arrowDown")&&i.changeYear(i.currentYear-1)}return function(){i.element=i.input=e,i.isOpen=!1,function(){const o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],s=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),r={};i.config.parseDate=s.parseDate,i.config.formatDate=s.formatDate,Object.defineProperty(i.config,"enable",{get:()=>i.config._enable,set:e=>{i.config._enable=U(e)}}),Object.defineProperty(i.config,"disable",{get:()=>i.config._disable,set:e=>{i.config._disable=U(e)}});const l="time"===s.mode;if(!s.dateFormat&&(s.enableTime||l)){const e=ii.defaultConfig.dateFormat||It.dateFormat;r.dateFormat=s.noCalendar||l?"H:i"+(s.enableSeconds?":S":""):e+" H:i"+(s.enableSeconds?":S":"")}if(s.altInput&&(s.enableTime||l)&&!s.altFormat){const e=ii.defaultConfig.altFormat||It.altFormat;r.altFormat=s.noCalendar||l?"h:i"+(s.enableSeconds?":S K":" K"):e+` h:i${s.enableSeconds?":S":""} K`}Object.defineProperty(i.config,"minDate",{get:()=>i.config._minDate,set:N("min")}),Object.defineProperty(i.config,"maxDate",{get:()=>i.config._maxDate,set:N("max")});const a=e=>t=>{i.config["min"===e?"_minTime":"_maxTime"]=i.parseDate(t,"H:i:S")};Object.defineProperty(i.config,"minTime",{get:()=>i.config._minTime,set:a("min")}),Object.defineProperty(i.config,"maxTime",{get:()=>i.config._maxTime,set:a("max")}),"time"===s.mode&&(i.config.noCalendar=!0,i.config.enableTime=!0),Object.assign(i.config,r,s);for(let e=0;e<o.length;e++)i.config[o[e]]=!0===i.config[o[e]]||"true"===i.config[o[e]];Rt.filter((e=>void 0!==i.config[e])).forEach((e=>{i.config[e]=$t(i.config[e]||[]).map(n)})),i.isMobile=!i.config.disableMobile&&!i.config.inline&&"single"===i.config.mode&&!i.config.disable.length&&!i.config.enable&&!i.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let e=0;e<i.config.plugins.length;e++){const t=i.config.plugins[e](i)||{};for(const e in t)Rt.indexOf(e)>-1?i.config[e]=$t(t[e]).map(n).concat(i.config[e]):void 0===s[e]&&(i.config[e]=t[e])}s.altInputClass||(i.config.altInputClass=L().className+" "+i.config.altInputClass),j("onParseConfig")}(),$(),i.input=L(),i.input?(i.input._type=i.input.type,i.input.type="text",i.input.classList.add("flatpickr-input"),i._input=i.input,i.config.altInput&&(i.altInput=Vt(i.input.nodeName,i.config.altInputClass),i._input=i.altInput,i.altInput.placeholder=i.input.placeholder,i.altInput.disabled=i.input.disabled,i.altInput.required=i.input.required,i.altInput.tabIndex=i.input.tabIndex,i.altInput.type="text",i.input.setAttribute("type","hidden"),!i.config.static&&i.input.parentNode&&i.input.parentNode.insertBefore(i.altInput,i.input.nextSibling)),i.config.allowInput||i._input.setAttribute("readonly","readonly"),i._positionElement=i.config.positionElement||i._input):i.config.errorHandler(new Error("Invalid input element specified")),function(){i.selectedDates=[],i.now=i.parseDate(i.config.now)||new Date;const e=i.config.defaultDate||("INPUT"!==i.input.nodeName&&"TEXTAREA"!==i.input.nodeName||!i.input.placeholder||i.input.value!==i.input.placeholder?i.input.value:null);e&&G(e,i.config.dateFormat),i._initialDate=i.selectedDates.length>0?i.selectedDates[0]:i.config.minDate&&i.config.minDate.getTime()>i.now.getTime()?i.config.minDate:i.config.maxDate&&i.config.maxDate.getTime()<i.now.getTime()?i.config.maxDate:i.now,i.currentYear=i._initialDate.getFullYear(),i.currentMonth=i._initialDate.getMonth(),i.selectedDates.length>0&&(i.latestSelectedDateObj=i.selectedDates[0]),void 0!==i.config.minTime&&(i.config.minTime=i.parseDate(i.config.minTime,"H:i")),void 0!==i.config.maxTime&&(i.config.maxTime=i.parseDate(i.config.maxTime,"H:i")),i.minDateHasTime=!!i.config.minDate&&(i.config.minDate.getHours()>0||i.config.minDate.getMinutes()>0||i.config.minDate.getSeconds()>0),i.maxDateHasTime=!!i.config.maxDate&&(i.config.maxDate.getHours()>0||i.config.maxDate.getMinutes()>0||i.config.maxDate.getSeconds()>0)}(),i.utils={getDaysInMonth:(e=i.currentMonth,t=i.currentYear)=>1===e&&(t%4==0&&t%100!=0||t%400==0)?29:i.l10n.daysInMonth[e]},i.isMobile||function(){const e=window.document.createDocumentFragment();if(i.calendarContainer=Vt("div","flatpickr-calendar"),i.calendarContainer.tabIndex=-1,!i.config.noCalendar){if(e.appendChild((i.monthNav=Vt("div","flatpickr-months"),i.yearElements=[],i.monthElements=[],i.prevMonthNav=Vt("span","flatpickr-prev-month"),i.prevMonthNav.innerHTML=i.config.prevArrow,i.nextMonthNav=Vt("span","flatpickr-next-month"),i.nextMonthNav.innerHTML=i.config.nextArrow,S(),Object.defineProperty(i,"_hidePrevMonthArrow",{get:()=>i.__hidePrevMonthArrow,set(e){i.__hidePrevMonthArrow!==e&&(Ht(i.prevMonthNav,"flatpickr-disabled",e),i.__hidePrevMonthArrow=e)}}),Object.defineProperty(i,"_hideNextMonthArrow",{get:()=>i.__hideNextMonthArrow,set(e){i.__hideNextMonthArrow!==e&&(Ht(i.nextMonthNav,"flatpickr-disabled",e),i.__hideNextMonthArrow=e)}}),i.currentYearElement=i.yearElements[0],X(),i.monthNav)),i.innerContainer=Vt("div","flatpickr-innerContainer"),i.config.weekNumbers){const{weekWrapper:e,weekNumbers:t}=function(){i.calendarContainer.classList.add("hasWeeks");const e=Vt("div","flatpickr-weekwrapper");e.appendChild(Vt("span","flatpickr-weekday",i.l10n.weekAbbreviation));const t=Vt("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}();i.innerContainer.appendChild(e),i.weekNumbers=t,i.weekWrapper=e}i.rContainer=Vt("div","flatpickr-rContainer"),i.rContainer.appendChild(E()),i.daysContainer||(i.daysContainer=Vt("div","flatpickr-days"),i.daysContainer.tabIndex=-1),b(),i.rContainer.appendChild(i.daysContainer),i.innerContainer.appendChild(i.rContainer),e.appendChild(i.innerContainer)}i.config.enableTime&&e.appendChild(function(){i.calendarContainer.classList.add("hasTime"),i.config.noCalendar&&i.calendarContainer.classList.add("noCalendar");const e=Jt(i.config);i.timeContainer=Vt("div","flatpickr-time"),i.timeContainer.tabIndex=-1;const t=Vt("span","flatpickr-time-separator",":"),n=Wt("flatpickr-hour",{"aria-label":i.l10n.hourAriaLabel});i.hourElement=n.getElementsByTagName("input")[0];const o=Wt("flatpickr-minute",{"aria-label":i.l10n.minuteAriaLabel});if(i.minuteElement=o.getElementsByTagName("input")[0],i.hourElement.tabIndex=i.minuteElement.tabIndex=-1,i.hourElement.value=Ft(i.latestSelectedDateObj?i.latestSelectedDateObj.getHours():i.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),i.minuteElement.value=Ft(i.latestSelectedDateObj?i.latestSelectedDateObj.getMinutes():e.minutes),i.hourElement.setAttribute("step",i.config.hourIncrement.toString()),i.minuteElement.setAttribute("step",i.config.minuteIncrement.toString()),i.hourElement.setAttribute("min",i.config.time_24hr?"0":"1"),i.hourElement.setAttribute("max",i.config.time_24hr?"23":"12"),i.hourElement.setAttribute("maxlength","2"),i.minuteElement.setAttribute("min","0"),i.minuteElement.setAttribute("max","59"),i.minuteElement.setAttribute("maxlength","2"),i.timeContainer.appendChild(n),i.timeContainer.appendChild(t),i.timeContainer.appendChild(o),i.config.time_24hr&&i.timeContainer.classList.add("time24hr"),i.config.enableSeconds){i.timeContainer.classList.add("hasSeconds");const t=Wt("flatpickr-second");i.secondElement=t.getElementsByTagName("input")[0],i.secondElement.value=Ft(i.latestSelectedDateObj?i.latestSelectedDateObj.getSeconds():e.seconds),i.secondElement.setAttribute("step",i.minuteElement.getAttribute("step")),i.secondElement.setAttribute("min","0"),i.secondElement.setAttribute("max","59"),i.secondElement.setAttribute("maxlength","2"),i.timeContainer.appendChild(Vt("span","flatpickr-time-separator",":")),i.timeContainer.appendChild(t)}return i.config.time_24hr||(i.amPM=Vt("span","flatpickr-am-pm",i.l10n.amPM[Nt((i.latestSelectedDateObj?i.hourElement.value:i.config.defaultHour)>11)]),i.amPM.title=i.l10n.toggleTitle,i.amPM.tabIndex=-1,i.timeContainer.appendChild(i.amPM)),i.timeContainer}()),Ht(i.calendarContainer,"rangeMode","range"===i.config.mode),Ht(i.calendarContainer,"animate",!0===i.config.animate),Ht(i.calendarContainer,"multiMonth",i.config.showMonths>1),i.calendarContainer.appendChild(e);const t=void 0!==i.config.appendTo&&void 0!==i.config.appendTo.nodeType;if((i.config.inline||i.config.static)&&(i.calendarContainer.classList.add(i.config.inline?"inline":"static"),i.config.inline&&(!t&&i.element.parentNode?i.element.parentNode.insertBefore(i.calendarContainer,i._input.nextSibling):void 0!==i.config.appendTo&&i.config.appendTo.appendChild(i.calendarContainer)),i.config.static)){const e=Vt("div","flatpickr-wrapper");i.element.parentNode&&i.element.parentNode.insertBefore(e,i.element),e.appendChild(i.element),i.altInput&&e.appendChild(i.altInput),e.appendChild(i.calendarContainer)}i.config.static||i.config.inline||(void 0!==i.config.appendTo?i.config.appendTo:window.document.body).appendChild(i.calendarContainer)}(),function(){if(i.config.wrap&&["open","close","toggle","clear"].forEach((e=>{Array.prototype.forEach.call(i.element.querySelectorAll(`[data-${e}]`),(t=>u(t,"click",i[e])))})),i.isMobile)return void function(){const e=i.config.enableTime?i.config.noCalendar?"time":"datetime-local":"date";i.mobileInput=Vt("input",i.input.className+" flatpickr-mobile"),i.mobileInput.tabIndex=1,i.mobileInput.type=e,i.mobileInput.disabled=i.input.disabled,i.mobileInput.required=i.input.required,i.mobileInput.placeholder=i.input.placeholder,i.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",i.selectedDates.length>0&&(i.mobileInput.defaultValue=i.mobileInput.value=i.formatDate(i.selectedDates[0],i.mobileFormatStr)),i.config.minDate&&(i.mobileInput.min=i.formatDate(i.config.minDate,"Y-m-d")),i.config.maxDate&&(i.mobileInput.max=i.formatDate(i.config.maxDate,"Y-m-d")),i.input.getAttribute("step")&&(i.mobileInput.step=String(i.input.getAttribute("step"))),i.input.type="hidden",void 0!==i.altInput&&(i.altInput.type="hidden");try{i.input.parentNode&&i.input.parentNode.insertBefore(i.mobileInput,i.input.nextSibling)}catch(e){}u(i.mobileInput,"change",(e=>{i.setDate(Gt(e).value,!1,i.mobileFormatStr),j("onChange"),j("onClose")}))}();const e=Lt(F,50);if(i._debouncedChange=Lt(c,300),i.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&u(i.daysContainer,"mouseover",(e=>{"range"===i.config.mode&&M(Gt(e))})),u(window.document.body,"keydown",P),i.config.inline||i.config.static||u(window,"resize",e),void 0!==window.ontouchstart?u(window.document,"touchstart",k):u(window.document,"mousedown",k),u(window.document,"focus",k,{capture:!0}),!0===i.config.clickOpens&&(u(i._input,"focus",i.open),u(i._input,"click",i.open)),void 0!==i.daysContainer&&(u(i.monthNav,"click",Z),u(i.monthNav,["keyup","increment"],d),u(i.daysContainer,"click",B)),void 0!==i.timeContainer&&void 0!==i.minuteElement&&void 0!==i.hourElement){const e=e=>Gt(e).select();u(i.timeContainer,["increment"],s),u(i.timeContainer,"blur",s,{capture:!0}),u(i.timeContainer,"click",p),u([i.hourElement,i.minuteElement],["focus","click"],e),void 0!==i.secondElement&&u(i.secondElement,"focus",(()=>i.secondElement&&i.secondElement.select())),void 0!==i.amPM&&u(i.amPM,"click",(e=>{s(e),c()}))}i.config.allowInput&&u(i._input,"blur",I)}(),(i.selectedDates.length||i.config.noCalendar)&&(i.config.enableTime&&l(i.config.noCalendar?i.latestSelectedDateObj:void 0),Q(!1)),o();const r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!i.isMobile&&r&&H(),j("onReady")}(),i}function ti(e,t){const i=Array.prototype.slice.call(e).filter((e=>e instanceof HTMLElement)),n=[];for(let e=0;e<i.length;e++){const o=i[e];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=ei(o,t||{}),n.push(o._flatpickr)}catch(e){console.error(e)}}return 1===n.length?n[0]:n}__webpack_require__(943),"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return ti(this,e)},HTMLElement.prototype.flatpickr=function(e){return ti([this],e)});var ii=function(e,t){return"string"==typeof e?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};ii.defaultConfig={},ii.l10ns={en:Object.assign({},Mt),default:Object.assign({},Mt)},ii.localize=e=>{ii.l10ns.default=Object.assign(Object.assign({},ii.l10ns.default),e)},ii.setDefaults=e=>{ii.defaultConfig=Object.assign(Object.assign({},ii.defaultConfig),e)},ii.parseDate=Qt({}),ii.formatDate=Kt({}),ii.compareDates=Zt,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return ti(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=ii);var ni=ii;class oi{constructor(){this._boundedEvents=[]}bind(e,t,i,n){const o=Array.isArray(t)?t:[t];for(const t of o)e.addEventListener(t,i,n),this._boundedEvents.push({element:e,eventName:t,listener:i})}unbindAll(){for(;this._boundedEvents.length>0;){const e=this._boundedEvents.pop(),{element:t,eventName:i,listener:n}=e;(null==t?void 0:t.removeEventListener)&&t.removeEventListener(i,n)}}}const si=l&&ni||l;class ri{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._debounceTypingDelay=0,this._shouldTriggerQuery=!0,this._inputType="text",this.searchTerms=[],this._bindEventService=new oi}get gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this.grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get columnFilter(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)&&void 0!==t?t:{}}get defaultOperator(){return ye.empty}get inputType(){return this._inputType}set inputType(e){this._inputType=e}get locales(){return this.gridOptions.locales||me.locales}get operator(){return this._operator||this.defaultOperator}set operator(e){this._operator=e}init(e){var t,i,n,o,s;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.operator=e.operator,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[];const r=null===(t=this.gridOptions)||void 0===t?void 0:t.backendServiceApi;this._debounceTypingDelay=null!==(s=r?null!==(i=null==r?void 0:r.filterTypingDebounce)&&void 0!==i?i:null===(n=this.gridOptions)||void 0===n?void 0:n.defaultBackendServiceFilterTypingDebounce:null===(o=this.gridOptions)||void 0===o?void 0:o.filterTypingDebounce)&&void 0!==s?s:0;const l=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._filterElm=this.createDomElement(l),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change","wheel"],this.onTriggerEvent.bind(this)),this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(e=!0){this._filterElm&&this._selectOperatorElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this._selectOperatorElm.selectedIndex=0,this._filterInputElm.value="",this.onTriggerEvent(void 0),this._filterElm.classList.remove("filled"),this._filterInputElm.classList.remove("filled"))}destroy(){var e,t,i,n;this._bindEventService.unbindAll(),null===(t=null===(e=this._selectOperatorElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e),null===(n=null===(i=this._filterElm)||void 0===i?void 0:i.remove)||void 0===n||n.call(i)}getValues(){return this._filterInputElm.value}setValues(e,t){let i="";if(e){const t=Array.isArray(e)?e[0]:e;i=`${null!=t?t:""}`}if(this._filterInputElm.value=i,""!==this.getValues()?(this._filterElm.classList.add("filled"),this._filterInputElm.classList.add("filled")):(this._filterElm.classList.remove("filled"),this._filterInputElm.classList.remove("filled")),this.operator=t||this.defaultOperator,t&&this._selectOperatorElm){const e=tt(this.operator);this._selectOperatorElm.value=e}}buildInputElement(){var e,t,i,n,o,s,r;const l=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"";let a=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.defaultFilterPlaceholder)&&void 0!==n?n:"";(null===(o=this.columnFilter)||void 0===o?void 0:o.placeholder)&&(a=this.columnFilter.placeholder);const d=document.createElement("input");return d.type=this._inputType||"text",d.className=`form-control compound-input filter-${l}`,d.autocomplete="off",d.placeholder=a,d.setAttribute("role","presentation"),d.setAttribute("aria-label",null!==(r=null===(s=this.columnFilter)||void 0===s?void 0:s.ariaLabel)&&void 0!==r?r:`${mt(l+"")} Search Filter`),d}getOperatorOptionValues(){var e;const t=this.columnDef.type&&this.columnDef.type?this.columnDef.type:fe.string;let i=[];if(null===(e=this.columnFilter)||void 0===e?void 0:e.compoundOperatorList)return this.columnFilter.compoundOperatorList;switch(t){case fe.string:case fe.text:case fe.readonly:case fe.password:i=[{operator:"",description:this.getOutputText("CONTAINS","TEXT_CONTAINS","Contains")},{operator:"<>",description:this.getOutputText("NOT_CONTAINS","TEXT_NOT_CONTAINS","Not Contains")},{operator:"=",description:this.getOutputText("EQUALS","TEXT_EQUALS","Equals")},{operator:"!=",description:this.getOutputText("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to")},{operator:"a*",description:this.getOutputText("STARTS_WITH","TEXT_STARTS_WITH","Starts with")},{operator:"*z",description:this.getOutputText("ENDS_WITH","TEXT_ENDS_WITH","Ends with")}];break;default:i=[{operator:"",description:""},{operator:"=",description:this.getOutputText("EQUAL_TO","TEXT_EQUAL_TO","Equal to")},{operator:"<",description:this.getOutputText("LESS_THAN","TEXT_LESS_THAN","Less than")},{operator:"<=",description:this.getOutputText("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to")},{operator:">",description:this.getOutputText("GREATER_THAN","TEXT_GREATER_THAN","Greater than")},{operator:">=",description:this.getOutputText("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to")},{operator:"<>",description:this.getOutputText("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to")}]}return i}getOutputText(e,t,i){var n,o,s,r;if((null===(n=this.gridOptions)||void 0===n?void 0:n.enableTranslate)&&(null===(o=this.translaterService)||void 0===o?void 0:o.translate)){const t=Qe(this.gridOptions);return this.translaterService.translate(`${t}${e}`)}return null!==(r=null===(s=this.locales)||void 0===s?void 0:s[t])&&void 0!==r?r:i}createDomElement(e){var t,i;const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",o=this.grid.getHeaderRowColumn(n);Le(o),this._selectOperatorElm=Dt(this.getOperatorOptionValues(),this.gridOptions),this._filterInputElm=this.buildInputElement();const s=document.createElement("span"),r=document.createElement("div");r.className=`form-group search-filter filter-${n}`;const l=document.createElement("div");l.className="input-group";const a=document.createElement("div");if(a.className="input-group-addon input-group-prepend operator",a.appendChild(this._selectOperatorElm),l.appendChild(a),l.appendChild(this._filterInputElm),l.appendChild(s),r.appendChild(l),this._filterInputElm.value=`${null!=e?e:""}`,this._filterInputElm.dataset.columnid=`${n}`,this.operator){const e=tt(this.operator);this._selectOperatorElm.value=e}return e&&this._filterInputElm.classList.add("filled"),r&&o.appendChild(r),r}onTriggerEvent(e){var t,i;if(this._clearFilterTriggered)this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled");else{const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:"",o=this._selectOperatorElm.value;let s=this._filterInputElm.value;const r=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof s&&r&&(s=s.trim()),null!=s&&""!==s?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled");const l={columnDef:this.columnDef,searchTerms:s?[s]:null,operator:o,shouldTriggerQuery:this._shouldTriggerQuery},a="keyup"===n&&"Enter"!==(null===(i=e)||void 0===i?void 0:i.key)?this._debounceTypingDelay:0;a>0?(clearTimeout(this.timer),this.timer=setTimeout((()=>this.callback(e,l)),a)):this.callback(e,l)}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}const li=l&&ni||l,ai=pe()||he;class di{constructor(e){this.translaterService=e}filterCollection(e,t,i=ve.chain){let n=[];if(Array.isArray(t)){n=i===ve.merge?[]:[...e];for(const o of t)if(i===ve.merge){const t=this.singleFilterCollection(e,o);n=Ct([...n,...t])}else n=this.singleFilterCollection(n,o)}else n=this.singleFilterCollection(e,t);return n}singleFilterCollection(e,t){let i=[];if(t){const n=t.property,o=t.operator||ye.equal,s=void 0===t.value?"":t.value;switch(o){case ye.equal:i=n?e.filter((e=>e[n]===s)):e.filter((e=>e===s));break;case ye.contains:i=n?e.filter((e=>-1!==e[n].toString().indexOf(s.toString()))):e.filter((e=>null!=e&&-1!==e.toString().indexOf(s.toString())));break;case ye.notContains:i=n?e.filter((e=>-1===e[n].toString().indexOf(s.toString()))):e.filter((e=>null!=e&&-1===e.toString().indexOf(s.toString())));break;case ye.notEqual:default:i=n?e.filter((e=>e[n]!==s)):e.filter((e=>e!==s))}}return i}sortCollection(e,t,i,n){var o,s,r,l;if(n&&(!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 a=[];if(i)if(Array.isArray(i))a=t.sort(((t,o)=>{var s,r,l,a;for(let d=0,u=i.length;d<u;d++){const u=i[d];if(null==u?void 0:u.property){const i=u.sortDesc?Se.desc:Se.asc,d=u.property,c=xt(null!==(r=null!==(s=null==u?void 0:u.fieldType)&&void 0!==s?s:null==e?void 0:e.type)&&void 0!==r?r:fe.string,n?(null===(l=this.translaterService)||void 0===l?void 0:l.translate)&&this.translaterService.translate(t[d]||" "):t[d],n?(null===(a=this.translaterService)||void 0===a?void 0:a.translate)&&this.translaterService.translate(o[d]||" "):o[d],i,e);if(c!==Se.neutral)return c}}return Se.neutral}));else if(null==i?void 0:i.property){const r=i.property,l=i.sortDesc?Se.desc:Se.asc,d=null!==(s=null!==(o=null==i?void 0:i.fieldType)&&void 0!==o?o:null==e?void 0:e.type)&&void 0!==s?s:fe.string;a=t.sort(((t,i)=>{var o,s;const a=n?(null===(o=this.translaterService)||void 0===o?void 0:o.translate)&&this.translaterService.translate(t[r]||" "):t[r],u=n?(null===(s=this.translaterService)||void 0===s?void 0:s.translate)&&this.translaterService.translate(i[r]||" "):i[r],c=xt(d,a,u,l,e);return c!==Se.neutral?c:Se.neutral}))}else if(i&&!i.property){const o=i.sortDesc?Se.desc:Se.asc,s=null!==(l=null!==(r=null==i?void 0:i.fieldType)&&void 0!==r?r:null==e?void 0:e.type)&&void 0!==l?l:fe.string;a=t.sort(((t,i)=>{var r,l;const a=n?(null===(r=this.translaterService)||void 0===r?void 0:r.translate)&&this.translaterService.translate(t||" "):t,d=n?(null===(l=this.translaterService)||void 0===l?void 0:l.translate)&&this.translaterService.translate(i||" "):i,u=xt(s,a,d,o,e);return u!==Se.neutral?u:Se.neutral}))}return a}}function ui(e,t,i,n,o=!1,s,r){var l,a,d,u,c,h,p,m,f,g,v,_,C,b,y,w,S,E;const T=null!==(l=null==i?void 0:i.id)&&void 0!==l?l:"",x=n.getOptions(),O=null!==(a="editor"===e?null==i?void 0:i.internalColumnEditor:null==i?void 0:i.filter)&&void 0!==a?a:{},k=null!==(d=null==O?void 0:O.collectionOptions)&&void 0!==d?d:{},D=null!==(u=null==k?void 0:k.separatorBetweenTextLabels)&&void 0!==u?u:"",A=null!==(c=null==O?void 0:O.enableTranslateLabel)&&void 0!==c&&c,R=null!==(h=null==x?void 0:x.enableTranslate)&&void 0!==h&&h,I=null!==(p=null==O?void 0:O.enableRenderHtml)&&void 0!==p&&p,P=null!==(m=null==x?void 0:x.sanitizeHtmlOptions)&&void 0!==m?m:{},M=null!==(g=null===(f=null==O?void 0:O.customStructure)||void 0===f?void 0:f.label)&&void 0!==g?g:"label",F=null!==(_=null===(v=null==O?void 0:O.customStructure)||void 0===v?void 0:v.labelPrefix)&&void 0!==_?_:"labelPrefix",N=null!==(b=null===(C=null==O?void 0:O.customStructure)||void 0===C?void 0:C.labelSuffix)&&void 0!==b?b:"labelSuffix",L=null!==(w=null===(y=null==O?void 0:O.customStructure)||void 0===y?void 0:y.optionLabel)&&void 0!==w?w:"value",$=null!==(E=null===(S=null==O?void 0:O.customStructure)||void 0===S?void 0:S.value)&&void 0!==E?E:"value",H=document.createElement("select");H.className="ms-filter search-filter";const V="filter"===e?["search-filter",`filter-${T}`]:["select-editor",`editor-${T}`];H.classList.add(...V),H.multiple=o;const z=document.createDocumentFragment();let B=!1;if(Array.isArray(t))if(t.every((e=>"string"==typeof e)))for(const i of t){const t=document.createElement("option");"filter"===e&&Array.isArray(r)&&(t.selected=r.findIndex((e=>e===i))>=0),t.value=i,t.label=i,t.textContent=i,z.appendChild(t),(t.selected&&o||t.selected&&!o&&""!==i)&&(B=!0)}else t.forEach((t=>{if(!t||void 0===t[M]&&void 0===t.labelKey)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 i=document.createElement("option"),n=t.labelKey||t[M],l=(t.labelKey||A&&s)&&n&&R?null==s?void 0:s.translate(n||" "):n;let a=t[F]||"",d=t[N]||"",u=t.hasOwnProperty(L)?t[L]:"";(null==u?void 0:u.toString)&&(u=u.toString().replace(/\"/g,"'")),a=A&&s&&a&&"string"==typeof a?s.translate(a||" "):a,d=A&&s&&d&&"string"==typeof d?s.translate(d||" "):d,u=A&&s&&u&&"string"==typeof u?s.translate(u||" "):u;let c=[a,"string"==typeof l||"number"==typeof l?l.toString():l,d].filter((e=>e)).join(D);I?(c=Be(at(x,c,P)),i.innerHTML=c):i.textContent=c;let h=t[$];null==h&&(h=""),"filter"===e&&Array.isArray(r)&&(i.selected=r.findIndex((e=>`${e}`==`${t[$]}`))>=0),i.value=`${h}`,i.label=`${null!=u?u:""}`,z.appendChild(i),(i.selected&&o||i.selected&&!o&&""!==t[$])&&(B=!0)}));return H.appendChild(z),{selectElement:H,hasFoundSearchTerm:B}}function ci(e,t){if(e)for(const i of t){const t=e.getAttribute(i);if(t)return t}return null}__webpack_require__(633),__webpack_require__(97),__webpack_require__(638);class hi{constructor(e,t,i,n,o,s,r,l,a,d,u,c,h,p,m,f){this.autoTooltipExtension=e,this.cellExternalCopyExtension=t,this.cellMenuExtension=i,this.checkboxSelectorExtension=n,this.columnPickerExtension=o,this.contextMenuExtension=s,this.draggableGroupingExtension=r,this.gridMenuExtension=l,this.groupItemMetaExtension=a,this.headerButtonExtension=d,this.headerMenuExtension=u,this.rowDetailViewExtension=c,this.rowMoveManagerExtension=h,this.rowSelectionExtension=p,this.sharedService=m,this.translaterService=f,this._extensionCreatedList={},this._extensionList={}}get extensionList(){return this._extensionList}dispose(){var e;this.sharedService.visibleColumns=[];for(const t of Object.keys(this._extensionList))if(this._extensionList.hasOwnProperty(t)){const i=this._extensionList[t];(null===(e=null==i?void 0:i.class)||void 0===e?void 0:e.dispose)&&i.class.dispose()}for(const e of Object.keys(this._extensionList))delete this._extensionList[e]}getAllColumns(){return this.sharedService.allColumns||[]}getVisibleColumns(){return this.sharedService.visibleColumns||[]}getExtensionByName(e){if(this._extensionList&&this._extensionList[e])return this._extensionList[e]}getSlickgridAddonInstance(e){const t=this.getExtensionByName(e);return t&&t.class&&t.instance?t.class&&t.class.getAddonInstance?t.class.getAddonInstance():t.instance:null}autoResizeColumns(){this.sharedService.slickGrid.autosizeColumns()}bindDifferentExtensions(){if(this.sharedService&&this.sharedService.gridOptions){if(this.sharedService.gridOptions.enableTranslate&&this.translateItems(this.sharedService.allColumns,"nameKey","name"),this.sharedService.gridOptions.enableAutoTooltip&&this.autoTooltipExtension&&this.autoTooltipExtension.register){const e=this.autoTooltipExtension.register();e&&(this._extensionList[ae.autoTooltip]={name:ae.autoTooltip,class:this.autoTooltipExtension,instance:e})}if(this.sharedService.gridOptions.enableExcelCopyBuffer&&this.cellExternalCopyExtension&&this.cellExternalCopyExtension.register){const e=this.cellExternalCopyExtension.register();e&&(this._extensionList[ae.cellExternalCopyManager]={name:ae.cellExternalCopyManager,class:this.cellExternalCopyExtension,instance:e})}if(this.sharedService.gridOptions.enableCellMenu&&this.cellMenuExtension&&this.cellMenuExtension.register){const e=this.cellMenuExtension.register();e&&(this._extensionList[ae.cellMenu]={name:ae.cellMenu,class:this.cellMenuExtension,instance:e})}if(!this.getExtensionByName(ae.rowSelection)&&(this.sharedService.gridOptions.enableRowSelection||this.sharedService.gridOptions.enableCheckboxSelector||this.sharedService.gridOptions.enableRowDetailView||this.sharedService.gridOptions.enableRowMoveManager)&&this.rowSelectionExtension&&this.rowSelectionExtension.register){const e=this.rowSelectionExtension.register();e&&(this._extensionList[ae.rowSelection]={name:ae.rowSelection,class:this.rowSelectionExtension,instance:e})}if(this.sharedService.gridOptions.enableCheckboxSelector&&this.checkboxSelectorExtension&&this.checkboxSelectorExtension.register){const e=this.getExtensionByName(ae.rowSelection);this.checkboxSelectorExtension.register(null==e?void 0:e.instance);const t=this.getCreatedExtensionByName(ae.checkboxSelector),i=t&&t.instance;i&&(this._extensionList[ae.checkboxSelector]={name:ae.checkboxSelector,class:this.checkboxSelectorExtension,instance:i})}if(this.sharedService.gridOptions.enableColumnPicker&&this.columnPickerExtension&&this.columnPickerExtension.register){const e=this.columnPickerExtension.register();e&&(this._extensionList[ae.columnPicker]={name:ae.columnPicker,class:this.columnPickerExtension,instance:e})}if(this.sharedService.gridOptions.enableContextMenu&&this.contextMenuExtension&&this.contextMenuExtension.register){const e=this.contextMenuExtension.register();e&&(this._extensionList[ae.contextMenu]={name:ae.contextMenu,class:this.contextMenuExtension,instance:e})}if(this.sharedService.gridOptions.enableDraggableGrouping&&this.draggableGroupingExtension&&this.draggableGroupingExtension.register){const e=this.draggableGroupingExtension.register();e&&(this._extensionList[ae.draggableGrouping]={name:ae.draggableGrouping,class:this.draggableGroupingExtension,instance:e})}if(this.sharedService.gridOptions.enableGridMenu&&this.gridMenuExtension&&this.gridMenuExtension.register){const e=this.gridMenuExtension.register();e&&(this._extensionList[ae.gridMenu]={name:ae.gridMenu,class:this.gridMenuExtension,instance:e})}if((this.sharedService.gridOptions.enableDraggableGrouping||this.sharedService.gridOptions.enableGrouping)&&this.groupItemMetaExtension&&this.groupItemMetaExtension.register){const e=this.groupItemMetaExtension.register();e&&(this._extensionList[ae.groupItemMetaProvider]={name:ae.groupItemMetaProvider,class:this.groupItemMetaExtension,instance:e})}if(this.sharedService.gridOptions.enableHeaderButton&&this.headerButtonExtension&&this.headerButtonExtension.register){const e=this.headerButtonExtension.register();e&&(this._extensionList[ae.headerButton]={name:ae.headerButton,class:this.headerButtonExtension,instance:e})}if(this.sharedService.gridOptions.enableHeaderMenu&&this.headerMenuExtension&&this.headerMenuExtension.register){const e=this.headerMenuExtension.register();e&&(this._extensionList[ae.headerMenu]={name:ae.headerMenu,class:this.headerMenuExtension,instance:e})}if(this.sharedService.gridOptions.enableRowDetailView&&this.rowDetailViewExtension&&this.rowDetailViewExtension.register){const e=this.getExtensionByName(ae.rowSelection);this.rowDetailViewExtension.register(null==e?void 0:e.instance);const t=this.getCreatedExtensionByName(ae.rowDetailView),i=t&&t.instance;i&&(this._extensionList[ae.rowDetailView]={name:ae.rowDetailView,class:this.rowDetailViewExtension,instance:i})}if(this.sharedService.gridOptions.enableRowMoveManager&&this.rowMoveManagerExtension&&this.rowMoveManagerExtension.register){const e=this.getExtensionByName(ae.rowSelection);this.rowMoveManagerExtension.register(null==e?void 0:e.instance);const t=this.getCreatedExtensionByName(ae.rowMoveManager),i=t&&t.instance;i&&(this._extensionList[ae.rowMoveManager]={name:ae.rowMoveManager,class:this.rowMoveManagerExtension,instance:i})}}}createExtensionsBeforeGridCreation(e,t){var i,n,o,s,r,l;const a=[];if(t.enableCheckboxSelector&&(this.getCreatedExtensionByName(ae.checkboxSelector)||a.push({name:ae.checkboxSelector,extension:this.checkboxSelectorExtension,columnIndexPosition:null!==(n=null===(i=null==t?void 0:t.checkboxSelector)||void 0===i?void 0:i.columnIndexPosition)&&void 0!==n?n:a.length})),t.enableRowMoveManager&&(this.getCreatedExtensionByName(ae.rowMoveManager)||a.push({name:ae.rowMoveManager,extension:this.rowMoveManagerExtension,columnIndexPosition:null!==(s=null===(o=null==t?void 0:t.rowMoveManager)||void 0===o?void 0:o.columnIndexPosition)&&void 0!==s?s:a.length})),t.enableRowDetailView&&(this.getCreatedExtensionByName(ae.rowDetailView)||a.push({name:ae.rowDetailView,extension:this.rowDetailViewExtension,columnIndexPosition:null!==(l=null===(r=null==t?void 0:t.rowDetailView)||void 0===r?void 0:r.columnIndexPosition)&&void 0!==l?l:a.length})),this.createExtensionByTheirColumnIndex(a,e,t),t.enableDraggableGrouping&&!this.getCreatedExtensionByName(ae.draggableGrouping)){const e=this.draggableGroupingExtension.create(t);e&&(t.enableColumnReorder=e.getSetupColumnReorder,this._extensionCreatedList[ae.draggableGrouping]={name:ae.draggableGrouping,instance:e,class:this.draggableGroupingExtension})}}hideColumn(e){if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.slickGrid.getColumns&&this.sharedService.slickGrid.setColumns){const t=this.sharedService.slickGrid.getColumnIndex(e.id);this.sharedService.visibleColumns=this.removeColumnByIndex(this.sharedService.slickGrid.getColumns(),t),this.sharedService.slickGrid.setColumns(this.sharedService.visibleColumns)}}refreshBackendDataset(e){this.gridMenuExtension.refreshBackendDataset(e)}removeColumnByIndex(e,t){return Array.isArray(e)?e.filter(((e,i)=>t!==i)):e}translateCellMenu(){this.cellMenuExtension&&this.cellMenuExtension.translateCellMenu&&this.cellMenuExtension.translateCellMenu()}translateColumnPicker(){this.columnPickerExtension&&this.columnPickerExtension.translateColumnPicker&&this.columnPickerExtension.translateColumnPicker()}translateContextMenu(){this.contextMenuExtension&&this.contextMenuExtension.translateContextMenu&&this.contextMenuExtension.translateContextMenu()}translateGridMenu(){this.gridMenuExtension&&this.gridMenuExtension.translateGridMenu&&this.gridMenuExtension.translateGridMenu()}translateHeaderMenu(){this.headerMenuExtension&&this.headerMenuExtension.translateHeaderMenu&&this.headerMenuExtension.translateHeaderMenu()}translateColumnHeaders(e,t){var i;if(this.sharedService&&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.');e&&(null===(i=this.translaterService)||void 0===i?void 0:i.use)&&this.translaterService.use(e);let n=t;n||(n=this.sharedService.columnDefinitions),this.translateItems(n,"nameKey","name"),this.translateItems(this.sharedService.allColumns,"nameKey","name"),this.renderColumnHeaders(n,Array.isArray(t)),this.gridMenuExtension.translateGridMenu()}renderColumnHeaders(e,t=!1){let i=e;i||(i=this.sharedService.columnDefinitions),Array.isArray(i)&&this.sharedService.slickGrid&&this.sharedService.slickGrid.setColumns&&((i.length>this.sharedService.allColumns.length||t)&&(this.sharedService.allColumns=i),this.sharedService.slickGrid.setColumns(i)),this.sharedService.gridOptions.enableColumnPicker&&this.recreateExternalAddon(this.columnPickerExtension,ae.columnPicker),this.sharedService.gridOptions.enableGridMenu&&this.recreateExternalAddon(this.gridMenuExtension,ae.gridMenu),this.sharedService.gridOptions.enableHeaderMenu&&this.recreateExternalAddon(this.headerMenuExtension,ae.headerMenu)}createExtensionByTheirColumnIndex(e,t,i){e.sort(((e,t)=>e.columnIndexPosition-t.columnIndexPosition)),e.forEach((e=>{const n=e.extension.create(t,i);n&&(this._extensionCreatedList[e.name]={name:e.name,instance:n,class:e.extension})}))}getCreatedExtensionByName(e){if(this._extensionCreatedList&&this._extensionCreatedList.hasOwnProperty(e))return this._extensionCreatedList[e]}recreateExternalAddon(e,t){e.dispose();const i=e.register(),n=this.getExtensionByName(t);n&&(n.instance=i)}translateItems(e,t,i){var n;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.');if(Array.isArray(e))for(const o of e)o[t]&&(o[i]=null===(n=this.translaterService)||void 0===n?void 0:n.translate(o[t]))}}var pi=Object.prototype.hasOwnProperty;function mi(e,t){var i,n;if(e===t)return!0;if(e&&t&&(i=e.constructor)===t.constructor){if(i===Date)return e.getTime()===t.getTime();if(i===RegExp)return e.toString()===t.toString();if(i===Array){if((n=e.length)===t.length)for(;n--&&mi(e[n],t[n]););return-1===n}if(!i||"object"==typeof e){for(i in n=0,e){if(pi.call(e,i)&&++n&&!pi.call(t,i))return!1;if(!(i in t)||!mi(e[i],t[i]))return!1}return Object.keys(t).length===n}}return e!=e&&t!=t}function fi(e,t,i){if(i&&((null==e?void 0:e.hasOwnProperty(i))||(null==t?void 0:t.hasOwnProperty(i))))return e[i]===t||e===t[i]||e[i]===t[i];for(const i in e)if(e.hasOwnProperty(i)&&e[i]!==t[i])return!1;return!0}const gi=(e,t,i)=>{switch(e.toUpperCase()){case"<":case"LT":return t<i;case"<=":case"LE":return t<=i;case">":case"GT":return t>i;case">=":case"GE":return t>=i;case"!=":case"<>":case"NE":return t!==i;case"=":case"==":case"EQ":return t===i;case"IN":return!(!i||!Array.isArray(i))&&i.includes(t);case"NIN":case"NOT_IN":return!(!i||!Array.isArray(i)||i.includes(t));case"IN_CONTAINS":return!(!i||!Array.isArray(i)||"string"!=typeof t)&&i.some((e=>t.split(/[,]+/).map((e=>e.trim())).includes(e)));case"NIN_CONTAINS":case"NOT_IN_CONTAINS":return!(!i||!Array.isArray(i)||"string"!=typeof t||i.some((e=>t.split(/[,]+/).map((e=>e.trim())).includes(e))));case"IN_COLLECTION":return!!(t&&i&&Array.isArray(t)&&Array.isArray(i))&&i.some((e=>t.includes(e)));case"NOT_IN_COLLECTION":return!!(t&&i&&Array.isArray(t)&&Array.isArray(i))&&!i.some((e=>t.includes(e)))}return!0};function vi(e,t,i,n){return"*"===e||e===ye.endsWith||"*z"===e?t.endsWith(i):""===e&&"*"===n||e===ye.startsWith||"a*"===e?t.startsWith(i):""===e||e===ye.contains?t.indexOf(i)>-1:"<>"===e||e===ye.notContains?-1===t.indexOf(i):gi(e||"==",t,i)}const _i=pe()||he;function Ci(e,t){let i;switch(bi(t)){case"boolean":i=function(e){return ot(Array.isArray(e)&&e[0]||!1)}(e);break;case"date":i=function(e,t){const i=Array.isArray(e)&&e||[],n=Ze(t||fe.dateIso),o=[];if(2===i.length||"string"==typeof i[0]&&i[0].indexOf("..")>0){const e=2===i.length?i:i[0].split(".."),t=Array.isArray(e)&&e[0]||"",s=Array.isArray(e)&&e[1]||"",r=_i(t,n,!0),l=_i(s,n,!0);if(!r.isValid()||!l.isValid())return[];o.push(r,l)}else{const e=_i(i[0],n,!0);if(!e.isValid())return[];o.push(e)}return o}(e,t);break;case"number":i=function(e){const t=Array.isArray(e)&&e||[0],i=[];let n,o;if(2===t.length||"string"==typeof t[0]&&t[0].indexOf("..")>0){const e=2===t.length?t:t[0].split("..");n=parseFloat(Array.isArray(e)?e[0]:""),o=parseFloat(Array.isArray(e)?e[1]:"")}else n=parseFloat(t[0]);return Ue(n,!0)&&Ue(o,!0)?i.push(n,o):Ue(n,!0)&&i.push(n),i}(e);break;case"object":i=function(e){return(Array.isArray(e)&&e.length>0?e[0]:"")||""}(e);break;case"string":i=function(e){const t=Array.isArray(e)&&e||[""],i=[];let n,o;if(2===t.length||"string"==typeof t[0]&&t[0].indexOf("..")>0){const e=2===t.length?t:t[0].split("..");n=`${Array.isArray(e)?e[0]:""}`,o=`${Array.isArray(e)?e[1]:""}`}else{const t=Array.isArray(e)&&e.length>0?e[0]:"";n=null==t?"":`${t}`}return void 0!==n&&void 0!==o?i.push(n,o):void 0!==n&&i.push(n),i}(e)}return i}function bi(e){switch(e){case fe.boolean:return"boolean";case fe.date:case fe.dateIso:case fe.dateUtc:case fe.dateTime:case fe.dateTimeIso:case fe.dateTimeIsoAmPm:case fe.dateTimeIsoAM_PM:case fe.dateTimeShortIso:case fe.dateEuro:case fe.dateEuroShort:case fe.dateTimeShortEuro:case fe.dateTimeEuro:case fe.dateTimeEuroAmPm:case fe.dateTimeEuroAM_PM:case fe.dateTimeEuroShort:case fe.dateTimeEuroShortAmPm:case fe.dateTimeEuroShortAM_PM:case fe.dateUs:case fe.dateUsShort:case fe.dateTimeShortUs:case fe.dateTimeUs:case fe.dateTimeUsAmPm:case fe.dateTimeUsAM_PM:case fe.dateTimeUsShort:case fe.dateTimeUsShortAmPm:case fe.dateTimeUsShortAM_PM:return"date";case fe.integer:case fe.float:case fe.number:return"number";case fe.object:return"object";case fe.string:case fe.text:case fe.password:case fe.readonly:default:return"string"}}const yi=(e,t)=>{if(function(e){switch(e&&e.toUpperCase()||""){case"IN":case"NIN":case"NOT_IN":case"IN_CONTAINS":case"NIN_CONTAINS":case"NOT_IN_CONTAINS":case"IN_COLLECTION":case"NOT_IN_COLLECTION":return!0;default:return!1}}(e.operator))return(e=>{const t=e.operator;let i;return i=!Array.isArray(e.cellValue)||"IN_COLLECTION"!==t&&"NOT_IN_COLLECTION"!==t?void 0===e.cellValue||null===e.cellValue?"":`${e.cellValue}`:e.cellValue.length?e.cellValue.map((e=>`${e}`)):[],gi(t||"IN",i,e.searchTerms||[])})(e);switch(bi(e.filterSearchType||e.fieldType)){case"boolean":return((e,t)=>ot(e.cellValue)===ot(t))(e,t);case"date":return function(e,t){var i;const n=Ze(e&&(e.filterSearchType||e.fieldType)||fe.dateIso),[o,s]=t,r=_i(e.cellValue,n,!0);if(!o&&!s||!r.isValid())return!1;const l=n.toLowerCase().includes("h")?r.valueOf():r.clone().startOf("day").valueOf();if(o&&s){let t=null!==(i=null==e?void 0:e.operator)&&void 0!==i?i:e.defaultFilterRangeOperator;t!==ye.rangeInclusive&&t!==ye.rangeExclusive&&(t=e.defaultFilterRangeOperator);const n=t===ye.rangeInclusive,r=gi(n?">=":">",l,o.valueOf()),a=gi(n?"<=":"<",l,s.valueOf());return r&&a}const a=n.toLowerCase().includes("h")?o.valueOf():o.clone().startOf("day").valueOf();return gi(e.operator||"==",l,a)}(e,t||[]);case"number":return((e,t)=>{var i;const n=parseFloat(e.cellValue),[o,s]=t;if(void 0===o&&!e.operator)return!0;if(void 0!==o&&void 0!==s){let t=null!==(i=null==e?void 0:e.operator)&&void 0!==i?i:e.defaultFilterRangeOperator;t!==ye.rangeInclusive&&t!==ye.rangeExclusive&&(t=e.defaultFilterRangeOperator);const r=t===ye.rangeInclusive,l=gi(r?">=":">",n,+o),a=gi(r?"<=":"<",n,+s);return l&&a}return gi(e.operator||"==",n,+o)})(e,t||[]);case"object":return((e,t)=>{if(void 0===t&&!e.operator)return!0;switch((e.operator||"").toUpperCase()){case"!=":case"<>":case"NE":return!fi(e.cellValue,t,e.dataKey);case"=":case"==":case"EQ":default:return fi(e.cellValue,t,e.dataKey)}})(e,t);case"string":default:return((e,t)=>{var i;let[n,o]=t;if(void 0===n&&!e.operator)return!0;e.cellValue=void 0===e.cellValue||null===e.cellValue?"":e.cellValue.toString();const s=(null==e?void 0:e.ignoreAccentOnStringFilterAndSort)?rt(e.cellValue,!0):e.cellValue.toLowerCase();if("string"==typeof n&&(n=(null==e?void 0:e.ignoreAccentOnStringFilterAndSort)?rt(n,!0):n.toLowerCase()),"string"==typeof o&&(o=(null==e?void 0:e.ignoreAccentOnStringFilterAndSort)?rt(o,!0):o.toLowerCase()),void 0!==n&&void 0!==o){let t=null!==(i=null==e?void 0:e.operator)&&void 0!==i?i:e.defaultFilterRangeOperator;t!==ye.rangeInclusive&&t!==ye.rangeExclusive&&(t=e.defaultFilterRangeOperator);const r=t===ye.rangeInclusive,l=vi(r?">=":">",s,n,e.searchInputLastChar),a=vi(r?"<=":"<",s,o,e.searchInputLastChar);return l&&a}return vi(e.operator,s,n,e.searchInputLastChar)})(e,t||[])}};class wi{constructor(e,t,i,n,o){this.filterFactory=e,this.pubSubService=t,this.sharedService=i,this.backendUtilities=n,this.rxjs=o,this._isFilterFirstRender=!0,this._firstColumnIdRendered="",this._filtersMetadata=[],this._columnFilters={},this._isTreePresetExecuted=!1,this._previousFilters=[],this._onSearchChange=new Slick.Event,this._eventHandler=new Slick.EventHandler,this.rxjs&&(this.httpCancelRequests$=this.rxjs.createSubject())}get eventHandler(){return this._eventHandler}get isFilterFirstRender(){return this._isFilterFirstRender}get onSearchChange(){return this._onSearchChange}get _gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get _columnDefinitions(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getColumns)||void 0===t?void 0:t.call(e))&&void 0!==i?i:[]}get _dataView(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getData)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}addRxJsResource(e){this.rxjs=e}init(e){this._grid=e,this._gridOptions&&this._gridOptions.enableTreeData&&this._gridOptions.treeDataOptions&&this._grid.setSortColumns([{columnId:this._gridOptions.treeDataOptions.columnId,sortAsc:!0}])}dispose(){var e;this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&(null===(e=this.rxjs)||void 0===e?void 0:e.isObservable(this.httpCancelRequests$))&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete()),this.disposeColumnFilters(),this._onSearchChange=null}disposeColumnFilters(){this.removeAllColumnFiltersProperties(),Array.isArray(this._filtersMetadata)&&this._filtersMetadata.forEach((e=>{(null==e?void 0:e.destroy)&&e.destroy()}))}bindBackendOnFilter(e){this._filtersMetadata=[];const t=e.onHeaderRowCellRendered;if(this._eventHandler.subscribe(t,((e,t)=>{t.column.id===this._firstColumnIdRendered&&(this._isFilterFirstRender=!1),this.addFilterTemplateToHeaderRow(t,this._isFilterFirstRender),""===this._firstColumnIdRendered&&(this._firstColumnIdRendered=t.column.id)})),this.subscribeToOnHeaderRowCellRendered(e),this._onSearchChange){const e=this._onSearchChange;this._eventHandler.subscribe(e,this.onBackendFilterChange.bind(this))}}bindLocalOnFilter(e){this._filtersMetadata=[],this._dataView.setFilterArgs({columnFilters:this._columnFilters,grid:this._grid,dataView:this._dataView}),this._dataView.setFilter(this.customLocalFilter.bind(this)),this._onSearchChange&&(this._onSearchChange,this._eventHandler.subscribe(this._onSearchChange,(async(e,t)=>{var i,n;const o=null!==(i=null==t?void 0:t.clearFilterTriggered)&&void 0!==i&&i;o||await this.emitFilterChanged(r.local,!0),!0===(null===(n=this._gridOptions)||void 0===n?void 0:n.enableTreeData)&&(this._tmpPreFilteredData=this.preFilterTreeData(this._dataView.getItems(),this._columnFilters)),null!==t.columnId&&this._dataView.refresh(),o||await this.emitFilterChanged(r.local),this._previousFilters=this.extractBasicFilterDetails(this._columnFilters)})));const t=e.onHeaderRowCellRendered;this._eventHandler.subscribe(t,((e,t)=>{this.addFilterTemplateToHeaderRow(t)})),this.subscribeToOnHeaderRowCellRendered(e)}async clearFilterByColumnId(e,t){var i,n;await this.pubSubService.publish("onBeforeFilterClear",{columnId:t},0);const o=null!==(n=null===(i=this._gridOptions)||void 0===i?void 0:i.backendServiceApi)&&void 0!==n&&n,s=o?r.remote:r.local,l=Object.keys(this._columnFilters);let a;Array.isArray(l)&&(a=l.find((e=>e===`${t}`)));const d=this._filtersMetadata.find((e=>e.columnDef.id===t));return(null==d?void 0:d.clear)&&d.clear(!0),o&&void 0!==a&&this.onBackendFilterChange(e,{grid:this._grid,columnFilters:this._columnFilters}),await this.emitFilterChanged(s),!0}async clearFilters(e=!0){var t,i,n,o,s;e&&await this.pubSubService.publish("onBeforeFilterClear",!0,0),this._filtersMetadata.forEach((e=>{(null==e?void 0:e.clear)&&e.clear(!1)})),this.removeAllColumnFiltersProperties(),Array.isArray(this._columnDefinitions)&&this._columnDefinitions.forEach((e=>{var t;(null===(t=e.filter)||void 0===t?void 0:t.searchTerms)&&delete e.filter.searchTerms})),this._dataView&&this._grid&&(this._dataView.refresh(),this._grid.invalidate());const r=null===(t=this._gridOptions)||void 0===t?void 0:t.backendServiceApi;if(r&&e){const t={clearFilterTriggered:!0,shouldTriggerQuery:e,grid:this._grid,columnFilters:this._columnFilters},l=r.service.processOnFilterChanged(void 0,t),a=null!==(o=null===(n=null===(i=this._gridOptions)||void 0===i?void 0:i.pagination)||void 0===n?void 0:n.totalItems)&&void 0!==o?o:0;null===(s=this.backendUtilities)||void 0===s||s.executeBackendCallback(r,l,t,new Date,a,{errorCallback:this.resetToPreviousSearchFilters.bind(this),successCallback:e=>this._previousFilters=this.extractBasicFilterDetails(e.columnFilters),emitActionChangedCallback:this.emitFilterChanged.bind(this)})}else this._previousFilters=this.extractBasicFilterDetails(this._columnFilters);e&&this.pubSubService.publish("onFilterCleared",!0)}customLocalFilter(e,t){var i,n,o,s,r,l;const a=null==t?void 0:t.grid,d=null!==(n=null===(i=this._gridOptions)||void 0===i?void 0:i.enableTreeData)&&void 0!==n&&n,u=null!==(o=null==t?void 0:t.columnFilters)&&void 0!==o?o:{};let c;if(d&&this._gridOptions&&this._gridOptions.treeDataOptions){c=this._gridOptions.treeDataOptions;const t=null!==(s=c.collapsedPropName)&&void 0!==s?s:me.treeDataProperties.COLLAPSED_PROP,i=null!==(r=c.parentPropName)&&void 0!==r?r:me.treeDataProperties.PARENT_PROP,n=null!==(l=this._gridOptions.datasetIdPropertyName)&&void 0!==l?l:"id";if(null!==e[i]){let n=this._dataView.getItemById(e[i]);for(;n;){if(n[t])return!1;n=this._dataView.getItemById(n[i])}}if(this._tmpPreFilteredData instanceof Set)return this._tmpPreFilteredData.has(e[n])}else if("object"==typeof u)for(const t of Object.keys(u)){const i=u[t],n=this.preProcessFilterConditionOnDataContext(e,i,a);if("boolean"==typeof n)return n;let o=null==i?void 0:i.parsedSearchTerms;if(void 0===o&&(o=Ci(i.searchTerms,i.columnDef.type||fe.string),void 0!==o&&(i.parsedSearchTerms=o)),!yi(n,o))return!1}return!0}parseFormInputFilterConditions(e,t){var i,n,o;const s=Ne(e)||[];let r=Array.isArray(s)&&1===s.length?s[0]:"";const l=t.columnDef,a=null!==(o=null!==(n=null===(i=l.filter)||void 0===i?void 0:i.type)&&void 0!==n?n:l.type)&&void 0!==o?o:fe.string;let d=null;a!==fe.object&&(r=null==r?"":`${r}`,d=r.match(/^([<>!=\*]{0,2})(.*[^<>!=\*])?([\*]?)$/));let u=(null==d?void 0:d[1])||t.operator;const c=(null==d?void 0:d[2])||"",h=(null==d?void 0:d[3])||("*z"===u?"*":"");return"string"==typeof r&&(r=r.replace("'","''"),"*"===u||"*z"===u?u=ye.endsWith:"a*"!==u&&"*"!==h||(u=ye.startsWith)),Array.isArray(d)&&d.length>=1&&Array.isArray(s)&&1===s.length&&(s[0]=c),{dataKey:l.dataKey,fieldType:a,searchTerms:s||[],operator:u,searchInputLastChar:h,filterSearchType:l.filterSearchType,defaultFilterRangeOperator:this._gridOptions.defaultFilterRangeOperator}}preProcessFilterConditionOnDataContext(e,t,i){var n,o,s,r,l,a;const d=t.columnDef,u=t.columnId;let c=i.getColumnIndex(u);if(!d&&this.sharedService&&Array.isArray(this.sharedService.allColumns)&&(c=this.sharedService.allColumns.findIndex((e=>e.field===u))),!d)return!0;if(this._gridOptions.enableRowDetailView){const t=this._gridOptions.rowDetailView&&this._gridOptions.rowDetailView.keyPrefix||"__";e[`${t}isPadding`]&&e[`${t}parent`]&&(e=e[`${t}parent`])}let h=(null===(n=d.filter)||void 0===n?void 0:n.queryField)||d.queryFieldFilter||d.queryField||d.field||"";"function"==typeof d.queryFieldNameGetterFn&&(h=d.queryFieldNameGetterFn(e));const p=null!==(r=null!==(s=null===(o=d.filter)||void 0===o?void 0:o.type)&&void 0!==s?s:d.type)&&void 0!==r?r:fe.string;let m=e[h];(null==h?void 0:h.indexOf("."))>=0&&(m=Ke(e,h));const f=t.operator,g=t.searchTerms||[];if(!g||Array.isArray(g)&&(0===g.length||1===g.length&&f===g[0]))return!0;if(g&&Array.isArray(g)&&p!==fe.object)for(let e=0,t=g.length;e<t;e++)g[e]=(void 0===g[e]||null===g[e]?"":g[e])+"";if(!0===(null===(l=null==d?void 0:d.params)||void 0===l?void 0:l.useFormatterOuputToFilter)){const t=i.getData(),n=this._gridOptions.datasetIdPropertyName||"id",o=t&&"function"==typeof t.getIdxById?t.getIdxById(e[n]):0;m=lt(d&&"function"==typeof d.formatter?d.formatter(o||0,c,m,d,e,this._grid):"")}return"number"==typeof m&&(m=m.toString()),{dataKey:d.dataKey,fieldType:p,searchTerms:g,cellValue:m,operator:f,searchInputLastChar:t.searchInputLastChar,filterSearchType:d.filterSearchType,ignoreAccentOnStringFilterAndSort:null!==(a=this._gridOptions.ignoreAccentOnStringFilterAndSort)&&void 0!==a&&a,defaultFilterRangeOperator:this._gridOptions.defaultFilterRangeOperator}}preFilterTreeData(e,t){var i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_,C,b;const y=null===(i=this._gridOptions)||void 0===i?void 0:i.treeDataOptions,w=null!==(n=null==y?void 0:y.collapsedPropName)&&void 0!==n?n:me.treeDataProperties.COLLAPSED_PROP,S=null!==(o=null==y?void 0:y.parentPropName)&&void 0!==o?o:me.treeDataProperties.PARENT_PROP,E=null!==(s=null==y?void 0:y.hasChildrenPropName)&&void 0!==s?s:me.treeDataProperties.HAS_CHILDREN_PROP,T=null!==(l=null===(r=this._gridOptions)||void 0===r?void 0:r.datasetIdPropertyName)&&void 0!==l?l:"id",x=null===(d=null===(a=this._gridOptions.presets)||void 0===a?void 0:a.treeData)||void 0===d?void 0:d.toggledItems,O=null!==(c=null===(u=this._gridOptions.treeDataOptions)||void 0===u?void 0:u.initiallyCollapsed)&&void 0!==c&&c,k=null===(h=this._gridOptions.treeDataOptions)||void 0===h?void 0:h.columnId,D=null===(p=this._gridOptions.treeDataOptions)||void 0===p?void 0:p.excludeChildrenWhenFilteringTree,A=!D&&!0===(null===(m=this._gridOptions.treeDataOptions)||void 0===m?void 0:m.autoApproveParentItemWhenTreeColumnIsValid),R={},I=new Set,P=new Map;if(Array.isArray(e)){for(const t of e)R[t[T]]=t,delete R[t[T]].__used;for(const e of Object.keys(t)){const i=t[e],n=(null==i?void 0:i.searchTerms)?Ne(i.searchTerms):[],o=this.parseFormInputFilterConditions(n,i),s=i.columnDef,r=null!==(v=null!==(g=null===(f=null==s?void 0:s.filter)||void 0===f?void 0:f.type)&&void 0!==g?g:null==s?void 0:s.type)&&void 0!==v?v:fe.string,l=Ci(o.searchTerms,r);void 0!==l&&(i.parsedSearchTerms=l)}for(const i of e){const e=i[E];let n=!0;for(const o of Object.keys(t)){const s=t[o],r=this.preProcessFilterConditionOnDataContext(i,s,this._grid);if(r){const t=null==s?void 0:s.parsedSearchTerms,n="boolean"==typeof r?r:yi(r,t);if(n&&A&&e&&s.columnId===k){P.set(i[T],!0);break}if(n||!D&&!0===P.get(i[S])){if(e&&s.columnId===k&&P.set(i[T],!0),n||!D&&s.columnId===k)continue}else e&&!0!==P.get(i[S])&&s.columnId!==k&&P.set(i[T],!1)}n=!1}if(n){I.add(i[T]);let e=null!==(_=R[i[S]])&&void 0!==_&&_;const t=!O;for(!this._isTreePresetExecuted&&Array.isArray(x)&&x.some((i=>i.itemId===e.id&&i.isCollapsed===t))&&(e[w]=t);e;)null!==(C=e.__used)&&void 0!==C||I.add(e[T]),R[e[T]].__used=!0,e=null!==(b=R[e[S]])&&void 0!==b&&b}}}return this._isTreePresetExecuted=!0,I}getColumnFilters(){return this._columnFilters}getPreviousFilters(){return this._previousFilters}getFiltersMetadata(){return this._filtersMetadata}getCurrentLocalFilters(){var e,t;const i=[];if(this._columnFilters)for(const n of Object.keys(this._columnFilters)){const o=this._columnFilters[n],s={columnId:n||""},r=this.sharedService.allColumns.find((e=>e.id===s.columnId)),l=null===(t=null===(e=null==r?void 0:r.filter)||void 0===e?void 0:e.emptySearchTermReturnAllValues)||void 0===t||t;(null==o?void 0:o.searchTerms)&&(s.searchTerms=o.searchTerms),o.operator&&(s.operator=o.operator),Array.isArray(s.searchTerms)&&s.searchTerms.length>0&&(!l||""!==s.searchTerms[0])&&i.push(s)}return i}emitFilterChanged(e,t=!1){var i;const n=t?"onBeforeFilterChange":"onFilterChanged";if(e===r.remote&&(null===(i=this._gridOptions)||void 0===i?void 0:i.backendServiceApi)){let e=[];const t=this._gridOptions.backendServiceApi.service;return(null==t?void 0:t.getCurrentFilters)&&(e=t.getCurrentFilters()),this.pubSubService.publish(n,e)}if(e===r.local)return this.pubSubService.publish(n,this.getCurrentLocalFilters())}async onBackendFilterChange(e,t){var i,n,o,s;const l=null==t?void 0:t.shouldTriggerQuery;if(l&&await this.emitFilterChanged(r.remote,!0),!t||!t.grid)throw new Error('Something went wrong when trying to bind the "onBackendFilterChange(event, args)" function, it seems that "args" is not populated correctly');const a=this._gridOptions.backendServiceApi;if(!a||!a.process||!a.service)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');const d=new Date;if(a.preProcess&&a.preProcess(),l){const r=await a.service.processOnFilterChanged(e,t),l=null!==(o=null===(n=null===(i=this._gridOptions)||void 0===i?void 0:i.pagination)||void 0===n?void 0:n.totalItems)&&void 0!==o?o:0;null===(s=this.backendUtilities)||void 0===s||s.executeBackendCallback(a,r,t,d,l,{errorCallback:this.resetToPreviousSearchFilters.bind(this),successCallback:e=>this._previousFilters=this.extractBasicFilterDetails(e.columnFilters),emitActionChangedCallback:this.emitFilterChanged.bind(this),httpCancelRequestSubject:this.httpCancelRequests$})}}populateColumnFilterSearchTermPresets(e){var t;return Array.isArray(e)&&(this._columnDefinitions.forEach((t=>{var i;(null===(i=t.filter)||void 0===i?void 0:i.searchTerms)&&delete t.filter.searchTerms;const n=e.find((e=>e.columnId===t.id));n&&Array.isArray(null==n?void 0:n.searchTerms)&&(t.filter=t.filter||{},t.filter.operator=n.operator||t.filter.operator||"",t.filter.searchTerms=n.searchTerms)})),(null===(t=this._gridOptions)||void 0===t?void 0:t.enableTreeData)&&this.refreshTreeDataFilters(),this._previousFilters=this.extractBasicFilterDetails(this._columnFilters)),this._columnDefinitions}refreshTreeDataFilters(e){var t,i,n,o;const s=null!==(n=null!=e?e:null===(i=null===(t=this._dataView)||void 0===t?void 0:t.getItems)||void 0===i?void 0:i.call(t))&&void 0!==n?n:[];this._dataView&&(null===(o=this._gridOptions)||void 0===o?void 0:o.enableTreeData)&&s.length>0?(this._tmpPreFilteredData=this.preFilterTreeData(s,this._columnFilters),this._dataView.refresh()):0===s.length&&Array.isArray(this.sharedService.hierarchicalDataset)&&this.sharedService.hierarchicalDataset.length>0&&setTimeout((()=>this.refreshTreeDataFilters()))}disableFilterFunctionality(e=!0,t=!0){const i=!this._gridOptions.enableFiltering;i!==e&&(t&&e&&this.clearFilters(),this.disableAllFilteringCommands(e),this._grid.setOptions({enableFiltering:i},!1,!0),this._grid.setHeaderRowVisibility(i),this._gridOptions.enableFiltering=!e,this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(this.sharedService.columnDefinitions))}resetToPreviousSearchFilters(){this.updateFilters(this._previousFilters,!1,!1,!1)}toggleFilterFunctionality(e=!0){const t=this._gridOptions.enableFiltering;this.disableFilterFunctionality(t,e)}toggleHeaderFilterRow(){var e,t;let i=null!==(t=null===(e=this._gridOptions)||void 0===e?void 0:e.showHeaderRow)&&void 0!==t&&t;i=!i,this._grid.setHeaderRowVisibility(i),!0===i&&this._grid.setColumns(this.sharedService.columnDefinitions)}setSortColumnIcons(e){this._grid&&Array.isArray(e)&&this._grid.setSortColumns(e)}async updateFilters(e,t=!0,i=!0,n=!1){var o,s;if(!this._filtersMetadata||0===this._filtersMetadata.length||!this._gridOptions||!this._gridOptions.enableFiltering)throw new Error('[Slickgrid-Universal] in order to use "updateFilters" method, you need to have Filterable Columns defined in your grid and "enableFiltering" set in your Grid Options');if(Array.isArray(e)){this.clearFilters(!1),e.forEach((e=>{var t;const i=this._filtersMetadata.find((t=>e.columnId===t.columnDef.id));if(e&&i){const o=e.operator||i.defaultOperator;this.updateColumnFilters(e.searchTerms,i.columnDef,o),i.setValues(e.searchTerms||[],o),(n||(null===(t=this._gridOptions)||void 0===t?void 0:t.enableTreeData))&&this.callbackSearchEvent(void 0,{columnDef:i.columnDef,operator:o,searchTerms:e.searchTerms,shouldTriggerQuery:!0,forceOnSearchChangeEvent:!0})}}));const l=null===(o=this._gridOptions)||void 0===o?void 0:o.backendServiceApi,a=l?r.remote:r.local;if(t&&await this.emitFilterChanged(a,!0),this._dataView.refresh(),l){const t=null==l?void 0:l.service;(null==t?void 0:t.updateFilters)&&(t.updateFilters(e,!0),i&&(null===(s=this.backendUtilities)||void 0===s||s.refreshBackendDataset(this._gridOptions)))}t&&await this.emitFilterChanged(a)}return!0}async updateSingleFilter(e,t=!0,i=!0){var n,o,s,l,a,d;const u=this.sharedService.allColumns.find((t=>t.id===e.columnId));if(u&&e.columnId){this._columnFilters={};const c=null===(o=null===(n=u.filter)||void 0===n?void 0:n.emptySearchTermReturnAllValues)||void 0===o||o;Array.isArray(e.searchTerms)&&(e.searchTerms.length>1||1===e.searchTerms.length&&(!c||""!==e.searchTerms[0]))&&(this._columnFilters[e.columnId]={columnId:e.columnId,operator:e.operator,searchTerms:e.searchTerms,columnDef:u,type:null!==(s=u.type)&&void 0!==s?s:fe.string});const h=null===(l=this._gridOptions)||void 0===l?void 0:l.backendServiceApi,p=h?r.remote:r.local;if(t&&await this.emitFilterChanged(p,!0),h){const e=null==h?void 0:h.service;(null==e?void 0:e.updateFilters)&&(e.updateFilters(this._columnFilters,!0),i&&(null===(a=this.backendUtilities)||void 0===a||a.refreshBackendDataset(this._gridOptions)))}else this._dataView.setFilterArgs({columnFilters:this._columnFilters,grid:this._grid}),(null===(d=this._gridOptions)||void 0===d?void 0:d.enableTreeData)&&this.refreshTreeDataFilters(),this._dataView.refresh();t&&await this.emitFilterChanged(p)}return!0}addFilterTemplateToHeaderRow(e,t=!0){var i;const n=e.column;if("selector"!==(null!==(i=null==n?void 0:n.id)&&void 0!==i?i:"")&&(null==n?void 0:n.filterable)){let e,i;const o=this.filterFactory.createFilter(n.filter);i=n&&n.filter&&n.filter.operator||o&&o.operator,this._columnFilters[n.id]?(e=this._columnFilters[n.id].searchTerms||void 0,i=this._columnFilters[n.id].operator||void 0):n.filter&&(e=n.filter.searchTerms||void 0,this.updateColumnFilters(e,n,i));const s={grid:this._grid,operator:i,searchTerms:e,columnDef:n,callback:this.callbackSearchEvent.bind(this)};if(o){o.init(s,t);const n=this._filtersMetadata.findIndex((e=>o.columnDef.id===e.columnDef.id));-1===n?this._filtersMetadata.push(o):this._filtersMetadata[n]=o,e&&o.setValues&&o.setValues(e,i)}}}callbackSearchEvent(e,t){var i,n,o,s,r,l,a,d;if(t){const u=(null==e?void 0:e.target)?e.target.value:void 0,c=t.searchTerms&&Array.isArray(t.searchTerms)?t.searchTerms:u?[u]:void 0,h=t.columnDef||null,p=null!==(i=null==h?void 0:h.id)&&void 0!==i?i:"",m=null!==(s=null!==(o=null===(n=null==h?void 0:h.filter)||void 0===n?void 0:n.type)&&void 0!==o?o:null==h?void 0:h.type)&&void 0!==s?s:fe.string,f=t.operator||void 0,g=c&&Array.isArray(c),v=g&&c&&c.length,_={...this._columnFilters},C=null===(l=null===(r=h.filter)||void 0===r?void 0:r.emptySearchTermReturnAllValues)||void 0===l||l;let b;if(h&&p)if(!g||0===v||1===v&&Array.isArray(c)&&C&&""===c[0])delete this._columnFilters[p];else{const e=`${p}`,t={columnId:e,columnDef:h,parsedSearchTerms:[],type:m},i=this.parseFormInputFilterConditions(c,t);t.operator=f||i.operator||it(m),b=Ci(i.searchTerms,m),void 0!==b&&(t.parsedSearchTerms=b),t.searchTerms=i.searchTerms||[],this._columnFilters[e]=t}const y=e&&"function"!=typeof e.isPropagationStopped?$.extend({},new Slick.EventData,e):e,w=null===(a=e)||void 0===a?void 0:a.key,S=null===(d=e)||void 0===d?void 0:d.keyCode;if(this._onSearchChange&&(t.forceOnSearchChangeEvent||"Enter"===w||S===be.ENTER||!mi(_,this._columnFilters))){const e={clearFilterTriggered:t.clearFilterTriggered,shouldTriggerQuery:t.shouldTriggerQuery,columnId:p,columnDef:h,columnFilters:this._columnFilters,operator:f||it(m),searchTerms:c,parsedSearchTerms:b,grid:this._grid};!1===this.pubSubService.publish("onBeforeSearchChange",e)?this._gridOptions.resetFilterSearchValueAfterOnBeforeCancellation&&this.resetToPreviousSearchFilters():this._onSearchChange.notify(e,y)}}}disableAllFilteringCommands(e=!0){var t,i;const n=this._grid.getColumns();return n.forEach((t=>{var i;(null===(i=null==t?void 0:t.header)||void 0===i?void 0:i.menu)&&t.header.menu.items.forEach((t=>{t&&"string"!=typeof t&&"clear-filter"===t.command&&(t.hidden=e)}))})),(null===(i=null===(t=this._gridOptions)||void 0===t?void 0:t.gridMenu)||void 0===i?void 0:i.customItems)&&this._gridOptions.gridMenu.customItems.forEach((t=>{if(t&&"string"!=typeof t){const i=t.command;"clear-filter"!==i&&"toggle-filter"!==i||(t.hidden=e)}})),n}extractBasicFilterDetails(e){const t=[];if(e&&"object"==typeof e)for(const i of Object.keys(e)){const{operator:n,searchTerms:o}=e[`${i}`];t.push({columnId:i,operator:n,searchTerms:o})}return t}removeAllColumnFiltersProperties(){if("object"==typeof this._columnFilters)for(const e in this._columnFilters)e&&this._columnFilters[e]&&delete this._columnFilters[e]}subscribeToOnHeaderRowCellRendered(e){const t=e.onBeforeHeaderRowCellDestroy;this._eventHandler.subscribe(t,((e,t)=>{var i;const n=this._filtersMetadata.find((e=>e.columnDef.id===t.column.id));null===(i=null==n?void 0:n.destroy)||void 0===i||i.call(n)}))}updateColumnFilters(e,t,i){var n,o,s;const r=null!==(s=null!==(o=null===(n=t.filter)||void 0===n?void 0:n.type)&&void 0!==o?o:t.type)&&void 0!==s?s:fe.string,l=Ci(e,r);e&&t&&(this._columnFilters[t.id]={columnId:t.id,columnDef:t,searchTerms:e,operator:i,parsedSearchTerms:l,type:r})}}let Si;const Ei={triggerEvent:!0},Ti={highlightRow:!0,position:"top",resortGrid:!1,selectRow:!1,triggerEvent:!0},xi={highlightRow:!1,selectRow:!1,scrollRowIntoView:!1,triggerEvent:!0},Oi={autoResizeColumns:!0,triggerEvent:!0,hideFromColumnPicker:!1,hideFromGridMenu:!1};class ki{constructor(e,t,i,n,o,s,r){this.gridStateService=e,this.filterService=t,this.pubSubService=i,this.paginationService=n,this.sharedService=o,this.sortService=s,this.treeDataService=r}get _dataView(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getData)&&this._grid.getData()}get _gridOptions(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getOptions)?this._grid.getOptions():{}}dispose(){var e;(null===(e=this._rowSelectionPlugin)||void 0===e?void 0:e.destroy)&&this._rowSelectionPlugin.destroy()}init(e){this._grid=e}clearAllFiltersAndSorts(){this.sortService&&this.sortService.clearSorting&&this.sortService.clearSorting(!1),this.filterService&&this.filterService.clearFilters&&this.filterService.clearFilters()}clearPinning(){const e=[...this.sharedService.visibleColumns];this.sharedService.slickGrid.setOptions({frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1}),Array.isArray(e)&&this.sharedService.slickGrid.setColumns(e)}setPinning(e,t=!0,i=!1,n=!0){je(e)?this.clearPinning():(this.sharedService.slickGrid.setOptions(e,i,n),this.sharedService.gridOptions={...this.sharedService.gridOptions,...e}),t&&this.sharedService.slickGrid.autosizeColumns()}getAllColumnDefinitions(){return this.sharedService.allColumns}getVisibleColumnDefinitions(){return this.sharedService.visibleColumns}getColumnFromEventArguments(e){if(!(e&&e.grid&&e.grid.getColumns&&e.grid.getDataItem))throw new Error("To get the column definition and data, we need to have these arguments passed as objects (row, cell, grid)");return{row:e.row,cell:e.cell,columnDef:e.grid.getColumns()[e.cell],dataContext:e.grid.getDataItem(e.row),dataView:this._dataView,grid:this._grid}}getDataItemByRowNumber(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('We could not find SlickGrid Grid object or it\'s "getDataItem" method');return this._grid.getDataItem(e)}getItemRowMetadataToHighlight(e){return t=>{const i=this._dataView.getItem(t);let n={cssClasses:""};return"function"==typeof e&&(n=e(t)),n||(n={cssClasses:""}),i&&i._dirty&&(n.cssClasses=(n&&n.cssClasses||"")+" dirty"),i&&i.rowClass&&n&&(n.cssClasses+=` ${i.rowClass}`,n.cssClasses+=` row${t}`),n}}getDataItemByRowIndex(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('We could not find SlickGrid Grid object and/or "getDataItem" method');return this._grid.getDataItem(e)}getDataItemByRowIndexes(e){if(!this._grid||"function"!=typeof this._grid.getDataItem)throw new Error('We could not find SlickGrid Grid object and/or "getDataItem" method');const t=[];return Array.isArray(e)&&e.forEach((e=>{t.push(this._grid.getDataItem(e))})),t}getSelectedRows(){if(!this._grid||"function"!=typeof this._grid.getSelectedRows)throw new Error('We could not find SlickGrid Grid object and/or "getSelectedRows" method');return this._grid.getSelectedRows()}getSelectedRowsDataItem(){if(!this._grid||"function"!=typeof this._grid.getSelectedRows)throw new Error('We could not find SlickGrid Grid object and/or "getSelectedRows" method');const e=this._grid.getSelectedRows();return this.getDataItemByRowIndexes(e)}hideColumnById(e,t){if(t={...Oi,...t},this._grid&&this._grid.getColumns&&this._grid.setColumns){const i=this._grid.getColumns(),n=i.findIndex((t=>t.id===e));if(n>=0){const o=De(i,n);this.sharedService.visibleColumns=o,this._grid.setColumns(o);const s=this.sharedService.allColumns.findIndex((t=>t.id===e));return s&&((null==t?void 0:t.hideFromColumnPicker)&&(this.sharedService.allColumns[s].excludeFromColumnPicker=!0),(null==t?void 0:t.hideFromGridMenu)&&(this.sharedService.allColumns[s].excludeFromGridMenu=!0)),(null==t?void 0:t.autoResizeColumns)&&this._grid.autosizeColumns(),(null==t?void 0:t.triggerEvent)&&this.pubSubService.publish("onHeaderMenuHideColumns",{columns:o}),n}}return-1}hideColumnByIds(e,t){if(t={...Oi,...t},Array.isArray(e)){for(const i of e)this.hideColumnById(i,{...t,triggerEvent:!1,autoResizeColumns:!1});(null==t?void 0:t.autoResizeColumns)&&this._grid.autosizeColumns(),(null==t?void 0:t.triggerEvent)&&this.pubSubService.publish("onHeaderMenuHideColumns",{columns:this.sharedService.visibleColumns})}}highlightRow(e,t=1500,i=300){!this._grid.getSelectionModel()&&Slick&&Slick.RowSelectionModel&&(this._rowSelectionPlugin=new Slick.RowSelectionModel(this._gridOptions.rowSelectionOptions),this._grid.setSelectionModel(this._rowSelectionPlugin)),Array.isArray(e)?e.forEach((e=>this.highlightRowByMetadata(e,t,i))):this.highlightRowByMetadata(e,t,i)}highlightRowByMetadata(e,t=1500,i=300){this._dataView.getItemMetadata=this.getItemRowMetadataToHighlight(this._dataView.getItemMetadata);const n=this._dataView.getItem(e),o=this._gridOptions.datasetIdPropertyName||"id";void 0!==(null==n?void 0:n[o])&&(n.rowClass="highlight",this._dataView.updateItem(n[o],n),this.renderGrid(),clearTimeout(Si),Si=setTimeout((()=>{n.rowClass="highlight-end",this._dataView.updateItem(n[o],n),this.renderGrid()}),i),setTimeout((()=>{void 0!==(null==n?void 0:n[o])&&(delete n.rowClass,void 0!==this._dataView.getIdxById(n[o])&&(this._dataView.updateItem(n[o],n),this.renderGrid()))}),t+i))}setSelectedRow(e){var t;(null===(t=this._grid)||void 0===t?void 0:t.setSelectedRows)&&this._grid.setSelectedRows([e])}setSelectedRows(e){var t;(null===(t=this._grid)||void 0===t?void 0:t.setSelectedRows)&&this._grid.setSelectedRows(e)}renderGrid(){this._grid&&"function"==typeof this._grid.invalidate&&(this._grid.invalidate(),this._grid.render())}resetGrid(e){var t;if(this._grid){const i=this.sharedService.allColumns||[];Array.isArray(i)&&i.length>0&&(this._grid.setColumns(i),(null===(t=this._gridOptions)||void 0===t?void 0:t.enableAutoSizeColumns)&&this._grid.autosizeColumns(),this.gridStateService.resetColumns(e))}this.clearPinning(),this.filterService&&this.filterService.clearFilters&&this.filterService.clearFilters(),this.sortService&&this.sortService.clearSorting&&this.sortService.clearSorting()}addItem(e,t){var i,n,o,s,r;const l=null!==(i=null==(t={...Ti,...t})?void 0:t.position)&&void 0!==i?i:"top";if(!this._grid||!this._gridOptions||!this._dataView)throw new Error("We could not find SlickGrid Grid, DataView objects");const a=this._gridOptions.datasetIdPropertyName||"id";if(!e||!(a in e))throw new Error(`Adding an item requires the item to include an "${a}" property`);"bottom"===l||(null===(n=this._gridOptions)||void 0===n?void 0:n.enableTreeData)?this._dataView.addItem(e):this._dataView.insertItem(0,e);let d=0;const u=null!==(s=null===(o=e)||void 0===o?void 0:o[a])&&void 0!==s?s:"";return(null===(r=this._gridOptions)||void 0===r?void 0:r.enableTreeData)?(this.invalidateHierarchicalDataset(),d=this._dataView.getRowById(u),this._grid.scrollRowIntoView(null!=d?d:0,!1)):t.resortGrid?(this._dataView.reSort(),d=this._dataView.getRowById(u)):(d="bottom"===l?this._dataView.getRowById(u):0,this._grid.scrollRowIntoView(null!=d?d:0)),t.highlightRow&&void 0!==d&&this.highlightRow(d),void 0!==d&&t.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRow(d),t.triggerEvent&&this.pubSubService.publish("onItemAdded",e),!(this._gridOptions&&this._gridOptions.backendServiceApi)&&this._gridOptions.enablePagination&&("top"===l?this.paginationService.goToFirstPage():this.paginationService.goToLastPage()),d}addItems(e,t){var i,n,o,s,r,l;t={...Ti,...t};const a=this._gridOptions.datasetIdPropertyName||"id",d=null!==(i=null==t?void 0:t.position)&&void 0!==i?i:"top",u=[];if(!Array.isArray(e))return[this.addItem(e,t)||0];if(this._dataView.beginUpdate(!0),"bottom"===d||(null===(n=this._gridOptions)||void 0===n?void 0:n.enableTreeData)?this._dataView.addItems(e):this._dataView.insertItems(0,e),this._dataView.endUpdate(),null===(o=this._gridOptions)||void 0===o?void 0:o.enableTreeData){this.invalidateHierarchicalDataset();const t=null!==(r=null===(s=e[0])||void 0===s?void 0:s[a])&&void 0!==r?r:"",i=this._dataView.getRowById(t);this._grid.scrollRowIntoView(null!=i?i:0,!1)}else t.resortGrid&&this._dataView.reSort();return"bottom"!==d||(null===(l=this._gridOptions)||void 0===l?void 0:l.enableTreeData)?this._grid.navigateTop():this._grid.navigateBottom(),e.forEach((e=>u.push(this._dataView.getRowById(e[a])))),t.highlightRow&&this.highlightRow(u),t.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(u),t.triggerEvent&&this.pubSubService.publish("onItemAdded",e),u}deleteItem(e,t){t={...Ei,...t};const i=this._gridOptions.datasetIdPropertyName||"id";if(!e||!(i in e))throw new Error(`Deleting an item requires the item to include an "${i}" property`);return this.deleteItemById(e[i],t)}deleteItems(e,t){t={...Ei,...t};const i=this._gridOptions.datasetIdPropertyName||"id";if(!Array.isArray(e))return this.deleteItem(e,t),[e[i]];this._dataView.beginUpdate(!0);const n=[];return e.forEach((e=>{var t;void 0!==(null===(t=e)||void 0===t?void 0:t[i])&&n.push(e[i])})),this._dataView.deleteItems(n),this._dataView.endUpdate(),t.triggerEvent&&this.pubSubService.publish("onItemDeleted",e),n}deleteItemById(e,t){if(t={...Ei,...t},null==e)throw new Error('Cannot delete a row without a valid "id"');return!(this.gridStateService&&this.gridStateService.needToPreserveRowSelection())&&this._grid&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows([]),this._dataView.deleteItem(e),t.triggerEvent&&this.pubSubService.publish("onItemDeleted",e),e}deleteItemByIds(e,t){if(t={...Ei,...t},Array.isArray(e)){this._dataView.beginUpdate(!0);for(let t=0;t<e.length;t++)null!==e[t]&&this.deleteItemById(e[t],{triggerEvent:!1});return this._dataView.endUpdate(),t.triggerEvent&&this.pubSubService.publish("onItemDeleted",e),e}return[]}updateItem(e,t){t={...xi,...t};const i=this._gridOptions.datasetIdPropertyName||"id",n=e&&i in e?e[i]:void 0;if(void 0===n)throw new Error(`Calling Update of an item requires the item to include an "${i}" property`);return this.updateItemById(n,e,t)}updateItems(e,t){var i;t={...xi,...t};const n=this._gridOptions.datasetIdPropertyName||"id";if(!Array.isArray(e))return[this.updateItem(e,t)];this._dataView.beginUpdate(!0);const o=[],s=[];return e.forEach((e=>{const t=e&&n in e?e[n]:void 0;if(s.push(t),void 0!==this._dataView.getIdxById(t)){const e=this._dataView.getRowById(t);void 0!==e&&(o.push(e),this._grid.updateRow(e))}})),this._dataView.updateItems(s,e),this._dataView.endUpdate(),(null===(i=this._gridOptions)||void 0===i?void 0:i.enableTreeData)&&this.invalidateHierarchicalDataset(),t.highlightRow&&this.highlightRow(o),t.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(o),t.triggerEvent&&this.pubSubService.publish("onItemUpdated",e),o}updateItemById(e,t,i){var n;if(i={...xi,...i},void 0===e)throw new Error('Cannot update a row without a valid "id"');const o=this._dataView.getRowById(e);if(!(t&&void 0!==o||this._gridOptions.enablePagination))throw new Error(`The item to update in the grid was not found with id: ${e}`);return void 0!==this._dataView.getIdxById(e)&&(this._dataView.updateItem(e,t),this._grid.updateRow(o),(null===(n=this._gridOptions)||void 0===n?void 0:n.enableTreeData)&&this.invalidateHierarchicalDataset(),i.scrollRowIntoView&&this._grid.scrollRowIntoView(o),i.highlightRow&&this.highlightRow(o),i.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRow(o),i.triggerEvent&&this.pubSubService.publish("onItemUpdated",t)),o}upsertItem(e,t){t={...Ti,...t};const i=this._gridOptions.datasetIdPropertyName||"id",n=e&&i in e?e[i]:void 0;if(void 0===n)throw new Error(`Calling Upsert of an item requires the item to include an "${i}" property`);return this.upsertItemById(n,e,t)}upsertItems(e,t){if(t={...Ti,...t},!Array.isArray(e))return[this.upsertItem(e,t)];this._dataView.beginUpdate(!0);const i=[];e.forEach((e=>{i.push(this.upsertItem(e,{...t,highlightRow:!1,resortGrid:!1,selectRow:!1,triggerEvent:!1}))})),this._dataView.endUpdate();const n=i.map((e=>void 0!==e.added?e.added:e.updated));if(t.highlightRow&&this.highlightRow(n),t.selectRow&&this._gridOptions&&(this._gridOptions.enableCheckboxSelector||this._gridOptions.enableRowSelection)&&this.setSelectedRows(n),t.triggerEvent){this.pubSubService.publish("onItemUpserted",e);const t=i.filter((e=>void 0!==e.added));Array.isArray(t)&&t.length>0&&this.pubSubService.publish("onItemAdded",t);const n=i.filter((e=>void 0!==e.updated));Array.isArray(n)&&n.length>0&&this.pubSubService.publish("onItemUpdated",n)}return i}upsertItemById(e,t,i){let n,o,s=!1;if(i={...Ti,...i},void 0===e&&!this.hasRowSelectionEnabled())throw new Error('Calling Upsert of an item requires the item to include a valid and unique "id" property');return void 0===this._dataView.getRowById(e)?(n=this.addItem(t,i),s=!0):(o=this.updateItem(t,{highlightRow:i.highlightRow,selectRow:i.selectRow,triggerEvent:i.triggerEvent}),s=!1),i.triggerEvent&&(this.pubSubService.publish("onItemUpserted",t),s?this.pubSubService.publish("onItemAdded",t):this.pubSubService.publish("onItemUpdated",t)),{added:n,updated:o}}invalidateHierarchicalDataset(e){var t;if((null===(t=this._gridOptions)||void 0===t?void 0:t.enableTreeData)&&this.treeDataService){const t=null!=e?e:this._dataView.getItems(),i=this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(t||[],this.sharedService.allColumns,this._gridOptions);this.sharedService.hierarchicalDataset=i.hierarchical,this.filterService.refreshTreeDataFilters(e),this._dataView.setItems(i.flat)}}hasRowSelectionEnabled(){const e=this._grid.getSelectionModel();return(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)&&e}}class Di{constructor(){this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll()}bindOnBeforeEditCell(e){const t=(null==e?void 0:e.getData)&&e.getData(),i=e.onBeforeEditCell;this._eventHandler.subscribe(i,((i,n)=>{if(!(i&&n&&e&&void 0!==n.cell&&e.getColumns&&e.getDataItem))return;const o=e.getColumns()[n.cell];if("function"==typeof o.onBeforeEditCell){const s={row:n.row,cell:n.cell,dataView:t,grid:e,columnDef:o,dataContext:e.getDataItem(n.row)};o.onBeforeEditCell(i,s)}}))}bindOnCellChange(e){const t=(null==e?void 0:e.getData)&&e.getData(),i=e.onCellChange;this._eventHandler.subscribe(i,((i,n)=>{if(!(i&&n&&e&&void 0!==n.cell&&e.getColumns&&e.getDataItem))return;const o=e.getColumns()[n.cell];if("function"==typeof o.onCellChange){const s={row:n.row,cell:n.cell,dataView:t,grid:e,columnDef:o,dataContext:e.getDataItem(n.row)};o.onCellChange(i,s)}}))}bindOnClick(e){const t=(null==e?void 0:e.getData)&&e.getData(),i=e.onClick;this._eventHandler.subscribe(i,((i,n)=>{if(!(i&&n&&e&&void 0!==n.cell&&e.getColumns&&e.getDataItem))return;const o=e&&e.getColumns&&e.getColumns()[n.cell],s=e&&e.getOptions&&e.getOptions()||{};if(s.enableCellNavigation&&(!s.editable||s.editable&&s.autoCommitEdit)&&e.setActiveCell(n.row,n.cell,!1,!1,!0),"function"==typeof o.onCellClick){const s={row:n.row,cell:n.cell,dataView:t,grid:e,columnDef:o,dataContext:e.getDataItem(n.row)};o.onCellClick(i,s)}}))}}class Ai{constructor(e,t,i,n,o,s){this.extensionService=e,this.filterService=t,this.pubSubService=i,this.sharedService=n,this.sortService=o,this.treeDataService=s,this._eventHandler=new Slick.EventHandler,this._columns=[],this._subscriptions=[],this._selectedRowDataContextIds=[],this._selectedFilteredRowDataContextIds=[],this._wasRecheckedAfterPageChange=!0}get _dataView(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getData)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get _gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get datasetIdPropName(){return this._gridOptions.datasetIdPropertyName||"id"}get selectedRowDataContextIds(){return this._selectedRowDataContextIds}set selectedRowDataContextIds(e){this._selectedRowDataContextIds=e,this._selectedFilteredRowDataContextIds=e}init(e){this._grid=e,this.subscribeToAllGridChanges(e)}dispose(){this._columns=[],this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}changeColumnsArrangement(e,t=!0,i=!1){var n,o,s,r,l,a,d,u,c;if(Array.isArray(e)&&e.length>0){const h=this.getAssociatedGridColumns(this._grid,e);if(h&&Array.isArray(h)&&h.length>0){if(Array.isArray(this.sharedService.allColumns)){const e=[];if(this._gridOptions.enableCheckboxSelector){const t=null!==(s=null===(o=null===(n=this._gridOptions)||void 0===n?void 0:n.checkboxSelector)||void 0===o?void 0:o.columnIndexPosition)&&void 0!==s?s:0;e.push({columnId:"_checkbox_selector",columnIndexPosition:t})}if(this._gridOptions.enableRowDetailView){const t=null!==(a=null===(l=null===(r=this._gridOptions)||void 0===r?void 0:r.rowDetailView)||void 0===l?void 0:l.columnIndexPosition)&&void 0!==a?a:0;e.push({columnId:"_detail_selector",columnIndexPosition:t})}if(this._gridOptions.enableRowMoveManager){const t=null!==(c=null===(u=null===(d=this._gridOptions)||void 0===d?void 0:d.rowMoveManager)||void 0===u?void 0:u.columnIndexPosition)&&void 0!==c?c:0;e.push({columnId:"_move",columnIndexPosition:t})}this.addColumnDynamicWhenFeatureEnabled(e,this.sharedService.allColumns,h)}h.forEach((e=>e.originalWidth=e.width||e.originalWidth)),this._grid.setColumns(h),this.sharedService.visibleColumns=h,t?this._grid.autosizeColumns():(i||this._gridOptions.enableAutoResizeColumnsByCellContent&&!this._gridOptions.autosizeColumnsByCellContentOnFirstLoad)&&this.pubSubService.publish("onFullResizeByContentRequested",{caller:"GridStateService"})}}}getCurrentGridState(e){var t;const{frozenColumn:i,frozenRow:n,frozenBottom:o}=this.sharedService.gridOptions,s={columns:this.getCurrentColumns(),filters:this.getCurrentFilters(),sorters:this.getCurrentSorters(),pinning:{frozenColumn:i,frozenRow:n,frozenBottom:o}},r=this.getCurrentPagination();if(r&&(s.pagination=r),this.hasRowSelectionEnabled()){const t=this.getCurrentRowSelections(null==e?void 0:e.requestRefreshRowFilteredRow);t&&(s.rowSelection=t)}if(null===(t=this._gridOptions)||void 0===t?void 0:t.enableTreeData){const e=this.getCurrentTreeDataToggleState();e&&(s.treeData=e)}return s}getColumns(){return this._columns}getAssociatedCurrentColumns(e){const t=[];return e&&Array.isArray(e)&&e.forEach((e=>{(null==e?void 0:e.id)&&t.push({columnId:e.id,cssClass:e.cssClass||"",headerCssClass:e.headerCssClass||"",width:e.width||0})})),t}getAssociatedGridColumns(e,t){const i=[],n=this.sharedService.allColumns||e.getColumns();return t&&Array.isArray(t)&&t.forEach((e=>{const t=n.find((t=>t.id===e.columnId));(null==t?void 0:t.id)&&i.push({...t,cssClass:e.cssClass,headerCssClass:e.headerCssClass,width:e.width})})),this._columns=i,i}getCurrentColumns(){return this.getAssociatedCurrentColumns(this._grid.getColumns()||[])}getCurrentFilters(){var e,t;if(null===(e=this._gridOptions)||void 0===e?void 0:e.backendServiceApi){const e=this._gridOptions.backendServiceApi.service;if(null==e?void 0:e.getCurrentFilters)return e.getCurrentFilters()}else if(null===(t=this.filterService)||void 0===t?void 0:t.getCurrentLocalFilters)return this.filterService.getCurrentLocalFilters();return null}getCurrentPagination(){var e;if(null===(e=this._gridOptions)||void 0===e?void 0:e.enablePagination){if(!this._gridOptions.backendServiceApi)return this.sharedService.currentPagination;{const e=this._gridOptions.backendServiceApi.service;if(null==e?void 0:e.getCurrentPagination)return e.getCurrentPagination()}}return null}getCurrentRowSelections(e=!0){if(this._grid&&this._gridOptions&&this._dataView&&this.hasRowSelectionEnabled()){let t=[];const i=this._dataView.mapIdsToRows(this._selectedRowDataContextIds||[]),n=this._selectedRowDataContextIds;return!0===e&&(t=this.refreshFilteredRowSelections()),t=this._selectedFilteredRowDataContextIds,{gridRowIndexes:i,dataContextIds:n,filteredDataContextIds:t}}return null}getCurrentSorters(){var e,t;if(null===(e=this._gridOptions)||void 0===e?void 0:e.backendServiceApi){const e=this._gridOptions.backendServiceApi.service;if(null==e?void 0:e.getCurrentSorters)return e.getCurrentSorters()}else if(null===(t=this.sortService)||void 0===t?void 0:t.getCurrentLocalSorters)return this.sortService.getCurrentLocalSorters();return null}getCurrentTreeDataToggleState(){var e;return(null===(e=this._gridOptions)||void 0===e?void 0:e.enableTreeData)&&this.treeDataService?this.treeDataService.getCurrentToggleState():null}needToPreserveRowSelection(){var e;let t=!1;if((null===(e=this._gridOptions)||void 0===e?void 0:e.dataView)&&this._gridOptions.dataView.hasOwnProperty("syncGridSelection")){const e=this._gridOptions.dataView.syncGridSelection;"boolean"==typeof e?t=this._gridOptions.dataView.syncGridSelection:"object"==typeof e&&(t=e.preserveHidden),t&&this._gridOptions.backendServiceApi&&this._gridOptions.dataView.hasOwnProperty("syncGridSelectionWithBackendService")&&(t=this._gridOptions.dataView.syncGridSelectionWithBackendService)}return t}resetColumns(e){const t=e||this._columns,i=this.getAssociatedCurrentColumns(t);this.pubSubService.publish("onGridStateChanged",{change:{newValues:i,type:Ce.columns},gridState:this.getCurrentGridState()})}resetToOriginalColumns(e=!0){this._grid.setColumns(this.sharedService.allColumns),this.sharedService.visibleColumns=this.sharedService.allColumns,e&&this._grid.autosizeColumns()}resetRowSelectionWhenRequired(){var e,t;if(!this.needToPreserveRowSelection()&&(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)){const i=null===(t=null===(e=this.extensionService)||void 0===e?void 0:e.getExtensionByName)||void 0===t?void 0:t.call(e,ae.rowSelection);(null==i?void 0:i.instance)&&this._grid.setSelectedRows([])}}subscribeToAllGridChanges(e){this._subscriptions.push(this.pubSubService.subscribe("onFilterChanged",(e=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:e,type:Ce.filter},gridState:this.getCurrentGridState({requestRefreshRowFilteredRow:!this.hasRowSelectionEnabled()})}),this.hasRowSelectionEnabled()&&this.reEvaluateRowSelectionAfterFilterChange()}))),this._subscriptions.push(this.pubSubService.subscribe("onFilterCleared",(()=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:[],type:Ce.filter},gridState:this.getCurrentGridState()})}))),this._subscriptions.push(this.pubSubService.subscribe("onSortChanged",(e=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:e,type:Ce.sorter},gridState:this.getCurrentGridState()})}))),this._subscriptions.push(this.pubSubService.subscribe("onSortCleared",(()=>{this.resetRowSelectionWhenRequired(),this.pubSubService.publish("onGridStateChanged",{change:{newValues:[],type:Ce.sorter},gridState:this.getCurrentGridState()})}))),this.bindExtensionAddonEventToGridStateChange(ae.columnPicker,"onColumnsChanged"),this.bindExtensionAddonEventToGridStateChange(ae.gridMenu,"onColumnsChanged"),this.bindSlickGridColumnChangeEventToGridStateChange("onColumnsReordered",e),this.bindSlickGridColumnChangeEventToGridStateChange("onColumnsResized",e),this.bindSlickGridOnSetOptionsEventToGridStateChange(e),(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)&&this.bindSlickGridRowSelectionToGridStateChange(),this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuHideColumns",(e=>{const t=this.getAssociatedCurrentColumns(e);this.pubSubService.publish("onGridStateChanged",{change:{newValues:t,type:Ce.columns},gridState:this.getCurrentGridState()})}))),this._subscriptions.push(this.pubSubService.subscribe("onTreeItemToggled",(e=>{this.pubSubService.publish("onGridStateChanged",{change:{newValues:e,type:Ce.treeData},gridState:this.getCurrentGridState()})}))),this._subscriptions.push(this.pubSubService.subscribe("onTreeFullToggleEnd",(e=>{this.pubSubService.publish("onGridStateChanged",{change:{newValues:e,type:Ce.treeData},gridState:this.getCurrentGridState()})})))}addColumnDynamicWhenFeatureEnabled(e,t,i){e.sort(((e,t)=>e.columnIndexPosition-t.columnIndexPosition)),e.forEach((e=>{const n=t.findIndex((t=>t.id===e.columnId)),o=i.findIndex((t=>t.id===e.columnId));if(n>=0&&-1===o){const e=t[n];0===n?i.unshift(e):i.splice(n,0,e)}}))}bindExtensionAddonEventToGridStateChange(e,t){var i,n,o;const s=null===(n=null===(i=this.extensionService)||void 0===i?void 0:i.getExtensionByName)||void 0===n?void 0:n.call(i,e),r=null===(o=null==s?void 0:s.instance)||void 0===o?void 0:o[t];r&&"function"==typeof r.subscribe&&this._eventHandler.subscribe(r,((e,t)=>{const i=null==t?void 0:t.columns,n=this.getAssociatedCurrentColumns(i);this.pubSubService.publish("onGridStateChanged",{change:{newValues:n,type:Ce.columns},gridState:this.getCurrentGridState()})}))}bindSlickGridColumnChangeEventToGridStateChange(e,t){var i;const n=null===(i=t)||void 0===i?void 0:i[e];n&&"function"==typeof n.subscribe&&this._eventHandler.subscribe(n,(()=>{const e=t.getColumns(),i=this.getAssociatedCurrentColumns(e);this.pubSubService.publish("onGridStateChanged",{change:{newValues:i,type:Ce.columns},gridState:this.getCurrentGridState()})}))}bindSlickGridOnSetOptionsEventToGridStateChange(e){const t=e.onSetOptions;this._eventHandler.subscribe(t,((e,t)=>{const{frozenBottom:i,frozenColumn:n,frozenRow:o}=t.optionsBefore,{frozenBottom:s,frozenColumn:r,frozenRow:l}=t.optionsAfter;if(i!==s||n!==r||o!==l){const e={frozenBottom:s,frozenColumn:r,frozenRow:l},t=this.getCurrentGridState();this.pubSubService.publish("onGridStateChanged",{change:{newValues:e,type:Ce.pinning},gridState:t})}}))}bindSlickGridRowSelectionToGridStateChange(){if(this._grid&&this._gridOptions&&this._dataView){const e=this._dataView.onBeforePagingInfoChanged;this._eventHandler.subscribe(e,(()=>{this._wasRecheckedAfterPageChange=!1}));const t=this._dataView.onPagingInfoChanged;this._eventHandler.subscribe(t,(()=>{setTimeout((()=>{const e=this._dataView.mapIdsToRows(this._selectedRowDataContextIds||[]);mi(e,this._grid.getSelectedRows())||this._grid.setSelectedRows(e)}))}));const i=this._grid.onSelectedRowsChanged;this._eventHandler.subscribe(i,((e,t)=>{if(Array.isArray(t.rows)&&Array.isArray(t.previousSelectedRows)){const e=t.rows,i=t.previousSelectedRows,n=e.filter((e=>i.indexOf(e)<0)),o=i.filter((t=>e.indexOf(t)<0));this._wasRecheckedAfterPageChange&&o.length>0&&(this._dataView.mapRowsToIds(o)||[]).forEach((e=>{Array.isArray(this._selectedRowDataContextIds)&&this._selectedRowDataContextIds.splice(this._selectedRowDataContextIds.indexOf(e),1)})),n.length>0&&(this._dataView.mapRowsToIds(n)||[]).forEach((e=>{-1===this._selectedRowDataContextIds.indexOf(e)&&this._selectedRowDataContextIds.push(e)})),this._wasRecheckedAfterPageChange=!0;const s=this._dataView.mapIdsToRows(this._selectedRowDataContextIds||[]);!mi(s,this._grid.getSelectedRows())&&this._gridOptions.enablePagination&&this._grid.setSelectedRows(s);const r=this.refreshFilteredRowSelections(),l={gridRowIndexes:this._grid.getSelectedRows(),dataContextIds:this._selectedRowDataContextIds,filteredDataContextIds:r};this.pubSubService.publish("onGridStateChanged",{change:{newValues:l,type:Ce.rowSelection},gridState:this.getCurrentGridState()})}}))}}hasRowSelectionEnabled(){const e=this._grid.getSelectionModel();return(this._gridOptions.enableRowSelection||this._gridOptions.enableCheckboxSelector)&&e}reEvaluateRowSelectionAfterFilterChange(){const e=this._grid.getSelectedRows(),t=(this._selectedFilteredRowDataContextIds||[]).slice(),i=this.refreshFilteredRowSelections();if(!mi(this._selectedFilteredRowDataContextIds,t)){const t={gridRowIndexes:e,dataContextIds:this._selectedRowDataContextIds,filteredDataContextIds:i};this.pubSubService.publish("onGridStateChanged",{change:{newValues:t,type:Ce.rowSelection},gridState:this.getCurrentGridState({requestRefreshRowFilteredRow:!1})})}}refreshFilteredRowSelections(){let e=[];const t=this._dataView.getFilteredItems()||[];return Array.isArray(this._selectedRowDataContextIds)&&(e=[...this._selectedRowDataContextIds].filter((e=>t.findIndex((t=>t[this.datasetIdPropName]===e))>-1)),this._selectedFilteredRowDataContextIds=e),e}}class Ri{constructor(e,t,i){this.extensionUtility=e,this.extensionService=t,this.pubSubService=i,this._subscriptions=[],this._eventHandler=new Slick.EventHandler}get _dataView(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getData)&&this._grid.getData()}get eventHandler(){return this._eventHandler}get _gridOptions(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getOptions)?this._grid.getOptions():{}}get _columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}init(e){var t;if(this._grid=e,e&&this._gridOptions&&this._gridOptions.createPreHeaderPanel){this._gridOptions.enableTranslate&&this.translateGroupingAndColSpan(),this._eventHandler.subscribe(e.onSort,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(e.onRendered,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(e.onAutosizeColumns,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(e.onColumnsResized,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(e.onColumnsReordered,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(this._dataView.onRowCountChanged,(()=>this.delayRenderPreHeaderRowGroupingTitles(0)));const i=this.extensionService.getExtensionByName(ae.columnPicker);(null===(t=null==i?void 0:i.instance)||void 0===t?void 0:t.onColumnsChanged)&&this._eventHandler.subscribe(i.instance.onColumnsChanged,(()=>this.renderPreHeaderRowGroupingTitles())),this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuHideColumns",(()=>this.delayRenderPreHeaderRowGroupingTitles(0))));const n=this.extensionService.getExtensionByName(ae.gridMenu);n&&n.instance&&n.instance.onColumnsChanged&&n.instance.onMenuClose&&(this._eventHandler.subscribe(n.instance.onColumnsChanged,(()=>this.renderPreHeaderRowGroupingTitles())),this._eventHandler.subscribe(n.instance.onMenuClose,(()=>this.renderPreHeaderRowGroupingTitles())));const o=e.getPluginByName("Resizer");(null==o?void 0:o.onGridAfterResize)&&this._eventHandler.subscribe(o.onGridAfterResize,(()=>this.renderPreHeaderRowGroupingTitles()));const s=e.onSetOptions;this._eventHandler.subscribe(s,((e,t)=>{var i,n;(null===(i=null==t?void 0:t.optionsBefore)||void 0===i?void 0:i.frozenColumn)!==(null===(n=null==t?void 0:t.optionsAfter)||void 0===n?void 0:n.frozenColumn)&&this.delayRenderPreHeaderRowGroupingTitles(0)})),this.delayRenderPreHeaderRowGroupingTitles(75)}}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}delayRenderPreHeaderRowGroupingTitles(e=0){setTimeout((()=>this.renderPreHeaderRowGroupingTitles()),e)}renderPreHeaderRowGroupingTitles(){var e;if(this._gridOptions&&void 0!==this._gridOptions.frozenColumn&&this._gridOptions.frozenColumn>=0){let t=this._grid.getPreHeaderPanelLeft();this.renderHeaderGroups(t,0,this._gridOptions.frozenColumn+1),t=this._grid.getPreHeaderPanelRight(),this.renderHeaderGroups(t,(null===(e=this._gridOptions)||void 0===e?void 0:e.frozenColumn)+1,this._columnDefinitions.length)}else{const e=this._grid.getPreHeaderPanel();this.renderHeaderGroups(e,0,this._columnDefinitions.length)}}renderHeaderGroups(e,t,i){var n,o,s;Le(e),e.className="slick-header-columns",e.style.left="-1000px",e.style.width=`${this._grid.getHeadersWidth()}px`,e.parentElement&&e.parentElement.classList.add("slick-header");const r=this._grid.getHeaderColumnWidthDiff();let l,a=null,d="",u=0;const c=null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.frozenHeaderWidthCalcDifferential)&&void 0!==o?o:0,h=void 0!==(null===(s=this._gridOptions)||void 0===s?void 0:s.frozenColumn)&&this._gridOptions.frozenColumn>=0;for(let n=t;n<i;n++)if(l=this._columnDefinitions[n],l){if(d===l.columnGroup&&n>0)u+=l.width||0,(null==a?void 0:a.style)&&(a.style.width=u-r-c+"px");else{u=l.width||0,a=document.createElement("div"),a.className="ui-state-default slick-header-column "+(h?"frozen":""),a.style.width=u-r+"px";const t=document.createElement("span");t.className="slick-column-name",t.textContent=l.columnGroup||"",a.appendChild(t),e.appendChild(a)}d=l.columnGroup||""}}translateGroupingAndColSpan(){const e=this._grid.getColumns();this.extensionUtility.translateItems(e,"columnGroupKey","columnGroup"),this._grid.setColumns(e),this.renderPreHeaderRowGroupingTitles()}}class Ii{constructor(e,t,i,n){this.pubSubService=e,this.sharedService=t,this.backendUtilities=i,this.rxjs=n,this._eventHandler=new Slick.EventHandler,this._initialized=!1,this._isLocalGrid=!0,this._dataFrom=1,this._dataTo=1,this._itemsPerPage=0,this._pageCount=1,this._pageNumber=1,this._totalItems=0,this._availablePageSizes=[],this._subscriptions=[]}get dataView(){var e,t,i;return null!==(i=null===(t=null===(e=this.grid)||void 0===e?void 0:e.getData)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}set paginationOptions(e){this._paginationOptions=e}get paginationOptions(){return this._paginationOptions}get availablePageSizes(){return this._availablePageSizes}get dataFrom(){return this._dataFrom}get dataTo(){return this._dataTo}get itemsPerPage(){return this._itemsPerPage}get pageCount(){return this._pageCount}get pageNumber(){return this._pageNumber}get totalItems(){return this._totalItems}set totalItems(e){this._totalItems=e,this._initialized&&this.refreshPagination()}addRxJsResource(e){this.rxjs=e}init(e,t,i){if(this._availablePageSizes=t.pageSizes,this.grid=e,this._backendServiceApi=i,this._paginationOptions=t,this._isLocalGrid=!i,this._pageNumber=t.pageNumber||1,i&&(!i.service||!i.process))throw new Error('BackendServiceApi requires the following 2 properties "process" and "service" to be defined.');if(this._isLocalGrid&&this.dataView){const e=this.dataView.onPagingInfoChanged;this._eventHandler.subscribe(e,((e,t)=>{this._totalItems!==t.totalRows&&(this.updateTotalItems(t.totalRows),this._previousPagination={pageNumber:t.pageNum,pageSize:t.pageSize,pageSizes:this.availablePageSizes,totalItems:t.totalRows})})),setTimeout((()=>{this.dataView&&(this.dataView.setRefreshHints({isFilterUnchanged:!0}),this.dataView.setPagingOptions({pageSize:this.paginationOptions.pageSize,pageNum:this._pageNumber-1}))}))}this._subscriptions.push(this.pubSubService.subscribe("onFilterChanged",(()=>this.resetPagination()))),this._subscriptions.push(this.pubSubService.subscribe("onFilterCleared",(()=>this.resetPagination()))),this.dataView&&(this._subscriptions.push(this.pubSubService.subscribe("onItemAdded",(e=>this.processOnItemAddedOrRemoved(e,!0)))),this._subscriptions.push(this.pubSubService.subscribe("onItemDeleted",(e=>this.processOnItemAddedOrRemoved(e,!1))))),this.refreshPagination(!1,!1,!0);const n=this.getFullPagination();this._previousPagination={pageNumber:n.pageNumber,pageSize:n.pageSize,pageSizes:n.pageSizes,totalItems:this.totalItems},this._initialized=!0}dispose(){this._initialized=!1,this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}getCurrentPagination(){return{pageNumber:this._pageNumber,pageSize:this._itemsPerPage,pageSizes:this._availablePageSizes}}getFullPagination(){return{pageCount:this._pageCount,pageNumber:this._pageNumber,pageSize:this._itemsPerPage,pageSizes:this._availablePageSizes,totalItems:this._totalItems,dataFrom:this._dataFrom,dataTo:this._dataTo}}getCurrentPageNumber(){return this._pageNumber}getCurrentItemPerPage(){return this._itemsPerPage}changeItemPerPage(e,t,i=!0){return this._pageNumber=1,this._pageCount=Math.ceil(this._totalItems/e),this._itemsPerPage=e,i?this.processOnPageChanged(this._pageNumber,t):Promise.resolve(this.getFullPagination())}goToFirstPage(e,t=!0){return this._pageNumber=1,t?this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())}goToLastPage(e,t=!0){return this._pageNumber=this._pageCount||1,t?this.processOnPageChanged(this._pageNumber||1,e):Promise.resolve(this.getFullPagination())}goToNextPage(e,t=!0){return this._pageNumber<this._pageCount?(this._pageNumber++,t?this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())):Promise.resolve(!1)}goToPageNumber(e,t,i=!0){const n=this._pageNumber;return e<1?this._pageNumber=1:e>this._pageCount?this._pageNumber=this._pageCount:this._pageNumber=e,this._pageNumber!==n?i?this.processOnPageChanged(this._pageNumber,t):Promise.resolve(this.getFullPagination()):Promise.resolve(!1)}goToPreviousPage(e,t=!0){return this._pageNumber>1?(this._pageNumber--,t?this.processOnPageChanged(this._pageNumber,e):Promise.resolve(this.getFullPagination())):Promise.resolve(!1)}refreshPagination(e=!1,t=!0,i=!1){var n,o,s;const r={...this.getFullPagination()};if(this._paginationOptions){const t=this._paginationOptions;this._itemsPerPage||(this._isLocalGrid?this._itemsPerPage=t.pageSize:this._itemsPerPage=+((null===(s=null===(o=null===(n=this._backendServiceApi)||void 0===n?void 0:n.options)||void 0===o?void 0:o.paginationOptions)||void 0===s?void 0:s.first)?this._backendServiceApi.options.paginationOptions.first:t.pageSize)),(e||this._totalItems!==t.totalItems)&&(e?(this._pageNumber=1,this.paginationOptions.pageNumber=1):!this._initialized&&t.pageNumber&&t.pageNumber>1&&(this._pageNumber=t.pageNumber||1),1===this._pageNumber&&this._backendServiceApi&&this._backendServiceApi.service.resetPaginationOptions()),this._availablePageSizes=t.pageSizes,!this._totalItems&&t.totalItems&&(this._totalItems=t.totalItems),this.recalculateFromToIndexes()}this._pageCount=Math.ceil(this._totalItems/this._itemsPerPage),this.sharedService.currentPagination=this.getCurrentPagination(),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),t&&!mi(r,this.getFullPagination())&&this.pubSubService.publish("onPaginationChanged",this.getFullPagination()),i&&!mi(r,this.getFullPagination())&&this.pubSubService.publish("onPaginationPresetsInitialized",this.getFullPagination());const l=this.getFullPagination();this._previousPagination={pageNumber:l.pageNumber,pageSize:l.pageSize,pageSizes:l.pageSizes,totalItems:this.totalItems}}resetPagination(e=!0){var t,i;this._isLocalGrid&&this.dataView&&(null===(i=null===(t=this.sharedService)||void 0===t?void 0:t.gridOptions)||void 0===i?void 0:i.enablePagination)&&this.dataView.setPagingOptions({pageSize:this._itemsPerPage,pageNum:0}),this.refreshPagination(!0,e)}togglePaginationVisibility(e){var t;if(this.grid&&(null===(t=this.sharedService)||void 0===t?void 0:t.gridOptions)){const t=void 0!==e?e:!this.sharedService.gridOptions.enablePagination;if(t&&this.goToFirstPage(),this._isLocalGrid&&this.dataView){const t=e?this._itemsPerPage:0;this.dataView.setPagingOptions({pageSize:t,pageNum:0})}this.sharedService.gridOptions.enablePagination=t,this.pubSubService.publish("onPaginationVisibilityChanged",{visible:t})}}processOnPageChanged(e,t){return!1===this.pubSubService.publish("onBeforePaginationChange",this.getFullPagination())?(this.resetToPreviousPagination(),Promise.resolve(this.getFullPagination())):new Promise(((i,n)=>{var o,s,r;if(this.recalculateFromToIndexes(),this._isLocalGrid&&this.dataView)this.dataView.setPagingOptions({pageSize:this._itemsPerPage,pageNum:e-1}),this.pubSubService.publish("onPaginationChanged",this.getFullPagination()),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),i(this.getFullPagination());else{const l=+this._itemsPerPage,a=new Date;if((null===(o=this._backendServiceApi)||void 0===o?void 0:o.preProcess)&&this._backendServiceApi.preProcess(),null===(s=this._backendServiceApi)||void 0===s?void 0:s.process){const o=this._backendServiceApi.service.processOnPaginationChanged(t,{newPage:e,pageSize:l}),s=this._backendServiceApi.process(o);s instanceof Promise?s.then((e=>{var t;null===(t=this.backendUtilities)||void 0===t||t.executeBackendProcessesCallback(a,e,this._backendServiceApi,this._totalItems);const n=this.getFullPagination();this._previousPagination={pageNumber:n.pageNumber,pageSize:n.pageSize,pageSizes:n.pageSizes,totalItems:this.totalItems},i(this.getFullPagination())})).catch((e=>{var t,i,o;this.resetToPreviousPagination(),null===(t=this.backendUtilities)||void 0===t||t.onBackendError(e,this._backendServiceApi),(null===(i=this._backendServiceApi)||void 0===i?void 0:i.onError)&&(null===(o=this.backendUtilities)||void 0===o?void 0:o.onBackendError)||n(s)})):(null===(r=this.rxjs)||void 0===r?void 0:r.isObservable(s))&&this._subscriptions.push(s.subscribe((e=>{var t;const n=this.getFullPagination();this._previousPagination={pageNumber:n.pageNumber,pageSize:n.pageSize,pageSizes:n.pageSizes,totalItems:this.totalItems},i(null===(t=this.backendUtilities)||void 0===t?void 0:t.executeBackendProcessesCallback(a,e,this._backendServiceApi,this._totalItems))}),(e=>{var t,i,o;this.resetToPreviousPagination(),null===(t=this.backendUtilities)||void 0===t||t.onBackendError(e,this._backendServiceApi),(null===(i=this._backendServiceApi)||void 0===i?void 0:i.onError)&&(null===(o=this.backendUtilities)||void 0===o?void 0:o.onBackendError)||n(s)}))),this.pubSubService.publish("onPaginationRefreshed",this.getFullPagination()),this.pubSubService.publish("onPaginationChanged",this.getFullPagination())}}}))}recalculateFromToIndexes(){0===this._totalItems?(this._dataFrom=0,this._dataTo=1,this._pageNumber=0):(this._dataFrom=this._pageNumber>1?this._pageNumber*this._itemsPerPage-this._itemsPerPage+1:1,this._dataTo=this._totalItems<this._itemsPerPage?this._totalItems:(this._pageNumber||1)*this._itemsPerPage,this._dataTo>this._totalItems&&(this._dataTo=this._totalItems)),this._pageNumber=this._totalItems>0&&0===this._pageNumber?1:this._pageNumber,(this._dataTo>this._totalItems||this._totalItems<this._itemsPerPage)&&(this._dataTo=this._totalItems)}resetToPreviousPagination(){var e,t,i,n,o,s,r,l,a,d,u,c,h;const p=(null===(e=this._previousPagination)||void 0===e?void 0:e.pageNumber)!==this.getFullPagination().pageNumber,m=(null===(t=this._previousPagination)||void 0===t?void 0:t.pageSize)!==this.getFullPagination().pageSize;m&&this.changeItemPerPage(null!==(n=null===(i=this._previousPagination)||void 0===i?void 0:i.pageSize)&&void 0!==n?n:0,null,!1),p&&this.goToPageNumber(null!==(s=null===(o=this._previousPagination)||void 0===o?void 0:o.pageNumber)&&void 0!==s?s:0,null,!1),(p||m)&&(this.refreshPagination(),null===(a=null===(l=null===(r=this._backendServiceApi)||void 0===r?void 0:r.service)||void 0===l?void 0:l.updatePagination)||void 0===a||a.call(l,null!==(u=null===(d=this._previousPagination)||void 0===d?void 0:d.pageNumber)&&void 0!==u?u:0,null!==(h=null===(c=this._previousPagination)||void 0===c?void 0:c.pageSize)&&void 0!==h?h:0))}updateTotalItems(e,t=!1){this._totalItems=e,this._paginationOptions&&(this._paginationOptions.totalItems=e,this.refreshPagination(!1,t))}processOnItemAddedOrRemoved(e,t=!0){if(null!==e){const i=this._dataTo,n=Array.isArray(e)?e.length:1,o=t?+n:-n;this._totalItems+=o,this.recalculateFromToIndexes(),this._dataTo=i+o,this.pubSubService.publish("onPaginationChanged",this.getFullPagination())}}}const Pi=(e,t,i,n,o,s)=>{const r=n.params||{};if(!r.formatters||!Array.isArray(r.formatters))throw new Error('The multiple formatter requires the "formatters" to be provided as a column params.\n For example: this.columnDefinitions = [{ id: title, field: title, formatter: Formatters.multiple, params: { formatters: [Formatters.lowercase, Formatters.uppercase] }');const l=r.formatters;let a=i;for(const i of l)a=i(e,t,a,n,o,s);return a},Mi=pe()||he;function Fi(e,t){if(Array.isArray(e))for(const i of e)if(i.editor)if(i.formatter&&i.formatter!==Pi&&i.formatter!==t){const e=i.formatter;i.formatter=Pi,i.params={...i.params,formatters:[e,t]}}else i.formatter&&i.formatter===Pi&&i.params?-1===i.params.formatters.findIndex((e=>e===t))&&(i.params.formatters=[...i.params.formatters,t]):i.formatter=t}function Ni(e,t,i,n){var o;const s=i&&"function"==typeof i.getOptions?i.getOptions():{},r=t&&t.params;return r&&r.hasOwnProperty(e)?r[e]:(null===(o=s.formatterOptions)||void 0===o?void 0:o.hasOwnProperty(e))?s.formatterOptions[e]:n}function Li(e,t){const i=Ze(e);return(e,n,o,s,r,l)=>{var a,d,u,c,h;const p=l&&"function"==typeof l.getOptions?l.getOptions():{},m=null!==(d=null===(a=null==p?void 0:p.formatterOptions)||void 0===a?void 0:a.dateSeparator)&&void 0!==d?d:t,f=Ze(null!==(u=null==s?void 0:s.type)&&void 0!==u?u:fe.date),g=null!==(h=null===(c=null==s?void 0:s.params)||void 0===c?void 0:c.parseDateAsUtc)&&void 0!==h&&h,v=Mi(o,f,!1).isValid();let _=o;if(o&&v&&(_=g?Mi.utc(o).format(i):Mi(o).format(i)),_&&m!==t){const e=new RegExp(t,"ig");_=_.replace(e,m)}return _}}function $i(e,t,i,n,o,s){let r,l=!1;s&&s.hasOwnProperty("exportWithFormatter")&&(l=!!s.exportWithFormatter),i&&i.hasOwnProperty("exportWithFormatter")&&(l=!!i.exportWithFormatter),n&&i.exportCustomFormatter?r=i.exportCustomFormatter:l&&i.formatter&&(r=i.formatter);const a=Hi(r,e,t,i,n,o);return(null==s?void 0:s.sanitizeDataExport)?lt(a):a}function Hi(e,t,i,n,o,s){let r="",l=n.field||n.id||"";if("string"==typeof n.field&&n.field.indexOf(".")>0){const e=n.field.split(".");l=e.length>0?e[0]:n.field}const a=o.hasOwnProperty(l)?o[l]:null;if("function"==typeof e){const l=e(t,i,a,n,o,s);r=l,l&&"object"==typeof l&&l.hasOwnProperty("text")&&(r=l.text),null==r&&(r="")}else r=o.hasOwnProperty(l)?a:"",null==r&&(r="");return"object"==typeof r&&0===Object.entries(r).length&&(r=""),r}class Vi{constructor(e){this.pubSubService=e,this._intervalRetryDelay=200,this._isStopResizeIntervalRequested=!1,this._hasResizedByContentAtLeastOnce=!1,this._totalColumnsWidthByContent=0,this._resizePaused=!1,this._subscriptions=[],this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}get gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get dataView(){var e;return null===(e=this._grid)||void 0===e?void 0:e.getData()}get gridUid(){var e,t;return null!==(t=null===(e=this._grid)||void 0===e?void 0:e.getUID())&&void 0!==t?t:""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get intervalRetryDelay(){return this._intervalRetryDelay}set intervalRetryDelay(e){this._intervalRetryDelay=e}get resizeByContentOptions(){var e,t;return null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.resizeByContentOptions)&&void 0!==t?t:{}}dispose(){var e,t;null===(e=this._eventHandler)||void 0===e||e.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._intervalId&&clearInterval(this._intervalId),clearTimeout(this._timer),"container"===(null===(t=this.gridOptions.autoResize)||void 0===t?void 0:t.resizeDetection)?this._resizeObserver&&this._resizeObserver.disconnect():$(window).off(`resize.grid${this.gridUidSelector}`)}init(e,t){var i,n,o,s,r,l,a,d;if(!e||!this.gridOptions||!t)throw new Error('\n [Slickgrid-Universal] Resizer Service requires a valid Grid object and DOM Element Container to be provided.\n You can fix this by setting your gridOption to use "enableAutoResize" or create an instance of the ResizerService by calling bindAutoResizeDataGrid()');this._grid=e,this._gridParentContainerElm=t;const u=(null===(i=this.gridOptions)||void 0===i?void 0:i.gridHeight)||(null===(n=this.gridOptions)||void 0===n?void 0:n.gridWidth)?{height:null===(o=this.gridOptions)||void 0===o?void 0:o.gridHeight,width:null===(s=this.gridOptions)||void 0===s?void 0:s.gridWidth}:void 0;this._autoResizeOptions=null!==(l=null===(r=this.gridOptions)||void 0===r?void 0:r.autoResize)&&void 0!==l?l:{container:"grid1",bottomPadding:0},(null==u?void 0:u.width)&&(null==t?void 0:t.style)&&(t.style.width="string"==typeof u.width?u.width:`${u.width}px`);const c=null===(a=null==e?void 0:e.getContainerNode)||void 0===a?void 0:a.call(e);if(this._gridDomElm=$(c),this._autoResizeOptions.container,this._pageContainerElm=$(this._autoResizeOptions.container),this._gridContainerElm=$(t),u&&(this._fixedHeight=u.height,this._fixedWidth=u.width),this.gridOptions&&this.gridOptions.enableAutoResize&&this.bindAutoResizeDataGrid(),this.gridOptions.autoResize&&this._subscriptions.push(this.pubSubService.subscribe("onFullResizeByContentRequested",(()=>this.resizeColumnsByCellContent(!0)))),null===(d=this.gridOptions)||void 0===d?void 0:d.enableColumnResizeOnDoubleClick){this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuColumnResizeByContent",(e=>{this.handleSingleColumnResizeByContent(e.columnId)})));const e=this._grid.onColumnsResizeDblClick;this._eventHandler.subscribe(e,((e,t)=>{this.handleSingleColumnResizeByContent(t.triggeredByColumn)}))}}bindAutoResizeDataGrid(e){var t;if("container"===(null===(t=this.gridOptions.autoResize)||void 0===t?void 0:t.resizeDetection)){if(!this._pageContainerElm||!this._pageContainerElm[0])throw new Error('\n [Slickgrid-Universal] Resizer Service requires a container when gridOption.autoResize.resizeDetection="container"\n You can fix this by setting your gridOption.autoResize.container');this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this.resizeObserverCallback()))),this._resizeObserver.observe(this._pageContainerElm[0])}else{if(void 0===this._gridDomElm||void 0===this._gridDomElm.offset())return null;this.resizeGrid().then((()=>this.resizeGridWhenStylingIsBrokenUntilCorrected())).catch((e=>console.log("Error:",e))),this.resizeGrid(10,e),$(window).on(`resize.grid${this.gridUidSelector}`,this.handleResizeGrid.bind(this,e))}}handleResizeGrid(e){this.pubSubService.publish("onGridBeforeResize"),this._resizePaused||(this.resizeGrid(0,e),this.resizeGrid(0,e))}resizeObserverCallback(){this._resizePaused||this.resizeGrid()}calculateGridNewDimensions(e){var t,i,n,o,s,r;const l=null!==(t=null==e?void 0:e.autoResize)&&void 0!==t?t:{};if(!window||void 0===this._pageContainerElm||void 0===this._gridDomElm.offset())return null;let a=void 0!==(null==l?void 0:l.bottomPadding)?l.bottomPadding:20;if(a&&e.enablePagination&&(a+=35),a&&e.showCustomFooter){const e=null!==(o=null===(n=null===(i=this.gridOptions)||void 0===i?void 0:i.customFooterOptions)||void 0===n?void 0:n.footerHeight)&&void 0!==o?o:25;a+=parseInt(`${e}`,10)}let d=0,u=0;if("container"===l.calculateAvailableSizeBy)d=this._pageContainerElm.height()||0;else{d=window.innerHeight||0;const e=this._gridDomElm.offset();u=void 0!==e?e.top:0}const c=d-u-a,h=this._pageContainerElm.width()||window.innerWidth||0,p=null==l?void 0:l.maxHeight,m=null!==(s=null==l?void 0:l.minHeight)&&void 0!==s?s:180,f=null==l?void 0:l.maxWidth,g=null!==(r=null==l?void 0:l.minWidth)&&void 0!==r?r:300;let v=c,_=(null==l?void 0:l.rightPadding)?h-l.rightPadding:h;return v<m&&(v=m),p&&v>p&&(v=p),_<g&&(_=g),f&&_>f&&(_=f),{height:this._fixedHeight||v,width:this._fixedWidth||_}}getLastResizeDimensions(){return this._lastDimensions}pauseResizer(e){this._resizePaused=e}resizeGrid(e,t){return new Promise((i=>{(e=e||0)>0?(clearTimeout(this._timer),this._timer=setTimeout((()=>i(this.resizeGridCallback(t))),e)):i(this.resizeGridCallback(t))}))}resizeGridCallback(e){var t,i;const n=this.resizeGridWithDimensions(e);return this.pubSubService.publish("onGridAfterResize",n),!this.gridOptions.enableAutoResizeColumnsByCellContent||(null===(t=this._lastDimensions)||void 0===t?void 0:t.width)&&(null==n?void 0:n.width)===(null===(i=this._lastDimensions)||void 0===i?void 0:i.width)||this.resizeColumnsByCellContent(!1),this._lastDimensions=n,n}resizeGridWithDimensions(e){var t,i,n,o;const s=this.calculateGridNewDimensions(this.gridOptions);if((e||s)&&this._gridDomElm.length>0){const r=(null==e?void 0:e.height)?e.height:null==s?void 0:s.height,l=(null==e?void 0:e.width)?e.width:null==s?void 0:s.width;this.gridOptions.autoHeight||(this._gridDomElm.height(r),this._gridContainerElm.height(r)),this._gridDomElm.width(l),this._gridContainerElm.width(l),null===new RegExp("MSIE [6-8]").exec(navigator.userAgent)&&(null===(t=this._grid)||void 0===t?void 0:t.resizeCanvas)&&$(this._gridContainerElm)&&this._grid.resizeCanvas(),(null===(i=this.gridOptions)||void 0===i?void 0:i.enableAutoSizeColumns)&&this._grid.autosizeColumns?this.gridUid&&$(`${this.gridUidSelector}`).length>0&&this._grid.autosizeColumns():!this.gridOptions.enableAutoResizeColumnsByCellContent||(null===(n=this._lastDimensions)||void 0===n?void 0:n.width)&&l===(null===(o=this._lastDimensions)||void 0===o?void 0:o.width)||this.resizeColumnsByCellContent(!1),this._lastDimensions={height:r||0,width:l||0}}return this._lastDimensions}requestStopOfAutoFixResizeGrid(e=!0){this._isStopResizeIntervalRequested=e}resizeColumnsByCellContent(e=!1){var t,i,n,o,s,r,l;const a=this._grid.getColumns(),d=this.dataView.getItems(),u={};let c=!1,h=0;const p=null!==(i=null===(t=this._gridParentContainerElm)||void 0===t?void 0:t.offsetWidth)&&void 0!==i?i:0;if(!e&&this._totalColumnsWidthByContent>0&&this._totalColumnsWidthByContent<p)return void this._grid.autosizeColumns();if(!Array.isArray(d)||0===d.length||this._hasResizedByContentAtLeastOnce&&(null===(n=this.gridOptions)||void 0===n?void 0:n.resizeByContentOnlyOnFirstLoad)&&!e)return;if(this.pubSubService.publish("onBeforeResizeByContent",void 0,0),0===this._totalColumnsWidthByContent||e){for(const e of a)u[e.id]=null!==(s=null!==(o=e.originalWidth)&&void 0!==o?o:e.minWidth)&&void 0!==s?s:0;h=this.calculateCellWidthByReadingDataset(a,u,this.resizeByContentOptions.maxItemToInspectCellContentWidth);let e=0;for(const t of a){const i=null!==(l=null!==(r=t.resizeAlwaysRecalculateWidth)&&void 0!==r?r:this.resizeByContentOptions.alwaysRecalculateColumnWidth)&&void 0!==l&&l;t.originalWidth&&!i?t.width=t.originalWidth:void 0!==u[t.id]&&(t.rerenderOnResize&&(c=!0),this.applyNewCalculatedColumnWidthByReference(t,u[t.id])),e+=t.width||0,this._totalColumnsWidthByContent=e}}this._grid.setColumns(a),this._hasResizedByContentAtLeastOnce=!0;const m={};for(const e of a)m[e.id]=e.width;this._totalColumnsWidthByContent>p?this._grid.reRenderColumns(c):this._grid.autosizeColumns(),this.pubSubService.publish("onAfterResizeByContent",{readItemCount:h,calculateColumnWidths:m})}calculateCellWidthByReadingDataset(e,t,i=1e3,n){const o=Array.isArray(e)?e:[e],s=this.dataView.getItems();let r=0;for(const[e,l]of s.entries()){if(e>i)break;Array.isArray(o)&&"object"==typeof t&&o.forEach(((i,o)=>{const s=this.calculateCellWidthByContent(l,i,e,null!=n?n:o,t[i.id]);void 0!==s&&(t[i.id]=s)})),r=e+1}return r}calculateCellWidthByContent(e,t,i,n,o){var s,r;const l=null!==(s=this.resizeByContentOptions.cellCharWidthInPx)&&void 0!==s?s:7;if(!t.originalWidth){const s=null!==(r=null==t?void 0:t.resizeCharWidthInPx)&&void 0!==r?r:l,a=lt(Hi(null==t?void 0:t.formatter,i,n,t,e,this._grid)),d=Math.ceil(a.length*s),u=t.resizeMaxWidthThreshold;t&&(void 0===o||d>o)&&(o=void 0!==u&&d>u?u:void 0!==t.maxWidth&&d>t.maxWidth?t.maxWidth:d)}return o}applyNewCalculatedColumnWidthByReference(e,t){var i,n,o,s,r,l,a;const d=null!==(i=this.resizeByContentOptions.cellPaddingWidthInPx)&&void 0!==i?i:6,u=null!==(n=this.resizeByContentOptions.formatterPaddingWidthInPx)&&void 0!==n?n:6,c=null!==(r=null!==(s=null===(o=null==e?void 0:e.filter)||void 0===o?void 0:o.type)&&void 0!==s?s:null==e?void 0:e.type)&&void 0!==r?r:fe.string;let h=t;const p=null!==(a=null!==(l=null==e?void 0:e.resizeCalcWidthRatio)&&void 0!==l?l:this.resizeByContentOptions.defaultRatioForStringType)&&void 0!==a?a:.9;h*="string"===c?p:1,h+=d,e.resizeExtraWidthPadding&&(h+=e.resizeExtraWidthPadding),e.editor&&this.gridOptions.editable&&(h+=u),void 0!==e.maxWidth&&h>e.maxWidth&&(h=e.maxWidth),void 0!==e.resizeMaxWidthThreshold&&h>e.resizeMaxWidthThreshold&&(h=e.resizeMaxWidthThreshold),h=Math.ceil(h),void 0!==e.originalWidth&&!0!==e.resizeAlwaysRecalculateWidth&&!0!==this.resizeByContentOptions.alwaysRecalculateColumnWidth||(e.width=this.readjustNewColumnWidthWhenOverLimit(e,h))}handleSingleColumnResizeByContent(e){var t,i,n;const o=this._grid.getColumns(),s=o.findIndex((t=>t.id===e));if(s>=0){const r=o[s],l={[e]:null!==(i=null!==(t=r.originalWidth)&&void 0!==t?t:r.minWidth)&&void 0!==i?i:0};r.originalWidth=void 0,this.calculateCellWidthByReadingDataset(r,l,this.resizeByContentOptions.maxItemToInspectSingleColumnWidthByContent,s),this.applyNewCalculatedColumnWidthByReference(r,l[e]),this._grid.reRenderColumns(null!==(n=null==r?void 0:r.rerenderOnResize)&&void 0!==n&&n)}}readjustNewColumnWidthWhenOverLimit(e,t){var i,n,o,s,r,l,a,d;const u=null!==(i=this.gridOptions.frozenColumn)&&void 0!==i?i:-1,c=null!==(n=this._grid.getColumns().findIndex((t=>t.id===e.id)))&&void 0!==n?n:0;let h=t;if(u>=0&&c<=u){const i=Array.from(this._grid.getViewports());if(i){const n=null!==(s=null===(o=i.find((e=>e.classList.contains("slick-viewport-left"))))||void 0===o?void 0:o.clientWidth)&&void 0!==s?s:0,u=null!==(l=null===(r=i.find((e=>e.classList.contains("slick-viewport-right"))))||void 0===r?void 0:r.clientWidth)&&void 0!==l?l:0,c=n+u,p=n-(null!==(a=e.width)&&void 0!==a?a:0);p+t>c&&(h=n-p+u-(null!==(d=this.resizeByContentOptions.widthToRemoveFromExceededWidthReadjustment)&&void 0!==d?d:50))}}return Math.ceil(h)}checkIsGridShown(){var e,t;return!(null===(t=null===(e=document.querySelector(`${this.gridUidSelector}`))||void 0===e?void 0:e.offsetParent)||void 0===t||!t)}resizeGridWhenStylingIsBrokenUntilCorrected(){var e,t,i,n;const o=null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.autoFixResizeTimeout)&&void 0!==t?t:18e3,s=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.autoFixResizeRequiredGoodCount)&&void 0!==n?n:5,r=this._gridParentContainerElm.querySelector(`${this.gridUidSelector} .slick-header`),l=this._gridParentContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);let a=0,d=0;if(r&&l&&this.gridOptions.autoFixResizeWhenBrokenStyleDetected){const e=this.dataView.getItemCount(),t=this._grid.getColumns()||[];this._intervalId=setInterval((async()=>{var i,n,u,c,h,p;const m=gt(r);let f=null!==(i=null==m?void 0:m.top)&&void 0!==i?i:0;this.gridOptions&&this.gridOptions.enableFiltering&&this.gridOptions.headerRowHeight&&(f+=this.gridOptions.headerRowHeight),this.gridOptions&&this.gridOptions.createPreHeaderPanel&&this.gridOptions.showPreHeaderPanel&&this.gridOptions.preHeaderPanelHeight&&(f+=this.gridOptions.preHeaderPanelHeight),f+=44;const g=gt(l),v=null!==(n=null==g?void 0:g.top)&&void 0!==n?n:0,_=gt(this._gridParentContainerElm);let C=0===(null==m?void 0:m.top)||f-v>2||0===(null==_?void 0:_.left)&&0===(null==_?void 0:_.top);const b=null!==(p=null===(h=null===(c=(u=this._grid).getRenderedRange)||void 0===c?void 0:c.call(u))||void 0===h?void 0:h.rightPx)&&void 0!==p?p:0;!C&&e>0&&0===b&&t.length>1&&(C=!0),this._isStopResizeIntervalRequested&&(C=!1,a=o),this.checkIsGridShown()&&(C||0===(null==_?void 0:_.left)||0===(null==_?void 0:_.top))&&(await this.resizeGrid(),this.checkIsGridShown()&&(C=!1)),this.checkIsGridShown()&&d++,this.checkIsGridShown()&&!C&&(d>=s||a++>=o)&&clearInterval(this._intervalId)}),this.intervalRetryDelay)}}}class zi{constructor(){this._hasColumnsReordered=!1,this._hideHeaderRowAfterPageLoad=!1}get allColumns(){return this._allColumns}set allColumns(e){this._allColumns=e}get columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}get currentPagination(){return this._currentPagination}set currentPagination(e){this._currentPagination=e}get dataView(){return this._dataView}set dataView(e){this._dataView=e}get frozenVisibleColumnId(){return this._frozenVisibleColumnId}set frozenVisibleColumnId(e){this._frozenVisibleColumnId=e}get hasColumnsReordered(){return this._hasColumnsReordered}set hasColumnsReordered(e){this._hasColumnsReordered=e}get slickGrid(){return this._grid}set slickGrid(e){this._grid=e}get gridOptions(){var e;return this._gridOptions||(null===(e=this._grid)||void 0===e?void 0:e.getOptions)&&this._grid.getOptions()||{}}set gridOptions(e){this._gridOptions=e}get groupItemMetadataProvider(){return this._groupItemMetadataProvider}set groupItemMetadataProvider(e){this._groupItemMetadataProvider=e}get hideHeaderRowAfterPageLoad(){return this._hideHeaderRowAfterPageLoad}set hideHeaderRowAfterPageLoad(e){this._hideHeaderRowAfterPageLoad=e}get externalRegisteredResources(){return this._externalRegisteredResources}set externalRegisteredResources(e){this._externalRegisteredResources=e}get visibleColumns(){return this._visibleColumns}set visibleColumns(e){this._visibleColumns=e}get hierarchicalDataset(){return this._hierarchicalDataset}set hierarchicalDataset(e){this._hierarchicalDataset=e}}class Bi{constructor(e,t,i,n){this.sharedService=e,this.pubSubService=t,this.backendUtilities=i,this.rxjs=n,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 e,t;(null===(e=this._eventHandler)||void 0===e?void 0:e.unsubscribeAll)&&this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&(null===(t=this.rxjs)||void 0===t?void 0:t.isObservable(this.httpCancelRequests$))&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete())}addRxJsResource(e){this.rxjs=e}bindBackendOnSort(e){var t,i;this._isBackendGrid=!0,this._grid=e,this._dataView=null!==(i=null===(t=null==e?void 0:e.getData)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{};const n=e.onSort;this._eventHandler.subscribe(n,this.onBackendSortChanged.bind(this))}bindLocalOnSort(e){this._isBackendGrid=!1,this._grid=e,this._dataView=e.getData(),this.processTreeDataInitialSort();const t=e.onSort;this._eventHandler.subscribe(t,this.handleLocalOnSort.bind(this))}handleLocalOnSort(e,t){const i=t.multiColumnSort?t.sortCols:new Array({columnId:t.sortCol.id,sortAsc:t.sortAsc,sortCol:t.sortCol});this._currentLocalSorters=[],Array.isArray(i)&&i.forEach((e=>{e.sortCol&&this._currentLocalSorters.push({columnId:e.sortCol.id,direction:e.sortAsc?we.ASC:we.DESC})})),this.onLocalSortChanged(this._grid,i),this.emitSortChanged(r.local)}clearSortByColumnId(e,t){var i,n;const o=this.getCurrentColumnSorts(),s=this.getCurrentColumnSorts(`${t}`);if(Array.isArray(o)&&Array.isArray(s)&&o.length!==s.length){if(this._gridOptions.backendServiceApi)this.onBackendSortChanged(e,{multiColumnSort:!0,sortCols:s,grid:this._grid});else if(this._dataView)this.onLocalSortChanged(this._grid,s,!0,!0);else{const e=null!==(n=null===(i=this._gridOptions)||void 0===i?void 0:i.multiColumnSort)&&void 0!==n&&n?s:s[0];this._grid.onSort.notify(e)}const t=s.map((e=>({columnId:e&&e.sortCol&&e.sortCol.id,sortAsc:e&&e.sortAsc,sortCol:e&&e.sortCol})));this._grid.setSortColumns(t)}Array.isArray(s)&&0===s.length&&this.sortLocalGridByDefaultSortFieldId()}clearSorting(e=!0){var t,i;if(this._grid&&this._gridOptions&&this._dataView)if(this._grid.setSortColumns([]),e)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 e=null===(i=null===(t=this._gridOptions)||void 0===t?void 0:t.backendServiceApi)||void 0===i?void 0:i.service;(null==e?void 0:e.clearSorters)&&e.clearSorters()}this._currentLocalSorters=[],this.pubSubService.publish("onSortCleared",!0)}disableSortFunctionality(e=!0,t=!0){const i=!this._gridOptions.enableSorting;let n;if(this._gridOptions.enableSorting=i,e)t&&this.clearSorting(),this._eventHandler.unsubscribeAll(),n=this.disableAllSortingCommands(!0);else{n=this.disableAllSortingCommands(!1);const e=this._grid.onSort;this._eventHandler.subscribe(e,((e,t)=>this.handleLocalOnSort(e,t)))}this._grid.setOptions({enableSorting:this._gridOptions.enableSorting},!1,!0),this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(n)}toggleSortFunctionality(e=!0){const t=this._gridOptions.enableSorting;this.disableSortFunctionality(t,e)}emitSortChanged(e,t){var i;if(e===r.remote&&(null===(i=this._gridOptions)||void 0===i?void 0:i.backendServiceApi)){let e=[];const t=this._gridOptions.backendServiceApi.service;(null==t?void 0:t.getCurrentSorters)&&(e=t.getCurrentSorters()),this.pubSubService.publish("onSortChanged",e)}else e===r.local&&(t&&(this._currentLocalSorters=t),this.pubSubService.publish("onSortChanged",this.getCurrentLocalSorters()))}getCurrentLocalSorters(){return this._currentLocalSorters}getCurrentColumnSorts(e){if(this._grid){const t=this._grid.getSortColumns();if(Array.isArray(t))return t.reduce(((t,i)=>(!i||e&&i.columnId===e||t.push({columnId:i.columnId||"",sortCol:this._columnDefinitions[this._grid.getColumnIndex(i.columnId||"")],sortAsc:i.sortAsc}),t)),[])}return[]}loadGridSorters(e){this._currentLocalSorters=[];const t=[];return Array.isArray(e)&&((this._gridOptions.multiColumnSort?e:e.slice(0,1)).forEach((e=>{const i=this._columnDefinitions.find((t=>t.id===e.columnId));i&&(t.push({columnId:i.id,sortAsc:e.direction.toUpperCase()===we.ASC,sortCol:i}),this._currentLocalSorters.push({columnId:i.id+"",direction:e.direction.toUpperCase()}))})),this.onLocalSortChanged(this._grid,t),this._grid.setSortColumns(t.map((e=>({columnId:e.columnId,sortAsc:e.sortAsc}))))),t}processTreeDataInitialSort(){var e,t,i;if((null===(e=this._gridOptions)||void 0===e?void 0:e.enableTreeData)&&this._gridOptions.treeDataOptions){const e=this._gridOptions.treeDataOptions,n=this._columnDefinitions.find((t=>t.id===e.columnId));if(n){let o=we.ASC,s={columnId:e.columnId,sortCol:n,sortAsc:!0};if(null===(t=null==e?void 0:e.initialSort)||void 0===t?void 0:t.columnId){const t=e.initialSort.columnId,i=this._columnDefinitions.find((e=>e.id===t));o=(e.initialSort.direction||we.ASC).toUpperCase(),s={columnId:t,sortCol:i,sortAsc:o===we.ASC}}(null==s?void 0:s.columnId)&&(null===(i=this.sharedService)||void 0===i?void 0:i.hierarchicalDataset)&&this.updateSorting([{columnId:s.columnId||"",direction:o}])}}}onBackendSortChanged(e,t){var i,n;if(!t||!t.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=t.grid&&t.grid.getOptions?t.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 r=new Date;s.preProcess&&s.preProcess();const l=s.service.processOnSortChanged(e,t),a=(null===(i=null==o?void 0:o.pagination)||void 0===i?void 0:i.totalItems)||0;null===(n=this.backendUtilities)||void 0===n||n.executeBackendCallback(s,l,t,r,a,{emitActionChangedCallback:this.emitSortChanged.bind(this),errorCallback:()=>{var e,i,n;this._grid.setSortColumns(t.previousSortColumns||[]);const o=null===(e=t.previousSortColumns)||void 0===e?void 0:e.map((e=>({columnId:e.columnId,sortAsc:e.sortAsc,sortCol:this._columnDefinitions.find((t=>t.id===e.columnId))})));null===(n=null===(i=null==s?void 0:s.service)||void 0===i?void 0:i.updateSorters)||void 0===n||n.call(i,o||[])},httpCancelRequestSubject:this.httpCancelRequests$})}async onLocalSortChanged(e,t,i=!1,n=!1){var o,s,l,a,d;const u=null!==(s=null===(o=this._gridOptions)||void 0===o?void 0:o.datasetIdPropertyName)&&void 0!==s?s:"id",c=null!==(a=null===(l=this._gridOptions)||void 0===l?void 0:l.enableTreeData)&&void 0!==a&&a,h=null===(d=e.getData)||void 0===d?void 0:d.call(e);if(await this.pubSubService.publish("onBeforeSortChange",{sortColumns:t},0),e&&h){if(i&&!c&&h.reSort(),c&&this.sharedService&&Array.isArray(this.sharedService.hierarchicalDataset)){const e=this.sortHierarchicalDataset(this.sharedService.hierarchicalDataset,t);this._dataView.setItems(e.flat,u),this._dataView.onRowCountChanged.notify({previous:this._dataView.getFilteredItemCount(),current:this._dataView.getLength(),itemCount:this._dataView.getItemCount(),dataView:this._dataView,callingOnRowsChanged:!0})}else h.sort(this.sortComparers.bind(this,t));e.invalidate(),n&&this.emitSortChanged(r.local,t.map((e=>{var t,i;return{columnId:null!==(i=null===(t=e.sortCol)||void 0===t?void 0:t.id)&&void 0!==i?i:"id",direction:e.sortAsc?we.ASC:we.DESC}})))}}sortHierarchicalDataset(e,t,i=!1){var n,o,s,l,a,d;this.sortTreeData(e,t);const u=null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.datasetIdPropertyName)&&void 0!==o?o:"id",c=null!==(l=null===(s=this._gridOptions)||void 0===s?void 0:s.treeDataOptions)&&void 0!==l?l:{columnId:""},h=Me(e,{...c,identifierPropName:null!==(a=c.identifierPropName)&&void 0!==a?a:u,shouldAddTreeLevelNumber:!0});if(i){this._currentLocalSorters=[];for(const e of t)this._currentLocalSorters.push({columnId:e.columnId,direction:e.sortAsc?"ASC":"DESC"});const e=(null===(d=this._gridOptions)||void 0===d?void 0:d.backendServiceApi)?r.remote:r.local;this.emitSortChanged(e)}return{hierarchical:e,flat:h}}sortLocalGridByDefaultSortFieldId(){const e=this._gridOptions&&this._gridOptions.defaultColumnSortFieldId||this._gridOptions.datasetIdPropertyName||"id",t={id:e,field:e};this.onLocalSortChanged(this._grid,new Array({columnId:t.id,sortAsc:!0,sortCol:t,clearSortTriggered:!0}),!1,!0)}sortComparers(e,t,i){if(Array.isArray(e))for(const n of e){const e=this.sortComparer(n,t,i);if(void 0!==e)return e}return Se.neutral}sortComparer(e,t,i,n){if(null==e?void 0:e.sortCol){const o=e.sortCol,s=e.sortAsc?Se.asc:Se.desc;let r=n||o.queryFieldSorter||o.queryField||o.field,l=r;const a=o.type||fe.string;"function"==typeof o.queryFieldNameGetterFn&&(r=o.queryFieldNameGetterFn(t),l=o.queryFieldNameGetterFn(i));let d=t[r],u=i[l];if(r&&r.indexOf(".")>=0&&(d=Ke(t,r)),l&&l.indexOf(".")>=0&&(u=Ke(i,l)),o.sortComparer){const e=o.sortComparer(d,u,s,o,this._gridOptions);if(e!==Se.neutral)return e}else{const e=xt(a,d,u,s,o,this._gridOptions);if(e!==Se.neutral)return e}}}sortTreeData(e,t){if(Array.isArray(t))for(const i of t)this.sortTreeChildren(e,i,0)}sortTreeChildren(e,t,i){var n,o;const s=null===(n=this._gridOptions)||void 0===n?void 0:n.treeDataOptions,r=null!==(o=null==s?void 0:s.childrenPropName)&&void 0!==o?o:"children";e.sort(((e,i)=>{var n;return null!==(n=this.sortComparer(t,e,i))&&void 0!==n?n:Se.neutral}));for(const n of e)n&&n.hasOwnProperty(r)&&Array.isArray(n[r])&&(i++,this.sortTreeChildren(n[r],t,i),i--)}updateSorting(e,t=!0,i=!0){var n,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(e)){const s=null===(n=this._gridOptions)||void 0===n?void 0:n.backendServiceApi;if(s){const t=null==s?void 0:s.service;(null==t?void 0:t.updateSorters)&&(t.updateSorters(void 0,e),i&&(null===(o=this.backendUtilities)||void 0===o||o.refreshBackendDataset(this._gridOptions)))}else this.loadGridSorters(e);if(t){const e=s?r.remote:r.local;this.emitSortChanged(e)}}}disableAllSortingCommands(e=!0){var t,i;const n=this._grid.getColumns();return n.forEach((t=>{var i;void 0!==typeof t.sortable&&(t.sortable=!e),(null===(i=null==t?void 0:t.header)||void 0===i?void 0:i.menu)&&t.header.menu.items.forEach((t=>{if(t&&"string"!=typeof t){const i=t.command;"sort-asc"!==i&&"sort-desc"!==i&&"clear-sort"!==i||(t.hidden=e)}}))})),(null===(i=null===(t=this._gridOptions)||void 0===t?void 0:t.gridMenu)||void 0===i?void 0:i.customItems)&&this._gridOptions.gridMenu.customItems.forEach((t=>{t&&"string"!=typeof t&&"clear-sorting"===t.command&&(t.hidden=e)})),n}}class Wi{constructor(e,t,i){this.pubSubService=e,this.sharedService=t,this.sortService=i,this._isLastFullToggleCollapsed=!1,this._currentToggledItems=[],this._subscriptions=[],this._eventHandler=new Slick.EventHandler}set currentToggledItems(e){this._currentToggledItems=e}get dataset(){var e;return null===(e=this.dataView)||void 0===e?void 0:e.getItems()}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}get dataView(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getData)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get eventHandler(){return this._eventHandler}get gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this._grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get treeDataOptions(){return this.gridOptions.treeDataOptions}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}init(e){var t,i,n,o,s,r,l,a,d,u,c;if(this._grid=e,this._isLastFullToggleCollapsed=null!==(n=null===(i=null===(t=this.gridOptions)||void 0===t?void 0:t.treeDataOptions)||void 0===i?void 0:i.initiallyCollapsed)&&void 0!==n&&n,this._currentToggledItems=null!==(r=null===(s=null===(o=this.gridOptions.presets)||void 0===o?void 0:o.treeData)||void 0===s?void 0:s.toggledItems)&&void 0!==r?r:[],this._lastToggleStateChange={type:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},null===(l=this.gridOptions)||void 0===l?void 0:l.enableTreeData){if(null===(a=this.gridOptions)||void 0===a?void 0:a.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(!(null===(d=this.gridOptions)||void 0===d?void 0:d.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((null===(u=this.gridOptions)||void 0===u?void 0:u.backendServiceApi)||(null===(c=this.gridOptions)||void 0===c?void 0:c.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.')}const h=e.onClick;h&&this._eventHandler.subscribe(h,this.handleOnCellClick.bind(this)),this._subscriptions.push(this.pubSubService.subscribe("onGridMenuClearAllSorting",this.clearSorting.bind(this)))}applyToggledItemStateChanges(e,t,i=!0,n=!1){if(Array.isArray(e)){const o=this.getTreeDataOptionPropName("collapsedPropName"),s=this.getTreeDataOptionPropName("hasChildrenPropName");this.dataView.beginUpdate(!0);const r="full-collapse"===(null!=t?t:this._lastToggleStateChange.previousFullToggleType);t&&(this._lastToggleStateChange.previousFullToggleType=t),i&&(this.dataView.getItems()||[]).forEach((e=>{e[s]&&(e[o]=r)})),this.dynamicallyToggleItemState(e,n)}}dynamicallyToggleItemState(e,t=!0){if(Array.isArray(e)){this.dataView.beginUpdate(!0);for(const i of e){const e=this.dataView.getItemById(i.itemId);if(this.updateToggledItem(e,i.isCollapsed),t){const e=this._currentToggledItems.findIndex((e=>e.itemId===i.itemId));e>=0?this._currentToggledItems[e].isCollapsed=i.isCollapsed:this._currentToggledItems.push({itemId:i.itemId,isCollapsed:i.isCollapsed}),this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:i.itemId,toggledItems:this._currentToggledItems,type:i.isCollapsed?Ee.toggleCollapse:Ee.toggleExpand})}}this.dataView.endUpdate(),this.dataView.refresh()}}getCurrentToggleState(){return this._lastToggleStateChange}getInitialSort(e,t){var i,n,o;const s=null==t?void 0:t.treeDataOptions,r=null!==(i=null==s?void 0:s.initialSort)&&void 0!==i?i:{columnId:null!==(n=null==s?void 0:s.columnId)&&void 0!==n?n:"",direction:"ASC"},l=e.find((e=>e.id===r.columnId));return{columnId:r.columnId,sortAsc:"DESC"!==(null===(o=null==r?void 0:r.direction)||void 0===o?void 0:o.toUpperCase()),sortCol:l}}getItemCount(e){if(void 0!==e){const t=this.getTreeDataOptionPropName("levelPropName");return this.dataView.getItems().filter((i=>i[t]===e)).length}return this.dataView.getItemCount()}getToggledItems(){return this._currentToggledItems}getTreeDataOptionPropName(e){var t,i,n,o,s,r,l,a,d,u,c,h,p,m;let f="";switch(e){case"childrenPropName":f=null!==(i=null===(t=this.treeDataOptions)||void 0===t?void 0:t.childrenPropName)&&void 0!==i?i:me.treeDataProperties.CHILDREN_PROP;break;case"collapsedPropName":f=null!==(o=null===(n=this.treeDataOptions)||void 0===n?void 0:n.collapsedPropName)&&void 0!==o?o:me.treeDataProperties.COLLAPSED_PROP;break;case"hasChildrenPropName":f=null!==(r=null===(s=this.treeDataOptions)||void 0===s?void 0:s.hasChildrenPropName)&&void 0!==r?r:me.treeDataProperties.HAS_CHILDREN_PROP;break;case"identifierPropName":f=null!==(u=null!==(a=null===(l=this.treeDataOptions)||void 0===l?void 0:l.identifierPropName)&&void 0!==a?a:null===(d=this.gridOptions)||void 0===d?void 0:d.datasetIdPropertyName)&&void 0!==u?u:"id";break;case"levelPropName":f=null!==(h=null===(c=this.treeDataOptions)||void 0===c?void 0:c.levelPropName)&&void 0!==h?h:me.treeDataProperties.TREE_LEVEL_PROP;break;case"parentPropName":f=null!==(m=null===(p=this.treeDataOptions)||void 0===p?void 0:p.parentPropName)&&void 0!==m?m:me.treeDataProperties.PARENT_PROP}return f}clearSorting(){const e=this.getInitialSort(this.sharedService.columnDefinitions,this.sharedService.gridOptions);this.sortService.loadGridSorters([{columnId:e.columnId,direction:e.sortAsc?"ASC":"DESC"}])}convertFlatParentChildToTreeDatasetAndSort(e,t,i){var n;const o=this.convertFlatParentChildToTreeDataset(e,i),s=this.getInitialSort(t,i),r=this.sortService.sortHierarchicalDataset(o,[s],!0);return null===(n=this._grid)||void 0===n||n.setSortColumns([s]),r}convertFlatParentChildToTreeDataset(e,t){var i,n,o;const s=null!==(i=null==t?void 0:t.datasetIdPropertyName)&&void 0!==i?i:"id",r=null!==(n=null==t?void 0:t.treeDataOptions)&&void 0!==n?n:{columnId:"id"};return Fe(e,{...r,identifierPropName:null!==(o=r.identifierPropName)&&void 0!==o?o:s,initiallyCollapsed:this._isLastFullToggleCollapsed})}sortHierarchicalDataset(e,t){const i=null!=t?t:this.getInitialSort(this.sharedService.allColumns,this.gridOptions),n=Array.isArray(i)?i:[i];return this.sortService.sortHierarchicalDataset(e,n)}async toggleTreeDataCollapse(e,t=!0){var i;if(null===(i=this.gridOptions)||void 0===i?void 0:i.enableTreeData){const i=this.getTreeDataOptionPropName("hasChildrenPropName");t&&await this.pubSubService.publish("onTreeFullToggleStart",{collapsing:e}),this.dataView.beginUpdate(!0),(this.dataView.getItems()||[]).forEach((t=>{t[i]&&this.updateToggledItem(t,e)})),this.dataView.endUpdate(),this.dataView.refresh(),this._isLastFullToggleCollapsed=e}const n=e?Ee.fullCollapse:Ee.fullExpand;this._lastToggleStateChange={type:n,previousFullToggleType:n,toggledItems:null},t&&this.pubSubService.publish("onTreeFullToggleEnd",this._lastToggleStateChange)}handleOnCellClick(e,t){var i;if(e&&t){const n=e.target||{},o=null!==(i=this.gridOptions.datasetIdPropertyName)&&void 0!==i?i:"id",s=this.getTreeDataOptionPropName("collapsedPropName"),r=this.getTreeDataOptionPropName("childrenPropName");if((null==n?void 0:n.className)&&n.className.indexOf("toggle")>=0){const i=this.dataView.getItem(t.row);if(i){i[s]=!i[s];const e=i[s],t=i[o],n=this._currentToggledItems.findIndex((e=>e.itemId===t));n>=0?this._currentToggledItems[n].isCollapsed=e:this._currentToggledItems.push({itemId:t,isCollapsed:e}),this.dataView.updateItem(t,i);const l=e=>e[o]===t,a=Ve(this.sharedService.hierarchicalDataset||[],l,r);a&&(a[s]=e),this._grid.invalidate(),this._lastToggleStateChange={type:e?Ee.toggleCollapse:Ee.toggleExpand,previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:t})}e.stopImmediatePropagation()}}}updateToggledItem(e,t){var i,n;const o=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.datasetIdPropertyName)&&void 0!==n?n:"id",s=this.getTreeDataOptionPropName("childrenPropName"),r=this.getTreeDataOptionPropName("collapsedPropName");if(e){e[r]=t,this.dataView.updateItem(e[o],e);const i=t=>t[o]===e[o],n=Ve(this.sharedService.hierarchicalDataset||[],i,s);n&&(n[r]=t)}}}class Gi{constructor(){this._clearFilterTriggered=!1,this._debounceTypingDelay=0,this._shouldTriggerQuery=!0,this._inputType="text",this.searchTerms=[],this._bindEventService=new oi}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get defaultOperator(){return ye.empty}get inputType(){return this._inputType}set inputType(e){this._inputType=e}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}init(e){var t,i,n,o,s;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[];const r=null===(t=this.gridOptions)||void 0===t?void 0:t.backendServiceApi;this._debounceTypingDelay=null!==(s=r?null!==(i=null==r?void 0:r.filterTypingDebounce)&&void 0!==i?i:null===(n=this.gridOptions)||void 0===n?void 0:n.defaultBackendServiceFilterTypingDebounce:null===(o=this.gridOptions)||void 0===o?void 0:o.filterTypingDebounce)&&void 0!==s?s:0;const l=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._filterElm=this.createDomElement(l),this._bindEventService.bind(this._filterElm,["keyup","blur","change","wheel"],this.handleInputChange.bind(this))}clear(e=!0){this._filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this._filterElm.value="",this._filterElm.classList.remove("filled"),this._filterElm.dispatchEvent(new Event("change")))}destroy(){var e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this._filterElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}getValues(){return this._filterElm.value}setValues(e,t){const i=Array.isArray(e)?e:[e];let n="";for(const e of i)n=t?this.addOptionalOperatorIntoSearchString(e,t):e,this._filterElm.value=`${null!=n?n:""}`;""!==this.getValues()?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),this.operator=t||this.defaultOperator}addOptionalOperatorIntoSearchString(e,t){let i="",n="",o=null==e?"":`${e}`;if(t&&o){switch(t){case"<>":case"!=":case"=":case"==":case">":case">=":case"<":case"<=":i=t;break;case"EndsWith":case"*z":i="*";break;case"StartsWith":case"a*":n="*"}o=`${i}${o}${n}`}return o}createDomElement(e){var t,i,n,o,s,r,l;const a=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",d=this.grid.getHeaderRowColumn(a);Le(d);let u=null!==(o=null===(n=this.gridOptions)||void 0===n?void 0:n.defaultFilterPlaceholder)&&void 0!==o?o:"";(null===(s=this.columnFilter)||void 0===s?void 0:s.placeholder)&&(u=this.columnFilter.placeholder);const c=document.createElement("input");return c.type=this._inputType||"text",c.className=`form-control search-filter filter-${a}`,c.autocomplete="off",c.placeholder=u,c.setAttribute("aria-label",null!==(l=null===(r=this.columnFilter)||void 0===r?void 0:r.ariaLabel)&&void 0!==l?l:`${mt(a+"")} Search Filter`),c.setAttribute("role","presentation"),c.value=null!=e?e:"",c.dataset.columnid=`${a}`,e&&c.classList.add("filled"),d.appendChild(c),d.appendChild(document.createElement("span")),c}handleInputChange(e){var t,i,n,o;if(this._clearFilterTriggered)this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled");else{const s=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:"";let r=null!==(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.value)&&void 0!==n?n:"";const l=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof r&&l&&(r=r.trim()),""===r?this._filterElm.classList.remove("filled"):this._filterElm.classList.add("filled");const a={columnDef:this.columnDef,operator:this.operator,searchTerms:[r],shouldTriggerQuery:this._shouldTriggerQuery},d="keyup"===s&&"Enter"!==(null===(o=e)||void 0===o?void 0:o.key)?this._debounceTypingDelay:0;d>0?(clearTimeout(this._timer),this._timer=setTimeout((()=>this.callback(e,a)),d)):this.callback(e,a)}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}class Ui{constructor(e,t,i,n=!0){this.translaterService=e,this.collectionService=t,this.rxjs=i,this._isMultipleSelect=!0,this._collectionLength=0,this._shouldTriggerQuery=!0,this.isFilled=!1,this.enableTranslateLabel=!1,this.subscriptions=[],this._isMultipleSelect=n}get collectionOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)||void 0===t?void 0:t.collectionOptions)&&void 0!==i?i:{}}get columnFilter(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)&&void 0!==t?t:{}}get customStructure(){var e,t;return null===(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)||void 0===t?void 0:t.customStructure}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get defaultOperator(){return this.isMultipleSelect?ye.in:ye.equal}get isMultipleSelect(){return this._isMultipleSelect}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){var t,i,n;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],!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=this.columnFilter&&this.columnFilter.enableTranslateLabel||!1,this.labelName=this.customStructure&&this.customStructure.label||"label",this.labelPrefixName=this.customStructure&&this.customStructure.labelPrefix||"labelPrefix",this.labelSuffixName=this.customStructure&&this.customStructure.labelSuffix||"labelSuffix",this.optionLabel=this.customStructure&&this.customStructure.optionLabel||"value",this.valueName=this.customStructure&&this.customStructure.value||"value",this.enableTranslateLabel&&(!this.translaterService||"function"!=typeof this.translaterService.translate))throw new Error('[select-filter] The Translate Service is required for the Select Filter to work correctly when "enableTranslateLabel" is set.');this._locales=this.gridOptions&&this.gridOptions.locales||me.locales,this.initMultipleSelectTemplate();let o=this.gridOptions&&this.gridOptions.defaultFilterPlaceholder||"";this.columnFilter&&this.columnFilter.placeholder&&(o=this.columnFilter.placeholder),this.defaultOptions.placeholder=o||"",this._isMultipleSelect&&(null===(t=this.columnDef)||void 0===t?void 0:t.filter)&&(this.columnDef.filter.emptySearchTermReturnAllValues=null!==(n=null===(i=this.columnDef.filter)||void 0===i?void 0:i.emptySearchTermReturnAllValues)&&void 0!==n&&n);const s=this.columnFilter.collection||[];return this.renderDomElement(s),new Promise((async(e,t)=>{try{const t=this.columnFilter.collectionAsync;let i;t&&!this.columnFilter.collection?(i=At(t,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),e(i)):(i=s,e(s)),(t||this.columnFilter.enableCollectionWatch)&&(await(null!=i?i:t),this.watchCollectionChanges())}catch(e){t(e)}}))}clear(e=!0){this.$filterElm&&this.$filterElm.multipleSelect&&this._collectionLength>0&&(this.$filterElm.multipleSelect("setSelects",[]),this.$filterElm.removeClass("filled").siblings("div .search-filter").removeClass("filled"),this.searchTerms=[],this._shouldTriggerQuery=e,this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0)}destroy(){if(this.$filterElm&&"function"==typeof this.$filterElm.multipleSelect){this.$filterElm.multipleSelect("destroy"),this.$filterElm.remove();const e=this.elementName.toString().replace(".","\\.");$(`[name=${e}].ms-drop`).remove()}this.$filterElm=null,_t(this.subscriptions)}getValues(){return this.$filterElm&&"function"==typeof this.$filterElm.multipleSelect?this.$filterElm.multipleSelect("getSelects"):[]}setValues(e,t){e&&this.$filterElm&&"function"==typeof this.$filterElm.multipleSelect&&(e=Array.isArray(e)?e:[e],this.$filterElm.multipleSelect("setSelects",e)),this.getValues().length>0?this.$filterElm.addClass("filled"):this.$filterElm.removeClass("filled"),this.operator=t||this.defaultOperator}filterCollection(e){let t=e;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const e=this.columnFilter.collectionFilterBy,i=this.columnFilter.collectionOptions&&this.columnFilter.collectionOptions.filterResultAfterEachPass||null;t=this.collectionService.filterCollection(t,e,i)}return t}sortCollection(e){let t=e;if(this.columnFilter&&this.columnFilter.collectionSortBy){const e=this.columnFilter.collectionSortBy;t=this.collectionService.sortCollection(this.columnDef,t,e,this.enableTranslateLabel)}return t}watchCollectionChanges(){var e;(null===(e=this.columnFilter)||void 0===e?void 0:e.collection)&&(d(this.columnFilter.collection,(e=>{this.renderDomElement(this.columnFilter.collection||e||[])})),u(this.columnFilter,"collection",(e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&d(this.columnFilter.collection,(e=>{this.renderDomElement(this.columnFilter.collection||e||[])}))})))}renderDomElement(e){var t,i,n,o;if(!Array.isArray(e)&&(null===(t=this.collectionOptions)||void 0===t?void 0:t.collectionInsideObjectProperty)&&(e=Ke(e,this.collectionOptions.collectionInsideObjectProperty||"")),!Array.isArray(e))throw new Error('The "collection" passed to the Select Filter is not a valid array.');let s=[];e.length>0&&(s=[...e]),(null===(i=this.collectionOptions)||void 0===i?void 0:i.addBlankEntry)&&Array.isArray(s)&&s.length>0&&""!==s[0][this.valueName]&&s.unshift(this.createBlankEntry()),(null===(n=this.collectionOptions)||void 0===n?void 0:n.addCustomFirstEntry)&&Array.isArray(s)&&s.length>0&&s[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&s.unshift(this.collectionOptions.addCustomFirstEntry),(null===(o=this.collectionOptions)||void 0===o?void 0:o.addCustomLastEntry)&&Array.isArray(s)&&s.length>0&&s[s.length-1][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&s.push(this.collectionOptions.addCustomLastEntry);let r=s;r=this.filterCollection(r),r=this.sortCollection(r);const l=ui("filter",r,this.columnDef,this.grid,this.isMultipleSelect,this.translaterService,this.searchTerms||[]);this.isFilled=l.hasFoundSearchTerm,this.createDomElement(l.selectElement),this._collectionLength=r.length}createBlankEntry(){const e={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(e[this.labelPrefixName]=""),this.labelSuffixName&&(e[this.labelSuffixName]=""),e}createDomElement(e){var t,i;const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"";this.elementName=`filter-${n}`,this.defaultOptions.name=this.elementName;const o=this.grid.getHeaderRowColumn(n);if($(o).empty(),this.$filterElm=$(e),"function"!=typeof this.$filterElm.multipleSelect)throw new Error("multiple-select.js was not found, make sure to read the HOWTO Wiki on how to install it.");this.$filterElm.data("columnId",n),this.isFilled&&this.$filterElm.addClass("filled"),this.$filterElm&&"function"==typeof this.$filterElm.appendTo&&this.$filterElm.appendTo(o);const s=this.columnFilter?this.columnFilter.filterOptions:{};this.filterElmOptions={...this.defaultOptions,...s},this.$filterElm=this.$filterElm.multipleSelect(this.filterElmOptions)}initMultipleSelectTemplate(){var e,t,i,n,o,s,r,l;const a=this.gridOptions&&this.gridOptions.enableTranslate,d={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,container:"body",filter:!1,maxHeight:275,single:!0,textTemplate:e=>this.columnDef&&this.columnDef.filter&&this.columnDef.filter.enableRenderHtml?e.text():e.html(),onClose:()=>this.onTriggerEvent()};if(this._isMultipleSelect){d.single=!1,d.okButton=!0,d.addTitle=!0;const u=Qe(this.gridOptions);d.countSelected=a&&(null===(e=this.translaterService)||void 0===e?void 0:e.translate)?this.translaterService.translate(`${u}X_OF_Y_SELECTED`):null===(t=this._locales)||void 0===t?void 0:t.TEXT_X_OF_Y_SELECTED,d.allSelected=a&&(null===(i=this.translaterService)||void 0===i?void 0:i.translate)?this.translaterService.translate(`${u}ALL_SELECTED`):null===(n=this._locales)||void 0===n?void 0:n.TEXT_ALL_SELECTED,d.okButtonText=a&&(null===(o=this.translaterService)||void 0===o?void 0:o.translate)?this.translaterService.translate(`${u}OK`):null===(s=this._locales)||void 0===s?void 0:s.TEXT_OK,d.selectAllText=a&&(null===(r=this.translaterService)||void 0===r?void 0:r.translate)?this.translaterService.translate(`${u}SELECT_ALL`):null===(l=this._locales)||void 0===l?void 0:l.TEXT_SELECT_ALL,d.selectAllDelimiter=["",""]}this.defaultOptions=d}onTriggerEvent(){var e;if(this.$filterElm){const t=this.getValues();Array.isArray(t)&&t.length>1||1===t.length&&""!==t[0]?(this.isFilled=!0,null===(e=this.$filterElm)||void 0===e||e.addClass("filled").siblings("div .search-filter").addClass("filled")):(this.isFilled=!1,this.$filterElm.removeClass("filled"),this.$filterElm.siblings("div .search-filter").removeClass("filled")),this.searchTerms=t,this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:t,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0}}}__webpack_require__(971);const ji=100,Yi={autoComplete:class{constructor(e,t,i){this.translaterService=e,this.collectionService=t,this.rxjs=i,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this.isFilled=!1,this.valueName="label",this.enableTranslateLabel=!1,this.subscriptions=[]}get autoCompleteOptions(){return this._autoCompleteOptions||{}}get collectionOptions(){return this.columnDef&&this.columnDef.filter&&this.columnDef.filter.collectionOptions||{}}get collection(){return this._collection}get columnFilter(){var e;return(null===(e=this.columnDef)||void 0===e?void 0:e.filter)||{}}get filterDomElement(){return this.$filterElm}get filterOptions(){var e;return(null===(e=this.columnFilter)||void 0===e?void 0:e.filterOptions)||{}}get customStructure(){var e,t,i,n,o,s;let r=null===(e=this.columnFilter)||void 0===e?void 0:e.customStructure;const l=null!==(i=null===(t=this.columnFilter)||void 0===t?void 0:t.type)&&void 0!==i?i:null===(n=this.columnDef)||void 0===n?void 0:n.type;return!r&&l===fe.object&&(null===(o=this.columnDef)||void 0===o?void 0:o.dataKey)&&(null===(s=this.columnDef)||void 0===s?void 0:s.labelKey)&&(r={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),r}get defaultOperator(){return ye.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get instance(){return this.$filterElm.autocomplete("instance")}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],!(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.autoComplete, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }");this.enableTranslateLabel=this.columnFilter&&this.columnFilter.enableTranslateLabel||!1,this.labelName=this.customStructure&&this.customStructure.label||"label",this.valueName=this.customStructure&&this.customStructure.value||"value",this.labelPrefixName=this.customStructure&&this.customStructure.labelPrefix||"labelPrefix",this.labelSuffixName=this.customStructure&&this.customStructure.labelSuffix||"labelSuffix";const t=this.columnFilter.collection||[];return this._collection=t,this.renderDomElement(t),new Promise((async(e,i)=>{try{const i=this.columnFilter.collectionAsync;let n;i&&!this.columnFilter.collection?(n=At(i,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),e(n)):(n=t,e(t)),(i||this.columnFilter.enableCollectionWatch)&&(await(null!=n?n:i),this.watchCollectionChanges())}catch(e){i(e)}}))}clear(e=!0){this.$filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this.$filterElm.val(""),this.$filterElm.trigger("input"),this.$filterElm.removeClass("filled"))}destroy(){this.$filterElm&&(this.$filterElm.autocomplete("destroy"),this.$filterElm.off("input").remove()),this.$filterElm=null,this._collection=void 0,_t(this.subscriptions)}getValues(){return this.$filterElm.val()}setValues(e,t){e&&this.$filterElm.val(e),""!==this.getValues()?this.$filterElm.addClass("filled"):this.$filterElm.removeClass("filled"),this.operator=t||this.defaultOperator}filterCollection(e){let t=e;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const e=this.columnFilter.collectionFilterBy,i=this.columnFilter.collectionOptions&&this.columnFilter.collectionOptions.filterResultAfterEachPass||null;t=this.collectionService.filterCollection(t,e,i)}return t}sortCollection(e){let t=e;if(this.columnFilter&&this.columnFilter.collectionSortBy){const e=this.columnFilter.collectionSortBy;t=this.collectionService.sortCollection(this.columnDef,t,e,this.enableTranslateLabel)}return t}watchCollectionChanges(){var e;(null===(e=this.columnFilter)||void 0===e?void 0:e.collection)&&(d(this.columnFilter.collection,(e=>{this.renderDomElement(this.columnFilter.collection||e||[])})),u(this.columnFilter,"collection",(e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&d(this.columnFilter.collection,(e=>{this.renderDomElement(this.columnFilter.collection||e||[])}))})))}renderDomElement(e){var t;if(!Array.isArray(e)&&(null===(t=this.collectionOptions)||void 0===t?void 0:t.collectionInsideObjectProperty)&&(e=Ke(e,this.collectionOptions.collectionInsideObjectProperty||"")),!Array.isArray(e))throw new Error('The "collection" passed to the Autocomplete Filter is not a valid array.');let i=e;i=this.filterCollection(i),i=this.sortCollection(i);const n=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"",o=this.buildTemplateHtmlString();this._collection=i,this.createDomElement(o,i,n),this.$filterElm.on("input",this.handleOnInputChange.bind(this))}buildTemplateHtmlString(){var e,t,i;const n=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"";let o=this.gridOptions&&this.gridOptions.defaultFilterPlaceholder||"";return(null===(i=this.columnFilter)||void 0===i?void 0:i.placeholder)&&(o=this.columnFilter.placeholder),`<input type="text" role="presentation" autocomplete="off" class="form-control search-filter filter-${n}" placeholder="${o}">`}createDomElement(e,t,i){var n,o;this._collection=t;const s=null!==(o=null===(n=this.columnDef)||void 0===n?void 0:n.id)&&void 0!==o?o:"",r=this.grid.getHeaderRowColumn(s);$(r).empty(),this.$filterElm=$(e);const l=i;Array.isArray(t)&&(t=t.map((e=>({label:e[this.labelName],value:e[this.valueName],labelPrefix:e[this.labelPrefixName]||"",labelSuffix:e[this.labelSuffixName]||""}))));const a=this.filterOptions;if(null==a?void 0:a.source)a.select=(e,t)=>this.onSelect(e,t),this._autoCompleteOptions={...a},this._autoCompleteOptions.renderItem&&(this._autoCompleteOptions.classes={"ui-autocomplete":`autocomplete-custom-${pt(this._autoCompleteOptions.renderItem.layout)}`}),this.$filterElm.autocomplete(this._autoCompleteOptions),this._autoCompleteOptions.renderItem&&(this.$filterElm.autocomplete("instance")._renderItem=this.renderCustomItem.bind(this));else{const e={minLength:0,source:t,select:(e,t)=>this.onSelect(e,t)};this._autoCompleteOptions={...e,...this.filterOptions},this.$filterElm.autocomplete(this._autoCompleteOptions),this.$filterElm.autocomplete("instance")._renderItem=this.renderCollectionItem.bind(this)}if(this.$filterElm.val(l),this.$filterElm.data("columnId",s),i&&this.$filterElm.addClass("filled"),this.$filterElm&&"function"==typeof this.$filterElm.appendTo){const e=$('<div class="autocomplete-container"></div>');e.appendTo(r),this.$filterElm.appendTo(e),$("<span></span>").appendTo(e)}if(this.filterOptions.openSearchListOnFocus&&this.$filterElm.click((()=>this.$filterElm.autocomplete("search",this.$filterElm.val()))),this.columnFilter.callbacks)for(const e of Object.keys(this.columnFilter.callbacks))"function"==typeof this.columnFilter.callbacks[e]&&(this.$filterElm.autocomplete("instance")[e]=this.columnFilter.callbacks[e]);return this.$filterElm}onSelect(e,t){var i,n,o,s,r,l;if(t&&t.item){const a=t.item,d=null!==(l=null!==(o=null===(n=null===(i=this.columnFilter)||void 0===i?void 0:i.callbacks)||void 0===n?void 0:n.hasOwnProperty("_renderItem"))&&void 0!==o?o:null===(r=null===(s=this.columnFilter)||void 0===s?void 0:s.filterOptions)||void 0===r?void 0:r.renderItem)&&void 0!==l&&l,u="string"==typeof a?a:d?a[this.labelName]:a.label,c="string"==typeof a?a:d?a[this.valueName]:a.value;this.setValues(u),""===c?this.$filterElm.removeClass("filled"):this.$filterElm.addClass("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[c],shouldTriggerQuery:this._shouldTriggerQuery}),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}return!1}handleOnInputChange(e){let t=e&&e.target&&e.target.value||"";const i=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof t&&i&&(t=t.trim()),this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.$filterElm.removeClass("filled")):(""===t?this.$filterElm.removeClass("filled"):this.$filterElm.addClass("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[t],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}renderCustomItem(e,t){var i,n,o;const s=null!==(o=null===(n=null===(i=this._autoCompleteOptions)||void 0===i?void 0:i.renderItem)||void 0===n?void 0:n.templateCallback(t))&&void 0!==o?o:"",r=at(this.gridOptions,s)||"";return $("<li></li>").data("item.autocomplete",t).append(r).appendTo(e)}renderCollectionItem(e,t){var i,n;const o=null!==(n=null===(i=this.columnFilter)||void 0===i?void 0:i.enableRenderHtml)&&void 0!==n&&n,s=(t.labelPrefix||"")+(t.label||"")+(t.labelSuffix||""),r=at(this.gridOptions,s)||"",l=$("<div></div>")[o?"html":"text"](r);return $("<li></li>").data("item.autocomplete",t).append(l).appendTo(e)}},compoundDate:class{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this._bindEventService=new oi}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get currentDate(){return this._currentDate}get defaultOperator(){return ye.empty}get flatpickrOptions(){return this._flatpickrOptions||{}}get locales(){return this.gridOptions.locales||me.locales}get operator(){return this._operator||this.columnFilter.operator||this.defaultOperator}set operator(e){this._operator=e}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.operator=e.operator||"",this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[];const t=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._filterElm=this.createDomElement(t),this._bindEventService.bind(this._filterDivInputElm,"keyup",this.onTriggerEvent.bind(this)),this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(e=!0){this.flatInstance&&this._selectOperatorElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this._selectOperatorElm.selectedIndex=0,this.flatInstance.input&&this.flatInstance.clear()),this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled")}destroy(){var e,t,i,n;this._bindEventService.unbindAll(),this.flatInstance&&"function"==typeof this.flatInstance.destroy&&(this.flatInstance.destroy(),this.flatInstance.element&&qe(this.flatInstance)),null===(t=null===(e=this._filterElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e),null===(n=null===(i=this._selectOperatorElm)||void 0===i?void 0:i.remove)||void 0===n||n.call(i)}hide(){this.flatInstance&&"function"==typeof this.flatInstance.close&&this.flatInstance.close()}show(){this.flatInstance&&"function"==typeof this.flatInstance.open&&this.flatInstance.open()}getValues(){return this._currentDate}setValues(e,t){if(this.flatInstance){const t=Array.isArray(e)?e[0]:e;this._currentDate=e&&t?t:void 0,this.flatInstance.setDate(this._currentDate||"")}if(this.getValues()?(this._filterElm.classList.add("filled"),this._filterDivInputElm.classList.add("filled")):(this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled")),this.operator=t||this.defaultOperator,t&&this._selectOperatorElm){const e=tt(this.operator);this._selectOperatorElm.value=e}}buildDatePickerInput(e){var t,i,n,o,s,r;const l=Je(this.columnFilter.type||this.columnDef.type||fe.dateIso),a=Je(this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||fe.dateUtc),d=this.columnFilter&&this.columnFilter.filterOptions||{};let u=(null!==(t=null==d?void 0:d.locale)&&void 0!==t?t:null===(n=null===(i=this.translaterService)||void 0===i?void 0:i.getCurrentLanguage)||void 0===n?void 0:n.call(i))||this.gridOptions.locale||"en";(null==u?void 0:u.length)>2&&(u=u.substring(0,2)),e&&(this._currentDate=e);const c={defaultDate:e||"",altInput:!0,altFormat:a,dateFormat:l,wrap:!0,closeOnSelect:!0,locale:u,onChange:(e,t)=>{let i;this._currentValue=t,this._currentDate=Array.isArray(e)&&e[0]||void 0,c.enableTime&&(i=new CustomEvent("keyup")),this.onTriggerEvent(i)},errorHandler:e=>{e.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${u}), will revert to English as the default locale.\n 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';`)}};a&&("Z"===a||a.toLowerCase().includes("h"))&&(c.enableTime=!0),this._flatpickrOptions={...c,...d};let h=null!==(s=null===(o=this.gridOptions)||void 0===o?void 0:o.defaultFilterPlaceholder)&&void 0!==s?s:"";(null===(r=this.columnFilter)||void 0===r?void 0:r.placeholder)&&(h=this.columnFilter.placeholder);const p=document.createElement("div");p.className="flatpickr";const m=document.createElement("input");return m.type="text",m.className="form-control",m.dataset.input="",m.placeholder=h,p.appendChild(m),this.flatInstance=si(p,this._flatpickrOptions),p}getOperatorOptionValues(){var e;return(null===(e=this.columnFilter)||void 0===e?void 0:e.compoundOperatorList)?this.columnFilter.compoundOperatorList:[{operator:"",description:""},{operator:"=",description:this.getOutputText("EQUAL_TO","TEXT_EQUAL_TO","Equal to")},{operator:"<",description:this.getOutputText("LESS_THAN","TEXT_LESS_THAN","Less than")},{operator:"<=",description:this.getOutputText("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to")},{operator:">",description:this.getOutputText("GREATER_THAN","TEXT_GREATER_THAN","Greater than")},{operator:">=",description:this.getOutputText("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to")},{operator:"<>",description:this.getOutputText("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to")}]}getOutputText(e,t,i){var n,o,s,r;if((null===(n=this.gridOptions)||void 0===n?void 0:n.enableTranslate)&&(null===(o=this.translaterService)||void 0===o?void 0:o.translate)){const t=Qe(this.gridOptions);return this.translaterService.translate(`${t}${e}`)}return null!==(r=null===(s=this.locales)||void 0===s?void 0:s[t])&&void 0!==r?r:i}createDomElement(e){var t,i;const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",o=this.grid.getHeaderRowColumn(n);Le(o),this._selectOperatorElm=Dt(this.getOperatorOptionValues(),this.gridOptions),this._filterDivInputElm=this.buildDatePickerInput(e);const s=document.createElement("div");s.className=`form-group search-filter filter-${n}`;const r=document.createElement("div");r.className="input-group flatpickr";const l=document.createElement("div");if(l.className="input-group-addon input-group-prepend operator",l.appendChild(this._selectOperatorElm),r.appendChild(l),r.appendChild(this._filterDivInputElm),s.appendChild(r),this._filterDivInputElm.dataset.columnid=`${n}`,this.operator){const e=tt(this.operator);this._selectOperatorElm.value=e}return e&&""!==e&&(this._filterDivInputElm.classList.add("filled"),this._currentDate=e,this._currentValue=e),s&&o.appendChild(s),s}onTriggerEvent(e){if(this._clearFilterTriggered)this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled");else{const t=this._selectOperatorElm.value;this._currentValue?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),this.callback(e,{columnDef:this.columnDef,searchTerms:this._currentValue?[this._currentValue]:null,operator:t||"",shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}},compoundInput:ri,compoundInputNumber:class extends ri{constructor(e){super(e),this.translaterService=e,this.inputType="number"}},compoundInputPassword:class extends ri{constructor(e){super(e),this.translaterService=e,this.inputType="password"}},compoundInputText:ri,compoundSlider:class{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._elementRangeInputId="",this._elementRangeOutputId="",this.searchTerms=[],this._bindEventService=new oi}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get defaultOperator(){return ye.empty}get filterParams(){return this.columnDef&&this.columnDef.filter&&this.columnDef.filter.params||{}}get filterProperties(){return this.columnDef&&this.columnDef.filter||{}}get gridOptions(){var e,t,i;return null!==(i=null===(t=null===(e=this.grid)||void 0===e?void 0:e.getOptions)||void 0===t?void 0:t.call(e))&&void 0!==i?i:{}}get locales(){return this.gridOptions.locales||me.locales}get operator(){return this._operator||this.columnFilter.operator||this.defaultOperator}set operator(e){this._operator=e}init(e){var t;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.operator=e.operator||"",this.searchTerms=null!==(t=null==e?void 0:e.searchTerms)&&void 0!==t?t:[],this._elementRangeInputId=`rangeInput_${this.columnDef.field}`,this._elementRangeOutputId=`rangeOutput_${this.columnDef.field}`;const i=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.filterElm=this.createDomElement(i),this._bindEventService.bind(this.filterInputElm,"change",this.onTriggerEvent.bind(this)),this._bindEventService.bind(this.selectOperatorElm,"change",this.onTriggerEvent.bind(this)),this.filterParams.hideSliderNumber||this._bindEventService.bind(this.filterInputElm,["input","change"],this.handleInputChange.bind(this))}clear(e=!0){var t,i,n;if(this.filterElm&&this.selectOperatorElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[];const o=null!==(i=null===(t=this.filterParams)||void 0===t?void 0:t.sliderStartValue)&&void 0!==i?i:0;this._currentValue=+o,this.selectOperatorElm.selectedIndex=0,this.filterInputElm.value=o,this.filterNumberElm&&(this.filterNumberElm.textContent=o),this.onTriggerEvent(void 0),this.filterElm.classList.remove("filled"),null===(n=this.divContainerFilterElm)||void 0===n||n.classList.remove("filled")}}destroy(){var e,t,i,n;this._bindEventService.unbindAll(),null===(t=null===(e=this.selectOperatorElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e),Le(this.filterElm),null===(n=null===(i=this.filterElm)||void 0===i?void 0:i.remove)||void 0===n||n.call(i)}getValues(){return this._currentValue}setValues(e,t){var i,n,o;const s=Array.isArray(e)?e[0]:e;if(this._currentValue=ze(s)?+s:void 0,this.filterInputElm.value=`${null!=s?s:""}`,this.filterNumberElm&&(this.filterNumberElm.textContent=`${null!==(i=this._currentValue)&&void 0!==i?i:""}`),void 0!==this.getValues()?(this.filterElm.classList.add("filled"),null===(n=this.divContainerFilterElm)||void 0===n||n.classList.add("filled")):(this.filterElm.classList.remove("filled"),null===(o=this.divContainerFilterElm)||void 0===o||o.classList.remove("filled")),this.operator=t||this.defaultOperator,t&&this.selectOperatorElm){const e=tt(this.operator);this.selectOperatorElm.value=e}}getOperatorOptionValues(){var e;return(null===(e=this.columnFilter)||void 0===e?void 0:e.compoundOperatorList)?this.columnFilter.compoundOperatorList:[{operator:"",description:""},{operator:"=",description:this.getOutputText("EQUAL_TO","TEXT_EQUAL_TO","Equal to")},{operator:"<",description:this.getOutputText("LESS_THAN","TEXT_LESS_THAN","Less than")},{operator:"<=",description:this.getOutputText("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to")},{operator:">",description:this.getOutputText("GREATER_THAN","TEXT_GREATER_THAN","Greater than")},{operator:">=",description:this.getOutputText("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to")},{operator:"<>",description:this.getOutputText("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to")}]}getOutputText(e,t,i){var n,o,s,r;if((null===(n=this.gridOptions)||void 0===n?void 0:n.enableTranslate)&&(null===(o=this.translaterService)||void 0===o?void 0:o.translate)){const t=Qe(this.gridOptions);return this.translaterService.translate(`${t}${e}`)}return null!==(r=null===(s=this.locales)||void 0===s?void 0:s[t])&&void 0!==r?r:i}createDomElement(e){var t,i,n,o,s,r,l,a,d,u,c,h,p,m;const f=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",g=null!==(o=null===(n=this.filterProperties)||void 0===n?void 0:n.minValue)&&void 0!==o?o:0,v=null!==(r=null===(s=this.filterProperties)||void 0===s?void 0:s.maxValue)&&void 0!==r?r:100,_=null!==(a=null===(l=this.filterParams)||void 0===l?void 0:l.sliderStartValue)&&void 0!==a?a:g,C=null!==(u=null===(d=this.filterProperties)||void 0===d?void 0:d.valueStep)&&void 0!==u?u:1,b=+(null!==(h=null===(c=this.filterParams)||void 0===c?void 0:c.sliderStartValue)&&void 0!==h?h:g),y=this.grid.getHeaderRowColumn(this.columnDef.id);Le(y);let w=e||"0";+w<g&&(w=`${g}`),+w<b&&(w=`${b}`),this._currentValue=+w,this.selectOperatorElm=Dt(this.getOperatorOptionValues(),this.gridOptions);const S=document.createElement("span");if(S.className="input-group-addon input-group-prepend operator",S.appendChild(this.selectOperatorElm),this.filterInputElm=document.createElement("input"),this.filterInputElm.type="range",this.filterInputElm.className=`form-control slider-filter-input range compound-slider ${this._elementRangeInputId}`,this.filterInputElm.defaultValue=_,this.filterInputElm.value=w,this.filterInputElm.min=`${g}`,this.filterInputElm.max=`${v}`,this.filterInputElm.step=`${C}`,this.filterInputElm.name=this._elementRangeInputId,this.filterInputElm.setAttribute("aria-label",null!==(m=null===(p=this.columnFilter)||void 0===p?void 0:p.ariaLabel)&&void 0!==m?m:`${mt(f+"")} Search Filter`),this.divContainerFilterElm=document.createElement("div"),this.divContainerFilterElm.className=`form-group search-filter slider-container filter-${f}`,this.containerInputGroupElm=document.createElement("div"),this.containerInputGroupElm.className=`input-group search-filter filter-${f}`,this.containerInputGroupElm.appendChild(S),this.containerInputGroupElm.appendChild(this.filterInputElm),this.divContainerFilterElm.appendChild(this.containerInputGroupElm),!this.filterParams.hideSliderNumber){this.containerInputGroupElm.classList.add("input-group"),this.filterInputElm.value=w;const e=document.createElement("div");e.className="input-group-addon input-group-append slider-value",this.filterNumberElm=document.createElement("span"),this.filterNumberElm.className=`input-group-text ${this._elementRangeOutputId}`,this.filterNumberElm.textContent=w,e.appendChild(this.filterNumberElm),this.containerInputGroupElm.appendChild(e)}if(this.divContainerFilterElm.dataset.columnid=`${f}`,this.operator){const e=tt(this.operator);this.selectOperatorElm.value=e}return e&&this.divContainerFilterElm.classList.add("filled"),y.appendChild(this.divContainerFilterElm),this.divContainerFilterElm}handleInputChange(e){var t;const i=(null==e?void 0:e.target).value;null!=i&&(null===(t=this.filterNumberElm)||void 0===t?void 0:t.textContent)&&(this.filterNumberElm.textContent=i)}onTriggerEvent(e){const t=this.filterInputElm.value;if(this._currentValue=+t,this._clearFilterTriggered)this.filterElm.classList.remove("filled"),this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery});else{this.filterElm.classList.add("filled");const i=this.selectOperatorElm.value;this.callback(e,{columnDef:this.columnDef,searchTerms:t?[t||"0"]:null,operator:i||"",shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}},dateRange:class{constructor(e){this.translaterService=e,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this._bindEventService=new oi}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get currentDates(){return this._currentDates}get defaultOperator(){return this.gridOptions.defaultFilterRangeOperator||ye.rangeInclusive}get flatpickrOptions(){return this._flatpickrOptions||{}}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this._filterElm=this.createDomElement(this.searchTerms),this._bindEventService.bind(this._filterDivInputElm,"keyup",this.onTriggerEvent.bind(this))}clear(e=!0){this.flatInstance&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this.flatInstance.input&&this.flatInstance.clear(),this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled"))}destroy(){var e,t,i;this._bindEventService.unbindAll(),(null===(e=this.flatInstance)||void 0===e?void 0:e.destroy)&&(this.flatInstance.destroy(),this.flatInstance.element&&qe(this.flatInstance)),null===(i=null===(t=this._filterElm)||void 0===t?void 0:t.remove)||void 0===i||i.call(t)}hide(){this.flatInstance&&"function"==typeof this.flatInstance.close&&this.flatInstance.close()}show(){this.flatInstance&&"function"==typeof this.flatInstance.open&&this.flatInstance.open()}getValues(){return this._currentDates}setValues(e,t){let i=[];"string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]&&e[0].indexOf("..")>0?i="string"==typeof e?[e]:e[0].split(".."):Array.isArray(e)&&(i=e),this.flatInstance&&(this._currentDates=e&&i?i:void 0,this.flatInstance.setDate(this._currentDates||"")),(this.getValues()||[]).length>0&&e?(this._filterElm.classList.add("filled"),this._filterDivInputElm.classList.add("filled")):(this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled")),this.operator=t||this.defaultOperator}buildDatePickerInput(e){var t,i,n,o,s;const r=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",l=Je(this.columnFilter.type||this.columnDef.type||fe.dateIso),a=Je(this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||fe.dateUtc),d=this.columnFilter&&this.columnFilter.filterOptions||{};let u=(null!==(n=null==d?void 0:d.locale)&&void 0!==n?n:null===(s=null===(o=this.translaterService)||void 0===o?void 0:o.getCurrentLanguage)||void 0===s?void 0:s.call(o))||this.gridOptions.locale||"en";u.length>2&&(u=u.substring(0,2));let c=[];if("string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]&&e[0].indexOf("..")>0?c="string"==typeof e?[e]:e[0].split(".."):Array.isArray(e)&&(c=e),c){this._currentDates=c;const e=Ze(this.columnFilter.type||this.columnDef.type||fe.dateIso);this._currentDateStrings=c.map((t=>ai(t).format(e)))}const h={defaultDate:c||"",altInput:!0,altFormat:a,dateFormat:l,mode:"range",wrap:!0,closeOnSelect:!0,locale:u,onChange:e=>{if(Array.isArray(e)){this._currentDates=e;const t=Ze(this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||fe.dateIso);this._currentDateStrings=e.map((e=>ai(e).format(t))),this._currentValue=this._currentDateStrings.join("..")}const t=h.enableTime?new CustomEvent("keyup"):void 0;this.onTriggerEvent(t)},errorHandler:e=>{e.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${u}), will revert to English as the default locale.\n 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';`)}};a&&("Z"===a||a.toLowerCase().includes("h"))&&(h.enableTime=!0),this._flatpickrOptions={...h,...d};let p=this.gridOptions&&this.gridOptions.defaultFilterPlaceholder||"";this.columnFilter&&this.columnFilter.placeholder&&(p=this.columnFilter.placeholder);const m=document.createElement("div");m.className=`flatpickr search-filter filter-${r}`;const f=document.createElement("input");return f.type="text",f.className="form-control",f.dataset.input="",f.placeholder=p,m.appendChild(f),this.flatInstance=li(m,this._flatpickrOptions),m}createDomElement(e){var t,i;const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",o=this.grid.getHeaderRowColumn(n);return Le(o),this._filterDivInputElm=this.buildDatePickerInput(e),this._filterDivInputElm.dataset.columnid=`${n}`,Array.isArray(e)&&e.length>0&&""!==e[0]&&(this._filterDivInputElm.classList.add("filled"),this._currentDates=e,this._currentValue=e[0]),this._filterDivInputElm&&o.appendChild(this._filterDivInputElm),this._filterDivInputElm}onTriggerEvent(e){this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled")):(this._currentDateStrings?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),this.callback(e,{columnDef:this.columnDef,searchTerms:this._currentDateStrings?this._currentDateStrings:[this._currentValue],operator:this.operator||"",shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}},input:Gi,inputMask:class extends Gi{constructor(){super(),this._inputMask="",this.inputType="text"}get inputMask(){return this._inputMask}init(e){var t,i,n,o;if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],(null===(i=null===(t=this.columnDef)||void 0===t?void 0:t.params)||void 0===i?void 0:i.mask)?this._inputMask=this.columnDef.params.mask:(null===(o=null===(n=this.columnFilter)||void 0===n?void 0:n.params)||void 0===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\n 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._filterElm=this.createDomElement(s),this._bindEventService.bind(this._filterElm,["keyup","blur","change"],this.handleInputChange.bind(this))}handleInputChange(e){var t,i,n,o;let s="";if(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value){let t=null!==(n=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.value)&&void 0!==n?n:"";const r=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;"string"==typeof t&&r&&(t=t.trim());const l=this.unmaskValue(t),a=this.maskValue(l);s=l,(null===(o=e)||void 0===o?void 0:o.keyCode)>=48&&(this._filterElm.value=a,e.preventDefault())}this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled")):(this._filterElm.classList.add("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[s],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}maskValue(e){let t=0,i="";return this._inputMask&&(i=this._inputMask.replace(/[09A]/gi,(i=>(("0"===i||"9"===i)&&/\d+/g.test(e[t])||"A"===i.toUpperCase()&&/[^\d]+/gi.test(e[t]))&&e[t++]||""))),i}unmaskValue(e){const t=e.replace(/[^0-9a-z]*/gi,""),i=this._inputMask.replace(/[^0-9a-z]*/gi,"");let n="";for(let e=0;e<i.length;e++)t[e]&&(("0"===i[e]||"9"===i[e])&&/\d+/g.test(t[e])||"A"===i[e].toUpperCase()&&/[^\d]+/gi.test(t[e]))&&(n+=t[e]);return n}},inputNumber:class extends Gi{constructor(){super(),this.inputType="number"}},inputPassword:class extends Gi{constructor(){super(),this.inputType="password"}},inputText:Gi,multipleSelect:class extends Ui{constructor(e,t,i){super(e,t,i,!0),this.translaterService=e,this.collectionService=t,this.rxjs=i}},select:class{constructor(e){this.translater=e,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._currentValues=[],this.searchTerms=[],this._bindEventService=new oi}get columnFilter(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)&&void 0!==t?t:{}}get defaultOperator(){return ye.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],!(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||"function"!=typeof this.translater.translate))throw new Error('The I18N Service is required for the Native Select Filter to work correctly when "enableTranslateLabel" is set.');let t=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";"boolean"!=typeof t&&"number"!=typeof t||(t=`${null!=t?t:""}`),this.filterElm=this.createDomElement(t),this._bindEventService.bind(this.filterElm,"change",this.handleOnChange.bind(this))}clear(e=!0){this.filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[],this._currentValues=[],this.filterElm.value="",this.filterElm.classList.remove("filled"),this.filterElm.dispatchEvent(new Event("change")))}destroy(){var e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this.filterElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}getValues(){return this._currentValues||[]}setValues(e,t){var i;Array.isArray(e)?(this.filterElm.value=`${null!==(i=e[0])&&void 0!==i?i:""}`,this._currentValues=e):e&&(this.filterElm.value=`${null!=e?e:""}`,this._currentValues=[e]),this.getValues().length>0?this.filterElm.classList.add("filled"):this.filterElm.classList.remove("filled"),this.operator=t||this.defaultOperator}buildFilterSelectFromCollection(e){var t,i,n,o,s,r,l,a,d,u;const c=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",h=document.createElement("select");h.setAttribute("aria-label",null!==(o=null===(n=this.columnFilter)||void 0===n?void 0:n.ariaLabel)&&void 0!==o?o:`${mt(c+"")} Search Filter`),h.className=`form-control search-filter filter-${c}`;const p=null!==(r=null===(s=this.columnFilter.customStructure)||void 0===s?void 0:s.label)&&void 0!==r?r:"label",m=null!==(a=null===(l=this.columnFilter.customStructure)||void 0===l?void 0:l.value)&&void 0!==a?a:"value",f=null!==(u=null===(d=this.columnFilter)||void 0===d?void 0:d.enableTranslateLabel)&&void 0!==u&&u;if(e.every((e=>"string"==typeof e)))for(const t of e){const e=document.createElement("option");e.value=t,e.label=t,e.textContent=t,h.appendChild(e)}else for(const t of e){if(!t||void 0===t[p]&&void 0===t.labelKey)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 e=t.labelKey||t[p],i=(t.labelKey||f)&&this.translater&&this.translater.translate&&this.translater.getCurrentLanguage&&this.translater.getCurrentLanguage()?this.translater.translate(e||" "):e,n=document.createElement("option");n.value=t[m],n.textContent=i,h.appendChild(n)}return h}createDomElement(e){var t,i,n,o;const s=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",r=this.grid.getHeaderRowColumn(s);Le(r);const l=e||"",a=null!==(o=null===(n=this.columnFilter)||void 0===n?void 0:n.collection)&&void 0!==o?o:[];if(!Array.isArray(a))throw new Error('The "collection" passed to the Native Select Filter is not a valid array.');const d=this.buildFilterSelectFromCollection(a);return d.value=l,d.dataset.columnid=`${s||""}`,l&&(this._currentValues=[l]),r.appendChild(d),d}handleOnChange(e){const t=e&&e.target&&e.target.value||"";this._currentValues=[t],this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.filterElm.classList.remove("filled")):(""===t?this.filterElm.classList.remove("filled"):this.filterElm.classList.add("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[t],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}},singleSelect:class extends Ui{constructor(e,t,i){super(e,t,i,!1),this.translaterService=e,this.collectionService=t,this.rxjs=i}},slider:class{constructor(){this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._elementRangeInputId="",this._elementRangeOutputId="",this.searchTerms=[],this._bindEventService=new oi}get columnFilter(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)&&void 0!==t?t:{}}get defaultOperator(){return ye.equal}get filterParams(){var e,t,i;return null!==(i=null===(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)||void 0===t?void 0:t.params)&&void 0!==i?i:{}}get filterProperties(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.filter)&&void 0!==t?t:{}}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this._elementRangeInputId=`rangeInput_${this.columnDef.field}`,this._elementRangeOutputId=`rangeOutput_${this.columnDef.field}`;const t=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.filterElm=this.createDomElement(t),this._bindEventService.bind(this.filterInputElm,"change",this.handleOnChange.bind(this)),this.filterParams.hideSliderNumber||this._bindEventService.bind(this.filterInputElm,["input","change"],this.handleInputChange.bind(this))}clear(e=!0){var t,i;if(this.filterElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[];const n=null!==(i=null===(t=this.filterParams)||void 0===t?void 0:t.sliderStartValue)&&void 0!==i?i:0;this._currentValue=+n,this.filterInputElm.value=n,this.filterNumberElm&&(this.filterNumberElm.textContent=n),this.divContainerFilterElm.classList.remove("filled"),this.filterElm.classList.remove("filled"),this.filterInputElm.dispatchEvent(new Event("change"))}}destroy(){var e,t;this._bindEventService.unbindAll(),Le(this.filterElm),null===(t=null===(e=this.filterElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}getValues(){return this._currentValue}setValues(e,t){Array.isArray(e)?(this.filterInputElm.value=`${e[0]}`,this.filterNumberElm&&(this.filterNumberElm.textContent=`${e[0]}`),this._currentValue=+e[0]):ze(e)?(this.filterInputElm.value=`${null!=e?e:""}`,this._currentValue=+e):(this._currentValue=void 0,this.filterInputElm.value=""),void 0!==this.getValues()?(this.divContainerFilterElm.classList.add("filled"),this.filterElm.classList.add("filled")):(this.divContainerFilterElm.classList.remove("filled"),this.filterElm.classList.remove("filled")),this.operator=t||this.defaultOperator}createDomElement(e){var t,i,n,o,s,r,l,a,d,u,c,h,p,m;const f=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",g=null!==(o=null===(n=this.filterProperties)||void 0===n?void 0:n.minValue)&&void 0!==o?o:0,v=null!==(r=null===(s=this.filterProperties)||void 0===s?void 0:s.maxValue)&&void 0!==r?r:100,_=null!==(a=null===(l=this.filterParams)||void 0===l?void 0:l.sliderStartValue)&&void 0!==a?a:g,C=null!==(u=null===(d=this.filterProperties)||void 0===d?void 0:d.valueStep)&&void 0!==u?u:1,b=+(null!==(h=null===(c=this.filterParams)||void 0===c?void 0:c.sliderStartValue)&&void 0!==h?h:g),y=this.grid.getHeaderRowColumn(f);Le(y);let w=e||"0";if(+w<g&&(w=`${g}`),+w<b&&(w=`${b}`),this._currentValue=+w,this.filterInputElm=document.createElement("input"),this.filterInputElm.type="range",this.filterInputElm.className=`form-control slider-filter-input range ${this._elementRangeInputId}`,this.filterInputElm.defaultValue=_,this.filterInputElm.value=w,this.filterInputElm.min=`${g}`,this.filterInputElm.max=`${v}`,this.filterInputElm.step=`${C}`,this.filterInputElm.name=this._elementRangeInputId,this.filterInputElm.setAttribute("aria-label",null!==(m=null===(p=this.columnFilter)||void 0===p?void 0:p.ariaLabel)&&void 0!==m?m:`${mt(f+"")} Search Filter`),this.divContainerFilterElm=document.createElement("div"),this.divContainerFilterElm.className=`search-filter slider-container filter-${f}`,this.divContainerFilterElm.appendChild(this.filterInputElm),!this.filterParams.hideSliderNumber){this.divContainerFilterElm.classList.add("input-group"),this.filterInputElm.value=w;const e=document.createElement("div");e.className="input-group-addon input-group-append slider-value",this.filterNumberElm=document.createElement("span"),this.filterNumberElm.className=`input-group-text ${this._elementRangeOutputId}`,this.filterNumberElm.textContent=w,e.appendChild(this.filterNumberElm),this.divContainerFilterElm.appendChild(e)}return this.divContainerFilterElm.dataset.columnid=`${f}`,e&&this.divContainerFilterElm.classList.add("filled"),y.appendChild(this.divContainerFilterElm),this.divContainerFilterElm}handleInputChange(e){var t;const i=(null==e?void 0:e.target).value;null!=i&&(null===(t=this.filterNumberElm)||void 0===t?void 0:t.textContent)&&(this.filterNumberElm.textContent=i)}handleOnChange(e){const t=e&&e.target&&e.target.value;this._currentValue=+t,this._clearFilterTriggered?(this.filterElm.classList.remove("filled"),this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,searchTerms:[],shouldTriggerQuery:this._shouldTriggerQuery})):(this.filterElm.classList.add("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:[t||"0"],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}},sliderRange:class{constructor(){this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[]}get filterParams(){return this.columnDef&&this.columnDef.filter&&this.columnDef.filter.params||{}}get filterProperties(){return this.columnDef&&this.columnDef.filter||{}}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get currentValues(){return this._currentValues}get defaultOperator(){return this.gridOptions.defaultFilterRangeOperator||ye.rangeInclusive}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get sliderOptions(){return this._sliderOptions||{}}get operator(){var e,t;return null!==(t=null===(e=this.columnFilter)||void 0===e?void 0:e.operator)&&void 0!==t?t:this.defaultOperator}set operator(e){this.columnFilter&&(this.columnFilter.operator=e)}init(e){if(!e)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=e.grid,this.callback=e.callback,this.columnDef=e.columnDef,this.searchTerms=(e.hasOwnProperty("searchTerms")?e.searchTerms:[])||[],this.$filterElm=this.createDomElement(this.searchTerms)}clear(e=!0){if(this.$filterElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=e,this.searchTerms=[];const t=this.filterParams.hasOwnProperty("sliderStartValue")?this.filterParams.sliderStartValue:0,i=this.filterParams.hasOwnProperty("sliderEndValue")?this.filterParams.sliderEndValue:ji;this._currentValues=[t,i],this.$filterElm.slider("values",[t,i]),this.filterParams.hideSliderNumbers||this.renderSliderValues(t,i),this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:e}),this.$filterContainerElm.removeClass("filled")}}destroy(){this.$filterElm&&(this.$filterElm.off("change").remove(),this.$filterContainerElm.remove()),this.$filterElm=null,this.$filterContainerElm=null}renderSliderValues(e,t){var i,n,o,s;const r=null!==(n=null===(i=this.columnDef)||void 0===i?void 0:i.id)&&void 0!==n?n:"",l=null===(o=this.$filterContainerElm.get(0))||void 0===o?void 0:o.querySelector(`.lowest-range-${r}`),a=null===(s=this.$filterContainerElm.get(0))||void 0===s?void 0:s.querySelector(`.highest-range-${r}`);(null==l?void 0:l.textContent)&&(l.textContent=e.toString()),(null==a?void 0:a.textContent)&&(a.textContent=t.toString())}getValues(){return this._currentValues}setValues(e,t){var i,n;if(e){let t=[];"string"==typeof e||Array.isArray(e)&&"string"==typeof e[0]&&e[0].indexOf("..")>0?t="string"==typeof e?[e]:e[0].split(".."):Array.isArray(e)&&(t=e),Array.isArray(t)&&2===t.length&&(this.$filterElm.slider("values",t),this.filterParams.hideSliderNumbers||this.renderSliderValues(t[0],t[1]))}e&&(null!==(n=null===(i=this.getValues)||void 0===i?void 0:i.call(this))&&void 0!==n?n:[]).length>0?this.$filterContainerElm.addClass("filled"):this.$filterContainerElm.removeClass("filled"),this.operator=t||this.defaultOperator}createDomElement(e){var t,i;if(this.columnFilter&&this.columnFilter.filterOptions&&(this.columnFilter.filterOptions.change||this.columnFilter.filterOptions.slide))throw new Error('[Slickgrid-Universal] You cannot override the "change" and/or the "slide" callback methods\n since they are used in SliderRange Filter itself, however any other methods can be used for example the "create", "start", "stop" methods.');const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",o=this.grid.getHeaderRowColumn(n),s=this.filterProperties.hasOwnProperty("minValue")?this.filterProperties.minValue:0,r=this.filterProperties.hasOwnProperty("maxValue")?this.filterProperties.maxValue:ji,l=this.filterProperties.hasOwnProperty("valueStep")?this.filterProperties.valueStep:1;let a=0,d=ji;Array.isArray(e)&&e.length>1?(a=+e[0],d=+e[1]):(a=+(this.filterParams.hasOwnProperty("sliderStartValue")?this.filterParams.sliderStartValue:s),d=+(this.filterParams.hasOwnProperty("sliderEndValue")?this.filterParams.sliderEndValue:r)),$(o).empty();const u=$(`\n <div class="input-group-addon input-group-prepend slider-range-value">\n <span class="input-group-text lowest-range-${n}">${a}</span>\n </div>`),c=$(`\n <div class="input-group-addon input-group-append slider-range-value">\n <span class="input-group-text highest-range-${n}">${d}</span>\n </div>`);this.$filterElm=$(`<div class="filter-input filter-${n}"></div>`),this.$filterContainerElm=$(`<div class="input-group form-control search-filter slider-range-container slider-values filter-${n}">`),this.filterParams.hideSliderNumbers?this.$filterContainerElm.append(this.$filterElm):(this.$filterContainerElm.append(u),this.$filterContainerElm.append(this.$filterElm),this.$filterContainerElm.append(c)),this._currentValues=[a,d];const h={range:!0,min:+(s||0),max:+(r||ji),step:+(l||1),values:[a,d],change:(e,t)=>this.onValueChanged(e,t),slide:(e,t)=>{const i=t.values;!this.filterParams.hideSliderNumbers&&Array.isArray(i)&&this.renderSliderValues(i[0],i[1])}};return this._sliderOptions={...h,...this.columnFilter.filterOptions},this.$filterElm.slider(this._sliderOptions),Array.isArray(e)&&e.length>0&&""!==e[0]&&this.$filterContainerElm.addClass("filled"),this.$filterContainerElm&&"function"==typeof this.$filterContainerElm.appendTo&&this.$filterContainerElm.appendTo(o),this.$filterElm}onValueChanged(e,t){const i=t&&Array.isArray(t.values)?t.values:[],n=i.join("..");this._clearFilterTriggered?(this.callback(e,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.$filterContainerElm.removeClass("filled")):(""===n?this.$filterContainerElm.removeClass("filled"):this.$filterContainerElm.addClass("filled"),this.callback(e,{columnDef:this.columnDef,operator:this.operator,searchTerms:i,shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}};class qi{constructor(e,t,i,n){var o,s;this.config=e,this.translaterService=t,this.collectionService=i,this.rxjs=n,this._options=null!==(s=null===(o=this.config)||void 0===o?void 0:o.options)&&void 0!==s?s:{}}addRxJsResource(e){this.rxjs=e}createFilter(e){let t;return(null==e?void 0:e.model)&&(t="function"==typeof e.model?new e.model(this.translaterService,this.collectionService,this.rxjs):e.model),!t&&this._options.defaultFilter&&(t=new this._options.defaultFilter(this.translaterService,this.collectionService,this.rxjs)),t}}const Xi={alwaysShowVerticalScroll:!0,autoEdit:!1,asyncEditorLoading:!1,autoFitColumnsOnFirstLoad:!0,autoFixResizeTimeout:1500,autoFixResizeRequiredGoodCount:2,autoFixResizeWhenBrokenStyleDetected:!1,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:Ki},cellMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideCommandSection:!1,hideOptionSection:!1},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",width:200},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:{items:"items",itemsKey:"ITEMS",of:"of",ofKey:"OF",itemsSelected:"items selected",itemsSelectedKey:"ITEMS_SELECTED"}},customTooltip:{tooltipTextMaxLength:700,maxWidth:500},dataView:{syncGridSelection:!0,syncGridSelectionWithBackendService:!1},datasetIdPropertyName:"id",defaultFilter:Yi.input,defaultBackendServiceFilterTypingDebounce:500,enableFilterTrimWhiteSpace:!1,defaultFilterPlaceholder:"🔎︎",defaultFilterRangeOperator:ye.rangeInclusive,defaultColumnSortFieldId:"id",defaultComponentEventPrefix:"",defaultSlickgridEventPrefix:"",editable:!1,editorTypingDebounce:450,filterTypingDebounce:0,enableEmptyDataWarningMessage:!0,emptyDataWarning:{className:"slick-empty-data-warning",message:"No data to display.",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,exportWithFormatter:!1,filename:"export",format:ge.xlsx,groupingColumnHeaderTitle:"Group By",groupCollapsedSymbol:"⮞",groupExpandedSymbol:"⮟",groupingAggregatorRowText:"",sanitizeDataExport:!1},textExportOptions:{delimiter:re.comma,exportWithFormatter:!1,filename:"export",format:ge.csv,groupingColumnHeaderTitle:"Group By",groupingAggregatorRowText:"",sanitizeDataExport:!1,useUtf8WithBom:!0},gridAutosizeColsMode:_e.none,eventNamingStyle:le.lowerCase,forceFitColumns:!1,frozenHeaderWidthCalcDifferential:1,gridMenu:{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,useClickToRepositionMenu:!1,headerColumnValueExtractor:Ki},headerMenu:{autoAlign:!0,autoAlignOffset:12,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},ignoreAccentOnStringFilterAndSort:!1,multiColumnSort:!0,numberedMultiColumnSort:!0,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!0,suppressActiveCellChangeOnEdit:!0,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 Ki(e,t){var i,n;const o=(null==e?void 0:e.columnGroup)||"",s=null!==(i=null==t?void 0:t.columnGroupSeparator)&&void 0!==i?i:" - ";return o?o+s+e.name:null!==(n=null==e?void 0:e.name)&&void 0!==n?n:""}const Qi={Avg:class{constructor(e){this._nonNullCount=0,this._sum=0,this._type="avg",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._nonNullCount=0,this._sum=0}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:null;null===t||""===t||isNaN(t)||(this._nonNullCount++,this._sum+=parseFloat(t))}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),0!==this._nonNullCount&&(e[this._type][this._field]=this._sum/this._nonNullCount)}},Clone:class{constructor(e){this._type="clone",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._data=""}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:null;null!==t&&""!==t&&(this._data=t)}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=this._data}},Count:class{constructor(e){this._type="count",this._field=e}get field(){return this._field}get type(){return this._type}init(){}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=e.group.rows.length}},Distinct:class{constructor(e){this._distinctValues=[],this._type="distinct",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._distinctValues=[]}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:void 0;-1===this._distinctValues.indexOf(t)&&void 0!==t&&this._distinctValues.push(t)}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=this._distinctValues}},Min:class{constructor(e){this._min=null,this._type="min",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._min=null}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:null;null===t||""===t||isNaN(t)||(null===this._min||t<this._min)&&(this._min=parseFloat(t))}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=this._min}},Max:class{constructor(e){this._max=null,this._type="max",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._max=null}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:null;null===t||""===t||isNaN(t)||(null===this._max||t>this._max)&&(this._max=parseFloat(t))}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=this._max}},Sum:class{constructor(e){this._sum=0,this._type="sum",this._field=e}get field(){return this._field}get type(){return this._type}init(){this._sum=0}accumulate(e){const t=e&&e.hasOwnProperty(this._field)?e[this._field]:null;null===t||""===t||isNaN(t)||(this._sum+=parseFloat(t))}storeResult(e){e&&void 0!==e[this._type]||(e[this._type]={}),e[this._type][this._field]=this._sum}}};function Zi(e,t){var i;const n=t.errorMessage,o=t.required,s=t.minLength,r=t.maxLength,l=t.operatorConditionalType||"inclusive",a={"{{minLength}}":s,"{{maxLength}}":r};let d=!0,u="";const c=null!==(i=null==e?void 0:e.length)&&void 0!==i?i:0;if(t.validator)return t.validator(e,t.editorArgs);if(o&&""===e)d=!1,u=n||me.VALIDATION_REQUIRED_FIELD;else if(void 0!==s&&void 0!==r&&("exclusive"===l&&(c<=s||c>=r)||"inclusive"===l&&(c<s||c>r)))d=!1,u=n||me.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN.replace(/{{minLength}}|{{maxLength}}/gi,(e=>a[e]));else if(void 0!==s&&null!==c&&("exclusive"===l&&c<=s||"inclusive"===l&&null!==c&&c<s)){d=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE:me.VALIDATION_EDITOR_TEXT_MIN_LENGTH;u=n||e.replace(/{{minLength}}/gi,(e=>a[e]))}else if(void 0!==r&&null!==c&&("exclusive"===l&&c>=r||"inclusive"===l&&null!==c&&c>r)){d=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE:me.VALIDATION_EDITOR_TEXT_MAX_LENGTH;u=n||e.replace(/{{maxLength}}/gi,(e=>a[e]))}return{valid:d,msg:u}}const Ji=l&&ni||l,en=pe()||he;function tn(e,t){const i=isNaN(e)?null:parseFloat(e),n=t.decimal||0,o=t.required,s=t.minValue,r=t.maxValue,l=t.operatorConditionalType||"inclusive",a=t.errorMessage,d={"{{minValue}}":s,"{{maxValue}}":r,"{{minDecimal}}":0,"{{maxDecimal}}":n};let u=!0,c="";if("function"==typeof t.validator)return t.validator(e,t.editorArgs);if(o&&""===e)u=!1,c=a||me.VALIDATION_REQUIRED_FIELD;else if(""!==e&&(isNaN(e)||0===n&&!/^[-+]?(\d*(\.)?(\d)*)$/.test(e)))u=!1,c=a||me.VALIDATION_EDITOR_VALID_NUMBER;else if(void 0!==s&&void 0!==r&&null!==i&&("exclusive"===l&&(i<=s||i>=r)||"inclusive"===l&&(i<s||i>r)))u=!1,c=a||me.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,(e=>d[e]));else if(void 0!==s&&null!==i&&("exclusive"===l&&i<=s||"inclusive"===l&&i<s)){u=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE:me.VALIDATION_EDITOR_NUMBER_MIN;c=a||e.replace(/{{minValue}}/gi,(e=>d[e]))}else if(void 0!==r&&null!==i&&("exclusive"===l&&i>=r||"inclusive"===l&&i>r)){u=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE:me.VALIDATION_EDITOR_NUMBER_MAX;c=a||e.replace(/{{maxValue}}/gi,(e=>d[e]))}else n>0&&!new RegExp(`^[-+]?(\\d*(\\.)?(\\d){0,${n}})$`).test(e)&&(u=!1,c=a||me.VALIDATION_EDITOR_DECIMAL_BETWEEN.replace(/{{minDecimal}}|{{maxDecimal}}/gi,(e=>d[e])));return{valid:u,msg:c}}function nn(e,t){let i=isNaN(e)?null:parseInt(e,10);null!==i&&isNaN(i)&&(i=null);const n=t.errorMessage,o=t.required,s=t.minValue,r=t.maxValue,l=t.operatorConditionalType||"inclusive",a={"{{minValue}}":s,"{{maxValue}}":r};let d=!0,u="";if(t.validator)return t.validator(e,t.editorArgs);if(o&&""===e)d=!1,u=n||me.VALIDATION_REQUIRED_FIELD;else if(""===e||!isNaN(e)&&/^[+-]?\d+$/.test(e)){if(void 0!==s&&void 0!==r&&null!==i&&("exclusive"===l&&(i<=s||i>=r)||"inclusive"===l&&(i<s||i>r)))d=!1,u=n||me.VALIDATION_EDITOR_INTEGER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,(e=>a[e]));else if(void 0!==s&&null!==i&&("exclusive"===l&&i<=s||"inclusive"===l&&null!==i&&i<s)){d=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE:me.VALIDATION_EDITOR_INTEGER_MIN;u=n||e.replace(/{{minValue}}/gi,(e=>a[e]))}else if(void 0!==r&&null!==i&&("exclusive"===l&&i>=r||"inclusive"===l&&null!==i&&i>r)){d=!1;const e="inclusive"===l?me.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE:me.VALIDATION_EDITOR_INTEGER_MAX;u=n||e.replace(/{{maxValue}}/gi,(e=>a[e]))}}else d=!1,u=n||me.VALIDATION_EDITOR_VALID_INTEGER;return{valid:d,msg:u}}class on{constructor(e,t){if(this.args=e,this._inputType="text",this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=e.grid&&e.grid.getOptions(),this._bindEventService=new oi,this.inputType=t||"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 e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get inputType(){return this._inputType}set inputType(e){this._inputType=e}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n,o,s,r,l;const a=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",d=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.placeholder)&&void 0!==n?n:"",u=null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.title)&&void 0!==s?s:"",c=this.args.compositeEditorOptions;this._input=document.createElement("input"),this._input.className=`editor-text editor-${a}`,this._input.type=this._inputType||"text",this._input.setAttribute("role","presentation"),this._input.autocomplete="off",this._input.placeholder=d,this._input.title=u,this._input.setAttribute("aria-label",null!==(l=null===(r=this.columnEditor)||void 0===r?void 0:r.ariaLabel)&&void 0!==l?l:`${mt(a+"")} Input Editor`);const h=this.args.container;h&&"function"==typeof h.appendChild&&h.appendChild(this._input),this._bindEventService.bind(this._input,"focus",(()=>{var e;return null===(e=this._input)||void 0===e?void 0:e.select()})),this._bindEventService.bind(this._input,"keydown",(e=>{this._isValueTouched=!0,this._lastInputKeyEvent=e,e.keyCode!==be.LEFT&&e.keyCode!==be.RIGHT||e.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 e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this._input)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}disable(e=!0){var t;const i=this.disabled;if(this.disabled=e,this._input)if(e){this._input.setAttribute("disabled","disabled");const n=this.getValue();i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&""!==n&&this.reset("",!0,!0)}else this._input.removeAttribute("disabled")}focus(){this._input&&this._input.focus()}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var e;return(null===(e=this._input)||void 0===e?void 0:e.value)||""}setValue(e,t=!1,i=!0){if(this._input&&(this._input.value=`${e}`,t)){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(null,e,"system")}}applyValue(e,t){var i,n,o;const s=this.columnDef&&this.columnDef.field;if(void 0!==s){const r=(null==s?void 0:s.indexOf("."))>0,l=this.validate(null,t),a=(null==l?void 0:l.valid)?t:"";r?dt(e,null!==(o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.complexObjectPath)&&void 0!==n?n:s)&&void 0!==o?o:"",a):s&&(e[s]=a)}}isValueChanged(){var e;const t=null===(e=this._input)||void 0===e?void 0:e.value,i=this._lastInputKeyEvent&&this._lastInputKeyEvent.keyCode;return!(!this.columnEditor||!this.columnEditor.alwaysSaveOnEnterKey||i!==be.ENTER)||!(""===t&&(null===this._originalValue||void 0===this._originalValue))&&t!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){const t=this.columnDef&&this.columnDef.field;if(e&&void 0!==t&&this._input){const i=(null==t?void 0:t.indexOf("."))>0?Ke(e,t):e.hasOwnProperty(t)&&e[t]||"";this._originalValue=i,this._input.value=this._originalValue,this._input.select()}}reset(e,t=!0,i=!1){var n;const o=null!==(n=null!=e?e:this._originalValue)&&void 0!==n?n:"";this._input&&(this._originalValue=o,this._input.value=`${o}`),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&t){const e=!i;this.handleChangeOnCompositeEditor(null,s,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var e,t;return null!==(t=null===(e=this._input)||void 0===e?void 0:e.value)&&void 0!==t?t:""}validate(e,t){var i;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:Zi(void 0!==t?t:this._input&&this._input.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a;const d=this.grid.getActiveCell(),u=this.args.column,c=null!==(s=null===(o=this.columnDef)||void 0===o?void 0:o.id)&&void 0!==s?s:"",h=this.dataContext,p=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(t.formValues,m);const f=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;(n||this.disabled&&f&&t.formValues.hasOwnProperty(c))&&delete t.formValues[c],p.onCompositeEditorChange.notify({...d,item:h,grid:p,column:u,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}handleOnInputChange(e){var t,i;this._isValueTouched=!0;const n=this.args.compositeEditorOptions;if(n){const o=null!==(i=null===(t=this.gridOptions)||void 0===t?void 0:t.editorTypingDebounce)&&void 0!==i?i:500;clearTimeout(this._timer),this._timer=setTimeout((()=>this.handleChangeOnCompositeEditor(e,n)),o)}}}class sn{constructor(e,t){var i,n,o,s,r,l,a;if(this.args=e,this.isMultipleSelect=t,this._isValueTouched=!1,this._isDisposing=!1,this.disabled=!1,this.enableTranslateLabel=!1,this.finalCollection=[],!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},(null===(i=this.gridOptions)||void 0===i?void 0:i.translater)&&(this._translaterService=this.gridOptions.translater),this._locales=this.gridOptions.locales||me.locales;const d=null!==(o=null===(n=this.columnDef)||void 0===n?void 0:n.id)&&void 0!==o?o:"";this.elementName=`editor-${d}`;const u=this.args.compositeEditorOptions,c={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,container:"body",filter:!1,maxHeight:275,name:this.elementName,single:!0,textTemplate:e=>{var t,i;return null!==(i=null===(t=this.columnEditor)||void 0===t?void 0:t.enableRenderHtml)&&void 0!==i&&i?e.text():e.html()},onClick:()=>this._isValueTouched=!0,onCheckAll:()=>this._isValueTouched=!0,onUncheckAll:()=>this._isValueTouched=!0,onClose:()=>{u?this.handleChangeOnCompositeEditor(u):this.save()}};if(t)if(c.single=!1,c.addTitle=!0,c.okButton=!0,c.selectAllDelimiter=["",""],this._translaterService&&this._translaterService.getCurrentLanguage&&this._translaterService.getCurrentLanguage()){const e=Qe(this.gridOptions);c.countSelected=this._translaterService.translate(`${e}X_OF_Y_SELECTED`),c.allSelected=this._translaterService.translate(`${e}ALL_SELECTED`),c.selectAllText=this._translaterService.translate(`${e}SELECT_ALL`),c.okButtonText=this._translaterService.translate(`${e}OK`)}else c.countSelected=null===(s=this._locales)||void 0===s?void 0:s.TEXT_X_OF_Y_SELECTED,c.allSelected=null===(r=this._locales)||void 0===r?void 0:r.TEXT_ALL_SELECTED,c.selectAllText=null===(l=this._locales)||void 0===l?void 0:l.TEXT_SELECT_ALL,c.okButtonText=null===(a=this._locales)||void 0===a?void 0:a.TEXT_OK;this.defaultOptions=c,this.init()}get collection(){var e,t;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.collection)&&void 0!==t?t:[]}get collectionOptions(){var e;return null===(e=this.columnEditor)||void 0===e?void 0:e.collectionOptions}get columnDef(){return this.args.column}get columnEditor(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.internalColumnEditor)&&void 0!==t?t:{}}get dataContext(){return this.args.item}get editorDomElement(){return this.$editorElm}get isCompositeEditor(){var e;return!!(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)}get customStructure(){var e,t;return null===(t=null===(e=this.columnDef)||void 0===e?void 0:e.internalColumnEditor)||void 0===t?void 0:t.customStructure}get hasAutoCommitEdit(){var e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get currentValues(){var e,t,i,n,o;const s=null===(e=this.$editorElm)||void 0===e?void 0:e.val();if(this.collection.every((e=>"string"==typeof e)))return this.collection.filter((e=>-1!==s.indexOf(null==e?void 0:e.toString())));const r=null!==(i=null===(t=this.collectionOptions)||void 0===t?void 0:t.separatorBetweenTextLabels)&&void 0!==i?i:"",l=null!==(o=null===(n=this.collectionOptions)||void 0===n?void 0:n.includePrefixSuffixToSelectedValues)&&void 0!==o&&o;return this.collection.filter((e=>{var t;return-1!==s.indexOf(e.hasOwnProperty(this.valueName)&&(null===(t=e[this.valueName])||void 0===t?void 0:t.toString()))})).map((e=>{var t,i,n,o;const s=e[this.valueName];let a=e[this.labelPrefixName]||"",d=e[this.labelSuffixName]||"";const u=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.field)&&void 0!==i?i:"",c=(null==u?void 0:u.indexOf("."))>0,h=null!==(o=null===(n=this.columnEditor)||void 0===n?void 0:n.serializeComplexValueFormat)&&void 0!==o?o:"object";return c&&"object"==typeof e&&"object"===h?e:(a=this.enableTranslateLabel&&this._translaterService&&a&&"string"==typeof a?this._translaterService.translate(a||" "):a,d=this.enableTranslateLabel&&this._translaterService&&d&&"string"==typeof d?this._translaterService.translate(d||" "):d,l?[a,s,d].filter((e=>e)).join(r):s)}))}get currentValue(){var e,t,i,n,o,s;const r=this.$editorElm.val(),l=this.columnDef&&this.columnDef.field;if(void 0!==l){if(this.collection.every((e=>"string"==typeof e)))return ft(this.collection,(e=>{var t;return(null===(t=null==e?void 0:e.toString)||void 0===t?void 0:t.call(e))===r}));const a=null!==(t=null===(e=this.collectionOptions)||void 0===e?void 0:e.separatorBetweenTextLabels)&&void 0!==t?t:"",d=null!==(n=null===(i=this.collectionOptions)||void 0===i?void 0:i.includePrefixSuffixToSelectedValues)&&void 0!==n&&n,u=ft(this.collection,(e=>{var t;return e.hasOwnProperty(this.valueName)&&(null===(t=e[this.valueName])||void 0===t?void 0:t.toString())===r})),c=(null==l?void 0:l.indexOf("."))>0,h=null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.serializeComplexValueFormat)&&void 0!==s?s:"object";if(c&&"object"==typeof u&&"object"===h)return u;if(u&&u.hasOwnProperty(this.valueName)){const e=u[this.valueName];if(d){let t=u[this.labelPrefixName]||"",i=u[this.labelSuffixName]||"";return t=this.enableTranslateLabel&&this._translaterService&&t&&"string"==typeof t?this._translaterService.translate(t||" "):t,i=this.enableTranslateLabel&&this._translaterService&&i&&"string"==typeof i?this._translaterService.translate(i||" "):i,[t,e,i].filter((e=>e)).join(a)}return e}}return""}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n,o,s,r,l,a,d,u,c,h;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.\n Also each option should include a value/label pair (or value/labelKey when using Locale).\n For example: { editor: { collection: [{ value: true, label: 'True' },{ value: false, label: 'False'}] } }");if(this._collectionService=new di(this._translaterService),this.enableTranslateLabel=null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.enableTranslateLabel)&&void 0!==t&&t,this.labelName=null!==(n=null===(i=this.customStructure)||void 0===i?void 0:i.label)&&void 0!==n?n:"label",this.labelPrefixName=null!==(s=null===(o=this.customStructure)||void 0===o?void 0:o.labelPrefix)&&void 0!==s?s:"labelPrefix",this.labelSuffixName=null!==(l=null===(r=this.customStructure)||void 0===r?void 0:r.labelSuffix)&&void 0!==l?l:"labelSuffix",this.optionLabel=null!==(d=null===(a=this.customStructure)||void 0===a?void 0:a.optionLabel)&&void 0!==d?d:"value",this.valueName=null!==(c=null===(u=this.customStructure)||void 0===u?void 0:u.value)&&void 0!==c?c:"value",this.enableTranslateLabel&&(!this._translaterService||"function"!=typeof this._translaterService.translate))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||(null===(h=this.columnEditor)||void 0===h?void 0:h.collectionAsync)&&Array.isArray(this.collection)&&0===this.collection.length)&&this.disable(!0)}getValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}setValue(e,t=!1,i=!0){if(this.isMultipleSelect&&Array.isArray(e)?this.loadMultipleValues(e):this.loadSingleValue(e),t){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(e,"system")}}hide(){this.$editorElm&&"function"==typeof this.$editorElm.multipleSelect&&this.$editorElm.multipleSelect("close")}show(){!this.isCompositeEditor&&this.$editorElm&&"function"==typeof this.$editorElm.multipleSelect?this.$editorElm.multipleSelect("open"):this.isCompositeEditor&&this.applyInputUsabilityState()}applyValue(e,t){var i,n,o;const s=this.columnDef&&this.columnDef.field,r=this.columnDef&&this.columnDef.type;let l=t;if(void 0!==s){r!==fe.number&&r!==fe.integer&&r!==fe.boolean||isNaN(parseFloat(t))||(l=parseFloat(t)),this.isMultipleSelect&&"string"==typeof t&&t.indexOf(",")>=0&&(l=t.split(","));const a=(null==s?void 0:s.indexOf("."))>0,d=this.validate(null,l);l=(null==d?void 0:d.valid)?l:"",a?dt(e,null!==(o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.complexObjectPath)&&void 0!==n?n:s)&&void 0!==o?o:"",l):e[s]=l}}destroy(){if(this.$editorElm&&this.hasAutoCommitEdit&&this.isValueChanged()&&!this._isDisposing&&!this.isCompositeEditor&&(this._isDisposing=!0,this.save(!0)),this._isDisposing=!0,this.$editorElm&&"function"==typeof this.$editorElm.multipleSelect){this.$editorElm.multipleSelect("destroy"),this.$editorElm.remove();const e=this.elementName.toString().replace(".","\\.");$(`[name=${e}].ms-drop`).remove(),this.$editorElm.remove(),this.$editorElm=null}}loadValue(e){var t,i;const n=this.columnDef&&this.columnDef.field,o=void 0!==n&&(null==n?void 0:n.indexOf("."))>0;if(e&&void 0!==n){const s=null!==(i=null===(t=this.columnEditor)||void 0===t?void 0:t.complexObjectPath)&&void 0!==i?i:n,r=o?Ke(e,s):e.hasOwnProperty(n)&&e[n],l=o&&(null==r?void 0:r.hasOwnProperty(this.valueName))?r[this.valueName]:r;this.isMultipleSelect&&Array.isArray(l)?this.loadMultipleValues(l):this.loadSingleValue(l),this.refresh()}}loadMultipleValues(e){if(Array.isArray(e)){this.originalValue=e.map((e=>e)),this.$editorElm.multipleSelect("setSelects",e);const t=this.args.compositeEditorOptions;t&&this.handleChangeOnCompositeEditor(t)}}loadSingleValue(e){this.originalValue="number"==typeof e?`${e}`:e,this.$editorElm.val(e),this.$editorElm.multipleSelect("setSelects",[e])}serializeValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}changeEditorOption(e,t){this.columnEditor&&(this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[e]=t,this.editorElmOptions={...this.editorElmOptions,[e]:t},this.$editorElm.multipleSelect("refreshOptions",this.editorElmOptions))}disable(e=!0){const t=this.disabled;if(this.disabled=e,this.$editorElm)if(e){this.$editorElm.multipleSelect("disable");const i=this.getValue(),n=this.isMultipleSelect?i===[""]:""===i;t!==e&&this.isCompositeEditor&&!n&&this.reset("",!0,!0)}else this.$editorElm.multipleSelect("enable")}focus(){this.$editorElm&&this.$editorElm.multipleSelect&&this.$editorElm.multipleSelect("focus")}isValueChanged(){var e;const t=null===(e=this.$editorElm)||void 0===e?void 0:e.multipleSelect("getSelects");if(this.isMultipleSelect)return!mi(t,this.originalValue);const i=Array.isArray(t)&&t.length>0?t[0]:void 0;return void 0!==i&&i!==this.originalValue}isValueTouched(){return this._isValueTouched}reset(e,t=!0,i=!1){const n=null!=e?e:this.originalValue;if(this.$editorElm){this.originalValue=this.isMultipleSelect?void 0!==n?[n]:[]:n;const e=void 0===this.originalValue?[]:[this.originalValue];this.$editorElm.multipleSelect("setSelects",e)}this._isValueTouched=!1;const o=this.args.compositeEditorOptions;if(o&&t){const e=!i;this.handleChangeOnCompositeEditor(o,"user",e)}}save(e=!1){var t;const i=this.validate(),n=null!==(t=null==i?void 0:i.valid)&&void 0!==t&&t;(!this._isDisposing||e)&&this.hasAutoCommitEdit&&n?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}validate(e,t){var i;const n=!this.isCompositeEditor&&(null===(i=this.columnEditor)||void 0===i?void 0:i.required),o=void 0!==t?t:this.$editorElm&&this.$editorElm.val&&this.$editorElm.val(),s=this.columnEditor&&this.columnEditor.errorMessage;if(this.isCompositeEditor&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(this.validator){const e=void 0!==t?t:this.isMultipleSelect?this.currentValues:this.currentValue;return this.validator(e,this.args)}return n&&(""===o||Array.isArray(o)&&0===o.length)?{valid:!1,msg:s||me.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}filterCollection(e){var t,i;let n=e;if(this.columnEditor&&this.columnEditor.collectionFilterBy){const e=this.columnEditor.collectionFilterBy,o=null!==(i=null===(t=this.columnEditor.collectionOptions)||void 0===t?void 0:t.filterResultAfterEachPass)&&void 0!==i?i:null;n=this._collectionService.filterCollection(n,e,o)}return n}sortCollection(e){let t=e;if(this.columnDef&&this.columnEditor&&this.columnEditor.collectionSortBy){const e=this.columnEditor.collectionSortBy;t=this._collectionService.sortCollection(this.columnDef,t,e,this.enableTranslateLabel)}return t}renderDomElement(e){var t,i,n,o,s;if(!Array.isArray(e)&&(null===(t=this.collectionOptions)||void 0===t?void 0:t.collectionInsideObjectProperty)&&(e=Ke(e,this.collectionOptions.collectionInsideObjectProperty)),!Array.isArray(e))throw new Error('The "collection" passed to the Select Editor is not a valid array.');let r=[];e.length>0&&(r=[...e]),(null===(i=this.collectionOptions)||void 0===i?void 0:i.addBlankEntry)&&Array.isArray(r)&&r.length>0&&""!==r[0][this.valueName]&&(r.unshift(this.createBlankEntry()),this.collection.unshift(this.createBlankEntry())),(null===(n=this.collectionOptions)||void 0===n?void 0:n.addCustomFirstEntry)&&Array.isArray(r)&&r.length>0&&r[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&(r.unshift(this.collectionOptions.addCustomFirstEntry),this.collection.unshift(this.collectionOptions.addCustomFirstEntry)),(null===(o=this.collectionOptions)||void 0===o?void 0:o.addCustomLastEntry)&&Array.isArray(r)&&r.length>0&&r[r.length-1][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&r.push(this.collectionOptions.addCustomLastEntry);let l=r;if(l=this.filterCollection(l),l=this.sortCollection(l),null===(s=this.columnEditor)||void 0===s?void 0:s.collectionOverride){const e={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:t,modalType:i}=this.args.compositeEditorOptions;e.compositeEditorOptions={formValues:t,modalType:i}}l=this.columnEditor.collectionOverride(l,e)}this.finalCollection=l;const a=ui("editor",l,this.columnDef,this.grid,this.isMultipleSelect,this._translaterService);this.createDomElement(a.selectElement)}createBlankEntry(){const e={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(e[this.labelPrefixName]=""),this.labelSuffixName&&(e[this.labelSuffixName]=""),e}createDomElement(e){var t,i;this.$editorElm=$(e),this.$editorElm&&"function"==typeof this.$editorElm.appendTo&&($(this.args.container).empty(),this.$editorElm.appendTo(this.args.container));const n=null!==(i=null===(t=this.columnEditor)||void 0===t?void 0:t.placeholder)&&void 0!==i?i:"";if(this.defaultOptions.placeholder=n||"","function"==typeof this.$editorElm.multipleSelect){const e=this.columnDef&&this.columnDef.internalColumnEditor?this.columnDef.internalColumnEditor.editorOptions:{};this.editorElmOptions={...this.defaultOptions,...e},this.$editorElm=this.$editorElm.multipleSelect(this.editorElmOptions),this.isCompositeEditor||setTimeout((()=>this.show()))}}handleChangeOnCompositeEditor(e,t="user",i=!1){var n,o,s,r,l;const a=this.grid.getActiveCell(),d=this.args.column,u=null!==(o=null===(n=this.columnDef)||void 0===n?void 0:n.id)&&void 0!==o?o:"",c=this.dataContext,h=this.grid,p=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,p),this.applyValue(e.formValues,p);const m=null!==(l=null===(r=null===(s=this.gridOptions)||void 0===s?void 0:s.compositeEditorOptions)||void 0===r?void 0:r.excludeDisabledFieldFormValues)&&void 0!==l&&l;(i||this.disabled&&m&&e.formValues.hasOwnProperty(u))&&delete e.formValues[u],h.onCompositeEditorChange.notify({...a,item:c,grid:h,column:d,formValues:e.formValues,editors:e.editors,triggeredBy:t},new Slick.EventData)}refresh(){"function"==typeof this.$editorElm.multipleSelect&&this.$editorElm.multipleSelect("refresh")}}const rn={autoComplete:class{constructor(e){if(this.args=e,this._isValueTouched=!1,this._lastTriggeredByClearInput=!1,this.disabled=!1,this.forceUserInput=!1,this.finalCollection=[],!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.init()}get autoCompleteOptions(){return this._autoCompleteOptions||{}}get collection(){var e,t;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.collection)&&void 0!==t?t:[]}get editorDomElement(){return this._$input}get elementCollection(){return this._elementCollection}get columnDef(){return this.args.column}get columnEditor(){var e;return(null===(e=this.columnDef)||void 0===e?void 0:e.internalColumnEditor)||{}}get customStructure(){var e,t,i,n,o,s;let r=null===(e=this.columnEditor)||void 0===e?void 0:e.customStructure;const l=null!==(i=null===(t=this.columnEditor)||void 0===t?void 0:t.type)&&void 0!==i?i:null===(n=this.columnDef)||void 0===n?void 0:n.type;return!r&&l===fe.object&&(null===(o=this.columnDef)||void 0===o?void 0:o.dataKey)&&(null===(s=this.columnDef)||void 0===s?void 0:s.labelKey)&&(r={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),r}get dataContext(){return this.args.item}get editorOptions(){var e;return(null===(e=this.columnEditor)||void 0===e?void 0:e.editorOptions)||{}}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get instance(){return this._$input.autocomplete("instance")}get hasAutoCommitEdit(){var e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e;this.labelName=this.customStructure&&this.customStructure.label||"label",this.valueName=this.customStructure&&this.customStructure.value||"value",this.labelPrefixName=this.customStructure&&this.customStructure.labelPrefix||"labelPrefix",this.labelSuffixName=this.customStructure&&this.customStructure.labelSuffix||"labelSuffix";const t=this.columnEditor.collection||[];this.renderDomElement(t),(this.disabled||(null===(e=this.columnEditor)||void 0===e?void 0:e.collectionAsync)&&Array.isArray(t)&&0===t.length)&&this.disable(!0)}destroy(){this._$input&&(this._$input.autocomplete("destroy"),this._$input.off("keydown.nav").remove()),this._$input=null,this._elementCollection=null}changeEditorOption(e,t){this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[e]=t,this._autoCompleteOptions={...this._autoCompleteOptions,[e]:t},this._$input.autocomplete("option",e,t)}disable(e=!0){var t;const i=this.disabled;if(this.disabled=e,this._$input)if(e){this._$input.attr("disabled","disabled");const n=this.getValue();i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&""!==n&&this.clear(!0)}else this._$input.removeAttr("disabled")}focus(){this._$input&&this._$input.focus().select()}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){return this._$input.val()}setValue(e,t=!1,i=!0){var n;let o=e;if(o=e&&e.hasOwnProperty(this.labelName)?e[this.labelName]:e,this._$input.val(o),t){this._currentValue=e,this._defaultTextValue="string"==typeof e?e:null!==(n=null==e?void 0:e[this.labelName])&&void 0!==n?n:"",this.applyValue(this.args.item,this.serializeValue());const t=this.args.compositeEditorOptions;t&&i&&this.handleChangeOnCompositeEditor(null,t,"system")}}applyValue(e,t){var i,n,o;let s=t;const r=this.columnDef&&this.columnDef.field;if(void 0!==r){Array.isArray(this.collection)&&this.collection.length>0&&(s=ft(this.collection,(e=>e&&"object"==typeof t&&e.hasOwnProperty(this.labelName)?(e.hasOwnProperty(this.labelName)&&e[this.labelName].toString())===(t.hasOwnProperty(this.labelName)&&t[this.labelName].toString()):e&&"string"==typeof t&&e.hasOwnProperty(this.labelName)?(e.hasOwnProperty(this.labelName)&&e[this.labelName].toString())===t:e&&e.toString()===t)));const l=(null==r?void 0:r.indexOf("."))>0,a=this.validate(null,s);s=a&&a.valid?s:"",l?dt(e,null!==(o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.complexObjectPath)&&void 0!==n?n:r)&&void 0!==o?o:"",s):e[r]=s}}isValueChanged(){const e=this._$input.val(),t=this._lastInputKeyEvent&&this._lastInputKeyEvent.keyCode;if(this.columnEditor&&this.columnEditor.alwaysSaveOnEnterKey&&t===be.ENTER)return!0;const i=!(""===e&&(null===this._defaultTextValue||void 0===this._defaultTextValue))&&e!==this._defaultTextValue;return this._lastTriggeredByClearInput||i}isValueTouched(){return this._isValueTouched}loadValue(e){var t;const i=this.columnDef&&this.columnDef.field;if(e&&void 0!==i){const n=(null==i?void 0:i.indexOf("."))>0?Ke(e,i):e[i];this._currentValue=n,this._originalValue=n,this._defaultTextValue="string"==typeof n?n:null!==(t=null==n?void 0:n[this.labelName])&&void 0!==t?t:"",this._$input.val(this._defaultTextValue),this._$input.select()}}clear(e=!1){this._$input&&(this._currentValue="",this._defaultTextValue="",this.setValue("",!0)),this._isValueTouched=!0,this._lastTriggeredByClearInput=!0;const t=this.args.compositeEditorOptions;if(t){const i=!e;this.handleChangeOnCompositeEditor(null,t,"user",i)}else this.save()}reset(e,t=!0,i=!1){var n,o;const s=null!==(n=null!=e?e:this._originalValue)&&void 0!==n?n:"";this._$input&&(this._currentValue=s,this._defaultTextValue="string"==typeof s?s:null!==(o=null==s?void 0:s[this.labelName])&&void 0!==o?o:"",this._$input.val(this._defaultTextValue)),this._isValueTouched=!1;const r=this.args.compositeEditorOptions;if(r&&t){const e=!i;this.handleChangeOnCompositeEditor(null,r,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var e,t,i,n,o,s;if(this.editorOptions.forceUserInput){const i=null!==(t=null===(e=this.editorOptions)||void 0===e?void 0:e.minLength)&&void 0!==t?t:3;this._currentValue=this._$input.val().length>i?this._$input.val():this._currentValue}return this.customStructure&&this._currentValue&&this._currentValue.hasOwnProperty(this.valueName)&&(null===(i=this.columnDef)||void 0===i?void 0:i.type)!==fe.object&&(null===(n=this.columnEditor)||void 0===n?void 0:n.type)!==fe.object?this._currentValue[this.valueName]:this._currentValue&&void 0!==this._currentValue.value?(null===(o=this.columnDef)||void 0===o?void 0:o.type)===fe.object||(null===(s=this.columnEditor)||void 0===s?void 0:s.type)===fe.object?{[this.labelName]:this._currentValue.label,[this.valueName]:this._currentValue.value}:this._currentValue.value:this._currentValue}validate(e,t){var i,n;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:Zi(void 0!==t?t:null===(i=this._$input)||void 0===i?void 0:i.val(),{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!(null===(n=this.args)||void 0===n?void 0:n.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a;const d=this.grid.getActiveCell(),u=this.args.column,c=null!==(s=null===(o=this.columnDef)||void 0===o?void 0:o.id)&&void 0!==s?s:"",h=this.dataContext,p=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(t.formValues,m);const f=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;(n||this.disabled&&f&&t.formValues.hasOwnProperty(c))&&delete t.formValues[c],p.onCompositeEditorChange.notify({...d,item:h,grid:p,column:u,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}handleSelect(e,t){var i,n,o,s,r,l;if(t&&t.item){const a=t&&t.item;this._currentValue=a,this._isValueTouched=!0;const d=this.args.compositeEditorOptions,u=null!==(l=null!==(o=null===(n=null===(i=this.columnEditor)||void 0===i?void 0:i.callbacks)||void 0===n?void 0:n.hasOwnProperty("_renderItem"))&&void 0!==o?o:null===(r=null===(s=this.columnEditor)||void 0===s?void 0:s.editorOptions)||void 0===r?void 0:r.renderItem)&&void 0!==l&&l,c="string"==typeof a?a:u?a[this.labelName]:a.label;if(this.setValue(c),d?this.handleChangeOnCompositeEditor(e,d):this.save(),this.editorOptions.onSelect){const i=this.grid.getActiveCell();this.editorOptions.onSelect(e,t,i.row,i.cell,this.args.column,this.args.item)}setTimeout((()=>this._lastTriggeredByClearInput=!1))}return!1}renderCustomItem(e,t){var i,n,o;const s=null!==(o=null===(n=null===(i=this._autoCompleteOptions)||void 0===i?void 0:i.renderItem)||void 0===n?void 0:n.templateCallback(t))&&void 0!==o?o:"",r=at(this.gridOptions,s)||"";return $("<li></li>").data("item.autocomplete",t).append(r).appendTo(e)}renderCollectionItem(e,t){var i,n;const o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.enableRenderHtml)&&void 0!==n&&n,s=(t.labelPrefix||"")+(t.label||"")+(t.labelSuffix||""),r=at(this.gridOptions,s)||"",l=$("<div></div>")[o?"html":"text"](r);return $("<li></li>").data("item.autocomplete",t).append(l).appendTo(e)}renderDomElement(e){var t,i,n,o,s,r,l,a,d;if(!Array.isArray(e))throw new Error('The "collection" passed to the Autocomplete Editor is not a valid array.');const u=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",c=null!==(o=null===(n=this.columnEditor)||void 0===n?void 0:n.placeholder)&&void 0!==o?o:"",h=null!==(r=null===(s=this.columnEditor)||void 0===s?void 0:s.title)&&void 0!==r?r:"";if(this._$input=$(`<input type="text" role="presentation" autocomplete="off" class="autocomplete form-control editor-text editor-${u}" placeholder="${c}" title="${h}" />`).appendTo(this.args.container).on("keydown.nav",(e=>{this._lastInputKeyEvent=e,e.keyCode!==be.LEFT&&e.keyCode!==be.RIGHT||e.stopImmediatePropagation()})),this._$input&&"function"==typeof this._$input.appendTo){this._$editorInputGroupElm=$('<div class="autocomplete-container input-group"></div>'),this._$editorInputGroupElm.appendTo(this.args.container),this._$input.appendTo(this._$editorInputGroupElm),this._$input.addClass("input-group-editor");const e=$('<span class="input-group-btn input-group-append" data-clear></span>');this._$closeButtonGroupElm=$('<button class="btn btn-default icon-clear" type="button"></button>'),$("<span></span>").appendTo(this._$editorInputGroupElm),(null===(a=null===(l=this.columnEditor)||void 0===l?void 0:l.params)||void 0===a?void 0:a.hideClearButton)||(this._$closeButtonGroupElm.appendTo(e),e.appendTo(this._$editorInputGroupElm),this._$closeButtonGroupElm.on("click",this.clear.bind(this)))}const p=this.columnEditor.editorOptions;let m=e;if(null===(d=this.columnEditor)||void 0===d?void 0:d.collectionOverride){const e={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:t,modalType:i}=this.args.compositeEditorOptions;e.compositeEditorOptions={formValues:t,modalType:i}}m=this.columnEditor.collectionOverride(m,e)}if(this.finalCollection=m,Array.isArray(m)&&(m=m.map((e=>({label:e[this.labelName],value:e[this.valueName],labelPrefix:e[this.labelPrefixName]||"",labelSuffix:e[this.labelSuffixName]||""})))),this._elementCollection=m,null==p?void 0:p.source)p.select=(e,t)=>this.handleSelect(e,t),this._autoCompleteOptions={...p},this._autoCompleteOptions.renderItem&&(this._autoCompleteOptions.classes={"ui-autocomplete":`autocomplete-custom-${pt(this._autoCompleteOptions.renderItem.layout)}`}),this._$input.autocomplete(this._autoCompleteOptions),this._autoCompleteOptions.renderItem&&(this._$input.autocomplete("instance")._renderItem=this.renderCustomItem.bind(this));else{const e={source:m,minLength:0,select:(e,t)=>this.handleSelect(e,t)};this._autoCompleteOptions={...e,...this.columnEditor.editorOptions},this._$input.autocomplete(this._autoCompleteOptions),this._$input.autocomplete("instance")._renderItem=this.renderCollectionItem.bind(this)}if(this.columnEditor.alwaysSaveOnEnterKey&&this._$input.keydown((e=>{e.keyCode===be.ENTER&&(this._currentValue=null)})),this.columnEditor.callbacks)for(const e of Object.keys(this.columnEditor.callbacks))"function"==typeof this.columnEditor.callbacks[e]&&(this.instance[e]=this.columnEditor.callbacks[e]);this._$input.on("focus",(()=>{this._$input.select(),this.editorOptions.openSearchListOnFocus&&this._$input.autocomplete("search",this._$input.val())})),this.args.compositeEditorOptions||setTimeout((()=>this.focus()),50)}},checkbox:class{constructor(e){if(this.args=e,this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new oi,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 e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n,o,s,r;const l=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",a=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.title)&&void 0!==n?n:"",d=this.args.compositeEditorOptions;this._checkboxContainerElm=document.createElement("div"),this._checkboxContainerElm.className=`checkbox-editor-container editor-${l}`,this._input=document.createElement("input"),this._input.className=`editor-checkbox editor-${l}`,this._input.title=a,this._input.type="checkbox",this._input.value="true",this._input.setAttribute("aria-label",null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.ariaLabel)&&void 0!==s?s:`${mt(l+"")} Checkbox Editor`);const u=null===(r=this.args)||void 0===r?void 0:r.container;u&&"function"==typeof u.appendChild&&(d?(this._checkboxContainerElm.appendChild(this._input),u.appendChild(this._checkboxContainerElm)):u.appendChild(this._input)),this.hasAutoCommitEdit&&!d&&this._bindEventService.bind(this._input,"click",(()=>{this._isValueTouched=!0,this.save()})),d?this._bindEventService.bind(this._input,"change",(e=>{this._isValueTouched=!0,this.handleChangeOnCompositeEditor(e,d)})):this.focus()}destroy(){var e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this._input)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}disable(e=!0){var t;const i=this.disabled;if(this.disabled=e,this._input)if(e){this._input.setAttribute("disabled","disabled"),this._checkboxContainerElm.classList.add("disabled");const n=this.getValue();i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&!1!==n&&this.reset(!1,!0,!0)}else this._input.removeAttribute("disabled"),this._checkboxContainerElm.classList.remove("disabled")}focus(){this._input&&this._input.focus()}preClick(){this._input&&(this._input.checked=!this._input.checked)}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var e,t;return null!==(t=null===(e=this._input)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setValue(e,t=!1,i=!0){const n=!!e;if(this._input&&(this._input.checked=n),t){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(null,e,"system")}}applyValue(e,t){var i,n,o;const s=this.columnDef&&this.columnDef.field;if(void 0!==s){const r=(null==s?void 0:s.indexOf("."))>0,l=this.validate(null,t),a=l&&l.valid?t:"";r?dt(e,null!==(o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.complexObjectPath)&&void 0!==n?n:s)&&void 0!==o?o:"",a):e[s]=a}}isValueChanged(){return this.serializeValue()!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){const t=this.columnDef&&this.columnDef.field;if(e&&void 0!==t&&this._input){const i=(null==t?void 0:t.indexOf("."))>0?Ke(e,t):e[t];this._originalValue=i,this._input.checked=!!this._originalValue}}reset(e,t=!0,i=!1){var n;const o=null!==(n=null!=e?e:this._originalValue)&&void 0!==n&&n;this._input&&(this._originalValue=o,this._input.checked=!!o),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&t){const e=!i;this.handleChangeOnCompositeEditor(null,s,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var e,t;return null!==(t=null===(e=this._input)||void 0===e?void 0:e.checked)&&void 0!==t&&t}validate(e,t){var i,n;const o=!(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&this.columnEditor.required,s=void 0!==t?t:null===(n=this._input)||void 0===n?void 0:n.checked,r=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:r||me.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a;const d=this.grid.getActiveCell(),u=this.args.column,c=null!==(s=null===(o=this.columnDef)||void 0===o?void 0:o.id)&&void 0!==s?s:"",h=this.dataContext,p=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(t.formValues,m);const f=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;(n||this.disabled&&f&&t.formValues.hasOwnProperty(c))&&delete t.formValues[c],p.onCompositeEditorChange.notify({...d,item:h,grid:p,column:u,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}},date:class{constructor(e){var t;if(this.args=e,this._isValueTouched=!1,this._lastTriggeredByClearDate=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},(null===(t=this.gridOptions)||void 0===t?void 0:t.translater)&&(this._translaterService=this.gridOptions.translater),this._bindEventService=new oi,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 e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get pickerOptions(){return this._pickerMergedOptions}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n,o,s,r,l,a;if(this.args&&this.columnDef){const d=this.args.compositeEditorOptions,u=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",c=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.placeholder)&&void 0!==n?n:"",h=this.columnEditor&&this.columnEditor.title||"",p=this.args.grid.getOptions()||{};this.defaultDate=this.args.item?this.args.item[this.columnDef.field]:null;const m=Je(this.columnEditor.type||this.columnDef.type||fe.dateUtc),f=Je(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||fe.dateUtc);let g=(null===(s=null===(o=this._translaterService)||void 0===o?void 0:o.getCurrentLanguage)||void 0===s?void 0:s.call(o))||p.locale||"en";g.length>2&&(g=g.substring(0,2));const v={defaultDate:this.defaultDate,altInput:!0,altFormat:f,dateFormat:m,closeOnSelect:!0,wrap:!0,locale:g,onChange:()=>this.handleOnDateChange(),errorHandler:e=>{e.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${g}), will revert to English as the default locale.\n 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={...v,...this.editorOptions};const _=`.editor-text.editor-${u}.form-control`;this._pickerMergedOptions.altInput&&(this._pickerMergedOptions.altInputClass="flatpickr-alt-input form-control"),this._editorInputGroupElm=document.createElement("div"),this._editorInputGroupElm.className="flatpickr input-group";const C=document.createElement("span");C.className="input-group-btn input-group-append",C.dataset.clear="",this._closeButtonElm=document.createElement("button"),this._closeButtonElm.type="button",this._closeButtonElm.className="btn btn-default icon-clear",this._inputElm=document.createElement("input"),this._inputElm.dataset.input="",this._inputElm.dataset.defaultdate=this.defaultDate,this._inputElm.className=_.replace(/\./g," "),this._inputElm.placeholder=c,this._inputElm.title=h,this._editorInputGroupElm.appendChild(this._inputElm),(null===(l=null===(r=this.columnEditor)||void 0===r?void 0:r.params)||void 0===l?void 0:l.hideClearButton)||(C.appendChild(this._closeButtonElm),this._editorInputGroupElm.appendChild(C),this._bindEventService.bind(this._closeButtonElm,"click",(()=>this._lastTriggeredByClearDate=!0))),this.args.container.appendChild(this._editorInputGroupElm),this.flatInstance=Ji(this._editorInputGroupElm,this._pickerMergedOptions),this._inputWithDataElm=(null===(a=this._pickerMergedOptions)||void 0===a?void 0:a.altInput)?document.querySelector(`${_}.flatpickr-alt-input`):this._inputElm,d||setTimeout((()=>{this.show(),this.focus()}),50)}}destroy(){var e,t,i,n,o,s,r,l;this.hide(),this._bindEventService.unbindAll(),(null===(e=this.flatInstance)||void 0===e?void 0:e.destroy)&&(this.flatInstance.destroy(),(null===(t=this.flatInstance)||void 0===t?void 0:t.element)&&setTimeout((()=>qe(this.flatInstance)))),Le(this._editorInputGroupElm),Le(this._inputWithDataElm),Le(this._inputElm),null===(n=null===(i=this._editorInputGroupElm)||void 0===i?void 0:i.remove)||void 0===n||n.call(i),null===(s=null===(o=this._inputWithDataElm)||void 0===o?void 0:o.remove)||void 0===s||s.call(o),null===(l=null===(r=this._inputElm)||void 0===r?void 0:r.remove)||void 0===l||l.call(r)}disable(e=!0){var t,i;const n=this.disabled;if(this.disabled=e,null===(t=this.flatInstance)||void 0===t?void 0:t._input)if(e){this.flatInstance._input.setAttribute("disabled","disabled"),this._closeButtonElm.disabled=!0;const t=this.getValue();n!==e&&(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&""!==t&&this.reset("",!0,!0)}else this.flatInstance._input.removeAttribute("disabled"),this._closeButtonElm.disabled=!1}changeEditorOption(e,t){this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[e]=t,this._pickerMergedOptions={...this._pickerMergedOptions,[e]:t},this.flatInstance.set(e,t)}focus(){var e,t;(null===(e=this._inputElm)||void 0===e?void 0:e.focus)&&this._inputElm.focus(),(null===(t=this._inputWithDataElm)||void 0===t?void 0:t.focus)&&(this._inputWithDataElm.focus(),this._inputWithDataElm.select())}hide(){this.flatInstance&&"function"==typeof this.flatInstance.close&&this.flatInstance.close()}show(){var e;const t=!!(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions);!t&&this.flatInstance&&"function"==typeof this.flatInstance.open&&this.flatInstance._input?this.flatInstance.open():t&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(e,t=!1,i=!0){if(this.flatInstance.setDate(e),t){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(e,"system")}}applyValue(e,t){var i,n,o;const s=this.columnDef&&this.columnDef.field;if(void 0!==s){const r=Ze(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||fe.dateUtc),l=Ze(this.columnDef&&(this.columnDef.saveOutputType||this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||fe.dateUtc),a=(null==s?void 0:s.indexOf("."))>0,d=this.validate(null,t),u=t&&d&&d.valid?en(t,r).format(l):"";a?dt(e,null!==(o=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.complexObjectPath)&&void 0!==n?n:s)&&void 0!==o?o:"",u):e[s]=u}}isValueChanged(){var e;const t=this._inputElm.value,i=Ze(this.columnEditor.type||(null===(e=this.columnDef)||void 0===e?void 0:e.type)||fe.dateIso),n=Ze(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||fe.dateUtc),o=t?en(t,i,!1).format(n):"",s=this._originalDate?en(this._originalDate,i,!1).format(n):"";return"Invalid date"!==o&&"Invalid date"!==s&&(this._lastTriggeredByClearDate||!(""===o&&""===s)&&o!==s)}isValueTouched(){return this._isValueTouched}loadValue(e){const t=this.columnDef&&this.columnDef.field;if(e&&void 0!==t){const i=(null==t?void 0:t.indexOf("."))>0?Ke(e,t):e[t];this._originalDate=i,this.flatInstance.setDate(i)}}reset(e,t=!0,i=!1){var n;const o=null!==(n=null!=e?e:this._originalDate)&&void 0!==n?n:"";this.flatInstance&&(this._originalDate=o,this.flatInstance.setDate(o),o||this.flatInstance.clear()),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&t){const e=!i;this.handleChangeOnCompositeEditor(s,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var e;const t=this._inputElm.value;if(!t)return"";const i=Ze(this.columnEditor.type||(null===(e=this.columnDef)||void 0===e?void 0:e.type)||fe.dateIso),n=Ze(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||fe.dateIso);return en(t,i,!1).format(n)}validate(e,t){var i,n;const o=!(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&this.columnEditor.required,s=void 0!==t?t:null===(n=this._inputElm)||void 0===n?void 0:n.value,r=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:r||me.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleOnDateChange(){var e,t;this._isValueTouched=!0;const i=null!==(t=null===(e=this.flatInstance)||void 0===e?void 0:e.config)&&void 0!==t?t:this._pickerMergedOptions;if(this.args&&(null==i?void 0:i.closeOnSelect)){const e=this.args.compositeEditorOptions;e?this.handleChangeOnCompositeEditor(e):this.save()}setTimeout((()=>this._lastTriggeredByClearDate=!1))}handleChangeOnCompositeEditor(e,t="user",i=!1){var n,o,s,r,l;const a=this.grid.getActiveCell(),d=this.args.column,u=null!==(o=null===(n=this.columnDef)||void 0===n?void 0:n.id)&&void 0!==o?o:"",c=this.dataContext,h=this.grid,p=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,p),this.applyValue(e.formValues,p);const m=null!==(l=null===(r=null===(s=this.gridOptions)||void 0===s?void 0:s.compositeEditorOptions)||void 0===r?void 0:r.excludeDisabledFieldFormValues)&&void 0!==l&&l;(i||this.disabled&&m&&e.formValues.hasOwnProperty(u))&&delete e.formValues[u],h.onCompositeEditorChange.notify({...a,item:c,grid:h,column:d,formValues:e.formValues,editors:e.editors,triggeredBy:t},new Slick.EventData)}},dualInput:class{constructor(e){if(this.args=e,this._isValueSaveCalled=!1,this._isLeftValueTouched=!1,this._isRightValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._eventHandler=new Slick.EventHandler,this._bindEventService=new oi,this.init();const t=this.grid.onValidationError;this._eventHandler.subscribe(t,(()=>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 e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get isValueSaveCalled(){return this._isValueSaveCalled}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n;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=null===(e=this.editorParams.leftInput)||void 0===e?void 0:e.field,this._rightFieldName=null===(t=this.editorParams.rightInput)||void 0===t?void 0:t.field,this._leftInput=this.createInput("leftInput"),this._rightInput=this.createInput("rightInput");const o=null===(i=this.args)||void 0===i?void 0:i.container;o&&"function"==typeof o.appendChild&&(o.appendChild(this._leftInput),o.appendChild(this._rightInput)),this._bindEventService.bind(this._leftInput,"keydown",(e=>this.handleKeyDown(e,"leftInput"))),this._bindEventService.bind(this._rightInput,"keydown",(e=>this.handleKeyDown(e,"rightInput"))),this.hasAutoCommitEdit&&(this._bindEventService.bind(this._leftInput,"focusout",(e=>this.handleFocusOut(e,"leftInput"))),this._bindEventService.bind(this._rightInput,"focusout",(e=>this.handleFocusOut(e,"rightInput")))),(null===(n=this.args)||void 0===n?void 0:n.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(e,t){var i;const n=(null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||"";this.args.compositeEditorOptions||-1!==n.indexOf("dual-editor")||"focusout-right"===this._lastEventType||("rightInput"===t||"leftInput"===t&&"focusout-left"!==this._lastEventType)&&("leftInput"===t?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this.save());const o="leftInput"===t?"left":"right";this._lastEventType=`${null==e?void 0:e.type}-${o}`}handleKeyDown(e,t){"leftInput"===t?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this._lastInputKeyEvent=e,e.keyCode!==be.LEFT&&e.keyCode!==be.RIGHT&&e.keyCode!==be.TAB||e.stopImmediatePropagation()}destroy(){var e,t,i,n;this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),null===(t=null===(e=this._leftInput)||void 0===e?void 0:e.remove)||void 0===t||t.call(e),null===(n=null===(i=this._rightInput)||void 0===i?void 0:i.remove)||void 0===n||n.call(i)}createInput(e){var t,i,n,o,s;const r=this.editorParams[e],l=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.id)&&void 0!==i?i:"",a=this.gridOptions.datasetIdPropertyName||"id",d=(null===(n=this.args)||void 0===n?void 0:n.item[a])||0;let u=r.type||"text";"float"!==u&&"integer"!==u||(u="number");const c=document.createElement("input");return c.id=`item-${d}-${e}`,c.className=`dual-editor-text editor-${l} ${e.replace(/input/gi,"")}`,"readonly"===u&&(c.readOnly=!0,u="text"),c.type=u||"text",c.setAttribute("role","presentation"),c.setAttribute("aria-label",null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.ariaLabel)&&void 0!==s?s:`${mt(l+"")} Input Editor`),c.autocomplete="off",c.placeholder=r.placeholder||"",c.title=r.title||"","number"===u&&(c.step=this.getInputDecimalSteps(e)),c}disable(e=!0){var t;const i=this.disabled;this.disabled=e,this._leftInput&&this._rightInput&&(e?(this._leftInput.setAttribute("disabled","disabled"),this._rightInput.setAttribute("disabled","disabled"),i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&this.reset("",!0,!0)):(this._leftInput.removeAttribute("disabled"),this._rightInput.removeAttribute("disabled")))}focus(){}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)&&this.applyInputUsabilityState()}getValues(){const e={},t=this._leftInput.value,i=this._rightInput.value,n=this.editorParams.leftInput&&("float"===this.editorParams.leftInput.type||"integer"===this.editorParams.leftInput.type),o=this.editorParams.rightInput&&("float"===this.editorParams.rightInput.type||"integer"===this.editorParams.rightInput.type),s=""!==t&&n?+this._leftInput.value:t||"",r=""!==i&&o?+this._rightInput.value:i||"";return dt(e,this._leftFieldName,s),dt(e,this._rightFieldName,r),e}setValues(e){Array.isArray(e)&&2===e.length&&(this._leftInput.value=`${e[0]}`,this._rightInput.value=`${e[1]}`)}applyValue(e,t){this.applyValueByPosition(e,t,"leftInput"),this.applyValueByPosition(e,t,"rightInput")}applyValueByPosition(e,t,i){var n,o,s;const r="leftInput"===i?this._leftFieldName:this._rightFieldName;if(void 0!==r){const l=(null==r?void 0:r.indexOf("."))>0;let a=r;if(l){const e=r.split(/\.(.*)/);a=e.length>1?e[1]:e}const d=l?Ke(t,a):t[r],u=this.validate(null,{position:i,inputValue:d});if(l){const i=Ke(t,a),l=u&&u.valid?i:"";dt(e,null!==(s=null!==(o=null===(n=this.columnEditor)||void 0===n?void 0:n.complexObjectPath)&&void 0!==o?o:r)&&void 0!==s?s:"",l)}else r&&(e[r]=u&&u.valid?t[r]:"")}}isValueChanged(){const e=this._leftInput.value,t=this._rightInput.value,i=this.editorParams&&this.editorParams.leftInput,n=this.editorParams&&this.editorParams.rightInput,o=this._lastInputKeyEvent&&this._lastInputKeyEvent.keyCode;if((i&&i.alwaysSaveOnEnterKey||n&&n.alwaysSaveOnEnterKey)&&o===be.ENTER)return!0;const s=!(""===e&&(null===this._originalLeftValue||void 0===this._originalLeftValue))&&e!==this._originalLeftValue,r=!(""===t&&(null===this._originalRightValue||void 0===this._originalRightValue))&&t!==this._originalRightValue;return s||r}isValueTouched(){return this._isLeftValueTouched||this._isRightValueTouched}loadValue(e){this.loadValueByPosition(e,"leftInput"),this.loadValueByPosition(e,"rightInput"),this._leftInput.select()}loadValueByPosition(e,t){const i="leftInput"===t?this._leftFieldName:this._rightFieldName,n="leftInput"===t?"_originalLeftValue":"_originalRightValue",o="leftInput"===t?"_leftInput":"_rightInput";if(e&&void 0!==i){const s=(null==i?void 0:i.indexOf("."))>0?Ke(e,i):e.hasOwnProperty(i)?e[i]:"";if(this[n]=s,"float"===this.editorParams[t].type){const e=this.getDecimalPlaces(t);null!==e&&(this[n]||0===this[n])&&(+this[n]).toFixed&&(this[n]=(+this[n]).toFixed(e))}this[o]&&(this[o].value=`${this[n]}`)}}reset(e,t=!0,i=!1){var n,o;const s=null!==(n=null!=e?e:this._originalLeftValue)&&void 0!==n?n:"",r=null!==(o=null!=e?e:this._originalRightValue)&&void 0!==o?o:"";this._leftInput&&this._rightInput&&(this._originalLeftValue=s,this._originalRightValue=r,this._leftInput.value=`${s}`,this._rightInput.value=`${r}`),this._isLeftValueTouched=!1,this._isRightValueTouched=!1;const l=this.args.compositeEditorOptions;if(l&&t){const e=!i;this.handleChangeOnCompositeEditor(null,l,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this._isValueSaveCalled||(this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges(),this._isValueSaveCalled=!0)}serializeValue(){const e={},t=this.serializeValueByPosition("leftInput"),i=this.serializeValueByPosition("rightInput");return dt(e,this._leftFieldName,t),dt(e,this._rightFieldName,i),e}serializeValueByPosition(e){const t="leftInput"===e?this._leftInput.value:this._rightInput.value;if(""===t||isNaN(+t))return t;let i=parseFloat(t);const n=this.getDecimalPlaces(e);return null!==n&&(i||0===i)&&i.toFixed&&(i=parseFloat(i.toFixed(n))),i}getDecimalPlaces(e){const t="leftInput"===e?"leftInput":"rightInput",i=this.editorParams[t],n=null==i?void 0:i.decimal;return void 0===n?0:n}getInputDecimalSteps(e){const t=this.getDecimalPlaces(e);let i="";for(let e=1;e<t;e++)i+="0";return t>0?`0.${i}1`:"1"}validate(e,t){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(t){const e=this.validateByPosition(t.position,t.inputValue);if(!e.valid)return"leftInput"===t.position?this._leftInput.select():this._rightInput.select(),e}else{const e=this.validateByPosition("leftInput"),t=this.validateByPosition("rightInput");if(!e.valid)return this._leftInput.select(),e;if(!t.valid)return this._rightInput.select(),t}return{valid:!0,msg:""}}validateByPosition(e,t){var i;const n=this.editorParams[e];let o="";if(t)o=t;else{const t="leftInput"===e?this._leftInput:this._rightInput;o=t&&t.value}const s=this.validator;o="function"==typeof s?this.getValues():o;const r={editorArgs:this.args,errorMessage:n.errorMessage,required:!(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&n.required,validator:"function"==typeof s?s:n.validator};switch(n.type){case"float":return tn(o,{...r,decimal:this.getDecimalPlaces(e),minValue:n.minValue,maxValue:n.maxValue,operatorConditionalType:n.operatorConditionalType});case"integer":return nn(o,{...r,minValue:n.minValue,maxValue:n.maxValue,operatorConditionalType:n.operatorConditionalType});case"text":case"password":default:return Zi(o,r)}}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a,d,u,c,h;const p=this.grid.getActiveCell(),m=this.args.column,f=null!==(r=null===(s=null===(o=this.columnEditor.params)||void 0===o?void 0:o.leftInput)||void 0===s?void 0:s.field)&&void 0!==r?r:"",g=null!==(d=null===(a=null===(l=this.columnEditor.params)||void 0===l?void 0:l.rightInput)||void 0===a?void 0:a.field)&&void 0!==d?d:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(t.formValues,C);const b=null!==(h=null===(c=null===(u=this.gridOptions)||void 0===u?void 0:u.compositeEditorOptions)||void 0===c?void 0:c.excludeDisabledFieldFormValues)&&void 0!==h&&h;(n||this.disabled&&b&&t.formValues.hasOwnProperty(f))&&delete t.formValues[f],(n||this.disabled&&b&&t.formValues.hasOwnProperty(g))&&delete t.formValues[g],_.onCompositeEditorChange.notify({...p,item:v,grid:_,column:m,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}handleChangeOnCompositeEditorDebounce(e){var t,i,n;const o=null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions;if(o){const t=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.editorTypingDebounce)&&void 0!==n?n:500;clearTimeout(this._timer),this._timer=setTimeout((()=>this.handleChangeOnCompositeEditor(e,o)),t)}}},float:class extends on{constructor(e){super(e,"number"),this.args=e}init(){var e,t,i,n,o,s,r,l;if(this.columnDef&&this.columnEditor&&this.args){const a=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",d=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.placeholder)&&void 0!==n?n:"",u=null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.title)&&void 0!==s?s:"",c=void 0!==this.columnEditor.valueStep?this.columnEditor.valueStep:this.getInputDecimalSteps(),h=this.args.compositeEditorOptions;this._input=document.createElement("input"),this._input.className=`editor-text editor-${a}`,this._input.type="number",this._input.setAttribute("role","presentation"),this._input.autocomplete="off",this._input.placeholder=d,this._input.title=u,this._input.step=`${c}`,this._input.setAttribute("aria-label",null!==(l=null===(r=this.columnEditor)||void 0===r?void 0:r.ariaLabel)&&void 0!==l?l:`${mt(a+"")} Number Editor`);const p=this.args.container;p&&"function"==typeof p.appendChild&&p.appendChild(this._input),this._bindEventService.bind(this._input,"focus",(()=>{var e;return null===(e=this._input)||void 0===e?void 0:e.select()})),this._bindEventService.bind(this._input,"keydown",(e=>{this._lastInputKeyEvent=e,e.keyCode!==be.LEFT&&e.keyCode!==be.RIGHT||e.stopImmediatePropagation()})),this.hasAutoCommitEdit&&!h&&this._bindEventService.bind(this._input,"focusout",(()=>{this._isValueTouched=!0,this.save()})),h&&(this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._input,"wheel",this.handleOnMouseWheel.bind(this)))}}getDecimalPlaces(){var e,t,i,n,o;let s=null!==(o=null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.decimal)&&void 0!==t?t:null===(n=null===(i=this.columnEditor)||void 0===i?void 0:i.params)||void 0===n?void 0:n.decimalPlaces)&&void 0!==o?o:void 0;return void 0===s&&(s=0),s||0===s?s:null}getInputDecimalSteps(){const e=this.getDecimalPlaces();let t="";for(let i=1;i<e;i++)t+="0";return e>0?`0.${t}1`:"1"}loadValue(e){const t=this.columnDef&&this.columnDef.field;if(void 0!==t&&e&&void 0!==t&&this._input){const i=(null==t?void 0:t.indexOf("."))>0?Ke(e,t):e[t];this._originalValue=i;const n=this.getDecimalPlaces();null!==n&&(this._originalValue||0===this._originalValue)&&(+this._originalValue).toFixed&&(this._originalValue=(+this._originalValue).toFixed(n)),this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){var e;const t=null===(e=this._input)||void 0===e?void 0:e.value;if(void 0===t||""===t||isNaN(+t))return t;let i=parseFloat(t);const n=this.getDecimalPlaces();return null!==n&&(i||0===i)&&i.toFixed&&(i=parseFloat(i.toFixed(n))),i}validate(e,t){var i,n;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:tn(void 0!==t?t:null===(i=this._input)||void 0===i?void 0:i.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,decimal:this.getDecimalPlaces(),minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!(null===(n=this.args)||void 0===n?void 0:n.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}handleOnMouseWheel(e){this._isValueTouched=!0;const t=this.args.compositeEditorOptions;t&&this.handleChangeOnCompositeEditor(e,t)}},integer:class extends on{constructor(e){super(e,"number"),this.args=e}init(){var e,t,i,n,o,s,r,l;if(this.columnDef&&this.columnEditor&&this.args){const a=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",d=null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.placeholder)&&void 0!==n?n:"",u=null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.title)&&void 0!==s?s:"",c=void 0!==this.columnEditor.valueStep?this.columnEditor.valueStep:"1",h=this.args.compositeEditorOptions;this._input=document.createElement("input"),this._input.className=`editor-text editor-${a}`,this._input.type="number",this._input.setAttribute("role","presentation"),this._input.autocomplete="off",this._input.placeholder=d,this._input.title=u,this._input.step=`${c}`,this._input.setAttribute("aria-label",null!==(l=null===(r=this.columnEditor)||void 0===r?void 0:r.ariaLabel)&&void 0!==l?l:`${mt(a+"")} Slider Editor`);const p=this.args.container;p&&"function"==typeof p.appendChild&&p.appendChild(this._input),this._bindEventService.bind(this._input,"focus",(()=>{var e;return null===(e=this._input)||void 0===e?void 0:e.select()})),this._bindEventService.bind(this._input,"keydown",(e=>{this._lastInputKeyEvent=e,e.keyCode!==be.LEFT&&e.keyCode!==be.RIGHT||e.stopImmediatePropagation()})),this.hasAutoCommitEdit&&!h&&this._bindEventService.bind(this._input,"focusout",(()=>{this._isValueTouched=!0,this.save()})),h&&(this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._input,"wheel",this.handleOnMouseWheel.bind(this)))}}loadValue(e){const t=this.columnDef&&this.columnDef.field;if(void 0!==t&&e&&void 0!==t&&this._input){const i=(null==t?void 0:t.indexOf("."))>0?Ke(e,t):e[t];this._originalValue=isNaN(i)||null==i?i:`${i}`,this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){var e;const t=null===(e=this._input)||void 0===e?void 0:e.value;if(void 0===t||""===t||isNaN(+t))return t;const i=isNaN(+t)?t:parseInt(t,10);return isNaN(+i)?t:i}validate(e,t){var i;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:nn(void 0!==t?t:this.getValue(),{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!(null===(i=this.args)||void 0===i?void 0:i.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}handleOnMouseWheel(e){this._isValueTouched=!0;const t=this.args.compositeEditorOptions;t&&this.handleChangeOnCompositeEditor(e,t)}},longText:class{constructor(e){if(this.args=e,this._isValueTouched=!1,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=e.grid&&e.grid.getOptions();const t=this.gridOptions||this.args.column.params||{};(null==t?void 0:t.translater)&&(this._translater=t.translater),this._locales=this.gridOptions&&this.gridOptions.locales||me.locales,this._bindEventService=new oi,this.init()}get columnDef(){return this.args.column}get columnEditor(){var e,t;return null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.internalColumnEditor)&&void 0!==t?t:{}}get dataContext(){return this.args.item}get editorDomElement(){return this._textareaElm}get editorOptions(){var e,t;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.editorOptions)&&void 0!==t?t:{}}get hasAutoCommitEdit(){var e,t;return null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.autoCommitEdit)&&void 0!==t&&t}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_,C,b,y,w,S,E,T;let x="",O="";if(this._translater&&this._translater.translate&&this.gridOptions.enableTranslate){const o=Qe(this.gridOptions),s=null!==(t=null===(e=this.editorOptions.buttonTexts)||void 0===e?void 0:e.cancelKey)&&void 0!==t?t:`${o}CANCEL`,r=null!==(n=null===(i=this.editorOptions.buttonTexts)||void 0===i?void 0:i.saveKey)&&void 0!==n?n:`${o}SAVE`;x=this._translater.translate(`${o}${s}`),O=this._translater.translate(`${o}${r}`)}else x=null!==(l=null!==(s=null===(o=this.editorOptions.buttonTexts)||void 0===o?void 0:o.cancel)&&void 0!==s?s:null===(r=this._locales)||void 0===r?void 0:r.TEXT_CANCEL)&&void 0!==l?l:"Cancel",O=null!==(c=null!==(d=null===(a=this.editorOptions.buttonTexts)||void 0===a?void 0:a.save)&&void 0!==d?d:null===(u=this._locales)||void 0===u?void 0:u.TEXT_SAVE)&&void 0!==c?c:"Save";const k=this.args.compositeEditorOptions,D=null!==(p=null===(h=this.columnDef)||void 0===h?void 0:h.id)&&void 0!==p?p:"",A=null!==(f=null===(m=this.columnEditor)||void 0===m?void 0:m.placeholder)&&void 0!==f?f:"",R=null!==(v=null===(g=this.columnEditor)||void 0===g?void 0:g.title)&&void 0!==v?v:"",I=null===(_=this.columnEditor)||void 0===_?void 0:_.maxLength,P=null!==(b=null===(C=this.editorOptions)||void 0===C?void 0:C.cols)&&void 0!==b?b:40,M=null!==(w=null===(y=this.editorOptions)||void 0===y?void 0:y.rows)&&void 0!==w?w:4,F=k?this.args.container:document.body;this._wrapperElm=document.createElement("div"),this._wrapperElm.className=`slick-large-editor-text editor-${D}`,this._wrapperElm.style.position=k?"relative":"absolute",F.appendChild(this._wrapperElm),this._textareaElm=document.createElement("textarea"),this._textareaElm.cols=P,this._textareaElm.rows=k&&M>3?3:M,this._textareaElm.placeholder=A,this._textareaElm.title=R,this._textareaElm.setAttribute("aria-label",null!==(E=null===(S=this.columnEditor)||void 0===S?void 0:S.ariaLabel)&&void 0!==E?E:`${mt(D+"")} Text Editor`),this._wrapperElm.appendChild(this._textareaElm);const N=document.createElement("div");N.className="editor-footer";const L=document.createElement("span");if(L.className="counter",this._currentLengthElm=document.createElement("span"),this._currentLengthElm.className="text-length",this._currentLengthElm.textContent="0",L.appendChild(this._currentLengthElm),void 0!==I){const e=document.createElement("span");e.className="separator",e.textContent="/";const t=document.createElement("span");t.className="max-length",t.textContent=`${I}`,L.appendChild(e),L.appendChild(t)}if(N.appendChild(L),!k){const e=document.createElement("button");e.className="btn btn-cancel btn-default btn-xs",e.textContent=x;const t=document.createElement("button");t.className="btn btn-save btn-primary btn-xs",t.textContent=O,N.appendChild(e),N.appendChild(t),this._bindEventService.bind(e,"click",this.cancel.bind(this)),this._bindEventService.bind(t,"click",this.save.bind(this)),this.position(null===(T=this.args)||void 0===T?void 0:T.position),this._textareaElm.focus(),this._textareaElm.select()}this._wrapperElm.appendChild(N),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 e;const t=this._defaultTextValue||"";this._textareaElm.value=t,this._currentLengthElm.textContent=`${t.length}`,(null===(e=this.args)||void 0===e?void 0:e.cancelChanges)&&this.args.cancelChanges()}hide(){this._wrapperElm.style.display="none"}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)?this.applyInputUsabilityState():this._wrapperElm.style.display="block"}destroy(){var e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this._wrapperElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}disable(e=!0){var t;const i=this.disabled;if(this.disabled=e,this._textareaElm&&this._wrapperElm)if(e){this._textareaElm.disabled=!0,this._wrapperElm.classList.add("disabled");const n=this.getValue();i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&""!==n&&this.reset("",!0,!0)}else this._textareaElm.disabled=!1,this._wrapperElm.classList.remove("disabled")}focus(){this._textareaElm&&(this._textareaElm.focus(),this._textareaElm.select())}getValue(){return this._textareaElm.value}setValue(e,t=!1,i=!0){if(this._textareaElm.value=e,this._currentLengthElm.textContent=`${e.length}`,t){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(null,e,"system")}}applyValue(e,t){var i,n,o,s;const r=null===(i=this.columnDef)||void 0===i?void 0:i.field;if(void 0!==r){const i=(null==r?void 0:r.indexOf("."))>0,l=this.validate(void 0,t),a=l&&l.valid?t:"";i?dt(e,null!==(s=null!==(o=null===(n=this.columnEditor)||void 0===n?void 0:n.complexObjectPath)&&void 0!==o?o:r)&&void 0!==s?s:"",a):e[r]=a}}isValueChanged(){const e=this._textareaElm.value;return!(""===e&&(null===this._defaultTextValue||void 0===this._defaultTextValue))&&e!==this._defaultTextValue}isValueTouched(){return this._isValueTouched}loadValue(e){var t;const i=null===(t=this.columnDef)||void 0===t?void 0:t.field;if(e&&void 0!==i){const t=(null==i?void 0:i.indexOf("."))>0?Ke(e,i):e[i];this._defaultTextValue=t||"",this._textareaElm.value=this._defaultTextValue,this._currentLengthElm.textContent=this._defaultTextValue.length,this._textareaElm.defaultValue=this._defaultTextValue,this._textareaElm.select()}}position(e){var t,i,n,o,s,r,l,a;const d=gt(this.args.container),u=this.args.container.offsetHeight,c=this.args.container.offsetWidth,h=this._wrapperElm.getBoundingClientRect().height||this.args.position.height,p=this._wrapperElm.getBoundingClientRect().width||this.args.position.width,m=document.body.offsetHeight||window.innerHeight,f=document.body.offsetWidth||window.innerWidth;let g=null!==(i=null!==(t=null==d?void 0:d.top)&&void 0!==t?t:e.top)&&void 0!==i?i:0,v=null!==(o=null!==(n=null==d?void 0:d.left)&&void 0!==n?n:e.left)&&void 0!==o?o:0;const _=null!==(r=null===(s=this.editorOptions)||void 0===s?void 0:s.position)&&void 0!==r?r:"auto";("left"===_||"auto"===_&&v+p>f)&&(v-=p-c+(null!==(a=null===(l=this.editorOptions)||void 0===l?void 0:l.marginRight)&&void 0!==a?a:0)),("top"===_||"auto"===_&&g+h>m)&&(g-=h-u),this._wrapperElm.style.top=`${g}px`,this._wrapperElm.style.left=`${v}px`}reset(e,t=!0,i=!1){var n;const o=null!==(n=null!=e?e:this._defaultTextValue)&&void 0!==n?n:"";this._textareaElm&&(this._defaultTextValue=o,this._textareaElm.value=o,this._currentLengthElm.textContent=o.length),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&t){const e=!i;this.handleChangeOnCompositeEditor(null,s,"user",e)}}save(){var e;const t=this.validate(),i=null!==(e=null==t?void 0:t.valid)&&void 0!==e&&e;this.hasAutoCommitEdit&&i?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this._textareaElm.value}validate(e,t){var i,n;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:Zi(void 0!==t?t:null===(i=this._textareaElm)||void 0===i?void 0:i.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!(null===(n=this.args)||void 0===n?void 0:n.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleKeyDown(e){var t;const i=null!==(t=e.keyCode)&&void 0!==t?t:e.code;this._isValueTouched=!0,this.args.compositeEditorOptions||(i===be.ENTER&&e.ctrlKey||e.ctrlKey&&"S"===e.key.toUpperCase()?(e.preventDefault(),this.save()):i===be.ESCAPE?(e.preventDefault(),this.cancel()):i===be.TAB&&e.shiftKey?(e.preventDefault(),this.args&&this.grid&&this.grid.navigatePrev()):i===be.TAB&&(e.preventDefault(),this.args&&this.grid&&this.grid.navigateNext()))}handleOnInputChange(e){var t,i,n;const o=this.args.compositeEditorOptions,s=null===(t=this.columnEditor)||void 0===t?void 0:t.maxLength;let r=!1;if(s&&(r=this.truncateText(this._textareaElm,s)),r)this._currentLengthElm.textContent=`${s}`;else{const t="paste"===e.type?e.clipboardData.getData("text"):e.target.value;this._currentLengthElm.textContent=`${t.length}`}if(o){const t=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.editorTypingDebounce)&&void 0!==n?n:500;clearTimeout(this._timer),this._timer=setTimeout((()=>this.handleChangeOnCompositeEditor(e,o)),t)}}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a;const d=this.grid.getActiveCell(),u=this.args.column,c=null!==(s=null===(o=this.columnDef)||void 0===o?void 0:o.id)&&void 0!==s?s:"",h=this.dataContext,p=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(t.formValues,m);const f=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;(n||this.disabled&&f&&t.formValues.hasOwnProperty(c))&&delete t.formValues[c],p.onCompositeEditorChange.notify({...d,item:h,grid:p,column:u,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}truncateText(e,t){const i=e.value+"";return i.length>t&&(e.value=i.substring(0,t),!0)}},multipleSelect:class extends sn{constructor(e){super(e,!0),this.args=e}},password:class extends on{constructor(e){super(e,"password"),this.args=e}},singleSelect:class extends sn{constructor(e){super(e,!1),this.args=e}},slider:class{constructor(e){if(this.args=e,this._defaultValue=0,this._elementRangeInputId="",this._elementRangeOutputId="",this._isValueTouched=!1,this.sliderNumberElm=null,this.disabled=!1,!e)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=e.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new oi,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 e;return null!==(e=this.gridOptions.autoCommitEdit)&&void 0!==e&&e}get editorParams(){return this.columnEditor.params||{}}get validator(){var e,t,i;return null!==(t=null===(e=this.columnEditor)||void 0===e?void 0:e.validator)&&void 0!==t?t:null===(i=this.columnDef)||void 0===i?void 0:i.validator}init(){var e,t,i;const n=this.args&&this.args.container;if(n&&this.columnDef){const o=null!==(i=null===(t=null===(e=this.args)||void 0===e?void 0:e.item)||void 0===t?void 0:t.id)&&void 0!==i?i:"";this._elementRangeInputId=`rangeInput_${this.columnDef.id}_${o}`,this._elementRangeOutputId=`rangeOutput_${this.columnDef.id}_${o}`;const s=this.args.compositeEditorOptions;this._editorElm=this.buildDomElement(),this._inputElm=this._editorElm.querySelector("input"),this.sliderNumberElm=this._editorElm.querySelector(`span.input-group-text.${this._elementRangeOutputId}`),s||this.focus(),n.appendChild(this._editorElm),this._bindEventService.bind(this._editorElm,["change","mouseup","touchend"],this.handleChangeEvent.bind(this)),this.editorParams.hideSliderNumber||this._bindEventService.bind(this._editorElm,["input","change"],this.handleChangeSliderNumber.bind(this))}}cancel(){this._inputElm&&(this._inputElm.value=`${this.originalValue}`),this.args.cancelChanges()}destroy(){var e,t;this._bindEventService.unbindAll(),null===(t=null===(e=this._inputElm)||void 0===e?void 0:e.remove)||void 0===t||t.call(e)}disable(e=!0){var t;const i=this.disabled;if(this.disabled=e,this._inputElm)if(e){this._inputElm.disabled=!0;const n=this.getValue();i!==e&&(null===(t=this.args)||void 0===t?void 0:t.compositeEditorOptions)&&""!==n&&this.reset(0,!0,!0)}else this._inputElm.disabled=!1}focus(){this._inputElm&&this._inputElm.focus()}show(){var e;(null===(e=this.args)||void 0===e?void 0:e.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var e,t;return null!==(t=null===(e=this._inputElm)||void 0===e?void 0:e.value)&&void 0!==t?t:""}setValue(e,t=!1,i=!0){if(this._inputElm&&(this._inputElm.value=`${e}`),this.sliderNumberElm&&(this.sliderNumberElm.textContent=`${e}`),t){this.applyValue(this.args.item,this.serializeValue());const e=this.args.compositeEditorOptions;e&&i&&this.handleChangeOnCompositeEditor(null,e,"system")}}applyValue(e,t){var i,n,o,s,r;const l=null!==(n=null===(i=this.columnDef)||void 0===i?void 0:i.field)&&void 0!==n?n:"";if(void 0!==l){const i=(null==l?void 0:l.indexOf("."))>0,n=this.validate(void 0,t),a=n&&n.valid?t:"";i?dt(e,null!==(r=null!==(s=null===(o=this.columnEditor)||void 0===o?void 0:o.complexObjectPath)&&void 0!==s?s:l)&&void 0!==r?r:"",a):e&&(e[l]=a)}}isValueChanged(){var e,t;const i=null!==(t=null===(e=this._inputElm)||void 0===e?void 0:e.value)&&void 0!==t?t:"";return!(""===i&&void 0===this.originalValue)&&+i!==this.originalValue}isValueTouched(){return this._isValueTouched}loadValue(e){var t,i;const n=null!==(i=null===(t=this.columnDef)||void 0===t?void 0:t.field)&&void 0!==i?i:"";if(e&&void 0!==n){let t=(null==n?void 0:n.indexOf("."))>0?Ke(e,n):e.hasOwnProperty(n)?e[n]:this._defaultValue;""!==t&&null!=t||(t=this._defaultValue),this.originalValue=+t,this._inputElm&&(this._inputElm.value=`${t}`),this.sliderNumberElm&&(this.sliderNumberElm.textContent=`${t}`)}}reset(e,t=!0,i=!1){var n;const o=null!==(n=null!=e?e:this.originalValue)&&void 0!==n?n:0;this._editorElm&&(this._editorElm.querySelector("input").value=`${o}`,this._editorElm.querySelector("div.input-group-addon.input-group-append").textContent=`${o}`),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&t){const e=!i;this.handleChangeOnCompositeEditor(null,s,"user",e)}}save(){const e=this.validate(),t=e&&e.valid||!1;this.hasAutoCommitEdit&&t?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var e,t;const i=null!==(t=null===(e=this._inputElm)||void 0===e?void 0:e.value)&&void 0!==t?t:"";return""!==i?parseInt(i,10):this.originalValue}validate(e,t){var i,n;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:function(e,t){const i=t.required,n=t.minValue,o=t.maxValue,s=t.errorMessage,r={"{{minValue}}":n,"{{maxValue}}":o};return t.validator?t.validator(e,t.editorArgs):i&&""===e?{valid:!1,msg:s||me.VALIDATION_REQUIRED_FIELD}:void 0!==n&&void 0!==o&&null!==e&&(e<n||e>o)?{valid:!1,msg:s||me.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,(e=>r[e]))}:{valid:!0,msg:null}}(void 0!==t?t:null===(i=this._inputElm)||void 0===i?void 0:i.value,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,required:!(null===(n=this.args)||void 0===n?void 0:n.compositeEditorOptions)&&this.columnEditor.required,validator:this.validator})}buildDomElement(){var e,t,i,n;const o=null!==(t=null===(e=this.columnDef)||void 0===e?void 0:e.id)&&void 0!==t?t:"",s=this.columnEditor&&this.columnEditor.title||"",r=this.columnEditor.hasOwnProperty("minValue")?this.columnEditor.minValue:0,l=this.columnEditor.hasOwnProperty("maxValue")?this.columnEditor.maxValue:100,a=this.editorParams.hasOwnProperty("sliderStartValue")?this.editorParams.sliderStartValue:r,d=this.columnEditor.hasOwnProperty("valueStep")?this.columnEditor.valueStep:1;this._defaultValue=a;const u=document.createElement("input");u.name=this._elementRangeInputId,u.title=s,u.type="range",u.defaultValue=a,u.value=a,u.min=`${r}`,u.max=`${l}`,u.step=`${d}`,u.className=`form-control slider-editor-input editor-${o} range ${this._elementRangeInputId}`,u.setAttribute("aria-label",null!==(n=null===(i=this.columnEditor)||void 0===i?void 0:i.ariaLabel)&&void 0!==n?n:`${mt(o+"")} Slider Editor`);const c=document.createElement("div");if(c.className="slider-container slider-editor",c.appendChild(u),!this.editorParams.hideSliderNumber){c.classList.add("input-group");const e=document.createElement("span");e.className=`input-group-text ${this._elementRangeOutputId}`,e.textContent=`${a}`;const t=document.createElement("div");t.className="input-group-addon input-group-append slider-value",t.appendChild(e),c.appendChild(t)}return c}applyInputUsabilityState(){const e=this.grid.getActiveCell(),t=this.grid.onBeforeEditCell.notify({...e,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions});this.disable(!1===t)}handleChangeEvent(e){this._isValueTouched=!0;const t=this.args.compositeEditorOptions;t?this.handleChangeOnCompositeEditor(e,t):this.save()}handleChangeSliderNumber(e){var t,i;const n=null!==(i=null===(t=e.target)||void 0===t?void 0:t.value)&&void 0!==i?i:"";""!==n&&this.sliderNumberElm&&(this.sliderNumberElm.textContent=n)}handleChangeOnCompositeEditor(e,t,i="user",n=!1){var o,s,r,l,a;const d=this.grid.getActiveCell(),u=this.args.column,c=null!==(s=null===(o=this.columnDef)||void 0===o?void 0:o.id)&&void 0!==s?s:"",h=this.dataContext,p=this.grid,m=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,m),this.applyValue(t.formValues,m);const f=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;(n||this.disabled&&f&&t.formValues.hasOwnProperty(c))&&delete t.formValues[c],p.onCompositeEditorChange.notify({...d,item:h,grid:p,column:u,formValues:t.formValues,editors:t.editors,triggeredBy:i},{...new Slick.EventData,...e})}},text:on};__webpack_require__(854);class ln{constructor(e){this.sharedService=e,this._addon=null}dispose(){this._addon&&this._addon.destroy&&(this._addon.destroy(),this._addon=null)}getAddonInstance(){return this._addon}register(){if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){const e=this.sharedService.gridOptions.autoTooltipOptions;return this._addon=new Slick.AutoTooltips(e),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this._addon}return null}}__webpack_require__(183);class an{constructor(e,t){this.extensionUtility=e,this.sharedService=t,this._addon=null,this._addonOptions=null,this._eventHandler=new Slick.EventHandler,this._bindingEventService=new oi}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get commandQueue(){return this._commandQueue}get undoRedoBuffer(){return this._undoRedoBuffer}dispose(){var e;this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),(null===(e=this._cellSelectionModel)||void 0===e?void 0:e.destroy)&&this._cellSelectionModel.destroy(),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._addonOptions),this._addonOptions=null,this._bindingEventService.unbindAll()}getAddonInstance(){return this._addon}register(){if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){if(this.createUndoRedoBuffer(),this._bindingEventService.bind(document.body,"keydown",this.handleKeyDown.bind(this)),this._addonOptions={...this.getDefaultOptions(),...this.sharedService.gridOptions.excelCopyBufferOptions},this._cellSelectionModel=new Slick.CellSelectionModel,this.sharedService.slickGrid.setSelectionModel(this._cellSelectionModel),this._addon=new Slick.CellExternalCopyManager(this._addonOptions),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this.sharedService.slickGrid&&this._addonOptions){this._addon&&this._addonOptions.onExtensionRegistered&&this._addonOptions.onExtensionRegistered(this._addon);const e=this._addon.onCopyCells;this._eventHandler.subscribe(e,((e,t)=>{this._addonOptions&&"function"==typeof this._addonOptions.onCopyCells&&this._addonOptions.onCopyCells(e,t)}));const t=this._addon.onCopyCancelled;this._eventHandler.subscribe(t,((e,t)=>{this._addonOptions&&"function"==typeof this._addonOptions.onCopyCancelled&&this._addonOptions.onCopyCancelled(e,t)}));const i=this._addon.onPasteCells;this._eventHandler.subscribe(i,((e,t)=>{this._addonOptions&&"function"==typeof this._addonOptions.onPasteCells&&this._addonOptions.onPasteCells(e,t)}))}return this._addon}return null}createUndoRedoBuffer(){let e=0;this._commandQueue=[],this._undoRedoBuffer={queueAndExecuteCommand:t=>{this._commandQueue[e]=t,e++,t.execute()},undo:()=>{if(0===e)return;e--;const t=this._commandQueue[e];t&&Slick.GlobalEditorLock.cancelCurrentEdit()&&t.undo()},redo:()=>{if(e>=this._commandQueue.length)return;const t=this._commandQueue[e];e++,t&&Slick.GlobalEditorLock.cancelCurrentEdit()&&t.execute()}}}getDefaultOptions(){let e=0;return{clipboardCommandHandler:e=>{this._undoRedoBuffer.queueAndExecuteCommand.call(this._undoRedoBuffer,e)},dataItemColumnValueExtractor:(e,t)=>{if(!this.sharedService.gridOptions.editable||!t.editor){const i={...this.sharedService.gridOptions.exportOptions,...this.sharedService.gridOptions.textExportOptions},n=void 0!==t.exportWithFormatter?t.exportWithFormatter:null==i?void 0:i.exportWithFormatter;if(t.formatter&&n){const n=t.formatter(0,0,e[t.field],t,e,this.sharedService.slickGrid);if(t.sanitizeDataExport||(null==i?void 0:i.sanitizeDataExport)){let e=n;return n&&"object"==typeof n&&n.hasOwnProperty("text")&&(e=n.text),null===e&&(e=""),lt(e)}return n}}return null},readOnlyMode:!1,includeHeaderWhenCopying:!1,newRowCreator:t=>{for(let i=0;i<t;i++)this.sharedService.slickGrid.getData().addItem({id:"newRow_"+e++})}}}handleKeyDown(e){90===(e.keyCode||e.code)&&(e.ctrlKey||e.metaKey)&&(e.shiftKey?this._undoRedoBuffer.redo():this._undoRedoBuffer.undo())}}__webpack_require__(399);class dn{constructor(e,t,i){this.extensionUtility=e,this.sharedService=t,this.translaterService=i,this._addon=null,this._cellMenuOptions=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._cellMenuOptions),this._addon=null,this._cellMenuOptions=null}getAddonInstance(){return this._addon}register(){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.');if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){const e=this.sharedService.gridOptions.cellMenu;if(this._locales=this.sharedService.gridOptions&&this.sharedService.gridOptions.locales||me.locales,this._cellMenuOptions={...this.getDefaultCellMenuOptions(),...this.sharedService.gridOptions.cellMenu},this.sharedService.gridOptions.cellMenu=this._cellMenuOptions,this.sharedService.gridOptions.enableTranslate&&this.translateCellMenu(),this.sortMenuItems(this.sharedService.allColumns),this._addon=new Slick.Plugins.CellMenu(this._cellMenuOptions),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this.sharedService.slickGrid&&this._cellMenuOptions){if(this._addon&&this._cellMenuOptions.onExtensionRegistered&&this._cellMenuOptions.onExtensionRegistered(this._addon),e&&"function"==typeof e.onCommand){const t=this._addon.onCommand;this._eventHandler.subscribe(t,((t,i)=>{e.onCommand&&e.onCommand(t,i)}))}if(e&&"function"==typeof e.onOptionSelected){const t=this._addon.onOptionSelected;this._eventHandler.subscribe(t,((t,i)=>{e.onOptionSelected&&e.onOptionSelected(t,i)}))}if(e&&"function"==typeof e.onBeforeMenuShow){const t=this._addon.onBeforeMenuShow;this._eventHandler.subscribe(t,((t,i)=>{e.onBeforeMenuShow&&e.onBeforeMenuShow(t,i)}))}if(e&&"function"==typeof e.onBeforeMenuClose){const t=this._addon.onBeforeMenuClose;this._eventHandler.subscribe(t,((t,i)=>{e.onBeforeMenuClose&&e.onBeforeMenuClose(t,i)}))}if(e&&"function"==typeof e.onAfterMenuShow){const t=this._addon.onAfterMenuShow;this._eventHandler.subscribe(t,((t,i)=>{e.onAfterMenuShow&&e.onAfterMenuShow(t,i)}))}}return this._addon}return null}translateCellMenu(){var e;(null===(e=this.sharedService.gridOptions)||void 0===e?void 0:e.cellMenu)&&this.resetMenuTranslations(this.sharedService.allColumns)}getDefaultCellMenuOptions(){return{width:180}}resetMenuTranslations(e){const t=this.sharedService&&this.sharedService.gridOptions;t&&t.enableTranslate&&e.forEach((e=>{if(e&&e.cellMenu&&(Array.isArray(e.cellMenu.commandItems)||Array.isArray(e.cellMenu.optionItems))){const t=e.cellMenu.commandItems||[],i=e.cellMenu.optionItems||[];e.cellMenu.commandTitleKey&&(e.cellMenu.commandTitle=this.translaterService&&this.translaterService.getCurrentLanguage&&this.translaterService.translate&&this.translaterService.translate(e.cellMenu.commandTitleKey)||this._locales&&this._locales.TEXT_COMMANDS||e.cellMenu.commandTitle),e.cellMenu.optionTitleKey&&(e.cellMenu.optionTitle=this.translaterService&&this.translaterService.getCurrentLanguage&&this.translaterService.translate&&this.translaterService.translate(e.cellMenu.optionTitleKey)||e.cellMenu.optionTitle),this.extensionUtility.translateItems(t,"titleKey","title"),this.extensionUtility.translateItems(i,"titleKey","title")}}))}sortMenuItems(e){e.forEach((e=>{if(e&&e.cellMenu&&e.cellMenu.commandItems){const t=e.cellMenu.commandItems||[],i=e.cellMenu.optionItems||[];this.extensionUtility.sortItems(t,"positionOrder"),this.extensionUtility.sortItems(i,"positionOrder")}}))}}__webpack_require__(780),__webpack_require__(339);class un{constructor(e){this.sharedService=e,this._addon=null}dispose(){var e;this._addon&&this._addon.destroy&&this._addon.destroy(),this._addon=null,(null===(e=this._rowSelectionPlugin)||void 0===e?void 0:e.destroy)&&this._rowSelectionPlugin.destroy()}create(e,t){var i,n;if(Array.isArray(e)&&t){this._addon||(this._addon=new Slick.CheckboxSelectColumn(t.checkboxSelector));const o=this._addon.getColumnDefinition();if("object"==typeof o){o.excludeFromExport=!0,o.excludeFromColumnPicker=!0,o.excludeFromGridMenu=!0,o.excludeFromQuery=!0,o.excludeFromHeaderMenu=!0,o.maxWidth=o.width||30;const s=null!==(n=null===(i=null==t?void 0:t.checkboxSelector)||void 0===i?void 0:i.columnIndexPosition)&&void 0!==n?n:0;s>0?e.splice(s,0,o):e.unshift(o)}return this._addon}return null}getAddonInstance(){return this._addon}register(e){return this._addon&&this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions?(this.sharedService.slickGrid.registerPlugin(this._addon),e&&this.sharedService.slickGrid.getSelectionModel()||(e=new Slick.RowSelectionModel(this.sharedService.gridOptions.rowSelectionOptions),this.sharedService.slickGrid.setSelectionModel(e)),this.sharedService.gridOptions.preselectedRows&&e&&this.sharedService.slickGrid.getSelectionModel()&&setTimeout((()=>{var e;return null===(e=this._addon)||void 0===e?void 0:e.selectRows(this.sharedService.gridOptions.preselectedRows||[])})),this._rowSelectionPlugin=e,e):null}}__webpack_require__(448);class cn{constructor(e,t){this.extensionUtility=e,this.sharedService=t,this._addon=null,this._columnPicker=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._columnPicker),this._addon=null}getAddonInstance(){return this._addon}register(){if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){const e=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),t=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),i=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker");if(this._columnPicker=this.sharedService.gridOptions.columnPicker||{},this.sharedService.gridOptions.columnPicker=this._columnPicker,this._columnPicker.columnTitle=this._columnPicker.columnTitle||e,this._columnPicker.forceFitTitle=this._columnPicker.forceFitTitle||t,this._columnPicker.syncResizeTitle=this._columnPicker.syncResizeTitle||i,this._addon=new Slick.Controls.ColumnPicker(this.sharedService.allColumns,this.sharedService.slickGrid,this.sharedService.gridOptions),this.sharedService.slickGrid&&this.sharedService.gridOptions.enableColumnPicker){this._addon&&this._columnPicker.onExtensionRegistered&&this._columnPicker.onExtensionRegistered(this._addon);const e=this._addon.onColumnsChanged;this._eventHandler.subscribe(e,((e,t)=>{var i;if(this._columnPicker&&"function"==typeof this._columnPicker.onColumnsChanged&&this._columnPicker.onColumnsChanged(e,t),t&&Array.isArray(t.columns)&&t.columns.length!==this.sharedService.visibleColumns.length&&(this.sharedService.visibleColumns=t.columns),this.sharedService.gridOptions.enableRowSelection&&t.showing){const e=t.grid.getSelectedRows();t.grid.setSelectedRows(e)}const n=null!==(i=this.sharedService.gridOptions.frozenColumn)&&void 0!==i?i:-1;if(n>=0){const{allColumns:e,columns:i}=t;this.extensionUtility.readjustFrozenColumnIndexWhenNeeded(n,e,i)}}))}return this._addon}return null}translateColumnPicker(){var e;this._columnPicker&&(this.emptyColumnPickerTitles(),this._columnPicker.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this._columnPicker.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this._columnPicker.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker")),this.extensionUtility.translateItems(this.sharedService.allColumns,"nameKey","name"),(null===(e=this._addon)||void 0===e?void 0:e.updateAllTitles)&&this._columnPicker&&this._addon.updateAllTitles(this._columnPicker)}emptyColumnPickerTitles(){this._columnPicker&&(this._columnPicker.columnTitle="",this._columnPicker.forceFitTitle="",this._columnPicker.syncResizeTitle="")}}__webpack_require__(368);class hn{constructor(e,t,i,n,o){this.extensionUtility=e,this.pubSubService=t,this.sharedService=i,this.treeDataService=n,this.translaterService=o,this._addon=null,this._contextMenuOptions=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),this.sharedService.gridOptions&&this.sharedService.gridOptions.contextMenu&&this.sharedService.gridOptions.contextMenu.commandItems&&(this.sharedService.gridOptions.contextMenu=this._userOriginalContextMenu),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._contextMenuOptions),this._addon=null,this._contextMenuOptions=null}getAddonInstance(){return this._addon}register(){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.');if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions&&this.sharedService.gridOptions.contextMenu){this._contextMenuOptions=this.sharedService.gridOptions.contextMenu,this._userOriginalContextMenu={...this._contextMenuOptions};const e=this._userOriginalContextMenu&&Array.isArray(this._userOriginalContextMenu.commandItems)?this._userOriginalContextMenu.commandItems:[];if(this._contextMenuOptions.commandItems=[...e,...this.addMenuCustomCommands(e)],this._contextMenuOptions={...this._contextMenuOptions},this.sharedService.gridOptions.contextMenu=this._contextMenuOptions,this.extensionUtility.sortItems(this._contextMenuOptions.commandItems||[],"positionOrder"),this.extensionUtility.sortItems(this._contextMenuOptions.optionItems||[],"positionOrder"),this._addon=new Slick.Plugins.ContextMenu(this._contextMenuOptions),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this.sharedService.gridOptions.enableTranslate&&this.translateContextMenu(),this.sharedService.slickGrid&&this._contextMenuOptions){if(this._addon&&this._contextMenuOptions.onExtensionRegistered&&this._contextMenuOptions.onExtensionRegistered(this._addon),this._contextMenuOptions&&"function"==typeof this._contextMenuOptions.onCommand){const e=this._addon.onCommand;this._eventHandler.subscribe(e,((e,t)=>{var i;(null===(i=this._contextMenuOptions)||void 0===i?void 0:i.onCommand)&&this._contextMenuOptions.onCommand(e,t)}))}if(this._contextMenuOptions&&"function"==typeof this._contextMenuOptions.onOptionSelected){const e=this._addon.onOptionSelected;this._eventHandler.subscribe(e,((e,t)=>{var i;(null===(i=this._contextMenuOptions)||void 0===i?void 0:i.onOptionSelected)&&this._contextMenuOptions.onOptionSelected(e,t)}))}if(this._contextMenuOptions&&"function"==typeof this._contextMenuOptions.onBeforeMenuShow){const e=this._addon.onBeforeMenuShow;this._eventHandler.subscribe(e,((e,t)=>{var i;(null===(i=this._contextMenuOptions)||void 0===i?void 0:i.onBeforeMenuShow)&&this._contextMenuOptions.onBeforeMenuShow(e,t)}))}if(this._contextMenuOptions&&"function"==typeof this._contextMenuOptions.onBeforeMenuClose){const e=this._addon.onBeforeMenuClose;this._eventHandler.subscribe(e,((e,t)=>{var i;(null===(i=this._contextMenuOptions)||void 0===i?void 0:i.onBeforeMenuClose)&&this._contextMenuOptions.onBeforeMenuClose(e,t)}))}if(this._contextMenuOptions&&"function"==typeof this._contextMenuOptions.onAfterMenuShow){const e=this._addon.onAfterMenuShow;this._eventHandler.subscribe(e,((e,t)=>{var i;(null===(i=this._contextMenuOptions)||void 0===i?void 0:i.onAfterMenuShow)&&this._contextMenuOptions.onAfterMenuShow(e,t)}))}}return this._addon}return null}translateContextMenu(){if(this.sharedService&&this.sharedService.gridOptions&&this.sharedService.gridOptions.contextMenu){const e=this.sharedService.gridOptions.contextMenu,t={};e.commandTitleKey&&(e.commandTitle=this.translaterService&&this.translaterService.translate&&this.translaterService.getCurrentLanguage&&this.translaterService.getCurrentLanguage()&&this.translaterService.translate(e.commandTitleKey)||e.commandTitle,t.commandTitle=e.commandTitle),e.optionTitleKey&&(e.optionTitle=this.translaterService&&this.translaterService.translate&&this.translaterService.getCurrentLanguage&&this.translaterService.getCurrentLanguage()&&this.translaterService.translate(e.optionTitleKey)||e.optionTitle,t.optionTitle=e.optionTitle);const i=this._userOriginalContextMenu&&Array.isArray(this._userOriginalContextMenu.commandItems)?this._userOriginalContextMenu.commandItems:[];e.commandItems=[...i,...this.addMenuCustomCommands(i)],t.commandItems=e.commandItems,this.extensionUtility.translateItems(e.commandItems||[],"titleKey","title"),this.extensionUtility.translateItems(e.optionItems||[],"titleKey","title"),this.extensionUtility.sortItems(e.commandItems||[],"positionOrder"),this.extensionUtility.sortItems(e.optionItems||[],"positionOrder"),this._addon&&this._addon.setOptions&&this._addon.setOptions(t)}}addMenuCustomCommands(e){var t;const i=[],n=this.sharedService&&this.sharedService.gridOptions||{},o=null==n?void 0:n.contextMenu,s=null===(t=this.sharedService)||void 0===t?void 0:t.dataView,r=Qe(n);if(o&&!o.hideCopyCellValueCommand){const t="copy";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconCopyCellValueCommand||"fa fa-clone",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}COPY`,"TEXT_COPY"),disabled:!1,command:t,positionOrder:50,action:(e,t)=>{this.copyToClipboard(t)},itemUsabilityOverride:e=>{const t=e&&e.column,i=e&&e.dataContext;if("function"==typeof t.queryFieldNameGetterFn){const e=this.getCellValueFromQueryFieldGetter(t,i);if(""!==e&&void 0!==e)return!0}else if(t&&i.hasOwnProperty(t.field))return""!==i[t.field]&&null!==i[t.field]&&void 0!==i[t.field];return!1}})}if(((null==n?void 0:n.enableExport)||(null==n?void 0:n.enableTextExport))&&o&&!o.hideExportCsvCommand){const t="export-csv";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconExportCsvCommand||"fa fa-download",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}EXPORT_TO_CSV`,"TEXT_EXPORT_TO_CSV"),disabled:!1,command:t,positionOrder:51,action:()=>{var e;const t=((null===(e=this.sharedService)||void 0===e?void 0:e.externalRegisteredResources)||[]).find((e=>"TextExportService"===e.className));if(!(null==t?void 0:t.exportToFile))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()] };");t.exportToFile({delimiter:re.comma,format:ge.csv})}})}if(n&&n.enableExcelExport&&o&&!o.hideExportExcelCommand){const t="export-excel";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconExportExcelCommand||"fa fa-file-excel-o text-success",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}EXPORT_TO_EXCEL`,"TEXT_EXPORT_TO_EXCEL"),disabled:!1,command:t,positionOrder:52,action:()=>{var e;const t=((null===(e=this.sharedService)||void 0===e?void 0:e.externalRegisteredResources)||[]).find((e=>"ExcelExportService"===e.className));if(!(null==t?void 0:t.exportToExcel))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()] };");t.exportToExcel()}})}if(((null==n?void 0:n.enableExport)||(null==n?void 0:n.enableTextExport))&&o&&!o.hideExportTextDelimitedCommand){const t="export-text-delimited";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconExportTextDelimitedCommand||"fa fa-download",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}EXPORT_TO_TAB_DELIMITED`,"TEXT_EXPORT_TO_TAB_DELIMITED"),disabled:!1,command:t,positionOrder:53,action:()=>{var e;const t=((null===(e=this.sharedService)||void 0===e?void 0:e.externalRegisteredResources)||[]).find((e=>"TextExportService"===e.className));if(!(null==t?void 0:t.exportToFile))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()] };");t.exportToFile({delimiter:re.tab,format:ge.txt})}})}if(n&&(n.enableGrouping||n.enableDraggableGrouping||n.enableTreeData)){if(o&&!o.hideCopyCellValueCommand&&i.push({divider:!0,command:"",positionOrder:54}),n&&!n.enableTreeData&&o&&!o.hideClearAllGrouping){const t="clear-grouping";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconClearGroupingCommand||"fa fa-times",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}CLEAR_ALL_GROUPING`,"TEXT_CLEAR_ALL_GROUPING"),disabled:!1,command:t,positionOrder:55,action:()=>{s.setGrouping([]),this.pubSubService.publish("onContextMenuClearGrouping")},itemUsabilityOverride:()=>{const e=s&&s.getGrouping&&s.getGrouping();return Array.isArray(e)&&e.length>0}})}if(n&&o&&!o.hideCollapseAllGroups){const t="collapse-all-groups";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconCollapseAllGroupsCommand||"fa fa-compress",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}COLLAPSE_ALL_GROUPS`,"TEXT_COLLAPSE_ALL_GROUPS"),disabled:!1,command:t,positionOrder:56,action:()=>{n.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!0):s.collapseAllGroups(),this.pubSubService.publish("onContextMenuCollapseAllGroups")},itemUsabilityOverride:()=>{if(n.enableTreeData)return!0;const e=s&&s.getGrouping&&s.getGrouping();return Array.isArray(e)&&e.length>0}})}if(n&&o&&!o.hideExpandAllGroups){const t="expand-all-groups";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||i.push({iconCssClass:o.iconExpandAllGroupsCommand||"fa fa-expand",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${r}EXPAND_ALL_GROUPS`,"TEXT_EXPAND_ALL_GROUPS"),disabled:!1,command:t,positionOrder:57,action:()=>{n.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!1):s.expandAllGroups(),this.pubSubService.publish("onContextMenuExpandAllGroups")},itemUsabilityOverride:()=>{if(n.enableTreeData)return!0;const e=s&&s.getGrouping&&s.getGrouping();return Array.isArray(e)&&e.length>0}})}}return i}copyToClipboard(e){try{if(e&&e.grid&&e.command){const t=this.sharedService&&this.sharedService.gridOptions||{},i=e&&e.cell||0,n=e&&e.row||0,o=e&&e.column,s=e&&e.dataContext;let r=$i(n,i,o,s,this.sharedService&&this.sharedService.slickGrid,t&&(t.excelExportOptions||{...t.exportOptions,...t.textExportOptions}));"function"==typeof o.queryFieldNameGetterFn&&(r=this.getCellValueFromQueryFieldGetter(o,s));const l=r.replace(/^([·|⮞|⮟]\s*)|([·|⮞|⮟])\s*/gi,"").replace(/\u034f/gi,"").trim(),a=document.createElement("textarea");a&&document.body&&(a.style.position="absolute",a.style.opacity="0",a.value=l,document.body.appendChild(a),a.select(),document.execCommand("copy",!1,l)&&a.remove())}}catch(e){}}getCellValueFromQueryFieldGetter(e,t){let i="";if("function"==typeof e.queryFieldNameGetterFn){const n=e.queryFieldNameGetterFn(t);i=(null==n?void 0:n.indexOf("."))>=0?Ke(t,n):t[n]}return i}}__webpack_require__(544);class pn{constructor(e,t,i){this.extensionUtility=e,this.pubSubService=t,this.sharedService=i,this._addon=null,this._draggableGroupingOptions=null,this._subscriptions=[],this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._addon&&this._addon.destroy&&this._addon.destroy(),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._draggableGroupingOptions),this._addon=null,this._draggableGroupingOptions=null}create(e){return e?(this._addon||(this._addon=new Slick.DraggableGrouping(e.draggableGrouping)),this._addon):null}getAddonInstance(){return this._addon}register(){if(this._addon&&this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){if(this.sharedService.slickGrid.registerPlugin(this._addon),this.sharedService.slickGrid&&this.sharedService.gridOptions.draggableGrouping){if(this._draggableGroupingOptions=this.sharedService.gridOptions.draggableGrouping,this._addon&&this._draggableGroupingOptions.onExtensionRegistered&&this._draggableGroupingOptions.onExtensionRegistered(this._addon),this._addon&&this._addon.onGroupChanged){const e=this._addon.onGroupChanged;this._eventHandler.subscribe(e,((e,t)=>{this._draggableGroupingOptions&&"function"==typeof this._draggableGroupingOptions.onGroupChanged&&this._draggableGroupingOptions.onGroupChanged(e,t)}))}this._subscriptions.push(this.pubSubService.subscribe("onContextMenuClearGrouping",(()=>{var e,t;return null===(t=null===(e=this._addon)||void 0===e?void 0:e.clearDroppedGroups)||void 0===t?void 0:t.call(e)})))}return this._addon}return null}}class mn{constructor(e,t){this.sharedService=e,this.translaterService=t}getPickerTitleOutputString(e,t){var i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_;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 C="";const b=null!==(n=null===(i=this.sharedService.gridOptions)||void 0===i?void 0:i[t])&&void 0!==n?n:{},y=null!==(s=null===(o=this.sharedService.gridOptions)||void 0===o?void 0:o.enableTranslate)&&void 0!==s&&s,w=null!==(l=null===(r=this.sharedService.gridOptions)||void 0===r?void 0:r.locales)&&void 0!==l?l:me.locales,S=null===(a=b)||void 0===a?void 0:a[e],E=null===(d=b)||void 0===d?void 0:d[`${e}Key`],T=Qe(this.sharedService.gridOptions);if(E&&(null===(u=this.translaterService)||void 0===u?void 0:u.translate))C=this.translaterService.translate(E||" ");else switch(e){case"customTitle":C=S||y&&(null===(c=this.translaterService)||void 0===c?void 0:c.getCurrentLanguage)&&(null===(h=this.translaterService)||void 0===h?void 0:h.translate(`${T}COMMANDS`||" "))||(null==w?void 0:w.TEXT_COMMANDS);break;case"columnTitle":C=S||y&&(null===(p=this.translaterService)||void 0===p?void 0:p.getCurrentLanguage)&&(null===(m=this.translaterService)||void 0===m?void 0:m.translate(`${T}COLUMNS`||" "))||(null==w?void 0:w.TEXT_COLUMNS);break;case"forceFitTitle":C=S||y&&(null===(f=this.translaterService)||void 0===f?void 0:f.getCurrentLanguage)&&(null===(g=this.translaterService)||void 0===g?void 0:g.translate(`${T}FORCE_FIT_COLUMNS`||" "))||(null==w?void 0:w.TEXT_FORCE_FIT_COLUMNS);break;case"syncResizeTitle":C=S||y&&(null===(v=this.translaterService)||void 0===v?void 0:v.getCurrentLanguage)&&(null===(_=this.translaterService)||void 0===_?void 0:_.translate(`${T}SYNCHRONOUS_RESIZE`||" "))||(null==w?void 0:w.TEXT_SYNCHRONOUS_RESIZE);break;default:C=S}return C}nullifyFunctionNameStartingWithOn(e){if(e)for(const t of Object.keys(e))t.startsWith("on")&&(e[t]=null)}readjustFrozenColumnIndexWhenNeeded(e,t,i){if(e>=0){const n=i.findIndex((e=>e.id===this.sharedService.frozenVisibleColumnId));n>=0&&n!==e&&(this.sharedService.gridOptions.frozenColumn=n,this.sharedService.slickGrid.setOptions({frozenColumn:n})),Array.isArray(i)&&Array.isArray(t)&&i.length!==t.length&&this.sharedService.slickGrid.setColumns(i)}}sortItems(e,t){Array.isArray(e)&&e.sort(((e,i)=>e&&i&&e.hasOwnProperty(t)&&i.hasOwnProperty(t)?e[t]-i[t]:0))}translateItems(e,t,i){if(Array.isArray(e))for(const n of e)n[t]&&(n[i]=this.translaterService&&this.translaterService.getCurrentLanguage&&this.translaterService.translate&&this.translaterService.translate(n[t]))}translateWhenEnabledAndServiceExist(e,t,i){var n,o,s;let r="";const l=null===(n=this.sharedService)||void 0===n?void 0:n.gridOptions,a=null!==(o=null==l?void 0:l.locales)&&void 0!==o?o:me.locales;return r=i||(l.enableTranslate&&(null===(s=this.translaterService)||void 0===s?void 0:s.translate)?this.translaterService.translate(e||" "):t in a?a[t]:t),r}}__webpack_require__(829);class fn{constructor(e,t,i,n,o,s,r){this.extensionUtility=e,this.filterService=t,this.pubSubService=i,this.sharedService=n,this.sortService=o,this.backendUtilities=s,this.translaterService=r,this._addon=null,this._areVisibleColumnDifferent=!1,this._gridMenuOptions=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){var e,t,i;this._eventHandler.unsubscribeAll(),(null===(e=this._addon)||void 0===e?void 0:e.destroy)&&this._addon.destroy(),(null===(i=null===(t=this.sharedService.gridOptions)||void 0===t?void 0:t.gridMenu)||void 0===i?void 0:i.customItems)&&(this.sharedService.gridOptions.gridMenu=this._userOriginalGridMenu),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._gridMenuOptions),this._addon=null,this._gridMenuOptions=null}getAddonInstance(){return this._addon}register(){var e,t,i;if((null===(e=this.sharedService.gridOptions)||void 0===e?void 0:e.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(null===(i=null===(t=this.sharedService)||void 0===t?void 0:t.gridOptions)||void 0===i?void 0:i.gridMenu){this._userOriginalGridMenu={...this.sharedService.gridOptions.gridMenu},this._gridMenuOptions={...this.getDefaultGridMenuOptions(),...this.sharedService.gridOptions.gridMenu},this.sharedService.gridOptions.gridMenu=this._gridMenuOptions;const e=this._userOriginalGridMenu&&Array.isArray(this._userOriginalGridMenu.customItems)?this._userOriginalGridMenu.customItems:[];if(this._gridMenuOptions.customItems=[...e,...this.addGridMenuCustomCommands(e)],this.extensionUtility.translateItems(this._gridMenuOptions.customItems,"titleKey","title"),this.extensionUtility.sortItems(this._gridMenuOptions.customItems,"positionOrder"),this._addon=new Slick.Controls.GridMenu(this.sharedService.allColumns,this.sharedService.slickGrid,this.sharedService.gridOptions),this.sharedService.slickGrid&&this._gridMenuOptions){if(this._gridMenuOptions.onExtensionRegistered&&this._gridMenuOptions.onExtensionRegistered(this._addon),this._gridMenuOptions&&"function"==typeof this._gridMenuOptions.onBeforeMenuShow){const e=this._addon.onBeforeMenuShow;e&&this._eventHandler.subscribe(e,((e,t)=>{this._gridMenuOptions&&this._gridMenuOptions.onBeforeMenuShow&&this._gridMenuOptions.onBeforeMenuShow(e,t)}))}if(this._gridMenuOptions&&"function"==typeof this._gridMenuOptions.onAfterMenuShow){const e=this._addon.onAfterMenuShow;e&&this._eventHandler.subscribe(e,((e,t)=>{this._gridMenuOptions&&this._gridMenuOptions.onAfterMenuShow&&this._gridMenuOptions.onAfterMenuShow(e,t)}))}const e=this._addon.onColumnsChanged;e&&this._eventHandler.subscribe(e,((e,t)=>{var i;if(this._areVisibleColumnDifferent=!0,this._gridMenuOptions&&"function"==typeof this._gridMenuOptions.onColumnsChanged&&this._gridMenuOptions.onColumnsChanged(e,t),t&&Array.isArray(t.columns)&&t.columns.length>this.sharedService.visibleColumns.length&&(this.sharedService.visibleColumns=t.columns),this.sharedService.gridOptions.enableRowSelection&&t.showing){const e=t.grid.getSelectedRows();t.grid.setSelectedRows(e)}const n=null!==(i=this.sharedService.gridOptions.frozenColumn)&&void 0!==i?i:-1;if(n>=0){const{allColumns:e,columns:i}=t;this.extensionUtility.readjustFrozenColumnIndexWhenNeeded(n,e,i)}}));const t=this._addon.onCommand;t&&this._eventHandler.subscribe(t,((e,t)=>{this.executeGridMenuInternalCustomCommands(e,t),this._gridMenuOptions&&"function"==typeof this._gridMenuOptions.onCommand&&this._gridMenuOptions.onCommand(e,t)}));const i=this._addon.onMenuClose;i&&this._eventHandler.subscribe(i,((e,t)=>{if(this._gridMenuOptions&&"function"==typeof this._gridMenuOptions.onMenuClose&&this._gridMenuOptions.onMenuClose(e,t),this.sharedService.slickGrid&&"function"==typeof this.sharedService.slickGrid.autosizeColumns){const e=this.sharedService.slickGrid.getUID();this._areVisibleColumnDifferent&&e&&null!==document.querySelector(`.${e}`)&&(this.sharedService.slickGrid.getOptions().enableAutoSizeColumns&&this.sharedService.slickGrid.autosizeColumns(),this._areVisibleColumnDifferent=!1)}}))}return this._addon}return null}refreshBackendDataset(e){var t;e&&(this.sharedService.gridOptions={...this.sharedService.gridOptions,...e}),null===(t=this.backendUtilities)||void 0===t||t.refreshBackendDataset(this.sharedService.gridOptions)}showGridMenu(e){this._addon&&this._addon.showGridMenu(e)}translateGridMenu(){var e,t,i;if(null===(t=null===(e=this.sharedService)||void 0===e?void 0:e.gridOptions)||void 0===t?void 0:t.gridMenu){this.sharedService.gridOptions.gridMenu.customItems=[],this.emptyGridMenuTitles();const e=this._userOriginalGridMenu&&Array.isArray(this._userOriginalGridMenu.customItems)?this._userOriginalGridMenu.customItems:[];this.sharedService.gridOptions.gridMenu.customItems=[...e,...this.addGridMenuCustomCommands(e)],this.extensionUtility.translateItems(this.sharedService.gridOptions.gridMenu.customItems,"titleKey","title"),this.extensionUtility.sortItems(this.sharedService.gridOptions.gridMenu.customItems,"positionOrder"),this.sharedService.gridOptions.gridMenu.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),this.sharedService.gridOptions.gridMenu.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),this.sharedService.gridOptions.gridMenu.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"),this.extensionUtility.translateItems(this.sharedService.allColumns,"nameKey","name"),(null===(i=this._addon)||void 0===i?void 0:i.updateAllTitles)&&this._addon.updateAllTitles(this.sharedService.gridOptions.gridMenu)}}addGridMenuCustomCommands(e){var t,i,n,o,s,r;const l=this.sharedService.gridOptions.backendServiceApi||null,a=[],d=Qe(this.sharedService.gridOptions),u=null===(t=this._gridMenuOptions)||void 0===t?void 0:t.commandLabels;if(this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideClearFrozenColumnsCommand){const t="clear-pinning";if(!e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))){const e=null!==(i=null==u?void 0:u.clearFrozenColumnsCommandKey)&&void 0!==i?i:"CLEAR_PINNING";a.push({iconCssClass:this._gridMenuOptions.iconClearFrozenColumnsCommand||"fa fa-times",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${e}`,`TEXT_${e}`,null==u?void 0:u.clearFrozenColumnsCommand),disabled:!1,command:t,positionOrder:52})}}if(this.sharedService.gridOptions&&this.sharedService.gridOptions.enableFiltering&&!this.sharedService.hideHeaderRowAfterPageLoad){if(this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideClearAllFiltersCommand){const t="clear-filter";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconClearAllFiltersCommand||"fa fa-filter text-danger",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.clearAllFiltersCommandKey}`,"TEXT_CLEAR_ALL_FILTERS",null==u?void 0:u.clearAllFiltersCommand),disabled:!1,command:t,positionOrder:50})}if(this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideToggleFilterCommand){const t="toggle-filter";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconToggleFilterCommand||"fa fa-random",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.toggleFilterCommandKey}`,"TEXT_TOGGLE_FILTER_ROW",null==u?void 0:u.toggleFilterCommand),disabled:!1,command:t,positionOrder:53})}if(l&&this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideRefreshDatasetCommand){const t="refresh-dataset";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconRefreshDatasetCommand||"fa fa-refresh",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.refreshDatasetCommandKey}`,"TEXT_REFRESH_DATASET",null==u?void 0:u.refreshDatasetCommand),disabled:!1,command:t,positionOrder:57})}}if(this.sharedService.gridOptions.showPreHeaderPanel&&this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideTogglePreHeaderCommand){const t="toggle-preheader";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconTogglePreHeaderCommand||"fa fa-random",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.togglePreHeaderCommandKey}`,"TEXT_TOGGLE_PRE_HEADER_ROW",null==u?void 0:u.togglePreHeaderCommand),disabled:!1,command:t,positionOrder:53})}if(this.sharedService.gridOptions.enableSorting&&this.sharedService.gridOptions&&this._gridMenuOptions&&!this._gridMenuOptions.hideClearAllSortingCommand){const t="clear-sorting";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconClearAllSortingCommand||"fa fa-unsorted text-danger",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.clearAllSortingCommandKey}`,"TEXT_CLEAR_ALL_SORTING",null==u?void 0:u.clearAllSortingCommand),disabled:!1,command:t,positionOrder:51})}if(((null===(n=this.sharedService.gridOptions)||void 0===n?void 0:n.enableExport)||(null===(o=this.sharedService.gridOptions)||void 0===o?void 0:o.enableTextExport))&&this._gridMenuOptions&&!this._gridMenuOptions.hideExportCsvCommand){const t="export-csv";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconExportCsvCommand||"fa fa-download",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.exportCsvCommandKey}`,"TEXT_EXPORT_TO_CSV",null==u?void 0:u.exportCsvCommand),disabled:!1,command:t,positionOrder:54})}if(this.sharedService.gridOptions&&this.sharedService.gridOptions.enableExcelExport&&this._gridMenuOptions&&!this._gridMenuOptions.hideExportExcelCommand){const t="export-excel";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconExportExcelCommand||"fa fa-file-excel-o text-success",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.exportExcelCommandKey}`,"TEXT_EXPORT_TO_EXCEL",null==u?void 0:u.exportExcelCommand),disabled:!1,command:t,positionOrder:55})}if(((null===(s=this.sharedService.gridOptions)||void 0===s?void 0:s.enableExport)||(null===(r=this.sharedService.gridOptions)||void 0===r?void 0:r.enableTextExport))&&this._gridMenuOptions&&!this._gridMenuOptions.hideExportTextDelimitedCommand){const t="export-text-delimited";e.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&e.command===t))||a.push({iconCssClass:this._gridMenuOptions.iconExportTextDelimitedCommand||"fa fa-download",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${d}${null==u?void 0:u.exportTextDelimitedCommandKey}`,"TEXT_EXPORT_TO_TAB_DELIMITED",null==u?void 0:u.exportTextDelimitedCommand),disabled:!1,command:t,positionOrder:56})}return this.sharedService&&this.sharedService.gridOptions&&this._gridMenuOptions&&(Array.isArray(a)&&a.length>0||Array.isArray(this._gridMenuOptions.customItems)&&this._gridMenuOptions.customItems.length>0)&&(this._gridMenuOptions.customTitle=this._gridMenuOptions.customTitle||this.extensionUtility.getPickerTitleOutputString("customTitle","gridMenu")),a}executeGridMenuInternalCustomCommands(e,t){var i;const n=(null===(i=this.sharedService)||void 0===i?void 0:i.externalRegisteredResources)||[];if(t&&t.command)switch(t.command){case"clear-pinning":const e=[...this.sharedService.visibleColumns],t={frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1};this.sharedService.slickGrid.setOptions(t),this.sharedService.gridOptions.frozenColumn=t.frozenColumn,this.sharedService.gridOptions.frozenRow=t.frozenRow,this.sharedService.gridOptions.frozenBottom=t.frozenBottom,this.sharedService.gridOptions.enableMouseWheelScrollHandler=t.enableMouseWheelScrollHandler,Array.isArray(e)&&this.sharedService.slickGrid.setColumns(e),this.sharedService.slickGrid.getOptions().enableAutoSizeColumns&&this.sharedService.slickGrid.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 i=n.find((e=>"TextExportService"===e.className));if(!(null==i?void 0:i.exportToFile))throw new 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()] };");i.exportToFile({delimiter:re.comma,format:ge.csv});break;case"export-excel":const o=n.find((e=>"ExcelExportService"===e.className));if(!(null==o?void 0:o.exportToExcel))throw new 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()] };");o.exportToExcel();break;case"export-text-delimited":const s=n.find((e=>"TextExportService"===e.className));if(!(null==s?void 0:s.exportToFile))throw new 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()] };");s.exportToFile({delimiter:re.tab,format:ge.txt});break;case"toggle-filter":let r=this.sharedService&&this.sharedService.gridOptions&&this.sharedService.gridOptions.showHeaderRow||!1;r=!r,this.sharedService.slickGrid.setHeaderRowVisibility(r),!0===r&&(this.sharedService.slickGrid.setColumns(this.sharedService.columnDefinitions),this.sharedService.slickGrid.scrollColumnIntoView(0));break;case"toggle-toppanel":const l=this.sharedService&&this.sharedService.gridOptions&&this.sharedService.gridOptions.showTopPanel||!1;this.sharedService.slickGrid.setTopPanelVisibility(!l);break;case"toggle-preheader":const a=this.sharedService&&this.sharedService.gridOptions&&this.sharedService.gridOptions.showPreHeaderPanel||!1;this.sharedService.slickGrid.setPreHeaderPanelVisibility(!a);break;case"refresh-dataset":this.refreshBackendDataset()}}emptyGridMenuTitles(){var e,t;(null===(t=null===(e=this.sharedService)||void 0===e?void 0:e.gridOptions)||void 0===t?void 0:t.gridMenu)&&(this.sharedService.gridOptions.gridMenu.customTitle="",this.sharedService.gridOptions.gridMenu.columnTitle="",this.sharedService.gridOptions.gridMenu.forceFitTitle="",this.sharedService.gridOptions.gridMenu.syncResizeTitle="")}getDefaultGridMenuOptions(){return{customTitle: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,customItems:[],hideClearAllFiltersCommand:!1,hideRefreshDatasetCommand:!1,hideToggleFilterCommand:!1}}}class gn{constructor(e){this.sharedService=e,this._addon=null}dispose(){this._addon&&this._addon.destroy&&this._addon.destroy(),this._addon=null}getAddonInstance(){return this._addon}register(){return this.sharedService&&this.sharedService.slickGrid?(this._addon=this.sharedService.groupItemMetadataProvider,this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this._addon):null}}__webpack_require__(25);class vn{constructor(e,t){this.extensionUtility=e,this.sharedService=t,this._addon=null,this._headerButtonOptions=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),this.extensionUtility.nullifyFunctionNameStartingWithOn(this._headerButtonOptions),this._addon=null,this._headerButtonOptions=null}getAddonInstance(){return this._addon}register(){if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){if(this._headerButtonOptions=this.sharedService.gridOptions.headerButton||{},this._addon=new Slick.Plugins.HeaderButtons(this._headerButtonOptions),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this._addon&&this.sharedService.slickGrid&&this._headerButtonOptions){this._headerButtonOptions.onExtensionRegistered&&this._headerButtonOptions.onExtensionRegistered(this._addon);const e=this._addon.onCommand;e&&this._eventHandler.subscribe(e,((e,t)=>{this._headerButtonOptions&&"function"==typeof this._headerButtonOptions.onCommand&&this._headerButtonOptions.onCommand(e,t)}))}return this._addon}return null}}__webpack_require__(681);class _n{constructor(e,t,i,n,o,s){this.extensionUtility=e,this.filterService=t,this.pubSubService=i,this.sharedService=n,this.sortService=o,this.translaterService=s,this._addon=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&this._addon.destroy(),this._addon=null}getAddonInstance(){return this._addon}register(){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.');if(this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){if(this.sharedService.gridOptions.headerMenu={...this.getDefaultHeaderMenuOptions(),...this.sharedService.gridOptions.headerMenu},this.sharedService.gridOptions.enableHeaderMenu&&(this.sharedService.gridOptions.headerMenu=this.addHeaderMenuCustomCommands(this.sharedService.gridOptions,this.sharedService.columnDefinitions)),this._addon=new Slick.Plugins.HeaderMenu(this.sharedService.gridOptions.headerMenu),this._addon&&this.sharedService.slickGrid.registerPlugin(this._addon),this._addon&&this.sharedService.slickGrid&&this.sharedService.gridOptions.headerMenu){this.sharedService.gridOptions.headerMenu.onExtensionRegistered&&this.sharedService.gridOptions.headerMenu.onExtensionRegistered(this._addon);const e=this._addon.onCommand;if(e&&this._eventHandler.subscribe(e,((e,t)=>{this.executeHeaderMenuInternalCommands(e,t),this.sharedService.gridOptions.headerMenu&&"function"==typeof this.sharedService.gridOptions.headerMenu.onCommand&&this.sharedService.gridOptions.headerMenu.onCommand(e,t)})),this.sharedService.gridOptions.headerMenu&&"function"==typeof this.sharedService.gridOptions.headerMenu.onBeforeMenuShow){const e=this._addon.onBeforeMenuShow;e&&this._eventHandler.subscribe(e,((e,t)=>{this.sharedService.gridOptions.headerMenu&&this.sharedService.gridOptions.headerMenu.onBeforeMenuShow&&this.sharedService.gridOptions.headerMenu.onBeforeMenuShow(e,t)}))}if(this.sharedService.gridOptions.headerMenu&&"function"==typeof this.sharedService.gridOptions.headerMenu.onAfterMenuShow){const e=this._addon.onAfterMenuShow;e&&this._eventHandler.subscribe(e,((e,t)=>{this.sharedService.gridOptions.headerMenu&&this.sharedService.gridOptions.headerMenu.onAfterMenuShow&&this.sharedService.gridOptions.headerMenu.onAfterMenuShow(e,t)}))}}return this._addon}return null}addHeaderMenuCustomCommands(e,t){const i=e.headerMenu||{},n=Qe(this.sharedService.gridOptions);return t&&Array.isArray(t)&&e.enableHeaderMenu&&t.forEach((t=>{var o,s,r;if(t&&!t.excludeFromHeaderMenu){t.header&&t.header.menu||(t.header={menu:{items:[]}});const l=null!==(r=null===(s=null===(o=null==t?void 0:t.header)||void 0===o?void 0:o.menu)||void 0===s?void 0:s.items)&&void 0!==r?r:[];let a=!1;i&&!i.hideFreezeColumnsCommand&&(a=!0,l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"freeze-columns"===e.command))||l.push({iconCssClass:i.iconFreezeColumns||"fa fa-thumb-tack",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}FREEZE_COLUMNS`,"TEXT_FREEZE_COLUMNS"),command:"freeze-columns",positionOrder:47})),i&&!i.hideColumnResizeByContentCommand&&this.sharedService.gridOptions.enableColumnResizeOnDoubleClick&&(a=!0,l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"column-resize-by-content"===e.command))||l.push({iconCssClass:i.iconColumnResizeByContentCommand||"fa fa-arrows-h",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}COLUMN_RESIZE_BY_CONTENT`,"TEXT_COLUMN_RESIZE_BY_CONTENT"),command:"column-resize-by-content",positionOrder:48})),a&&!l.some((e=>"divider"!==e&&49===e.positionOrder))&&l.push({divider:!0,command:"",positionOrder:49}),e.enableSorting&&t.sortable&&i&&!i.hideSortCommands&&(l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"sort-asc"===e.command))||l.push({iconCssClass:i.iconSortAscCommand||"fa fa-sort-asc",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}SORT_ASCENDING`,"TEXT_SORT_ASCENDING"),command:"sort-asc",positionOrder:50}),l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"sort-desc"===e.command))||l.push({iconCssClass:i.iconSortDescCommand||"fa fa-sort-desc",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}SORT_DESCENDING`,"TEXT_SORT_DESCENDING"),command:"sort-desc",positionOrder:51}),l.some((e=>"divider"!==e&&52===e.positionOrder))||l.push({divider:!0,command:"",positionOrder:52}),i.hideClearSortCommand||l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"clear-sort"===e.command))||l.push({iconCssClass:i.iconClearSortCommand||"fa fa-unsorted",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}REMOVE_SORT`,"TEXT_REMOVE_SORT"),command:"clear-sort",positionOrder:54})),e.enableFiltering&&t.filterable&&i&&!i.hideFilterCommand&&(i.hideClearFilterCommand||l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"clear-filter"===e.command))||l.push({iconCssClass:i.iconClearFilterCommand||"fa fa-filter",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}REMOVE_FILTER`,"TEXT_REMOVE_FILTER"),command:"clear-filter",positionOrder:53})),!i||i.hideColumnHideCommand||l.some((e=>"divider"!==e&&e.hasOwnProperty("command")&&"hide"===e.command))||l.push({iconCssClass:i.iconColumnHideCommand||"fa fa-times",title:this.extensionUtility.translateWhenEnabledAndServiceExist(`${n}HIDE_COLUMN`,"TEXT_HIDE_COLUMN"),command:"hide",positionOrder:55}),this.extensionUtility.translateItems(l,"titleKey","title"),this.extensionUtility.sortItems(l,"positionOrder")}})),i}hideColumn(e){var t,i,n;if(null===(i=null===(t=this.sharedService)||void 0===t?void 0:t.slickGrid)||void 0===i?void 0:i.getColumnIndex){const t=this.sharedService.slickGrid.getColumnIndex(e.id),i=this.sharedService.slickGrid.getColumns(),o=null!==(n=this.sharedService.gridOptions.frozenColumn)&&void 0!==n?n:-1;o>=0&&o>=t&&(this.sharedService.gridOptions.frozenColumn=o-1,this.sharedService.slickGrid.setOptions({frozenColumn:this.sharedService.gridOptions.frozenColumn}));const s=De(i,t);this.sharedService.visibleColumns=s,this.sharedService.slickGrid.setColumns(s),this.pubSubService.publish("onHeaderMenuHideColumns",{columns:s,hiddenColumn:e})}}translateHeaderMenu(){var e;(null===(e=this.sharedService.gridOptions)||void 0===e?void 0:e.headerMenu)&&this.resetHeaderMenuTranslations(this.sharedService.visibleColumns)}getDefaultHeaderMenuOptions(){return{autoAlignOffset:12,minWidth:140,hideColumnHideCommand:!1,hideSortCommands:!1,title:""}}resetHeaderMenuTranslations(e){const t=Qe(this.sharedService.gridOptions);e.forEach((e=>{var i,n;if((null===(n=null===(i=null==e?void 0:e.header)||void 0===i?void 0:i.menu)||void 0===n?void 0:n.items)&&!e.excludeFromHeaderMenu){const i=e.header.menu.items||[];i.forEach((e=>{if("divider"!==e&&e.hasOwnProperty("command"))switch(e.command){case"column-resize-by-content":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}COLUMN_RESIZE_BY_CONTENT`,"TEXT_COLUMN_RESIZE_BY_CONTENT");break;case"clear-filter":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}REMOVE_FILTER`,"TEXT_REMOVE_FILTER");break;case"clear-sort":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}REMOVE_SORT`,"TEXT_REMOVE_SORT");break;case"freeze-columns":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}FREEZE_COLUMNS`,"TEXT_FREEZE_COLUMNS");break;case"sort-asc":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}SORT_ASCENDING`,"TEXT_SORT_ASCENDING");break;case"sort-desc":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}SORT_DESCENDING`,"TEXT_SORT_DESCENDING");break;case"hide":e.title=this.extensionUtility.translateWhenEnabledAndServiceExist(`${t}HIDE_COLUMN`,"TEXT_HIDE_COLUMN")}this.sharedService.gridOptions&&this.sharedService.gridOptions.enableTranslate&&this.extensionUtility.translateItems(i,"titleKey","title")}))}}))}clearColumnFilter(e,t){(null==t?void 0:t.column)&&this.filterService.clearFilterByColumnId(e,t.column.id)}clearColumnSort(e,t){(null==t?void 0:t.column)&&this.sharedService&&this.sortService.clearSortByColumnId(e,t.column.id)}executeHeaderMenuInternalCommands(e,t){var i;if(null==t?void 0:t.command)switch(t.command){case"hide":this.hideColumn(t.column),(null===(i=this.sharedService.gridOptions)||void 0===i?void 0:i.enableAutoSizeColumns)&&this.sharedService.slickGrid.autosizeColumns();break;case"clear-filter":this.clearColumnFilter(e,t);break;case"clear-sort":this.clearColumnSort(e,t);break;case"column-resize-by-content":this.pubSubService.publish("onHeaderMenuColumnResizeByContent",{columnId:t.column.id});break;case"freeze-columns":const n=[...this.sharedService.visibleColumns],o={frozenColumn:n.findIndex((e=>e.id===t.column.id)),enableMouseWheelScrollHandler:!0},s=this.sharedService.slickGrid.getColumns();this.sharedService.slickGrid.setOptions(o,!1,!0),this.sharedService.gridOptions.frozenColumn=o.frozenColumn,this.sharedService.gridOptions.enableMouseWheelScrollHandler=o.enableMouseWheelScrollHandler,this.sharedService.frozenVisibleColumnId=t.column.id,this.sharedService.hasColumnsReordered||Array.isArray(n)&&Array.isArray(this.sharedService.allColumns)&&n.length!==this.sharedService.allColumns.length?this.sharedService.slickGrid.setColumns(n):this.sharedService.slickGrid.setColumns(s),this.sharedService.slickGrid.getOptions().enableAutoSizeColumns&&this.sharedService.slickGrid.autosizeColumns();break;case"sort-asc":case"sort-desc":const r="sort-asc"===t.command;this.sortColumn(e,t,r)}}sortColumn(e,t,i=!0){if(null==t?void 0:t.column){const n=t.column,o=this.sharedService.gridOptions.multiColumnSort?this.sortService.getCurrentColumnSorts(n.id+""):[];let s=r.local;o.push({columnId:n.id,sortCol:n,sortAsc:i}),this.sharedService.gridOptions.backendServiceApi?(this.sortService.onBackendSortChanged(e,{multiColumnSort:!0,sortCols:o,grid:this.sharedService.slickGrid}),s=r.remote):this.sharedService.dataView?(this.sortService.onLocalSortChanged(this.sharedService.slickGrid,o),s=r.local):t.grid.onSort.notify(o);const l=o.map((e=>{var t,i,n;return{columnId:null!==(i=null===(t=null==e?void 0:e.sortCol)||void 0===t?void 0:t.id)&&void 0!==i?i:"",sortAsc:null===(n=null==e?void 0:e.sortAsc)||void 0===n||n}}));if(this.sharedService.slickGrid.setSortColumns(l),s){const e=[];l.forEach((t=>{e.push({columnId:`${t.columnId}`,direction:t.sortAsc?"ASC":"DESC"})})),this.sortService.emitSortChanged(s,e)}}}}class Cn{dispose(){throw new Error('[Slickgrid-Universal] RowDetailViewExtension "dispose" method is not yet implemented')}create(e,t){throw new Error('[Slickgrid-Universal] RowDetailViewExtension "create" method is not yet implemented')}getAddonInstance(){throw new Error('[Slickgrid-Universal] RowDetailViewExtension "getAddonInstance" method is not yet implemented')}register(e){throw new Error('[Slickgrid-Universal] RowDetailViewExtension "register" method is not yet implemented')}}__webpack_require__(378);class bn{constructor(e){this.sharedService=e,this._addon=null,this._eventHandler=new Slick.EventHandler}get eventHandler(){return this._eventHandler}dispose(){var e;this._eventHandler.unsubscribeAll(),this._addon&&this._addon.destroy&&(this._addon.destroy(),this._addon=null),(null===(e=this._rowSelectionPlugin)||void 0===e?void 0:e.destroy)&&this._rowSelectionPlugin.destroy()}create(e,t){var i,n,o;if(Array.isArray(e)&&t){this._addon=this.loadAddonWhenNotExists(e,t);const s=null===(i=this._addon)||void 0===i?void 0:i.getColumnDefinition(),r=Array.isArray(e)&&e.find((e=>e&&"selectAndMove"===e.behavior)),l=r||s;if("object"==typeof l&&(l.excludeFromExport=!0,l.excludeFromColumnPicker=!0,l.excludeFromGridMenu=!0,l.excludeFromQuery=!0,l.excludeFromHeaderMenu=!0),!r&&l){const i=null!==(o=null===(n=null==t?void 0:t.rowMoveManager)||void 0===n?void 0:n.columnIndexPosition)&&void 0!==o?o:0;i>0?e.splice(i,0,l):e.unshift(l)}return this._addon}return null}loadAddonWhenNotExists(e,t){return Array.isArray(e)&&t?(this._addon||(this._addon=new Slick.RowMoveManager((null==t?void 0:t.rowMoveManager)||{cancelEditOnDrag:!0,hideRowMoveShadow:!1})),this._addon):null}getAddonInstance(){return this._addon}register(e){if(this._addon&&this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions){if(e&&this.sharedService.slickGrid.getSelectionModel()||(e=new Slick.RowSelectionModel(this.sharedService.gridOptions.rowSelectionOptions),this.sharedService.slickGrid.setSelectionModel(e)),this._rowSelectionPlugin=e,this.sharedService.slickGrid.registerPlugin(this._addon),this._addon&&this.sharedService.slickGrid&&this.sharedService.gridOptions.rowMoveManager){this.sharedService.gridOptions.rowMoveManager.onExtensionRegistered&&this.sharedService.gridOptions.rowMoveManager.onExtensionRegistered(this._addon);const e=this._addon.onBeforeMoveRows;e&&this._eventHandler.subscribe(e,((e,t)=>{if(this.sharedService.gridOptions.rowMoveManager&&"function"==typeof this.sharedService.gridOptions.rowMoveManager.onBeforeMoveRows)return this.sharedService.gridOptions.rowMoveManager.onBeforeMoveRows(e,t)}));const t=this._addon.onMoveRows;t&&this._eventHandler.subscribe(t,((e,t)=>{this.sharedService.gridOptions.rowMoveManager&&"function"==typeof this.sharedService.gridOptions.rowMoveManager.onMoveRows&&this.sharedService.gridOptions.rowMoveManager.onMoveRows(e,t)}))}return this._addon}return null}}class yn{constructor(e){this.sharedService=e,this._addon=null}dispose(){this._addon&&this._addon.destroy&&(this._addon.destroy(),this._addon=null)}getAddonInstance(){return this._addon}register(){return this.sharedService&&this.sharedService.slickGrid&&this.sharedService.gridOptions?(this._addon=new Slick.RowSelectionModel(this.sharedService.gridOptions.rowSelectionOptions),this._addon&&this.sharedService.slickGrid.setSelectionModel(this._addon),this._addon):null}}const wn=(e,t,i)=>{if(i&&Array.isArray(i)&&i.length>0){const e=i.join(", ");return`<span title="${e}">${e}</span>`}return i},Sn=(e,t,i)=>{let n=i;return null==i&&(n=""),`<center>${n}</center>`},En=(e,t,i,n,o)=>{var s,r,l;if(!n)return"";const a=n.params||{},d=null!==(r=null!==(s=null==a?void 0:a.complexField)&&void 0!==s?s:null==a?void 0:a.complexFieldLabel)&&void 0!==r?r:n.field;if(!d)throw new Error("For the Formatters.complexObject to work properly, you need to tell it which property of the complex object to use.\n There are 3 ways to provide it:\n 1- via the generic \"params\" with a \"complexField\" property on your Column Definition, example: this.columnDefs = [{ id: 'user', field: 'user', params: { complexField: 'user.firstName' } }]\n 2- via the generic \"params\" with a \"complexField\" and a \"labelKey\" property on your Column Definition, example: this.columnDefs = [{ id: 'user', field: 'user', labelKey: 'firstName', params: { complexField: 'user' } }]\n 3- via the field name that includes a dot notation, example: this.columnDefs = [{ id: 'user', field: 'user.firstName'}] ");if(n.labelKey&&o.hasOwnProperty(d))return null===(l=o[d])||void 0===l?void 0:l[n.labelKey];if("string"==typeof d&&d.indexOf(".")>0){let e=d.split(".").reduce(((e,t)=>(null==e?void 0:e.hasOwnProperty(t))?e[t]:""),o);return null!=e&&("object"!=typeof e||0!==Object.entries(e).length||e instanceof Date)||(e=""),e}return i},Tn={alignCenter:Sn,alignRight:(e,t,i)=>{let n=i;return null==i&&(n=""),`<div style="float: right">${n}</div>`},arrayObjectToCsv:(e,t,i,n,o)=>{var s;const r=n&&n.params||{},l=r.propertyNames,a=null===(s=null==r?void 0:r.includeTitle)||void 0===s||s;let d=r.dataContextProperty;if(d||(d=n&&n.field&&n.field.split(".")[0]),!l||!Array.isArray(l)||!d)throw new Error('Formatters.arrayObjectToCsv requires you to pass an array of "propertyNames" (declared in "params") that you want to pull the data from.\n For example, if we have an array of user objects that have the property of firstName & lastName then we need to pass in your column definition:: { params: { propertyNames: [\'firtName\'] }}.\n Optionally, you can also pass the "dataContextProperty" if you wish to run this on another completely different field of the dataContext object.');if(o[d]&&Array.isArray(o[d])&&Array.isArray(o[d])&&o[d].length>0){const e=[];o[d].forEach((t=>{const i=[];l.forEach((e=>{i.push(t[e])})),e.push(i.join(" "))}));const t=e.join(", ");return a?`<span title="${t}">${t}</span>`:t}return i},arrayToCsv:wn,bold:(e,t,i)=>i?`<b>${i}</b>`:"",bsDropdown:(e,t,i,n)=>{const o=n&&n.params||{},s=o.label||o.formatterLabel;if(!s)throw new Error('You must provide the "label" or "formatterLabel" via the generic "params" options (e.g.: { formatter: Formatters.bsDropdown, params: { formatterLabel: \'Label\' }}');return`<div id="myDrop-r${e}-c${t}" class="dropdown pointer">\n <a class="dropdown-toggle">\n ${s}\n <span class="caret"></span>\n </a>\n </div>`},center:Sn,checkbox:(e,t,i)=>i?"&#x2611;":"",checkmark:(e,t,i)=>{let n=!1;const o=Ue(i);return o&&(i=+i),(!0===i||o&&+i>0||"string"==typeof i&&i.length>0&&"false"!==i.toLowerCase()&&"0"!==i)&&(n=!0),n?'<i class="fa fa-check checkmark-icon" aria-hidden="true"></i>':""},checkmarkMaterial:(e,t,i)=>{let n=!1;const o=Ue(i);return o&&(i=+i),(!0===i||o&&+i>0||"string"==typeof i&&i.length>0&&"false"!==i.toLowerCase()&&"0"!==i)&&(n=!0),n?'<i class="mdi mdi-18px mdi-check checkmark-icon" aria-hidden="true"></i>':""},complex:En,complexObject:En,collection:(e,t,i,n,o,s)=>{if(!(i&&n&&n.params&&n.params.collection&&n.params.collection.length))return i;const{params:r,params:{collection:l}}=n,a=r.customStructure?r.customStructure.label:"label",d=r.customStructure?r.customStructure.value:"value";return Array.isArray(i)?wn(0,0,i.map((e=>ft(l,(t=>t[d]===e))[a]))):ft(l,(e=>e[d]===i))[a]||""},collectionEditor:(e,t,i,n,o,s)=>{if(!(i&&n&&n.internalColumnEditor&&n.internalColumnEditor.collection&&n.internalColumnEditor.collection.length))return i;const{internalColumnEditor:r,internalColumnEditor:{collection:l}}=n,a=r.customStructure?r.customStructure.label:"label",d=r.customStructure?r.customStructure.value:"value";return Array.isArray(i)?l.every((e=>"string"==typeof e))?wn(0,0,i.map((e=>ft(l,(t=>t===e))))):wn(0,0,i.map((e=>ft(l,(t=>t[d]===e))[a]))):ft(l,(e=>e[d]===i))[a]||""},dateIso:Li(fe.dateIso,"-"),dateTimeIso:Li(fe.dateTimeIso,"-"),dateTimeShortIso:Li(fe.dateTimeShortIso,"-"),dateTimeIsoAmPm:Li(fe.dateTimeIsoAmPm,"-"),dateEuro:Li(fe.dateEuro,"/"),dateTimeEuro:Li(fe.dateTimeEuro,"/"),dateTimeShortEuro:Li(fe.dateTimeShortEuro,"/"),dateTimeEuroAmPm:Li(fe.dateTimeEuroAmPm,"/"),dateUs:Li(fe.dateUs,"/"),dateTimeUs:Li(fe.dateTimeUs,"/"),dateTimeShortUs:Li(fe.dateTimeShortUs,"/"),dateTimeUsAmPm:Li(fe.dateTimeUsAmPm,"/"),deleteIcon:()=>'<i class="fa fa-trash pointer delete-icon" aria-hidden="true"></i>',decimal:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s,2),l=Ni("maxDecimal",n,s,2),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("numberPrefix",n,s,""),c=Ni("numberSuffix",n,s,""),h=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?Xe(i,r,l,h,u,c,a,d):i},dollar:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s,2),l=Ni("maxDecimal",n,s,4),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?Xe(i,r,l,u,"$","",a,d):i},dollarColored:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s,2),l=Ni("maxDecimal",n,s,4),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?`<span style="color:${i>=0?"green":"red"}">${Xe(i,r,l,u,"$","",a,d)}</span>`:i},dollarColoredBold:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s,2),l=Ni("maxDecimal",n,s,4),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?`<span style="color:${i>=0?"green":"red"}; font-weight:bold;">${Xe(i,r,l,u,"$","",a,d)}</span>`:i},editIcon:()=>'<i class="fa fa-pencil pointer edit-icon" aria-hidden="true"></i>',fakeHyperlink:(e,t,i)=>i?`<span class="fake-hyperlink">${i}</span>`:"",hyperlink:(e,t,i,n,o,s)=>{const r=n&&n.params||{},l=s&&"function"==typeof s.getOptions?s.getOptions():{};let a=r.hyperlinkText?r.hyperlinkText:i;a=at(l,a);let d=r.hyperlinkUrl?r.hyperlinkUrl:i;d=at(l,d);const u=d.match(/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/i);return u&&Array.isArray(u)&&u.length>0?`<a href="${u[0]}">${a}</a>`:i},icon:(e,t,i,n)=>{const o=n&&n.params||{},s=o.icon||o.formatterIcon;if(!s)throw new Error('You must provide the "icon" or "formatterIcon" via the generic "params" options (e.g.: { formatter: Formatters.icon, params: { formatterIcon: \'fa fa-search\' }}');return`<i class="${s}" aria-hidden="true"></i>`},infoIcon:()=>'<i class="fa fa-info-circle pointer info-icon" aria-hidden="true"></i>',italic:(e,t,i)=>i?`<i>${i}</i>`:"",lowercase:(e,t,i)=>(void 0!==i&&"string"!=typeof i&&(i+=""),i?i.toLowerCase():""),mask:(e,t,i,n)=>{const o=(n.params||{}).mask;if(!o)throw new Error('You must provide a "mask" via the generic "params" options (e.g.: { formatter: Formatters.mask, params: { mask: \'000-000\' }}');if(i){let e=0;const t=i.toString();return o.replace(/[09A]/gi,(()=>t[e++]||""))}return i},multiple:Pi,percent:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s),l=Ni("maxDecimal",n,s),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?Xe(100*i,r,l,u,"","%",a,d):i},percentComplete:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s),l=Ni("maxDecimal",n,s),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);if(Ue(i)){const e=i<50?"red":"green",t=Xe(i,r,l,u,"","%",a,d);return`<span style="color:${e}">${i>100?"100%":t}</span>`}return i},percentCompleteBar:(e,t,i)=>{if(!Ue(i))return"";let n="",o=parseFloat(i);return o>100&&(o=100),n=o<30?"red":o<70?"silver":"green",`<span class="percent-complete-bar" title="${o}%" style="background:${n}; width:${o}%"></span>`},percentCompleteBarWithText:(e,t,i)=>{if(!Ue(i))return"";let n="",o=parseFloat(i);return o>100&&(o=100),n=o<30?"red":o<70?"silver":"green",`<div class="percent-complete-bar-with-text" title="${o}%" style="background:${n}; width:${o}%">${o}%</div>`},percentSymbol:(e,t,i,n,o,s)=>{const r=Ni("minDecimal",n,s),l=Ni("maxDecimal",n,s),a=Ni("decimalSeparator",n,s,"."),d=Ni("thousandSeparator",n,s,""),u=Ni("displayNegativeNumberWithParentheses",n,s,!1);return Ue(i)?Xe(i,r,l,u,"","%",a,d):i},progressBar:(e,t,i)=>{if(!Ue(i))return"";let n="",o=parseFloat(i);return o>100&&(o=100),n=o<30?"danger":o<70?"warning":"success",`<div class="progress">\n <div class="progress-bar progress-bar-${n} bg-${n}" role="progressbar" aria-valuenow="${o}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: ${o}%;">\n ${o}%\n </div>\n </div>`.replace(/\s{2,}/g," ").trim()},translate:(e,t,i,n,o,s)=>{const r=(s&&"function"==typeof s.getOptions?s.getOptions():{}).translater||n&&n.params&&n.params.translater;if(!r||"function"!=typeof r.translate)throw new Error('"Formatters.translate" requires the Translate Service to be provided as a Grid Options "translater" (or "i18n" depending on which framework you use).\n For example: this.gridOptions = { enableTranslate: true, translater: this.translateService }');return null!=i&&"string"!=typeof i&&(i+=""),i?r.translate(i):""},translateBoolean:(e,t,i,n,o,s)=>{const r=(s&&"function"==typeof s.getOptions?s.getOptions():{}).translater||n&&n.params&&n.params.translater;if(!r||"function"!=typeof r.translate)throw new Error('"Formatters.translateBoolean" requires the Translate Service to be provided as a Grid Options "translater" (or "i18n" depending on which framework you use).\n For example: this.gridOptions = { enableTranslate: true, translater: this.translateService }');return null!=i&&"string"!=typeof i&&(i+=""),i?r.translate(i.toUpperCase()):""},tree:(e,t,i,n,o,s)=>{var r,l,a,d,u;const c=s.getOptions(),h=null==c?void 0:c.treeDataOptions,p=null!==(r=null==h?void 0:h.indentMarginLeft)&&void 0!==r?r:15,m=null!==(l=null==h?void 0:h.collapsedPropName)&&void 0!==l?l:me.treeDataProperties.COLLAPSED_PROP,f=null!==(a=null==h?void 0:h.hasChildrenPropName)&&void 0!==a?a:me.treeDataProperties.HAS_CHILDREN_PROP,g=null!==(d=null==h?void 0:h.levelPropName)&&void 0!==d?d:me.treeDataProperties.TREE_LEVEL_PROP;let v=i;if("function"==typeof n.queryFieldNameGetterFn){const e=n.queryFieldNameGetterFn(o);v=(null==e?void 0:e.indexOf("."))>=0?Ke(o,e):o.hasOwnProperty(e)?o[e]:i}if(null==v||void 0===o)return"";if(!o.hasOwnProperty(g))throw new Error('[Slickgrid-Universal] You must provide valid "treeDataOptions" in your Grid Options, however it seems that we could not find any tree level info on the current item datacontext row.');const _=null!==(u=null==o?void 0:o[g])&&void 0!==u?u:0,C=`<span style="display:inline-block; width:${p*_}px;"></span>`,b=`slick-tree-level-${_}`;let y="";o[f]&&(y=(null==o?void 0:o[m])?"collapsed":"expanded"),(null==h?void 0:h.titleFormatter)&&(v=Hi(h.titleFormatter,e,t,n,o,s));const w=at(c,v,{ADD_ATTR:["target"]});return{addClasses:b,text:`${C}<span class="${`slick-group-toggle ${y}`.trim()}"></span><span class="slick-tree-title" level="${_}">${w}</span>`}},treeExport:(e,t,i,n,o,s)=>{var r,l,a,d,u,c,h,p,m,f,g;const v=s.getOptions(),_=null==v?void 0:v.treeDataOptions,C=null!==(r=null==_?void 0:_.collapsedPropName)&&void 0!==r?r:me.treeDataProperties.COLLAPSED_PROP,b=null!==(l=null==_?void 0:_.hasChildrenPropName)&&void 0!==l?l:me.treeDataProperties.HAS_CHILDREN_PROP,y=null!==(a=null==_?void 0:_.levelPropName)&&void 0!==a?a:me.treeDataProperties.TREE_LEVEL_PROP,w=null!==(d=null==_?void 0:_.exportIndentMarginLeft)&&void 0!==d?d:5,S=null!==(u=null==_?void 0:_.exportIndentationLeadingChar)&&void 0!==u?u:".",E=null!==(c=null==_?void 0:_.exportIndentationLeadingSpaceCount)&&void 0!==c?c:3,T=null!==(p=null===(h=null==v?void 0:v.excelExportOptions)||void 0===h?void 0:h.groupCollapsedSymbol)&&void 0!==p?p:"⮞",x=null!==(f=null===(m=null==v?void 0:v.excelExportOptions)||void 0===m?void 0:m.groupExpandedSymbol)&&void 0!==f?f:"⮟";let O=i;if("function"==typeof n.queryFieldNameGetterFn){const e=n.queryFieldNameGetterFn(o);O=(null==e?void 0:e.indexOf("."))>=0?Ke(o,e):o.hasOwnProperty(e)?o[e]:i}if(null==O||void 0===o)return"";if(!o.hasOwnProperty(y))throw new Error('[Slickgrid-Universal] You must provide valid "treeDataOptions" in your Grid Options, however it seems that we could not find any tree level info on the current item datacontext row.');const k=null!==(g=null==o?void 0:o[y])&&void 0!==g?g:0;let D="",A=0;o[b]?(D=(null==o?void 0:o[C])?T:x,A=0===k?0:w*k):A=w*(0===k?0:k+1);const R=ke(A);return(null==_?void 0:_.titleFormatter)&&(O=Hi(_.titleFormatter,e,t,n,o,s)),O=`${0===k&&D?"":0===k?`${S}${ke(E)}`:S}${R}${D} ${O}`,lt(O)},uppercase:(e,t,i)=>(void 0!==i&&"string"!=typeof i&&(i+=""),i?i.toUpperCase():""),yesNo:(e,t,i)=>i?"Yes":"No"},xn={avgTotals:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"";let r=null===(o=e.avg)||void 0===o?void 0:o[s];const l=null==t?void 0:t.params;let a=(null==l?void 0:l.groupFormatterPrefix)||"";const d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);if(null!==r&&!isNaN(+r)){if(r<0){if(r=Math.abs(r),m)return isNaN(u)&&isNaN(c)?`${a}(${ut(Math.round(r),p)})${d}`:`${a}(${Ye(r,u,c,h,p)})${d}`;a+="-"}return isNaN(u)&&isNaN(c)?`${a}${ut(Math.round(r),p)}${d}`:`${a}${Ye(r,u,c,h,p)}${d}`}return""},avgTotalsDollar:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.avg)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i,2),c=Ni("maxDecimal",t,i,4),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`${a}${Xe(r,u,c,m,"$","",h,p)}${d}`},avgTotalsPercentage:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"";let r=null===(o=e.avg)||void 0===o?void 0:o[s];const l=null==t?void 0:t.params;let a=(null==l?void 0:l.groupFormatterPrefix)||"";const d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);if(null!==r&&!isNaN(+r)){if(r<0){if(r=Math.abs(r),m)return isNaN(u)&&isNaN(c)?`${a}(${ut(Math.round(r),p)}%)${d}`:`${a}(${Ye(r,u,c,h,p)}%)${d}`;a+="-"}return isNaN(u)&&isNaN(c)?`${a}${ut(Math.round(r),p)}%${d}`:`${a}${Ye(r,u,c,h,p)}%${d}`}return""},maxTotals:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.max)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`${a}${Xe(r,u,c,m,"","",h,p)}${d}`},minTotals:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.min)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`${a}${Xe(r,u,c,m,"","",h,p)}${d}`},sumTotals:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`${a}${Xe(r,u,c,m,"","",h,p)}${d}`},sumTotalsBold:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`<b>${a}${Xe(r,u,c,m,"","",h,p)}${d}</b>`},sumTotalsColored:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i),c=Ni("maxDecimal",t,i),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`<span style="color:${r>=0?"green":"red"}">${a}${Xe(r,u,c,m,"","",h,p)}${d}</span>`},sumTotalsDollar:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i,2),c=Ni("maxDecimal",t,i,4),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`${a}${Xe(r,u,c,m,"$","",h,p)}${d}`},sumTotalsDollarBold:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i,2),c=Ni("maxDecimal",t,i,4),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`<b>${a}${Xe(r,u,c,m,"$","",h,p)}${d}</b>`},sumTotalsDollarColored:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i,2),c=Ni("maxDecimal",t,i,4),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`<span style="color:${r>=0?"green":"red"}">${a}${Xe(r,u,c,m,"$","",h,p)}${d}</span>`},sumTotalsDollarColoredBold:(e,t,i)=>{var n,o;const s=null!==(n=t.field)&&void 0!==n?n:"",r=null===(o=e.sum)||void 0===o?void 0:o[s],l=null==t?void 0:t.params,a=(null==l?void 0:l.groupFormatterPrefix)||"",d=(null==l?void 0:l.groupFormatterSuffix)||"",u=Ni("minDecimal",t,i,2),c=Ni("maxDecimal",t,i,4),h=Ni("decimalSeparator",t,i,"."),p=Ni("thousandSeparator",t,i,""),m=Ni("displayNegativeNumberWithParentheses",t,i,!1);return null===r||isNaN(+r)?"":`<span style="color:${r>=0?"green":"red"}; font-weight: bold;">${a}${Xe(r,u,c,m,"$","",h,p)}${d}</span>`}};class On{constructor(){this.options=Xi}}const kn=kt()||Ot,Dn={...e,...t,...o,...s,deepAssign:kn},An=ce||i;class Rn{constructor(e){this._value=null,this._boundedEventWithListeners=[],this._elementBindings=[],this._binding=e,this._property=e.property||"",this._elementBindings=[],e.property&&e.variable&&(e.variable.hasOwnProperty(e.property)||e.property in e.variable)?this._value="string"==typeof e.variable[e.property]?this.sanitizeText(e.variable[e.property]):e.variable[e.property]:this._value="string"==typeof e.variable?this.sanitizeText(e.variable):e.variable,"object"==typeof e.variable&&Object.defineProperty(e.variable,e.property,{get:this.valueGetter.bind(this),set:this.valueSetter.bind(this)})}get boundedEventWithListeners(){return this._boundedEventWithListeners}get elementBindings(){return this._elementBindings}get property(){return this._property}dispose(){this.unbindAll(),this._boundedEventWithListeners=[],this._elementBindings=[]}valueGetter(){return this._value}valueSetter(e){if(this._value="string"==typeof e?this.sanitizeText(e):e,Array.isArray(this._elementBindings))for(const t of this._elementBindings)(null==t?void 0:t.element)&&(null==t?void 0:t.attribute)&&(t.element[t.attribute]="string"==typeof e?this.sanitizeText(e):e)}bind(e,t,i,n){return e&&e.forEach?e.forEach((e=>this.bindSingleElement(e,t,i,n))):e&&this.bindSingleElement(e,t,i,n),this}unbind(e,t,i,n,o){if(e){e.removeEventListener(t,i,n);const s=this._boundedEventWithListeners.findIndex((e=>e.uid===o));s>=0&&this._boundedEventWithListeners.splice(s,1)}}unbindAll(){let e=this._boundedEventWithListeners.pop();for(;e;){const{element:t,eventName:i,listener:n,uid:o}=e;this.unbind(t,i,n,void 0,o),e=this._boundedEventWithListeners.pop()}this._boundedEventWithListeners=[]}bindSingleElement(e,t,i,n){const o={element:e,attribute:t};if(e){if(i){const s=()=>{const i=e[t];if(this.valueSetter(i),(this._binding.variable.hasOwnProperty(this._binding.property)||this._binding.property in this._binding.variable)&&(this._binding.variable[this._binding.property]=this.valueGetter()),"function"==typeof n)return n(this.valueGetter())};o.event=i,o.listener=s,e.addEventListener(i,s),this._boundedEventWithListeners.push({element:e,eventName:i,listener:s,uid:this.generateUuidV4()})}this._elementBindings.push(o),e[t]="string"==typeof this._value?this.sanitizeText(this._value):this._value}}generateUuidV4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}sanitizeText(e){return(null==An?void 0:An.sanitize)?An.sanitize(e,{}):e}}class In{constructor(){this._observers=[],this._querySelectorPrefix=""}get querySelectorPrefix(){return this._querySelectorPrefix||""}set querySelectorPrefix(e){this._querySelectorPrefix=e}get observers(){return this._observers}dispose(){for(const e of this._observers)e.dispose();this._observers=[]}addElementBinding(e,t,i,n,o,s){const r=document.querySelectorAll(`${this.querySelectorPrefix}${i}`);let l=this._observers.find((t=>t.property===e));l||(l=new Rn({variable:e,property:t})),Array.isArray(o)?o.forEach((e=>null==l?void 0:l.bind(r,n,e,s))):null==l||l.bind(r,n,o,s),this._observers.push(l)}bindEventHandler(e,t,i,n){document.querySelectorAll(`${this.querySelectorPrefix}${e}`).forEach((e=>{(null==e?void 0:e.addEventListener)&&e.addEventListener(t,i,n)}))}setElementAttributeValue(e,t,i){document.querySelectorAll(`${this.querySelectorPrefix}${e}`).forEach((e=>{e.textContent="",e&&t in e&&(e[t]=i)}))}}class Pn{constructor(e){this._subscribedEvents=[],this.eventNamingStyle=le.camelCase,this._elementSource=e||document.createElement("div")}get subscribedEvents(){return this._subscribedEvents}get subscribedEventNames(){return this._subscribedEvents.map((e=>e.name))}publish(e,t,i){const n=this.getEventNameByNamingConvention(e,"");return i?new Promise((e=>{const o=this.dispatchCustomEvent(n,t,!0,!0);setTimeout((()=>e(o)),i)})):this.dispatchCustomEvent(n,t,!0,!0)}subscribe(e,t){const i=this.getEventNameByNamingConvention(e,"");this._elementSource.addEventListener(i,(e=>t.call(null,e.detail))),this._subscribedEvents.push({name:i,listener:t})}subscribeEvent(e,t){const i=this.getEventNameByNamingConvention(e,"");this._elementSource.addEventListener(i,t),this._subscribedEvents.push({name:i,listener:t})}unsubscribe(e,t){const i=this.getEventNameByNamingConvention(e,"");this._elementSource.removeEventListener(i,t)}unsubscribeAll(e){if(Array.isArray(e))for(const t of e)(null==t?void 0:t.dispose)?t.dispose():(null==t?void 0:t.unsubscribe)&&t.unsubscribe();else for(const e of this._subscribedEvents)this.unsubscribe(e.name,e.listener)}dispatchCustomEvent(e,t,i=!0,n=!0){const o={bubbles:i,cancelable:n};return t&&(o.detail=t),this._elementSource.dispatchEvent(new CustomEvent(e,o))}getEventNameByNamingConvention(e,t){let i="";switch(this.eventNamingStyle){case le.camelCase:i=""!==t?`${t}${ct(e)}`:e;break;case le.kebabCase:i=""!==t?`${t}-${pt(e)}`:pt(e);break;case le.lowerCase:i=`${t}${e}`.toLowerCase();break;case le.lowerCaseWithoutOnPrefix:i=`${t}${e.replace(/^on/,"")}`.toLowerCase()}return i}}function Mn(e,t,i){let n;i={modalType:"edit",validationFailedMsg:"Some of the fields have failed validation",validationMsgPrefix:null,show:null,hide:null,position:null,destroy:null,formValues:{},editors:{},...i};const o=()=>{},s=e=>{var i,n,o,s;const r=t[e],l=gt(r),a=r.clientWidth||0,d=r.clientHeight||0;return{top:null!==(i=null==l?void 0:l.top)&&void 0!==i?i:0,left:null!==(n=null==l?void 0:l.left)&&void 0!==n?n:0,bottom:(null!==(o=null==l?void 0:l.top)&&void 0!==o?o:0)+d,right:(null!==(s=null==l?void 0:l.left)&&void 0!==s?s:0)+a,width:a,height:d,visible:!0}};function r(r){const l=this;let a=[];l.getEditors=()=>a,l.destroy=()=>{var e;let t=0;for(;t<a.length;)a[t].destroy(),t++;null===(e=null==i?void 0:i.destroy)||void 0===e||e.call(i),a=[]},l.focus=()=>{(n||a[0]).focus()},l.isValueChanged=()=>{let e=0;for(;e<a.length;){if(a[e].isValueChanged())return!0;e++}return!1},l.serializeValue=()=>{const e=[];let t=0;for(;t<a.length;)e[t]=a[t].serializeValue(),t++;return e},l.applyValue=(e,t)=>{let i=0;for(;i<a.length;)a[i].applyValue(e,null==t?void 0:t[i]),i++},l.loadValue=e=>{let t=0;for(;t<a.length;)a[t].loadValue(e),t++},l.validate=e=>{var o,s;let r;n=null;const l=[];let d=0;for(;d<a.length;){const u=null===(o=a[d].args)||void 0===o?void 0:o.column;if(void 0!==(null==u?void 0:u.id)){const o=document.querySelector(".slick-editor-modal");let c=null==o?void 0:o.querySelector(`.item-details-validation.editor-${u.id}`),h=null==o?void 0:o.querySelector(`.item-details-label.editor-${u.id}`),p=null==o?void 0:o.querySelector(`[data-editorid=${u.id}]`);const m=null!==(s=null==i?void 0:i.validationMsgPrefix)&&void 0!==s?s:"";e&&!(null==p?void 0:p.contains(e))||(r=a[d].validate(),r.valid?c&&(c.textContent="",null==p||p.classList.remove("invalid"),null==h||h.classList.remove("invalid")):(n=a[d],l.push({index:d,editor:a[d],container:t[d],msg:r.msg}),c&&(c.textContent=`${m}${r.msg}`,null==h||h.classList.add("invalid"),null==p||p.classList.add("invalid")))),c=null,h=null,p=null}d++}return e=null,l.length?{valid:!1,msg:i.validationFailedMsg,errors:l}:{valid:!0,msg:""}},l.hide=()=>{var e,t,n;let o=0;for(;o<a.length;)null===(t=null===(e=a[o])||void 0===e?void 0:e.hide)||void 0===t||t.call(e),o++;null===(n=null==i?void 0:i.hide)||void 0===n||n.call(i)},l.show=()=>{var e,t,n;let o=0;for(;o<a.length;)null===(t=null===(e=a[o])||void 0===e?void 0:e.show)||void 0===t||t.call(e),o++;null===(n=null==i?void 0:i.show)||void 0===n||n.call(i)},l.position=e=>{var t;null===(t=null==i?void 0:i.position)||void 0===t||t.call(i,e)},function(){let n={},l=0;for(;l<e.length;){if(e[l].editor){const d=e[l];n={...r},n.container=t[l],n.column=d,n.position=s(l),n.commitChanges=o,n.cancelChanges=o,n.compositeEditorOptions=i,n.formValues={};const u=new d.editor(n);i.editors[d.id]=u,a.push(u)}l++}setTimeout((()=>{Array.isArray(a)&&a.length>0&&a[0].focus&&a[0].focus()}),0)}()}return r.prototype=this,Slick.CompositeEditor=r,r}const Fn=kt()||Ot,Nn=e=>console.log(e.message);class Ln{constructor(){this._columnDefinitions=[],this._lastActiveRowNumber=-1,this._formValues=null,this.gridService=null,this.gridStateService=null,this._eventHandler=new Slick.EventHandler,this._bindEventService=new oi}get eventHandler(){return this._eventHandler}get dataView(){return this.grid.getData()}get dataViewLength(){return this.dataView.getLength()}get formValues(){return this._formValues}get editors(){return this._editors}set editors(e){this._editors=e}get gridOptions(){var e;return null===(e=this.grid)||void 0===e?void 0:e.getOptions()}init(e,t){var i,n;if(this.grid=e,this.gridService=t.get("GridService"),this.gridStateService=t.get("GridStateService"),this.translaterService=t.get("TranslaterService"),!this.gridService||!this.gridStateService)throw new Error("[Slickgrid-Universal] it seems that the GridService and/or GridStateService are not being loaded properly, make sure the Container Service is properly implemented.");if(this.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.');this._locales=null!==(n=null===(i=this.gridOptions)||void 0===i?void 0:i.locales)&&void 0!==n?n:me.locales}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this._formValues=null,this.disposeComponent()}disposeComponent(){var e;"function"==typeof(null===(e=this._modalElm)||void 0===e?void 0:e.remove)&&(this._modalElm.remove(),document.body.classList.remove("slick-modal-open"))}changeFormInputValue(e,t,i=!1,n=!0){var o,s,r,l,a,d,u,c,h,p,m,f;const g=this.getColumnByObjectOrId(e),v="string"==typeof e?e:null!==(o=null==g?void 0:g.id)&&void 0!==o?o:"",_=null===(s=this._editors)||void 0===s?void 0:s[v];let C=t;if(!_&&!i)throw new Error(`Composite Editor with column id "${v}" not found.`);if("function"==typeof(null==_?void 0:_.setValue)&&Array.isArray(this._editorContainers)){_.setValue(t,!0,n);const e=this._editorContainers.find((e=>e.dataset.editorid===v)),i=null!==(a=null===(l=null===(r=this.gridOptions)||void 0===r?void 0:r.compositeEditorOptions)||void 0===l?void 0:l.excludeDisabledFieldFormValues)&&void 0!==a&&a;!_.disabled||_.disabled&&!i?null===(d=null==e?void 0:e.classList)||void 0===d||d.add("modified"):(C="",null===(u=null==e?void 0:e.classList)||void 0===u||u.remove("modified")),!_.disabled||""===C&&null===C&&void 0===C&&0===C||(C="")}const b=null!==(c=null==g?void 0:g.field)&&void 0!==c?c:"";if(g&&(null==b?void 0:b.includes("."))){const e=null!==(m=null!==(p=null===(h=g.internalColumnEditor)||void 0===h?void 0:h.complexObjectPath)&&void 0!==p?p:b)&&void 0!==m?m:"";dt(null!==(f=this._formValues)&&void 0!==f?f:{},e,t)}else this._formValues={...this._formValues,[v]:C}}changeFormValue(e,t){var i,n,o,s,r;const l=this.getColumnByObjectOrId(e),a="string"==typeof e?e:null!==(i=null==l?void 0:l.id)&&void 0!==i?i:"",d=null!==(n=null==l?void 0:l.field)&&void 0!==n?n:e;if(null==d?void 0:d.includes(".")){const e=null!==(r=null!==(s=null===(o=null==l?void 0:l.internalColumnEditor)||void 0===o?void 0:o.complexObjectPath)&&void 0!==s?s:d)&&void 0!==r?r:"";dt(this._formValues,e,t)}else this._formValues={...this._formValues,[a]:t};this._formValues=Fn({},this._itemDataContext,this._formValues)}changeFormEditorOption(e,t,i){var n;const o=null===(n=this._editors)||void 0===n?void 0:n[e];if(!(null==o?void 0:o.changeEditorOption))throw new Error(`Editor with column id "${e}" not found OR the Editor does not support "changeEditorOption" (current only available with AutoComplete, Date, MultipleSelect & SingleSelect Editors).`);o.changeEditorOption(t,i)}disableFormInput(e,t=!0){var i;const n=null===(i=this._editors)||void 0===i?void 0:i[e];(null==n?void 0:n.disable)&&Array.isArray(this._editorContainers)&&n.disable(t)}openDetails(e){var t,i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v;const _=null!==(t=e.onError)&&void 0!==t?t:Nn,C={backdrop:"static",showCloseButtonOutside:!0,shouldClearRowSelectionAfterMassAction:!0,viewColumnLayout:"auto",modalType:"edit"};try{if(!this.grid||this.grid.getEditorLock().isActive()&&!this.grid.getEditorLock().commitCurrentEdit())return null;this._formValues=null,this._options={...C,...this.gridOptions.compositeEditorOptions,...e,labels:{...null===(i=this.gridOptions.compositeEditorOptions)||void 0===i?void 0:i.labels,...null==e?void 0:e.labels}},this._options.backdrop=void 0!==e.backdrop?e.backdrop:"static";const t=this._options.viewColumnLayout||1,h=this.grid.getActiveCell(),p=null!==(n=null==h?void 0:h.cell)&&void 0!==n?n:0,m=null!==(o=null==h?void 0:h.row)&&void 0!==o?o:0,f=this.grid.getUID()||"";let g=e.headerTitle||"";"function"==typeof this._options.onBeforeOpen&&this._options.onBeforeOpen(),this.hasRowSelectionEnabled()&&"auto-mass"===this._options.modalType&&this.grid.getSelectedRows&&((this.grid.getSelectedRows()||[]).length>0?(this._options.modalType="mass-selection",(null==e?void 0:e.headerTitleMassSelection)&&(g=null==e?void 0:e.headerTitleMassSelection)):(this._options.modalType="mass-update",(null==e?void 0:e.headerTitleMassUpdate)&&(g=null==e?void 0:e.headerTitleMassUpdate)));const v=this._options.modalType||"edit";if(!this.gridOptions.editable)return _({type:"error",code:"EDITABLE_GRID_REQUIRED",message:"Your grid must be editable in order to use the Composite Editor Modal."}),null;if(!this.gridOptions.enableCellNavigation)return _({type:"error",code:"ENABLE_CELL_NAVIGATION_REQUIRED",message:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.'}),null;if(!(this.gridOptions.enableAddRow||"clone"!==v&&"create"!==v))return _({type:"error",code:"ENABLE_ADD_ROW_REQUIRED",message:'Composite Editor requires the flag "enableAddRow" to be set to True in your Grid Options when cloning/creating a new item.'}),null;if(!(h||"clone"!==v&&"edit"!==v))return _({type:"warning",code:"NO_RECORD_FOUND",message:"No records selected for edit or clone operation."}),null;{const e="mass-update"===v||"mass-selection"===v,i=e?{}:this.grid.getDataItem(m);this._originalDataContext=Ne(i),this._columnDefinitions=this.grid.getColumns();const n=this.hasRowSelectionEnabled()?this.grid.getSelectedRows():[],o=null!==(r=null===(s=this.dataView)||void 0===s?void 0:s.getItemCount())&&void 0!==r?r:0;this._lastActiveRowNumber=m;const h=null===(l=this.gridStateService)||void 0===l?void 0:l.getCurrentRowSelections(),C=(null==h?void 0:h.dataContextIds)||[],b="create"===v?this.dataViewLength:m;if(!this.focusOnFirstColumnCellWithEditor(this._columnDefinitions,i,p,b,e))return null;if("edit"===v&&!i)return _({type:"warning",code:"ROW_NOT_EDITABLE",message:"Current row is not editable."}),null;if("mass-selection"===v&&n.length<1)return _({type:"warning",code:"ROW_SELECTION_REQUIRED",message:"You must select some rows before trying to apply new value(s)."}),null;let y=[];y=e?this._columnDefinitions.filter((e=>{var t;return e.editor&&!0===(null===(t=e.internalColumnEditor)||void 0===t?void 0:t.massUpdate)})):this._columnDefinitions.filter((e=>e.editor)),y.some((e=>{var t;return void 0!==(null===(t=e.internalColumnEditor)||void 0===t?void 0:t.compositeEditorFormOrder)}))&&y.sort(((e,t)=>{var i,n,o,s;const r=null!==(n=null===(i=null==e?void 0:e.internalColumnEditor)||void 0===i?void 0:i.compositeEditorFormOrder)&&void 0!==n?n:1/0,l=null!==(s=null===(o=null==t?void 0:t.internalColumnEditor)||void 0===o?void 0:o.compositeEditorFormOrder)&&void 0!==s?s:1/0;return yt(r,l,Se.asc)}));const w=g.replace(/\{\{(.*?)\}\}/g,((e,t)=>Ke(i,t))),S="auto"===t?this.autoCalculateLayoutColumnCount(y.length):t;this._modalElm=document.createElement("div"),this._modalElm.className=`slick-editor-modal ${f}`;const E=document.createElement("div");if(E.className="slick-editor-modal-content",t>1||"auto"===t&&S>1){const e=2===S?"split-view":"triple-split-view";E.classList.add(e)}const T=document.createElement("div");T.className="slick-editor-modal-title",T.innerHTML=at(this.gridOptions,w);const x=document.createElement("button");x.type="button",x.textContent="×",x.className="close",x.dataset.action="close",x.setAttribute("aria-label","Close"),this._options.showCloseButtonOutside&&(null===(a=null==T?void 0:T.classList)||void 0===a||a.add("outside"),null===(d=null==x?void 0:x.classList)||void 0===d||d.add("outside"));const O=document.createElement("div");O.className="slick-editor-modal-header",O.setAttribute("aria-label","Close"),O.appendChild(T),O.appendChild(x);const k=document.createElement("div");k.className="slick-editor-modal-body",this._modalBodyTopValidationElm=document.createElement("div"),this._modalBodyTopValidationElm.className="validation-summary",this._modalBodyTopValidationElm.style.display="none",k.appendChild(this._modalBodyTopValidationElm);const D=document.createElement("div");D.className="slick-editor-modal-footer";const A=document.createElement("button");A.type="button",A.className="btn btn-cancel btn-default btn-sm",A.dataset.action="cancel",A.setAttribute("aria-label",this.getLabelText("cancelButton","TEXT_CANCEL","Cancel")),A.textContent=this.getLabelText("cancelButton","TEXT_CANCEL","Cancel");let R="",I="";switch(v){case"clone":I=this.getLabelText("cloneButton","TEXT_CLONE","Clone");break;case"mass-update":const e=this.getLabelText("massUpdateStatus","TEXT_ALL_X_RECORDS_SELECTED","All {{x}} records selected");R=this.parseText(e,{x:o}),I=this.getLabelText("massUpdateButton","TEXT_APPLY_MASS_UPDATE","Mass Update");break;case"mass-selection":const t=this.getLabelText("massSelectionStatus","TEXT_X_OF_Y_MASS_SELECTED","{{x}} of {{y}} selected");R=this.parseText(t,{x:C.length,y:o}),I=this.getLabelText("massSelectionButton","TEXT_APPLY_TO_SELECTION","Update Selection");break;default:I=this.getLabelText("saveButton","TEXT_SAVE","Save")}const P=document.createElement("div");P.className="footer-status-text",P.textContent=R,this._modalSaveButtonElm=document.createElement("button"),this._modalSaveButtonElm.type="button",this._modalSaveButtonElm.className="btn btn-save btn-primary btn-sm",this._modalSaveButtonElm.dataset.action="create"===v||"edit"===v?"save":v,this._modalSaveButtonElm.dataset.ariaLabel=I,this._modalSaveButtonElm.textContent=I,this._modalSaveButtonElm.setAttribute("aria-label",I);const M=document.createElement("div");M.className="footer-buttons","mass-update"!==v&&"mass-selection"!==v||D.appendChild(P),M.appendChild(A),M.appendChild(this._modalSaveButtonElm),D.appendChild(M),E.appendChild(O),E.appendChild(k),E.appendChild(D),this._modalElm.appendChild(E);for(const e of y)if(e.editor){const t=document.createElement("div");t.className=`item-details-container editor-${e.id}`,1===S?t.classList.add("slick-col-medium-12"):t.classList.add("slick-col-medium-6","slick-col-xlarge-"+12/S);const i=document.createElement("div");i.className=`item-details-label editor-${e.id}`,i.textContent=this.getColumnLabel(e)||"n/a";const n=document.createElement("div");n.className="item-details-editor-container slick-cell",n.dataset.editorid=`${e.id}`;const o=document.createElement("div");if(o.className=`item-details-validation editor-${e.id}`,null===(u=this._options)||void 0===u?void 0:u.showResetButtonOnEachEditor){const t=this.createEditorResetButtonElement(`${e.id}`);this._bindEventService.bind(t,"click",this.handleResetInputValue.bind(this)),i.appendChild(t)}t.appendChild(i),t.appendChild(n),t.appendChild(o),k.appendChild(t)}if(null===(c=this._options)||void 0===c?void 0:c.showFormResetButton){const e=this.createFormResetButtonElement();this._bindEventService.bind(e,"click",this.handleResetFormClicked.bind(this)),k.appendChild(e)}document.body.appendChild(this._modalElm),document.body.classList.add("slick-modal-open"),this._bindEventService.bind(document.body,"click",this.handleBodyClicked.bind(this)),this._editors={},this._editorContainers=y.map((e=>k.querySelector(`[data-editorid=${e.id}]`)))||[],this._compositeOptions={destroy:this.disposeComponent.bind(this),modalType:v,validationMsgPrefix:"* ",formValues:{},editors:this._editors};const F=new Mn(y,this._editorContainers,this._compositeOptions);this.grid.editActiveCell(F),this._bindEventService.bind(x,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(A,"click",this.cancelEditing.bind(this)),this._bindEventService.bind(this._modalSaveButtonElm,"click",this.handleSaveClicked.bind(this)),this._bindEventService.bind(this._modalElm,"keydown",this.handleKeyDown.bind(this)),this._bindEventService.bind(this._modalElm,"focusout",this.validateCurrentEditor.bind(this)),this._bindEventService.bind(this._modalElm,"blur",this.validateCurrentEditor.bind(this));const N=this.grid.onCompositeEditorChange;this._eventHandler.subscribe(N,this.handleOnCompositeEditorChange.bind(this));const L=this.grid.onAddNewRow;this._eventHandler.subscribe(L,((e,t)=>{this.insertNewItemInDataView(t.item),this._originalDataContext=t.item,this.dispose()}))}return this}catch(e){this.dispose();const t="string"==typeof e?e:null!==(m=null!==(h=null==e?void 0:e.message)&&void 0!==h?h:null===(p=null==e?void 0:e.body)||void 0===p?void 0:p.message)&&void 0!==m?m:"";return _({type:"error",code:"string"==typeof e?e:null!==(v=null!==(f=null==e?void 0:e.status)&&void 0!==f?f:null===(g=null==e?void 0:e.body)||void 0===g?void 0:g.status)&&void 0!==v?v:t,message:t}),null}}async cancelEditing(){var e,t;let i=!0;this.formValues&&Object.keys(this.formValues).length>0&&"function"==typeof this._options.onClose&&(i=await this._options.onClose()),i&&(this.grid.getEditController().cancelCurrentEdit(),"edit"!==(null===(e=this._options)||void 0===e?void 0:e.modalType)&&"clone"!==(null===(t=this._options)||void 0===t?void 0:t.modalType)||this.resetCurrentRowDataContext(),this.grid.setActiveRow(this._lastActiveRowNumber),this.dispose())}showValidationSummaryText(e,t=""){var i,n;e&&""!==t?(this._modalBodyTopValidationElm.textContent=t,this._modalBodyTopValidationElm.style.display="block",null===(n=(i=this._modalBodyTopValidationElm).scrollIntoView)||void 0===n||n.call(i),this._modalSaveButtonElm.disabled=!1,this._modalSaveButtonElm.classList.remove("saving")):(this._modalBodyTopValidationElm.style.display="none",this._modalBodyTopValidationElm.textContent=t)}applySaveMassUpdateChanges(e){const t=this.dataView.getItems();for(const i in e)i in e&&t.forEach((t=>{i in e&&(t[i]=e[i])}));this.dataView.setItems(t,this.gridOptions.datasetIdPropertyName),this.grid.invalidate()}applySaveMassSelectionChanges(e,t){var i,n;const o=(null!==(i=null==t?void 0:t.dataContextIds)&&void 0!==i?i:[]).map((e=>this.dataView.getItemById(e)));for(const t in e)t in e&&o.forEach((i=>{t in e&&(i[t]=e[t])}));null===(n=this.gridService)||void 0===n||n.updateItems(o)}autoCalculateLayoutColumnCount(e){return e>=15?3:e>=8?2:1}createEditorResetButtonElement(e){var t,i,n,o,s;const r=document.createElement("button");if(r.type="button",r.name=e,r.title=null!==(n=null===(i=null===(t=this._options)||void 0===t?void 0:t.labels)||void 0===i?void 0:i.resetFormButton)&&void 0!==n?n:"Reset Form Input",r.className="btn btn-xs btn-editor-reset",r.setAttribute("aria-label","Reset"),null===(o=this._options)||void 0===o?void 0:o.resetEditorButtonCssClass){const e=null===(s=this._options)||void 0===s?void 0:s.resetEditorButtonCssClass.split(" ");for(const t of e)r.classList.add(t)}return r}createFormResetButtonElement(){var e,t;const i=document.createElement("div");i.className="reset-container";const n=document.createElement("button");n.type="button",n.className="btn btn-sm reset-form";const o=document.createElement("span");return o.className=null!==(t=null===(e=this._options)||void 0===e?void 0:e.resetFormButtonIconCssClass)&&void 0!==t?t:"",n.appendChild(o),n.appendChild(document.createTextNode(" Reset Form")),i.appendChild(n),i}executeOnError(e){var t,i;(null!==(i=null===(t=this._options)||void 0===t?void 0:t.onError)&&void 0!==i?i:Nn)(e)}async executeOnSave(e,t,i,n){var o,s,r,l,a;try{this.showValidationSummaryText(!1,""),this.validateCompositeEditors().valid&&(this._modalSaveButtonElm.classList.add("saving"),this._modalSaveButtonElm.disabled=!0,"function"==typeof(null===(o=this._options)||void 0===o?void 0:o.onSave)?await(null===(s=this._options)||void 0===s?void 0:s.onSave(this.formValues,this.getCurrentRowSelections(),n))&&(e(this.formValues,this.getCurrentRowSelections()),t()):(e(this.formValues,this.getCurrentRowSelections()),t()),"function"==typeof i&&i(),this.dispose())}catch(e){const t="string"==typeof e?e:null!==(a=null!==(r=null==e?void 0:e.message)&&void 0!==r?r:null===(l=null==e?void 0:e.body)||void 0===l?void 0:l.message)&&void 0!==a?a:"";this.showValidationSummaryText(!0,t)}}focusOnFirstColumnCellWithEditor(e,t,i,n,o){const s=o&&!this.gridOptions.enableAddRow&&n>=this.dataViewLength?this.dataViewLength-1:n;let r=i;const l=e[i].editor;let a=this.grid.getCellNode(s,i);if(!l||!a||!this.getActiveCellEditor(s,i)){if(r=this.findNextAvailableEditorColumnIndex(e,t,n,o),-1===r)return this.executeOnError({type:"error",code:"NO_EDITOR_FOUND",message:"We could not find any Editor in your Column Definition"}),!1;this.grid.setActiveCell(s,r,!1),o&&this.grid.setActiveRow(this.dataViewLength,r,!0)}return a=this.grid.getCellNode(s,r),!!a}findNextAvailableEditorColumnIndex(e,t,i,n){var o;let s=-1;for(let r=0;r<e.length;r++){const l=e[r];if(l.editor&&(!n||n&&(null===(o=l.internalColumnEditor)||void 0===o?void 0:o.massUpdate))){const e=this.grid.onBeforeEditCell.notify({row:i,cell:r,item:t,column:l,grid:this.grid,target:"composite",compositeEditorOptions:this._compositeOptions});if(this.grid.setActiveCell(i,r,!1),!1!==e){s=r;break}}}return s}getColumnByObjectOrId(e){let t;return"object"==typeof e?t=e:"string"==typeof e&&(t=this._columnDefinitions.find((t=>t.id===e))),t}getActiveCellEditor(e,t){return this.grid.setActiveCell(e,t,!1),this.grid.getCellEditor()}getColumnLabel(e){var t;const i=this.gridOptions.columnGroupSeparator||" - ";let n=e.nameCompositeEditor||e.name||"",o=e.columnGroup||"";if(this.gridOptions.enableTranslate&&this.translaterService){const i=e.nameCompositeEditorKey||e.nameKey;i&&(n=this.translaterService.translate(i)),e.columnGroupKey&&(null===(t=this.translaterService)||void 0===t?void 0:t.translate)&&(o=this.translaterService.translate(e.columnGroupKey))}return(o?`${o}${i}${n}`:n)||""}getLabelText(e,t,i){var n,o,s,r,l,a,d;const u={...null===(n=this.gridOptions.compositeEditorOptions)||void 0===n?void 0:n.labels,...null===(o=this._options)||void 0===o?void 0:o.labels};if((null===(s=this.gridOptions)||void 0===s?void 0:s.enableTranslate)&&(null===(r=this.translaterService)||void 0===r?void 0:r.translate)&&u.hasOwnProperty(`${e}Key`)){const t=u[`${e}Key`];return this.translaterService.translate(t||"")}return null!==(d=null!==(l=null==u?void 0:u[e])&&void 0!==l?l:null===(a=this._locales)||void 0===a?void 0:a[t])&&void 0!==d?d:i}getCurrentRowSelections(){var e;const t=null===(e=this.gridStateService)||void 0===e?void 0:e.getCurrentRowSelections();return{gridRowIndexes:(null==t?void 0:t.gridRowIndexes)||[],dataContextIds:(null==t?void 0:t.dataContextIds)||[]}}handleBodyClicked(e){var t,i,n;(null===(i=null===(t=e.target)||void 0===t?void 0:t.classList)||void 0===i?void 0:i.contains("slick-editor-modal"))&&"static"!==(null===(n=this._options)||void 0===n?void 0:n.backdrop)&&this.dispose()}handleKeyDown(e){"Escape"===e.code?(this.cancelEditing(),e.stopPropagation(),e.preventDefault()):"Tab"===e.code&&this.validateCurrentEditor()}handleResetInputValue(e){var t,i;const n=e.target.name,o=null===(t=this._editors)||void 0===t?void 0:t[n];(null==o?void 0:o.reset)&&o.reset(),null===(i=this._formValues)||void 0===i||delete i[n]}async handleMassSaving(e,t){if(this.formValues&&0!==Object.keys(this.formValues).length){const i="mass-update"===e?"applySaveMassUpdateChanges":"applySaveMassSelectionChanges";this.executeOnSave(this[i].bind(this),t.bind(this))}else this.executeOnError({type:"warning",code:"NO_CHANGES_DETECTED",message:"Sorry we could not detect any changes."})}handleOnCompositeEditorChange(e,t){var i,n,o,s,r,l,a,d;const u=null!==(n=null===(i=t.column)||void 0===i?void 0:i.id)&&void 0!==n?n:"";this._formValues={...this._formValues,...t.formValues};const c=null===(o=this._editors)||void 0===o?void 0:o[u],h=null!==(a=null!==(r=null===(s=null==c?void 0:c.isValueTouched)||void 0===s?void 0:s.call(c))&&void 0!==r?r:null===(l=null==c?void 0:c.isValueChanged)||void 0===l?void 0:l.call(c))&&void 0!==a&&a;this._itemDataContext=null!==(d=null==c?void 0:c.dataContext)&&void 0!==d?d:{};const p=document.querySelector(`.slick-editor-modal [data-editorid=${u}]`);(null==p?void 0:p.classList)&&(h?p.classList.add("modified"):p.classList.remove("modified")),this.validateCompositeEditors()}hasRowSelectionEnabled(){const e=this.grid.getSelectionModel();return(this.gridOptions.enableRowSelection||this.gridOptions.enableCheckboxSelector)&&e}handleResetFormClicked(){for(const e of Object.keys(this._editors)){const t=this._editors[e];(null==t?void 0:t.reset)&&t.reset()}this._formValues=$e(this._formValues)}handleSaveClicked(){var e,t,i;const n=null===(e=this._options)||void 0===e?void 0:e.modalType;switch(n){case"mass-update":this.handleMassSaving(n,(()=>{this.grid.getEditController().cancelCurrentEdit(),this.grid.setActiveCell(0,0,!1),this._options.shouldClearRowSelectionAfterMassAction&&this.grid.setSelectedRows([])}));break;case"mass-selection":this.handleMassSaving(n,(()=>{this.grid.getEditController().cancelCurrentEdit(),this.grid.setActiveRow(this._lastActiveRowNumber),this._options.shouldClearRowSelectionAfterMassAction&&this.grid.setSelectedRows([])}));break;case"clone":const e={...this._originalDataContext,...this.formValues},o=()=>{this.grid.getEditController().cancelCurrentEdit(),this.grid.setActiveCell(0,0,!1)};this.executeOnSave(this.insertNewItemInDataView.bind(this,e),o,this.resetCurrentRowDataContext.bind(this),e);break;case"create":case"edit":default:if(this.grid.getEditController().commitCurrentEdit(),"function"==typeof(null===(t=this._options)||void 0===t?void 0:t.onSave)){const e=this.grid.getDataItem(this._lastActiveRowNumber);null===(i=this._options)||void 0===i||i.onSave(this.formValues,this.getCurrentRowSelections(),e)}}}insertNewItemInDataView(e){var t,i,n,o;const s=null!==(i=null===(t=this.dataView)||void 0===t?void 0:t.getItemCount())&&void 0!==i?i:0,r=null!==(n=this._options.insertNewId)&&void 0!==n?n:s+1;e[this.gridOptions.datasetIdPropertyName||"id"]=r,this.dataView.getItemById(r)?this.executeOnError({type:"error",code:"ITEM_ALREADY_EXIST",message:`The item object which you are trying to add already exist with the same Id:: ${r}`}):null===(o=this.gridService)||void 0===o||o.addItem(e,this._options.insertOptions)}parseText(e,t){return e.replace(/\{\{(.*?)\}\}/g,((e,i)=>void 0!==t[i]?t[i]:e))}resetCurrentRowDataContext(){const e=this.gridOptions.datasetIdPropertyName||"id";this.grid.getData().updateItem(this._originalDataContext[e],this._originalDataContext)}validateCompositeEditors(e){let t={valid:!0,msg:""};const i=this.grid.getCellEditor();return i&&(t=i.validate(e)),t}validateCurrentEditor(){const e=this.grid.getCellEditor();(null==e?void 0:e.validate)&&e.validate()}}class $n{constructor(){this._warningLeftElement=null,this._warningRightElement=null,this.isPreviouslyShown=!1}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}init(e,t){this.grid=e,this.translaterService=t.get("TranslaterService")}dispose(){var e,t;null===(e=this._warningLeftElement)||void 0===e||e.remove(),null===(t=this._warningRightElement)||void 0===t||t.remove(),this._warningLeftElement=null,this._warningRightElement=null}showEmptyDataMessage(e=!0,t){var i,n,o,s,r,l,a,d,u,c,h,p,m,f;if(!this.grid||!this.gridOptions||this.isPreviouslyShown===e)return!1;this.isPreviouslyShown=e;const g=this.grid.getUID(),v={message:"No data to display.",...this.gridOptions.emptyDataWarning,...t},_=null!==(i=null==v?void 0:v.className)&&void 0!==i?i:"slick-empty-data-warning";this._warningLeftElement=document.querySelector(`.${g} .${_}`);const C=document.querySelector(`.${g} .grid-canvas.grid-canvas-left`),b=document.querySelector(`.${g} .grid-canvas.grid-canvas-right`),y=null!==(n=v.leftViewportMarginLeft)&&void 0!==n?n:0,w=null!==(o=v.rightViewportMarginLeft)&&void 0!==o?o:0,S=null!==(s=v.frozenLeftViewportMarginLeft)&&void 0!==s?s:0,E=null!==(r=v.frozenRightViewportMarginLeft)&&void 0!==r?r:0,T=void 0!==(null===(l=this.gridOptions)||void 0===l?void 0:l.frozenColumn)&&this.gridOptions.frozenColumn>=0,x="string"==typeof y?y:`${y}px`,O="string"==typeof w?w:`${w}px`;if(this.gridOptions.autoHeight){const t=document.querySelector(".slick-pane.slick-pane-top.slick-pane-left");if(t&&t.style&&C&&C.style){const i=parseInt(t.style.height,10)||0,n=null!==(d=null===(a=this.gridOptions)||void 0===a?void 0:a.rowHeight)&&void 0!==d?d:0,o=this.gridOptions.enableFiltering&&null!==(c=null===(u=this.gridOptions)||void 0===u?void 0:u.headerRowHeight)&&void 0!==c?c:0,s=this.gridOptions.createPreHeaderPanel&&null!==(p=null===(h=this.gridOptions)||void 0===h?void 0:h.preHeaderPanelHeight)&&void 0!==p?p:0;if(e){let e=null!==i&&i<100?i:100;e+=o+s,t.style.minHeight=`${e}px`,C.style.minHeight=`${n}px`}}}let k=v.message;if(this.gridOptions.enableTranslate&&this.translaterService&&(null==v?void 0:v.messageKey)&&(k=this.translaterService.translate(v.messageKey)),!this._warningLeftElement&&C&&b){const e=null!==(f=null===(m=this.gridOptions)||void 0===m?void 0:m.sanitizeHtmlOptions)&&void 0!==f?f:{};this._warningLeftElement=document.createElement("div"),this._warningLeftElement.classList.add(_),this._warningLeftElement.classList.add("left"),this._warningLeftElement.innerHTML=at(this.gridOptions,k,e),this._warningRightElement=this._warningLeftElement.cloneNode(!0),this._warningRightElement.classList.add("right"),b.appendChild(this._warningRightElement),C.appendChild(this._warningLeftElement)}if(this._warningLeftElement){let t=e?"block":"none";T&&e&&(t=v.hideFrozenLeftWarning?"none":"block"),this._warningLeftElement.style.display=t;const i="string"==typeof S?S:`${S}px`;this._warningLeftElement.style.marginLeft=T?i:x}if(this._warningRightElement){let t=e?"block":"none";T&&e&&(t=v.hideFrozenRightWarning?"none":"block"),this._warningRightElement.style.display=t;const i="string"==typeof E?E:`${E}px`;this._warningRightElement.style.marginLeft=T?i:O}return e}}class Hn{constructor(e,t,i,n){var o,s,r,l,a;if(this.paginationService=e,this.pubSubService=t,this.sharedService=i,this.translaterService=n,this._enableTranslate=!1,this._subscriptions=[],this.firstButtonClasses="",this.lastButtonClasses="",this.prevButtonClasses="",this.nextButtonClasses="",this.textItemsPerPage="items per page",this.textItems="items",this.textOf="of",this.textPage="Page",this._bindingHelper=new In,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this.currentPagination=this.paginationService.getFullPagination(),this._enableTranslate=null!==(s=null===(o=this.gridOptions)||void 0===o?void 0:o.enableTranslate)&&void 0!==s&&s,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.translatePaginationTexts(),this._enableTranslate&&(null===(r=this.pubSubService)||void 0===r?void 0:r.subscribe)){const e=null!==(a=null===(l=this.translaterService)||void 0===l?void 0:l.eventName)&&void 0!==a?a:"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(e,(()=>this.translatePaginationTexts())))}this._subscriptions.push(this.pubSubService.subscribe("onPaginationRefreshed",(e=>{for(const t of Object.keys(e))this.currentPagination[t]=e[t];this.updatePageButtonsUsability();const t=document.querySelector(`.${this.gridUid} span.page-info-from-to`);(null==t?void 0:t.style)&&(t.style.display=0===this.currentPagination.totalItems?"none":"")})))}get availablePageSizes(){return this.paginationService.availablePageSizes||[]}get dataFrom(){return this.paginationService.dataFrom}get dataTo(){return this.paginationService.dataTo}get itemsPerPage(){return this.paginationService.itemsPerPage}set itemsPerPage(e){this.paginationService.changeItemPerPage(e)}get pageCount(){return this.paginationService.pageCount}get pageNumber(){return this.paginationService.pageNumber}set pageNumber(e){}get grid(){return this.sharedService.slickGrid}get gridOptions(){return this.sharedService.gridOptions}get gridUid(){var e,t;return null!==(t=null===(e=this.grid)||void 0===e?void 0:e.getUID())&&void 0!==t?t:""}get locales(){var e,t;return null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.locales)&&void 0!==t?t:me.locales}get totalItems(){return this.paginationService.totalItems}get isLeftPaginationDisabled(){return 1===this.pageNumber||0===this.totalItems}get isRightPaginationDisabled(){return this.pageNumber===this.pageCount||0===this.totalItems}dispose(){this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingHelper.dispose(),this._paginationElement.remove()}renderPagination(e){const t=this.createPaginationContainer(),i=document.createElement("div");i.className="slick-pagination-nav";const n=this.createPageNavigation("Page navigation",[{liClass:"page-item seek-first",aClass:"page-link icon-seek-first",ariaLabel:"First Page"},{liClass:"page-item seek-prev",aClass:"page-link icon-seek-prev",ariaLabel:"Previous Page"}]),o=this.createPageNumberSection(),s=this.createPageNavigation("Page navigation",[{liClass:"page-item seek-next",aClass:"page-link icon-seek-next",ariaLabel:"Next Page"},{liClass:"page-item seek-end",aClass:"page-link icon-seek-end",ariaLabel:"Last Page"}]);t.appendChild(i),i.appendChild(n),i.appendChild(o),i.appendChild(s);const r=this.createPaginationSettingsSection();t.appendChild(i),t.appendChild(r),this._paginationElement.appendChild(t),(null==e?void 0:e.appendChild)&&this._paginationElement&&e.appendChild(this._paginationElement),this.renderPageSizes(),this.addBindings(),this.addEventListeners(),this.updatePageButtonsUsability()}renderPageSizes(){const e=document.querySelector(`.${this.gridUid} .items-per-page`);if(e&&Array.isArray(this.availablePageSizes))for(const t of this.availablePageSizes){const i=document.createElement("option");i.value=`${t}`,i.text=`${t}`,e.appendChild(i)}}addBindings(){this._bindingHelper.addElementBinding(this,"firstButtonClasses","li.page-item.seek-first","className"),this._bindingHelper.addElementBinding(this,"prevButtonClasses","li.page-item.seek-prev","className"),this._bindingHelper.addElementBinding(this,"lastButtonClasses","li.page-item.seek-end","className"),this._bindingHelper.addElementBinding(this,"nextButtonClasses","li.page-item.seek-next","className"),this._bindingHelper.addElementBinding(this.currentPagination,"dataFrom","span.item-from","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"dataTo","span.item-to","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"totalItems","span.total-items","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"pageCount","span.page-count","textContent"),this._bindingHelper.addElementBinding(this.currentPagination,"pageNumber","input.page-number","value","change",this.changeToCurrentPage.bind(this)),this._bindingHelper.addElementBinding(this.currentPagination,"pageSize","select.items-per-page","value"),this._bindingHelper.addElementBinding(this,"textItems","span.text-items","textContent"),this._bindingHelper.addElementBinding(this,"textItemsPerPage","span.text-item-per-page","textContent"),this._bindingHelper.addElementBinding(this,"textOf","span.text-of","textContent"),this._bindingHelper.addElementBinding(this,"textPage","span.text-page","textContent")}addEventListeners(){this._bindingHelper.bindEventHandler(".icon-seek-first","click",this.changeToFirstPage.bind(this)),this._bindingHelper.bindEventHandler(".icon-seek-end","click",this.changeToLastPage.bind(this)),this._bindingHelper.bindEventHandler(".icon-seek-next","click",this.changeToNextPage.bind(this)),this._bindingHelper.bindEventHandler(".icon-seek-prev","click",this.changeToPreviousPage.bind(this)),this._bindingHelper.bindEventHandler("select.items-per-page","change",(e=>{var t,i;return this.itemsPerPage=+(null!==(i=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==i?i:0)}))}changeToFirstPage(e){this.isLeftPaginationDisabled||this.paginationService.goToFirstPage(e)}changeToLastPage(e){this.isRightPaginationDisabled||this.paginationService.goToLastPage(e)}changeToNextPage(e){this.isRightPaginationDisabled||this.paginationService.goToNextPage(e)}changeToPreviousPage(e){this.isLeftPaginationDisabled||this.paginationService.goToPreviousPage(e)}changeToCurrentPage(e){this.paginationService.goToPageNumber(+e)}translatePaginationTexts(){var e;if(this._enableTranslate&&(null===(e=this.translaterService)||void 0===e?void 0:e.translate)){const e=Qe(this.gridOptions);this.textItemsPerPage=this.translaterService.translate(`${e}ITEMS_PER_PAGE`),this.textItems=this.translaterService.translate(`${e}ITEMS`),this.textOf=this.translaterService.translate(`${e}OF`),this.textPage=this.translaterService.translate(`${e}PAGE`)}else this.locales&&(this.textItemsPerPage=this.locales.TEXT_ITEMS_PER_PAGE||"TEXT_ITEMS_PER_PAGE",this.textItems=this.locales.TEXT_ITEMS||"TEXT_ITEMS",this.textOf=this.locales.TEXT_OF||"TEXT_OF",this.textPage=this.locales.TEXT_PAGE||"TEXT_PAGE")}createPaginationContainer(){const e=document.createElement("div");e.className=`slick-pagination-container ${this.gridUid} pager`,e.id="pager",e.style.width="100%";const t=document.createElement("div");return t.className="slick-pagination",e.appendChild(t),this._paginationElement=e,t}createPageNavigation(e,t){const i=document.createElement("nav");i.ariaLabel=e;const n=document.createElement("ul");n.className="pagination";for(const e of t){const t=document.createElement("li");t.className=e.liClass;const i=document.createElement("a");i.className=e.aClass,i.setAttribute("aria-label",e.ariaLabel),t.appendChild(i),n.appendChild(t)}return i.appendChild(n),i}createPageNumberSection(){const e=document.createElement("div");e.className="slick-page-number";const t=document.createElement("span");t.className="text-page",t.textContent="Page";const i=document.createElement("input");i.type="text",i.className="form-control page-number",i.dataset.test="page-number-input",i.setAttribute("aria-label","Page Number"),i.value="1",i.size=1;const n=document.createElement("span");n.className="text-of",n.textContent="of";const o=document.createElement("span");return o.className="page-count",o.dataset.test="page-count",e.appendChild(t),e.appendChild(document.createTextNode(" ")),e.appendChild(i),e.appendChild(document.createTextNode(" ")),e.appendChild(n),e.appendChild(document.createTextNode(" ")),e.appendChild(o),e}createPaginationSettingsSection(){const e=document.createElement("span");e.className="slick-pagination-settings";const t=document.createElement("select");t.id="items-per-page-label",t.className="items-per-page",t.setAttribute("aria-label","Items per Page Select");const i=document.createElement("span");i.className="text-item-per-page",i.textContent="items per page";const n=document.createElement("span");n.className="slick-pagination-count";const o=document.createElement("span");o.className="page-info-from-to";const s=document.createElement("span");s.className="item-from",s.dataset.test="item-from",s.setAttribute("aria-label","Page Item From");const r=document.createElement("span");r.className="item-to",r.dataset.test="item-to",r.setAttribute("aria-label","Page Item To");const l=document.createElement("span");l.className="text-of",l.textContent="of";const a=document.createElement("span");a.className="page-info-total-items";const d=document.createElement("span");d.className="total-items",d.dataset.test="total-items";const u=document.createElement("span");return u.className="text-items",u.textContent="items",e.appendChild(t),e.appendChild(document.createTextNode(" ")),e.appendChild(i),e.appendChild(document.createTextNode(", ")),o.appendChild(s),o.appendChild(document.createTextNode("-")),o.appendChild(r),o.appendChild(document.createTextNode(" ")),o.appendChild(l),o.appendChild(document.createTextNode(" ")),n.appendChild(o),e.appendChild(n),a.appendChild(d),a.appendChild(document.createTextNode(" ")),a.appendChild(u),a.appendChild(document.createTextNode(" ")),n.appendChild(a),e}updatePageButtonsUsability(){this.firstButtonClasses=this.isLeftPaginationDisabled?"page-item seek-first disabled":"page-item seek-first",this.prevButtonClasses=this.isLeftPaginationDisabled?"page-item seek-prev disabled":"page-item seek-prev",this.lastButtonClasses=this.isRightPaginationDisabled?"page-item seek-end disabled":"page-item seek-end",this.nextButtonClasses=this.isRightPaginationDisabled?"page-item seek-next disabled":"page-item seek-next"}}__webpack_require__(291),__webpack_require__(817),__webpack_require__(290),__webpack_require__(669),__webpack_require__(618),__webpack_require__(204),__webpack_require__(850),__webpack_require__(942),__webpack_require__(810),__webpack_require__(803),__webpack_require__(50);const Vn=pe()||he;class zn{constructor(e,t,i,n){var o,s,r,l,a,d,u;if(this.grid=e,this.customFooterOptions=t,this.pubSubService=i,this.translaterService=n,this._enableTranslate=!1,this._isLeftFooterOriginallyEmpty=!0,this._isLeftFooterDisplayingSelectionRowCount=!1,this._isRightFooterOriginallyEmpty=!0,this._selectedRowCount=0,this._subscriptions=[],this._bindingHelper=new In,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this._eventHandler=new Slick.EventHandler,this._enableTranslate=null!==(s=null===(o=this.gridOptions)||void 0===o?void 0:o.enableTranslate)&&void 0!==s&&s,this._isLeftFooterOriginallyEmpty=!(null===(r=this.gridOptions.customFooterOptions)||void 0===r?void 0:r.leftFooterText),this._isRightFooterOriginallyEmpty=!(null===(l=this.gridOptions.customFooterOptions)||void 0===l?void 0:l.rightFooterText),this.registerOnSelectedRowsChangedWhenEnabled(t),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&&(null===(a=this.pubSubService)||void 0===a?void 0:a.subscribe)){const e=null!==(u=null===(d=this.translaterService)||void 0===d?void 0:d.eventName)&&void 0!==u?u:"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(e,(()=>this.translateCustomFooterTexts())))}}get eventHandler(){return this._eventHandler}get gridUid(){var e,t;return null!==(t=null===(e=this.grid)||void 0===e?void 0:e.getUID())&&void 0!==t?t:""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get locales(){var e,t;return null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.locales)&&void 0!==t?t:me.locales}set metrics(e){this.renderMetrics(e)}get leftFooterText(){var e,t;return null!==(t=null===(e=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .left-footer`))||void 0===e?void 0:e.textContent)&&void 0!==t?t:""}set leftFooterText(e){this.renderLeftFooterText(e)}get rightFooterText(){var e,t;return null!==(t=null===(e=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .right-footer`))||void 0===e?void 0:e.textContent)&&void 0!==t?t:""}set rightFooterText(e){this.renderRightFooterText(e)}dispose(){var e;this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingHelper.dispose(),null===(e=this._footerElement)||void 0===e||e.remove(),this._eventHandler.unsubscribeAll()}renderFooter(e){this.translateCustomFooterTexts(),this.createFooterContainer(e)}renderMetrics(e){var t;const i=Vn(e.endTime).format(this.customFooterOptions.dateFormat);this._bindingHelper.setElementAttributeValue("span.last-update-timestamp","textContent",i),this._bindingHelper.setElementAttributeValue("span.item-count","textContent",e.itemCount),this._bindingHelper.setElementAttributeValue("span.total-count","textContent",e.totalItemCount),(null===(t=this.customFooterOptions.metricTexts)||void 0===t?void 0:t.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(e){this._bindingHelper.setElementAttributeValue("div.left-footer","textContent",e)}renderRightFooterText(e){this._bindingHelper.setElementAttributeValue("div.right-footer","textContent",e)}translateCustomFooterTexts(){var e,t,i,n,o;if(this.gridOptions.enableTranslate&&(null===(e=this.translaterService)||void 0===e?void 0:e.translate)){this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{};for(const e of Object.keys(this.customFooterOptions.metricTexts))if(e.lastIndexOf("Key")>0){const t=e.substring(0,e.lastIndexOf("Key"));this.customFooterOptions.metricTexts[t]=this.translaterService.translate(this.customFooterOptions.metricTexts[e]||" ")}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||(null===(t=this.locales)||void 0===t?void 0:t.TEXT_LAST_UPDATE)||"TEXT_LAST_UPDATE",this.customFooterOptions.metricTexts.items=this.customFooterOptions.metricTexts.items||(null===(i=this.locales)||void 0===i?void 0:i.TEXT_ITEMS)||"TEXT_ITEMS",this.customFooterOptions.metricTexts.itemsSelected=this.customFooterOptions.metricTexts.itemsSelected||(null===(n=this.locales)||void 0===n?void 0:n.TEXT_ITEMS_SELECTED)||"TEXT_ITEMS_SELECTED",this.customFooterOptions.metricTexts.of=this.customFooterOptions.metricTexts.of||(null===(o=this.locales)||void 0===o?void 0:o.TEXT_OF)||"TEXT_OF")}createFooterContainer(e){const t=document.createElement("div");t.className=`slick-custom-footer ${this.gridUid}`,t.style.width="100%",t.style.height=`${this.customFooterOptions.footerHeight||20}px`;const i=document.createElement("div");i.className=`left-footer ${this.customFooterOptions.leftContainerClass}`,i.innerHTML=at(this.gridOptions,this.customFooterOptions.leftFooterText||"");const n=this.createFooterRightContainer();t.appendChild(i),t.appendChild(n),this._footerElement=t,(null==e?void 0:e.appendChild)&&this._footerElement&&e.appendChild(this._footerElement)}createFooterRightContainer(){var e,t,i,n,o,s,r,l;const a=document.createElement("div");if(a.className=`right-footer ${this.customFooterOptions.rightContainerClass||""}`,this._isRightFooterOriginallyEmpty){if(!this.customFooterOptions.hideMetrics){a.classList.add("metrics");const d=document.createElement("span");if(d.className="timestamp",!this.customFooterOptions.hideLastUpdateTimestamp){const e=this.createFooterLastUpdate();e&&d.appendChild(e)}const u=document.createElement("span");if(u.className="item-count",u.textContent=`${null!==(t=null===(e=this.metrics)||void 0===e?void 0:e.itemCount)&&void 0!==t?t:"0"}`,a.appendChild(d),a.appendChild(u),!this.customFooterOptions.hideTotalItemCount){a.appendChild(document.createTextNode("\r\n"));const e=document.createElement("span");e.className="text-of",e.textContent=` ${null!==(n=null===(i=this.customFooterOptions.metricTexts)||void 0===i?void 0:i.of)&&void 0!==n?n:"of"} `,a.appendChild(e),a.appendChild(document.createTextNode("\r\n"));const t=document.createElement("span");t.className="total-count",t.textContent=`${null!==(s=null===(o=this.metrics)||void 0===o?void 0:o.totalItemCount)&&void 0!==s?s:"0"}`,a.appendChild(t)}a.appendChild(document.createTextNode("\r\n"));const c=document.createElement("span");c.className="text-items",c.textContent=` ${null!==(l=null===(r=this.customFooterOptions.metricTexts)||void 0===r?void 0:r.items)&&void 0!==l?l:"items"} `,a.appendChild(c)}}else a.innerHTML=at(this.gridOptions,this.customFooterOptions.rightFooterText||"");return a}createFooterLastUpdate(){var e,t,i,n;const o=null!==(i=null===(t=null===(e=this.customFooterOptions)||void 0===e?void 0:e.metricTexts)||void 0===t?void 0:t.lastUpdate)&&void 0!==i?i:"Last Update",s=Vn(null===(n=this.metrics)||void 0===n?void 0:n.endTime).format(this.customFooterOptions.dateFormat),r=document.createElement("span");r.className="text-last-update",r.textContent=o;const l=document.createElement("span");l.className="last-update-timestamp",l.textContent=s;const a=document.createElement("span");a.className="separator",a.textContent=` ${this.customFooterOptions.metricSeparator||""} `;const d=document.createElement("span");return d.appendChild(r),d.appendChild(document.createTextNode("\r\n")),d.appendChild(l),d.appendChild(a),d}registerOnSelectedRowsChangedWhenEnabled(e){var t,i,n,o;if((this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowSelection)&&e&&!e.hideRowSelectionCount&&this._isLeftFooterOriginallyEmpty){this._isLeftFooterDisplayingSelectionRowCount=!0;const s=null!==(o=null!==(i=null===(t=e.metricTexts)||void 0===t?void 0:t.itemsSelected)&&void 0!==i?i:null===(n=this.locales)||void 0===n?void 0:n.TEXT_ITEMS_SELECTED)&&void 0!==o?o:"TEXT_ITEMS_SELECTED";e.leftFooterText=`0 ${s}`;const r=this.grid.onSelectedRowsChanged;this._eventHandler.subscribe(r,((t,i)=>{var n,o,s,r;this._selectedRowCount=i.rows.length;const l=null!==(r=null!==(o=null===(n=e.metricTexts)||void 0===n?void 0:n.itemsSelected)&&void 0!==o?o:null===(s=this.locales)||void 0===s?void 0:s.TEXT_ITEMS_SELECTED)&&void 0!==r?r:"TEXT_ITEMS_SELECTED";this.leftFooterText=`${this._selectedRowCount} ${l}`}))}}}class Bn{constructor(){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 e,t;return null!==(t=null===(e=this._cellAddonOptions)||void 0===e?void 0:e.className)&&void 0!==t?t:"slick-custom-tooltip"}get dataView(){return this._grid.getData()||{}}get gridOptions(){return this._grid.getOptions()||{}}get gridUid(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getUID())||""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get tooltipElm(){return this._tooltipElm}addRxJsResource(e){this._rxjs=e}init(e,t){var i,n;this._grid=e,this._rxjs=t.get("RxJsFacade"),this._sharedService=t.get("SharedService"),this._addonOptions={...this._defaultOptions,...null===(n=null===(i=this._sharedService)||void 0===i?void 0:i.gridOptions)||void 0===n?void 0:n.customTooltip},this._eventHandler.subscribe(e.onMouseEnter,this.handleOnMouseEnter.bind(this)).subscribe(e.onHeaderMouseEnter,((e,t)=>this.handleOnHeaderMouseEnterByType(e,t,"slick-header-column"))).subscribe(e.onHeaderRowMouseEnter,((e,t)=>this.handleOnHeaderMouseEnterByType(e,t,"slick-headerrow-column"))).subscribe(e.onMouseLeave,this.hideTooltip.bind(this)).subscribe(e.onHeaderMouseLeave,this.hideTooltip.bind(this)).subscribe(e.onHeaderRowMouseLeave,this.hideTooltip.bind(this))}dispose(){this.hideTooltip(),this._cancellablePromise=void 0,this._eventHandler.unsubscribeAll()}hideTooltip(){var e,t;null===(e=this._cancellablePromise)||void 0===e||e.cancel(),null===(t=this._observable$)||void 0===t||t.unsubscribe();const i=document.body.querySelector(`.${this.className}${this.gridUidSelector}`);null==i||i.remove()}getOptions(){return this._addonOptions}setOptions(e){this._addonOptions={...this._addonOptions,...e}}asyncProcessCallback(e,t,i,n,o){var s,r,l;this.hideTooltip();const a={...o,[null!==(r=null===(s=this.addonOptions)||void 0===s?void 0:s.asyncParamsPropName)&&void 0!==r?r:"__params"]:e};(null===(l=this._cellAddonOptions)||void 0===l?void 0:l.useRegularTooltip)?this.renderRegularTooltip(this._cellAddonOptions.asyncPostFormatter,t,i,n,a):this.renderTooltipFormatter(this._cellAddonOptions.asyncPostFormatter,t,i,n,a)}handleOnHeaderMouseEnterByType(e,t,i){var n,o,s;this.hideTooltip();const r={row:-1,cell:this._grid.getColumns().findIndex((e=>{var i,n;return(null!==(n=null===(i=null==t?void 0:t.column)||void 0===i?void 0:i.id)&&void 0!==n?n:"")===e.id}))},l=t.column,a={},d="slick-headerrow-column"===i;if((t=t||{}).cell=r.cell,t.row=r.row,t.columnDef=l,t.dataContext=a,t.grid=this._grid,t.type=d?"header-row":"header",this._cellAddonOptions={...this._addonOptions,...null==l?void 0:l.customTooltip},!(null==l?void 0:l.disableTooltip)&&("function"!=typeof(null===(n=this._cellAddonOptions)||void 0===n?void 0:n.usabilityOverride)||this._cellAddonOptions.usabilityOverride(t))&&l&&e.target){this._cellNodeElm=e.target.closest(`.${i}`);const t=d?this._cellAddonOptions.headerRowFormatter:this._cellAddonOptions.headerFormatter;if((null===(o=this._cellAddonOptions)||void 0===o?void 0:o.useRegularTooltip)||!t){const e=d?(null===(s=this._cellAddonOptions)||void 0===s?void 0:s.useRegularTooltip)?null:t:l.name;this.renderRegularTooltip(e,r,null,l,a)}else this._cellNodeElm&&"function"==typeof t&&this.renderTooltipFormatter(t,r,null,l,a)}}async handleOnMouseEnter(e){var t,i,n,o,s,r;if(this.hideTooltip(),e&&this._grid){const l=this._grid.getCellFromEvent(e);if(l){const e=this.dataView?this.dataView.getItem(l.row):this._grid.getDataItem(l.row),a=this._grid.getColumns()[l.cell];if(this._cellNodeElm=this._grid.getCellNode(l.row,l.cell),e&&a){if(this._cellAddonOptions={...this._addonOptions,...null==a?void 0:a.customTooltip},(null==a?void 0:a.disableTooltip)||"function"==typeof(null===(t=this._cellAddonOptions)||void 0===t?void 0:t.usabilityOverride)&&!this._cellAddonOptions.usabilityOverride({cell:l.cell,row:l.row,dataContext:e,column:a,grid:this._grid,type:"cell"}))return;const d=e.hasOwnProperty(a.field)?e[a.field]:null;if(this._cellAddonOptions.useRegularTooltip&&!(null===(i=this._cellAddonOptions)||void 0===i?void 0:i.asyncProcess)||!(null===(n=this._cellAddonOptions)||void 0===n?void 0:n.formatter))this.renderRegularTooltip(a.formatter,l,d,a,e);else if("function"==typeof(null===(o=this._cellAddonOptions)||void 0===o?void 0:o.formatter)&&this.renderTooltipFormatter(this._cellAddonOptions.formatter,l,d,a,e),"function"==typeof(null===(s=this._cellAddonOptions)||void 0===s?void 0:s.asyncProcess)){const t=this._cellAddonOptions.asyncProcess(l.row,l.cell,d,a,e,this._grid);if(this._cellAddonOptions.asyncPostFormatter||console.error('[Slickgrid-Universal] when using "asyncProcess" with Custom Tooltip, you must also provide an "asyncPostFormatter" formatter.'),t instanceof Promise)this._cancellablePromise=Re(t),this._cancellablePromise.promise.then((t=>this.asyncProcessCallback(t,l,d,a,e))).catch((e=>{e instanceof Ae||console.error(e)}));else if(null===(r=this._rxjs)||void 0===r?void 0:r.isObservable(t)){const i=this._rxjs;this._observable$=t.pipe(i.switchMap((e=>i.of(e)))).subscribe((t=>this.asyncProcessCallback(t,l,d,a,e)),(e=>console.error(e)))}}}}}}parseFormatterAndSanitize(e,t,i,n,o){if("function"==typeof e){const s=e(t.row,t.cell,i,n,o,this._grid),r="object"==typeof s&&(null==s?void 0:s.text)?s.text:"string"==typeof s?s:"";return at(this.gridOptions,r)}return"string"==typeof e?at(this.gridOptions,e):""}renderRegularTooltip(e,t,i,n,o){var s,r,l,a,d,u,c,h;const p=document.createElement("div");p.innerHTML=this.parseFormatterAndSanitize(e,t,i,n,o);let m,f=null!==(s=null==n?void 0:n.toolTip)&&void 0!==s?s:"";f||(this._cellNodeElm&&this._cellNodeElm.clientWidth<this._cellNodeElm.scrollWidth&&!(null===(r=this._cellAddonOptions)||void 0===r?void 0:r.useRegularTooltipFromFormatterOnly)?(f=null!==(a=null===(l=this._cellNodeElm.textContent)||void 0===l?void 0:l.trim())&&void 0!==a?a:"",(null===(d=this._cellAddonOptions)||void 0===d?void 0:d.tooltipTextMaxLength)&&f.length>(null===(u=this._cellAddonOptions)||void 0===u?void 0:u.tooltipTextMaxLength)&&(f=f.substr(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"..."),m=this._cellNodeElm):((null===(c=this._cellAddonOptions)||void 0===c?void 0:c.useRegularTooltipFromFormatterOnly)?m=p.querySelector("[title], [data-slick-tooltip]"):(m=ci(this._cellNodeElm,["title","data-slick-tooltip"])?this._cellNodeElm:p.querySelector("[title], [data-slick-tooltip]"),m&&ci(m,["title","data-slick-tooltip"])||!this._cellNodeElm||(m=this._cellNodeElm.querySelector("[title], [data-slick-tooltip]"))),(!f||"function"==typeof e&&(null===(h=this._cellAddonOptions)||void 0===h?void 0:h.useRegularTooltipFromFormatterOnly))&&(f=ci(m,["title","data-slick-tooltip"])||""))),""!==f&&this.renderTooltipFormatter(e,t,i,n,o,f),this.swapAndClearTitleAttribute(m,f)}renderTooltipFormatter(e,t,i,n,o,s,r){var l,a,d,u,c,h,p,m,f;this._tooltipElm=document.createElement("div"),this._tooltipElm.className=this.className,this._tooltipElm.classList.add(this.gridUid),this._tooltipElm.classList.add("l"+t.cell),this._tooltipElm.classList.add("r"+t.cell);let g=s||this.parseFormatterAndSanitize(e,t,i,n,o)||"";g=(null===(l=this._cellAddonOptions)||void 0===l?void 0:l.tooltipTextMaxLength)&&g.length>this._cellAddonOptions.tooltipTextMaxLength?g.substr(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"...":g;let v="";!s||(null===(a=this._cellAddonOptions)||void 0===a?void 0:a.renderRegularTooltipAsHtml)?(v=at(this.gridOptions,g),this._tooltipElm.innerHTML=v,this._tooltipElm.style.whiteSpace=null!==(u=null===(d=this._cellAddonOptions)||void 0===d?void 0:d.whiteSpace)&&void 0!==u?u:this._defaultOptions.whiteSpace):(v=g||"",this._tooltipElm.textContent=v,this._tooltipElm.style.whiteSpace=null!==(h=null===(c=this._cellAddonOptions)||void 0===c?void 0:c.regularTooltipWhiteSpace)&&void 0!==h?h:this._defaultOptions.regularTooltipWhiteSpace),(null===(p=this._cellAddonOptions)||void 0===p?void 0:p.maxHeight)&&(this._tooltipElm.style.maxHeight=`${this._cellAddonOptions.maxHeight}px`),(null===(m=this._cellAddonOptions)||void 0===m?void 0:m.maxWidth)&&(this._tooltipElm.style.maxWidth=`${this._cellAddonOptions.maxWidth}px`),v&&(document.body.appendChild(this._tooltipElm),this.reposition(t),(null===(f=this._cellAddonOptions)||void 0===f?void 0:f.hideArrow)||this._tooltipElm.classList.add("tooltip-arrow"),this.swapAndClearTitleAttribute(r,g))}reposition(e){var t,i,n,o,s,r,l,a,d,u,c;if(this._tooltipElm){this._cellNodeElm=this._cellNodeElm||this._grid.getCellNode(e.row,e.cell);const h=gt(this._cellNodeElm)||{top:0,left:0},p=this._cellNodeElm.offsetWidth,m=this._tooltipElm.getBoundingClientRect().height,f=this._tooltipElm.getBoundingClientRect().width,g=document.body.offsetWidth||window.innerWidth;let v=h.top-this._tooltipElm.offsetHeight-(null!==(i=null===(t=this._cellAddonOptions)||void 0===t?void 0:t.offsetTopBottom)&&void 0!==i?i:0),_=h.left-(null!==(o=null===(n=this._cellAddonOptions)||void 0===n?void 0:n.offsetLeft)&&void 0!==o?o:0);const C=null!==(r=null===(s=this._cellAddonOptions)||void 0===s?void 0:s.position)&&void 0!==r?r:"auto";"left-align"===C||("auto"===C||"right-align"!==C)&&_+f>g?(_-=f-p-(null!==(a=null===(l=this._cellAddonOptions)||void 0===l?void 0:l.offsetRight)&&void 0!==a?a:0),this._tooltipElm.classList.remove("arrow-left-align"),this._tooltipElm.classList.add("arrow-right-align")):(this._tooltipElm.classList.add("arrow-left-align"),this._tooltipElm.classList.remove("arrow-right-align")),"bottom"===C||("auto"===C||"top"!==C)&&m>function(e){var t,i,n,o;let s=0,r=0,l=0,a=0;const d=null!==(t=window.innerHeight)&&void 0!==t?t:0,u=null!==(i=window.innerWidth)&&void 0!==i?i:0,c={left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0},h=c.top,p=c.left,m=gt(e);if(m){const e=null!==(n=m.top)&&void 0!==n?n:0,t=null!==(o=m.left)&&void 0!==o?o:0;r=e-h,s=d-(e-h),l=t-p,a=u-(t-p)}return{top:r,bottom:s,left:l,right:a}}(this._cellNodeElm).top?(v=h.top+(null!==(d=this.gridOptions.rowHeight)&&void 0!==d?d:0)+(null!==(c=null===(u=this._cellAddonOptions)||void 0===u?void 0:u.offsetTopBottom)&&void 0!==c?c: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=`${v}px`,this._tooltipElm.style.left=`${_}px`}}swapAndClearTitleAttribute(e,t){var i;const n=e||this._cellNodeElm&&(this._cellNodeElm.hasAttribute("title")&&this._cellNodeElm.getAttribute("title")?this._cellNodeElm:null===(i=this._cellNodeElm)||void 0===i?void 0:i.querySelector("[title]"));n&&(n.setAttribute("data-slick-tooltip",t||""),n.hasAttribute("title")&&n.setAttribute("title",""))}}var Wn=__webpack_require__(404);const Gn={delimiter:re.comma,filename:"export",format:ge.csv,useUtf8WithBom:!0};class Un{constructor(){this._delimiter=",",this._exportQuoteWrapper="",this._fileFormat=ge.csv,this._lineCarriageReturn="\n",this._columnHeaders=[],this._hasGroupedItems=!1,this.className="TextExportService"}get _datasetIdPropName(){return this._gridOptions&&this._gridOptions.datasetIdPropertyName||"id"}get _dataView(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getData)&&this._grid.getData()}get _gridOptions(){var e;return(null===(e=this._grid)||void 0===e?void 0:e.getOptions)?this._grid.getOptions():{}}init(e,t){var i;if(this._grid=e,this._pubSubService=t.get("PubSubService"),this._locales=this._gridOptions&&this._gridOptions.locales||me.locales,this._translaterService=null===(i=this._gridOptions)||void 0===i?void 0:i.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(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 "enableTextExport"?');return new Promise((t=>{var i;null===(i=this._pubSubService)||void 0===i||i.publish("onBeforeExportToTextFile",!0),this._exportOptions=Ne({...Gn,...this._gridOptions.exportOptions,...this._gridOptions.textExportOptions,...e}),this._delimiter=this._exportOptions.delimiterOverride||this._exportOptions.delimiter||"",this._fileFormat=this._exportOptions.format||ge.csv;const n=this.getDataOutput();setTimeout((()=>{var e;const i={filename:`${this._exportOptions.filename}.${this._fileFormat}`,format:this._fileFormat||ge.csv,mimeType:this._exportOptions.mimeType||"text/plain",useUtf8WithBom:!this._exportOptions||!this._exportOptions.hasOwnProperty("useUtf8WithBom")||this._exportOptions.useUtf8WithBom};this.startDownloadFile({...i,content:n}),null===(e=this._pubSubService)||void 0===e||e.publish("onAfterExportToTextFile",i),t(!0)}),0)}))}startDownloadFile(e){const t=We(e.content);let i;i=e.format===ge.csv?new Wn.p("utf-8").encode(t):t;const n=new Blob([e.useUtf8WithBom?"\ufeff":"",i],{type:e.mimeType});if("function"==typeof navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,e.filename);else{const t=document.createElement("a"),i=URL.createObjectURL(n);t.textContent="download",t.href=i,t.setAttribute("download",e.filename),t.style.visibility="hidden",document.body.appendChild(t),t.click(),document.body.removeChild(t)}}getDataOutput(){const e=this._grid.getColumns()||[];let t=this._exportOptions.groupingColumnHeaderTitle;!t&&this._gridOptions.enableTranslate&&this._translaterService&&this._translaterService.translate&&this._translaterService.getCurrentLanguage&&this._translaterService.getCurrentLanguage()?t=this._translaterService.translate(`${Qe(this._gridOptions)}GROUP_BY`):t||(t=this._locales&&this._locales.TEXT_GROUP_BY),this._exportQuoteWrapper=this._fileFormat===ge.csv?'"':"";let i="";const n=this._dataView.getGrouping();return n&&Array.isArray(n)&&n.length>0?(this._hasGroupedItems=!0,i+=this._fileFormat===ge.csv?`"${t}"${this._delimiter}`:`${t}${this._delimiter}`):this._hasGroupedItems=!1,this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping&&(this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(e)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0)&&(i+=this._groupedColumnHeaders.map((e=>`${this._exportQuoteWrapper}${e.title}${this._exportQuoteWrapper}`)).join(this._delimiter)+this._lineCarriageReturn),this._columnHeaders=this.getColumnHeaders(e)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0&&(i+=this._columnHeaders.map((e=>lt(`${this._exportQuoteWrapper}${e.title}${this._exportQuoteWrapper}`))).join(this._delimiter)+this._lineCarriageReturn),i+=this.getAllGridRowData(e,this._lineCarriageReturn),i}getAllGridRowData(e,t){const i=[],n=this._dataView.getLength();for(let t=0;t<n;t++){const n=this._dataView.getItem(t);n&&!n.hasOwnProperty("getItem")&&(null!==n[this._datasetIdPropName]&&void 0!==n[this._datasetIdPropName]?i.push(this.readRegularRowData(e,t,n)):this._hasGroupedItems&&void 0===n.__groupTotals?i.push(this.readGroupedTitleRow(n)):n.__groupTotals&&i.push(this.readGroupedTotalRow(e,n)))}return i.join(t)}getColumnGroupedHeaderTitles(e){const t=[];return e&&Array.isArray(e)&&e.forEach((e=>{let i="";i=e.columnGroupKey&&this._gridOptions.enableTranslate&&this._translaterService&&this._translaterService.translate&&this._translaterService.getCurrentLanguage&&this._translaterService.getCurrentLanguage()?this._translaterService.translate(e.columnGroupKey):e.columnGroup||"";const n=e.excludeFromExport||!1;(void 0===e.width||e.width>0)&&!n&&t.push({key:e.field||e.id,title:i||""})})),t}getColumnHeaders(e){const t=[];return e&&Array.isArray(e)&&e.forEach((e=>{let i="";i=(e.nameKey||e.nameKey)&&this._gridOptions.enableTranslate&&this._translaterService&&this._translaterService.translate&&this._translaterService.getCurrentLanguage&&this._translaterService.getCurrentLanguage()?this._translaterService.translate(e.nameKey||e.nameKey):e.name||ct(e.field);const n=e.excludeFromExport||!1;(void 0===e.width||e.width>0)&&!n&&t.push({key:e.field||e.id,title:i||""})})),t}readRegularRowData(e,t,i){var n;let o=0;const s=[],r=this._exportQuoteWrapper;let l=1;const a=this._dataView.getItemMetadata(t);for(let d=0,u=e.length;d<u;d++){const u=e[d];if(u.excludeFromExport)continue;if(this._hasGroupedItems&&0===o){const e=this._fileFormat===ge.csv?'""':"";s.push(e)}let c;if(null==a?void 0:a.columns){const e=null==a?void 0:a.columns,t=e[u.id]||e[d];l>1||"*"===l&&d>0||(l=null!==(n=null==t?void 0:t.colspan)&&void 0!==n?n:1),"*"!==l&&u.id in e&&(c=u.id)}if("*"===l&&d>0||l>1&&u.id!==c)s.push(""),l>1&&l--;else{let e=$i(t,d,u,i,this._grid,this._exportOptions);(u.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(e=lt(e)),this._fileFormat===ge.csv&&e&&(e=e.toString().replace(/"/gi,'""'));const n=(null==u?void 0:u.exportCsvForceToKeepAsString)?"=":"";s.push(n+r+e+r)}o++}return s.join(this._delimiter)}readGroupedTitleRow(e){let t=lt(e.title);const i=this._exportQuoteWrapper;return t=ke(5*e.level)+t,this._fileFormat===ge.csv&&(t=t.toString().replace(/"/gi,'""')),i+t+i}readGroupedTotalRow(e,t){const i=this._exportOptions.delimiter,n=this._exportOptions.format,o=this._exportOptions.groupingAggregatorRowText||"",s=this._exportQuoteWrapper,r=[`${s}${o}${s}`];return e.forEach((e=>{let i="";const o=e.excludeFromExport||!1;e.groupTotalsFormatter&&(i=e.groupTotalsFormatter(t,e,this._grid)),(e.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(i=lt(i)),n===ge.csv&&(i=i.toString().replace(/"/gi,'""')),(void 0===e.width||e.width>0)&&!o&&r.push(s+i+s)})),r.join(i)}}const jn={autoEdit:!0,autoCommitEdit:!0,autoFixResizeTimeout:18e3,autoFixResizeRequiredGoodCount:18e3,autoFixResizeWhenBrokenStyleDetected:!0,cellValueCouldBeUndefined:!0,eventNamingStyle:le.lowerCaseWithoutOnPrefix,compositeEditorOptions:{labels:{massSelectionButton:"Apply to Selected & Save",massUpdateButton:"Apply to All & Save"},resetEditorButtonCssClass:"mdi mdi-refresh mdi-15px mdi-v-align-text-top",resetFormButtonIconCssClass:"mdi mdi-refresh mdi-16px mdi-flip-h mdi-v-align-text-top"},datasetIdPropertyName:"Id",emptyDataWarning:{message:'<span class="mdi mdi-alert color-warning"></span> No data to display.'},enableDeepCopyDatasetOnPageLoad:!0,enableTextExport:!0,textExportOptions:{exportWithFormatter:!0,sanitizeDataExport:!0},enableCellNavigation:!0,customTooltip:{tooltipTextMaxLength:650},filterTypingDebounce:250,formatterOptions:{minDecimal:0,maxDecimal:2,thousandSeparator:","},frozenHeaderWidthCalcDifferential:2,columnPicker:{hideForceFitButton:!0},gridMenu:{commandLabels:{clearFrozenColumnsCommandKey:"UNFREEZE_COLUMNS"},hideTogglePreHeaderCommand:!0,hideRefreshDatasetCommand:!0,hideClearFrozenColumnsCommand:!1,hideForceFitButton:!0},headerMenu:{hideFreezeColumnsCommand:!1,iconSortAscCommand:"fa fa-sort-amount-asc mdi mdi-arrow-up",iconSortDescCommand:"fa fa-sort-amount-desc mdi mdi-arrow-down"},sanitizer:e=>"string"==typeof e?e.replace(/(\b)(on\S+)(\s*)=|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;)(\/*)(script|script defer)(.*)(&gt;|&gt;">)/gi,""):e,showCustomFooter:!0,customFooterOptions:{hideMetrics:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!0,metricTexts:{itemsSelected:"records selected"}},headerRowHeight:35,rowHeight:33,resizeByContentOnlyOnFirstLoad:!1,resizeByContentOptions:{formatterPaddingWidthInPx:8,maxItemToInspectCellContentWidth:500},rowMoveManager:{hideRowMoveShadow:!1},useSalesforceDefaultGridOptions:!0};class Yn{constructor(){this.dependencies=[]}get(e){const t=this.dependencies.find((t=>t.key===e));return(null==t?void 0:t.instance)?t.instance:null}registerInstance(e,t){this.dependencies.some((t=>t.key===e))||this.dependencies.push({key:e,instance:t})}}class qn{constructor(e,t,i,n,o,s){var r,l,d,u,c,h,p,m,f,g,v,_,C,b,y,w,S,E,T,x;if(this._currentDatasetLength=0,this._hideHeaderRowAfterPageLoad=!1,this._isDatasetInitialized=!1,this._isDatasetHierarchicalInitialized=!1,this._isGridInitialized=!1,this._isLocalGrid=!0,this._isPaginationInitialized=!1,this._registeredResources=[],this._slickgridInitialized=!1,this.customDataView=!1,this.totalItems=0,this.subscriptions=[],this.showPagination=!1,0!==e.querySelectorAll(".slickgrid-container").length)return;e.classList.add("grid-pane"),this._gridParentContainerElm=e,this._gridContainerElm=document.createElement("div"),this._gridContainerElm.classList.add("slickgrid-container"),e.appendChild(this._gridContainerElm),this._hideHeaderRowAfterPageLoad=!1===(null==i?void 0:i.showHeaderRow),this._columnDefinitions=t||[],this._columnDefinitions.length>0&&this.copyColumnWidthsReference(this._columnDefinitions),this._gridOptions=this.mergeGridOptions(i||{});const O=!!(null===(r=this._gridOptions)||void 0===r?void 0:r.enableDeepCopyDatasetOnPageLoad);this.universalContainerService=null!==(l=null==s?void 0:s.universalContainerService)&&void 0!==l?l:new Yn,this.translaterService=null!==(d=null==s?void 0:s.translaterService)&&void 0!==d?d:this._gridOptions.translater,this._eventPubSubService=null!==(u=null==s?void 0:s.eventPubSubService)&&void 0!==u?u:new Pn(e),this._eventPubSubService.eventNamingStyle=null!==(h=null===(c=this._gridOptions)||void 0===c?void 0:c.eventNamingStyle)&&void 0!==h?h:le.camelCase;const k=new On;this.backendUtilityService=null!==(p=null==s?void 0:s.backendUtilityService)&&void 0!==p?p:new a,this.gridEventService=null!==(m=null==s?void 0:s.gridEventService)&&void 0!==m?m:new Di,this.sharedService=null!==(f=null==s?void 0:s.sharedService)&&void 0!==f?f:new zi,this.collectionService=null!==(g=null==s?void 0:s.collectionService)&&void 0!==g?g:new di(this.translaterService),this.extensionUtility=null!==(v=null==s?void 0:s.extensionUtility)&&void 0!==v?v:new mn(this.sharedService,this.translaterService),this.filterFactory=new qi(k,this.translaterService,this.collectionService),this.filterService=null!==(_=null==s?void 0:s.filterService)&&void 0!==_?_:new wi(this.filterFactory,this._eventPubSubService,this.sharedService,this.backendUtilityService),this.resizerService=null!==(C=null==s?void 0:s.resizerService)&&void 0!==C?C:new Vi(this._eventPubSubService),this.sortService=null!==(b=null==s?void 0:s.sortService)&&void 0!==b?b:new Bi(this.sharedService,this._eventPubSubService,this.backendUtilityService),this.treeDataService=null!==(y=null==s?void 0:s.treeDataService)&&void 0!==y?y:new Wi(this._eventPubSubService,this.sharedService,this.sortService),this.paginationService=null!==(w=null==s?void 0:s.paginationService)&&void 0!==w?w:new Ii(this._eventPubSubService,this.sharedService,this.backendUtilityService);const D=new ln(this.sharedService),A=new an(this.extensionUtility,this.sharedService),R=new dn(this.extensionUtility,this.sharedService,this.translaterService),I=new hn(this.extensionUtility,this._eventPubSubService,this.sharedService,this.treeDataService,this.translaterService),P=new cn(this.extensionUtility,this.sharedService),M=new un(this.sharedService),F=new pn(this.extensionUtility,this._eventPubSubService,this.sharedService),N=new fn(this.extensionUtility,this.filterService,this._eventPubSubService,this.sharedService,this.sortService,this.backendUtilityService,this.translaterService),L=new gn(this.sharedService),H=new vn(this.extensionUtility,this.sharedService),V=new _n(this.extensionUtility,this.filterService,this._eventPubSubService,this.sharedService,this.sortService,this.translaterService),z=new Cn,B=new bn(this.sharedService),W=new yn(this.sharedService);this.extensionService=null!==(S=null==s?void 0:s.extensionService)&&void 0!==S?S:new hi(D,A,R,M,P,I,F,N,L,H,V,z,B,W,this.sharedService,this.translaterService),this.gridStateService=null!==(E=null==s?void 0:s.gridStateService)&&void 0!==E?E:new Ai(this.extensionService,this.filterService,this._eventPubSubService,this.sharedService,this.sortService,this.treeDataService),this.gridService=null!==(T=null==s?void 0:s.gridService)&&void 0!==T?T:new ki(this.gridStateService,this.filterService,this._eventPubSubService,this.paginationService,this.sharedService,this.sortService,this.treeDataService),this.groupingService=null!==(x=null==s?void 0:s.groupingAndColspanService)&&void 0!==x?x:new Ri(this.extensionUtility,this.extensionService,this._eventPubSubService),o&&(this.sharedService.hierarchicalDataset=(O?$.extend(!0,[],o):o)||[]);const G=new Slick.EventHandler;this.universalContainerService.registerInstance("PubSubService",this._eventPubSubService),this.universalContainerService.registerInstance("EventPubSubService",this._eventPubSubService),this.universalContainerService.registerInstance("ExtensionUtility",this.extensionUtility),this.universalContainerService.registerInstance("FilterService",this.filterService),this.universalContainerService.registerInstance("CollectionService",this.collectionService),this.universalContainerService.registerInstance("ExtensionService",this.extensionService),this.universalContainerService.registerInstance("GridEventService",this.gridEventService),this.universalContainerService.registerInstance("GridService",this.gridService),this.universalContainerService.registerInstance("GridStateService",this.gridStateService),this.universalContainerService.registerInstance("GroupingAndColspanService",this.groupingService),this.universalContainerService.registerInstance("PaginationService",this.paginationService),this.universalContainerService.registerInstance("ResizerService",this.resizerService),this.universalContainerService.registerInstance("SharedService",this.sharedService),this.universalContainerService.registerInstance("SortService",this.sortService),this.universalContainerService.registerInstance("TranslaterService",this.translaterService),this.universalContainerService.registerInstance("TreeDataService",this.treeDataService),this.initialization(this._gridContainerElm,G),o||this.gridOptions.backendServiceApi||(this.dataset=n||[],this._currentDatasetLength=this.dataset.length)}get eventHandler(){return this._eventHandler}get columnDefinitions(){return this._columnDefinitions||[]}set columnDefinitions(e){this._columnDefinitions=e,this._slickgridInitialized&&this.updateColumnDefinitionsList(this._columnDefinitions),e.length>0&&this.copyColumnWidthsReference(e)}get dataset(){var e;return(null===(e=this.dataView)||void 0===e?void 0:e.getItems())||[]}set dataset(e){var t,i;const n=this._currentDatasetLength,o=mi(e,this.dataset||[]);let s=(null===(t=this._gridOptions)||void 0===t?void 0:t.enableDeepCopyDatasetOnPageLoad)?$.extend(!0,[],e):e;this.slickGrid&&(null===(i=this.gridOptions)||void 0===i?void 0:i.enableTreeData)&&Array.isArray(e)&&(e.length>0||e.length!==n||!o)&&(this._isDatasetHierarchicalInitialized=!1,s=this.sortTreeDataset(e,!o)),this.refreshGridData(s||[]),this._currentDatasetLength=(e||[]).length,this.slickGrid&&this.gridOptions.autoFitColumnsOnFirstLoad&&0===n&&this.slickGrid.autosizeColumns()}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}set datasetHierarchical(e){var t,i,n,o;const s=mi(e,this.sharedService.hierarchicalDataset||[]),r=this._currentDatasetLength;this.sharedService.hierarchicalDataset=e,e&&this.columnDefinitions&&(null===(t=this.filterService)||void 0===t?void 0:t.clearFilters)&&this.filterService.clearFilters(),this.dataView&&e&&this.slickGrid&&(null===(i=this.sortService)||void 0===i?void 0:i.processTreeDataInitialSort)&&(this.dataView.setItems([],null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.datasetIdPropertyName)&&void 0!==o?o:"id"),this.sortService.processTreeDataInitialSort(),setTimeout((()=>{var e,t;const i=null!==(t=null===(e=this.dataView)||void 0===e?void 0:e.getItemCount())&&void 0!==t?t:0;i>0&&(i!==r||!s)&&this.filterService.refreshTreeDataFilters()}))),this._isDatasetHierarchicalInitialized=!0}get gridOptions(){return this._gridOptions||{}}set gridOptions(e){var t,i,n;let o;o=(null===(t=this.slickGrid)||void 0===t?void 0:t.getOptions)?$.extend(!0,{},this.slickGrid.getOptions(),e):this.mergeGridOptions(e),(null===(i=this.sharedService)||void 0===i?void 0:i.gridOptions)&&(null===(n=this.slickGrid)||void 0===n?void 0:n.setOptions)&&(this.sharedService.gridOptions=o,this.slickGrid.setOptions(o,!1,!0),this.slickGrid.reRenderColumns(!0)),this._gridOptions=o}get paginationOptions(){return this._paginationOptions}set paginationOptions(e){var t;e&&this._paginationOptions?this._paginationOptions={...this._paginationOptions,...e}:this._paginationOptions=e,this.gridOptions.pagination=this._paginationOptions,this.paginationService.updateTotalItems(null!==(t=null==e?void 0:e.totalItems)&&void 0!==t?t:0,!0)}get isDatasetInitialized(){return this._isDatasetInitialized}set isDatasetInitialized(e){this._isDatasetInitialized=e}get isGridInitialized(){return this._isGridInitialized}get instances(){return this._slickerGridInstances}get extensions(){return this._extensions}get registeredResources(){return this._registeredResources}emptyGridContainerElm(){var e,t;const i=null!==(t=null===(e=this.gridOptions)||void 0===e?void 0:e.gridContainerId)&&void 0!==t?t:"grid1";Le(document.querySelector(`#${i}`))}dispose(e=!1){var t,i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_,C,b,y;if(null===(t=this._eventPubSubService)||void 0===t||t.publish("onBeforeGridDestroy",this.slickGrid),null===(i=this._eventHandler)||void 0===i||i.unsubscribeAll(),null===(n=this._eventPubSubService)||void 0===n||n.publish("onAfterGridDestroyed",!0),null===(o=this.extensionService)||void 0===o||o.dispose(),null===(s=this.filterService)||void 0===s||s.dispose(),null===(r=this.gridEventService)||void 0===r||r.dispose(),null===(l=this.gridService)||void 0===l||l.dispose(),null===(a=this.gridStateService)||void 0===a||a.dispose(),null===(d=this.groupingService)||void 0===d||d.dispose(),null===(u=this.paginationService)||void 0===u||u.dispose(),null===(c=this.resizerService)||void 0===c||c.dispose(),null===(h=this.sortService)||void 0===h||h.dispose(),null===(p=this.treeDataService)||void 0===p||p.dispose(),Array.isArray(this._registeredResources)){for(;this._registeredResources.length>0;){const e=this._registeredResources.pop();(null==e?void 0:e.dispose)&&e.dispose()}this._registeredResources=[]}if(null===(m=this.slickFooter)||void 0===m||m.dispose(),null===(f=this.slickEmptyWarning)||void 0===f||f.dispose(),null===(g=this.slickPagination)||void 0===g||g.dispose(),null===(v=this._eventPubSubService)||void 0===v||v.unsubscribeAll(),null===(_=this.dataView)||void 0===_||_.setItems([]),(null===(C=this.dataView)||void 0===C?void 0:C.destroy)&&(null===(b=this.dataView)||void 0===b||b.destroy()),null===(y=this.slickGrid)||void 0===y||y.destroy(!0),this.slickGrid=null,Le(this._gridContainerElm),Le(this._gridParentContainerElm),this.backendServiceApi){for(const e of Object.keys(this.backendServiceApi))this.backendServiceApi[e]=null;this.backendServiceApi=void 0}for(const e of Object.keys(this.columnDefinitions))this.columnDefinitions[e]=null;for(const e of Object.keys(this.sharedService))this.sharedService[e]=null;this.datasetHierarchical=void 0,this._columnDefinitions=[],e&&this.emptyGridContainerElm()}initialization(e,t){var i,n,o,s,r,l,a,d,u,c,h,p,m,f,g,v,_,C,b,y,w,S,E,T,x;if(this.gridOptions&&(void 0!==this.gridOptions.frozenRow&&this.gridOptions.frozenRow>=0||void 0!==this.gridOptions.frozenColumn&&this.gridOptions.frozenColumn>=0)&&void 0===this.gridOptions.enableMouseWheelScrollHandler&&(this.gridOptions.enableMouseWheelScrollHandler=!0),this._gridContainerElm=e,this._eventPubSubService.publish("onBeforeGridCreate",!0),this._eventHandler=t,this._gridOptions=this.mergeGridOptions(this._gridOptions||{}),this.backendServiceApi=null===(i=this._gridOptions)||void 0===i?void 0:i.backendServiceApi,this._isLocalGrid=!this.backendServiceApi,this._eventPubSubService.eventNamingStyle=null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.eventNamingStyle)&&void 0!==o?o:le.camelCase,this._paginationOptions=null===(s=this.gridOptions)||void 0===s?void 0:s.pagination,this.createBackendApiInternalPostProcessCallback(this._gridOptions),!this.customDataView){let e={inlineFilters:null!==(a=null===(l=null===(r=this._gridOptions)||void 0===r?void 0:r.dataView)||void 0===l?void 0:l.inlineFilters)&&void 0!==a&&a};(this.gridOptions.draggableGrouping||this.gridOptions.enableGrouping)&&(this.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider,this.sharedService.groupItemMetadataProvider=this.groupItemMetadataProvider,e={...e,groupItemMetadataProvider:this.groupItemMetadataProvider}),this.dataView=new Slick.Data.DataView(e),this._eventPubSubService.publish("onDataviewCreated",this.dataView)}this.preRegisterResources(),this._columnDefinitions=this.swapInternalEditorToSlickGridFactoryEditor(this._columnDefinitions||[]),this._gridOptions.autoAddCustomEditorFormatter&&Fi(this._columnDefinitions,this._gridOptions.autoAddCustomEditorFormatter),this.sharedService.allColumns=this._columnDefinitions,this.sharedService.visibleColumns=this._columnDefinitions,this.extensionService.createExtensionsBeforeGridCreation(this._columnDefinitions,this._gridOptions),(null===(d=this.gridOptions.presets)||void 0===d?void 0:d.pinning)&&(this.gridOptions={...this.gridOptions,...this.gridOptions.presets.pinning}),this.slickGrid=new Slick.Grid(e,this.dataView,this._columnDefinitions,this._gridOptions),this.sharedService.dataView=this.dataView,this.sharedService.slickGrid=this.slickGrid,this.extensionService.bindDifferentExtensions(),this.bindDifferentHooks(this.slickGrid,this._gridOptions,this.dataView),this._slickgridInitialized=!0;const O=null!==(c=null===(u=this._gridOptions)||void 0===u?void 0:u.frozenColumn)&&void 0!==c?c:-1;if(O>=0&&O<=this._columnDefinitions.length&&this._columnDefinitions.length>0&&(this.sharedService.frozenVisibleColumnId=null!==(p=null===(h=this._columnDefinitions[O])||void 0===h?void 0:h.id)&&void 0!==p?p:""),this.registerResources(),this.slickGrid.init(),this.resizerService.init(this.slickGrid,this._gridParentContainerElm),!this.gridOptions.enablePagination&&this.gridOptions.showCustomFooter&&this.gridOptions.customFooterOptions&&(this.slickFooter=new zn(this.slickGrid,this.gridOptions.customFooterOptions,this._eventPubSubService,this.translaterService),this.slickFooter.renderFooter(this._gridParentContainerElm)),Array.isArray(this.dataset)){const e=(null===(m=this.gridOptions)||void 0===m?void 0:m.enableTreeData)?this.sortTreeDataset(this.dataset):this.dataset;null===(f=this.dataView)||void 0===f||f.setItems(e,this._gridOptions.datasetIdPropertyName)}if((null===(v=null===(g=this.slickGrid)||void 0===g?void 0:g.getSelectionModel)||void 0===v?void 0:v.call(g))&&(null===(_=this._gridOptions)||void 0===_?void 0:_.dataView)&&this._gridOptions.dataView.hasOwnProperty("syncGridSelection")){let e=!1;this._gridOptions.backendServiceApi&&this._gridOptions.dataView.hasOwnProperty("syncGridSelectionWithBackendService")&&(e=this._gridOptions.dataView.syncGridSelectionWithBackendService);const t=this._gridOptions.dataView.syncGridSelection;if("boolean"==typeof t){let i=t;this._isLocalGrid||(i=t&&e),null===(C=this.dataView)||void 0===C||C.syncGridSelection(this.slickGrid,i)}else"object"==typeof t&&(null===(b=this.dataView)||void 0===b||b.syncGridSelection(this.slickGrid,t.preserveHidden,t.preserveHiddenOnSelectionChange))}this.slickGrid.invalidate(),(null!==(w=null===(y=this.dataView)||void 0===y?void 0:y.getLength())&&void 0!==w?w:0)>0&&(this._isDatasetInitialized||!this._gridOptions.enableCheckboxSelector&&!this._gridOptions.enableRowSelection||this.loadRowSelectionPresetWhenExists(),this.loadFilterPresetsWhenDatasetInitialized(),this._isDatasetInitialized=!0),this._hideHeaderRowAfterPageLoad&&(this.showHeaderRow(!1),this.sharedService.hideHeaderRowAfterPageLoad=this._hideHeaderRowAfterPageLoad),this.gridEventService.bindOnBeforeEditCell(this.slickGrid),this.gridEventService.bindOnCellChange(this.slickGrid),this.gridEventService.bindOnClick(this.slickGrid),(null===(S=this.gridOptions)||void 0===S?void 0:S.backendServiceApi)&&this.bindBackendCallbackFunctions(this.gridOptions),this._eventPubSubService.publish("onGridCreated",this.slickGrid),this.customDataView||this.executeAfterDataviewCreated(this.gridOptions),this.bindResizeHook(this.slickGrid,this.gridOptions),this._slickerGridInstances={dataView:this.dataView,slickGrid:this.slickGrid,dispose:this.dispose.bind(this),backendService:null===(T=null===(E=this.gridOptions)||void 0===E?void 0:E.backendServiceApi)||void 0===T?void 0:T.service,filterService:this.filterService,gridEventService:this.gridEventService,gridStateService:this.gridStateService,gridService:this.gridService,groupingService:this.groupingService,extensionService:this.extensionService,extensionUtility:this.extensionUtility,paginationService:this.paginationService,resizerService:this.resizerService,sortService:this.sortService,treeDataService:this.treeDataService},this._extensions=null===(x=this.extensionService)||void 0===x?void 0:x.extensionList,this._eventPubSubService.publish("onSlickerGridCreated",this.instances),this._isGridInitialized=!0}mergeGridOptions(e){const t=e.useSalesforceDefaultGridOptions||this._gridOptions&&this._gridOptions.useSalesforceDefaultGridOptions?jn:{},i=$.extend(!0,{},Xi,t,e);return i.enableFiltering&&!i.showHeaderRow&&(i.showHeaderRow=i.enableFiltering),(null==i?void 0:i.pagination)&&(e.enablePagination||e.backendServiceApi)&&e.pagination&&Array.isArray(e.pagination.pageSizes)&&(i.pagination.pageSizes=e.pagination.pageSizes),!i.enableFiltering&&i.enablePagination&&this._isLocalGrid&&(i.enableFiltering=!0,i.showHeaderRow=!1,this._hideHeaderRowAfterPageLoad=!0,this.sharedService&&(this.sharedService.hideHeaderRowAfterPageLoad=!0)),i}createBackendApiInternalPostProcessCallback(e){const t=null==e?void 0:e.backendServiceApi;if(null==t?void 0:t.service){const e=t.service;"function"==typeof e.getDatasetName&&(t.internalPostProcess=i=>{const n=t&&e&&"function"==typeof e.getDatasetName?e.getDatasetName():"";if(i&&i.data&&i.data[n]){const e=i.data[n].hasOwnProperty("nodes")?i.data[n].nodes:i.data[n],t=i.data[n].hasOwnProperty("totalCount")?i.data[n].totalCount:i.data[n].length;this.refreshGridData(e,t||0)}})}}bindDifferentHooks(e,t,i){var n,o;if(t.enableTranslate&&(null===(n=this.translaterService)||void 0===n?void 0:n.addPubSubMessaging)&&this.translaterService.addPubSubMessaging(this._eventPubSubService),t.enableTranslate&&(this.translateColumnHeaderTitleKeys(),this.translateColumnGroupKeys()),this.subscriptions.push(this._eventPubSubService.subscribe("onLanguageChange",(()=>{t.enableTranslate&&(this.extensionService.translateCellMenu(),this.extensionService.translateColumnHeaders(),this.extensionService.translateColumnPicker(),this.extensionService.translateContextMenu(),this.extensionService.translateGridMenu(),this.extensionService.translateHeaderMenu(),this.translateColumnHeaderTitleKeys(),this.translateColumnGroupKeys(),t.createPreHeaderPanel&&!t.enableDraggableGrouping&&this.groupingService.translateGroupingAndColSpan())}))),t.backendServiceApi){const e=t.backendServiceApi;(null===(o=null==e?void 0:e.service)||void 0===o?void 0:o.init)&&e.service.init(e.options,t.pagination,this.slickGrid,this.sharedService)}if(i&&e){for(const t in e)if(e.hasOwnProperty(t)&&t.startsWith("on")){const i=e[t];this._eventHandler.subscribe(i,((e,i)=>{var n,o;const s=this._eventPubSubService.getEventNameByNamingConvention(t,null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.defaultSlickgridEventPrefix)&&void 0!==o?o:"");return this._eventPubSubService.dispatchCustomEvent(s,{eventData:e,args:i})}))}for(const e in i)if(i.hasOwnProperty(e)&&e.startsWith("on")){const t=i[e];this._eventHandler.subscribe(t,((t,i)=>{var n,o;const s=this._eventPubSubService.getEventNameByNamingConvention(e,null!==(o=null===(n=this._gridOptions)||void 0===n?void 0:n.defaultSlickgridEventPrefix)&&void 0!==o?o:"");return this._eventPubSubService.dispatchCustomEvent(s,{eventData:t,args:i})}))}t.enableFiltering&&(this.filterService.init(e),t.backendServiceApi&&!t.backendServiceApi.useLocalFiltering?this.filterService.bindBackendOnFilter(e):this.filterService.bindLocalOnFilter(e)),t.enableSorting&&(t.backendServiceApi&&!t.backendServiceApi.useLocalSorting?this.sortService.bindBackendOnSort(e):this.sortService.bindLocalOnSort(e));const n=i.onRowCountChanged;this._eventHandler.subscribe(n,(()=>{var t,i,n;e.invalidate(),this.handleOnItemCountChanged((null===(t=this.dataView)||void 0===t?void 0:t.getFilteredItemCount())||0,null!==(n=null===(i=this.dataView)||void 0===i?void 0:i.getItemCount())&&void 0!==n?n:0)}));const o=i.onSetItemsCalled;if(this._eventHandler.subscribe(o,((e,t)=>{var i,n;this.handleOnItemCountChanged((null===(i=this.dataView)||void 0===i?void 0:i.getFilteredItemCount())||0,t.itemCount),t.itemCount>0&&(this.gridOptions.autosizeColumnsByCellContentOnFirstLoad||this.gridOptions.enableAutoResizeColumnsByCellContent)&&this.resizerService.resizeColumnsByCellContent(!(null===(n=this.gridOptions)||void 0===n?void 0:n.resizeByContentOnlyOnFirstLoad))})),t&&t.enableFiltering&&!t.enableRowDetailView){const t=i.onRowsChanged;this._eventHandler.subscribe(t,((t,i)=>{(null==i?void 0:i.rows)&&Array.isArray(i.rows)&&(i.rows.forEach((t=>e.updateRow(t))),e.render())}))}const s=e.onColumnsReordered;this._eventHandler.subscribe(s,((e,t)=>{this.sharedService.hasColumnsReordered=!0,this.sharedService.visibleColumns=t.impactedColumns})),this.loadColumnPresetsWhenDatasetInitialized(),this.loadFilterPresetsWhenDatasetInitialized()}(null==t?void 0:t.colspanCallback)&&(null==i?void 0:i.getItem)&&(null==i?void 0:i.getItemMetadata)&&(i.getItemMetadata=e=>{let n=null;return t.colspanCallback&&(n=t.colspanCallback(i.getItem(e))),n})}bindBackendCallbackFunctions(e){var t,i,n,o,s,r;const l=e.backendServiceApi,a=null==l?void 0:l.service,d=null!==(t=null==a?void 0:a.options)&&void 0!==t?t:{},u=!!d&&(!(null==d?void 0:d.hasOwnProperty("executeProcessCommandOnInit"))||d.executeProcessCommandOnInit);if(a){if(null==e?void 0:e.presets){if(a.updateFilters&&Array.isArray(e.presets.filters)&&e.presets.filters.length>0&&a.updateFilters(e.presets.filters,!0),a.updateSorters&&Array.isArray(e.presets.sorters)&&e.presets.sorters.length>0){const t=(null===(i=this._gridOptions)||void 0===i?void 0:i.multiColumnSort)?e.presets.sorters:e.presets.sorters.slice(0,1);a.updateSorters(void 0,t)}if(a.updatePagination&&e.presets.pagination){const{pageNumber:t,pageSize:i}=e.presets.pagination;a.updatePagination(t,i)}}else{const e=this.filterService.getColumnFilters();e&&a.updateFilters&&a.updateFilters(e,!1)}if(l&&a&&(l.onInit||u)){const e="function"==typeof a.buildQuery?a.buildQuery():"",t=u?null!==(o=null===(n=l.process)||void 0===n?void 0:n.call(l,e))&&void 0!==o?o:null:null!==(r=null===(s=l.onInit)||void 0===s?void 0:s.call(l,e))&&void 0!==r?r:null;setTimeout((()=>{var e,i,n,o;const s=this.backendUtilityService,r=new Date;l.preProcess&&l.preProcess();const a=null!==(n=null===(i=null===(e=this.gridOptions)||void 0===e?void 0:e.pagination)||void 0===i?void 0:i.totalItems)&&void 0!==n?n:0;t instanceof Promise?t.then((e=>s.executeBackendProcessesCallback(r,e,l,a))).catch((e=>s.onBackendError(e,l))):t&&(null===(o=this.rxjs)||void 0===o?void 0:o.isObservable(t))&&this.subscriptions.push(t.subscribe((e=>s.executeBackendProcessesCallback(r,e,l,a)),(e=>s.onBackendError(e,l))))}))}}}bindResizeHook(e,t){if(t.autoFitColumnsOnFirstLoad&&t.autosizeColumnsByCellContentOnFirstLoad||t.enableAutoSizeColumns&&t.enableAutoResizeColumnsByCellContent)throw new Error('[Slickgrid-Universal] You cannot enable both autosize/fit viewport & resize by content, you must choose which resize technique to use. You can enable these 2 options ("autoFitColumnsOnFirstLoad" and "enableAutoSizeColumns") OR these other 2 options ("autosizeColumnsByCellContentOnFirstLoad" and "enableAutoResizeColumnsByCellContent").');e&&t.autoFitColumnsOnFirstLoad&&t.enableAutoSizeColumns&&"function"==typeof e.autosizeColumns&&e.autosizeColumns(),t.gridHeight||t.gridWidth?this.resizerService.resizeGrid(0,{height:t.gridHeight,width:t.gridWidth}):this.resizerService.resizeGrid(),e&&(null==t?void 0:t.enableAutoResize)&&t.autoFitColumnsOnFirstLoad&&t.enableAutoSizeColumns&&"function"==typeof e.autosizeColumns&&e.autosizeColumns()}executeAfterDataviewCreated(e){var t;if(e.enableSorting&&e.presets&&Array.isArray(e.presets.sorters)){const i=(null===(t=this._gridOptions)||void 0===t?void 0:t.multiColumnSort)?e.presets.sorters:e.presets.sorters.slice(0,1);this.sortService.loadGridSorters(i)}}paginationChanged(e){var t,i;const n=null!==(i=null===(t=this.gridStateService)||void 0===t?void 0:t.needToPreserveRowSelection())&&void 0!==i&&i;this.slickGrid&&!n&&(this.gridOptions.enableRowSelection||this.gridOptions.enableCheckboxSelector)&&this.slickGrid.setSelectedRows([]);const{pageNumber:o,pageSize:s}=e;this.sharedService&&void 0!==s&&void 0!==o&&(this.sharedService.currentPagination={pageNumber:o,pageSize:s}),this._eventPubSubService.publish("onGridStateChanged",{change:{newValues:{pageNumber:o,pageSize:s},type:Ce.pagination},gridState:this.gridStateService.getCurrentGridState()})}refreshGridData(e,t){var i,n,o,s,r;if(this.slickGrid&&this._gridOptions){if(this._gridOptions.enablePagination&&this._isLocalGrid&&(this.showPagination=!0,this.loadLocalGridPagination(e)),this._gridOptions.enableEmptyDataWarningMessage&&Array.isArray(e)){const i=t||e.length;this.displayEmptyDataWarning(i<1)}if(Array.isArray(e)&&this.slickGrid&&(null===(i=this.dataView)||void 0===i?void 0:i.setItems)){if(this.dataView.setItems(e,this._gridOptions.datasetIdPropertyName),this._gridOptions.backendServiceApi||this._gridOptions.enableTreeData||this.dataView.reSort(),e.length>0&&(this._isDatasetInitialized||(this.loadFilterPresetsWhenDatasetInitialized(),this._gridOptions.enableCheckboxSelector&&this.loadRowSelectionPresetWhenExists()),this._isDatasetInitialized=!0),e&&this.slickGrid.invalidate(),this.showPagination=!(!this._gridOptions||!(this._gridOptions.enablePagination||this._gridOptions.backendServiceApi&&void 0===this._gridOptions.enablePagination)),this._paginationOptions&&(null===(n=this._gridOptions)||void 0===n?void 0:n.pagination)&&(null===(o=this._gridOptions)||void 0===o?void 0:o.backendServiceApi)){const e=this.setPaginationOptionsWhenPresetDefined(this._gridOptions,this._paginationOptions),i=void 0!==t?t:null===(r=null===(s=this._gridOptions)||void 0===s?void 0:s.pagination)||void 0===r?void 0:r.totalItems;void 0!==i&&i!==this.totalItems&&(this.totalItems=+i),this._isPaginationInitialized?this.paginationService.updateTotalItems(this.totalItems):this.initializePaginationService(e)}if(this.slickGrid&&this._gridOptions.enableAutoResize){const e=this._gridOptions.autoResize&&this._gridOptions.autoResize.delay;this.resizerService.resizeGrid(e||10)}}}}updateColumnDefinitionsList(e){var t,i,n;this.slickGrid&&this._gridOptions&&Array.isArray(e)&&(e=this.swapInternalEditorToSlickGridFactoryEditor(e),this._gridOptions.autoAddCustomEditorFormatter&&Fi(e,this._gridOptions.autoAddCustomEditorFormatter),this._gridOptions.enableTranslate?this.extensionService.translateColumnHeaders(!1,e):this.extensionService.renderColumnHeaders(e,!0),this.slickGrid&&(null===(t=this._gridOptions)||void 0===t?void 0:t.enableAutoSizeColumns)?this.slickGrid.autosizeColumns():(null===(i=this._gridOptions)||void 0===i?void 0:i.enableAutoResizeColumnsByCellContent)&&(null===(n=this.resizerService)||void 0===n?void 0:n.resizeColumnsByCellContent)&&this.resizerService.resizeColumnsByCellContent())}showHeaderRow(e=!0){var t;return null===(t=this.slickGrid)||void 0===t||t.setHeaderRowVisibility(e,!1),this.slickGrid&&!0===e&&this._isGridInitialized&&this.slickGrid.setColumns(this.columnDefinitions),e}setPaginationOptionsWhenPresetDefined(e,t){var i;return(null===(i=e.presets)||void 0===i?void 0:i.pagination)&&t&&!this._isPaginationInitialized&&(t.pageSize=e.presets.pagination.pageSize,t.pageNumber=e.presets.pagination.pageNumber),t}copyColumnWidthsReference(e){e.forEach((e=>e.originalWidth=e.width))}displayEmptyDataWarning(e=!0){var t;null===(t=this.slickEmptyWarning)||void 0===t||t.showEmptyDataMessage(e)}handleOnItemCountChanged(e,t){var i;this._currentDatasetLength=t,this.metrics={startTime:new Date,endTime:new Date,itemCount:e,totalItemCount:t},this.slickFooter&&(this.slickFooter.metrics=this.metrics),this._isLocalGrid&&(null===(i=this._gridOptions)||void 0===i?void 0:i.enableEmptyDataWarningMessage)&&this.displayEmptyDataWarning(0===e)}initializePaginationService(e){this.slickGrid&&this.gridOptions&&(this.paginationData={gridOptions:this.gridOptions,paginationService:this.paginationService},this.paginationService.totalItems=this.totalItems,this.paginationService.init(this.slickGrid,e,this.backendServiceApi),this.subscriptions.push(this._eventPubSubService.subscribe("onPaginationChanged",(e=>this.paginationChanged(e))),this._eventPubSubService.subscribe("onPaginationVisibilityChanged",(e=>{var t,i,n;this.showPagination=null!==(t=null==e?void 0:e.visible)&&void 0!==t&&t,(null===(i=this.gridOptions)||void 0===i?void 0:i.backendServiceApi)&&(null===(n=this.backendUtilityService)||void 0===n||n.refreshBackendDataset(this.gridOptions)),this.renderPagination(this.showPagination)}))),this.renderPagination(),this._isPaginationInitialized=!0)}renderPagination(e=!0){var t;(null===(t=this._gridOptions)||void 0===t?void 0:t.enablePagination)&&!this._isPaginationInitialized&&e?(this.slickPagination=new Hn(this.paginationService,this._eventPubSubService,this.sharedService,this.translaterService),this.slickPagination.renderPagination(this._gridParentContainerElm),this._isPaginationInitialized=!0):e||(this.slickPagination&&this.slickPagination.dispose(),this._isPaginationInitialized=!1)}loadEditorCollectionAsync(e){var t;const i=(null==e?void 0:e.editor).collectionAsync;(null==e?void 0:e.editor).disabled=!0,i instanceof Promise?i.then((t=>{Array.isArray(t)?this.updateEditorCollection(e,t):t instanceof Response&&"function"==typeof t.json?t.bodyUsed?console.warn("[SlickGrid-Universal] The response body passed to collectionAsync was already read.Either pass the dataset from the Response or clone the response first using response.clone()"):t.json().then((t=>this.updateEditorCollection(e,t))):t&&t.content&&this.updateEditorCollection(e,t.content)})):(null===(t=this.rxjs)||void 0===t?void 0:t.isObservable(i))&&setTimeout((()=>{this.subscriptions.push(i.subscribe((t=>this.updateEditorCollection(e,t))))}))}loadColumnPresetsWhenDatasetInitialized(){if(this.slickGrid&&this.gridOptions.presets&&Array.isArray(this.gridOptions.presets.columns)&&this.gridOptions.presets.columns.length>0){const e=this.gridStateService.getAssociatedGridColumns(this.slickGrid,this.gridOptions.presets.columns);if(e&&Array.isArray(e)&&e.length>0){if(this.gridOptions.enableCheckboxSelector){const t=Array.isArray(this._columnDefinitions)&&this._columnDefinitions.length>0?this._columnDefinitions[0]:null;t&&"_checkbox_selector"===t.id&&"_checkbox_selector"!==e[0].id&&e.unshift(t)}e.forEach((e=>e.originalWidth=e.width)),this.slickGrid.setColumns(e),this.sharedService.visibleColumns=e}}}loadFilterPresetsWhenDatasetInitialized(){var e,t,i;this.gridOptions&&!this.customDataView&&this.gridOptions.presets&&(Array.isArray(this.gridOptions.presets.filters)||Array.isArray(null===(t=null===(e=this.gridOptions.presets)||void 0===e?void 0:e.treeData)||void 0===t?void 0:t.toggledItems))&&this.filterService.populateColumnFilterSearchTermPresets((null===(i=this.gridOptions.presets)||void 0===i?void 0:i.filters)||[])}loadLocalGridPagination(e){var t;if(this.gridOptions&&this._paginationOptions){if(this.totalItems=Array.isArray(e)?e.length:0,this._paginationOptions&&(null===(t=this.dataView)||void 0===t?void 0:t.getPagingInfo)){const e=this.dataView.getPagingInfo();(null==e?void 0:e.hasOwnProperty("totalRows"))&&this._paginationOptions.totalItems!==e.totalRows&&(this.totalItems=(null==e?void 0:e.totalRows)||0)}this._paginationOptions.totalItems=this.totalItems;const i=this.setPaginationOptionsWhenPresetDefined(this.gridOptions,this._paginationOptions);this.initializePaginationService(i)}}loadRowSelectionPresetWhenExists(){var e,t,i;const n=null===(e=this.gridOptions)||void 0===e?void 0:e.presets,o=null===(i=null===(t=this.slickGrid)||void 0===t?void 0:t.getSelectionModel)||void 0===i?void 0:i.call(t),s=this.gridOptions&&(this.gridOptions.enableCheckboxSelector||this.gridOptions.enableRowSelection);if(this.slickGrid&&this.dataView&&s&&o&&(null==n?void 0:n.rowSelection)&&(Array.isArray(n.rowSelection.gridRowIndexes)||Array.isArray(n.rowSelection.dataContextIds))){let e=n.rowSelection.dataContextIds,t=n.rowSelection.gridRowIndexes;Array.isArray(e)&&e.length>0?t=this.dataView.mapIdsToRows(e)||[]:Array.isArray(t)&&t.length>0&&(e=this.dataView.mapRowsToIds(t)||[]),this.gridStateService.selectedRowDataContextIds=e,(this._isLocalGrid&&!this.gridOptions.enablePagination||!this._isLocalGrid)&&setTimeout((()=>{this.slickGrid&&Array.isArray(t)&&this.slickGrid.setSelectedRows(t)}))}}preRegisterResources(){if(this._registeredResources=this.gridOptions.registerExternalResources||[],Array.isArray(this._registeredResources))for(const e of this._registeredResources)"RxJsResource"===(null==e?void 0:e.className)&&this.registerRxJsResource(e)}registerResources(){if(this.gridOptions.enableTextExport&&this.gridOptions.useSalesforceDefaultGridOptions&&this._registeredResources.push(new Un),this.gridOptions.useSalesforceDefaultGridOptions&&this._registeredResources.push(new Bn),Array.isArray(this._registeredResources)&&(this.sharedService.externalRegisteredResources=this._registeredResources),this._registeredResources.push(this.gridService,this.gridStateService),this.gridOptions.createPreHeaderPanel&&!this.gridOptions.enableDraggableGrouping&&this._registeredResources.push(this.groupingService),this.gridOptions.enableTreeData&&this._registeredResources.push(this.treeDataService),this.gridOptions.enableTranslate&&this.extensionService.translateColumnHeaders(),this.slickEmptyWarning=new $n,this._registeredResources.push(this.slickEmptyWarning),this.gridOptions.enableCompositeEditor&&this.gridOptions.useSalesforceDefaultGridOptions&&(this._registeredResources.some((e=>e instanceof Ln))||(this.slickCompositeEditor=new Ln,this._registeredResources.push(this.slickCompositeEditor))),Array.isArray(this._registeredResources))for(const e of this._registeredResources)this.slickGrid&&"function"==typeof e.init&&e.init(this.slickGrid,this.universalContainerService)}registerRxJsResource(e){this.rxjs=e,this.backendUtilityService.addRxJsResource(this.rxjs),this.filterFactory.addRxJsResource(this.rxjs),this.filterService.addRxJsResource(this.rxjs),this.sortService.addRxJsResource(this.rxjs),this.paginationService.addRxJsResource(this.rxjs),this.universalContainerService.registerInstance("RxJsFacade",this.rxjs),this.universalContainerService.registerInstance("RxJsResource",this.rxjs)}sortTreeDataset(e,t=!1){var i,n;const o=this._currentDatasetLength;let s,r=[];return this._isDatasetHierarchicalInitialized&&this.datasetHierarchical?(s=this.treeDataService.sortHierarchicalDataset(this.datasetHierarchical),r=s.flat):Array.isArray(e)&&e.length>0&&((null===(n=null===(i=this.gridOptions)||void 0===i?void 0:i.treeDataOptions)||void 0===n?void 0:n.initialSort)?(s=this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(e,this._columnDefinitions||[],this.gridOptions),this.sharedService.hierarchicalDataset=s.hierarchical,r=s.flat):(this.sharedService.hierarchicalDataset=this.treeDataService.convertFlatParentChildToTreeDataset(e,this.gridOptions),r=e||[])),e.length>0&&(t||e.length!==o)&&this.filterService.refreshTreeDataFilters(r),r}swapInternalEditorToSlickGridFactoryEditor(e){const t=Array.isArray(e)?e:[];return t.some((e=>`${e.id}`.includes(".")))&&console.error('[Slickgrid-Universal] Make sure that none of your Column Definition "id" property includes a dot in its name because that will cause some problems with the Editors. For example if your column definition "field" property is "user.firstName" then use "firstName" as the column "id".'),t.map((e=>{var t;(null===(t=e.editor)||void 0===t?void 0:t.collectionAsync)&&this.loadEditorCollectionAsync(e);const i=e.internalColumnEditor||e.editor;return{...e,editor:null==i?void 0:i.model,internalColumnEditor:{...i}}}))}translateColumnHeaderTitleKeys(){this.extensionUtility.translateItems(this.sharedService.allColumns,"nameKey","name")}translateColumnGroupKeys(){this.extensionUtility.translateItems(this.sharedService.allColumns,"columnGroupKey","columnGroup")}updateEditorCollection(e,t){if(e.editor.collection=t,e.editor.disabled=!1,this.slickGrid){const i=this.slickGrid.getColumns();if(Array.isArray(i)){const t=i.find((t=>t.id===e.id));t&&(t.internalColumnEditor=e.editor)}const n=this.slickGrid.getCellEditor();(null==n?void 0:n.disable)&&(null==n?void 0:n.renderDomElement)&&(n.destroy(),n.disable(!1),n.renderDomElement(t))}}}const Xn={GridBundle:qn,Aggregators:Qi,BindingService:Rn,Editors:rn,Enums:n,Filters:Yi,Formatters:Tn,GroupTotalFormatters:xn,SortComparers:Tt,Utilities:Dn};"undefined"!=typeof window&&(window.Slicker=Xn)}(),__webpack_exports__}()}));
3
- //# sourceMappingURL=slickgrid-vanilla-bundle.js.map