@easydata/crud 1.4.18 → 1.4.20
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.
- package/dist/easydata.crud.cjs.js +22 -0
- package/dist/easydata.crud.cjs.js.map +1 -0
- package/dist/easydata.crud.es.js +22 -0
- package/dist/easydata.crud.es.js.map +1 -0
- package/package.json +15 -50
- package/api-easydata.js +0 -5
- package/dist/assets/css/ed-view.css +0 -107
- package/dist/browser/easydata.css +0 -2188
- package/dist/browser/easydata.css.map +0 -1
- package/dist/browser/easydata.js +0 -12208
- package/dist/browser/easydata.js.map +0 -1
- package/dist/browser/easydata.min.css +0 -3
- package/dist/browser/easydata.min.js +0 -3
- package/dist/browser/easydata.min.js.LICENSE.txt +0 -9
- package/dist/browser/easydata.min.js.map +0 -1
- package/dist/bundles/easydata.crud.js +0 -8511
- package/dist/bundles/easydata.crud.js.map +0 -1
- package/dist/bundles/easydata.crud.min.js +0 -3
- package/dist/bundles/easydata.crud.min.js.LICENSE.txt +0 -1
- package/dist/bundles/easydata.crud.min.js.map +0 -1
- package/dist/lib/filter/data_filter.js +0 -2
- package/dist/lib/filter/data_filter.js.map +0 -1
- package/dist/lib/filter/text_data_filter.js +0 -123
- package/dist/lib/filter/text_data_filter.js.map +0 -1
- package/dist/lib/form/entity_edit_form.js +0 -134
- package/dist/lib/form/entity_edit_form.js.map +0 -1
- package/dist/lib/form/entity_form_builder.js +0 -441
- package/dist/lib/form/entity_form_builder.js.map +0 -1
- package/dist/lib/i18n/text_resources.js +0 -32
- package/dist/lib/i18n/text_resources.js.map +0 -1
- package/dist/lib/main/data_context.js +0 -168
- package/dist/lib/main/data_context.js.map +0 -1
- package/dist/lib/main/easy_data_server_loader.js +0 -44
- package/dist/lib/main/easy_data_server_loader.js.map +0 -1
- package/dist/lib/public_api.js +0 -17
- package/dist/lib/public_api.js.map +0 -1
- package/dist/lib/utils/utils.js +0 -25
- package/dist/lib/utils/utils.js.map +0 -1
- package/dist/lib/validators/datetime_validator.js +0 -46
- package/dist/lib/validators/datetime_validator.js.map +0 -1
- package/dist/lib/validators/required_validator.js +0 -37
- package/dist/lib/validators/required_validator.js.map +0 -1
- package/dist/lib/validators/type_validator.js +0 -47
- package/dist/lib/validators/type_validator.js.map +0 -1
- package/dist/lib/validators/validator.js +0 -7
- package/dist/lib/validators/validator.js.map +0 -1
- package/dist/lib/views/easy_data_view_dispatcher.js +0 -114
- package/dist/lib/views/easy_data_view_dispatcher.js.map +0 -1
- package/dist/lib/views/entity_data_view.js +0 -225
- package/dist/lib/views/entity_data_view.js.map +0 -1
- package/dist/lib/views/options.js +0 -2
- package/dist/lib/views/options.js.map +0 -1
- package/dist/lib/views/root_data_view.js +0 -49
- package/dist/lib/views/root_data_view.js.map +0 -1
- package/dist/lib/widgets/progress_bar.js +0 -16
- package/dist/lib/widgets/progress_bar.js.map +0 -1
- package/dist/lib/widgets/text_filter_widget.js +0 -214
- package/dist/lib/widgets/text_filter_widget.js.map +0 -1
- package/styles-easydata.js +0 -4
- package/tsconfig.json +0 -23
- package/webpack.config.js +0 -137
- /package/dist/{lib → types}/filter/data_filter.d.ts +0 -0
- /package/dist/{lib → types}/filter/text_data_filter.d.ts +0 -0
- /package/dist/{lib → types}/form/entity_edit_form.d.ts +0 -0
- /package/dist/{lib → types}/form/entity_form_builder.d.ts +0 -0
- /package/dist/{lib → types}/i18n/text_resources.d.ts +0 -0
- /package/dist/{lib → types}/main/data_context.d.ts +0 -0
- /package/dist/{lib → types}/main/easy_data_server_loader.d.ts +0 -0
- /package/dist/{lib → types}/public_api.d.ts +0 -0
- /package/dist/{lib → types}/utils/utils.d.ts +0 -0
- /package/dist/{lib → types}/validators/datetime_validator.d.ts +0 -0
- /package/dist/{lib → types}/validators/required_validator.d.ts +0 -0
- /package/dist/{lib → types}/validators/type_validator.d.ts +0 -0
- /package/dist/{lib → types}/validators/validator.d.ts +0 -0
- /package/dist/{lib → types}/views/easy_data_view_dispatcher.d.ts +0 -0
- /package/dist/{lib → types}/views/entity_data_view.d.ts +0 -0
- /package/dist/{lib → types}/views/options.d.ts +0 -0
- /package/dist/{lib → types}/views/root_data_view.d.ts +0 -0
- /package/dist/{lib → types}/widgets/progress_bar.d.ts +0 -0
- /package/dist/{lib → types}/widgets/text_filter_widget.d.ts +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see easydata.crud.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("easydataCRUD",[],e):"object"==typeof exports?exports.easydataCRUD=e():t.easydataCRUD=e()}(self,(()=>(()=>{"use strict";var __webpack_modules__={270:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var browserUtils;__webpack_require__.d(__webpack_exports__,{z:()=>browserUtils}),function(browserUtils){var _isFirefox=null,_isIE=null;function IsIE(){if(null===_isIE){var t=navigator.userAgent;_isIE=t.indexOf("MSIE ")>-1||t.indexOf("Trident/")>-1}return _isIE}function IsEdge(){return!IsIE()&&eval("!!window.StyleMedia")}function IsFirefox(){if(null===_isFirefox){var t=navigator.userAgent;_isFirefox=t.toLowerCase().indexOf("firefox")>-1}return _isFirefox}browserUtils.IsIE=IsIE,browserUtils.IsEdge=IsEdge,browserUtils.IsFirefox=IsFirefox;var _detectedIsMobileMode=!1,_isMobileMode=void 0,detectIsMobileMode=function(){var t=isMobileMode();_detectedIsMobileMode=window.matchMedia("only screen and (max-width: 840px)").matches||window.matchMedia("only screen and (max-height: 420px)").matches;var e=isMobileMode();e!==t&&mobileModeChangeHandler&&mobileModeChangeHandler(e)},mobileModeChangeHandler;function isMobileMode(){return void 0!==_isMobileMode?_isMobileMode:_detectedIsMobileMode}function setIsMobileMode(t){var e=isMobileMode();_isMobileMode=t;var n=isMobileMode();n!==e&&mobileModeChangeHandler&&mobileModeChangeHandler(n)}function onMobileModeChanged(t){mobileModeChangeHandler=t}function getMobileCssClass(){return isMobileMode()?"k-mobile":null}detectIsMobileMode(),window.addEventListener("resize",(function(){return detectIsMobileMode()})),browserUtils.isMobileMode=isMobileMode,browserUtils.setIsMobileMode=setIsMobileMode,browserUtils.onMobileModeChanged=onMobileModeChanged,browserUtils.getMobileCssClass=getMobileCssClass}(browserUtils||(browserUtils={}))}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{var t,e;__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DataContext:()=>Vt,EasyDataServerLoader:()=>Bt,EasyDataViewDispatcher:()=>Yt,EntityDataView:()=>Ut,EntityEditForm:()=>Ot,EntityEditFormBuilder:()=>Nt,ProgressBar:()=>Ft,RequiredValidator:()=>qt,RootDataView:()=>Wt,TextDataFilter:()=>O,TextFilterWidget:()=>_t,TypeValidator:()=>Gt,Validator:()=>Pt}),function(t){t[t.Unknown=0]="Unknown",t[t.String=1]="String",t[t.Byte=2]="Byte",t[t.Word=3]="Word",t[t.Int32=4]="Int32",t[t.Int64=5]="Int64",t[t.Bool=6]="Bool",t[t.Float=7]="Float",t[t.Currency=8]="Currency",t[t.BCD=9]="BCD",t[t.Date=10]="Date",t[t.Time=11]="Time",t[t.DateTime=12]="DateTime",t[t.Autoinc=13]="Autoinc",t[t.Memo=14]="Memo",t[t.Blob=15]="Blob",t[t.FixedChar=16]="FixedChar",t[t.Guid=17]="Guid",t[t.Geometry=18]="Geometry",t[t.Geography=19]="Geography"}(t||(t={})),function(t){t[t.Data=0]="Data",t[t.Virtual=1]="Virtual",t[t.Lookup=2]="Lookup"}(e||(e={}));var n,i="Unknown",o="EDIT",r="DATETIME",a="LIST",s="FILE";!function(t){t.Trace="TRACE",t.Options="OPTIONS",t.Get="GET",t.Put="PUT",t.Post="POST",t.Delete="DELETE"}(n||(n={}));var l,c,u=function(){function t(t,e){this.xhr=t,this.method=e.method,this.url=e.url,this.headers=e.headers,this.queryParams=e.queryParams,this.data=e.data}return t.prototype.setHeader=function(t,e){this.headers[t]=e},t.prototype.setQueryParam=function(t,e){this.queryParams[t]=e},t.prototype.getXMLHttpRequest=function(){return this.xhr},t.prototype.getResponseHeaders=function(){if(this.xhr.readyState==this.xhr.HEADERS_RECEIVED){for(var t={},e=0,n=this.xhr.getAllResponseHeaders().trim().split(/[\r\n]+/);e<n.length;e++){var i=n[e].split(": "),o=i.shift(),r=i.join(": ");t[o]=r}return t}return{}},t.prototype.open=function(){var t=this;if(this.xhr.readyState===this.xhr.UNSENT){var e=this.url;for(var n in this.queryParams&&Object.keys(this.queryParams).length>0&&(e+=encodeURI("?"+Object.keys(this.queryParams).map((function(e){return e+"="+t.queryParams[e]})).join("&"))),this.xhr.open(this.method,e,!0),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.headers)this.xhr.setRequestHeader(n,this.headers[n])}},t.prototype.abort=function(){this.xhr.abort()},t}();!function(e){var n,i={shortDateFormat:"MM/dd/yyyy",longDateFormat:"dd MMM, yyyy",editDateFormat:"MM/dd/yyyy",shortTimeFormat:"HH:mm",editTimeFormat:"HH:mm",longTimeFormat:"HH:mm:ss",shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortWeekDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longWeekDayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalSeparator:".",currency:"USD"},o={localeId:"en-US",englishName:"English",displayName:"English",texts:{ButtonOK:"OK",ButtonCancel:"Cancel",Yes:"Yes",No:"No",True:"True",False:"False"},settings:i},r={"en-US":o},a=[];function s(t){for(var e=0,n=a;e<n.length;e++){(0,n[e])(t)}}function l(){return n.localeId}function u(t){var e=r[t];e?c.assignDeep(n,e):(n.englishName=t,n.displayName=t,n.texts=c.assignDeep({},o.texts)),n.localeId=t}function d(){return n.settings}function h(t){n.settings||(n.settings=c.assignDeep({},i)),n.settings=c.assignDeep(n.settings,t)}function p(t,e){s(e);var i=n;t&&(e.localeId||(e.localeId=t),(i=r[t])||(i=c.assignDeep({},o),r[t]=i)),c.assignDeep(i,e)}function f(){var t,e,i,o,r,a,s="object"==typeof navigator?navigator.language:void 0;t=s,e=new Date(2020,5,7,19,34,56,88),i=e.toLocaleDateString(t,{year:"numeric",month:"numeric",day:"numeric"}),o=e.toLocaleTimeString(t,{hour:"numeric",minute:"numeric",second:"numeric"}),r=i.replace("07","dd").replace("7","d").replace("06","MM").replace("6","M").replace("2020","yyyy").replace("20","yy"),a=o.replace("19","HH").replace("07","hh").replace("7","h").replace("34","mm").replace("56","ss").replace("PM","tt"),n.settings||(n.settings={}),h({shortDateFormat:r,shortTimeFormat:a})}function g(e){var n,i=d();switch(e){case t.Date:n=i.shortDateFormat;break;case t.Time:n=i.shortTimeFormat;break;default:n=i.shortDateFormat+" "+i.shortTimeFormat}return n}function m(e){var n,i=d();switch(e){case t.Date:n=i.longDateFormat;break;case t.Time:n=i.longTimeFormat;break;default:n=i.longDateFormat+" "+i.longTimeFormat}return n}e.addMapper=function(t){a.push(t)},e.getLocales=function(){var t=[];for(var e in r)t.push({locale:e,englishName:r[e].englishName,displayName:r[e].displayName});return t.sort((function(t,e){return t.englishName>e.englishName?1:t.englishName===e.englishName?0:-1}))},e.getCurrentLocale=l,e.setLocale=function(t){console.warn("This method is deprecated. Use setCurrentLocale instead"),u(t)},e.setCurrentLocale=u,e.getText=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=n.texts,o="";if(t&&t.length)for(var r=t.length,a=0;a<r&&"object"==typeof(o=i[t[a]]);a++)i=o;return o},e.getLocaleSettings=d,e.getOneLocaleSetting=function(t){return n.settings[t]},e.getShortMonthName=function(t){var e=d();if(t>0&&t<13)return e.shortMonthNames[t-1];throw"Wrong month number: "+t},e.getLongMonthName=function(t){var e=d();if(t>0&&t<13)return e.longMonthNames[t-1];throw"Wrong month number: "+t},e.getShortWeekDayName=function(t){var e=d();if(t>0&&t<8)return e.shortWeekDayNames.length>=t?e.shortWeekDayNames[t-1]:t.toString();throw"Wrong month number: "+t},e.getLongWeekDayName=function(t){var e=d();if(t>0&&t<8)return e.longWeekDayNames.length>=t?e.longWeekDayNames[t-1]:t.toString();throw"Wrong month number: "+t},e.updateLocaleSettings=h,e.updateLocaleTexts=function(t){"object"==typeof t?(s({localeId:n.localeId,texts:t}),c.assignDeep(n.texts,t)):console.error("Wrong parameter type in updateLocaleTexts function call.The first parameter (localeId) is not necessary. Use updateLocaleTexts(texts) instead")},e.updateDefaultTexts=function(t){for(var e in r){var i=r[e];i.texts=c.assignDeep({},t,i.texts)}n.texts=c.assignDeep({},t,n.texts)},e.updateLocaleInfo=p,e.addLocale=function(t,e){p(t,e)},e.resetLocales=function(){n||(n=c.assignDeep({},o),f())},e.dateTimeToStr=function(e,n,i){return i?"d"==i?i=g(t.Date):"D"==i?i=m(t.Date):"f"==i?i=g(t.DateTime):"F"==i&&(i=m(t.DateTime)):i=g(n),c.dateTimeToStr(e,i)},e.numberToStr=function(t,n){if(n&&n.length>0){var i=n.charAt(0).toUpperCase();if("S"===i)return function(t,n){if(!y[n]){var i=n.split("|").filter((function(t){return t.length>0})).map((function(t){return t.split("=")}));if(y[n]={},i.length>0)if(i[0].length>1)for(var o=0,r=i;o<r.length;o++){var a=r[o];y[n][Number.parseInt(a[1])]=a[0]}else i.forEach((function(t,e){y[n][e]=t[0]}))}var s=y[n];if(void 0!==s[t]){a=s[t];return e.getText(a)||a}return t.toString()}(t,n.slice(1));if(["D","F","C"].indexOf(i)>=0){var o=l();return t.toLocaleString(o,function(t){var e=d(),n=t[0].toUpperCase(),i=t.length>1?Number.parseInt(t.slice(1)):"D"==n?1:2;switch(n){case"D":return{style:"decimal",useGrouping:!1,minimumIntegerDigits:i};case"C":return{style:"currency",currency:e.currency,minimumFractionDigits:i};default:return{style:"decimal",minimumFractionDigits:i,maximumFractionDigits:i}}}(n))}return function(t,e){for(var n=t.toString(),i="",o=n.length-1,r=e.length-1;r>=0;r--){var a=e.charAt(r);"#"===a||"0"===a?o>=0?(i+=n.charAt(o),o--):"0"===a&&(i+=0):i+=a}return i.split("").reverse().join("")}(Math.trunc(t),n)}var r=d();return c.numberToStr(t,r.decimalSeparator)},e.booleanToStr=function(t,n){if(n&&n.length>0&&"S"===n.charAt(0).toUpperCase()){var i=n.slice(1).split("|");if(i.length>1){var o=i[t?1:0];return e.getText(o)||o}}return"".concat(t)};var y={}}(l||(l={})),function(e){e.getAllDataTypes=function(){return Object.values(t).filter((function(t){return"number"==typeof t}))},e.getDateDataTypes=function(){return[t.Time,t.Date,t.DateTime]},e.getStringDataTypes=function(){return[t.String,t.Memo,t.FixedChar]};var n=[t.Byte,t.Word,t.Int32,t.Int64,t.Float,t.Currency,t.Autoinc];e.getNumericDataTypes=function(){return n};var i=[t.Byte,t.Word,t.Int32,t.Int64,t.Autoinc];function o(t,e,n){e||(e={});for(var i=0,a=n;i<a.length;i++){var s=a[i];if(s)for(var l in s)if(s.hasOwnProperty(l)){var c=s[l];null!==c&&"object"==typeof c?t.has(c)?e[l]=t.get(c):Array.isArray(c)?(e[l]=r(c),t.set(c,e[l])):(void 0!==e[l]&&null!=e[l]||(e[l]=Object.create(Object.getPrototypeOf(c))),t.set(c,e[l]),o(t,e[l],[c])):e[l]=c}}return e}function r(t){for(var e=[],n=0,i=t;n<i.length;n++){var o=i[n];e.push(o)}return e}e.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=0;i<e.length;i++){var o=e[i];if(o)for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])}return t},e.assignDeep=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return o(new WeakMap,t,e)},e.getIfDefined=function(t,e){return void 0!==t?t:e},e.IsDefinedAndNotNull=function(t){return null!=t},e.copyArrayTo=function(t,e){for(var n=t.length,i=e.length,o=0;o<n&&o<i;o++)e[o]=t[o]},e.createArrayFrom=r,e.findItemById=function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].id===e)return t[i];return null},e.findItemIndexById=function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].id===e)return i;return-1},e.indexOfArrayItem=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=t.length,i=0;i<n;i++)if(e==t[i])return i;return-1},e.moveArrayItem=function(t,e,n){if(e>=t.length)throw"Index out of bounds: "+e;n>=t.length&&(n=t.length-1);var i=t.splice(e,1)[0];t.splice(n,0,i)},e.removeArrayItem=function(t,e){var n=t.indexOf(e);if(-1!=n)return t.splice(n,1)[0]},e.insertArrayItem=function(t,e,n){t.splice(e,0,n)},e.fillArray=function(t,e,n,i){void 0===n&&(n=0);for(var o=t.length>>>0,r=n>>0,a=r<0?Math.max(o+r,0):Math.min(r,o),s=void 0===i?o:i>>0,l=s<0?Math.max(o+s,0):Math.min(s,o);a<l;)t[a]=e,a++;return t},e.shiftToFitWindow=function(t,e){var n=document.getElementsByTagName("body")[0],i=window.innerWidth||document.documentElement.clientWidth||n.clientWidth,o=t+e,r=0;return o>i&&t+(r=i-o-10)<0&&(r=10-t),r},e.isObject=function(t){return null!==t&&("function"==typeof t||"object"==typeof t)},e.isNumericType=function(t){return n.indexOf(t)>=0},e.isIntType=function(t){return i.indexOf(t)>=0},e.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},e.areCompatibleDataTypes=function(e,n){return void 0===e||void 0===n||e==t.Unknown||n==t.Unknown||e==n||e==t.Date&&n==t.DateTime||e==t.DateTime&&n==t.Date},e.isPropSet=function(t,e){return t[e]||t[e.toLowerCase()]||t[e.toUpperCase()]};var a="0123456789abcdefghijklmnopqrstuvwxyz";function s(t,e){var n=t.length;if(n>e){var i=n/e,o="";o+=t[0];for(var r=i,a=void 0,s=1;s<n;s++)a=t[s],s+1>r&&(o+=a,r+=i);return o}return t}function c(t,e){return Math.floor(Math.random()*(e-t))+t}function u(t){var e=parseInt(t);if(isNaN(e))throw'"'.concat(t,'" is not a valid number');return e}e.generateId=function(t){t||(t="easy");var e=t.length>4?function(t,e){var n=t.split("-"),i=1,o=e;n.length<e&&(i=e/n.length,o=n.length);for(var r="",a=0;a<o;a++)r+=s(n[a],i);return r}(t,4):t;e&&e.length>0&&(e+="-");var n=a[c(0,a.length)]+a[c(0,a.length)]+a[c(0,a.length)],i=c(0,1e4);return e+n+function(t,e){void 0===e&&(e=36);var n="",i=t;do{n=a[i%e]+n,i=Math.floor(i/=e)}while(i>0);return n}(621355968e9+1e4*(new Date).getTime()-0x8d60e562e627800-i)},e.strToDateTime=function(t,e){if(!t||0==t.length)return new Date;var n=t.replace(/[^a-zA-Z0-9_]/g,"-"),i=e.replace(/[^a-zA-Z0-9_]/g,"-").split("-"),o=n.split("-"),r=i.indexOf("MM"),a=i.indexOf("dd"),s=i.indexOf("yyyy"),l=i.indexOf("HH"),c=i.indexOf("mm"),d=i.indexOf("ss"),h=new Date;try{var p=s>-1&&s<o.length?u(o[s]):h.getFullYear(),f=r>-1&&r<o.length?u(o[r])-1:h.getMonth()-1;if(f>11)throw"";var g=a>-1&&a<o.length?u(o[a]):h.getDate();if(g>function(t,e){return new Date(e,t+1,0).getDate()}(f,p))throw"";var m=l>-1&&l<o.length?u(o[l]):0;if(m>23)throw"";var y=c>-1&&c<o.length?u(o[c]):0;if(y>59)throw"";var v=d>-1&&d<o.length?u(o[d]):0;if(v>59)throw"";return new Date(p,f,g,m,y,v)}catch(e){throw"".concat(t," is not a valid date.")}},e.strToTime=function(t){var e=t.split(":");try{var n=e.length>0?u(e[0]):0;if(n>23)throw"";var i=e.length>1?u(e[1]):0;if(i>59)throw"";var o=e.length>1?u(e[1]):0;if(o>59)throw"";return new Date(0,0,0,n,i,o)}catch(e){throw"".concat(t," is not a valid time.")}};var d=/\[([^\]]+)]|y{2,4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;e.dateTimeToStr=function(t,e){var n=t.getFullYear().toString(),i=t.getMonth()+1,o=t.getDate(),r=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),c=r%12||12,u=r>11,h={yyyy:n,yy:n.substring(n.length-2),MMMM:l.getLongMonthName(i),MMM:l.getShortMonthName(i),MM:i<10?"0"+i:i.toString(),M:i.toString(),dd:o<10?"0"+o:o.toString(),d:o.toString(),HH:r<10?"0"+r:r.toString(),H:r.toString(),hh:c<10?"0"+c:c.toString(),h:c.toString(),tt:u?"PM":"AM",mm:a<10?"0"+a:a.toString(),ss:s<10?"0"+s:s.toString()};return e.replace(d,(function(t,e){return e||h[t]}))},e.numberToStr=function(t,e){return e=e||l.getLocaleSettings().decimalSeparator,t.toString().replace(".",e)}}(c||(c={}));var d,h,p=function(){function t(t,e){this.request=t,this.promise=e}return t.prototype.getPromise=function(){return this.promise},t.prototype.getRequest=function(){return this.request},t.prototype.then=function(t,e){return this.promise.then(t,e)},t.prototype.catch=function(t){return this.promise.catch(t)},t.prototype.finally=function(t){return this.promise.finally(t)},t}(),f=(d=function(t,e){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},d(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),g=function(){return g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},g.apply(this,arguments)},m=function(t){function e(e,n){var i=t.call(this,n)||this;return i.status=e,i}return f(e,t),e}(Error),y=function(){function t(){this.defaultHeaders={},this.customPayload=void 0}return Object.defineProperty(t.prototype,"responseBody",{get:function(){return this._responseBody},enumerable:!1,configurable:!0}),t.prototype.get=function(t,e){return this.send(n.Get,t,null,e)},t.prototype.post=function(t,e,i){return this.send(n.Post,t,e,i)},t.prototype.put=function(t,e,i){return this.send(n.Put,t,e,i)},t.prototype.delete=function(t,e,i){return this.send(n.Delete,t,e,i)},t.prototype.send=function(e,n,i,o){var r=this,a=(o=o||{}).dataType||"json",s=o.contentType||"form-data"!==a?"application/json":null;i&&"form-data"!=a&&this.customPayload&&(i.data=c.assignDeep(i.data||{},this.customPayload));var l=new("onload"in new XMLHttpRequest?XMLHttpRequest:window.XDomainRequest),d={method:e,url:n,headers:g(g({},this.defaultHeaders),o.headers||{}),queryParams:o.queryParams||{},data:i};s&&(d.headers["Content-Type"]=s);var h=new u(l,d);this.beforeEachRequest&&(console.warn("HttpClient: 'beforeEachRequest' is deprecated and will be removed in future updates.\n Use 'onRequest' instead"),this.beforeEachRequest(h)),this.onRequest&&this.onRequest(h);var f=h.data&&"string"!=typeof h.data&&"json"==a?JSON.stringify(h.data):h.data;return h.open(),new p(h,new Promise((function(e,i){o.responseType&&(l.responseType=o.responseType),l.onerror=function(t){i(new m(l.status,l.responseText))},l.onreadystatechange=function(){if(4==l.readyState){var o=l.getResponseHeader("Content-Type")||"",a=l.status;if(0===a)i(new m(a,"Network error or the request was aborted"));else if(a>=200&&a<400){var s="arraybuffer"===l.responseType||"blob"===l.responseType?l.response:0==o.indexOf("application/json")?JSON.parse(l.responseText):l.responseText;r._responseBody=s,r.onResponse&&r.onResponse(l),e(s)}else{("arraybuffer"===l.responseType||"blob"===l.responseType?t.decodeArrayBuffer(l.response):Promise.resolve(l.responseText)).then((function(t){var e=0==o.indexOf("application/json")?JSON.parse(t):t;r._responseBody=e;var s=e.message||(404==a?"No such endpoint: ".concat(n):e);i(new m(a,s))}))}}},l.send(f)})))},t.decodeArrayBuffer=function(t){var e=new FileReader;return new Promise((function(n){e.onloadend=function(){e.readyState==FileReader.DONE&&n(e.result)},e.readAsText(new Blob([t]))}))},t}(),v=function(){function t(t){this.isEditable=!0,this.name="",this.caption="",this.description="",this.parent=t,this.attributes=new Array,this.subEntities=new Array}return t.prototype.loadFromData=function(t,e){if(e){if(this.id=e.id,this.name=e.name,this.captionPlural=e.namePlur,this.caption=e.name,this.description=e.desc,void 0!==e.ied&&(this.isEditable=e.ied),this.subEntities=new Array,e.ents)for(var n=0;n<e.ents.length;n++){var i=t.createEntity(this);i.loadFromData(t,e.ents[n]),this.subEntities.push(i)}if(this.attributes=new Array,e.attrs)for(n=0;n<e.attrs.length;n++){var o=t.createEntityAttr(this);o.loadFromData(t,e.attrs[n]),this.attributes.push(o)}}},t.prototype.scan=function(t,e){var n={stop:!1},i=function(o){if(e&&e(o,n),o.attributes)for(var r=o.attributes.length,a=0;a<r&&!n.stop;a++){var s=o.attributes[a];if(t&&t(s,n),n.stop)return}if(o.subEntities){var l=o.subEntities.length;for(a=0;a<l&&!n.stop;a++)i(o.subEntities[a])}};i(this)},t.prototype.getFirstPrimaryAttr=function(){return this.getPrimaryAttrs()[0]},t.prototype.getPrimaryAttrs=function(){return this.attributes.filter((function(t){return t.isPrimaryKey}))},t}(),b=function(){function n(n){this.id="",this.caption="{Unrecognized attribute}",this.dataType=t.String,this.size=0,this.isPrimaryKey=!1,this.isForeignKey=!1,this.isNullable=!0,this.showOnView=!0,this.isEditable=!0,this.showOnCreate=!0,this.showOnEdit=!0,this.showInLookup=!1,this.lookupAttr="",this.expr="",this.entity=n,this.kind=e.Data}return n.prototype.loadFromData=function(t,e){if(e){this.id=e.id,this.description=e.desc,this.caption=e.cptn,this.dataType=e.dtype,this.isPrimaryKey=e.ipk,this.isForeignKey=e.ifk,this.size=e.size,this.lookupAttr=e.lattr,this.lookupEntity=e.lent,this.dataAttr=e.dattr,this.lookupDataAttr=e.ldattr;var n=c.getDateDataTypes().indexOf(this.dataType);this.defaultValue=e.defVal&&n?new Date(e.defVal):e.defVal,this.isNullable=c.getIfDefined(e.nul,this.isNullable),this.isEditable=c.getIfDefined(e.ied,this.isEditable),this.showOnView=c.getIfDefined(e.ivis||e.sov,this.showOnView),this.showOnCreate=c.getIfDefined(e.soc,this.showOnCreate),this.showOnEdit=c.getIfDefined(e.soe,this.showOnEdit),this.showInLookup=c.getIfDefined(e.sil,this.showInLookup),this.kind=e.kind,this.displayFormat=e.dfmt,e.udata&&(this.userData=e.udata),e.edtr&&(this.defaultEditor=t.getEditorById(e.edtr)||t.createValueEditor())}},n}(),w=function(){function e(){this.id="",this.tag=i,this.resType=t.Unknown,this.defValue=""}return e.prototype.loadFromData=function(t){t&&(this.id=t.id,this.tag=t.tag,this.defValue=t.defval,this.resType=t.rtype,this.accept=t.accept,this.multiline=t.multiline,t.subType&&(this.resType=t.subType),t.name&&(this.name=t.name),t.values&&(this.values=t.values))},e.prototype.getValueText=function(t){var e="";if(!this.values)return e;if(Array.isArray(t))for(var n=0,i=this.values;n<i.length;n++){var o=i[n];t.indexOf(o.id)>=0&&(e+=o.text+",")}else for(var r=0,a=this.values;r<a.length;r++){(o=a[r]).id===t&&(e+=o.text+",")}return e&&(e=e.substring(0,e.length-1)),e},e}(),C=function(){function e(){this.mainEntity=null,this.id="__none",this.name="Empty model",this.rootEntity=this.createEntity(),this.displayFormats=new Map}return e.prototype.getMainEntity=function(){return this.mainEntity},e.prototype.createEntity=function(t){return new v(t)},e.prototype.createEntityAttr=function(t){return new b(t)},e.prototype.createValueEditor=function(){return new w},e.prototype.loadFromJSON=function(t){var e=JSON.parse(t);this.loadFromData(e)},e.prototype.loadFromData=function(e){if(this.id=e.id,this.name=e.name,this.version=e.vers,this.editors=new Array,e.editors)for(var n=0;n<e.editors.length;n++){var i=this.createValueEditor();i.loadFromData(e.editors[n]),this.editors.push(i)}if(this.rootEntity.loadFromData(this,e.entroot),this.displayFormats=new Map,e.displayFormats)for(var o in e.displayFormats){var r=t[o],a=e.displayFormats[o]||new Array;this.displayFormats.set(r,a)}},e.prototype.getDisplayFormats=function(){return this.displayFormats},e.prototype.getDisplayFormatsForType=function(t){return this.displayFormats.has(t)?this.displayFormats.get(t):[]},e.prototype.getDefaultFormat=function(t){return this.displayFormats.has(t)?this.displayFormats.get(t).filter((function(t){return t.isdef}))[0]:null},e.prototype.setData=function(t){"string"==typeof t?this.loadFromJSON(t):this.loadFromData(t)},e.prototype.isEmpty=function(){return 0===this.rootEntity.subEntities.length&&0===this.rootEntity.attributes.length},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.getRootEntity=function(){return this.rootEntity},e.prototype.getEditorById=function(t){for(var e=0,n=this.editors;e<n.length;e++){var i=n[e];if(i.id===t)return i}return null},e.prototype.getAttributeById=function(t){var e=this.getEntityAttrById(this.getRootEntity(),t);return e||null},e.prototype.checkAttrProperty=function(t,e){var n=this.getAttributeById(t);if(n){if(void 0===n[e])throw"No such property: "+e;return!!n[e]||!!n.lookupAttr&&(t=n.lookupAttr,(n=this.getAttributeById(t))&&n[e])}return!1},e.prototype.getEntityAttrById=function(t,e){var n,i;if(t.attributes){var o=t.attributes.length;for(n=0;n<o;n++)if(t.attributes[n].id==e)return t.attributes[n]}if(t.subEntities){var r=t.subEntities.length;for(n=0;n<r;n++)if(i=this.getEntityAttrById(t.subEntities[n],e))return i}return null},e.prototype.listByEntityWithFilter=function(t,e){var n,i=new Array,o=null;if(t.subEntities)for(var r=t.subEntities.length,a=0;a<r;a++){if(o=t.subEntities[a],!e||e(o,null))(n=l.getText("Entities",o.name))||(n=o.caption),(h=c.assign(this.createEntity(),{id:o.name,text:n,items:[],isEntity:!0})).items=this.listByEntityWithFilter(o,e),h.items.length>0&&i.push(h)}var s=null;if(t.attributes)for(var u=t.attributes.length,d=0;d<u;d++)if(s=t.attributes[d],!e||e(t,s)){(n=l.getText("Attributes",s.id))||(n=s.caption);var h=c.assign(this.createEntity(),{id:s.id,text:n,dataType:s.dataType});i.push(h)}return i},e.prototype.listByEntity=function(t,e,n){e=e||{};var i,o=[],r=[],a=null;if(t.subEntities)for(var s=t.subEntities.length,u=0;u<s;u++)if(a=t.subEntities[u],!n||n(a,null)){i=l.getText("Entities",a.name)||a.caption;var d=c.assign(this.createEntity(),{id:a.name,text:i,items:[],isEntity:!0,description:a.description}),h=c.assign({},e);h.includeRootData=!1,d.items=this.listByEntity(a,h,n),d.items.length>0&&o.push(d)}var p=null;if(t.attributes)for(var f=t.attributes.length,g=0;g<f;g++)p=t.attributes[g],n&&!n(t,p)||(i=l.getText("Attributes",p.id)||p.caption,r.push(c.assign(this.createEntityAttr(t),{id:p.id,text:i,dataType:p.dataType,lookupAttr:p.lookupAttr,description:p.description})));var m,y=function(t,e){return t.text.toLowerCase()==e.text.toLowerCase()?0:t.text.toLowerCase()>e.text.toLowerCase()?1:-1};return e.sortEntities&&(o.sort(y),r.sort(y)),m=e.attrPlacement&&0!=e.attrPlacement?r.concat(o):o.concat(r),2==e.attrPlacement&&m.sort(y),e.includeRootData?((i=l.getText("Entities",t.name))||(i=t.caption),{id:t.name,text:i,items:m}):m},e.prototype.clear=function(){this.rootEntity=this.createEntity(),this.editors=[],this.version=""},e.prototype.addDefaultValueEditors=function(){this.addOrUpdateValueEditor("_DTE",o,t.String).defValue="",this.addOrUpdateValueEditor("_DPDE",r,t.DateTime),this.addOrUpdateValueEditor("_DPTE",r,t.DateTime)},e.prototype.addOrUpdateValueEditor=function(t,e,n){var i=c.findItemById(this.editors,t);return i||((i=this.createValueEditor()).id=t,this.editors.push(i)),i.tag=e,i.resType=n,i},e.prototype.getEntitiesTree=function(t,e){return this.listByEntity(this.getRootEntity(),t,e)},e.prototype.getEntitiesTreeWithFilter=function(t){return this.listByEntityWithFilter(this.getRootEntity(),t)},e.prototype.getFullEntityPathByAttr=function(t,e){return e=e||" ",this.getEntityPathByAttr(this.getRootEntity(),t,e,!0)},e.prototype.getEntityPathByAttr=function(t,e,n,i){if(!t)return"";n=n||" ";var o="";if(t.caption&&!i){var r=l.getText("Entities",t.caption);o=r||t.caption}if(t.attributes)for(var a=t.attributes.length,s=0;s<a;s++)if(t.attributes[s].id==e)return o;if(t.subEntities){var c=t.subEntities.length;for(s=0;s<c;s++){var u=t.subEntities[s],d=this.getEntityPathByAttr(u,e,n,!1);if(""!==d)return""!==o&&(d=o+n+d),d}}return""},e.prototype.getAttributeText=function(t,e){var n=l.getText("Attributes",t.id);if(n||(n=t.caption),!e)return n;var i=this.getFullEntityPathByAttr(t.id," ");return(i?e.replace(new RegExp("{attr}","g"),n).replace(new RegExp("{entity}","g"),i):n).trim()},e.prototype.runThroughEntities=function(t,e){this.getRootEntity().scan(t,e)},e.prototype.getFirstAttributeByFilter=function(t){var e=null;return this.runThroughEntities((function(n,i){t(n)&&(i.stop=!0,e=n)}),null),e},e}(),D=function(){return D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},D.apply(this,arguments)};!function(){function t(t){this.colStore=t,this.aggregates=[],this.groups=[],this.useGrandTotals=!1,this.useRecordCount=!1,this._caseSensitiveGroups=!1,this.COUNT_FIELD_NAME="GRPRECCNT"}Object.defineProperty(t.prototype,"caseSensitiveGroups",{get:function(){return this._caseSensitiveGroups},set:function(t){this._caseSensitiveGroups=t,this.updateCompareProc()},enumerable:!1,configurable:!0}),t.prototype.updateCompareProc=function(){this.compareValues=this._caseSensitiveGroups?this.strictCompare:this.caseInsensitiveCompare},t.prototype.addGroup=function(t){var e=t.columns||this.colStore.getColumnIds(t.from,t.to);if(!this.colStore.validateColumns(e))throw"Invalid columns: "+e;if(this.hasColumnsInUse(e))throw"Can't add same columns to different groups/aggregates";return this.groups.push(D({columns:e},t)),this},t.prototype.addAggregateColumn=function(t,e){var n="string"==typeof t?t:this.colStore.getColumnIds(t,t)[0];if(this.hasColumnsInUse([n])||!this.colStore.validateAggregate(n,e))throw"Invalid aggregation function for the column: "+n;return this.aggregates.push({colId:n,funcId:e}),this},t.prototype.addGrandTotals=function(){return this.useGrandTotals=!0,this},t.prototype.addCounts=function(){return this.useRecordCount=!0,this},t.prototype.getGroups=function(){var t=this,e=[];return this.groups.map((function(n){return e=e.concat(n.columns),D(D({},n),{columns:Array.from(e),aggregates:Array.from(t.aggregates)})}))},t.prototype.getInternalGroups=function(){return this.groups},t.prototype.lastGroup=function(){var t=this.getGroups();return t[t.length-1]},t.prototype.getAggregates=function(){return this.aggregates},t.prototype.hasAggregates=function(){return this.aggregates.length>0},t.prototype.hasGroups=function(){return this.groups.length>0},t.prototype.hasGrandTotals=function(){return this.useGrandTotals},t.prototype.hasRecordCount=function(){return this.useRecordCount},t.prototype.isEmpty=function(){return!(this.hasAggregates()||this.hasGroups()||this.hasAggregates()||this.hasRecordCount())},t.prototype.drop=function(){console.warn('"drop()" method is obsolete. Use "clear()" instead'),this.clear()},t.prototype.clear=function(){return this.groups=[],this.aggregates=[],this.useGrandTotals=!1,this.useRecordCount=!1,this.caseSensitiveGroups=!1,this},t.prototype.hasColumnsInUse=function(t){for(var e=0,n=this.groups;e<n.length;e++){if(n[e].columns.filter((function(e){return t.indexOf(e)>=0})).length>0)return!0}for(var i=0,o=this.aggregates;i<o.length;i++){var r=o[i];if(t.indexOf(r.colId)>=0)return!0}return!1},t.prototype.needAggrCalculation=function(){return(this.hasAggregates()||this.hasRecordCount())&&(this.hasGrandTotals()||this.hasGroups())},t.prototype.saveToData=function(){return{groups:Array.from(this.groups),ugt:this.useGrandTotals,urc:this.useRecordCount,csg:this.caseSensitiveGroups,aggregates:Array.from(this.aggregates)}},t.prototype.loadFromData=function(t){t&&(void 0!==t.ugt&&(this.useGrandTotals=t.ugt),void 0!==t.urc&&(this.useRecordCount=t.urc),void 0!==t.csg&&(this.caseSensitiveGroups=t.csg),t.groups&&(this.groups=Array.from(t.groups)),t.aggregates&&(this.aggregates=Array.from(t.aggregates)))},t.prototype.buildGroupKey=function(t,e){var n=!this.caseSensitiveGroups,i={};if(t)for(var o=0,r=t.columns;o<r.length;o++){var a=r[o],s=e.getValue(a);n&&"string"==typeof s&&(s=s.toLowerCase()),i[a]=s}return i},t.prototype.strictCompare=function(t,e){return t instanceof Date?t.getTime()===e.getTime():t===e},t.prototype.caseInsensitiveCompare=function(t,e){return t instanceof Date?t.getTime()===e.getTime():("string"==typeof t?t.toLowerCase():t)===("string"==typeof e?e.toLowerCase():e)}}();!function(t){t[t.None=0]="None",t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"}(h||(h={}));var T,x=function(e){if(!e)throw Error("Options are required");if(!e.id)throw Error("Field Id is required");if(!e.label)throw Error("Label is required");this.id=e.id,this.type=c.getIfDefined(e.type,t.String),this.label=e.label,this.originAttrId=e.originAttrId,this.isAggr=e.isAggr||!1,this.displayFormat=e.dfmt,this.groupFooterColumnTemplate=e.gfct,this.style=e.style||{},this.description=e.description,this.calculatedWidth=0},E=function(){function e(){this.items=[],this.mapper={},this._dateColumnIdx=[]}return Object.defineProperty(e.prototype,"count",{get:function(){return this.items.length},enumerable:!1,configurable:!0}),e.prototype.add=function(e){var n;n=e instanceof x?e:new x(e);var i=this.items.length;return this.items.push(n),this.mapper[n.id]=i,[t.Date,t.DateTime,t.Time].indexOf(n.type)>=0&&this._dateColumnIdx.push(i),i},e.prototype.updateDateColumnIdx=function(){this._dateColumnIdx=this.getItems().filter((function(e){return[t.Date,t.DateTime,t.Time].indexOf(e.type)>=0})).map((function(t,e){return e}))},e.prototype.put=function(t,e){t>=0&&t<this.count&&(this.items[t]=e,this.updateDateColumnIdx())},e.prototype.move=function(t,e){var n=this.items.indexOf(t);n>=0&&n!=e&&(c.moveArrayItem(this.items,n,e),this.updateDateColumnIdx())},e.prototype.get=function(t){return t>=0&&t<this.count?this.items[t]:null},e.prototype.getIndex=function(t){return this.mapper[t]},e.prototype.getItems=function(){return this.items},e.prototype.getDateColumnIndexes=function(){return this._dateColumnIdx},e.prototype.removeAt=function(t){var e=this.get(t);this.items.splice(t,1);var n=this._dateColumnIdx.indexOf(t);n>=0&&this._dateColumnIdx.splice(n,1),delete this.mapper[e.id]},e.prototype.clear=function(){this.items=[],this._dateColumnIdx=[],this.mapper={}},e}(),I=function(){function t(t,e){this.columns=t,this.values=e}return t.prototype.toArray=function(){return Array.from(this.values)},t.prototype.size=function(){return this.values.length},t.prototype.getValue=function(t){var e;if("string"==typeof t){if(void 0===(e=this.columns.getIndex(t)))throw new RangeError("No column with id '".concat(t,"'"))}else e=t;if(e>=this.values.length)throw new RangeError("Out of range: "+e);return this.values[e]},t.prototype.setValue=function(t,e){var n;if("string"==typeof t){if(void 0===(n=this.columns.getIndex(t)))throw new RangeError("No column with id '".concat(t,"'"))}else n=t;if(n>=this.values.length)throw new RangeError("Out of range: "+n);this.values[n]=e},t}(),S=function(){function e(t){if(this._chunkSize=1e3,this._elasticChunks=!1,this.cachedRows=[],this.total=0,this.loader=null,this.needTotal=!0,this.isInMemory=!1,t=t||{},this._chunkSize=t.chunkSize||this._chunkSize,this._elasticChunks=t.elasticChunks||this._elasticChunks,this.loader=t.loader,void 0!==t.inMemory&&(this.isInMemory=t.inMemory),this.isInMemory&&(this.needTotal=!1),this._columns=new E,this.onUpdate=t.onUpdate,t.columns)for(var e=0,n=t.columns;e<n.length;e++){var i=n[e];this._columns.add(i)}if(t.rows)for(var o=0,r=t.rows;o<r.length;o++){var a=r[o],s=this.createRow(a);this.addRow(s)}this.needTotal=!this._elasticChunks}return Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"chunkSize",{get:function(){return this._chunkSize},set:function(t){this._chunkSize=t,this.total=0,this.needTotal=!this.elasticChunks,this.cachedRows=[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elasticChunks",{get:function(){return this._elasticChunks},set:function(t){this._elasticChunks=t,this.total=0,this.needTotal=!this.elasticChunks,this.cachedRows=[]},enumerable:!1,configurable:!0}),e.prototype.getRows=function(t){var e=this,n=0,i=this._chunkSize;t&&("page"in t?(n=t.pageSize*(t.page-1),i=t.pageSize):(n=t.offset,i=t.limit));var o=n+i;if(!this.needTotal&&!this.elasticChunks){if(n>=this.total)return Promise.resolve([]);o>this.total&&(o=this.total)}if(this.isInMemory&&o>this.cachedRows.length&&(o=this.cachedRows.length),o<=this.cachedRows.length)return Promise.resolve(this.cachedRows.slice(n,o));if(!this.loader)throw"Loader is not defined. Can't get the rows from ".concat(n," to ").concat(o);var r=this.needTotal;this.needTotal&&(this.needTotal=!1);var a=this.cachedRows.length,s=o-a;return s<this._chunkSize&&(s=this._chunkSize),this.loader.loadChunk({offset:a,limit:s,needTotal:r}).then((function(t){(r&&(e.total=t.total),Array.prototype.push.apply(e.cachedRows,t.table.getCachedRows()),o>e.cachedRows.length&&(o=e.cachedRows.length),e.elasticChunks)&&(t.table.getCachedCount()<s&&(e.total=e.cachedRows.length));return e.fireUpdated(),e.cachedRows.slice(n,o)}))},e.prototype.getRow=function(t){return this.getRows({offset:t,limit:1}).then((function(t){return t.length>0?t[0]:null}))},e.prototype.getTotal=function(){return this.total},e.prototype.setTotal=function(t){this.total=t,this.needTotal=!1},e.prototype.getCachedCount=function(){return this.cachedRows.length},e.prototype.clear=function(){this.columns.clear(),this.cachedRows=[],this.total=0,this.needTotal=!this._elasticChunks,this.fireUpdated()},e.prototype.createRow=function(t){var e=this,n=this._columns.getDateColumnIndexes(),i=new Array(this._columns.count),o=t instanceof I?function(e){return t.getValue(e)}:function(e){return t[e]};return t&&this.columns.getItems().forEach((function(t){var r=o(t.id),a=e.columns.getIndex(t.id);i[a]=n.indexOf(a)>=0?e.mapDate(r,t.type):r})),new I(this._columns,i)},e.prototype.mapDate=function(e,n){if(e){var i=new Date(e);return isNaN(i.getTime())&&n==t.Time&&(i=c.strToTime(e)),i}return null},e.prototype.addRow=function(t){var e;if(Array.isArray(t)){var n=t,i=this._columns.getDateColumnIndexes();if(i.length>0)for(var o=0,r=i;o<r.length;o++){var a=r[o];n[a]&&(n[a]=this.mapDate(n[a],this._columns.get(a).type))}e=new I(this._columns,n)}else e=this.createRow(t);this.cachedRows.push(e);var s=this.getCachedCount();return s>this.total&&(this.total=s),e},e.prototype.getCachedRows=function(){return this.cachedRows},e.prototype.totalIsKnown=function(){return this.elasticChunks?this.getCachedCount()===this.total:!this.needTotal},e.prototype.fireUpdated=function(){this.onUpdate&&this.onUpdate(this)},e}(),M=function(){function t(){}return t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t}(),P=function(){function t(t){this.silentMode=0,this.events=new Array,this.source=t}return t.prototype.subscribe=function(t,e){var n=this.getEventRecByType(t),i={id:M.newGuid(),callback:e};return n?n.eventCallbacks.push(i):(n={type:t,eventCallbacks:new Array(i)},this.events.push(n)),i.id},t.prototype.unsubscribe=function(t,e){var n=this.getEventRecByType(t);if(n){var i=-1;for(i=0;i<n.eventCallbacks.length&&n.eventCallbacks[i].id!==e;i++);i>=0&&n.eventCallbacks.splice(i,1)}},t.prototype.fire=function(t,e,n,i){if(void 0===n&&(n=0),void 0===i&&(i=!1),!this.silentMode||i){var o=this.getEventRecByType(t);if(o){var r={type:t,source:this.source,data:e},a=function(){for(var t=0,e=o.eventCallbacks;t<e.length;t++){e[t].callback(r)}};n>0?setTimeout(a,n):a()}}},t.prototype.enterSilentMode=function(){this.silentMode++},t.prototype.exitSilentMode=function(){this.silentMode&&this.silentMode--},t.prototype.isSilent=function(){return this.silentMode>0},t.prototype.getEventRecByType=function(t){for(var e=0,n=this.events;e<n.length;e++){var i=n[e];if(i.type==t)return i}return null},t}();function k(t,e){var n=t;return null!=n&&n.length>0?("/"!=n.charAt(n.length-1)&&(n+="/"),n+=e):n=e,n}!function(t){t.renderLiquidTemplate=function(t,e){var n=t;if(e)for(var i in e){var o=new RegExp("{{"+i+"}}","g");n=n.replace(o,e[i])}return n}}(T||(T={})),l.resetLocales(),"function"!=typeof Object.values&&(Object.values=function(t){return Object.keys(t).map((function(e){return t[e]}))}),"function"!=typeof Math.trunc&&(Math.trunc=function(t){return isNaN(t)?NaN:t>0?Math.floor(t):Math.ceil(t)});var R=function(){return R=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},R.apply(this,arguments)},O=function(){function t(t,e,n,i){void 0===i&&(i=!1),this.loader=t,this.sourceTable=e,this.sourceId=n,this.isLookup=i,this.filterValue="",this.justServerSide=!1}return t.prototype.getValue=function(){return this.filterValue},t.prototype.apply=function(t){return this.filterValue=t,this.filterValue?this.applyCore():this.clear()},t.prototype.clear=function(){return this.filterValue="",Promise.resolve(this.sourceTable)},t.prototype.applyCore=function(){var t=this;if(this.sourceTable.getTotal()!=this.sourceTable.getCachedCount()||this.justServerSide){var e=[{class:"__substring",value:this.filterValue}];return this.loader.loadChunk({offset:0,limit:this.sourceTable.chunkSize,needTotal:!0,filters:e,sourceId:this.sourceId,lookup:this.isLookup}).then((function(n){for(var i=new S({chunkSize:t.sourceTable.chunkSize,loader:{loadChunk:function(n){return t.loader.loadChunk(R(R({},n),{filters:e,sourceId:t.sourceId,lookup:t.isLookup}))}}}),o=0,r=t.sourceTable.columns.getItems();o<r.length;o++){var a=r[o];i.columns.add(a)}i.setTotal(n.total);for(var s=0,l=n.table.getCachedRows();s<l.length;s++){var c=l[s];i.addRow(c)}return i}))}return this.applyInMemoryFilter()},t.prototype.applyInMemoryFilter=function(){var t=this;return new Promise((function(e,n){for(var i=new S({chunkSize:t.sourceTable.chunkSize,inMemory:!0}),o=0,r=t.sourceTable.columns.getItems();o<r.length;o++){var a=r[o];i.columns.add(a)}for(var s=t.filterValue.split("||").map((function(t){return t.trim().toLowerCase()})),l=t.sourceTable.columns.getItems().filter((function(t){return c.isNumericType(t.type)||c.getStringDataTypes().indexOf(t.type)>=0})),u=function(t){for(var e=0,n=l;e<n.length;e++){var i=n[e],o=t.getValue(i.id);if(o)for(var r=o.toString().toLowerCase(),a=0,c=s;a<c.length;a++){var u=c[a];if(r.indexOf(u)>=0)return!0}}return!1},d=0,h=t.sourceTable.getCachedRows();d<h.length;d++){var p=h[d];u(p)&&i.addRow(p)}i.setTotal(i.getCachedCount()),e(i)}))},t}(),_=__webpack_require__(270);function A(t){var e={x:0,y:0};if(null!==t){var n=function(t){var e,n={top:0,right:0,bottom:0,left:0,width:0,height:0};try{e=t.getBoundingClientRect()}catch(t){e=n}var i=document.body,o=document.documentElement,r=function(){var t=document.body,e=document.documentElement;return{top:window.pageYOffset||e.scrollTop||t.scrollTop,left:window.pageXOffset||e.scrollLeft||t.scrollLeft}}(),a=r.top,s=r.left,l=o.clientTop||i.clientTop||0,c=o.clientLeft||i.clientLeft||0,u=e.top+a-l,d=e.left+s-c;return{top:Math.round(u),left:Math.round(d)}}(t);e={x:n.left,y:n.top}}return e}var L="eqjs";var N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),F=function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},B=function(){function t(t,e){this.element="string"==typeof t?document.createElement(t):t,e&&this.element.parentElement!==e&&e.appendChild(this.element)}return t.prototype.addChild=function(t,e){var n=G(t,this.element);return e&&e(n),this},t.prototype.addChildElement=function(t){return t&&this.element.appendChild(t),this},t.prototype.attr=function(t,e){return this.element.setAttribute(t,e),this},t.prototype.id=function(t){return this.attr("id",t)},t.prototype.focus=function(){return this.element.focus(),this},t.prototype.title=function(t){return this.attr("title",t)},t.prototype.data=function(t,e){return void 0===e&&(e=null),null===e?(this.element.removeAttribute("data-"+t),this):this.attr("data-"+t,e)},t.prototype.show=function(){return this.removeStyle("display")},t.prototype.hide=function(t){return void 0===t&&(t=!0),t?this.setStyle("display","none"):this},t.prototype.visible=function(t){return void 0===t&&(t=!0),t?this.setStyle("visibility","visible"):this.setStyle("visibility","hidden")},t.prototype.isVisible=function(){return!!(this.element.offsetWidth||this.element.offsetHeight||this.element.getClientRects().length)},t.prototype.addClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t)for(var i=F(F([],t.trim().split(" "),!0),e,!0),o=0;o<i.length;o++)this.element.classList.add(i[o]);return this},t.prototype.removeClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t)for(var i=F(F([],t.trim().split(" "),!0),e,!0),o=0;o<i.length;o++)this.element.classList.remove(i[o]);return this},t.prototype.toggleClass=function(t,e){return void 0===e&&(e=void 0),t&&this.element.classList.toggle(t,e),this},t.prototype.on=function(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)this.element.addEventListener(n[i],e);return this},t.prototype.off=function(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)this.element.removeEventListener(n[i],e);return this},t.prototype.setStyle=function(t,e){return this.element.style.setProperty(t,e),this},t.prototype.removeStyle=function(t){return this.element.style.removeProperty(t),this},t.prototype.text=function(t){return this.element.innerText=t,this},t.prototype.html=function(t){return this.element.innerHTML=t,this},t.prototype.clear=function(){var t=this.element;this.element=document.createElement(this.element.tagName),t.replaceWith(this.element)},t.prototype.addText=function(t){var e=document.createTextNode(t);return this.element.appendChild(e),this},t.prototype.addHtml=function(t){return this.element.innerHTML+=t,this},t.prototype.toDOM=function(){return this.element},t.prototype.appendTo=function(t){return t&&t.appendChild(this.element),this},t}(),H=function(t){function e(e,n){return e?t.call(this,e,n)||this:t.call(this,"textarea",n)||this}return N(e,t),e.prototype.name=function(t){return this.element.name=t,this},e.prototype.rows=function(t){return this.element.rows=t,this},e.prototype.cols=function(t){return this.element.cols=t,this},e.prototype.value=function(t){return this.element.value=t,this},e}(B),V=function(t){function e(e,n){return e?t.call(this,e,n)||this:t.call(this,"input",n)||this}return N(e,t),e.prototype.name=function(t){return this.element.name=t,this},e.prototype.type=function(t){return this.element.type=t,this},e.prototype.size=function(t){return this.element.size=t,this},e.prototype.value=function(t){return t instanceof Date?this.element.valueAsDate=t:"number"==typeof t?this.element.valueAsNumber=t:this.element.value=t,this},e.prototype.mask=function(t){return function(t,e){var n={9:"[0-9]",a:"[a-z]"},i=e.split(""),o=function(e){if("focus"!==e.type||""===t.value){var o=[],r=t.selectionStart;i.forEach((function(e,i){if(n[e]){var r=new RegExp(n[e],"i").test(t.value.charAt(i));o.push(r?t.value.charAt(i):"_")}else o.push(e)})),t.value=o.join(""),t.selectionStart=t.selectionEnd=r}};t.addEventListener("keydown",(function(e){if(8===e.keyCode||46===e.keyCode){e.preventDefault();var o=[],r=t.selectionStart;if(0==r)return;for(var a=r,s=!0,l=i.length-1;l>=0;l--){var c=i[l];if(n[c]){var u=new RegExp(n[c],"i").test(t.value.charAt(l));u&&l!=r-1&&(s=!1),l===r-1&&a--,o.push(u&&l!=r-1?t.value.charAt(l):"_")}else l===a-1&&a--,r-1===l&&r--,o.push(c)}t.value=s?"":o.reverse().join(""),t.selectionStart=t.selectionEnd=a<0?0:a;var d=document.createEvent("Event");d.initEvent("input",!0,!0),t.dispatchEvent(d)}})),t.addEventListener("keypress",(function(e){var o=String.fromCharCode(e.charCode);if(o){e.preventDefault();var r=[],a=t.selectionStart,s=a;i.forEach((function(e,i){if(n[e]){var l=i!=a?t.value.charAt(i):o,c=new RegExp(n[e],"i").test(l);r.push(c?l:"_"),c&&a===i&&s++}else r.push(e),s===i&&s++,a===i&&a++})),t.value=r.join(""),t.selectionStart=t.selectionEnd=s;var l=document.createEvent("Event");l.initEvent("input",!0,!0),t.dispatchEvent(l)}})),t.addEventListener("input",o),t.addEventListener("focus",o)}(this.element,t),this},e}(B),j=function(t){function e(e,n){return e?t.call(this,e,n)||this:t.call(this,"select",n)||this}return N(e,t),e.prototype.addOption=function(t){var e=document.createElement("option");return"string"==typeof t?(e.value=t,e.innerHTML=t):(e.value=t.value,e.innerHTML=t.title||t.value,e.selected=t.selected||!1),this.element.appendChild(e),this},e.prototype.value=function(t){return this.element.value=t,this},e}(B);function G(t,e){return"div"===t||t instanceof HTMLDivElement||"span"===t||t instanceof HTMLSpanElement||"a"===t||t instanceof HTMLAnchorElement||"button"===t||t instanceof HTMLButtonElement||"img"===t||t instanceof HTMLImageElement?new B(t,e):"input"===t||t instanceof HTMLInputElement?new V(t instanceof HTMLInputElement?t:null,e):"textarea"===t||t instanceof HTMLTextAreaElement?new H(t instanceof HTMLTextAreaElement?t:null,e):"select"===t||t instanceof HTMLSelectElement?new j(t instanceof HTMLSelectElement?t:null,e):new B(t,e)}var z,q="undefined"!=typeof TouchEvent;!function(t){t.None="none",t.Allow="allow",t.Forbid="forbid"}(z||(z={}));var U,W=function(t,e,n){this.dropEffect=z.Allow,this.pageX=0,this.pageY=0,this.item=t,this.dragImage=e,this.data=t.data,this.sourceEvent=n,n&&n instanceof MouseEvent&&(this.pageX=n.pageX,this.pageY=n.pageY),n&&q&&n instanceof TouchEvent&&n.touches[0]&&(this.pageX=n.touches[0].pageX,this.pageY=n.touches[0].pageY)},Y=function(t){t&&t instanceof MouseEvent&&(this.x=t.pageX,this.y=t.pageY),t&&q&&t instanceof TouchEvent&&t.touches[0]&&(this.x=t.touches[0].pageX,this.y=t.touches[0].pageY)},K=new(function(){function t(){this.delta=5,this.draggableItem=null,this.dragImage=null,this.finishedSuccessfully=!1,this.mouseDownPosition=null,this.containerDescriptors=[],this.containerDescriptorIndex=-1,this.dropEffect=z.None,this.classPrefix="eqjs-drop",this.DRAG_DISABLED_ATTR="drag-disabled"}return t.prototype.registerDraggableItem=function(t){var e=this,n=t.element;if(!n)throw Error("Element in draggle item is null or undefined");n.ondragstart=function(){return!1};var i=function(t){if(!n.hasAttribute(e.DRAG_DISABLED_ATTR)){t.preventDefault(),t instanceof MouseEvent&&t.stopPropagation();var i=new Y(t);(Math.abs(i.x-e.mouseDownPosition.x)>e.delta||Math.abs(i.y-e.mouseDownPosition.y)>e.delta)&&r(t)}},o=function(t){e.mouseMoveDragListener(t)},r=function(r){r.preventDefault(),r.stopPropagation(),n.removeEventListener("mousemove",i),n.removeEventListener("touchmove",i),e.finishedSuccessfully=!1,t.beforeDragStart&&t.beforeDragStart(),e.dragImage=G("div").setStyle("position","absolute").setStyle("z-index","65530").toDOM(),document.body.appendChild(e.dragImage),e.dragImage.appendChild(n.cloneNode(!0)),t.renderer&&t.renderer(e.dragImage),e.dropEffect=z.None,e.updateCusror(e.dropEffect),e.updateImageClass(e.dropEffect),e.draggableItem={element:n,scope:t.scope,data:t.data},e.updateDragItemPosition(r);var a=new W(e.draggableItem,e.dragImage,r);a.dropEffect=e.dropEffect,t.onDragStart&&t.onDragStart(a),e.dropEffect!==a.dropEffect&&(e.dropEffect=a.dropEffect,e.updateImageClass(e.dropEffect)),document.addEventListener("mousemove",o,!0),document.addEventListener("touchmove",o,!0)},a=function(t){q&&t instanceof TouchEvent&&t.preventDefault(),e.mouseDownPosition=new Y(t),n.addEventListener("mousemove",i),n.addEventListener("touchmove",i),document.addEventListener("mouseup",s),document.addEventListener("touchend",s)};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a);var s=function(t){e.mouseDownPosition=null,n.removeEventListener("mousemove",i),n.removeEventListener("touchmove",i),document.removeEventListener("mousemove",o,!0),document.removeEventListener("touchmove",o,!0),e.draggableItem&&l(t)},l=function(n){try{if(e.containerDescriptorIndex>=0){var i=e.containerDescriptors[e.containerDescriptorIndex],o={element:i.element,scopes:i.scopes,data:i.data},r=new W(e.draggableItem,e.dragImage,n);try{o.scopes.indexOf(e.draggableItem.scope)>=0&&e.dropEffect===z.Allow&&(e.finishedSuccessfully=!0,i.onDrop&&i.onDrop(o,r))}finally{i.onDragLeave&&i.onDragLeave(o,r)}}}finally{try{var a=new W(e.draggableItem,e.dragImage,n);a.data.finishedSuccessfully=e.finishedSuccessfully,t.onDragEnd&&t.onDragEnd(a)}finally{e.draggableItem=null,e.dragImage&&e.dragImage.parentElement&&e.dragImage.parentElement.removeChild(e.dragImage),e.dragImage=null,e.finishedSuccessfully=!1,document.removeEventListener("mouseup",s),document.removeEventListener("touchend",s)}}}},t.prototype.registerDropContainer=function(t){if(!t.element)throw Error("Element in drop container is null or undefined");this.containerDescriptors.push(t)},t.prototype.removeDropContainer=function(t){var e=this.containerDescriptors.filter((function(e){return e===t||e.element==t}));if(e)for(var n=0,i=e;n<i.length;n++){var o=i[n];c.removeArrayItem(this.containerDescriptors,o)}},t.prototype.mouseMoveDragListener=function(t){if(t instanceof MouseEvent&&t.preventDefault(),t.stopPropagation(),this.updateDragItemPosition(t),-1==this.containerDescriptorIndex){for(var e=0;e<this.containerDescriptors.length;e++){var n=this.containerDescriptors[e];if(this.detectDragEnterEvent(n.element,t)){this.containerDescriptorIndex=e;break}}this.containerDescriptorIndex>=0&&this.dragEnterEvent(t)}else{n=this.containerDescriptors[this.containerDescriptorIndex];this.detectDragLeaveEvent(n.element,t)&&(this.dragLeaveEvent(t),this.containerDescriptorIndex=-1)}if(this.containerDescriptorIndex>=0){var i={element:(n=this.containerDescriptors[this.containerDescriptorIndex]).element,scopes:n.scopes,data:n.data};if(i.scopes.indexOf(this.draggableItem.scope)>=0){var o=new W(this.draggableItem,this.dragImage,t);o.dropEffect=this.dropEffect,n.onDragOver&&n.onDragOver(i,o)}}},t.prototype.updateCusror=function(t){switch(t){case z.Allow:this.setCursorStyle(this.dragImage,"grabbing");break;case z.Forbid:this.setCursorStyle(this.dragImage,"no-drop");break;default:this.setCursorStyle(this.dragImage,"grabbing")}},t.prototype.updateImageClass=function(t){switch(this.dragImage.classList.remove("".concat(this.classPrefix,"-allow")),this.dragImage.classList.remove("".concat(this.classPrefix,"-forbid")),this.dragImage.classList.remove("".concat(this.classPrefix,"-none")),t){case z.Allow:this.dragImage.classList.add("".concat(this.classPrefix,"-allow"));break;case z.None:this.dragImage.classList.add("".concat(this.classPrefix,"-none"));break;case z.Forbid:this.dragImage.classList.add("".concat(this.classPrefix,"-forbid"));break;default:this.dragImage.classList.add("".concat(this.classPrefix,"-none"))}},t.prototype.setCursorStyle=function(t,e){if(t){t.style.cursor=e;for(var n=0;n<t.children.length;n++)this.setCursorStyle(t.children[n],e)}},t.prototype.updateDragItemPosition=function(t){if(this.dragImage){var e=new Y(t);this.dragImage.style.top=e.y-this.dragImage.offsetHeight/2+"px",this.dragImage.style.left=e.x-this.dragImage.offsetWidth/2+"px"}},t.prototype.dragEnterEvent=function(t){var e=this.containerDescriptors[this.containerDescriptorIndex],n={element:e.element,scopes:e.scopes,data:e.data};if(n.scopes.indexOf(this.draggableItem.scope)>=0){var i=new W(this.draggableItem,this.dragImage,t);i.dropEffect=z.Allow,e.onDragEnter&&e.onDragEnter(n,i),this.dropEffect=i.dropEffect,this.updateCusror(this.dropEffect),this.updateImageClass(this.dropEffect)}else this.dropEffect!==z.Forbid&&(this.dropEffect=z.None,this.updateCusror(this.dropEffect),this.updateImageClass(this.dropEffect))},t.prototype.dragLeaveEvent=function(t){var e=this.containerDescriptors[this.containerDescriptorIndex],n={element:e.element,scopes:e.scopes,data:e.data};if(n.scopes.indexOf(this.draggableItem.scope)>=0){var i=new W(this.draggableItem,this.dragImage,t);i.dropEffect=z.None,e.onDragLeave&&e.onDragLeave(n,i),this.dropEffect=i.dropEffect,this.updateCusror(this.dropEffect),this.updateImageClass(this.dropEffect)}},t.prototype.detectDragEnterEvent=function(t,e){var n=A(t),i=new Y(e);return!(i.y<n.y||i.y>n.y+t.offsetHeight)&&!(i.x<n.x||i.x>n.x+t.offsetWidth)},t.prototype.detectDragLeaveEvent=function(t,e){var n=A(t),i=new Y(e);return!(i.y>n.y&&i.y<n.y+t.offsetHeight&&i.x>n.x&&i.x<n.x+t.offsetWidth)},t}());!function(t){t[t.Always=0]="Always",t[t.Once=1]="Once",t[t.Never=2]="Never"}(U||(U={}));var X,J="keg",Z=/{0:(.*?)}/g;!function(t){t[t.STRING=1]="STRING",t[t.NUMBER=2]="NUMBER",t[t.DATETIME=3]="DATETIME",t[t.BOOL=4]="BOOL"}(X||(X={}));var Q,$=function(t,e,n,i){var o=t?t.toString().replace(/\n/g,"↵ "):"";n.innerText=o,n.title=o,e.align==Q.NONE&&n.classList.add("".concat(J,"-cell-value-align-left"))},tt=function(t,e,n,i){var o=(t||"").toString();"number"==typeof t&&(o=e.dataColumn&&e.dataColumn.displayFormat&&Z.test(e.dataColumn.displayFormat)?e.dataColumn.displayFormat.replace(Z,(function(e,n){return l.numberToStr(t,n)})):t.toLocaleString()),n.innerText=o,n.title=o,e.align==Q.NONE&&n.classList.add("".concat(J,"-cell-value-align-right"))},et=function(e,n,i,o){var r="[object Date]"===Object.prototype.toString.call(e),a=(e||"").toString();if(r)if(n.dataColumn&&n.dataColumn.displayFormat&&Z.test(n.dataColumn.displayFormat))a=n.dataColumn.displayFormat.replace(Z,(function(t,i){return l.dateTimeToStr(e,n.type,i)}));else{var s=l.getCurrentLocale(),c={hour:"numeric",minute:"numeric",second:"numeric"};switch(n.type){case t.Date:a=e.toLocaleDateString(s);break;case t.Time:a=e.toLocaleTimeString(s,c);break;case t.DateTime:a="".concat(e.toLocaleDateString(s)," ").concat(e.toLocaleTimeString(s,c))}}i.innerText=a,i.title=a,n.align==Q.NONE&&i.classList.add("".concat(J,"-cell-value-align-right"))},nt=function(t,e,n,i){if(e.dataColumn&&e.dataColumn.displayFormat&&Z.test(e.dataColumn.displayFormat)){var o=e.dataColumn.displayFormat.replace(Z,(function(e,n){return l.booleanToStr(t,n)}));return $(o,e,n)}n.classList.add("".concat(J,"-cell-value-bool")),n.classList.add("".concat(J,"-").concat(t?"cell-value-true":"cell-value-false"))},it=function(){function e(t){this.renderers={},this.defaultRenderers={},this.registerRenderer("StringDefault",$),this.setDefaultRenderer(X.STRING,$),this.registerRenderer("NumberDefault",tt),this.setDefaultRenderer(X.NUMBER,tt),this.registerRenderer("DateTimeDefault",et),this.setDefaultRenderer(X.DATETIME,et),this.registerRenderer("BoolDefault",nt),this.setDefaultRenderer(X.BOOL,nt)}return e.prototype.getDefaultRenderer=function(t){var e=this.getCellType(t);return this.defaultRenderers[X[e]]},e.prototype.getDefaultRendererByType=function(t){return this.defaultRenderers[X[t]]},e.prototype.setDefaultRenderer=function(t,e){e&&(this.defaultRenderers[X[t]]=e)},e.prototype.getRenderer=function(t){return this.renderers[t]},e.prototype.registerRenderer=function(t,e){this.renderers[t]=e},e.prototype.getCellType=function(e){switch(e){case t.Autoinc:case t.Byte:case t.Word:case t.Currency:case t.Float:case t.Int32:case t.Int64:return X.NUMBER;case t.Date:case t.DateTime:case t.Time:return X.DATETIME;case t.Bool:return X.BOOL;default:return X.STRING}},e}();!function(t){t[t.NONE=1]="NONE",t[t.LEFT=2]="LEFT",t[t.CENTER=3]="CENTER",t[t.RIGHT=4]="RIGHT"}(Q||(Q={}));var ot,rt=function(){function t(t,e,n){void 0===n&&(n=!1),this._label=null,this._description=null,this.align=Q.NONE,this.isVisible=!0,this.isRowNum=!1,this.dataColumn=t,this.grid=e;var i=e.options.columnWidths||{};t?(t.style.alignment&&(this.align=function(t){switch(t){case h.Left:return Q.LEFT;case h.Center:return Q.CENTER;case h.Right:return Q.RIGHT;default:return Q.NONE}}(t.style.alignment)),this.width=i&&i[this.type]?i[this.type].default:250,this.cellRenderer=this.grid.cellRendererStore.getDefaultRenderer(t.type),this._description=t.description):n&&(this.isRowNum=!0,this.width=i&&i.rowNumColumn?i.rowNumColumn.default:60,this._label="",this.cellRenderer=this.grid.cellRendererStore.getDefaultRendererByType(X.NUMBER)),e&&e.options&&e.options.onGetCellRenderer&&(this.cellRenderer=e.options.onGetCellRenderer(this,this.cellRenderer)||this.cellRenderer)}return Object.defineProperty(t.prototype,"label",{get:function(){return this._label?this._label:this.isRowNum?"":this.dataColumn.label},set:function(t){this._label=this.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.dataColumn?this.dataColumn.type:null},enumerable:!1,configurable:!0}),t}(),at=function(){function t(t,e){this.items=[],this.grid=e,this.sync(t)}return t.prototype.sync=function(t,e){void 0===e&&(e=!0),this.clear();var n=new rt(null,this.grid,!0);if(this.add(n),e||(n.isVisible=!1),t)for(var i=0,o=t.getItems();i<o.length;i++){var r=o[i],a=new rt(r,this.grid);this.grid.options.onSyncGridColumn&&this.grid.options.onSyncGridColumn(a),this.add(a)}},Object.defineProperty(t.prototype,"count",{get:function(){return this.items.length},enumerable:!1,configurable:!0}),t.prototype.add=function(t){var e=this.items.length;return this.items.push(t),e},t.prototype.put=function(t,e){t>=0&&t<this.items.length&&(this.items[t]=e)},t.prototype.move=function(t,e){var n=this.items.indexOf(t);n>=0&&n!=e&&c.moveArrayItem(this.items,n,e)},t.prototype.get=function(t){return t>=0&&t<this.items.length?this.items[t]:null},t.prototype.getItems=function(){return this.items},t.prototype.removeAt=function(t){this.get(t);this.items.splice(t,1)},t.prototype.clear=function(){this.items=[]},t}(),st=function(){return st=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},st.apply(this,arguments)},lt=function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},ct=function(){function e(t){if(this.cssPrefix="keg",this.pagination={page:1,pageSize:30,total:0},this.paginationOptions={maxButtonCount:10,useBootstrap:!1},this.defaultDataGridOptions={slot:null,dataTable:null,fixHeightOnFirstRender:!1,syncGridColumns:!0,useRowNumeration:!0,allowDragDrop:!1,aggregates:{settings:null,calculator:null},paging:{enabled:!0,pageSize:30,pageSizeItems:[20,30,50,100,200]},columnWidths:{autoResize:U.Always,stringColumns:{min:100,max:500,default:250},numberColumns:{min:60,default:120},boolColumns:{min:50,default:80},dateColumns:{min:80,default:200},otherColumns:{min:100,max:500,default:250},rowNumColumn:{min:40,default:60}},showPlusButton:!1,viewportRowsCount:null,showActiveRow:!0},this.rowsOnPagePromise=null,this.containerInitialHeight=0,this.firstRender=!0,this.prevRowTotals=null,this.landingIndex=-1,this.landingSlot=G("div").addClass("".concat(this.cssPrefix,"-col-landing-slot")).addChildElement(G("div").toDOM()).toDOM(),this._activeRowIndex=-1,t&&t.paging&&(t.paging=c.assign(this.defaultDataGridOptions.paging,t.paging)),this.options=this.mergeOptions(t),this.processColumnWidthsOptions(),!this.options.slot)throw Error('"slot" parameter is required to initialize EasyDataGrid');if(!this.options.dataTable)throw Error('"dataTable" parameter is required to initialize EasyDataGrid');this.dataTable=t.dataTable,this.eventEmitter=new P(this),this.cellRendererStore=new it(t),this.columns=new at(this.dataTable.columns,this),this.setSlot(this.options.slot),this.init(this.options)}return e.prototype.mergeOptions=function(t){var e=c.assignDeep({},this.defaultDataGridOptions.columnWidths,t.columnWidths),n=c.assignDeep({},this.defaultDataGridOptions.paging,t.paging),i=c.assign({},this.defaultDataGridOptions,t);return i.columnWidths=e,i.paging=n,i},e.prototype.processColumnWidthsOptions=function(){var e=this.options.columnWidths;if(e){c.getStringDataTypes().forEach((function(t){e[t]=st(st({},e.stringColumns),e[t])})),c.getNumericDataTypes().forEach((function(t){e[t]=st(st({},e.numberColumns),e[t])})),e[t.Bool]=st(st({},e.boolColumns),e[t.Bool]),c.getDateDataTypes().forEach((function(t){e[t]=st(st({},e.dateColumns),e[t])}));var n=lt(lt(lt(lt([],c.getStringDataTypes(),!0),c.getNumericDataTypes(),!0),c.getDateDataTypes(),!0),[t.Bool],!1);c.getAllDataTypes().forEach((function(t){t in n||(e[t]=st(st({},e.otherColumns),e[t]))})),e[t.Unknown]=e.otherColumns}},e.prototype.setSlot=function(t){if("string"==typeof t){if(t.length)if("#"===t[0])this.slot=document.getElementById(t.substring(1));else{if("."!==t[0])throw Error("Unrecognized slot parameter (Must be id, class or HTMLElement): "+t);var e=document.getElementsByClassName(t.substring(1));e.length&&(this.slot=e[0])}}else this.slot=t},e.prototype.init=function(t){var e=this;t.onInit&&this.addEventListener("init",t.onInit),t.onRowClick&&this.addEventListener("rowClick",t.onRowClick),t.onRowDbClick&&this.addEventListener("rowDbClick",t.onRowDbClick),t.onPlusButtonClick&&this.addEventListener("plusButtonClick",t.onPlusButtonClick),t.onColumnChanged&&this.addEventListener("columnChanged",t.onColumnChanged),t.onColumnDeleted&&this.addEventListener("columnDeleted",t.onColumnDeleted),t.onColumnMoved&&this.addEventListener("columnMoved",t.onColumnMoved),t.onPageChanged&&this.addEventListener("pageChanged",t.onPageChanged),t.onActiveRowChanged&&this.addEventListener("activeRowChanged",t.onActiveRowChanged),this.addEventListener("pageChanged",(function(t){return e.activeRowIndex=-1})),c.assignDeep(this.paginationOptions,t.pagination),this.pagination.pageSize=this.options.paging.pageSize||this.pagination.pageSize,this.options.allowDragDrop&&K.registerDropContainer({element:this.slot,scopes:["gridColumnMove"],onDragEnter:function(t,n){e.slot.classList.add("".concat(L,"-drophover")),e.showLandingSlot(n.pageX,n.pageY)},onDragOver:function(t,n){e.showLandingSlot(n.pageX,n.pageY)},onDragLeave:function(t,n){n.dropEffect=z.Forbid,e.slot.classList.remove("".concat(L,"-drophover")),e.hideLandingSlot()},onDrop:function(t,n){e.dataTable.columns.move(n.data.column,e.landingIndex),e.refresh(),e.fireEvent({type:"columnMoved",columnId:n.data.column.id,newIndex:e.landingIndex})}}),this.refresh(),this.fireEvent("init")},e.prototype.fireEvent=function(t){"string"==typeof t?this.eventEmitter.fire(t):this.eventEmitter.fire(t.type,t)},e.prototype.setData=function(t){this.dataTable=t,this.clear(),this.refresh()},e.prototype.getData=function(){return this.dataTable},e.prototype.getColumns=function(){return this.columns},e.prototype.destroy=function(){this.slot.innerHTML=""},e.prototype.refresh=function(){this.clearDOM(),this.render()},e.prototype.clearDOM=function(){this.slot.innerHTML=""},e.prototype.clear=function(){this.pagination.page=1,this.clearDOM()},e.prototype.render=function(){var t=this;if(this.hasData()||this.options.showPlusButton){this.containerInitialHeight=this.slot.clientHeight,this.rootDiv=document.createElement("div"),this.rootDiv.style.width="100%",this.rootDiv.classList.add("".concat(this.cssPrefix,"-root")),this.columns.sync(this.dataTable.columns,this.options.useRowNumeration),this.renderHeader(),this.rootDiv.appendChild(this.headerDiv),this.renderBody(),this.rootDiv.appendChild(this.bodyDiv),this.renderFooter(),this.rootDiv.appendChild(this.footerDiv);var e=document.createElement("div");e.classList.add("".concat(this.cssPrefix,"-container")),e.appendChild(this.rootDiv),this.slot.appendChild(e);var n=this.options.columnWidths.autoResize!==U.Never;this.rowsOnPagePromise?this.rowsOnPagePromise.then((function(){return t.updateHeight()})).then((function(){t.firstRender=!1,t.rowsOnPagePromise=null})):setTimeout((function(){t.updateHeight().then((function(){t.firstRender=!1,n&&t.resizeColumns()}))}),100)}},e.prototype.updateHeight=function(){var t=this;return new Promise((function(e){if(t.options.viewportRowsCount){var n=t.bodyCellContainerDiv.firstElementChild,i=(n?n.offsetHeight:36)*t.options.viewportRowsCount;return G(t.bodyViewportDiv).setStyle("height","".concat(i,"px")),void setTimeout((function(){var n=t.bodyViewportDiv.offsetHeight-t.bodyViewportDiv.clientHeight;i+=n,G(t.bodyViewportDiv).setStyle("height","".concat(i,"px")),e()}),100)}t.containerInitialHeight,e()})).then((function(){t.options.fixHeightOnFirstRender&&t.firstRender&&(t.slot.style.height="".concat(t.slot.offsetHeight,"px"))}))},e.prototype.getContainerWidth=function(){return this.columns.getItems().filter((function(t){return t.isVisible})).map((function(t){return t.width})).reduce((function(t,e){return t+e}))},e.prototype.renderHeader=function(){var t=this;this.headerDiv=G("div").addClass("".concat(this.cssPrefix,"-header")).toDOM(),this.headerViewportDiv=G("div",this.headerDiv).addClass("".concat(this.cssPrefix,"-header-viewport")).toDOM(),this.headerCellContainerDiv=G("div",this.headerViewportDiv).addClass("".concat(this.cssPrefix,"-header-cell-container")).toDOM(),this.headerRowDiv=G("div",this.headerCellContainerDiv).addClass("".concat(this.cssPrefix,"-header-row")).toDOM(),this.columns.getItems().forEach((function(e,n){if(e.isVisible){var i=t.renderColumnHeader(e,n);t.headerRowDiv.appendChild(i),e.isRowNum&&G(i).addChildElement(t.renderHeaderButtons())}}));var e=this.getContainerWidth();G(this.headerCellContainerDiv).setStyle("width","".concat(e,"px"))},e.prototype.hasData=function(){return this.dataTable.columns.count>0},e.prototype.renderColumnHeader=function(t,e){var n=this,i=G("div").addClass("".concat(this.cssPrefix,"-header-cell")).data("col-idx","".concat(e)).setStyle("width","".concat(t.width,"px"));t.dataColumn&&i.data("col-id","".concat(t.dataColumn.id));var o=i.toDOM();return G("div",o).addClass("".concat(this.cssPrefix,"-header-cell-resize")),t.isRowNum||G("div",o).addClass("".concat(this.cssPrefix,"-header-cell-label")).text(t.label),t.description&&G("div",o).addClass("question-mark").title(t.description),this.options.allowDragDrop&&K.registerDraggableItem({element:o,scope:"gridColumnMove",data:{column:t},renderer:function(e){e.innerHTML="";var i=document.createElement("div");i.innerText=t.label,e.classList.add("".concat(n.cssPrefix,"-sortable-helper")),e.appendChild(i)},onDragStart:function(t){t.dropEffect=z.Allow}}),o},e.prototype.renderBody=function(){var t=this;this.bodyDiv=G("div").addClass("".concat(this.cssPrefix,"-body")).toDOM(),this.bodyViewportDiv=G("div",this.bodyDiv).addClass("".concat(this.cssPrefix,"-body-viewport")).attr("tabIndex","0").toDOM(),this.bodyCellContainerDiv=G("div",this.bodyViewportDiv).addClass("".concat(this.cssPrefix,"-cell-container")).toDOM();var e=this.canShowAggregates();this.dataTable&&(this.showProgress(),this.rowsOnPagePromise=this.getRowsToRender().then((function(n){t.pagination.total=t.dataTable.getTotal(),t.hideProgress(),t.bodyCellContainerDiv.innerHTML="",t.prevRowTotals=null;var i=0;if(n.length){var o=e?t.options.aggregates.settings.getGroups():[];i=n.length<t.pagination.pageSize?n.length:t.pagination.pageSize,n.forEach((function(n,r){if(e&&t.updateTotalsState(o,n),r<i){var a=t.renderRow(n,r);t.bodyCellContainerDiv.appendChild(a)}}));var r=t.options.aggregates&&t.options.aggregates.showGrandTotalsOnEachPage;if(e&&(t.isLastPage()||r)){var a=new I(t.dataTable.columns,new Array(t.dataTable.columns.count));t.updateTotalsState(o,a,!0)}}if(t.options.columnWidths.autoResize!==U.Never)t.resizeColumns();else{var s=t.getContainerWidth();G(t.bodyCellContainerDiv).setStyle("width","".concat(s,"px"))}return i})).catch((function(t){return console.error(t),0}))),this.bodyViewportDiv.addEventListener("scroll",(function(e){G(t.headerViewportDiv).setStyle("margin-left","-".concat(t.bodyViewportDiv.scrollLeft,"px"))})),this.bodyViewportDiv.addEventListener("keydown",this.onViewportKeydown.bind(this))},e.prototype.isLastPage=function(){return this.dataTable.elasticChunks?this.dataTable.totalIsKnown()&&this.pagination.page*this.pagination.pageSize>=this.pagination.total:this.pagination.page*this.pagination.pageSize>=this.pagination.total},e.prototype.canShowAggregates=function(){if(!this.options||!this.options.aggregates||!this.options.aggregates.settings)return!1;var t=this.options.aggregates.settings;return(t.hasAggregates()||t.hasRecordCount())&&(t.hasGroups()||t.hasGrandTotals())},e.prototype.updateTotalsState=function(t,e,n){void 0===n&&(n=!1);var i=this.options.aggregates.settings;if(this.prevRowTotals&&i.hasGroups()){for(var o=-1,r=1;r<=t.length;r++){for(var a=0,s=t[r-1].columns;a<s.length;a++){var l=s[a];if(!i.compareValues(this.prevRowTotals.getValue(l),e.getValue(l))){o=r;break}}if(-1!==o)break}if(-1!==o)for(r=t.length;r>=o;r--){var c=new I(this.dataTable.columns,this.prevRowTotals.toArray()),u=this.renderTotalsRow(r,c);this.bodyCellContainerDiv.appendChild(u)}}if(n&&i.hasGrandTotals()&&i.hasAggregates()){u=this.renderTotalsRow(0,e);this.bodyCellContainerDiv.appendChild(u)}this.prevRowTotals=e},e.prototype.applyGroupColumnTemplate=function(t,e,n){var i=t.replace(/{{\s*GroupValue\s*}}/g,e?"".concat(e):"-");return i=i.replace(/{{\s*GroupCount\s*}}/g,n?"".concat(n):"-")},e.prototype.renderTotalsRow=function(t,e){var n=this,i=this.options.aggregates.settings,o=t>0?i.getGroups()[t-1]:{columns:[],aggregates:i.getAggregates()},r=G("div").addClass("".concat(this.cssPrefix,"-row")).addClass("".concat(this.cssPrefix,"-row-totals")).addClass("".concat(this.cssPrefix,"-totals-lv").concat(t)).data("totals-level","".concat(t)).attr("tabindex","-1").toDOM();this.columns.getItems().forEach((function(t,i){if(t.isVisible){var a="",s=t.isRowNum?-1:n.dataTable.columns.getIndex(t.dataColumn.id);!t.isRowNum&&t.dataColumn&&o.columns.indexOf(t.dataColumn.id)>=0&&(a=e.getValue(s)),s==n.dataTable.columns.count-1&&(a=". . . . . ."),r.appendChild(n.renderCell(t,i,a,r))}}));var a=this.options.aggregates.calculator.getAggrContainer(),s=i.getAggregates().map((function(t){return t.colId})),l=i.buildGroupKey(o,e);return a.getAggregateData(t,l).then((function(a){for(var l=0,c=s;l<c.length;l++){var u=c[l];e.setValue(u,a[u])}r.innerHTML="",n.columns.getItems().forEach((function(l,c){if(l.isVisible){var u="",d=l.isRowNum?-1:n.dataTable.columns.getIndex(l.dataColumn.id);if(!l.isRowNum){var h=!1;if(l.dataColumn){var p=o.columns.indexOf(l.dataColumn.id),f=s.indexOf(l.dataColumn.id);h=t>0?p==o.columns.length-1:0==d,(p>=0||f>=0)&&(u=e.getValue(d))}var g="";if(t>0&&!(g=l.dataColumn.groupFooterColumnTemplate)&&i.hasRecordCount()&&h&&(g="{{GroupValue}} ({{GroupCount}})"),g)u=n.renderCell(l,c,u,r).firstChild.innerHTML,u=n.applyGroupColumnTemplate(g,u,a[i.COUNT_FIELD_NAME])}var m=n.renderCell(l,c,u,r);r.appendChild(m)}}))})).catch((function(t){return console.error(t)})),r},e.prototype.onViewportKeydown=function(t){if(this.options.showActiveRow){var e=this.bodyCellContainerDiv.querySelectorAll(".".concat(this.cssPrefix,"-row")).length,n=void 0;switch(t.key){case"ArrowLeft":case"ArrowRight":break;case"ArrowUp":t.preventDefault(),n=this.activeRowIndex<0||this.activeRowIndex>=e?e-1:this.activeRowIndex-1,this.activeRowIndex=n>=0?n:0;break;case"ArrowDown":t.preventDefault(),n=this.activeRowIndex<0||this.activeRowIndex>=e?0:this.activeRowIndex+1,this.activeRowIndex=n<e?n:e-1}}},e.prototype.ensureRowVisibility=function(t){var e="number"==typeof t?this.getDataRow(t):t;if(e){var n=e.getBoundingClientRect(),i=this.bodyViewportDiv.getBoundingClientRect(),o=n.top-i.top,r=n.bottom-i.top,a=this.bodyViewportDiv.clientHeight,s=window.innerHeight||document.documentElement.clientHeight;if(o>0&&r<=a&&n.top>0&&n.bottom<s)return;o<0?this.bodyViewportDiv.scrollTop=this.bodyViewportDiv.scrollTop+o:r>a&&(this.bodyViewportDiv.scrollTop=this.bodyViewportDiv.scrollTop+r-a),(n=e.getBoundingClientRect()).top<0?document.documentElement.scrollTop=document.documentElement.scrollTop+n.top:n.bottom>s&&(document.documentElement.scrollTop=document.documentElement.scrollTop+n.bottom-s)}},e.prototype.getRowsToRender=function(){return!1===this.options.paging.enabled?Promise.resolve(this.dataTable.getCachedRows()):this.dataTable.getRows({offset:(this.pagination.page-1)*this.pagination.pageSize,limit:this.pagination.pageSize+1}).catch((function(t){return console.error(t),[]}))},e.prototype.renderFooter=function(){var t=this;this.footerDiv=G("div").addClass("".concat(this.cssPrefix,"-footer")).toDOM(),this.rowsOnPagePromise&&this.rowsOnPagePromise.then((function(e){t.footerDiv.innerHTML="",t.footerPaginateDiv=t.renderPageNavigator(),t.footerDiv.appendChild(t.footerPaginateDiv);var n=t.renderPageInfoBlock(e);t.footerDiv.appendChild(n)}))},e.prototype.renderPageInfoBlock=function(t){var e=G("div").addClass("".concat(this.cssPrefix,"-page-info")).toDOM();if(this.dataTable.getTotal()>0){var n=t?(this.pagination.page-1)*this.pagination.pageSize+1:0,i=t?n+t-1:0,o=this.dataTable.getTotal().toString();if(this.dataTable.elasticChunks)this.dataTable.getCachedCount()!==this.dataTable.getTotal()&&(o="?");e.innerHTML=l.getText("GridPageInfo").replace("{FirstPageRecordNum}","<span>".concat(n.toString(),"</span>")).replace("{LastPageRecordNum}","<span>".concat(i.toString(),"</span>")).replace("{Total}","<span>".concat(o,"</span>"))}return e},e.prototype.showProgress=function(){},e.prototype.hideProgress=function(){},e.prototype.getLocalIndexByGlobal=function(t){return this.pagination?t%this.pagination.pageSize:t},e.prototype.getGlobalIndexByLocal=function(t){return this.pagination?(this.pagination.page-1)*this.pagination.pageSize+t:t},e.prototype.renderRow=function(t,e){var n=this,i=this.getGlobalIndexByLocal(e),o=G("div").addClass("".concat(this.cssPrefix,"-row")).addClass("".concat(this.cssPrefix,"-row-").concat(e%2==1?"odd":"even")).data("row-idx","".concat(i)).attr("tabindex","-1").on("click",(function(i){n.activeRowIndex=e,n.fireEvent({type:"rowClick",row:t,rowIndex:e,sourceEvent:i})})).on("dblclick",(function(i){n.fireEvent({type:"rowDbClick",row:t,rowIndex:e,sourceEvent:i})}));0==e&&o.addClass("".concat(this.cssPrefix,"-row-first"));var r=o.toDOM();return this.options.showActiveRow&&e==this.activeRowIndex&&o.addClass("".concat(this.cssPrefix,"-row-active")),this.columns.getItems().forEach((function(e,o){if(e.isVisible){var a=e.isRowNum?-1:n.dataTable.columns.getIndex(e.dataColumn.id),s=e.isRowNum?i+1:t.getValue(a);r.appendChild(n.renderCell(e,o,s,r))}})),r},e.prototype.renderCell=function(t,e,n,i){var o=G("div").addClass("".concat(this.cssPrefix,"-cell")).data("col-idx","".concat(e)).attr("tabindex","-1").setStyle("width","".concat(t.width,"px"));t.align==Q.LEFT?o.addClass("".concat(this.cssPrefix,"-cell-align-left")):t.align==Q.RIGHT?o.addClass("".concat(this.cssPrefix,"-cell-align-right")):t.align==Q.CENTER&&o.addClass("".concat(this.cssPrefix,"-cell-align-center"));var r=o.toDOM(),a=r.appendChild(G("div").addClass("".concat(this.cssPrefix,"-cell-value")).toDOM());return t.cellRenderer&&t.cellRenderer(n,t,a,i),r},e.prototype.setPage=function(t){this.pagination.page=t,this.fireEvent({type:"pageChanged",page:t}),this.refresh(),this.bodyViewportDiv.focus()},e.prototype.renderPageNavigator=function(){var t=this,e=document.createElement("div");e.className="".concat(this.cssPrefix,"-pagination-wrapper");var n=this.dataTable.getTotal();if(this.options.paging&&this.options.paging.enabled&&n>0){var i=this.paginationOptions.useBootstrap?"":"".concat(this.cssPrefix,"-"),o=function(e){var n=e.target;if(n.hasAttribute("data-page")){var i=parseInt(n.getAttribute("data-page"));t.setPage(i)}},r=function(e,n,r,a,s){var l=document.createElement("li");if(l.className="".concat(i,"page-item"),!a){s&&(l.className+=" active");var c=document.createElement("a");return c.setAttribute("href","javascript:void(0)"),c.innerHTML=n||e.toString(),c.setAttribute("data-page","".concat(e)),c.className="".concat(i,"page-link"),c.addEventListener("click",o),l.appendChild(c),l}var u=document.createElement("span");if(u.setAttribute("aria-hidden","true"),u.className="".concat(i,"page-link"),r)l.className+=" disabled";else{if(t.paginationOptions.useBootstrap)(u=document.createElement("a")).setAttribute("href","javascript:void(0)"),u.setAttribute("data-page","".concat(e));else{var d=document.createElement("a");d.setAttribute("href","javascript:void(0)"),d.setAttribute("data-page","".concat(e)),u=d}u.className="".concat(i,"page-link"),u.addEventListener("click",o)}return u.innerHTML=n,l.appendChild(u),l};if(this.dataTable.elasticChunks){var a=this.pagination.page||1;(c=document.createElement("ul")).className="".concat(i,"pagination");var s=r(a-1,"«",1==a,!0,!1);c.appendChild(s),s=r(a+1,"»",this.isLastPage(),!0,!1),c.appendChild(s),e.appendChild(c)}else if(this.pagination.total>this.pagination.pageSize){a=this.pagination.page||1;var c,u=Math.ceil(this.pagination.total/this.pagination.pageSize)||1,d=this.paginationOptions.maxButtonCount||10,h=a-1,p=h-h%d+1,f=p+d-1;f>u&&(f=u),(c=document.createElement("ul")).className="".concat(i,"pagination");s=r(p-1,"«",1==p,!0,!1);c.appendChild(s);for(var g=p;g<=f;g++)s=r(g,g.toString(),!1,!1,g==a),c.appendChild(s);s=r(f+1,"»",f==u,!0,!1),c.appendChild(s),e.appendChild(c)}if(this.options.paging.allowPageSizeChange){var m=document.createElement("div");m.className="".concat(this.cssPrefix,"-page-sizes");var y=document.createElement("div");y.className="kfrm-select ".concat(this.cssPrefix,"-page-sizes-select"),m.appendChild(y);var v=document.createElement("select"),b=this.options.paging.pageSizeItems||[],w=new Set(b);w.add(this.options.paging.pageSize||20),Array.from(w).forEach((function(t){var e=document.createElement("option");e.value=t.toString(),e.text=t.toString(),v.appendChild(e)})),v.value=(this.pagination.pageSize||20).toString(),y.appendChild(v),v.addEventListener("change",(function(e){var n=parseInt(e.target.value);t.pagination.pageSize=n,t.pagination.page=1,t.refresh()}));var C=document.createElement("div");C.className="".concat(this.cssPrefix,"-page-sizes-label"),m.appendChild(C);var D=document.createElement("span");D.innerText=l.getText("GridItemsPerPage"),C.appendChild(D),e.appendChild(m)}}return e},e.prototype.addEventListener=function(t,e){return this.eventEmitter.subscribe(t,(function(t){return e(t.data)}))},e.prototype.removeEventListener=function(t,e){this.eventEmitter.unsubscribe(t,e)},e.prototype.renderHeaderButtons=function(){var t=this;return this.options.showPlusButton?G("div").addClass("".concat(this.cssPrefix,"-header-btn-plus")).title(this.options.plusButtonTitle||"Add").addChild("a",(function(e){return e.attr("href","javascript:void(0)").on("click",(function(e){e.preventDefault(),t.fireEvent({type:"plusButtonClick",sourceEvent:e})}))})).toDOM():G("span").addText("#").toDOM()},e.prototype.showLandingSlot=function(t,e){for(var n=this.headerRowDiv.querySelectorAll("[class*=".concat(this.cssPrefix,"-table-col]")),i=[],o=1;o<n.length;o++){var r=n[o];"none"!==r.style.display&&i.push(r)}if(0===i.length)return this.landingIndex=0,void this.headerRowDiv.appendChild(this.landingSlot);var a=A(this.landingSlot);if(!(t>=a.x&&t<=a.x+this.landingSlot.offsetWidth)){for(var s=this.landingIndex,l=0,c=i;l<c.length;l++){var u=c[l],d=A(u),h=u.offsetWidth;t>d.x&&t<d.x+h&&(s=parseInt(u.getAttribute("data-col-idx"))-1)}s!=this.landingIndex&&(this.landingIndex=s,this.landingIndex<i.length?this.headerRowDiv.insertBefore(this.landingSlot,i[this.landingIndex]):this.headerRowDiv.appendChild(this.landingSlot))}},e.prototype.hideLandingSlot=function(){var t=this;this.landingIndex=-1,setTimeout((function(){t.landingSlot.parentElement&&t.landingSlot.parentElement.removeChild(t.landingSlot)}),10)},Object.defineProperty(e.prototype,"activeRowIndex",{get:function(){return this._activeRowIndex},set:function(t){if(t!==this._activeRowIndex){var e=this._activeRowIndex;this._activeRowIndex=t,this.updateActiveRow(),this.fireEvent({type:"activeRowChanged",oldValue:e,newValue:this.activeRowIndex,rowIndex:this.getGlobalIndexByLocal(this.activeRowIndex)})}},enumerable:!1,configurable:!0}),e.prototype.updateActiveRow=function(){var t=this;if(this.options.showActiveRow){this.bodyCellContainerDiv.querySelectorAll("[class*=".concat(this.cssPrefix,"-row-active]")).forEach((function(e){e.classList.remove("".concat(t.cssPrefix,"-row-active"))}));var e=this.getActiveRow();e&&(e.classList.add("".concat(this.cssPrefix,"-row-active")),this.ensureRowVisibility(this.activeRowIndex))}},e.prototype.getActiveRow=function(){return this.getDataRow(this.activeRowIndex)},e.prototype.getDataRow=function(t){var e=Array.from(this.bodyCellContainerDiv.querySelectorAll(".".concat(this.cssPrefix,"-row:not(.").concat(this.cssPrefix,"-row-totals)")));return t>=0&&t<e.length?e[t]:null},e.prototype.focus=function(){this.bodyViewportDiv.focus()},e.prototype.resizeColumns=function(){if(this.options.columnWidths.autoResize!==U.Never){var t=this.bodyCellContainerDiv.style.width;this.bodyCellContainerDiv.style.visibility="hidden",this.bodyCellContainerDiv.style.width="1px",this.headerRowDiv.style.width="1px";for(var e=0,n=this.columns.getItems(),i=this.headerCellContainerDiv.querySelectorAll(".".concat(this.cssPrefix,"-header-cell")),o=0,r=function(t){var r=n[t];if(!r.isVisible)return"continue";var s=a.options.columnWidths.autoResize!==U.Always&&r.dataColumn?r.dataColumn.calculatedWidth:0,l=a.bodyCellContainerDiv.querySelectorAll(".".concat(a.cssPrefix,'-cell[data-col-idx="').concat(t,'"] > .').concat(a.cssPrefix,"-cell-value")),u=0;if(s>0)e+=s,r.width=s,l.forEach((function(t){t.parentElement.style.width="".concat(s,"px")})),i[o].style.width="".concat(s,"px");else if(0==l.length&&(i[o].style.width=null,i[o].style.whiteSpace="nowrap"),u=i[o].offsetWidth,l.length>0){l.forEach((function(t){t.parentElement.style.width=null;var e=t.parentElement.offsetWidth;e>u&&(u=e)})),u+=3;var d=r.isRowNum?a.options.columnWidths.rowNumColumn.max||500:a.options.columnWidths[r.dataColumn.type].max||2e3,h=r.isRowNum?a.options.columnWidths.rowNumColumn.min||0:a.options.columnWidths[r.dataColumn.type].min||20;u>d&&(u=d),u<h&&(u=h),c.isNumericType(r.type)&&(u=Math.round(1.3*u)),e+=u,r.width=u,l.forEach((function(t){t.parentElement.style.width="".concat(u,"px")})),i[o].style.width="".concat(u,"px"),r.dataColumn&&(r.dataColumn.calculatedWidth=u)}else e+=u;o++},a=this,s=0;s<this.columns.count;s++)r(s);e>0?(this.bodyCellContainerDiv.style.width="".concat(e,"px"),this.headerCellContainerDiv.style.width="".concat(e,"px")):(this.bodyCellContainerDiv.style.width=t,this.headerCellContainerDiv.style.width=t),this.bodyCellContainerDiv.style.visibility=null,this.headerRowDiv.removeAttribute("style")}},e}(),ut=function(){function t(t,e){this.slot=t,this.options=e||{},this.options.yearRange||(this.options.yearRange="c-10:c+10")}return Object.defineProperty(t.prototype,"cssPrefix",{get:function(){return"kdtp-cal"},enumerable:!1,configurable:!0}),t.prototype.setDate=function(t){this.currentDate=new Date(t)},t.prototype.getDate=function(){return new Date(this.currentDate)},t.prototype.dateChanged=function(t){this.options.onDateChanged&&this.options.onDateChanged(this.currentDate,t)},t}(),dt=function(){function t(t){this.calendar=null,this.timePicker=null,this.options=t,this.render()}return Object.defineProperty(t.prototype,"cssPrefix",{get:function(){return"kdtp"},enumerable:!1,configurable:!0}),t.prototype.setDateTime=function(t){this.currentDateTime=new Date(t),this.calendar&&this.calendar.setDate(this.currentDateTime),this.timePicker&&this.timePicker.setTime(this.currentDateTime)},t.prototype.getDateTime=function(){return new Date(this.currentDateTime)},t.prototype.render=function(){var t=this;this.options.showCalendar&&(this.calendar=this.createCalendar({yearRange:this.options.yearRange,showDateTimeInput:this.options.showDateTimeInput,timePickerIsUsed:this.options.showTimePicker,oneClickDateSelection:this.options.oneClickDateSelection,onDateChanged:function(e,n){t.currentDateTime=e,t.timePicker&&t.timePicker.setTime(t.currentDateTime),t.options.showTimePicker&&t.dateTimeChanged(),n&&t.apply(t.currentDateTime)}}),this.calendar&&this.calendar.render()),this.options.showTimePicker&&(this.timePicker=this.createTimePicker({onTimeChanged:function(e){t.currentDateTime.setHours(e.getHours()),t.currentDateTime.setMinutes(e.getMinutes()),t.calendar&&t.calendar.setDate(t.currentDateTime),t.dateTimeChanged()}}),this.timePicker&&this.timePicker.render()),this.setDateTime(new Date)},t.prototype.createCalendar=function(t){return null},t.prototype.createTimePicker=function(t){return null},t.prototype.show=function(t){this.options.beforeShow&&this.options.beforeShow();var e=A(t||document.body);this.slot.style.top=e.y+t.clientHeight+"px",this.slot.style.left=e.x+"px"},t.prototype.apply=function(t){this.options.onApply&&this.options.onApply(t),this.destroy()},t.prototype.cancel=function(){this.options.onCancel&&this.options.onCancel(),this.destroy()},t.prototype.destroy=function(){this.slot&&this.slot.parentElement&&this.slot.parentElement.removeChild(this.slot)},t.prototype.dateTimeChanged=function(){this.options.onDateTimeChanged&&this.options.onDateTimeChanged(this.currentDateTime)},t}(),ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pt=function(t){function e(e,n){var i=t.call(this,e,n)||this;i.daysOfWeek=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i.calendarBody=null,i.isManualInputChanging=!1;for(var o=0;o<i.daysOfWeek.length;o++)i.daysOfWeek[o]=l.getShortWeekDayName(o+1);for(o=0;o<i.months.length;o++)i.months[o]=l.getLongMonthName(o+1);return i}return ht(e,t),e.prototype.setDate=function(e){t.prototype.setDate.call(this,e),this.selectedMonth=this.currentDate.getMonth(),this.selectedYear=this.currentDate.getFullYear(),this.rerenderMonth()},e.prototype.render=function(){var t=this,e=G("div",this.slot).addClass("".concat(this.cssPrefix,"-header"));this.options.showDateTimeInput?e.addChildElement(this.renderManualDateInput()):e.addChild("span",(function(e){return t.headerTextElem=e.toDOM()})),G(this.slot).addChildElement(this.renderCalendarButtons()),this.calendarBody=G("div",this.slot).addClass("".concat(this.cssPrefix,"-body")).toDOM()},e.prototype.getInputDateFormat=function(){var t=l.getLocaleSettings();return this.options.timePickerIsUsed?"".concat(t.editDateFormat," ").concat(t.editTimeFormat):t.editDateFormat},e.prototype.renderManualDateInput=function(){var t=this,e=this.getInputDateFormat(),n=G("input").attr("placeholder",e).addClass("".concat(this.cssPrefix,"-header-input"));return n.mask(e.replace("yyyy","9999").replace("MM","99").replace("dd","99").replace("HH","99").replace("mm","99").replace("ss","99")).on("input",(function(i){n.removeClass("error");try{t.isManualInputChanging=!0;var o=c.strToDateTime(t.manualInputElem.value,e);t.currentDate=o,t.jump(t.currentDate.getFullYear(),t.currentDate.getMonth()),t.dateChanged(!1)}catch(t){n.addClass("error")}finally{t.isManualInputChanging=!1}})).on("keydown",(function(e){13===e.keyCode&&(e.preventDefault(),e.stopPropagation(),t.manualInputElem.className.indexOf("error")<0&&!t.isManualInputChanging&&t.dateChanged(!0))})).on("focus",(function(){setTimeout((function(){t.manualInputElem.selectionStart=0,t.manualInputElem.selectionEnd=0}),50)})),this.manualInputElem=n.toDOM(),this.manualInputElem},e.prototype.updateDisplayedDateValue=function(){if(this.manualInputElem){if(!this.isManualInputChanging){var t=this.getInputDateFormat();this.manualInputElem.value=c.dateTimeToStr(this.currentDate,t),this.manualInputElem.focus()}}else if(this.headerTextElem){var e=l.getCurrentLocale();this.headerTextElem.innerText=this.currentDate.toLocaleString("en"==e?void 0:e,{year:"numeric",month:"long",day:"numeric"})}},e.prototype.renderCalendarButtons=function(){var t=this;return G("nav").addClass("".concat(this.cssPrefix,"-nav")).addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-nav-prev")).on("click",(function(){t.prev()})).addChild("span",(function(t){return t.html("‹")}))})).addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-nav-selectors")).addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-nav-month")).addChild("select",(function(e){e.on("change",(function(){t.jump(t.selectedYear,parseInt(t.selectMonthElem.value))}));for(var n=function(n){e.addChild("option",(function(e){return e.attr("value",n.toString()).text(t.months[n])}))},i=0;i<t.months.length;i++)n(i);t.selectMonthElem=e.toDOM()}))})).addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-nav-year")).addChild("select",(function(e){return t.selectYearElem=e.on("change",(function(){t.jump(parseInt(t.selectYearElem.value),t.selectedMonth)})).toDOM()}))}))})).addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-nav-next")).on("click",(function(){t.next()})).addChild("span",(function(t){return t.html("›")}))})).toDOM()},e.prototype.prev=function(){this.selectedYear=0===this.selectedMonth?this.selectedYear-1:this.selectedYear,this.selectedMonth=0===this.selectedMonth?11:this.selectedMonth-1,this.rerenderMonth()},e.prototype.next=function(){this.selectedYear=11===this.selectedMonth?this.selectedYear+1:this.selectedYear,this.selectedMonth=(this.selectedMonth+1)%12,this.rerenderMonth()},e.prototype.rerenderSelectYear=function(){var t=/c-(\d*):c\+(\d*)/g.exec(this.options.yearRange),e=0,n=1;null!==t&&(e=parseInt(t[1]),n=parseInt(t[2])),this.selectYearElem.innerHTML="";for(var i=0;i<=e+n;i++){var o=document.createElement("option"),r=this.selectedYear-e+i;o.value=r.toString(),o.innerText=r.toString(),this.selectYearElem.appendChild(o)}},e.prototype.jump=function(t,e){this.selectedYear=t,this.selectedMonth=e,this.rerenderMonth()},e.prototype.rerenderMonth=function(){var t=this;this.updateDisplayedDateValue(),this.rerenderSelectYear();var e=new Date(this.selectedYear,this.selectedMonth).getDay(),n=new Date(this.selectedYear,this.selectedMonth+1,0).getDate();this.calendarBody.innerHTML="",this.selectYearElem.value=this.selectedYear.toString(),this.selectMonthElem.value=this.selectedMonth.toString(),this.daysOfWeek.forEach((function(e,n){G("div",t.calendarBody).addClass("".concat(t.cssPrefix,"-weekday")).addClass(0==n||6==n?"".concat(t.cssPrefix,"-weekend"):"").text(e)}));for(var i=0;i<e;i++)G("div",this.calendarBody).addClass("".concat(this.cssPrefix,"-day-empty"));for(var o=new Date,r=1;r<=n;r++){var a=G("div",this.calendarBody).addClass("".concat(this.cssPrefix,"-day")).attr("data-date",r.toString()).text(r.toString()).on("click",(function(e){t.currentDate.setFullYear(t.selectedYear),t.currentDate.setMonth(t.selectedMonth),t.currentDate.setDate(parseInt(e.target.getAttribute("data-date"))),t.dateChanged(t.options.oneClickDateSelection)}));r===o.getDate()&&this.selectedYear===o.getFullYear()&&this.selectedMonth===o.getMonth()&&a.addClass("".concat(this.cssPrefix,"-day-current")),r===this.currentDate.getDate()&&this.selectedYear===this.currentDate.getFullYear()&&this.selectedMonth===this.currentDate.getMonth()&&a.addClass("".concat(this.cssPrefix,"-day-selected"));var s=(e+r-1)%7;0!=s&&6!=s||a.addClass("".concat(this.cssPrefix,"-weekend"))}var l=(e+n)%7,c=0==l?0:7-l;for(i=0;i<c;i++)G("div",this.calendarBody).addClass("".concat(this.cssPrefix,"-day-empty"))},e.prototype.dateChanged=function(e){t.prototype.dateChanged.call(this,e),this.rerenderMonth()},e}(ut),ft=function(){function t(t,e){this.slot=t,this.options=e||{}}return Object.defineProperty(t.prototype,"cssPrefix",{get:function(){return"kdtp-tp"},enumerable:!1,configurable:!0}),t.prototype.setTime=function(t){this.currentTime=new Date(t)},t.prototype.getTime=function(){return new Date(this.currentTime)},t.prototype.timeChanged=function(){this.options.onTimeChanged&&this.options.onTimeChanged(this.currentTime)},t}(),gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gt(e,t),e.prototype.setTime=function(e){t.prototype.setTime.call(this,e),this.updateDisplayedTime(),this.hoursInput.valueAsNumber=e.getHours(),this.minutesInput.valueAsNumber=e.getMinutes()},e.prototype.render=function(){var t=this;G("div",this.slot).addClass("".concat(this.cssPrefix,"-time")).addChild("span",(function(e){return t.timeText=e.toDOM()})).toDOM();var e=G("div",this.slot).addClass("".concat(this.cssPrefix,"-sliders"));return e.addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-time-row")).title("Hours").addChild("input",(function(e){return t.hoursInput=e.addClass("".concat(t.cssPrefix,"-input-hours")).type("range").attr("min","0").attr("max","23").attr("step","1").on("input",(function(e){t.currentTime.setHours(t.hoursInput.valueAsNumber),t.updateDisplayedTime(),t.timeChanged()})).toDOM()}))})),e.addChild("div",(function(e){return e.addClass("".concat(t.cssPrefix,"-time-row")).title("Minutes").addChild("input",(function(e){return t.minutesInput=e.addClass("".concat(t.cssPrefix,"-input-minutes")).type("range").attr("min","0").attr("max","59").attr("step","1").on("input",(function(e){t.currentTime.setMinutes(t.minutesInput.valueAsNumber),t.updateDisplayedTime(),t.timeChanged()})).toDOM()}))})),this.slot},e.prototype.updateDisplayedTime=function(){var t=l.getCurrentLocale(),e=this.currentTime.toLocaleString("en"==t?void 0:t,{hour:"numeric",minute:"numeric"});this.timeText.innerText=e},e}(ft),yt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e.prototype.render=function(){var e=this,n=G("div",document.body).addClass("".concat(this.cssPrefix)).attr("tabIndex","0").setStyle("position","absolute").setStyle("top","-1000px").setStyle("left","-1000px").on("keydown",(function(t){return 27===t.keyCode?e.cancel():13===t.keyCode&&e.apply(e.getDateTime()),!1}));this.options.zIndex&&n.setStyle("z-index","".concat(this.options.zIndex)),this.slot=n.toDOM(),t.prototype.render.call(this),this.renderButtons(),this.globalMouseDownHandler=function(t){var n=window.event||t;n.srcElement||n.target;return!e.slot.contains(n.target)&&(document.removeEventListener("mousedown",e.globalMouseDownHandler,!0),e.cancel()),!0}},e.prototype.renderButtons=function(){var t=this,e=G("div",this.slot).addClass("".concat(this.cssPrefix,"-buttons")).addChild("button",(function(e){return t.nowButton=e.addClass("".concat(t.cssPrefix,"-button ").concat(t.cssPrefix,"-button-now")).text(l.getText("ButtonNow")).on("click",(function(){return t.setDateTime(new Date),t.dateTimeChanged(),!1})).toDOM()}));!this.options.showTimePicker&&this.options.oneClickDateSelection||e.addChild("button",(function(e){return t.submitButton=e.addClass("".concat(t.cssPrefix,"-button ").concat(t.cssPrefix,"-button-apply")).text(l.getText("ButtonApply")).on("click",(function(){return t.apply(t.getDateTime()),!1})).toDOM()})),e.addChild("button",(function(e){return t.submitButton=e.addClass("".concat(t.cssPrefix,"-button ").concat(t.cssPrefix,"-button-cancel")).text(l.getText("ButtonCancel")).on("click",(function(){return t.cancel(),!1})).toDOM()}))},e.prototype.createCalendar=function(t){return this.calendarSlot=G("div",this.slot).addClass("".concat(this.cssPrefix,"-cal")).toDOM(),new pt(this.calendarSlot,t)},e.prototype.createTimePicker=function(t){return this.timePickerSlot=G("div",this.slot).addClass("".concat(this.cssPrefix,"-tp")).toDOM(),new mt(this.timePickerSlot,t)},e.prototype.show=function(e){var n=this;if(this.options.showDateTimeInput){this.options.beforeShow&&this.options.beforeShow();var i=A(e||document.body),o=A(e?e.parentElement||e:document.body);this.slot.style.top=o.y+"px",this.slot.style.left=i.x+"px"}else t.prototype.show.call(this,e),this.slot.focus();setTimeout((function(){document.addEventListener("mousedown",n.globalMouseDownHandler,!0)}),1)},e}(dt);!function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"}(ot||(ot={}));var bt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wt="kdlg",Ct=function(){function t(){}return t.prototype.openConfirm=function(t,e,n){var i=this,o={title:t,closable:!1,submitable:!0,cancelable:!0,body:'<div id="'.concat(wt,'-dialog-confirm">').concat(e,"</div>")};return n?(o.onSubmit=function(){n(!0)},o.onCancel=function(){n(!1)},void this.open(o)):new Promise((function(t){o.onSubmit=function(){t(!0)},o.onCancel=function(){t(!1)},i.open(o)}))},t.prototype.openPrompt=function(t,e,n,i){var o=this,r={title:t,submitable:!0,closable:!0,cancelable:!0,submitOnEnter:!0,body:'<div id="'.concat(wt,'-dialog-form" class="kfrm-form">\n <div class="kfrm-fields label-above">\n <label for="').concat(wt,'-dialog-form-input" id="').concat(wt,'-dialog-form-content">').concat(e,'</label>\n <input type="text" name="').concat(wt,'-dialog-form-input" id="').concat(wt,'-dialog-form-input" />\n </div>\n </div>'),arrangeParents:!1,beforeOpen:function(){var t=document.getElementById("".concat(wt,"-dialog-form-input"));n&&(t.value=n),t.focus()}},a=function(t){var e=document.getElementById("".concat(wt,"-dialog-form-input")),n=e.value;return n&&n.replace(/\s/g,"").length>0?(t(n),!0):(e.classList.add("eqjs-invalid"),!1)};return i?(r.onSubmit=function(){return a(i)},r.onCancel=function(){i("")},void this.open(r)):new Promise((function(t){r.onSubmit=function(){return a(t)},r.onCancel=function(){t("")},o.open(r)}))},t.prototype.open=function(t,e){var n=this,i=new Dt(t,e),o=t.onDestroy;return t.onDestroy=function(t){n.untrack(t),o&&o(t)},i.open(),this.track(i),i},t.prototype.createSet=function(t){return new xt(t,this)},t.prototype.untrack=function(e){var n=t.openDialogs.indexOf(e);n>=0&&t.openDialogs.splice(n,1)},t.prototype.track=function(e){t.openDialogs.push(e)},t.prototype.openProgress=function(t){var e=this,n=new Tt(t),i=t.onDestroy;return t.onDestroy=function(t){e.untrack(t),i&&i(t)},n.open(),this.track(n),n},t.prototype.getAllDialogs=function(){return Array.from(t.openDialogs)},t.prototype.closeAllDialogs=function(){for(var e=0,n=Array.from(t.openDialogs);e<n.length;e++){n[e].close()}},t.openDialogs=[],t}(),Dt=function(){function t(t,e){var n=this;this.options=t,this.submitHandler=function(t){return(!n.options.onSubmit||!1!==n.options.onSubmit(n,t))&&(n.destroy(),!0)},this.cancelHandler=function(){n.options.onCancel&&n.options.onCancel(n),n.destroy()},this.keydownHandler=function(t){return 13!=t.keyCode||!n.isActiveDialog()||(t.preventDefault(),t.stopPropagation(),!n.submitHandler())||(window.removeEventListener("keydown",n.keydownHandler,!1),!1)},this.dialogId=c.generateId("dlg"),this.data=e,this.slot=G("div",document.body).attr("tab-index","-1").data("dialog-id",this.dialogId).addClass("".concat(wt,"-modal"),"is-active").focus().addChild("div",(function(t){return t.addClass("kdlg-modal-background")})).addChild("div",(function(i){return n.windowElement=i.addClass("".concat(wt,"-modal-window")).addChild("header",(function(e){n.headerElement=e.addClass("".concat(wt,"-header")).addChild("p",(function(e){return e.addClass("".concat(wt,"-header-title")).addText(t.title)})).toDOM(),!1!==t.closable&&e.addChild("button",(function(t){return t.addClass("".concat(wt,"-modal-close")).on("click",(function(){n.cancelHandler()})).focus()}))})).addChild("div",(function(t){t.addClass("".concat(wt,"-alert-container")),n.alertElement=t.toDOM()})).addChild("section",(function(i){if(n.bodyElement=i.addClass("".concat(wt,"-body")).toDOM(),"string"==typeof t.body){var o=T.renderLiquidTemplate(t.body,e);i.addHtml(o)}else i.addChildElement(t.body)})).addChild("footer",(function(e){var i=null;i=t.footerAlignment&&t.footerAlignment==ot.Center?"align-center":"align-right",n.footerElement=e.addClass("".concat(wt,"-footer")).toDOM(),e.addClass(i),!1!==t.submitable&&(e.addChild("button",(function(e){e.id(n.dialogId+"-btn-submit").addClass("kfrm-button","is-info").addText(t.submitButtonText||l.getText("ButtonOK")),t.recaptchaSiteKey?(e.data("sitekey",t.recaptchaSiteKey),e.addClass("g-recaptcha"),e.on("click",(function(e){grecaptcha?grecaptcha.ready((function(){grecaptcha.execute(t.recaptchaSiteKey,{action:"submit"}).then((function(t){n.submitHandler(t)}))})):n.submitHandler()}))):e.on("click",(function(t){n.submitHandler()})),e.focus()})),!1!==t.cancelable&&e.addChild("button",(function(e){return e.id(n.dialogId+"-btn-cancel").addClass("kfrm-button").addText(t.cancelButtonText||l.getText("ButtonCancel")).on("click",(function(t){n.cancelHandler()}))})))})).toDOM()})).toDOM()}return t.prototype.getData=function(){return this.data},t.prototype.getRootElement=function(){return this.slot},t.prototype.getSubmitButtonElement=function(){return document.getElementById(this.dialogId+"-btn-submit")},t.prototype.getCancelButtonElement=function(){return document.getElementById(this.dialogId+"-btn-cancel")},t.prototype.open=function(){var t=this;this.options.beforeOpen&&this.options.beforeOpen(this),G(this.slot).show(),this.options.arrangeParents&&this.arrangeParents(!0);var e=this.slot.querySelector(".".concat(wt,"-modal-window"));this.options.height&&(e.style.height="string"==typeof this.options.height?this.options.height:"".concat(this.options.height,"px")),this.options.width&&(e.style.width="string"==typeof this.options.width?this.options.width:"".concat(this.options.width,"px")),this.options.submitOnEnter&&window.addEventListener("keydown",this.keydownHandler,!1),this.slot.querySelectorAll("input").forEach((function(e){return e.addEventListener("input",(function(){t.clearAlert(),t.options.onInput&&t.options.onInput(t)}))})),this.options.onShow&&this.options.onShow(this)},t.prototype.submit=function(){this.submitHandler()},t.prototype.cancel=function(){this.cancelHandler()},t.prototype.close=function(){this.destroy()},t.prototype.disableButtons=function(){this.slot.querySelectorAll("button").forEach((function(t){return t.disabled=!0}))},t.prototype.enableButtons=function(){this.slot.querySelectorAll("button").forEach((function(t){return t.disabled=!1}))},t.prototype.showAlert=function(t,e,n){var i=G("div").addClass("".concat(wt,"-alert ").concat(e||"")).addChild("span",(function(t){return t.addClass("".concat(wt,"-alert-closebtn")).text("×").on("click",(function(t){var e=t.target.parentElement;e.parentElement.removeChild(e)}))})).addText(t).toDOM();!0===n&&this.clearAlert(),this.alertElement.appendChild(i)},t.prototype.clearAlert=function(){this.alertElement.innerHTML=""},t.prototype.destroy=function(){document.querySelectorAll('[data-dialog-id="'.concat(this.dialogId,'"]')).length<=0||(this.options.arrangeParents&&this.arrangeParents(!1),document.body.removeChild(this.slot),this.options.submitOnEnter&&window.removeEventListener("keydown",this.keydownHandler,!1),this.options.onDestroy&&this.options.onDestroy(this))},t.prototype.isActiveDialog=function(){var t=document.documentElement.querySelectorAll(".kdlg-modal");return t[t.length-1]===this.slot},t.prototype.arrangeParents=function(t){for(var e=document.documentElement.querySelectorAll(".kdlg-modal-window"),n=0;n<e.length-1;n++)if(t){var i=0==n?20:40*n+20;G(e[n]).setStyle("margin-top","".concat(i,"px")).setStyle("margin-left","".concat(i,"px"))}else G(e[n]).removeStyle("margin-top").removeStyle("margin-left")},t}(),Tt=function(t){function e(e,n){var i,o,r=this,a=G("div").addChild("div",(function(t){return i=t.text(e.content||"").toDOM()})).addChild("div",(function(t){t.addClass("".concat(wt,"-progress-line")).addChild("div",(function(t){o=t.addClass("fill").toDOM(),e.determinated?t.setStyle("width","0%"):t.addClass("indeterminate")}))})).toDOM();return(r=t.call(this,{title:e.title,body:a,beforeOpen:e.beforeOpen,onSubmit:e.onSubmit,width:e.width,height:e.height,submitable:!1,cancelable:!1,closable:!1,onDestroy:e.onDestroy},n)||this).contentElement=i,r.progressElement=o,r}return bt(e,t),e.prototype.updateContent=function(t){this.contentElement.innerText=t},e.prototype.updateProgress=function(t){var e=this;t=this.in01(t),this.progressElement.style.width="".concat(100*t,"%"),1===t&&setTimeout((function(){e.submit()}),500)},e.prototype.in01=function(t){return t>1?1:t<0?0:t},e}(Dt),xt=function(){function t(t,e){this.options=t,this.dialogService=e,this.currentDialog=null,this.currentIndex=0,this.options=t,this.dialogService=e}return t.prototype.getCurrent=function(){return this.currentDialog},t.prototype.openNext=function(t){return this.open(this.currentIndex+1,t)},t.prototype.openPrev=function(t){return this.open(this.currentIndex-1,t)},t.prototype.open=function(t,e){if(t<0?this.currentIndex=0:t>=this.options.length?this.currentIndex=this.options.length-1:this.currentIndex=t,this.currentDialog)try{this.currentDialog.close()}catch(t){}var n=this.options[this.currentIndex];return this.currentDialog=this.dialogService.open(n,e),this.currentDialog},t.prototype.close=function(){this.currentDialog&&(this.currentDialog.close(),this.currentDialog=null)},t}();l.updateDefaultTexts({GridPageInfo:"{FirstPageRecordNum} - {LastPageRecordNum} of {Total} records",GridItemsPerPage:"items per page",ButtonOK:"OK",ButtonCancel:"Cancel",ButtonApply:"Apply",ButtonNow:"Now",LblTotal:"Total"});new Ct;var Et="yyyy-MM-dd",It="HH:mm",St=function(e){var n=l.getLocaleSettings();return e==t.Date?n.editDateFormat:e==t.Time?n.editTimeFormat:"".concat(n.editDateFormat," ").concat(n.editTimeFormat)},Mt=function(t){var e=window.history.state;history.pushState(e,document.title,t),window.dispatchEvent(new Event("ed_set_location"))},Pt=function(){},kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rt=function(t){function e(){var e=t.call(this)||this;return e.name="DateTime",e}return kt(e,t),e.prototype.validate=function(t,e){if(!c.IsDefinedAndNotNull(e)||""==e)return{successed:!0};if(c.getDateDataTypes().indexOf(t.dataType)>=0)try{var n=St(t.dataType);c.strToDateTime(e,n)}catch(t){return{successed:!1,messages:[l.getText("DateTimeError")]}}return{successed:!0}},e}(Pt),Ot=function(){function e(t){this.context=t,this.validators=[new Rt]}return e.prototype.getHtml=function(){return this.html},e.prototype.setHtmlInt=function(t){this.html=t,this.errorsDiv=this.html.querySelector(".errors-block")},e.prototype.validate=function(){this.clearErrors();for(var t=!0,e=0,n=Array.from(this.html.querySelectorAll("input, select"));e<n.length;e++){var i=n[e],o=this.context.getMetaData().getAttributeById(i.name);if("checkbox"!==i.type){var r=this.validateValue(o,i.value);if(!r.successed){t&&G(this.errorsDiv).addChild("ul"),t=!1;for(var a=0,s=r.messages;a<s.length;a++){var l=s[a];this.errorsDiv.firstElementChild.innerHTML+="<li>".concat(o.caption,": ").concat(l,"</li>")}}this.markInputValid(i,r.successed)}}return t},e.prototype.getData=function(){var t=this;return new Promise((function(e,n){for(var i=[],o=Array.from(t.html.querySelectorAll("input, select, textarea")),r={},a=function(e){var n=e.name.substring(e.name.lastIndexOf(".")+1),o=t.context.getMetaData().getAttributeById(e.name);"checkbox"===e.type?r[n]=e.checked:"file"===e.type?i.push(t.fileToBase64(e.files[0]).then((function(t){return r[n]=t}))):r[n]=t.mapValue(o.dataType,e.value)},s=0,l=o;s<l.length;s++){a(l[s])}Promise.all(i).then((function(){return e(r)})).catch((function(t){return n(t)}))}))},e.prototype.fileToBase64=function(t){return new Promise((function(e,n){var i=new FileReader;i.readAsDataURL(t),i.onload=function(){var t=i.result.toString();e(t.substring(t.indexOf(",")+1))},i.onerror=function(t){return n(t)}}))},e.prototype.useValidator=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.useValidators(t)},e.prototype.useValidators=function(t){this.validators=this.validators.concat(t)},e.prototype.mapValue=function(e,n){if(c.getDateDataTypes().indexOf(e)>=0){if(e!==t.Time&&n&&n.length){var i=St(e),o=(a=e)==t.Date?Et:a==t.Time?It:"".concat(Et,"T").concat(It),r=c.strToDateTime(n,i);return c.dateTimeToStr(r,o)}return n&&n.length?n:null}var a;return c.isIntType(e)?parseInt(n):c.isNumericType(e)?parseFloat(n):n},e.prototype.clearErrors=function(){this.errorsDiv.innerHTML="",this.html.querySelectorAll("input, select").forEach((function(t){t.classList.remove("is-valid"),t.classList.remove("is-invalid")}))},e.prototype.markInputValid=function(t,e){t.classList.add(e?"is-valid":"is-invalid")},e.prototype.validateValue=function(t,e){for(var n={successed:!0,messages:[]},i=0,o=this.validators;i<o.length;i++){var r=o[i].validate(t,e);r.successed||(n.successed=!1,n.messages=n.messages.concat(r.messages))}return n},e}(),_t=function(){function t(t,e,n,i){var o=this;this.slot=t,this.grid=e,this.filter=n,this.options={focus:!1,instantMode:!1,instantTimeout:1e3},this.options=c.assignDeep(this.options,i||{});var r=this.grid.cellRendererStore.getDefaultRendererByType(X.STRING);this.grid.cellRendererStore.setDefaultRenderer(X.STRING,(function(t,e,n,i){return o.highlightCellRenderer(r,t,e,n,i)}));var a=this.grid.cellRendererStore.getDefaultRendererByType(X.NUMBER);this.grid.cellRendererStore.setDefaultRenderer(X.NUMBER,(function(t,e,n,i){return o.highlightCellRenderer(a,t,e,n,i)})),this.render()}return t.prototype.render=function(){var t=this,e=_.z.IsIE()?"kfrm-fields-ie is-horizontal":"kfrm-fields is-horizontal",n=_.z.IsIE()||_.z.IsEdge();G(this.slot).addClass(e).addChild("div",(function(e){e.addClass("control").addChild("input",(function(e){t.filterInput=e.toDOM(),e.attr("placeholder",l.getText("SearchInputPlaceholder")).type("text"),e.on("keydown",t.inputKeydownHandler.bind(t)),t.options.instantMode&&e.on("keyup",t.inputKeyupHandler.bind(t))})),n||e.addClass("has-icons-right").addChild("span",(function(e){e.addClass("icon").addClass("is-right").addClass("is-clickable").html("🗙").on("click",t.clearButtonClickHander.bind(t))}))})),this.options.instantMode||G(this.slot).addChild("button",(function(e){return e.addClass("kfrm-button").addText(l.getText("SearchBtn")).on("click",t.searchButtonClickHandler.bind(t))})),this.options.focus&&this.filterInput.focus()},t.prototype.inputKeydownHandler=function(t){13==t.keyCode&&this.applyFilter(!0)},t.prototype.inputKeyupHandler=function(){var t=this;this.applyFilterTimeout&&clearTimeout(this.applyFilterTimeout),this.applyFilterTimeout=setTimeout((function(){t.applyFilter(!0)}),this.options.instantTimeout)},t.prototype.clearButtonClickHander=function(){this.filterInput.value="",this.filterInput.focus(),this.applyFilter(!0)},t.prototype.searchButtonClickHandler=function(){this.applyFilter(!0)},t.prototype.applyFilter=function(t){var e=this;this.applyFilterTimeout&&clearTimeout(this.applyFilterTimeout);var n=this.filter.getValue();return(!t||n!=this.filterInput.value)&&(this.filter.apply(this.filterInput.value).then((function(t){e.grid.setData(t)})),!0)},t.prototype.highlightCellRenderer=function(t,e,n,i,o){if((c.isNumericType(n.type)||c.getStringDataTypes().indexOf(n.type)>=0)&&e){e=n.dataColumn&&n.dataColumn.displayFormat&&Z.test(n.dataColumn.displayFormat)?n.dataColumn.displayFormat.replace(Z,(function(t,n){return l.numberToStr(e,n)})):e.toLocaleString();var r=this.highlightText(e.toString());if(r instanceof HTMLElement)return i.title=e,void i.appendChild(r)}t(e,n,i,o)},t.prototype.highlightText=function(t){var e=t.toLowerCase(),n=this.filter.getValue().toString();if(n&&n.length>0&&t&&t.length>0){for(var i=[],o=n.split("||").map((function(t){return t.trim().toLowerCase()})),r=0;r<o.length;r++){var a=0,s=o[r];if(s.length){if(s===e)return(p=document.createElement("span")).style.backgroundColor="yellow",p.innerText=t,p;for(;a<t.length-1;){var l=e.indexOf(s,a);l>=0?(i.push({index:l,length:o[r].length}),a=l+s.length):a++}}}if(i.length>0){i.sort((function(t,e){return t.index>e.index?1:t.index==e.index2?0:-1}));for(r=0;r<i.length-1;){var c=i[r+1].index-(i[r].index+i[r].length);if(c<0){var u=i[r+1].length+c;u>0&&(i[r].length+=u),i.splice(r+1,1)}else r++}var d=document.createElement("div");for(r=0;r<i.length;r++){if(0===r){var h=document.createTextNode(t.substring(0,i[r].index));d.appendChild(h)}var p;(p=document.createElement("span")).style.backgroundColor="yellow",p.innerText=t.substring(i[r].index,i[r].index+i[r].length),d.appendChild(p);var f=r<i.length-1?document.createTextNode(t.substring(i[r].index+i[r].length,i[r+1].index)):document.createTextNode(t.substring(i[r].index+i[r].length));d.appendChild(f)}return d}}return t},t}(),At=function(){return At=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},At.apply(this,arguments)},Lt=_.z.IsIE(),Nt=function(){function n(t,e){this.context=t,this.params=e,this.params=e||{},this.reset()}return n.prototype.reset=function(){this.form=new Ot(this.context)},n.prototype.setupLookupField=function(t,e,n,i){var o=this,r=this.context.getMetaData().getRootEntity().subEntities.filter((function(t){return t.id==e.lookupEntity}))[0],a=this.context.getMetaData().getAttributeById(e.dataAttr);if(a){n=n||!a.isEditable,i=this.params.values?this.params.values.getValue(a.id):void 0;var s,u=Lt?"kfrm-fields-ie is-horizontal":"kfrm-fields is-horizontal";G(t).addChild("div",(function(t){t.addClass(u).addChild("input",(function(t){s=t.toDOM(),t.attr("readonly",""),t.name(a.id),t.type(o.resolveInputType(a.dataType)),t.value(c.IsDefinedAndNotNull(i)?i.toString():"")})),n||t.addChild("button",(function(t){return t.addClass("kfrm-button").attr("title",l.getText("NavigationBtnTitle")).addText("...").on("click",(function(n){var i=new S({loader:{loadChunk:function(t){return o.context.getDataLoader().loadChunk(At(At({},t),{id:r.id}))}}});o.context.getDataLoader().loadChunk({offset:0,limit:1e3,needTotal:!0,sourceId:r.id}).then((function(n){for(var a,c=function(t){var e=r.attributes.filter((function(e){return e.id==t.id&&(e.isPrimaryKey||e.showInLookup)}));e.length&&i.columns.add(t)},u=0,d=n.table.columns.getItems();u<d.length;u++){c(d[u])}i.setTotal(n.total);for(var h=0,p=n.table.getCachedRows();h<p.length;h++){var f=p[h];i.addRow(f)}var g,m=new Ct,y=null,v=null,b=G("div").addClass("kfrm-form").addChild("div",(function(t){return t.addClass("kfrm-field").addChild("label",(function(t){return t.addText(l.getText("LookupSelectedItem")).toDOM()})).addChild("div",(function(t){return v=t.addText("None").toDOM()}))})).addChild("div",(function(t){return g=t.toDOM()})).addChild("div",(function(t){return t.addClass("kfrm-control").addChild("div",(function(t){return y=t.toDOM()}))})).toDOM(),w=s.value,C=function(t){v.innerHTML=i.columns.getItems().map((function(e){return"<b>".concat(e.label,":</b> ").concat(function(t,e){return t instanceof I?t.getValue(e):t[e.substring(e.lastIndexOf(".")+1)]}(t,e.id))})).join(", ")};if(w){var D=r.getFirstPrimaryAttr(),T=D.id.substring(D.id.lastIndexOf(".")+1);o.context.fetchRecord((a={},a[T]=w,a),r.id).then((function(t){t.entity&&C(t.entity)})).catch((function(t){console.error(t)}))}var x=new ct({slot:y,dataTable:i,fixHeightOnFirstRender:!0,paging:{pageSize:10},onActiveRowChanged:function(t){x.getData().getRow(t.rowIndex).then((function(t){w=t.getValue(e.lookupDataAttr),C(t)}))}});m.open({title:l.getText("LookupDlgCaption").replace("{entity}",r.caption),body:b,arrangeParents:!0,beforeOpen:function(){var t=o.context.createFilter(r.id,x.getData(),!0);new _t(g,x,t,{instantMode:!0,focus:!0})},onSubmit:function(){return s.value=w,!0},onDestroy:function(){x.destroy(),t.toDOM().focus()}})}))}))}))}))}},n.prototype.setupDateTimeField=function(e,n,i,o,r){var a,s=this,u=Lt?"kfrm-fields-ie is-horizontal":"kfrm-fields is-horizontal",d=St(n.dataType),h=d.replace("yyyy","9999").replace("MM","99").replace("dd","99").replace("HH","99").replace("mm","99").replace("ss","99");G(e).addChild("div",(function(e){e.addClass(u).addChild("input",(function(t){a=t.toDOM(),t.name(n.id),t.type(r?"hidden":s.resolveInputType(n.dataType)),o?t.attr("readonly",""):(t.mask(h),t.on("keypress",(function(t){return s.applySumbit(t)})).on("input",(function(e){t.removeClass("is-invalid");try{c.strToDateTime(a.value,d)}catch(e){t.addClass("is-invalid")}})).on("blur",(function(t){a.value===h.replace(/[9]/g,"_")&&(a.value="")}))),t.value(c.IsDefinedAndNotNull(i)?c.dateTimeToStr(i,d):"")})),o||e.addChild("button",(function(e){return e.addClass("kfrm-button").attr("title",l.getText(n.dataType!==t.Time?"CalendarBtnTitle":"TimerBtnTitle")).addChild("i",(function(e){return e.addClass(n.dataType!==t.Time?"ed-calendar-icon":"ed-timer-icon")})).on("click",(function(e){var i;try{i=a.value.length?n.dataType!==t.Time?c.strToDateTime(a.value,d):c.strToTime(a.value):new Date((new Date).setSeconds(0))}catch(t){i=new Date((new Date).setSeconds(0))}var o={zIndex:9999999999,showCalendar:n.dataType!==t.Time,showTimePicker:n.dataType!==t.Date,onApply:function(t){t.setSeconds(0),t.setMilliseconds(0),a.value=c.dateTimeToStr(t,d)}},r=new vt(o);r.setDateTime(i),r.show(e.target)})).toDOM()}))}))},n.prototype.setupListField=function(t,e,n,i,o){var r=this;G(t).addChild("div",(function(t){return t.addClass("kfrm-select full-width").addChild("select",(function(t){if(o&&t.attr("readonly",""),t.attr("name",e.id),t.on("keypress",(function(t){return r.applySumbit(t)})),i)for(var a=0;a<i.length;a++){var s=i[a];t.addOption({value:s.id,title:s.text,selected:0===a})}t.value(n)}))}))},n.prototype.setupFileField=function(t,e,n,i){var o=this;G(t).addChild("input",(function(t){n&&t.attr("readonly",""),t.name(e.id).type(o.resolveInputType(e.dataType)),t.attr("accept",i)}))},n.prototype.setupTextField=function(e,n,i,o,r){var a=this;G(e).addChild("input",(function(e){o&&e.attr("readonly",""),e.type(r?"hidden":a.resolveInputType(n.dataType)),e.name(n.id).type(a.resolveInputType(n.dataType)),n.dataType==t.Bool?i&&e.attr("checked",""):e.on("keypress",(function(t){return a.applySumbit(t)})).value(c.IsDefinedAndNotNull(i)?i.toString():"")}))},n.prototype.setupTextArea=function(t,e,n,i){G(t).addChild("textarea",(function(t){i&&t.attr("readonly",""),t.attr("name",e.id),t.setStyle("height","120px"),t.value(c.IsDefinedAndNotNull(n)?n.toString():"")}))},n.prototype.addFormField=function(t,n){var i=this.params.values&&n.kind!==e.Lookup?this.params.values.getValue(n.id):this.params.isEditForm?void 0:n.defaultValue,o=this.resolveEditor(n),l=this.params.isEditForm&&(n.isPrimaryKey||!n.isEditable),c=!n.isNullable;Lt&&(t=G("div",t).addClass("kfrm-field-ie").toDOM()),G(t).addChild("label",(function(t){t.attr("for",n.id),t.addHtml("".concat(n.caption," ").concat(c?'<sup style="color: red">*</sup>':"",": ")),n.description&&t.addChild("div",(function(t){return t.attr("title",n.description).addClass("question-mark").setStyle("vertical-align","middle").setStyle("display","inline-block")}))}));var u=n.isPrimaryKey;if(n.kind!==e.Lookup)switch(o.tag){case r:this.setupDateTimeField(t,n,i,l,u);break;case a:this.setupListField(t,n,i,o.values,l);break;case s:this.setupFileField(t,n,l,o.accept);break;default:o.multiline?this.setupTextArea(t,n,i,l):this.setupTextField(t,n,i,l,u)}else this.setupLookupField(t,n,l,i)},n.prototype.resolveInputType=function(e){return e===t.Bool?"checkbox":e===t.Blob?"file":"text"},n.prototype.resolveEditor=function(t){var e=t.defaultEditor||new w;return e.tag==i&&(c.getDateDataTypes().indexOf(t.dataType)>=0?e.tag=r:e.tag=o),e},n.prototype.applySumbit=function(t){return 13===t.keyCode&&(this.sumbitCallback&&this.sumbitCallback(),!1)},n.prototype.onSubmit=function(t){return this.sumbitCallback=t,this},n.prototype.build=function(){var t,e=G("div").addClass("kfrm-form").addChild("div",(function(t){return t.addClass("errors-block").toDOM()})).addChild("div",(function(e){e.addClass("".concat(Lt?"kfrm-fields-ie col-ie-1-4 label-align-right":"kfrm-fields col-a-1 label-align-right")),t=e})).toDOM();this.form.setHtmlInt(e);for(var n=0,i=this.context.getActiveEntity().attributes;n<i.length;n++){var o=i[n];(this.params.isEditForm||o.showOnCreate)&&((o.isPrimaryKey||!this.params.isEditForm||o.showOnEdit)&&this.addFormField(t.toDOM(),o))}return this.form},n}(),Ft=function(){function t(t){this.slot=t,this.hide(),this.slot.classList.add("ed-progress-bar")}return t.prototype.show=function(){this.slot.style.removeProperty("display")},t.prototype.hide=function(){this.slot.style.display="none"},t}(),Bt=function(){function t(t){this.context=t}return t.prototype.loadChunk=function(t){var e=this,n=this.context.resolveEndpoint("FetchDataset",{sourceId:t.sourceId||this.context.getActiveEntity().id});return delete t.sourceId,this.context.startProcess(),this.context.getHttpClient().post(n,t).then((function(e){for(var n=new S({chunkSize:1e3}),i=e.resultSet,o=0,r=i.cols;o<r.length;o++){var a=r[o];n.columns.add(a)}for(var s=0,l=i.rows;s<l.length;s++){var c=l[s];n.addRow(c)}var u=0;return e.meta&&e.meta.totalRecords&&(u=e.meta.totalRecords),{table:n,total:u,hasNext:!t.needTotal||t.offset+t.limit<u}})).finally((function(){e.context.endProcess()}))},t}(),Ht=function(){return Ht=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ht.apply(this,arguments)},Vt=function(){function t(t){this.endpoints=new Map,this.endpointVarsRegex=/\{.*?\}/g,this.options=t||{},this.http=new y,this.model=new C,this.model.id=t.metaDataId||"__default",this.dataLoader=new Bt(this);var e=Ht({loader:this.dataLoader},t.dataTable);this.data=new S(e),this.setDefaultEndpoints(this.options.endpoint||"/api/easydata")}return t.prototype.getActiveEntity=function(){return this.activeEntity},t.prototype.setActiveSource=function(t){this.activeEntity=this.model.getRootEntity().subEntities.filter((function(e){return e.id==t}))[0]},t.prototype.getMetaData=function(){return this.model},t.prototype.getData=function(){return this.data},t.prototype.getDataLoader=function(){return this.dataLoader},t.prototype.createFilter=function(t,e,n){return new O(this.dataLoader,e||this.getData(),t||this.activeEntity.id,n)},t.prototype.loadMetaData=function(){var t=this,e=this.resolveEndpoint("GetMetaData");return this.startProcess(),this.http.get(e).then((function(e){return e.model&&t.model.loadFromData(e.model),t.model})).catch((function(t){return console.error("Error: ".concat(t.message,". Source: ").concat(t.sourceError)),null})).finally((function(){t.endProcess()}))},t.prototype.getHttpClient=function(){return this.http},t.prototype.fetchDataset=function(){var t=this;return this.data.clear(),this.dataLoader.loadChunk({offset:0,limit:this.data.chunkSize,needTotal:!0}).then((function(e){for(var n=0,i=e.table.columns.getItems();n<i.length;n++){var o=i[n];t.data.columns.add(o)}t.data.setTotal(e.total);for(var r=0,a=e.table.getCachedRows();r<a.length;r++){var s=a[r];t.data.addRow(s)}return t.data}))},t.prototype.fetchRecord=function(t,e){var n=this,i=this.resolveEndpoint("FetchRecord",{sourceId:e||this.activeEntity.id});return this.startProcess(),this.http.get(i,{queryParams:t}).finally((function(){return n.endProcess()}))},t.prototype.createRecord=function(t,e){var n=this,i=this.resolveEndpoint("CreateRecord",{sourceId:e||this.activeEntity.id});return this.startProcess(),this.http.post(i,t,{dataType:"json"}).finally((function(){return n.endProcess()}))},t.prototype.updateRecord=function(t,e){var n=this,i=this.resolveEndpoint("UpdateRecord",{sourceId:e||this.activeEntity.id});return this.startProcess(),this.http.post(i,t,{dataType:"json"}).finally((function(){return n.endProcess()}))},t.prototype.deleteRecord=function(t,e){var n=this,i=this.resolveEndpoint("DeleteRecord",{sourceId:e||this.activeEntity.id});return this.startProcess(),this.http.post(i,t,{dataType:"json"}).finally((function(){return n.endProcess()}))},t.prototype.setEndpoint=function(t,e){this.endpoints.set(t,e)},t.prototype.setEnpointIfNotExist=function(t,e){this.endpoints.has(t)||this.endpoints.set(t,e)},t.prototype.resolveEndpoint=function(t,e){e=e||{};var n=this.endpoints.get(t);if(!n)throw t+" endpoint is not defined";var i=n.match(this.endpointVarsRegex);if(i)for(var o=0,r=i;o<r.length;o++){var a=r[o],s=a.substring(1,a.length-1),l=e[s];if(!l)if("modelId"==s)l=this.model.getId();else{if("sourceId"!=s)throw"Parameter [".concat(s,"] is not defined");l=this.activeEntity.id}n=n.replace(a,l)}return n},t.prototype.startProcess=function(){this.options.onProcessStart&&this.options.onProcessStart()},t.prototype.endProcess=function(){this.options.onProcessEnd&&this.options.onProcessEnd()},t.prototype.setDefaultEndpoints=function(t){this.setEnpointIfNotExist("GetMetaData",k(t,"models/{modelId}")),this.setEnpointIfNotExist("FetchDataset",k(t,"models/{modelId}/sources/{sourceId}/fetch")),this.setEnpointIfNotExist("FetchRecord",k(t,"models/{modelId}/sources/{sourceId}/fetch")),this.setEnpointIfNotExist("CreateRecord",k(t,"models/{modelId}/sources/{sourceId}/create")),this.setEnpointIfNotExist("UpdateRecord",k(t,"models/{modelId}/sources/{sourceId}/update")),this.setEnpointIfNotExist("DeleteRecord",k(t,"models/{modelId}/sources/{sourceId}/delete"))},t}(),jt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gt=function(t){function e(){var e=t.call(this)||this;return e.name="Type",e}return jt(e,t),e.prototype.validate=function(t,e){if(!c.IsDefinedAndNotNull(e)||""==e)return{successed:!0};if(c.isNumericType(t.dataType)){if(!c.isNumeric(e))return{successed:!1,messages:[l.getText("NumberError")]};if(c.isIntType(t.dataType)&&!Number.isInteger(Number.parseFloat(e)))return{successed:!1,messages:[l.getText("IntNumberError")]}}return{successed:!0}},e}(Pt),zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qt=function(t){function e(){var e=t.call(this)||this;return e.name="Required",e}return zt(e,t),e.prototype.validate=function(t,e){return t.isNullable||c.IsDefinedAndNotNull(e)&&""!==e?{successed:!0}:{successed:!1,messages:[l.getText("RequiredError")]}},e}(Pt),Ut=function(){function t(t,e,n,i){var o=this;this.slot=t,this.context=e,this.basePath=n,this.options={showFilterBox:!0,showBackToEntities:!0},this.defaultValidators=[new qt,new Gt],this.options=c.assignDeep(this.options,i||{}),this.dlg=new Ct;var r=this.context.getActiveEntity();if(!r)throw"Can't find active entity for "+window.location.pathname;this.slot.innerHTML+="<h1>".concat(r.captionPlural||r.caption,"</h1>"),this.options.showBackToEntities&&G(this.slot).addChild("a",(function(t){return t.attr("href","javascript:void(0)").text("← ".concat(l.getText("BackToEntities"))).on("click",(function(t){t.preventDefault(),Mt(o.basePath)}))})),this.renderGrid()}return t.prototype.syncGridColumnHandler=function(t){if(t.dataColumn){var e=this.context.getMetaData().getAttributeById(t.dataColumn.id);e&&(t.isVisible=e.showOnView)}},t.prototype.renderGrid=function(){var t=this;this.context.fetchDataset().then((function(e){var n=document.createElement("div");if(t.slot.appendChild(n),n.id="Grid",t.grid=new ct(c.assignDeep({slot:n,dataTable:e,paging:{pageSize:15,allowPageSizeChange:!0,pageSizeItems:[15,30,50,100,200]},showPlusButton:t.context.getActiveEntity().isEditable,plusButtonTitle:l.getText("AddRecordBtnTitle"),showActiveRow:!1,onPlusButtonClick:t.addClickHandler.bind(t),onGetCellRenderer:t.manageCellRenderer.bind(t),onRowDbClick:t.rowDbClickHandler.bind(t),onSyncGridColumn:t.syncGridColumnHandler.bind(t)},t.options.grid||{})),t.options.showFilterBox){var i,o=G("div").addClass("kfrm-form").setStyle("margin","10px 0px").addChild("div",(function(t){return i=t.toDOM()})).toDOM();t.slot.insertBefore(o,n);var r=t.context.createFilter();t.filterWidget=new _t(i,t.grid,r)}}))},t.prototype.manageCellRenderer=function(t,e){var n=this;if(t.isRowNum)return t.width=110,function(t,e,i,o){var r=G("div",i).addClass("keg-cell-value");n.context.getActiveEntity().isEditable&&r.addChild("a",(function(t){return t.attr("href","javascript:void(0)").text(l.getText("EditBtn")).on("click",(function(t){return n.editClickHandler(t,parseInt(o.getAttribute("data-row-idx")))}))})).addChild("span",(function(t){return t.text(" | ")})).addChild("a",(function(t){return t.attr("href","javascript:void(0)").text(l.getText("DeleteBtn")).on("click",(function(t){return n.deleteClickHandler(t,parseInt(o.getAttribute("data-row-idx")))}))}))}},t.prototype.addClickHandler=function(){var t=this,e=this.context.getActiveEntity(),n=new Nt(this.context).onSubmit((function(){return i.submit()})).build();n.useValidators(this.defaultValidators);var i=this.dlg.open({title:l.getText("AddDlgCaption").replace("{entity}",e.caption),body:n.getHtml(),onSubmit:function(){if(!n.validate())return!1;n.getData().then((function(e){return t.context.createRecord(e)})).then((function(){return t.refreshData()})).catch((function(e){t.processError(e)}))}})},t.prototype.editClickHandler=function(t,e){var n=this;this.grid.getData().getRow(e).then((function(t){t&&n.showEditForm(t)}))},t.prototype.showEditForm=function(t){var e=this,n=this.context.getActiveEntity(),i=new Nt(this.context,{isEditForm:!0,values:t}).onSubmit((function(){return o.submit()})).build();i.useValidators(this.defaultValidators);var o=this.dlg.open({title:l.getText("EditDlgCaption").replace("{entity}",n.caption),body:i.getHtml(),onSubmit:function(){if(!i.validate())return!1;i.getData().then((function(t){return e.context.updateRecord(t)})).then((function(){return e.refreshData()})).catch((function(t){e.processError(t)}))}})},t.prototype.rowDbClickHandler=function(t){this.context.getActiveEntity().isEditable&&this.showEditForm(t.row)},t.prototype.deleteClickHandler=function(t,e){var n=this;this.grid.getData().getRow(e).then((function(t){if(t){var e=n.context.getActiveEntity(),i=e.getPrimaryAttrs(),o=i.map((function(e){return t.getValue(e.id)})),r=i.reduce((function(t,e,n){return t[e.id.substring(e.id.lastIndexOf(".")+1)]=o[n],t}),{});n.dlg.openConfirm(l.getText("DeleteDlgCaption").replace("{entity}",e.caption),l.getText("DeleteDlgMessage").replace("{recordId}",Object.keys(r).map((function(t){return"".concat(t,":").concat(r[t])})).join(";"))).then((function(t){t&&n.context.deleteRecord(r).then((function(){return n.refreshData()})).catch((function(t){n.processError(t)}))}))}}))},t.prototype.processError=function(t){this.dlg.open({title:"Ooops, something went wrong",body:t.message,closable:!0,cancelable:!1})},t.prototype.refreshData=function(){var t=this;return this.context.fetchDataset().then((function(){var e=!1;t.filterWidget&&(e=t.filterWidget.applyFilter(!1)),e||t.grid.refresh()}))},t}(),Wt=function(){function t(t,e,n){this.slot=t,this.context=e,this.basePath=n,this.metaData=this.context.getMetaData(),this.slot.innerHTML+="<h1>".concat(l.getText("RootViewTitle"),"</h1>"),this.renderEntitySelector()}return t.prototype.renderEntitySelector=function(){var t=this,e=this.metaData.getRootEntity().subEntities;this.slot&&G(this.slot).addChild("div",(function(n){return n.addClass("ed-root").addChild("div",(function(e){return e.addClass("ed-menu-description").addText(l.getText(t.metaData.isEmpty()?"ModelIsEmpty":"EntityMenuDesc"))})).addChild("ul",(function(n){n.addClass("ed-entity-menu"),e.forEach((function(e){n.addChild("li",(function(n){n.addClass("ed-entity-item").on("click",(function(){Mt("".concat(t.basePath,"/").concat(decodeURIComponent(e.id)))})).addChild("div",(function(t){t.addClass("ed-entity-item-caption").addText(e.captionPlural||e.caption)})),e.description&&n.addChild("div",(function(t){t.addClass("ed-entity-item-descr").addText("".concat(e.description))}))}))}))}))}))},t}(),Yt=function(){function t(t){var e=this;this.options={container:"#EasyDataContainer",basePath:"easydata"},this.onSetLocation=function(){e.setActiveView()},this.attach=function(){window.addEventListener("ed_set_location",e.onSetLocation),window.addEventListener("popstate",e.onSetLocation)},this.options=c.assign(this.options,t||{}),this.options.rootEntity?(this.options.showBackToEntities=!1,this.basePath="/"):this.basePath=this.normalizeBasePath(this.options.basePath),this.setContainer(this.options.container);var n=document.createElement("div"),i=new Ft(n),o=this.container.parentElement;o.insertBefore(n,o.firstElementChild),this.context=new Vt({endpoint:this.options.endpoint,dataTable:this.options.dataTable,onProcessStart:function(){return i.show()},onProcessEnd:function(){return i.hide()}})}return t.prototype.normalizeBasePath=function(t){t=this.trimSlashes(t);var e=decodeURIComponent(window.location.pathname),n=e.toLocaleLowerCase().indexOf(t);return n>=0?e.substring(0,n+t.length):"/"},t.prototype.trimSlashes=function(t){return t.replace(/^\/|\/$/g,"")},t.prototype.setContainer=function(t){if(!t)throw"Container is undefined";if("string"==typeof t){if(t.length){if("."===t[0]){var e=document.getElementsByClassName(t.substring(1));e.length&&(this.container=e[0])}else"#"===t[0]&&(t=t.substring(1)),this.container=document.getElementById(t);if(!this.container)throw Error("Unrecognized `container` parameter: "+t+"\nIt must be an element ID, a class name (starting with .) or an HTMLElement object itself.")}}else this.container=t},t.prototype.getActiveSourceId=function(){if(this.options.rootEntity)return this.options.rootEntity;var t=decodeURIComponent(window.location.pathname),e=this.basePath.length+1;return e<t.length?t.substring(e):null},t.prototype.run=function(){var t=this;return this.attach(),this.context.loadMetaData().then((function(){t.setActiveView()})).catch((function(t){return console.error(t)}))},t.prototype.setActiveView=function(){this.clear();var t=this.getActiveSourceId();t?(this.context.setActiveSource(t),window.EDView=new Ut(this.container,this.context,this.basePath,this.options)):window.EDView=new Wt(this.container,this.context,this.basePath)},t.prototype.clear=function(){this.container.innerHTML="",this.context.getData().clear()},t.prototype.detach=function(){window.removeEventListener("ed_set_location",this.onSetLocation),window.removeEventListener("popstate",this.onSetLocation)},t}();l.updateDefaultTexts({RequiredError:"Value is required.",NumberError:"Value should be a number",IntNumberError:"Value should be an integer number",DateTimeError:"Invalid date or time value",LookupSelectedItem:"Selected item: ",LookupDlgCaption:"Select {entity}",None:"None",NavigationBtnTitle:"Navigation values",CalendarBtnTitle:"Open calendar",TimerBtnTitle:"Open timer",AddBtnTitle:"Add",AddRecordBtnTitle:"Add record",EditBtn:"Edit",DeleteBtn:"Delete",SelectLink:"[ select ]",AddDlgCaption:"Create {entity}",EditDlgCaption:"Edit {entity}",DeleteDlgCaption:"Delete {entity}",DeleteDlgMessage:"Are you sure you want to remove this record: {{recordId}}?",EntityMenuDesc:"Click on an entity to view/edit its content",BackToEntities:"Back to entities",SearchBtn:"Search",SearchInputPlaceholder:"Search...",RootViewTitle:"Entities",ModelIsEmpty:"No entity was found."})})(),__webpack_exports__})()));
|
|
3
|
-
//# sourceMappingURL=easydata.crud.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// return eval('/*@cc_on!@*/false || !!document.documentMode');
|