@wavemaker/app-runtime-wm-build 11.4.0-next.24563 → 11.4.0-next.24565
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.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +26 -15
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +10 -6
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +15 -1
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +2 -2
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +26 -15
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +10 -6
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +15 -1
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +2 -2
|
@@ -4275,7 +4275,7 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
|
|
|
4275
4275
|
/*!*******************************************************!*\
|
|
4276
4276
|
!*** ./src/manager/variable/live-variable.manager.ts ***!
|
|
4277
4277
|
\*******************************************************/
|
|
4278
|
-
(e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableManager:()=>v});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ./base-variable.manager */"./src/manager/variable/base-variable.manager.ts"),a=n(/*! ./../../util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),s=n(/*! ../../util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),u=n(/*! ../../util/inflight-queue */"./src/util/inflight-queue.ts"),l=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),c=n(/*! ../../util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts"),d=n(/*! ../../model/base-variable */"./src/model/base-variable.ts"),p=n(/*! lodash */"./node_modules/lodash/lodash.js"),h=n.n(p),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=[],v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getFilterExprFields=function(e){var t=!1;return s.LiveVariableUtils.traverseFilterExpressions(e,(function(e,n){if(n&&n.required&&-1===h().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],n.matchMode)&&""===n.value)return t=!0,!1})),t?!t:e},t.getDataFilterObj=function(e){return t=e,{getFilterFields:function(){return t},getCriteria:function(e){var n=[];return s.LiveVariableUtils.traverseFilterExpressions(t,(function(t,r){e===r.target&&n.push(r)})),n}};var t},t}return f(t,e),t.prototype.initFilterExpressionBinding=function(e){var t=e._context;t.registerDestroyListener?t.registerDestroyListener.bind(t):h().noop},t.prototype.updateDataset=function(e,t,n,r){e.pagination=r,e.dataSet=t,Object.defineProperty(e.dataSet,"data",{get:function(){return e.dataSet}}),Object.defineProperty(e.dataSet,"pagination",{get:function(){return e.pagination}})},t.prototype.setVariableOptions=function(e,t){e._options=e._options||{},e._options.orderBy=t&&t.orderBy,e._options.filterFields=t&&t.filterFields,e._options.logicalOp=t&&t.logicalOp},t.prototype.handleError=function(e,t,n,r,o){var s;(0,i.triggerFn)(t,n),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,e,n,o),r.skipDataSetUpdate||this.updateDataset(e,m,e.propertiesMap,null),s=this.prepareCallbackOptions(r.errorDetails),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,e,n,s),e.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,n,o)},t.prototype.makeCall=function(e,t,n){var r=this;return new Promise((function(i,o){var s=(0,c.generateConnectionParams)(n,t);s={url:s.url,method:s.method,data:s.data,headers:s.headers},n.operation=t,r.httpCall(s,e,n).then((function(e){!function(e,t){(e&&e.type||e&&e.status)&&t(e)}(e,i)}),(function(t){!function(t,n){var i=(0,a.getErrMessage)(t,e.httpService.getLocale());r.notifyInflight(e,!1),n({error:i,details:t})}(t,o)}))}))},t.prototype.getEntityData=function(e,t,n,r){var o,c,p,f,m,v,g,y,_,b=this,w={};m=this.getFilterExprFields((0,i.getClonedObject)(e.filterExpressions||{})),p=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,e,this.getDataFilterObj(m),t);var S=h().isObject(p)?(0,i.getClonedObject)(p):void 0;return!1===p?(u.$queue.process(e),(0,i.triggerFn)(r,"Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE),Promise.reject("Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE)):(e.canUpdate=!1,o=s.LiveVariableUtils.prepareTableOptions(e,t,h().isObject(p)?p:m),t.searchWithQuery?(c="searchTableDataWithQuery",v=o.query?"q="+o.query:""):(c=o.filter&&o.filter.length?"searchTableData":"readTableData",v=o.filter),g={projectID:l.$rootScope.project.id,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,page:t.page||1,size:t.pagesize||(l.CONSTANTS.isRunMode?e.maxResults||20:e.designMaxResults||20),sort:o.sort,data:v,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t,S),url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl},y=function(o,u){if(o&&(o.type||o.status)){o=o.body||o.data,w.data=o.content,w.pagination=h().omit(o,"content");var c=b.prepareCallbackOptions(o,{pagination:w.pagination});return o&&o.error||!o||!h().isArray(o.content)?(b.handleError(e,r,o.error,t,c),Promise.reject(o.error)):((0,a.decodeData)(o.content),s.LiveVariableUtils.processBlobColumns(o.content,e),t.skipDataSetUpdate||((0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,e,w.data,c),(f=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,e,w.data,c))&&(w.data=f),b.updateDataset(e,w.data,e.propertiesMap,w.pagination),b.setVariableOptions(e,t),e.notify(d.VariableEvents.AFTER_INVOKE,[b,w.data]),setTimeout((function(){(0,i.triggerFn)(n,w.data,e.propertiesMap,w.pagination),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.SUCCESS,e,w.data,c),e.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,w.data,c)}))),u({data:w.data,pagination:w.pagination}))}},_=function(n,i){return b.setVariableOptions(e,t),b.handleError(e,r,n.error,h().extend(t,{errorDetails:n.details})),i(n.error)},new Promise((function(t,n){b.makeCall(e,c,g).then((function(e){y(e,t)}),(function(e){_(e,n)}))})))},t.prototype.performCUD=function(e,t,n,r,o){var a=this;return(n=n||{}).inputFields=n.inputFields||(0,i.getClonedObject)(t.inputFields),u.$queue.submit(t).then((function(){return a.notifyInflight(t,!n.skipToggleState),a.doCUD(e,t,n,r,o).then((function(e){return u.$queue.process(t),a.notifyInflight(t,!1,e),Promise.resolve(e)}),(function(e){return u.$queue.process(t),a.notifyInflight(t,!1,e),Promise.reject(e)}))}),o)},t.prototype.doCUD=function(e,t,n,r,o){var c,p,f,m,v,g,y,_,b=this,w=l.$rootScope.project.id||l.$rootScope.projectName,S=s.LiveVariableUtils.getPrimaryKey(t),x=window.File&&window.FileReader&&window.FileList&&window.Blob,E="",k={},T={},C={},M=n.inputFields||t.inputFields;if(v=(0,i.getClonedObject)(M),!1===(g=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,t,v,n)))return(0,i.triggerFn)(o),Promise.reject("Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE);switch(M=h().isObject(g)?g:v,t.canUpdate=!1,n.row?(k=n.row,h().forEach(k,(function(e,n){var r,o=s.LiveVariableUtils.getFieldType(n,t);(0,i.isDateTimeType)(o)?(r=(0,a.formatDate)(e,o),k[n]=r):h().isArray(e)&&s.LiveVariableUtils.isStringType(o)&&(r=h().join(e,","),k[n]=r)})),h().forEach(M,(function(e,t){!(0,i.isDefined)(e)||""===e||(0,i.isDefined)(k[t])&&""!==k[t]||(k[t]=e)}))):h().forEach(M,(function(n,r){var o,u=t.propertiesMap.primaryFields||t.propertiesMap.primaryKeys;h().isUndefined(n)||""===n||("deleteTableData"===e&&(E=n),"updateTableData"===e&&u.forEach((function(e){r===e&&(E=n)})),("deleteTableData"!==e||s.LiveVariableUtils.isCompositeKey(S))&&(o=s.LiveVariableUtils.getFieldType(r,t),(0,i.isDateTimeType)(o)?n=(0,a.formatDate)(n,o):h().isArray(n)&&s.LiveVariableUtils.isStringType(o)&&(n=h().join(n,",")),k[r]=n),h().isObject(n)&&!h().isArray(n)&&h().forEach(n,(function(e,i){"blob"===s.LiveVariableUtils.getFieldType(r,t,i)&&(n[i]=null===e?e:"")})))})),e){case"updateTableData":p=n.prevData||{},s.LiveVariableUtils.isCompositeKey(S)?(s.LiveVariableUtils.isNoPrimaryKey(S)?(C=p||n.rowData||k,T=k):S.forEach((function(e){T[e]=k[e],n.period?C[e]=k[e]:C[e]=p[e]||n.rowData&&n.rowData[e]||k[e]})),n.row=T,n.compositeKeysData=C):(S.forEach((function(e){-1===e.indexOf(".")?f=p[e]||n.rowData&&n.rowData[e]||k[e]:(m=e.split("."),f=p[m[0]][m[1]])})),n.id=f,n.row=k);break;case"deleteTableData":s.LiveVariableUtils.isCompositeKey(S)?(s.LiveVariableUtils.isNoPrimaryKey(S)?T=k:S.forEach((function(e){T[e]=k[e]})),n.compositeKeysData=T):h().isEmpty(k)||(S.forEach((function(e){-1===e.indexOf(".")?f=k[e]:(m=e.split("."),f=k[m[0]][m[1]])})),n.id=f)}if(("updateTableData"===e||"insertTableData"===e)&&s.LiveVariableUtils.hasBlob(t)&&x&&(e="updateTableData"===e?"updateMultiPartTableData":"insertMultiPartTableData",k=s.LiveVariableUtils.prepareFormData(t,k)),n.compositeKeysData){switch(e){case"updateTableData":e="updateCompositeTableData";break;case"deleteTableData":e="deleteCompositeTableData";break;case"updateMultiPartTableData":e="updateMultiPartCompositeTableData"}E=s.LiveVariableUtils.getCompositeIDURL(n.compositeKeysData)}c=t.liveSource,h().isEmpty(k)&&"deleteTableData"===e&&(k=void 0),"updateCompositeTableData"!==e&&"deleteCompositeTableData"!==e||!n.period||(e="period"+e.charAt(0).toUpperCase()+e.substr(1));var D={projectID:w,service:t._prefabName?"":"services",dataModelName:c,entityName:t.type,id:h().isUndefined(n.id)?E:encodeURIComponent(n.id),data:k,url:t._prefabName?l.$rootScope.project.deployedUrl+"/prefabs/"+t._prefabName:l.$rootScope.project.deployedUrl};return y=function(e,r){var s=e.error,u=b.prepareCallbackOptions(e);(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,u),n.skipNotification||(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,t,s,u),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s,u),(0,i.triggerFn)(o,s),r(s)},_=function(e,n){var s=e.body,c=b.prepareCallbackOptions(e);if(u.$queue.process(t),s&&s.error)return(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,c),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,t,s.error,c),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s.error,c),(0,i.triggerFn)(o,s.error),Promise.reject(s.error);if((0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,c),"read"!==t.operation){var p=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,t,s,c);p&&(s=p),t.dataSet=s}t.notify(d.VariableEvents.AFTER_INVOKE,[b,s]),setTimeout((function(){(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.SUCCESS,t,s,c),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s,c)})),(0,i.triggerFn)(r,s),n(s)},new Promise((function(n,r){b.makeCall(t,e,D).then((function(e){_(e,n)}),(function(e){y(e,r)}))}))},t.prototype.aggregateData=function(e,t,n,r,o){var a,u,l,c,d=this;return(n=n||{}).skipEncode=!0,t.filterFields&&(a=s.LiveVariableUtils.prepareTableOptions(t,n),n.aggregations.filter=a.query),u={dataModelName:t.liveSource,entityName:t.type,page:n.page||1,size:n.size||t.maxResults,sort:n.sort||"",url:e,data:n.aggregations},l=function(e,t){if(e&&e.type){if(e&&e.error||!e)return void(0,i.triggerFn)(o,e.error);(0,i.triggerFn)(r,e),t(e)}},c=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(e,n){d.makeCall(t,"executeAggregateQuery",u).then((function(t){l(t,e)}),(function(e){c(e,n)}))}))},t.prototype.listRecords=function(e,t,n,r){var o=this;return(t=t||{}).filterFields=t.filterFields||(0,i.getClonedObject)(e.filterFields),u.$queue.submit(e).then((function(){return o.notifyInflight(e,!t.skipToggleState,void 0,t),o.getEntityData(e,t,n,r).then((function(t){return u.$queue.process(e),o.notifyInflight(e,!1,t),Promise.resolve(t)}),(function(t){return u.$queue.process(e),o.notifyInflight(e,!1,t),Promise.reject(t)}))}),r)},t.prototype.insertRecord=function(e,t,n,r){return this.performCUD("insertTableData",e,t,n,r)},t.prototype.updateRecord=function(e,t,n,r){return this.performCUD("updateTableData",e,t,n,r)},t.prototype.deleteRecord=function(e,t,n,r){return this.performCUD("deleteTableData",e,t,n,r)},t.prototype.setInput=function(e,t,n,r){return e.inputFields=e.inputFields||{},(0,a.setInput)(e.inputFields,t,n,r)},t.prototype.setFilter=function(e,t,n){var r={},i={};return h().isObject(t)?r=t:r[t]=n,e.filterExpressions&&!h().isEmpty(e.filterExpressions)||(e.filterExpressions={condition:"AND",rules:[]}),i=e.filterExpressions,h().forEach(r,(function(e,t){var n=function(e){var t=null;return s.LiveVariableUtils.traverseFilterExpressions(i,(function(n,r){if(e===r.target)return t=r})),t}(t);null!==n?n.value=e:i.rules.push({target:t,type:"",matchMode:"",value:e,required:!1})})),i},t.prototype.download=function(e,t,n,r){var o,u,c,d,p=this;t=t||{};var h={},f=l.$rootScope.project.id||l.$rootScope.projectName;return t.data.searchWithQuery=!0,t.data.skipEncode=!0,o=s.LiveVariableUtils.prepareTableOptions(e,t.data,void 0),h.query=o.query?o.query:"",h.exportSize=t.data.exportSize,h.exportType=t.data.exportType,h.fields=(0,a.formatExportExpression)(t.data.fields),t.data.fileName&&(h.fileName=t.data.fileName),u={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,sort:o.sort,url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl,data:h,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t)},c=function(e,t){e&&e.type&&(window.location.href=e.body.result,(0,i.triggerFn)(n,e),t(e))},d=function(t,n){var o=p.prepareCallbackOptions(t.details);(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,e,t.error,o),(0,i.triggerFn)(r,t.error),n(t)},new Promise((function(t,n){p.makeCall(e,"exportTableData",u).then((function(e){c(e,t)}),(function(e){d(e,n)}))}))},t.prototype.getRelatedTablePrimaryKeys=function(e,t){var n,r,i;if(e.propertiesMap&&(r=h().find(e.propertiesMap.columns||[],{fieldName:t}))){if(i=r.columns,(n=h().map(h().filter(i,"isPrimaryKey"),"fieldName")).length)return n;if(i&&i.length)return(i=h().find(i,{isRelated:!1}))&&i.fieldName}},t.prototype.getRelatedTableData=function(e,t,n,r,o){var u,c,d,p,f,m,v=this,g=l.$rootScope.project.id||l.$rootScope.projectName,y=h().find(e.relatedTables,(function(e){return e.relationName===t||e.columnName===t})),_=h().map(h().filter(e.relatedTables,(function(t){return t.type===e.type})),"relationName"),b=[];if(h().forEach(n.filterFields,(function(n,r){n.fieldName=r,n.type=s.LiveVariableUtils.getFieldType(t,e,r),n.filterCondition!==l.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()&&n.filterCondition!==l.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()||(n.value=n.value.split(",")),b.push(n)})),c=s.LiveVariableUtils.getFilterOptions(e,b,n),d=s.LiveVariableUtils.getSearchQuery(c," "+(n.logicalOp||"AND")+" ",e.ignoreCase),n.filterExpr){var w=(0,i.getClonedObject)(h().isObject(n.filterExpr)?n.filterExpr:JSON.parse(n.filterExpr));s.LiveVariableUtils.processFilterFields(w.rules,e,n);var S=s.LiveVariableUtils.generateSearchQuery(w.rules,w.condition,e.ignoreCase,n.skipEncode);""!==d?""!==S&&(d="("+d+") AND ("+S+")"):""!==S&&(d=S)}return d=d?"q="+d:"","searchTableDataWithQuery",u=h().isEmpty(n.orderBy)?"":"sort="+n.orderBy,p={projectID:g,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:y?y.type:"",page:n.page||1,size:n.pagesize||void 0,url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl,data:d||"",filter:s.LiveVariableUtils.getWhereClauseGenerator(e,n),sort:u},f=function(e,t){if(e&&(e.type||e.status)){var n=e.body||e.data,o=h().map(n.content,(function(e){return h().omit(e,_)})),s=Object.assign({},n);delete s.content,(0,a.decodeData)(o);var u={data:o,pagination:s};(0,i.triggerFn)(r,u),t(u)}},m=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(t,n){v.makeCall(e,"searchTableDataWithQuery",p).then((function(e){f(e,t)}),(function(e){m(e,n)}))}))},t.prototype.getDistinctDataByFields=function(e,t,n,r){var o,a,u,c,d,p=this,f=l.$rootScope.project.id||l.$rootScope.projectName,m={};return t.skipEncode=!0,t.operation="read",t=t||{},(a=s.LiveVariableUtils.prepareTableOptions(e,t)).query&&(m.filter=a.query),m.groupByFields=h().isArray(t.fields)?t.fields:[t.fields],o=(o=t.sort||m.groupByFields[0]+" asc")?"sort="+o:"",u={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:t.entityName||e.type,page:t.page||1,size:t.pagesize,sort:o,data:m,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t),url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl},c=function(e,t){if(e&&e.type){if(e&&e.error||!e)return(0,i.triggerFn)(r,e.error),Promise.reject(e.error);var o=e.body,a=Object.assign({},e.body);delete a.content,o={data:o.content,pagination:a},(0,i.triggerFn)(n,o),t(o)}},d=function(e,t){(0,i.triggerFn)(r,e),t(e)},new Promise((function(t,n){p.makeCall(e,"getDistinctDataByFields",u).then((function(e){c(e,t)}),(function(){d(r,n)}))}))},t.prototype.getAggregatedData=function(e,t,n,r){var i=a.appManager.getDeployedURL();if(i)return this.aggregateData(i,e,t,n,r)},t.prototype.defineFirstLastRecord=function(e){"read"===e.operation&&(Object.defineProperty(e,"firstRecord",{configurable:!0,get:function(){return h().get(e.dataSet,"data[0]",{})}}),Object.defineProperty(e,"lastRecord",{configurable:!0,get:function(){var t=h().get(e.dataSet,"data",[]);return t[t.length-1]}}))},t.prototype.getPrimaryKey=function(e){return s.LiveVariableUtils.getPrimaryKey(e)},t.prototype.prepareRequestParams=function(e){var t,n=h().split(e.searchKey,","),r=h().split(e.matchMode,","),i={};return h().forEach(n,(function(t,n){i[t]={value:e.query,logicalOp:"AND",matchMode:r[n]||r[0]||"startignorecase"}})),t={filterFields:i,page:e.page,pagesize:e.limit||e.pagesize,skipDataSetUpdate:!0,skipToggleState:!0,inFlightBehavior:"executeAll",logicalOp:"OR",orderBy:e.orderby?h().replace(e.orderby,/:/g," "):""},e.onBeforeservicecall&&e.onBeforeservicecall(i),t},t.prototype.searchRecords=function(e,t,n,r){var i=this.prepareRequestParams(t);return this.listRecords(e,i,n,r)},t.prototype.upgradeInputDataToFilterExpressions=function(e,t,n){h().isObject(t)&&((n=t).condition="AND",n.rules=[]);var r=h().cloneDeep(n.rules);return n.rules=[],h().forEach(n,(function(e,t){if("condition"!==t&&"rules"!==t){var i=h().find(r,(function(e){return e.target===t}));i?(i.value=e.value,i.matchMode=e.matchMode||e.filterCondition||i.matchMode||"",n.rules.push(i)):n.rules.push({target:t,type:"",matchMode:e.matchMode||e.filterCondition||"",value:e.value,required:!1}),delete n[t]}})),n},t.prototype.downgradeFilterExpressionsToInputData=function(e,t){return t.hasOwnProperty("getFilterFields")&&(t=t.getFilterFields()),h().forEach(t.rules,(function(e){h().isNil(e.target)||""===e.target||(t[e.target]={value:e.value,matchMode:e.matchMode})})),t},t.prototype.cancel=function(e,t){u.$queue.requestsQueue.has(e)&&e._observable&&(e._observable.unsubscribe(),u.$queue.process(e),this.notifyInflight(e,!1))},t}(o.BaseVariableManager)},"./src/manager/variable/model-variable.manager.ts":
|
|
4278
|
+
(e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableManager:()=>v});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ./base-variable.manager */"./src/manager/variable/base-variable.manager.ts"),a=n(/*! ./../../util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),s=n(/*! ../../util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),u=n(/*! ../../util/inflight-queue */"./src/util/inflight-queue.ts"),l=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),c=n(/*! ../../util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts"),d=n(/*! ../../model/base-variable */"./src/model/base-variable.ts"),p=n(/*! lodash */"./node_modules/lodash/lodash.js"),h=n.n(p),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=[],v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getFilterExprFields=function(e){var t=!1;return s.LiveVariableUtils.traverseFilterExpressions(e,(function(e,n){if(n&&n.required&&-1===h().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],n.matchMode)&&""===n.value)return t=!0,!1})),t?!t:e},t.getDataFilterObj=function(e){return t=e,{getFilterFields:function(){return t},getCriteria:function(e){var n=[];return s.LiveVariableUtils.traverseFilterExpressions(t,(function(t,r){e===r.target&&n.push(r)})),n}};var t},t}return f(t,e),t.prototype.initFilterExpressionBinding=function(e){var t=e._context;t.registerDestroyListener?t.registerDestroyListener.bind(t):h().noop},t.prototype.updateDataset=function(e,t,n,r){e.pagination=r,e.dataSet=t,Object.defineProperty(e.dataSet,"data",{get:function(){return e.dataSet}}),Object.defineProperty(e.dataSet,"pagination",{get:function(){return e.pagination}})},t.prototype.setVariableOptions=function(e,t){e._options=e._options||{},e._options.orderBy=t&&t.orderBy,e._options.filterFields=t&&t.filterFields,e._options.logicalOp=t&&t.logicalOp},t.prototype.handleError=function(e,t,n,r,o){var s;(0,i.triggerFn)(t,n),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,e,n,o),r.skipDataSetUpdate||this.updateDataset(e,m,e.propertiesMap,null),s=this.prepareCallbackOptions(r.errorDetails),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,e,n,s),e.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,n,o)},t.prototype.makeCall=function(e,t,n){var r=this;return new Promise((function(i,o){var s=(0,c.generateConnectionParams)(n,t);s={url:s.url,method:s.method,data:s.data,headers:s.headers},n.operation=t,r.httpCall(s,e,n).then((function(e){!function(e,t){(e&&e.type||e&&e.status)&&t(e)}(e,i)}),(function(t){!function(t,n){var i=(0,a.getErrMessage)(t,e.httpService.getLocale());r.notifyInflight(e,!1),n({error:i,details:t})}(t,o)}))}))},t.prototype.getEntityData=function(e,t,n,r){var o,c,p,f,m,v,g,y,_,b=this,w={};m=this.getFilterExprFields((0,i.getClonedObject)(e.filterExpressions||{})),p=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,e,this.getDataFilterObj(m),t);var S=h().isObject(p)?(0,i.getClonedObject)(p):void 0;return!1===p?(u.$queue.process(e),(0,i.triggerFn)(r,"Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE),Promise.reject("Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE)):(e.canUpdate=!1,o=s.LiveVariableUtils.prepareTableOptions(e,t,h().isObject(p)?p:m),t.searchWithQuery?(c="searchTableDataWithQuery",v=o.query?"q="+o.query:""):(c=o.filter&&o.filter.length?"searchTableData":"readTableData",v=o.filter),g={projectID:l.$rootScope.project.id,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,page:t.page||1,size:t.pagesize||(l.CONSTANTS.isRunMode?e.maxResults||20:e.designMaxResults||20),sort:o.sort,data:v,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t,S),url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl},y=function(o,u){if(o&&(o.type||o.status)){o=o.body||o.data,w.data=o.content,w.pagination=h().omit(o,"content");var c=b.prepareCallbackOptions(o,{pagination:w.pagination});return o&&o.error||!o||!h().isArray(o.content)?(b.handleError(e,r,o.error,t,c),Promise.reject(o.error)):((0,a.decodeData)(o.content),s.LiveVariableUtils.processBlobColumns(o.content,e),t.skipDataSetUpdate||((0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,e,w.data,c),(f=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,e,w.data,c))&&(w.data=f),b.updateDataset(e,w.data,e.propertiesMap,w.pagination),b.setVariableOptions(e,t),e.notify(d.VariableEvents.AFTER_INVOKE,[b,w.data]),setTimeout((function(){(0,i.triggerFn)(n,w.data,e.propertiesMap,w.pagination),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.SUCCESS,e,w.data,c),e.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,e,w.data,c)}))),u({data:w.data,pagination:w.pagination}))}},_=function(n,i){return b.setVariableOptions(e,t),b.handleError(e,r,n.error,h().extend(t,{errorDetails:n.details})),i(n.error)},new Promise((function(t,n){b.makeCall(e,c,g).then((function(e){y(e,t)}),(function(e){_(e,n)}))})))},t.prototype.performCUD=function(e,t,n,r,o){var a=this;return(n=n||{}).inputFields=n.inputFields||(0,i.getClonedObject)(t.inputFields),u.$queue.submit(t).then((function(){return a.notifyInflight(t,!n.skipToggleState),a.doCUD(e,t,n,r,o).then((function(e){return u.$queue.process(t),a.notifyInflight(t,!1,e),Promise.resolve(e)}),(function(e){return u.$queue.process(t),a.notifyInflight(t,!1,e),Promise.reject(e)}))}),o)},t.prototype.doCUD=function(e,t,n,r,o){var c,p,f,m,v,g,y,_,b=this,w=l.$rootScope.project.id||l.$rootScope.projectName,S=s.LiveVariableUtils.getPrimaryKey(t),x=window.File&&window.FileReader&&window.FileList&&window.Blob,E="",k={},T={},C={},M=n.inputFields||t.inputFields;if(v=(0,i.getClonedObject)(M),!1===(g=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE,t,v,n)))return(0,i.triggerFn)(o),Promise.reject("Call stopped from the event: "+l.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE);switch(M=h().isObject(g)?g:v,t.canUpdate=!1,n.row?(k=n.row,h().forEach(k,(function(e,n){var r,o=s.LiveVariableUtils.getFieldType(n,t);(0,i.isDateTimeType)(o)?(r=(0,a.formatDate)(e,o,t.dateFormatter),k[n]=r):h().isArray(e)&&s.LiveVariableUtils.isStringType(o)&&(r=h().join(e,","),k[n]=r)})),h().forEach(M,(function(e,t){!(0,i.isDefined)(e)||""===e||(0,i.isDefined)(k[t])&&""!==k[t]||(k[t]=e)}))):h().forEach(M,(function(n,r){var o,u=t.propertiesMap.primaryFields||t.propertiesMap.primaryKeys;h().isUndefined(n)||""===n||("deleteTableData"===e&&(E=n),"updateTableData"===e&&u.forEach((function(e){r===e&&(E=n)})),("deleteTableData"!==e||s.LiveVariableUtils.isCompositeKey(S))&&(o=s.LiveVariableUtils.getFieldType(r,t),(0,i.isDateTimeType)(o)?n=(0,a.formatDate)(n,o,t.dateFormatter):h().isArray(n)&&s.LiveVariableUtils.isStringType(o)&&(n=h().join(n,",")),k[r]=n),h().isObject(n)&&!h().isArray(n)&&h().forEach(n,(function(e,i){"blob"===s.LiveVariableUtils.getFieldType(r,t,i)&&(n[i]=null===e?e:"")})))})),e){case"updateTableData":p=n.prevData||{},s.LiveVariableUtils.isCompositeKey(S)?(s.LiveVariableUtils.isNoPrimaryKey(S)?(C=p||n.rowData||k,T=k):S.forEach((function(e){T[e]=k[e],n.period?C[e]=k[e]:C[e]=p[e]||n.rowData&&n.rowData[e]||k[e]})),n.row=T,n.compositeKeysData=C):(S.forEach((function(e){-1===e.indexOf(".")?f=p[e]||n.rowData&&n.rowData[e]||k[e]:(m=e.split("."),f=p[m[0]][m[1]])})),n.id=f,n.row=k);break;case"deleteTableData":s.LiveVariableUtils.isCompositeKey(S)?(s.LiveVariableUtils.isNoPrimaryKey(S)?T=k:S.forEach((function(e){T[e]=k[e]})),n.compositeKeysData=T):h().isEmpty(k)||(S.forEach((function(e){-1===e.indexOf(".")?f=k[e]:(m=e.split("."),f=k[m[0]][m[1]])})),n.id=f)}if(("updateTableData"===e||"insertTableData"===e)&&s.LiveVariableUtils.hasBlob(t)&&x&&(e="updateTableData"===e?"updateMultiPartTableData":"insertMultiPartTableData",k=s.LiveVariableUtils.prepareFormData(t,k)),n.compositeKeysData){switch(e){case"updateTableData":e="updateCompositeTableData";break;case"deleteTableData":e="deleteCompositeTableData";break;case"updateMultiPartTableData":e="updateMultiPartCompositeTableData"}E=s.LiveVariableUtils.getCompositeIDURL(n.compositeKeysData)}c=t.liveSource,h().isEmpty(k)&&"deleteTableData"===e&&(k=void 0),"updateCompositeTableData"!==e&&"deleteCompositeTableData"!==e||!n.period||(e="period"+e.charAt(0).toUpperCase()+e.substr(1));var D={projectID:w,service:t._prefabName?"":"services",dataModelName:c,entityName:t.type,id:h().isUndefined(n.id)?E:encodeURIComponent(n.id),data:k,url:t._prefabName?l.$rootScope.project.deployedUrl+"/prefabs/"+t._prefabName:l.$rootScope.project.deployedUrl};return y=function(e,r){var s=e.error,u=b.prepareCallbackOptions(e);(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,u),n.skipNotification||(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,t,s,u),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s,u),(0,i.triggerFn)(o,s),r(s)},_=function(e,n){var s=e.body||e.data,c=b.prepareCallbackOptions(e);if(u.$queue.process(t),s&&s.error)return(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,c),(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,t,s.error,c),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s.error,c),(0,i.triggerFn)(o,s.error),Promise.reject(s.error);if((0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.RESULT,t,s,c),"read"!==t.operation){var p=(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.PREPARE_SETDATA,t,s,c);p&&(s=p),t.dataSet=s}t.notify(d.VariableEvents.AFTER_INVOKE,[b,s]),setTimeout((function(){(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.SUCCESS,t,s,c),t.canUpdate=!0,(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.CAN_UPDATE,t,s,c)})),(0,i.triggerFn)(r,s),n(s)},new Promise((function(n,r){b.makeCall(t,e,D).then((function(e){_(e,n)}),(function(e){y(e,r)}))}))},t.prototype.aggregateData=function(e,t,n,r,o){var a,u,l,c,d=this;return(n=n||{}).skipEncode=!0,t.filterFields&&(a=s.LiveVariableUtils.prepareTableOptions(t,n),n.aggregations.filter=a.query),u={dataModelName:t.liveSource,entityName:t.type,page:n.page||1,size:n.size||t.maxResults,sort:n.sort||"",url:e,data:n.aggregations},l=function(e,t){if(e&&e.type){if(e&&e.error||!e)return void(0,i.triggerFn)(o,e.error);(0,i.triggerFn)(r,e),t(e)}},c=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(e,n){d.makeCall(t,"executeAggregateQuery",u).then((function(t){l(t,e)}),(function(e){c(e,n)}))}))},t.prototype.listRecords=function(e,t,n,r){var o=this;return(t=t||{}).filterFields=t.filterFields||(0,i.getClonedObject)(e.filterFields),u.$queue.submit(e).then((function(){return o.notifyInflight(e,!t.skipToggleState,void 0,t),o.getEntityData(e,t,n,r).then((function(t){return u.$queue.process(e),o.notifyInflight(e,!1,t),Promise.resolve(t)}),(function(t){return u.$queue.process(e),o.notifyInflight(e,!1,t),Promise.reject(t)}))}),r)},t.prototype.insertRecord=function(e,t,n,r){return this.performCUD("insertTableData",e,t,n,r)},t.prototype.updateRecord=function(e,t,n,r){return this.performCUD("updateTableData",e,t,n,r)},t.prototype.deleteRecord=function(e,t,n,r){return this.performCUD("deleteTableData",e,t,n,r)},t.prototype.setInput=function(e,t,n,r){return e.inputFields=e.inputFields||{},(0,a.setInput)(e.inputFields,t,n,r)},t.prototype.setFilter=function(e,t,n){var r={},i={};return h().isObject(t)?r=t:r[t]=n,e.filterExpressions&&!h().isEmpty(e.filterExpressions)||(e.filterExpressions={condition:"AND",rules:[]}),i=e.filterExpressions,h().forEach(r,(function(e,t){var n=function(e){var t=null;return s.LiveVariableUtils.traverseFilterExpressions(i,(function(n,r){if(e===r.target)return t=r})),t}(t);null!==n?n.value=e:i.rules.push({target:t,type:"",matchMode:"",value:e,required:!1})})),i},t.prototype.download=function(e,t,n,r){var o,u,c,d,p=this;t=t||{};var h={},f=l.$rootScope.project.id||l.$rootScope.projectName;return t.data.searchWithQuery=!0,t.data.skipEncode=!0,o=s.LiveVariableUtils.prepareTableOptions(e,t.data,void 0),h.query=o.query?o.query:"",h.exportSize=t.data.exportSize,h.exportType=t.data.exportType,h.fields=(0,a.formatExportExpression)(t.data.fields),t.data.fileName&&(h.fileName=t.data.fileName),u={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:e.type,sort:o.sort,url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl,data:h,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t)},c=function(e,t){e&&e.type&&(window.location.href=e.body.result,(0,i.triggerFn)(n,e),t(e))},d=function(t,n){var o=p.prepareCallbackOptions(t.details);(0,a.initiateCallback)(l.VARIABLE_CONSTANTS.EVENT.ERROR,e,t.error,o),(0,i.triggerFn)(r,t.error),n(t)},new Promise((function(t,n){p.makeCall(e,"exportTableData",u).then((function(e){c(e,t)}),(function(e){d(e,n)}))}))},t.prototype.getRelatedTablePrimaryKeys=function(e,t){var n,r,i;if(e.propertiesMap&&(r=h().find(e.propertiesMap.columns||[],{fieldName:t}))){if(i=r.columns,(n=h().map(h().filter(i,"isPrimaryKey"),"fieldName")).length)return n;if(i&&i.length)return(i=h().find(i,{isRelated:!1}))&&i.fieldName}},t.prototype.getRelatedTableData=function(e,t,n,r,o){var u,c,d,p,f,m,v=this,g=l.$rootScope.project.id||l.$rootScope.projectName,y=h().find(e.relatedTables,(function(e){return e.relationName===t||e.columnName===t})),_=h().map(h().filter(e.relatedTables,(function(t){return t.type===e.type})),"relationName"),b=[];if(h().forEach(n.filterFields,(function(n,r){n.fieldName=r,n.type=s.LiveVariableUtils.getFieldType(t,e,r),n.filterCondition!==l.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()&&n.filterCondition!==l.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()||(n.value=n.value.split(",")),b.push(n)})),c=s.LiveVariableUtils.getFilterOptions(e,b,n),d=s.LiveVariableUtils.getSearchQuery(c," "+(n.logicalOp||"AND")+" ",e.ignoreCase),n.filterExpr){var w=(0,i.getClonedObject)(h().isObject(n.filterExpr)?n.filterExpr:JSON.parse(n.filterExpr));s.LiveVariableUtils.processFilterFields(w.rules,e,n);var S=s.LiveVariableUtils.generateSearchQuery(w.rules,w.condition,e.ignoreCase,n.skipEncode);""!==d?""!==S&&(d="("+d+") AND ("+S+")"):""!==S&&(d=S)}return d=d?"q="+d:"","searchTableDataWithQuery",u=h().isEmpty(n.orderBy)?"":"sort="+n.orderBy,p={projectID:g,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:y?y.type:"",page:n.page||1,size:n.pagesize||void 0,url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl,data:d||"",filter:s.LiveVariableUtils.getWhereClauseGenerator(e,n),sort:u},f=function(e,t){if(e&&(e.type||e.status)){var n=e.body||e.data,o=h().map(n.content,(function(e){return h().omit(e,_)})),s=Object.assign({},n);delete s.content,(0,a.decodeData)(o);var u={data:o,pagination:s};(0,i.triggerFn)(r,u),t(u)}},m=function(e,t){(0,i.triggerFn)(o,e),t(e)},new Promise((function(t,n){v.makeCall(e,"searchTableDataWithQuery",p).then((function(e){f(e,t)}),(function(e){m(e,n)}))}))},t.prototype.getDistinctDataByFields=function(e,t,n,r){var o,a,u,c,d,p=this,f=l.$rootScope.project.id||l.$rootScope.projectName,m={};return t.skipEncode=!0,t.operation="read",t=t||{},(a=s.LiveVariableUtils.prepareTableOptions(e,t)).query&&(m.filter=a.query),m.groupByFields=h().isArray(t.fields)?t.fields:[t.fields],o=(o=t.sort||m.groupByFields[0]+" asc")?"sort="+o:"",u={projectID:f,service:e.getPrefabName()?"":"services",dataModelName:e.liveSource,entityName:t.entityName||e.type,page:t.page||1,size:t.pagesize,sort:o,data:m,filter:s.LiveVariableUtils.getWhereClauseGenerator(e,t),url:e.getPrefabName()?l.$rootScope.project.deployedUrl+"/prefabs/"+e.getPrefabName():l.$rootScope.project.deployedUrl},c=function(e,t){if(e&&e.type){if(e&&e.error||!e)return(0,i.triggerFn)(r,e.error),Promise.reject(e.error);var o=e.body,a=Object.assign({},e.body);delete a.content,o={data:o.content,pagination:a},(0,i.triggerFn)(n,o),t(o)}},d=function(e,t){(0,i.triggerFn)(r,e),t(e)},new Promise((function(t,n){p.makeCall(e,"getDistinctDataByFields",u).then((function(e){c(e,t)}),(function(){d(r,n)}))}))},t.prototype.getAggregatedData=function(e,t,n,r){var i=a.appManager.getDeployedURL();if(i)return this.aggregateData(i,e,t,n,r)},t.prototype.defineFirstLastRecord=function(e){"read"===e.operation&&(Object.defineProperty(e,"firstRecord",{configurable:!0,get:function(){return h().get(e.dataSet,"data[0]",{})}}),Object.defineProperty(e,"lastRecord",{configurable:!0,get:function(){var t=h().get(e.dataSet,"data",[]);return t[t.length-1]}}))},t.prototype.getPrimaryKey=function(e){return s.LiveVariableUtils.getPrimaryKey(e)},t.prototype.prepareRequestParams=function(e){var t,n=h().split(e.searchKey,","),r=h().split(e.matchMode,","),i={};return h().forEach(n,(function(t,n){i[t]={value:e.query,logicalOp:"AND",matchMode:r[n]||r[0]||"startignorecase"}})),t={filterFields:i,page:e.page,pagesize:e.limit||e.pagesize,skipDataSetUpdate:!0,skipToggleState:!0,inFlightBehavior:"executeAll",logicalOp:"OR",orderBy:e.orderby?h().replace(e.orderby,/:/g," "):""},e.onBeforeservicecall&&e.onBeforeservicecall(i),t},t.prototype.searchRecords=function(e,t,n,r){var i=this.prepareRequestParams(t);return this.listRecords(e,i,n,r)},t.prototype.upgradeInputDataToFilterExpressions=function(e,t,n){h().isObject(t)&&((n=t).condition="AND",n.rules=[]);var r=h().cloneDeep(n.rules);return n.rules=[],h().forEach(n,(function(e,t){if("condition"!==t&&"rules"!==t){var i=h().find(r,(function(e){return e.target===t}));i?(i.value=e.value,i.matchMode=e.matchMode||e.filterCondition||i.matchMode||"",n.rules.push(i)):n.rules.push({target:t,type:"",matchMode:e.matchMode||e.filterCondition||"",value:e.value,required:!1}),delete n[t]}})),n},t.prototype.downgradeFilterExpressionsToInputData=function(e,t){return t.hasOwnProperty("getFilterFields")&&(t=t.getFilterFields()),h().forEach(t.rules,(function(e){h().isNil(e.target)||""===e.target||(t[e.target]={value:e.value,matchMode:e.matchMode})})),t},t.prototype.cancel=function(e,t){u.$queue.requestsQueue.has(e)&&e._observable&&(e._observable.unsubscribe(),u.$queue.process(e),this.notifyInflight(e,!1))},t}(o.BaseVariableManager)},"./src/manager/variable/model-variable.manager.ts":
|
|
4279
4279
|
/*!********************************************************!*\
|
|
4280
4280
|
!*** ./src/manager/variable/model-variable.manager.ts ***!
|
|
4281
4281
|
\********************************************************/
|
|
@@ -4331,7 +4331,11 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
|
|
|
4331
4331
|
/*!************************************************!*\
|
|
4332
4332
|
!*** ./src/model/variable/service-variable.ts ***!
|
|
4333
4333
|
\************************************************/
|
|
4334
|
-
(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceVariable:()=>f});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ../../types/types */"./src/types/types.ts"),a=n(/*! ../../factory/variable-manager.factory */"./src/factory/variable-manager.factory.ts"),s=n(/*! ./api-aware-variable */"./src/model/variable/api-aware-variable.ts"),u=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),l=n(/*! ../../util/variable/service-variable.utils */"./src/util/variable/service-variable.utils.ts"),c=n(/*! lodash */"./node_modules/lodash/lodash.js"),d=n.n(c),p=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return a.VariableManagerFactory.get(u.VARIABLE_CONSTANTS.CATEGORY.SERVICE)},f=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n.serviceInfo=t.serviceInfo,n.httpService=t.httpClientService,n}return p(t,e),t.prototype.execute=function(t,n){var r=e.prototype.execute.call(this,t,n);if((0,i.isDefined)(r))return r;switch(t){case o.DataSource.Operation.IS_API_AWARE:r=!0;break;case o.DataSource.Operation.SUPPORTS_CRUD:case o.DataSource.Operation.SUPPORTS_DISTINCT_API:r=!1;break;case o.DataSource.Operation.IS_PAGEABLE:r=this.hasPagination();break;case o.DataSource.Operation.IS_SORTABLE:r=this.hasPagination()&&!this._paginationConfig;break;case o.DataSource.Operation.SUPPORTS_SERVER_FILTER:r=!1;break;case o.DataSource.Operation.SET_INPUT:r=this.setInput(n);break;case o.DataSource.Operation.LIST_RECORDS:case o.DataSource.Operation.INVOKE:r=this.invoke(n);break;case o.DataSource.Operation.UPDATE:r=this.update(n);break;case o.DataSource.Operation.SEARCH_RECORDS:r=this.searchRecords(n);break;case o.DataSource.Operation.DOWNLOAD:r=this.download(n);break;case o.DataSource.Operation.GET_PAGING_OPTIONS:r=this.pagination;break;case o.DataSource.Operation.IS_UPDATE_REQUIRED:r=this.isUpdateRequired(n);break;case o.DataSource.Operation.IS_BOUND_TO_LOCALE:r=!1;break;case o.DataSource.Operation.CANCEL:r=this.cancel(n);break;case o.DataSource.Operation.SET_PAGINATION:r=this.setPagination(n);break;default:r={}}return r},t.prototype.hasPagination=function(){return this.controller===u.VARIABLE_CONSTANTS.CONTROLLER_TYPE.QUERY||!d().isEmpty(this.pagination)},t.prototype.invoke=function(e,t,n){return h().invoke(this,e,t,n)},t.prototype.update=function(e,t,n){return h().invoke(this,e,t,n)},t.prototype.download=function(e,t,n){return h().download(this,e,t,n)},t.prototype.setInput=function(e,t,n){return h().setInput(this,e,t,n)},t.prototype.searchRecords=function(e,t,n){var r=this;return new Promise((function(t,n){h().searchRecords(r,e,(function(e,n){t({data:e.content||e,pagination:n})}),n)}))},t.prototype.isUpdateRequired=function(e){var t=h().getInputParms(this);return!(!l.ServiceVariableUtils.excludePaginationParams(t).length&&e)},t.prototype.setPagination=function(e){return h().setPagination(this,e)},t.prototype.cancel=function(e){return h().cancel(this,e)},t.prototype.init=function(){h().initBinding(this),h().defineFirstLastRecord(this)},t}(s.ApiAwareVariable)},"./src/types/
|
|
4334
|
+
(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceVariable:()=>f});var r,i=n(/*! ../../util/utils */"./src/util/utils.ts"),o=n(/*! ../../types/types */"./src/types/types.ts"),a=n(/*! ../../factory/variable-manager.factory */"./src/factory/variable-manager.factory.ts"),s=n(/*! ./api-aware-variable */"./src/model/variable/api-aware-variable.ts"),u=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),l=n(/*! ../../util/variable/service-variable.utils */"./src/util/variable/service-variable.utils.ts"),c=n(/*! lodash */"./node_modules/lodash/lodash.js"),d=n.n(c),p=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return a.VariableManagerFactory.get(u.VARIABLE_CONSTANTS.CATEGORY.SERVICE)},f=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n.serviceInfo=t.serviceInfo,n.httpService=t.httpClientService,n}return p(t,e),t.prototype.execute=function(t,n){var r=e.prototype.execute.call(this,t,n);if((0,i.isDefined)(r))return r;switch(t){case o.DataSource.Operation.IS_API_AWARE:r=!0;break;case o.DataSource.Operation.SUPPORTS_CRUD:case o.DataSource.Operation.SUPPORTS_DISTINCT_API:r=!1;break;case o.DataSource.Operation.IS_PAGEABLE:r=this.hasPagination();break;case o.DataSource.Operation.IS_SORTABLE:r=this.hasPagination()&&!this._paginationConfig;break;case o.DataSource.Operation.SUPPORTS_SERVER_FILTER:r=!1;break;case o.DataSource.Operation.SET_INPUT:r=this.setInput(n);break;case o.DataSource.Operation.LIST_RECORDS:case o.DataSource.Operation.INVOKE:r=this.invoke(n);break;case o.DataSource.Operation.UPDATE:r=this.update(n);break;case o.DataSource.Operation.SEARCH_RECORDS:r=this.searchRecords(n);break;case o.DataSource.Operation.DOWNLOAD:r=this.download(n);break;case o.DataSource.Operation.GET_PAGING_OPTIONS:r=this.pagination;break;case o.DataSource.Operation.IS_UPDATE_REQUIRED:r=this.isUpdateRequired(n);break;case o.DataSource.Operation.IS_BOUND_TO_LOCALE:r=!1;break;case o.DataSource.Operation.CANCEL:r=this.cancel(n);break;case o.DataSource.Operation.SET_PAGINATION:r=this.setPagination(n);break;default:r={}}return r},t.prototype.hasPagination=function(){return this.controller===u.VARIABLE_CONSTANTS.CONTROLLER_TYPE.QUERY||!d().isEmpty(this.pagination)},t.prototype.invoke=function(e,t,n){return h().invoke(this,e,t,n)},t.prototype.update=function(e,t,n){return h().invoke(this,e,t,n)},t.prototype.download=function(e,t,n){return h().download(this,e,t,n)},t.prototype.setInput=function(e,t,n){return h().setInput(this,e,t,n)},t.prototype.searchRecords=function(e,t,n){var r=this;return new Promise((function(t,n){h().searchRecords(r,e,(function(e,n){t({data:e.content||e,pagination:n})}),n)}))},t.prototype.isUpdateRequired=function(e){var t=h().getInputParms(this);return!(!l.ServiceVariableUtils.excludePaginationParams(t).length&&e)},t.prototype.setPagination=function(e){return h().setPagination(this,e)},t.prototype.cancel=function(e){return h().cancel(this,e)},t.prototype.init=function(){h().initBinding(this),h().defineFirstLastRecord(this)},t}(s.ApiAwareVariable)},"./src/types/date-formatter.ts":
|
|
4335
|
+
/*!*************************************!*\
|
|
4336
|
+
!*** ./src/types/date-formatter.ts ***!
|
|
4337
|
+
\*************************************/
|
|
4338
|
+
(e,t,n)=>{"use strict";n.r(t)},"./src/types/event-notifier.ts":
|
|
4335
4339
|
/*!*************************************!*\
|
|
4336
4340
|
!*** ./src/types/event-notifier.ts ***!
|
|
4337
4341
|
\*************************************/
|
|
@@ -4375,7 +4379,7 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
|
|
|
4375
4379
|
/*!**************************************************!*\
|
|
4376
4380
|
!*** ./src/util/variable/live-variable.utils.ts ***!
|
|
4377
4381
|
\**************************************************/
|
|
4378
|
-
(e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableUtils:()=>c});var r=n(/*! ../../util/utils */"./src/util/utils.ts"),i=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),o=n(/*! ./variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! moment */"./node_modules/moment/moment.js"),s=n.n(a),u=n(/*! lodash */"./node_modules/lodash/lodash.js"),l=n.n(u),c=function(){function e(){}return e.isCompositeKey=function(e){return!e||e&&(!e.length||e.length>1)},e.isNoPrimaryKey=function(e){return!e||e&&!e.length},e.getCompositeIDURL=function(e){var t="";return l().forEach(e,(function(e,n){t+=n+"="+encodeURIComponent(e)+"&"})),t=t.slice(0,-1)},e.hasBlob=function(e){return l().find(l().get(e,["propertiesMap","columns"]),{type:"blob"})},e.getPrimaryKey=function(e){if(!e.propertiesMap)return[];if(e.propertiesMap.primaryFields)return e.propertiesMap.primaryFields;var t=[];return l().forEach(e.propertiesMap.columns,(function(e,n){n.isPrimaryKey&&(n.isRelated&&!l().includes(n.relatedFieldName,t)?t.push(n.relatedFieldName):l().includes(n.fieldName,t)||t.push(n.fieldName))})),t},e.processBlobColumns=function(t,n){if(t){var o,a=l().map(l().filter(n.propertiesMap.columns,{type:"blob"}),"fieldName"),s=l().trim(i.$rootScope.project.deployedUrl),u="";l().isEmpty(a)||((0,r.hasCordova)()&&(u+=l().endsWith(s,"/")?s:s+"/"),u+=(""!==n._prefabName&&void 0!==n._prefabName?"prefabs/"+n._prefabName:"services")+"/"+n.liveSource+"/"+n.type+"/",o=n.propertiesMap.primaryFields||n.propertiesMap.primaryKeys,l().forEach(t,(function(t){t&&l().forEach(a,(function(n){var r={};null!==t[n]&&l().isEmpty(l().trim(t[n]))&&(e.isCompositeKey(o)?(o.forEach((function(e){r[e]=t[e]})),t[n]=u+"composite-id/content/"+n+"?"+e.getCompositeIDURL(r)):t[n]=u+t[l().join(o)]+"/content/"+n)}))})))}},e.getHibernateOrSqlType=function(e,t,n,r){var i,o,a,s,u=e.propertiesMap.columns;if(l().includes(t,".")){if((s=t.split(".")).length>2)return;return o=(i=l().find(u,(function(e){return e.fieldName===s[0]})))&&i.columns,(a=l().find(o,(function(e){return e.fieldName===s[1]})))&&a[n]}if(!(i=l().find(u,(function(e){return e.fieldName===t||e.relatedColumnName===t})))&&r){var c=l().find(u,(function(e){return e.relatedEntityName===r}));i=l().find(c.columns,(function(e){return e.fieldName===t||e.relatedColumnName===t}))}return i&&i[n]},e.getSqlType=function(t,n,r){return e.getHibernateOrSqlType(t,n,"type",r)},e.isRelatedFieldMany=function(e,t){var n,r=e.propertiesMap.columns,i=r.length;for(n=0;n<i;n+=1)if(r[n].fieldName===t)return!1;return!0},e.isStringType=function(e){return l().includes(["text","string"],l().toLower(e))},e.getSQLFieldType=function(t,n){return l().includes(["timestamp","datetime","date"],n.type)?n.type:e.getSqlType(t,n.fieldName)||n.type},e.getAttributeName=function(e,t){var n=t;return e.propertiesMap.columns.forEach((function(e){e.fieldName===t&&e.isRelated&&(n=e.relatedFieldName)})),n},e.getFilterCondition=function(e){return l().includes(i.DB_CONSTANTS.DATABASE_RANGE_MATCH_MODES,e)?e:i.DB_CONSTANTS.DATABASE_MATCH_MODES.exact},e.getFilterOption=function(t,n,a){var s,u,c,d=n.value,p=i.DB_CONSTANTS.DATABASE_MATCH_MODES,h=n.fieldName,f=n.required||!1,m=e.getSQLFieldType(t,n);if(c=p[n.matchMode]||p[n.filterCondition]||n.filterCondition,n.type=m,l().isObject(d)&&!l().isArray(d)){var v=[];return l().forEach(d,(function(e,t){e&&!l().isObject(e)&&v.push(h+"."+t+"="+e)})),v}if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,c))return s=e.getAttributeName(t,h),m&&!e.isStringType(m)&&(c=i.DB_CONSTANTS.DATABASE_NULL_EMPTY_MATCH[c]),u={attributeName:s,attributeValue:"",attributeType:l().toUpper(m),filterCondition:c,required:f},a.searchWithQuery&&(u.isVariableFilter=n.isVariableFilter),u;if((0,r.isDefined)(d)&&null!==d&&""!==d){if(m)switch(m){case"integer":d=l().isArray(d)?l().reduce(d,(function(e,t){return t=parseInt(t,10),l().isNaN(t)||e.push(t),e}),[]):parseInt(d,10),c=c?e.getFilterCondition(c):p.exact;break;case"date":case"datetime":case"timestamp":d=(0,o.formatDate)(d,m),c=c?e.getFilterCondition(c):p.exact;break;case"text":case"string":c=l().isArray(d)?l().includes([p.in,p.notin],c)?c:p.exact:c||p.anywhereignorecase;break;default:c=c?e.getFilterCondition(c):p.exact}else c=l().isString(d)?p.anywhereignorecase:p.exact;return u={attributeName:s=e.getAttributeName(t,h),attributeValue:d,attributeType:l().toUpper(m),filterCondition:c,required:f},a.searchWithQuery&&(u.isVariableFilter=n.isVariableFilter),u}},e.getFilterOptions=function(t,n,r){var i=[];return l().each(n,(function(n){var o=e.getFilterOption(t,n,r);l().isNil(o)||(l().isArray(o)?i=i.concat(o):i.push(o))})),i},e.wrapInLowerCase=function(t,n,r,o){var a=l().toLower(n.attributeType);return r&&(!a||e.isStringType(a))&&l().includes(i.DB_CONSTANTS.DATABASE_STRING_MODES,n.filterCondition)?"lower("+t+")":t},e.encodeAndAddQuotes=function(e,t,n){var i=n?e:encodeURIComponent(e);return t=l().toLower(t),i=l().replace(i,/'/g,"''"),(0,r.isNumberType)(t)&&"float"!==t?i:"'"+i+"'"},e.getParamValue=function(t,n,o,a){var s,u=n.filterCondition,c=i.DB_CONSTANTS.DATABASE_MATCH_MODES,d=n.attributeType;if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,u))return"";switch(u){case c.startignorecase:case c.start:s=e.encodeAndAddQuotes(t+"%",d,a),s=e.wrapInLowerCase(s,n,o);break;case c.endignorecase:case c.end:s=e.encodeAndAddQuotes("%"+t,d,a),s=e.wrapInLowerCase(s,n,o);break;case c.nowhereignorecase:case c.nowhere:case c.anywhereignorecase:case c.anywhere:s=e.encodeAndAddQuotes("%"+t+"%",d,a),s=e.wrapInLowerCase(s,n,o);break;case c.between:s=l().join(l().map(t,(function(t){return e.wrapInLowerCase(e.encodeAndAddQuotes(t,d,a),n,o)}))," and ");break;case c.in:case c.notin:s="("+(s=l().join(l().map(t,(function(t){return e.wrapInLowerCase(e.encodeAndAddQuotes(t,d,a),n,o)})),", "))+")";break;default:s=e.encodeAndAddQuotes(t,d,a),s=e.wrapInLowerCase(s,n,o)}return(0,r.isDefined)(s)?s:""},e.getSearchQuery=function(t,n,o,a){var u=[];return l().forEach(t,(function(t){var n,c,d=t.attributeValue,p=i.DB_CONSTANTS.DATABASE_MATCH_MODES,h=l().isArray(d),f=t.attributeName,m=t.filterCondition;h&&l().isEmpty(d)||!h&&isNaN(d)&&(0,r.isNumberType)(t.attributeType)||!h&&isNaN(d)&&!s()(d).isValid()&&(0,r.isDateTimeType)(l().toLower(t.attributeType))||(h&&(m=m===p.between||m===p.notin?m:p.in,t.filterCondition=m),n=i.DB_CONSTANTS.DATABASE_MATCH_MODES_WITH_QUERY[m],c=e.getParamValue(d,t,o,a),f=e.wrapInLowerCase(f,t,o),u.push((0,r.replace)(n,[f,c])))})),l().join(u,n)},e.processFilterFields=function(t,n,r){l().remove(t,(function(e){return e&&(l().isString(e.value)&&0===e.value.indexOf("bind:")||"between"===e.matchMode&&(l().isString(e.secondvalue)&&0===e.secondvalue.indexOf("bind:")))})),l().forEach(t,(function(o,a){if(o)if(o.rules)e.processFilterFields(o.rules,n,r);else if(!l().isNull(o.target)){var s=o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()?l().isArray(o.value)?o.value:[o.value,o.secondvalue]:o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()||o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.notin.toLowerCase()?l().isArray(o.value)?o.value:o.value?o.value.split(",").map((function(e){return e.trim()})):"":o.value;t[a]=e.getFilterOption(n,{fieldName:o.target,type:o.type,value:s,required:o.required,filterCondition:o.matchMode||r.matchMode||n.matchMode},r)}}))},e.getSearchField=function(t,n,o){var a,u,c=t.attributeName,d=t.filterCondition,p=t.attributeValue,h=l().isArray(p),f=i.DB_CONSTANTS.DATABASE_MATCH_MODES;if(!(h&&l().isEmpty(p)||h&&l().some(p,(function(e){return l().isNull(e)||l().isNaN(e)||""===e}))||!h&&isNaN(p)&&(0,r.isNumberType)(t.attributeType)||!h&&isNaN(p)&&!s()(p).isValid()&&(0,r.isDateTimeType)(l().toLower(t.attributeType))))return h&&(d=d===f.between||d===f.notin?d:f.in,t.filterCondition=d),a=i.DB_CONSTANTS.DATABASE_MATCH_MODES_WITH_QUERY[d],u=e.getParamValue(p,t,n,o),c=e.wrapInLowerCase(c,t,n),(0,r.replace)(a,[c,u])},e.getIgnoreCase=function(e,t){var n=i.DB_CONSTANTS.DATABASE_MATCH_MODES;return-1===l().indexOf([n.anywhere,n.nowhere,n.start,n.end,n.exact],e)&&(-1!==l().indexOf([n.anywhereignorecase,n.nowhereignorecase,n.startignorecase,n.endignorecase,n.exactignorecase],e)||t)},e.generateSearchQuery=function(t,n,r,i){var o=[];return l().forEach(t,(function(t){if(t)if(t.rules){var n=e.generateSearchQuery(t.rules,t.condition,r,i);""!==n&&o.push("("+n+")")}else{var a=e.getSearchField(t,e.getIgnoreCase(t.filterCondition,r),i);l().isNil(a)||o.push(a)}})),l().join(o," "+n+" ")},e.prepareTableOptionsForFilterExps=function(t,n,a){(0,r.isDefined)(n.searchWithQuery)||(n.searchWithQuery=!0);var s,u,c=i.DB_CONSTANTS.DATABASE_MATCH_MODES,d=a||(0,r.getClonedObject)(t.filterExpressions);n.filterExpr&&!l().isEmpty(n.filterExpr)&&(d=n.filterExpr);var p={};if(!l().isEmpty(n.filterFields)){var h="";for(var f in n.filterFields){h=n.filterFields[f].logicalOp||"";break}p={condition:n.logicalOp||h||"AND",rules:[]},l().forEach(n.filterFields,(function(r,o){var a=c[r.matchMode]||c[r.filterCondition]||r.filterCondition;if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,a)||!l().isNil(r.value)&&""!==r.value){var s=r.type||e.getSqlType(t,o,n.entityName),u={target:o,type:s,matchMode:r.matchMode||(e.isStringType(s)?"startignorecase":"exact"),value:r.value,required:r.required||!1};p.rules.push(u)}}))}if(l().isEmpty(d))d=p;else if(!l().isNil(p.rules)&&p.rules.length){var m={condition:"AND",rules:[]};m.rules.push((0,r.getClonedObject)(d)),m.rules.push(p),d=m}return e.processFilterFields(d.rules,t,n),u=e.generateSearchQuery(d.rules,d.condition,t.ignoreCase,n.skipEncode),{filter:[],sort:(s=(0,o.getEvaluatedOrderBy)(t.orderBy,n.orderBy))?"sort="+s:"",query:u}},e.prepareTableOptions=function(t,n,a){if("read"===t.operation)return e.prepareTableOptionsForFilterExps(t,n,a);(0,r.isDefined)(n.searchWithQuery)||(n.searchWithQuery=!0);var s,u,c,d=[],p=[];return a=a||t.filterFields,l().forEach(a,(function(r,o){!l().isObject(r)||n.filterFields&&n.filterFields[o]&&"AND"!==n.filterFields[o].logicalOp||(r.fieldName=o,e.isStringType(e.getSQLFieldType(t,r))&&(r.filterCondition=i.DB_CONSTANTS.DATABASE_MATCH_MODES[r.matchMode||t.matchMode]),r.isVariableFilter=!0,d.push(r))})),l().forEach(n.filterFields,(function(e,r){e.fieldName=r,e.filterCondition=i.DB_CONSTANTS.DATABASE_MATCH_MODES[e.matchMode||n.matchMode||t.matchMode],d.push(e)})),"read"!==t.operation&&"read"!==n.operation||(p=e.getFilterOptions(t,d,n)),n.searchWithQuery&&p.length&&(u=e.getSearchQuery(l().filter(p,{isVariableFilter:!0})," AND ",t.ignoreCase,n.skipEncode),(c=e.getSearchQuery(l().filter(p,{isVariableFilter:void 0})," "+(n.logicalOp||"AND")+" ",t.ignoreCase,n.skipEncode))&&(u=u?u+" AND ( "+c+" )":c)),{filter:p,sort:(s=(0,o.getEvaluatedOrderBy)(t.orderBy,n.orderBy))?"sort="+s:"",query:u}},e.getFieldType=function(e,t,n){var r,i,o;return t.propertiesMap&&(i=t.propertiesMap.columns||[],o=l().find(i,(function(t){return t.fieldName===e})),n&&o&&(o=l().find(o.columns,(function(e){return e.fieldName===n}))),r=o&&o.type),r},e.prepareFormData=function(t,n){var r=new FormData;return r.rowData=l().clone(n),l().forEach(n,(function(i,o){"blob"===e.getFieldType(o,t)&&(l().isObject(i)&&(l().isArray(i)?l().forEach(i,(function(e){r.append(o,e,e.name)})):r.append(o,i,i.name)),n[o]=null!==i?"":null)})),r.append(i.SWAGGER_CONSTANTS.WM_DATA_JSON,new Blob([JSON.stringify(n)],{type:"application/json"})),r},e.traverseFilterExpressions=function(t,n){t&&t.rules&&l().forEach(t.rules,(function(i,o){if(!i.rules)return(0,r.triggerFn)(n,t,i);e.traverseFilterExpressions(i,n)}))},e.getFilterExprFields=function(t){var n=!1;return e.traverseFilterExpressions(t,(function(e,t){if(t&&t.required&&-1===l().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],t.matchMode)&&""===t.value)return n=!0,!1})),n?!n:t},e.getWhereClauseGenerator=function(t,n,i){return function(o,a){var s=e.getFilterExprFields((0,r.getClonedObject)(i||t.filterExpressions));return(0,r.isDefined)(a)&&(n.skipEncode=a),o&&(n.filterFields?o(s,n):o(s)),e.prepareTableOptions(t,n,s).query}},e}()},"./src/util/variable/pagination.utils.ts":
|
|
4382
|
+
(e,t,n)=>{"use strict";n.r(t),n.d(t,{LiveVariableUtils:()=>c});var r=n(/*! ../../util/utils */"./src/util/utils.ts"),i=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),o=n(/*! ./variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! moment */"./node_modules/moment/moment.js"),s=n.n(a),u=n(/*! lodash */"./node_modules/lodash/lodash.js"),l=n.n(u),c=function(){function e(){}return e.isCompositeKey=function(e){return!e||e&&(!e.length||e.length>1)},e.isNoPrimaryKey=function(e){return!e||e&&!e.length},e.getCompositeIDURL=function(e){var t="";return l().forEach(e,(function(e,n){t+=n+"="+encodeURIComponent(e)+"&"})),t=t.slice(0,-1)},e.hasBlob=function(e){return l().find(l().get(e,["propertiesMap","columns"]),{type:"blob"})},e.getPrimaryKey=function(e){if(!e.propertiesMap)return[];if(e.propertiesMap.primaryFields)return e.propertiesMap.primaryFields;var t=[];return l().forEach(e.propertiesMap.columns,(function(e,n){n.isPrimaryKey&&(n.isRelated&&!l().includes(n.relatedFieldName,t)?t.push(n.relatedFieldName):l().includes(n.fieldName,t)||t.push(n.fieldName))})),t},e.processBlobColumns=function(t,n){if(t){var o,a=l().map(l().filter(n.propertiesMap.columns,{type:"blob"}),"fieldName"),s=l().trim(i.$rootScope.project.deployedUrl),u="";l().isEmpty(a)||((0,r.hasCordova)()&&(u+=l().endsWith(s,"/")?s:s+"/"),u+=(""!==n._prefabName&&void 0!==n._prefabName?"prefabs/"+n._prefabName:"services")+"/"+n.liveSource+"/"+n.type+"/",o=n.propertiesMap.primaryFields||n.propertiesMap.primaryKeys,l().forEach(t,(function(t){t&&l().forEach(a,(function(n){var r={};null!==t[n]&&l().isEmpty(l().trim(t[n]))&&(e.isCompositeKey(o)?(o.forEach((function(e){r[e]=t[e]})),t[n]=u+"composite-id/content/"+n+"?"+e.getCompositeIDURL(r)):t[n]=u+t[l().join(o)]+"/content/"+n)}))})))}},e.getHibernateOrSqlType=function(e,t,n,r){var i,o,a,s,u=e.propertiesMap.columns;if(l().includes(t,".")){if((s=t.split(".")).length>2)return;return o=(i=l().find(u,(function(e){return e.fieldName===s[0]})))&&i.columns,(a=l().find(o,(function(e){return e.fieldName===s[1]})))&&a[n]}if(!(i=l().find(u,(function(e){return e.fieldName===t||e.relatedColumnName===t})))&&r){var c=l().find(u,(function(e){return e.relatedEntityName===r}));i=l().find(c.columns,(function(e){return e.fieldName===t||e.relatedColumnName===t}))}return i&&i[n]},e.getSqlType=function(t,n,r){return e.getHibernateOrSqlType(t,n,"type",r)},e.isRelatedFieldMany=function(e,t){var n,r=e.propertiesMap.columns,i=r.length;for(n=0;n<i;n+=1)if(r[n].fieldName===t)return!1;return!0},e.isStringType=function(e){return l().includes(["text","string"],l().toLower(e))},e.getSQLFieldType=function(t,n){return l().includes(["timestamp","datetime","date"],n.type)?n.type:e.getSqlType(t,n.fieldName)||n.type},e.getAttributeName=function(e,t){var n=t;return e.propertiesMap.columns.forEach((function(e){e.fieldName===t&&e.isRelated&&(n=e.relatedFieldName)})),n},e.getFilterCondition=function(e){return l().includes(i.DB_CONSTANTS.DATABASE_RANGE_MATCH_MODES,e)?e:i.DB_CONSTANTS.DATABASE_MATCH_MODES.exact},e.getFilterOption=function(t,n,a){var s,u,c,d=n.value,p=i.DB_CONSTANTS.DATABASE_MATCH_MODES,h=n.fieldName,f=n.required||!1,m=e.getSQLFieldType(t,n);if(c=p[n.matchMode]||p[n.filterCondition]||n.filterCondition,n.type=m,l().isObject(d)&&!l().isArray(d)){var v=[];return l().forEach(d,(function(e,t){e&&!l().isObject(e)&&v.push(h+"."+t+"="+e)})),v}if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,c))return s=e.getAttributeName(t,h),m&&!e.isStringType(m)&&(c=i.DB_CONSTANTS.DATABASE_NULL_EMPTY_MATCH[c]),u={attributeName:s,attributeValue:"",attributeType:l().toUpper(m),filterCondition:c,required:f},a.searchWithQuery&&(u.isVariableFilter=n.isVariableFilter),u;if((0,r.isDefined)(d)&&null!==d&&""!==d){if(m)switch(m){case"integer":d=l().isArray(d)?l().reduce(d,(function(e,t){return t=parseInt(t,10),l().isNaN(t)||e.push(t),e}),[]):parseInt(d,10),c=c?e.getFilterCondition(c):p.exact;break;case"date":case"datetime":case"timestamp":d=(0,o.formatDate)(d,m,t.dateFormatter),c=c?e.getFilterCondition(c):p.exact;break;case"text":case"string":c=l().isArray(d)?l().includes([p.in,p.notin],c)?c:p.exact:c||p.anywhereignorecase;break;default:c=c?e.getFilterCondition(c):p.exact}else c=l().isString(d)?p.anywhereignorecase:p.exact;return u={attributeName:s=e.getAttributeName(t,h),attributeValue:d,attributeType:l().toUpper(m),filterCondition:c,required:f},a.searchWithQuery&&(u.isVariableFilter=n.isVariableFilter),u}},e.getFilterOptions=function(t,n,r){var i=[];return l().each(n,(function(n){var o=e.getFilterOption(t,n,r);l().isNil(o)||(l().isArray(o)?i=i.concat(o):i.push(o))})),i},e.wrapInLowerCase=function(t,n,r,o){var a=l().toLower(n.attributeType);return r&&(!a||e.isStringType(a))&&l().includes(i.DB_CONSTANTS.DATABASE_STRING_MODES,n.filterCondition)?"lower("+t+")":t},e.encodeAndAddQuotes=function(e,t,n){var i=n?e:encodeURIComponent(e);return t=l().toLower(t),i=l().replace(i,/'/g,"''"),(0,r.isNumberType)(t)&&"float"!==t?i:"'"+i+"'"},e.getParamValue=function(t,n,o,a){var s,u=n.filterCondition,c=i.DB_CONSTANTS.DATABASE_MATCH_MODES,d=n.attributeType;if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,u))return"";switch(u){case c.startignorecase:case c.start:s=e.encodeAndAddQuotes(t+"%",d,a),s=e.wrapInLowerCase(s,n,o);break;case c.endignorecase:case c.end:s=e.encodeAndAddQuotes("%"+t,d,a),s=e.wrapInLowerCase(s,n,o);break;case c.nowhereignorecase:case c.nowhere:case c.anywhereignorecase:case c.anywhere:s=e.encodeAndAddQuotes("%"+t+"%",d,a),s=e.wrapInLowerCase(s,n,o);break;case c.between:s=l().join(l().map(t,(function(t){return e.wrapInLowerCase(e.encodeAndAddQuotes(t,d,a),n,o)}))," and ");break;case c.in:case c.notin:s="("+(s=l().join(l().map(t,(function(t){return e.wrapInLowerCase(e.encodeAndAddQuotes(t,d,a),n,o)})),", "))+")";break;default:s=e.encodeAndAddQuotes(t,d,a),s=e.wrapInLowerCase(s,n,o)}return(0,r.isDefined)(s)?s:""},e.getSearchQuery=function(t,n,o,a){var u=[];return l().forEach(t,(function(t){var n,c,d=t.attributeValue,p=i.DB_CONSTANTS.DATABASE_MATCH_MODES,h=l().isArray(d),f=t.attributeName,m=t.filterCondition;h&&l().isEmpty(d)||!h&&isNaN(d)&&(0,r.isNumberType)(t.attributeType)||!h&&isNaN(d)&&!s()(d).isValid()&&(0,r.isDateTimeType)(l().toLower(t.attributeType))||(h&&(m=m===p.between||m===p.notin?m:p.in,t.filterCondition=m),n=i.DB_CONSTANTS.DATABASE_MATCH_MODES_WITH_QUERY[m],c=e.getParamValue(d,t,o,a),f=e.wrapInLowerCase(f,t,o),u.push((0,r.replace)(n,[f,c])))})),l().join(u,n)},e.processFilterFields=function(t,n,r){l().remove(t,(function(e){return e&&(l().isString(e.value)&&0===e.value.indexOf("bind:")||"between"===e.matchMode&&(l().isString(e.secondvalue)&&0===e.secondvalue.indexOf("bind:")))})),l().forEach(t,(function(o,a){if(o)if(o.rules)e.processFilterFields(o.rules,n,r);else if(!l().isNull(o.target)){var s=o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()?l().isArray(o.value)?o.value:[o.value,o.secondvalue]:o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase()||o.matchMode.toLowerCase()===i.DB_CONSTANTS.DATABASE_MATCH_MODES.notin.toLowerCase()?l().isArray(o.value)?o.value:o.value?o.value.split(",").map((function(e){return e.trim()})):"":o.value;t[a]=e.getFilterOption(n,{fieldName:o.target,type:o.type,value:s,required:o.required,filterCondition:o.matchMode||r.matchMode||n.matchMode},r)}}))},e.getSearchField=function(t,n,o){var a,u,c=t.attributeName,d=t.filterCondition,p=t.attributeValue,h=l().isArray(p),f=i.DB_CONSTANTS.DATABASE_MATCH_MODES;if(!(h&&l().isEmpty(p)||h&&l().some(p,(function(e){return l().isNull(e)||l().isNaN(e)||""===e}))||!h&&isNaN(p)&&(0,r.isNumberType)(t.attributeType)||!h&&isNaN(p)&&!s()(p).isValid()&&(0,r.isDateTimeType)(l().toLower(t.attributeType))))return h&&(d=d===f.between||d===f.notin?d:f.in,t.filterCondition=d),a=i.DB_CONSTANTS.DATABASE_MATCH_MODES_WITH_QUERY[d],u=e.getParamValue(p,t,n,o),c=e.wrapInLowerCase(c,t,n),(0,r.replace)(a,[c,u])},e.getIgnoreCase=function(e,t){var n=i.DB_CONSTANTS.DATABASE_MATCH_MODES;return-1===l().indexOf([n.anywhere,n.nowhere,n.start,n.end,n.exact],e)&&(-1!==l().indexOf([n.anywhereignorecase,n.nowhereignorecase,n.startignorecase,n.endignorecase,n.exactignorecase],e)||t)},e.generateSearchQuery=function(t,n,r,i){var o=[];return l().forEach(t,(function(t){if(t)if(t.rules){var n=e.generateSearchQuery(t.rules,t.condition,r,i);""!==n&&o.push("("+n+")")}else{var a=e.getSearchField(t,e.getIgnoreCase(t.filterCondition,r),i);l().isNil(a)||o.push(a)}})),l().join(o," "+n+" ")},e.prepareTableOptionsForFilterExps=function(t,n,a){(0,r.isDefined)(n.searchWithQuery)||(n.searchWithQuery=!0);var s,u,c=i.DB_CONSTANTS.DATABASE_MATCH_MODES,d=a||(0,r.getClonedObject)(t.filterExpressions);n.filterExpr&&!l().isEmpty(n.filterExpr)&&(d=n.filterExpr);var p={};if(!l().isEmpty(n.filterFields)){var h="";for(var f in n.filterFields){h=n.filterFields[f]&&n.filterFields[f].logicalOp||"";break}p={condition:n.logicalOp||h||"AND",rules:[]},l().forEach(n.filterFields,(function(r,o){if(r){var a=c[r.matchMode]||c[r.filterCondition]||r.filterCondition;if(l().includes(i.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES,a)||!l().isNil(r.value)&&""!==r.value){var s=r.type||e.getSqlType(t,o,n.entityName),u={target:o,type:s,matchMode:r.matchMode||(e.isStringType(s)?"startignorecase":"exact"),value:r.value,required:r.required||!1};p.rules.push(u)}}}))}if(l().isEmpty(d))d=p;else if(!l().isNil(p.rules)&&p.rules.length){var m={condition:"AND",rules:[]};m.rules.push((0,r.getClonedObject)(d)),m.rules.push(p),d=m}return e.processFilterFields(d.rules,t,n),u=e.generateSearchQuery(d.rules,d.condition,t.ignoreCase,n.skipEncode),{filter:[],sort:(s=(0,o.getEvaluatedOrderBy)(t.orderBy,n.orderBy))?"sort="+s:"",query:u}},e.prepareTableOptions=function(t,n,a){if("read"===t.operation)return e.prepareTableOptionsForFilterExps(t,n,a);(0,r.isDefined)(n.searchWithQuery)||(n.searchWithQuery=!0);var s,u,c,d=[],p=[];return a=a||t.filterFields,l().forEach(a,(function(r,o){!l().isObject(r)||n.filterFields&&n.filterFields[o]&&"AND"!==n.filterFields[o].logicalOp||(r.fieldName=o,e.isStringType(e.getSQLFieldType(t,r))&&(r.filterCondition=i.DB_CONSTANTS.DATABASE_MATCH_MODES[r.matchMode||t.matchMode]),r.isVariableFilter=!0,d.push(r))})),l().forEach(n.filterFields,(function(e,r){e.fieldName=r,e.filterCondition=i.DB_CONSTANTS.DATABASE_MATCH_MODES[e.matchMode||n.matchMode||t.matchMode],d.push(e)})),"read"!==t.operation&&"read"!==n.operation||(p=e.getFilterOptions(t,d,n)),n.searchWithQuery&&p.length&&(u=e.getSearchQuery(l().filter(p,{isVariableFilter:!0})," AND ",t.ignoreCase,n.skipEncode),(c=e.getSearchQuery(l().filter(p,{isVariableFilter:void 0})," "+(n.logicalOp||"AND")+" ",t.ignoreCase,n.skipEncode))&&(u=u?u+" AND ( "+c+" )":c)),{filter:p,sort:(s=(0,o.getEvaluatedOrderBy)(t.orderBy,n.orderBy))?"sort="+s:"",query:u}},e.getFieldType=function(e,t,n){var r,i,o;return t.propertiesMap&&(i=t.propertiesMap.columns||[],o=l().find(i,(function(t){return t.fieldName===e})),n&&o&&(o=l().find(o.columns,(function(e){return e.fieldName===n}))),r=o&&o.type),r},e.prepareFormData=function(t,n){var r=new FormData;return r.rowData=l().clone(n),l().forEach(n,(function(i,o){"blob"===e.getFieldType(o,t)&&(l().isObject(i)&&(l().isArray(i)?l().forEach(i,(function(e){r.append(o,e,e.name)})):r.append(o,i,i.name)),n[o]=null!==i?"":null)})),r.append(i.SWAGGER_CONSTANTS.WM_DATA_JSON,new Blob([JSON.stringify(n)],{type:"application/json"})),r},e.traverseFilterExpressions=function(t,n){t&&t.rules&&l().forEach(t.rules,(function(i,o){if(!i.rules)return(0,r.triggerFn)(n,t,i);e.traverseFilterExpressions(i,n)}))},e.getFilterExprFields=function(t){var n=!1;return e.traverseFilterExpressions(t,(function(e,t){if(t&&t.required&&-1===l().indexOf(["null","isnotnull","empty","isnotempty","nullorempty"],t.matchMode)&&""===t.value)return n=!0,!1})),n?!n:t},e.getWhereClauseGenerator=function(t,n,i){return function(o,a){var s=e.getFilterExprFields((0,r.getClonedObject)(i||t.filterExpressions));return(0,r.isDefined)(a)&&(n.skipEncode=a),o&&(n.filterFields?o(s,n):o(s)),e.prepareTableOptions(t,n,s).query}},e}()},"./src/util/variable/pagination.utils.ts":
|
|
4379
4383
|
/*!***********************************************!*\
|
|
4380
4384
|
!*** ./src/util/variable/pagination.utils.ts ***!
|
|
4381
4385
|
\***********************************************/
|
|
@@ -4383,18 +4387,18 @@ i.version="2.29.4",o(Zn),i.fn=lo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
|
|
|
4383
4387
|
/*!*****************************************************!*\
|
|
4384
4388
|
!*** ./src/util/variable/service-variable.utils.ts ***!
|
|
4385
4389
|
\*****************************************************/
|
|
4386
|
-
(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceVariableUtils:()=>p});var r=n(/*! ../../util/utils */"./src/util/utils.ts"),i=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),o=n(/*! ./variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! ./../oAuth.utils */"./src/util/oAuth.utils.ts"),s=n(/*! ../../util/variable/pagination.utils */"./src/util/variable/pagination.utils.ts"),u=n(/*! lodash */"./node_modules/lodash/lodash.js"),l=n.n(u),c=function(e,t,n){var a=l().toLower((0,r.extractType)(l().get(t,"items.type")||t.type)),s=i.CONSTANTS.isStudioMode?t["x-WM-CONTENT_TYPE"]:t.contentType;if((0,o.isFileUploadSupported)())return"file"===a||"string"!==s&&s?l().isArray(n)&&"file"===a?l().forEach(n,(function(n){e.append(t.name,n&&n.content||(0,r.getBlob)(n),n.name)})):e.append(t.name,(0,r.getBlob)(n,s),n&&n.name):(l().isObject(n)&&(n=JSON.stringify(n)),e.append(t.name,n)),e},d=function(e,t){var
|
|
4390
|
+
(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServiceVariableUtils:()=>p});var r=n(/*! ../../util/utils */"./src/util/utils.ts"),i=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),o=n(/*! ./variables.utils */"./src/util/variable/variables.utils.ts"),a=n(/*! ./../oAuth.utils */"./src/util/oAuth.utils.ts"),s=n(/*! ../../util/variable/pagination.utils */"./src/util/variable/pagination.utils.ts"),u=n(/*! lodash */"./node_modules/lodash/lodash.js"),l=n.n(u),c=function(e,t,n){var a=l().toLower((0,r.extractType)(l().get(t,"items.type")||t.type)),s=i.CONSTANTS.isStudioMode?t["x-WM-CONTENT_TYPE"]:t.contentType;if((0,o.isFileUploadSupported)())return"file"===a||"string"!==s&&s?l().isArray(n)&&"file"===a?l().forEach(n,(function(n){e.append(t.name,n&&n.content||(0,r.getBlob)(n),n.name)})):e.append(t.name,(0,r.getBlob)(n,s),n&&n.name):(l().isObject(n)&&(n=JSON.stringify(n)),e.append(t.name,n)),e},d=function(e,t,n){var i,a={},s=[];return l().forEach(t,(function(t){i=l().get(e,t.name),l().isUndefined(i)||""===i||null===i||t.readOnly?t.required&&s.push(t.name||t.id):(i=(0,r.isDateTimeType)(t.type)?(0,o.formatDate)(i,t.type,n.dateFormatter):i,l().isArray(i)&&"string"===l().toLower((0,r.extractType)(t.type))&&(i=l().join(i,",")),a[t.name]=i)})),{requestBody:a,missingParams:s}},p=function(){function e(){}return e.constructRequestParams=function(e,t,n,u){if(e=e||{},null===t)return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,message:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,field:"_wmServiceOperationInfo"}};if(l().isEmpty(t))return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.METADATA_MISSING,message:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.METADATA_MISSING,field:"_wmServiceOperationInfo"}};if(t&&t.invalid)return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,message:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,field:"_wmServiceOperationInfo"}};var p,h,f,m,v,g,y,_,b,w,S,x,E,k,T,C=t.directPath||"",M=t.basePath?t.basePath+t.relativePath:t.relativePath,D=function(e){return l().includes(["QueryExecution","ProcedureExecution"],e.controller)&&l().includes(["put","post"],e.operationType)}(e),A="",L={},O=[],P=null;function I(){return b||(b=new FormData)}if(E=l().get(t.securityDefinitions,"0"))switch(E.type){case i.VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.OAUTH2:if(!(k=(0,a.getAccessToken)(E[i.VARIABLE_CONSTANTS.REST_SERVICE.OAUTH_PROVIDER_KEY],null)))return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,message:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN},securityDefnObj:E};L[i.VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY]=i.VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH+" "+k;break;case i.VARIABLE_CONSTANTS.REST_SERVICE.SECURITY_DEFN.BASIC:if(g=n.wm_auth_username,y=n.wm_auth_password,!g||!y)return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,message:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.NO_CREDENTIALS},securityDefnObj:E};L[i.VARIABLE_CONSTANTS.REST_SERVICE.AUTH_HDR_KEY]=i.VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC+" "+btoa(g+":"+y),P={type:i.VARIABLE_CONSTANTS.REST_SERVICE.AUTH_TYPE.BASIC}}if(s.PaginationUtils.checkPaginationAtQuery(t,e,u),t.proxySettings=t.proxySettings||{web:!0,mobile:!1},_=t.httpMethod||t.methodType,w=t.proxySettings.mobile,T=t.proxySettings.withCredentials,f=w?M:C,l().forEach(t.parameters,(function(a){function s(){n?(S=n[a.name]&&l().isObject(n[a.name])?n[a.name]:n,x=l().get(t,["definitions",a.type])):(S=g||{},x=a.children)}var u,m,g=a.sampleValue;if((0,r.isDefined)(g)&&null!==g&&""!==g||D&&"file"!==a.type)switch(e.serviceType===i.VARIABLE_CONSTANTS.SERVICE_TYPE.DATA&&(0,r.isDateTimeType)(a.type)&&(g=(0,o.formatDate)(g,a.type,e.dateFormatter)),l().isArray(g)&&"string"===l().toLower((0,r.extractType)(a.type))&&e.serviceType===i.VARIABLE_CONSTANTS.SERVICE_TYPE.DATA&&(g=l().join(g,",")),a.parameterType.toUpperCase()){case"QUERY":if(l().isNull(g)&&(u=e.controller,m=e.serviceType,u===i.VARIABLE_CONSTANTS.CONTROLLER_TYPE.QUERY&&m===i.VARIABLE_CONSTANTS.SERVICE_TYPE.DATA))break;A?A+="&"+a.name+"="+encodeURIComponent(g):A="?"+a.name+"="+encodeURIComponent(g);break;case"PATH":v=new RegExp("\\s*\\{\\s*"+a.name+"(:\\.\\+)?\\s*\\}\\s*"),f=f.replace(v,g);break;case"HEADER":L[a.name]=g;break;case"BODY":D?(s(),p=d(S,x,e),h=p.requestBody,O=l().concat(O,p.missingParams)):h=g;break;case"FORMDATA":D&&a.name===i.SWAGGER_CONSTANTS.WM_DATA_JSON?(s(),p=d(S,x,e),h=c(I(),a,p.requestBody),O=l().concat(O,p.missingParams)):h=c(I(),a,g)}else a.required&&O.push(a.name||a.id)})),O.length)return{error:{type:i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,field:O.join(","),message:(0,r.replace)(i.VARIABLE_CONSTANTS.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING,[O.join(",")]),skipDefaultNotification:!0}};l().includes(i.WS_CONSTANTS.NON_BODY_HTTP_METHODS,l().toUpper(_))||t.consumes&&t.consumes[0]===i.WS_CONSTANTS.CONTENT_TYPES.MULTIPART_FORMDATA||(L["Content-Type"]=t.consumes&&t.consumes[0]||"application/json"),l().includes(t.consumes,i.WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED)&&!l().includes(i.WS_CONSTANTS.NON_BODY_HTTP_METHODS,(_||"").toUpperCase())?(A&&(h=(h?h+"&":"")+A.substring(1)),L["Content-Type"]=i.WS_CONSTANTS.CONTENT_TYPES.FORM_URL_ENCODED):f+=A,w&&(L=e.serviceType!==i.VARIABLE_CONSTANTS.SERVICE_TYPE.REST&&e.serviceType!==i.VARIABLE_CONSTANTS.SERVICE_TYPE.OPENAPI||t.skipCloakHeaders?L:function(e){var t={},n=i.VARIABLE_CONSTANTS.REST_SERVICE.UNCLOAKED_HEADERS,r=i.VARIABLE_CONSTANTS.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;return l().forEach(e,(function(e,i){l().includes(n,i.toUpperCase())?t[i]=e:t[r+i]=e})),t}(L),e.getPrefabName()&&-1!==i.VARIABLE_CONSTANTS.REST_SUPPORTED_SERVICES.indexOf(e.serviceType)?(f="prefabs/"+e.getPrefabName()+f,m="invokePrefabRestService"):e.getPrefabName()||(f="services"+f),f=i.$rootScope.project.deployedUrl+f);var R=s.PaginationUtils.getPaginationInfo(t,e);if(R&&e.pagination){var N=s.PaginationUtils.setPaginationAtReq(R,t,e,L,h,f,u);N&&(N.headers?L=N.headers:N.requestBody?h=N.requestBody:N.url&&(f=N.url))}return{projectID:i.$rootScope.project.id,url:f,target:m,method:_,headers:L,data:h,authDetails:P,isDirectCall:!w,isExtURL:e.serviceType===i.VARIABLE_CONSTANTS.SERVICE_TYPE.REST,withCredentials:T}},e.isFileUploadRequest=function(e){return"FileService"===e.service&&"uploadFile"===e.operation},e.excludePaginationParams=function(e){return l().map(l().reject(e,(function(e){return l().includes(i.VARIABLE_CONSTANTS.PAGINATION_PARAMS,e.name)})),(function(e){return e.name}))},e}()},"./src/util/variable/variables.utils.ts":
|
|
4387
4391
|
/*!**********************************************!*\
|
|
4388
4392
|
!*** ./src/util/variable/variables.utils.ts ***!
|
|
4389
4393
|
\**********************************************/
|
|
4390
|
-
(e,t,n)=>{"use strict";n.r(t),n.d(t,{appManager:()=>r,debounceVariableCall:()=>k,decodeData:()=>A,dialogService:()=>d,formatDate:()=>H,formatExportExpression:()=>C,getBlob:()=>M,getErrMessage:()=>V,getEvaluatedOrderBy:()=>O,getTarget:()=>N,getTargetNodeKey:()=>I,getTargetObj:()=>P,httpService:()=>i,initiateCallback:()=>F,internalBoundNodeMap:()=>b,isFileUploadSupported:()=>T,metadataService:()=>o,navigationService:()=>a,oauthService:()=>l,routerService:()=>s,securityService:()=>c,setInput:()=>D,setValueToNode:()=>R,toasterService:()=>u,updateInternalNodes:()=>j,wmSetDependency:()=>E});var r,i,o,a,s,u,l,c,d,p=n(/*! ../utils */"./src/util/utils.ts"),h=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),f=n(/*! moment */"./node_modules/moment/moment.js"),m=n.n(f),v=n(/*! lodash */"./node_modules/lodash/lodash.js"),g=n.n(v),y=n(/*! he */"./node_modules/he/he.js"),_=n.n(y),b=new Map,w=new Map,S=/^\[("|')[\w\W]*(\1)\]$/,x=function(e,t){var n,r,i=g().noop;w.has(e)&&(i=w.get(e).cancel),i(),n=g().debounce((function(){(r=e[t]())instanceof Promise&&r.catch(g().noop)}),100),w.set(e,n),n()},E=function(e,t){switch(e){case"appManager":r=t;break;case"http":i=t;break;case"metadata":o=t;break;case"navigationService":a=t;break;case"router":s=t;break;case"toaster":u=t;break;case"oAuth":l=t;break;case"security":c=t;break;case"dialog":d=t}},k=x,T=function(){return window.File&&window.FileReader&&window.FileList&&window.Blob},C=function(e){return g().forEach(e,(function(e){e.expression&&(e.expression="${"+e.expression+"}")})),e},M=function(e,t){if(e instanceof Blob)return e;var n=(0,p.getValidJSON)(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},D=function(e,t,n,r){e=e||{};var i,o,a={};if(g().isObject(r))switch(r.type){case"file":n=M(n,r.contentType);break;case"number":n=g().isNumber(n)?n:parseInt(n,10)}return g().isObject(t)?a=t:t.indexOf(".")>-1?(o=(i=t.split(".")).pop(),e=(0,p.findValueOf)(e,i.join("."),!0),a[t=o]=n):a[t]=n,g().forEach(a,(function(t,n){e[n]=t})),e},A=function(e){if(!e)return e;if(g().isArray(e))g().forEach(e,(function(e){g().isString(e)?e=L(e):g().isObject(e)&&g().forEach(e,(function(t,n){t&&g().isString(t)?e[n]=L(t):g().isObject(t)&&A(t)}))}));else if(g().isObject(e))g().forEach(e,(function(t,n){t&&g().isString(t)?e[n]=L(t):g().isObject(t)&&A(t)}));else if(g().isString(e))return e=L(e)};function L(e){return _().unescape(e)}var O=function(e,t){var n,r;return!t||g().isEmpty(t)?e:e?(e=g().split(e,","),t=g().split(t,","),n=g().map(t,(function(e){return g().split(g().trim(e)," ")[0]})),g().remove(e,(function(e){return g().includes(n,g().split(g().trim(e)," ")[0])})),r=e.length?","+g().join(e,","):"",g().join(t,",")+r):t},P=function(e,t,n){var r,i=e.target,o=n[t];return S.test(i)?r=o:(i=i.substr(0,i.lastIndexOf(".")),r=e.target===t?n:i?(0,p.findValueOf)(o,i,!0):o),r},I=function(e){return S.test(e)?e.replace(/^(\[["'])|(["']\])$/g,""):e.split(".").pop()},R=function(e,t,n,r,i,o){var a=I(e),s=P(t,n,r);i=g().isUndefined(i)?t.value:i,s&&(s[a]=i),function(e,t,n,r,i){switch(r.category){case h.VARIABLE_CONSTANTS.CATEGORY.LIVE:"read"===r.operation?("dataBinding"===e?g().forEach(t,(function(e,t){r.filterFields[t]={value:e}})):r.filterFields[e]={value:t,type:n},r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.listRecords)&&!i&&x(r,"listRecords")):("dataBinding"===e?r.inputFields=t:r.inputFields[e]=t,r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r[r.operation+"Record"])&&!i&&x(r,r.operation+"Record"));break;case h.VARIABLE_CONSTANTS.CATEGORY.CRUD:"list"===r.operationType&&r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke");break;case h.VARIABLE_CONSTANTS.CATEGORY.SERVICE:case h.VARIABLE_CONSTANTS.CATEGORY.LOGIN:r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke");break;case h.VARIABLE_CONSTANTS.CATEGORY.DEVICE:r[e]=t,r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke")}}(a,i,t.type,r,o)},N=function(e){var t;switch(e.category){case h.VARIABLE_CONSTANTS.CATEGORY.MODEL:t="dataSet";break;case h.VARIABLE_CONSTANTS.CATEGORY.LIVE:t="read"===e.operation?"filterFields":"inputFields";break;default:t="dataBinding"}return t},j=function(e,t,n){var r,i=g().keys(g().get(b.get(n),[n.name,t])),o=I(e);(r=g().filter(i,(function(e){return e!==o&&g().includes(e,o)||(o===t||"dataBinding"===o)&&e!==o}))).length&&g().forEach(r,(function(e){R(e,{target:e},t,n,g().get(b.get(n),[n.name,t,e]))}))},F=function(e,t,n,r,i){var o,a=t[e],s=t._context;e!==h.VARIABLE_CONSTANTS.EVENT.ERROR||i||a||(o=s.Actions[h.VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION])&&(n=o.getMessage()||n,n=g().isString(n)?n:"An error has occured. Please check the app logs.",o.invoke({message:n},void 0,void 0));var u=t[e]||p.noop;return e===h.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE?"wm.LiveVariable"===t.category&&"read"===t.operation?u(t._context,{variable:t,dataFilter:n,options:r}):u(t._context,{variable:t,inputData:n,options:r}):u(t._context,{variable:t,data:n,options:r})},Y=function(e,t){var
|
|
4394
|
+
(e,t,n)=>{"use strict";n.r(t),n.d(t,{appManager:()=>r,debounceVariableCall:()=>k,decodeData:()=>A,dialogService:()=>d,formatDate:()=>H,formatExportExpression:()=>C,getBlob:()=>M,getErrMessage:()=>V,getEvaluatedOrderBy:()=>O,getTarget:()=>N,getTargetNodeKey:()=>I,getTargetObj:()=>P,httpService:()=>i,initiateCallback:()=>F,internalBoundNodeMap:()=>b,isFileUploadSupported:()=>T,metadataService:()=>o,navigationService:()=>a,oauthService:()=>l,routerService:()=>s,securityService:()=>c,setInput:()=>D,setValueToNode:()=>R,toasterService:()=>u,updateInternalNodes:()=>j,wmSetDependency:()=>E});var r,i,o,a,s,u,l,c,d,p=n(/*! ../utils */"./src/util/utils.ts"),h=n(/*! ../../constants/variables.constants */"./src/constants/variables.constants.ts"),f=n(/*! moment */"./node_modules/moment/moment.js"),m=n.n(f),v=n(/*! lodash */"./node_modules/lodash/lodash.js"),g=n.n(v),y=n(/*! he */"./node_modules/he/he.js"),_=n.n(y),b=new Map,w=new Map,S=/^\[("|')[\w\W]*(\1)\]$/,x=function(e,t){var n,r,i=g().noop;w.has(e)&&(i=w.get(e).cancel),i(),n=g().debounce((function(){(r=e[t]())instanceof Promise&&r.catch(g().noop)}),100),w.set(e,n),n()},E=function(e,t){switch(e){case"appManager":r=t;break;case"http":i=t;break;case"metadata":o=t;break;case"navigationService":a=t;break;case"router":s=t;break;case"toaster":u=t;break;case"oAuth":l=t;break;case"security":c=t;break;case"dialog":d=t}},k=x,T=function(){return window.File&&window.FileReader&&window.FileList&&window.Blob},C=function(e){return g().forEach(e,(function(e){e.expression&&(e.expression="${"+e.expression+"}")})),e},M=function(e,t){if(e instanceof Blob)return e;var n=(0,p.getValidJSON)(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},D=function(e,t,n,r){e=e||{};var i,o,a={};if(g().isObject(r))switch(r.type){case"file":n=M(n,r.contentType);break;case"number":n=g().isNumber(n)?n:parseInt(n,10)}return g().isObject(t)?a=t:t.indexOf(".")>-1?(o=(i=t.split(".")).pop(),e=(0,p.findValueOf)(e,i.join("."),!0),a[t=o]=n):a[t]=n,g().forEach(a,(function(t,n){e[n]=t})),e},A=function(e){if(!e)return e;if(g().isArray(e))g().forEach(e,(function(e){g().isString(e)?e=L(e):g().isObject(e)&&g().forEach(e,(function(t,n){t&&g().isString(t)?e[n]=L(t):g().isObject(t)&&A(t)}))}));else if(g().isObject(e))g().forEach(e,(function(t,n){t&&g().isString(t)?e[n]=L(t):g().isObject(t)&&A(t)}));else if(g().isString(e))return e=L(e)};function L(e){return _().unescape(e)}var O=function(e,t){var n,r;return!t||g().isEmpty(t)?e:e?(e=g().split(e,","),t=g().split(t,","),n=g().map(t,(function(e){return g().split(g().trim(e)," ")[0]})),g().remove(e,(function(e){return g().includes(n,g().split(g().trim(e)," ")[0])})),r=e.length?","+g().join(e,","):"",g().join(t,",")+r):t},P=function(e,t,n){var r,i=e.target,o=n[t];return S.test(i)?r=o:(i=i.substr(0,i.lastIndexOf(".")),r=e.target===t?n:i?(0,p.findValueOf)(o,i,!0):o),r},I=function(e){return S.test(e)?e.replace(/^(\[["'])|(["']\])$/g,""):e.split(".").pop()},R=function(e,t,n,r,i,o){var a=I(e),s=P(t,n,r);i=g().isUndefined(i)?t.value:i,s&&(s[a]=i),function(e,t,n,r,i){switch(r.category){case h.VARIABLE_CONSTANTS.CATEGORY.LIVE:"read"===r.operation?("dataBinding"===e?g().forEach(t,(function(e,t){r.filterFields[t]={value:e}})):r.filterFields[e]={value:t,type:n},r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.listRecords)&&!i&&x(r,"listRecords")):("dataBinding"===e?r.inputFields=t:r.inputFields[e]=t,r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r[r.operation+"Record"])&&!i&&x(r,r.operation+"Record"));break;case h.VARIABLE_CONSTANTS.CATEGORY.CRUD:"list"===r.operationType&&r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke");break;case h.VARIABLE_CONSTANTS.CATEGORY.SERVICE:case h.VARIABLE_CONSTANTS.CATEGORY.LOGIN:r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke");break;case h.VARIABLE_CONSTANTS.CATEGORY.DEVICE:r[e]=t,r.autoUpdate&&!g().isUndefined(t)&&g().isFunction(r.invoke)&&!i&&x(r,"invoke")}}(a,i,t.type,r,o)},N=function(e){var t;switch(e.category){case h.VARIABLE_CONSTANTS.CATEGORY.MODEL:t="dataSet";break;case h.VARIABLE_CONSTANTS.CATEGORY.LIVE:t="read"===e.operation?"filterFields":"inputFields";break;default:t="dataBinding"}return t},j=function(e,t,n){var r,i=g().keys(g().get(b.get(n),[n.name,t])),o=I(e);(r=g().filter(i,(function(e){return e!==o&&g().includes(e,o)||(o===t||"dataBinding"===o)&&e!==o}))).length&&g().forEach(r,(function(e){R(e,{target:e},t,n,g().get(b.get(n),[n.name,t,e]))}))},F=function(e,t,n,r,i){var o,a=t[e],s=t._context;e!==h.VARIABLE_CONSTANTS.EVENT.ERROR||i||a||(o=s.Actions[h.VARIABLE_CONSTANTS.DEFAULT_VAR.NOTIFICATION])&&(n=o.getMessage()||n,n=g().isString(n)?n:"An error has occured. Please check the app logs.",o.invoke({message:n},void 0,void 0));var u=t[e]||p.noop;return e===h.VARIABLE_CONSTANTS.EVENT.BEFORE_UPDATE?"wm.LiveVariable"===t.category&&"read"===t.operation?u(t._context,{variable:t,dataFilter:n,options:r}):u(t._context,{variable:t,inputData:n,options:r}):u(t._context,{variable:t,data:n,options:r})},Y=function(e,t,n){var r;return g().isDate(e)?r=e.getTime():(isNaN(e)||(e=parseInt(e,10)),r=e&&m()(e).valueOf()),isNaN(r)&&t!==p.DataType.TIME||t===p.DataType.TIMESTAMP?r:(t!==p.DataType.TIME||r||(r=m()((new Date).toDateString()+" "+e).valueOf()),e&&n.format(r,function(e){return p.DEFAULT_FORMATS[g().toUpper(e)]}(t)))},H=function(e,t,n){return g().includes(t,".")&&(t=g().toLower((0,p.extractType)(t))),g().isArray(e)?g().map(e,(function(e){return Y(e,t,n)})):Y(e,t,n)},B=function(e){return e.message?(0,p.replace)(e.message,e.parameters,!0):e.parameters&&e.parameters[0]||""},V=function(e,t){var n={404:t.MESSAGE_404_ERROR||"Requested resource not found",401:t.MESSAGE_401_ERROR||"Requested resource requires authentication",403:t.LABEL_FORBIDDEN_MESSAGE||"The requested resource access/action is forbidden."}[e.status],r=e.error||e.data;return n=(r=(0,p.getValidJSON)(r)||r)&&r.errors?function(e){var t="";return e&&e.error&&e.error.length&&e.error.forEach((function(e,n){t+=B(e)+(n>0?"\n":"")})),t}(r.errors)||n||"Service Call Failed":n||"Service Call Failed"}},"./node_modules/x2js/x2js.js":
|
|
4391
4395
|
/*!***********************************!*\
|
|
4392
4396
|
!*** ./node_modules/x2js/x2js.js ***!
|
|
4393
4397
|
\***********************************/
|
|
4394
4398
|
function(e,t){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.4.4";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function a(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function s(e){return e.prefix}function u(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function l(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var a=t.arrayAccessFormPaths[o];if("string"==typeof a){if(a===r){i=!0;break}}else if(a instanceof RegExp){if(a.test(r)){i=!0;break}}else if("function"==typeof a&&a(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var a=t.datetimeAccessFormPaths[o];if("string"==typeof a){if(a===i)return d(e)}else if(a instanceof RegExp){if(a.test(i))return d(e)}else if("function"==typeof a&&a(i))return d(e)}return e}function h(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var s=r.item(i);if(s.nodeType===o.ELEMENT_NODE){var u=a(s);t.ignoreRoot?n=m(s,u):n[u]=m(s,u)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,u=0;u<i.length;u++){var d=i.item(u),h=a(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[h]?(r[h]=m(d,n+"."+h),c(r,h,n+"."+h)):(r[h]instanceof Array||(r[h]=[r[h]],c(r,h,n+"."+h)),r[h][r[h].length]=m(d,n+"."+h)))}for(var f=0;f<e.attributes.length;f++){var v=e.attributes.item(f);r.__cnt++;for(var g=v.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,v.name,v.value)&&(g=_.convert.call(null,v.name,v.value))}r[t.attributePrefix+v.name]=g}var b=s(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=l(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!t.keepText?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?h(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function v(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var a=0;a<r.length;a++){var s=r[a],l=e[s];t.escapeMode&&(l=u(l)),o+=" "+s.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+l+'"':o+="'"+l+"'"}return o+=i?" />":">"}function g(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function S(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=u(e.__text):n+=e.__text),n}function x(e){var n="";return e instanceof Object?n+=S(e):null!==e&&(t.escapeMode?n+=u(e):n+=e),n}function E(e,t,n){var r="";if(0===e.length)r+=v(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=k(e[i],t,w(e[i]));return r}function k(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=E(e,n,r);else if(e instanceof Date)i+=v(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=g(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=v(e,n,r,!1),i+=T(e),i+=g(e,n)):t.selfClosingElements?i+=v(e,n,r,!0):(i+=v(e,n,r,!1),i+=g(e,n))}else i+=v(e,n,r,!1),i+=x(e),i+=g(e,n);else i+=v(e,n,r,!0);return i}function T(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=k(r,n,w(r))}return t+=x(e)}function C(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,i=null;if(e)i=(r=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var o=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{o=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){o=null}try{i=r.parseFromString(n,"text/xml"),null!==o&&i.getElementsByTagNameNS(o,"parsererror").length>0&&(i=null)}catch(e){i=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(n);return i}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return C(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return C(this.js2xml(e))},this.xml2js=function(e){var t=C(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return T(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
|
|
4395
4399
|
/*!******************!*\
|
|
4396
4400
|
!*** ./index.ts ***!
|
|
4397
|
-
\******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>p.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),p=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h="hello from variables"})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],t):t((e=e||self)["angular-imask"]={},e.ng.core,e.ng.forms,e.ng.platformBrowser,e.IMask,e.ng.common)}(this,(function(e,t,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0},u=function(e){return e.nativeElement},l=function(){function e(e,n,i){var o;this._elementRef=e,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new t.EventEmitter,this.complete=new t.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},e.prototype.ngOnChanges=function(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=u),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},e.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},e.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},e.prototype.beginWrite=function(e){this._writing=!0,this._writingValue=e},e.prototype.endWrite=function(){return this._writing=!1,this._writingValue},e.prototype.writeValue=function(e){e=null==e?"":e,this.maskRef?(this.beginWrite(e),(this.maskValue!==e||"string"!=typeof e&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=e)):this._renderer.setProperty(this.element,"value",e)},e.prototype._onAccept=function(){var e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))},e.prototype._onComplete=function(){this.complete.emit(this.maskValue)},e.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this.element,"disabled",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._handleInput=function(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this._handleInput(e)},e.decorators=[{type:t.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},e.propDecorators={imask:[{type:t.Input}],unmask:[{type:t.Input}],imaskElement:[{type:t.Input}],accept:[{type:t.Output}],complete:[{type:t.Output}]},e}();var c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},d=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},p=function(){function e(){}return e.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.pipe.apply(void 0,d(e))},e.decorators=[{type:t.Pipe,args:[{name:"imask"}]}],e}(),h=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[l,p],exports:[l,p]}]}],e}();Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return i.pipe}}),e.IMaskDirective=l,e.IMaskModule=h,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,l;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[e[this._current]])t.push({start:this._current,type:a[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))l=this.consumeNumber(e),t.push(l);else if("["===e[this._current])l=this.consumeLBracket(e),t.push(l);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[e[this._current]])l=this.consumeOperator(e),l&&t.push(l);else if(void 0!==u[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...l.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var p;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(p||(p={}));class h{constructor(e){this.TYPE_NAME_TABLE={[p.TYPE_NUMBER]:"number",[p.TYPE_ANY]:"any",[p.TYPE_STRING]:"string",[p.TYPE_ARRAY]:"array",[p.TYPE_OBJECT]:"object",[p.TYPE_BOOLEAN]:"boolean",[p.TYPE_EXPREF]:"expression",[p.TYPE_NULL]:"null",[p.TYPE_ARRAY_NUMBER]:"Array<number>",[p.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>a&&(a=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<a&&(a=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==p.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===p.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![p.TYPE_NUMBER,p.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),a=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===p.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===p.TYPE_NUMBER?e:t!==p.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===p.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case p.TYPE_NUMBER:return"number";case p.TYPE_STRING:return"string";case p.TYPE_ARRAY:return"array";case p.TYPE_OBJECT:return"object";case p.TYPE_BOOLEAN:return"boolean";case p.TYPE_EXPREF:return"expref";case p.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[p.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[p.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]},{types:[p.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[p.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[p.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY,p.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[p.TYPE_EXPREF]},{types:[p.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[p.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[p.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[p.TYPE_ARRAY_STRING,p.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[p.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[p.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[p.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[p.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[p.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const a=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=t.length<a,l=t.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${a} argument${o?"s":""} but received ${t.length}`);let d,p,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,d=n[r].types,p=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==p&&this.typeMatches(p,d[i],t[r])){h=!0;break}if(!h&&void 0!==p){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[p]} instead.`)}}}typeMatches(e,t,n){if(t===p.TYPE_ANY)return!0;if(t!==p.TYPE_ARRAY_STRING&&t!==p.TYPE_ARRAY_NUMBER&&t!==p.TYPE_ARRAY)return e===t;if(t===p.TYPE_ARRAY)return e===p.TYPE_ARRAY;if(e===p.TYPE_ARRAY){let e;t===p.TYPE_ARRAY_NUMBER?e=p.TYPE_NUMBER:t===p.TYPE_ARRAY_STRING&&(e=p.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return p.TYPE_STRING;case"[object Number]":return p.TYPE_NUMBER;case"[object Array]":return p.TYPE_ARRAY;case"[object Boolean]":return p.TYPE_BOOLEAN;case"[object Null]":return p.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?p.TYPE_EXPREF:p.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let a,s,u,l,c,d,p,h,f,m,v;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(u=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(u=this.visit(e.children[1],u),null===u)return null;return u;case"IndexExpression":return p=this.visit(e.children[0],i),h=this.visit(e.children[1],p),h;case"Index":if(!Array.isArray(i))return null;let g=e.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,S]=_;if(u=[],S>0)for(m=b;m<w;m+=S)u.push(i[m]);else for(m=b;m>w;m+=S)u.push(i[m]);return u;case"Projection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;for(f=[],m=0;m<v.length;m+=1)s=this.visit(e.children[1],v[m]),null!==s&&f.push(s);return f;case"ValueProjection":if(v=this.visit(e.children[0],i),!t(v))return null;f=[];const x=Object.values(v);for(m=0;m<x.length;m+=1)s=this.visit(e.children[1],x[m]),null!==s&&f.push(s);return f;case"FilterProjection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;const E=[],k=[];for(m=0;m<v.length;m+=1)a=this.visit(e.children[2],v[m]),r(a)||E.push(v[m]);for(let t=0;t<E.length;t+=1)s=this.visit(e.children[1],E[t]),null!==s&&k.push(s);return k;case"Comparator":switch(l=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(e.children[0],i);if(!Array.isArray(T))return null;let C=[];for(m=0;m<T.length;m+=1)s=T[m],Array.isArray(s)?C=[...C,...s]:C.push(s);return C;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let M;for(f={},m=0;m<e.children.length;m+=1)M=e.children[m],f[M.name]=this.visit(M.value,i);return f;case"OrExpression":return a=this.visit(e.children[0],i),r(a)&&(a=this.visit(e.children[1],i)),a;case"AndExpression":return l=this.visit(e.children[0],i),r(l)?l:this.visit(e.children[1],i);case"NotExpression":return l=this.visit(e.children[0],i),r(l);case"Literal":return e.value;case o.TOK_PIPE:return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const D=[];for(let t=0;t<e.children.length;t+=1)D.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,D);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=p.TYPE_ANY,v=p.TYPE_ARRAY,g=p.TYPE_ARRAY_NUMBER,y=p.TYPE_ARRAY_STRING,_=p.TYPE_BOOLEAN,b=p.TYPE_EXPREF,w=p.TYPE_NULL,S=p.TYPE_NUMBER,x=p.TYPE_OBJECT,E=p.TYPE_STRING;function k(e){return d.parse(e)}function T(e){return l.tokenize(e)}const C=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function M(e,t){const n=d.parse(t);return f.search(n,e)}const D=f,A={compile:k,registerFunction:C,search:M,tokenize:T,TreeInterpreter:D,TYPE_ANY:m,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:v,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:S,TYPE_OBJECT:x,TYPE_STRING:E};e.TYPE_ANY=m,e.TYPE_ARRAY=v,e.TYPE_ARRAY_NUMBER=g,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=S,e.TYPE_OBJECT=x,e.TYPE_STRING=E,e.TreeInterpreter=D,e.compile=k,e.default=A,e.jmespath=A,e.registerFunction=C,e.search=M,e.tokenize=T,Object.defineProperty(e,"__esModule",{value:!0})})),function(){!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/collapse",["exports","@angular/animations","@angular/core"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].collapse={}),e.ng.animations,e.ng.core)}(this,(function(e,t,n){"use strict";var r="400ms cubic-bezier(0.4,0.0,0.2,1)",i=[t.style({height:0,visibility:"hidden"}),t.animate(r,t.style({height:"*",visibility:"visible"}))],o=[t.style({height:"*",visibility:"visible"}),t.animate(r,t.style({height:0,visibility:"hidden"}))],a=function(){function e(e,t,r){this._el=e,this._renderer=t,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(o),this._factoryExpandAnimation=r.build(i)}return Object.defineProperty(e.prototype,"display",{set:function(e){this.isAnimated?(this._display=e,"none"!==e?this.show():this.hide()):this._renderer.setStyle(this._el.nativeElement,"display",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapse",{get:function(){return this.isExpanded},set:function(e){this.collapseNewValue=e,this._player&&!this._isAnimationDone||(this.isExpanded=e,this.toggle())},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))},e.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},e.prototype.hide=function(){var e=this;this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.show():(e.collapsed.emit(e),e._renderer.setStyle(e._el.nativeElement,"display","none"))}))},e.prototype.show=function(){var e=this;this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.hide():(e.expanded.emit(e),e._renderer.removeStyle(e._el.nativeElement,"overflow"))}))},e.prototype.animationRun=function(e,t){var n=this;if(!e||!this._stylesLoaded)return function(e){return e()};this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");var r=t===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.destroy(),this._player=r.create(this._el.nativeElement),this._player.play(),function(e){return n._player.onDone(e)}},e.decorators=[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:t.AnimationBuilder}]},e.propDecorators={collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]},{type:n.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]},e}();var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e.decorators=[{type:n.NgModule,args:[{declarations:[a],exports:[a]}]}],e}();e.CollapseDirective=a,e.CollapseModule=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("ngx-bootstrap/chronos",["exports"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].chronos={}))}(this,(function(e){"use strict";function t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function n(e){return"string"==typeof e}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e){return e&&e.getTime&&!isNaN(e.getTime())}function o(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function d(e){var n=+e,r=0;return 0!==n&&isFinite(n)&&(r=t(n)),r}var p={},h={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(e,t){var n=e.toLowerCase(),r=e;n in h&&(r=h[n]),p[n]=p[n+"s"]=p[t]=r}function m(e){return n(e)?p[e]||p[e.toLowerCase()]:void 0}function v(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var g={},y={},_=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function b(e,t,n,r){e&&(y[e]=r),t&&(y[t[0]]=function(){return v(r.apply(null,arguments),t[1],t[2])}),n&&(y[n]=function(t,n){return n.locale.ordinal(r.apply(null,arguments),e)})}function w(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function S(e,t,n){var r=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e),r}function x(e,t,n,r,i,o,a){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function E(e,t){return void 0===t&&(t=!1),t?e.getUTCHours():e.getHours()}function k(e,t){return void 0===t&&(t=!1),t?e.getUTCMinutes():e.getMinutes()}function T(e,t){return void 0===t&&(t=!1),t?e.getUTCSeconds():e.getSeconds()}function C(e,t){return void 0===t&&(t=!1),t?e.getUTCMilliseconds():e.getMilliseconds()}function M(e,t){return void 0===t&&(t=!1),t?e.getUTCDay():e.getDay()}function D(e,t){return void 0===t&&(t=!1),t?e.getUTCDate():e.getDate()}function A(e,t){return void 0===t&&(t=!1),t?e.getUTCMonth():e.getMonth()}function L(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear():e.getFullYear()}function O(e,t){return!(!e||!t)&&(P(e,t)&&A(e)===A(t))}function P(e,t){return!(!e||!t)&&L(e)===L(t)}var I=/\d/,R=/\d\d/,N=/\d{3}/,j=/\d{4}/,F=/[+-]?\d{6}/,Y=/\d\d?/,H=/\d\d\d\d?/,B=/\d\d\d\d\d\d?/,V=/\d{1,3}/,U=/\d{1,4}/,q=/[+-]?\d{1,6}/,z=/\d+/,W=/[+-]?\d+/,G=/Z|[+-]\d\d(?::?\d\d)?/gi,K=/[+-]?\d+(\.\d{1,3})?/,$=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Z={};function X(e,t,n){o(t)?Z[e]=t:Z[e]=function(e,r){return e&&n?n:t}}function J(e,t){return u(Z,e)?Z[e](!1,t):new RegExp(Q(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function Q(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ee={};function te(e,t){var r=n(e)?[e]:e,i=t;if(a(t)&&(i=function(e,n,r){return n[t]=d(e),r}),s(r)&&o(i)){var u=void 0;for(u=0;u<r.length;u++)ee[r[u]]=i}}function ne(e,t){te(e,(function(e,n,r,i){return r._w=r._w||{},t(e,r._w,r,i)}))}function re(e,t,n){return null!=t&&u(ee,e)&&ee[e](t,n._a,n,e),n}var ie={};function oe(e,t){ie[e]=t}function ae(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function se(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():L(e,t.isUTC).toString()}function ue(e){return d(e)+(d(e)>68?1900:2e3)}function le(e){return ce(e)?366:365}function ce(e){return e%4==0&&e%100!=0||e%400==0}function de(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return 1===r?ce(e+(t-r)/12)?29:28:31-r%7%2}var pe={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function he(e,t){return a(t)?t:e}function fe(e,t,n){var r=Math.min(D(e),de(L(e),t));return n?e.setUTCMonth(t,r):e.setMonth(t,r),e}function me(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function ve(e){return new Date(e.getTime())}function ge(e,t,r){var i=ve(e);switch(t){case"year":fe(i,0,r);case"quarter":case"month":me(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(e,t,n){n?e.setUTCHours(t):e.setHours(t)}(i,0,r);case"hours":!function(e,t,n){n?e.setUTCMinutes(t):e.setMinutes(t)}(i,0,r);case"minutes":!function(e,t,n){n?e.setUTCSeconds(t):e.setSeconds(t)}(i,0,r);case"seconds":!function(e,t,n){n?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(i,0,r)}return"week"===t&&function(e,t,n){void 0===n&&(n={});var r=Jt(e,n.locale,n.isUTC);Gt(e,t-r,"day")}(i,0,{isUTC:r}),"isoWeek"===t&&function(e,t,r){void 0===r&&(r={});var i=function(e,t){void 0===t&&(t=at());if(n(e))return t.weekdaysParse(e)%7||7;return a(e)&&isNaN(e)?null:e}(t,r.locale);Zt(e,Xt(e)%7?i:i-7)}
|
|
4401
|
+
\******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>p.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),p=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h=(n(/*! ./src/types/date-formatter */"./src/types/date-formatter.ts"),"hello from variables")})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],t):t((e=e||self)["angular-imask"]={},e.ng.core,e.ng.forms,e.ng.platformBrowser,e.IMask,e.ng.common)}(this,(function(e,t,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0},u=function(e){return e.nativeElement},l=function(){function e(e,n,i){var o;this._elementRef=e,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new t.EventEmitter,this.complete=new t.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},e.prototype.ngOnChanges=function(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=u),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},e.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},e.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},e.prototype.beginWrite=function(e){this._writing=!0,this._writingValue=e},e.prototype.endWrite=function(){return this._writing=!1,this._writingValue},e.prototype.writeValue=function(e){e=null==e?"":e,this.maskRef?(this.beginWrite(e),(this.maskValue!==e||"string"!=typeof e&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=e)):this._renderer.setProperty(this.element,"value",e)},e.prototype._onAccept=function(){var e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))},e.prototype._onComplete=function(){this.complete.emit(this.maskValue)},e.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this.element,"disabled",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._handleInput=function(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this._handleInput(e)},e.decorators=[{type:t.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},e.propDecorators={imask:[{type:t.Input}],unmask:[{type:t.Input}],imaskElement:[{type:t.Input}],accept:[{type:t.Output}],complete:[{type:t.Output}]},e}();var c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},d=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},p=function(){function e(){}return e.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.pipe.apply(void 0,d(e))},e.decorators=[{type:t.Pipe,args:[{name:"imask"}]}],e}(),h=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[l,p],exports:[l,p]}]}],e}();Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return i.pipe}}),e.IMaskDirective=l,e.IMaskModule=h,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,l;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[e[this._current]])t.push({start:this._current,type:a[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))l=this.consumeNumber(e),t.push(l);else if("["===e[this._current])l=this.consumeLBracket(e),t.push(l);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[e[this._current]])l=this.consumeOperator(e),l&&t.push(l);else if(void 0!==u[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...l.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var p;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(p||(p={}));class h{constructor(e){this.TYPE_NAME_TABLE={[p.TYPE_NUMBER]:"number",[p.TYPE_ANY]:"any",[p.TYPE_STRING]:"string",[p.TYPE_ARRAY]:"array",[p.TYPE_OBJECT]:"object",[p.TYPE_BOOLEAN]:"boolean",[p.TYPE_EXPREF]:"expression",[p.TYPE_NULL]:"null",[p.TYPE_ARRAY_NUMBER]:"Array<number>",[p.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>a&&(a=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===p.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[p.TYPE_NUMBER,p.TYPE_STRING]);let i,o,a=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<a&&(a=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==p.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===p.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![p.TYPE_NUMBER,p.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),a=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===p.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===p.TYPE_NUMBER?e:t!==p.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===p.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case p.TYPE_NUMBER:return"number";case p.TYPE_STRING:return"string";case p.TYPE_ARRAY:return"array";case p.TYPE_OBJECT:return"object";case p.TYPE_BOOLEAN:return"boolean";case p.TYPE_EXPREF:return"expref";case p.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[p.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[p.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]},{types:[p.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[p.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[p.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY,p.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[p.TYPE_EXPREF]},{types:[p.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[p.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[p.TYPE_ARRAY_NUMBER,p.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[p.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[p.TYPE_STRING,p.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[p.TYPE_ARRAY_STRING,p.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[p.TYPE_ARRAY]},{types:[p.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[p.TYPE_STRING]},{types:[p.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[p.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[p.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[p.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[p.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[p.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[p.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const a=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=t.length<a,l=t.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${a} argument${o?"s":""} but received ${t.length}`);let d,p,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,d=n[r].types,p=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==p&&this.typeMatches(p,d[i],t[r])){h=!0;break}if(!h&&void 0!==p){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[p]} instead.`)}}}typeMatches(e,t,n){if(t===p.TYPE_ANY)return!0;if(t!==p.TYPE_ARRAY_STRING&&t!==p.TYPE_ARRAY_NUMBER&&t!==p.TYPE_ARRAY)return e===t;if(t===p.TYPE_ARRAY)return e===p.TYPE_ARRAY;if(e===p.TYPE_ARRAY){let e;t===p.TYPE_ARRAY_NUMBER?e=p.TYPE_NUMBER:t===p.TYPE_ARRAY_STRING&&(e=p.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return p.TYPE_STRING;case"[object Number]":return p.TYPE_NUMBER;case"[object Array]":return p.TYPE_ARRAY;case"[object Boolean]":return p.TYPE_BOOLEAN;case"[object Null]":return p.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?p.TYPE_EXPREF:p.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let a,s,u,l,c,d,p,h,f,m,v;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(u=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(u=this.visit(e.children[1],u),null===u)return null;return u;case"IndexExpression":return p=this.visit(e.children[0],i),h=this.visit(e.children[1],p),h;case"Index":if(!Array.isArray(i))return null;let g=e.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,S]=_;if(u=[],S>0)for(m=b;m<w;m+=S)u.push(i[m]);else for(m=b;m>w;m+=S)u.push(i[m]);return u;case"Projection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;for(f=[],m=0;m<v.length;m+=1)s=this.visit(e.children[1],v[m]),null!==s&&f.push(s);return f;case"ValueProjection":if(v=this.visit(e.children[0],i),!t(v))return null;f=[];const x=Object.values(v);for(m=0;m<x.length;m+=1)s=this.visit(e.children[1],x[m]),null!==s&&f.push(s);return f;case"FilterProjection":if(v=this.visit(e.children[0],i),!Array.isArray(v))return null;const E=[],k=[];for(m=0;m<v.length;m+=1)a=this.visit(e.children[2],v[m]),r(a)||E.push(v[m]);for(let t=0;t<E.length;t+=1)s=this.visit(e.children[1],E[t]),null!==s&&k.push(s);return k;case"Comparator":switch(l=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(e.children[0],i);if(!Array.isArray(T))return null;let C=[];for(m=0;m<T.length;m+=1)s=T[m],Array.isArray(s)?C=[...C,...s]:C.push(s);return C;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let M;for(f={},m=0;m<e.children.length;m+=1)M=e.children[m],f[M.name]=this.visit(M.value,i);return f;case"OrExpression":return a=this.visit(e.children[0],i),r(a)&&(a=this.visit(e.children[1],i)),a;case"AndExpression":return l=this.visit(e.children[0],i),r(l)?l:this.visit(e.children[1],i);case"NotExpression":return l=this.visit(e.children[0],i),r(l);case"Literal":return e.value;case o.TOK_PIPE:return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const D=[];for(let t=0;t<e.children.length;t+=1)D.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,D);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=p.TYPE_ANY,v=p.TYPE_ARRAY,g=p.TYPE_ARRAY_NUMBER,y=p.TYPE_ARRAY_STRING,_=p.TYPE_BOOLEAN,b=p.TYPE_EXPREF,w=p.TYPE_NULL,S=p.TYPE_NUMBER,x=p.TYPE_OBJECT,E=p.TYPE_STRING;function k(e){return d.parse(e)}function T(e){return l.tokenize(e)}const C=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function M(e,t){const n=d.parse(t);return f.search(n,e)}const D=f,A={compile:k,registerFunction:C,search:M,tokenize:T,TreeInterpreter:D,TYPE_ANY:m,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:v,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:S,TYPE_OBJECT:x,TYPE_STRING:E};e.TYPE_ANY=m,e.TYPE_ARRAY=v,e.TYPE_ARRAY_NUMBER=g,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=S,e.TYPE_OBJECT=x,e.TYPE_STRING=E,e.TreeInterpreter=D,e.compile=k,e.default=A,e.jmespath=A,e.registerFunction=C,e.search=M,e.tokenize=T,Object.defineProperty(e,"__esModule",{value:!0})})),function(){!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/collapse",["exports","@angular/animations","@angular/core"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].collapse={}),e.ng.animations,e.ng.core)}(this,(function(e,t,n){"use strict";var r="400ms cubic-bezier(0.4,0.0,0.2,1)",i=[t.style({height:0,visibility:"hidden"}),t.animate(r,t.style({height:"*",visibility:"visible"}))],o=[t.style({height:"*",visibility:"visible"}),t.animate(r,t.style({height:0,visibility:"hidden"}))],a=function(){function e(e,t,r){this._el=e,this._renderer=t,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(o),this._factoryExpandAnimation=r.build(i)}return Object.defineProperty(e.prototype,"display",{set:function(e){this.isAnimated?(this._display=e,"none"!==e?this.show():this.hide()):this._renderer.setStyle(this._el.nativeElement,"display",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapse",{get:function(){return this.isExpanded},set:function(e){this.collapseNewValue=e,this._player&&!this._isAnimationDone||(this.isExpanded=e,this.toggle())},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewChecked=function(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))},e.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},e.prototype.hide=function(){var e=this;this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.show():(e.collapsed.emit(e),e._renderer.setStyle(e._el.nativeElement,"display","none"))}))},e.prototype.show=function(){var e=this;this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((function(){e._isAnimationDone=!0,e.collapseNewValue!==e.isCollapsed&&e.isAnimated?e.hide():(e.expanded.emit(e),e._renderer.removeStyle(e._el.nativeElement,"overflow"))}))},e.prototype.animationRun=function(e,t){var n=this;if(!e||!this._stylesLoaded)return function(e){return e()};this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");var r=t===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.destroy(),this._player=r.create(this._el.nativeElement),this._player.play(),function(e){return n._player.onDone(e)}},e.decorators=[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2},{type:t.AnimationBuilder}]},e.propDecorators={collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]},{type:n.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]},e}();var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e.decorators=[{type:n.NgModule,args:[{declarations:[a],exports:[a]}]}],e}();e.CollapseDirective=a,e.CollapseModule=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("ngx-bootstrap/chronos",["exports"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||e,e["ngx-bootstrap"].chronos={}))}(this,(function(e){"use strict";function t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function n(e){return"string"==typeof e}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e){return e&&e.getTime&&!isNaN(e.getTime())}function o(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function d(e){var n=+e,r=0;return 0!==n&&isFinite(n)&&(r=t(n)),r}var p={},h={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(e,t){var n=e.toLowerCase(),r=e;n in h&&(r=h[n]),p[n]=p[n+"s"]=p[t]=r}function m(e){return n(e)?p[e]||p[e.toLowerCase()]:void 0}function v(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var g={},y={},_=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function b(e,t,n,r){e&&(y[e]=r),t&&(y[t[0]]=function(){return v(r.apply(null,arguments),t[1],t[2])}),n&&(y[n]=function(t,n){return n.locale.ordinal(r.apply(null,arguments),e)})}function w(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function S(e,t,n){var r=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e),r}function x(e,t,n,r,i,o,a){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0);var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function E(e,t){return void 0===t&&(t=!1),t?e.getUTCHours():e.getHours()}function k(e,t){return void 0===t&&(t=!1),t?e.getUTCMinutes():e.getMinutes()}function T(e,t){return void 0===t&&(t=!1),t?e.getUTCSeconds():e.getSeconds()}function C(e,t){return void 0===t&&(t=!1),t?e.getUTCMilliseconds():e.getMilliseconds()}function M(e,t){return void 0===t&&(t=!1),t?e.getUTCDay():e.getDay()}function D(e,t){return void 0===t&&(t=!1),t?e.getUTCDate():e.getDate()}function A(e,t){return void 0===t&&(t=!1),t?e.getUTCMonth():e.getMonth()}function L(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear():e.getFullYear()}function O(e,t){return!(!e||!t)&&(P(e,t)&&A(e)===A(t))}function P(e,t){return!(!e||!t)&&L(e)===L(t)}var I=/\d/,R=/\d\d/,N=/\d{3}/,j=/\d{4}/,F=/[+-]?\d{6}/,Y=/\d\d?/,H=/\d\d\d\d?/,B=/\d\d\d\d\d\d?/,V=/\d{1,3}/,U=/\d{1,4}/,q=/[+-]?\d{1,6}/,z=/\d+/,W=/[+-]?\d+/,G=/Z|[+-]\d\d(?::?\d\d)?/gi,K=/[+-]?\d+(\.\d{1,3})?/,$=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Z={};function X(e,t,n){o(t)?Z[e]=t:Z[e]=function(e,r){return e&&n?n:t}}function J(e,t){return u(Z,e)?Z[e](!1,t):new RegExp(Q(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function Q(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ee={};function te(e,t){var r=n(e)?[e]:e,i=t;if(a(t)&&(i=function(e,n,r){return n[t]=d(e),r}),s(r)&&o(i)){var u=void 0;for(u=0;u<r.length;u++)ee[r[u]]=i}}function ne(e,t){te(e,(function(e,n,r,i){return r._w=r._w||{},t(e,r._w,r,i)}))}function re(e,t,n){return null!=t&&u(ee,e)&&ee[e](t,n._a,n,e),n}var ie={};function oe(e,t){ie[e]=t}function ae(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function se(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():L(e,t.isUTC).toString()}function ue(e){return d(e)+(d(e)>68?1900:2e3)}function le(e){return ce(e)?366:365}function ce(e){return e%4==0&&e%100!=0||e%400==0}function de(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return 1===r?ce(e+(t-r)/12)?29:28:31-r%7%2}var pe={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function he(e,t){return a(t)?t:e}function fe(e,t,n){var r=Math.min(D(e),de(L(e),t));return n?e.setUTCMonth(t,r):e.setMonth(t,r),e}function me(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function ve(e){return new Date(e.getTime())}function ge(e,t,r){var i=ve(e);switch(t){case"year":fe(i,0,r);case"quarter":case"month":me(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(e,t,n){n?e.setUTCHours(t):e.setHours(t)}(i,0,r);case"hours":!function(e,t,n){n?e.setUTCMinutes(t):e.setMinutes(t)}(i,0,r);case"minutes":!function(e,t,n){n?e.setUTCSeconds(t):e.setSeconds(t)}(i,0,r);case"seconds":!function(e,t,n){n?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(i,0,r)}return"week"===t&&function(e,t,n){void 0===n&&(n={});var r=Jt(e,n.locale,n.isUTC);Gt(e,t-r,"day")}(i,0,{isUTC:r}),"isoWeek"===t&&function(e,t,r){void 0===r&&(r={});var i=function(e,t){void 0===t&&(t=at());if(n(e))return t.weekdaysParse(e)%7||7;return a(e)&&isNaN(e)?null:e}(t,r.locale);Zt(e,Xt(e)%7?i:i-7)}
|
|
4398
4402
|
//! moment.js locale configuration
|
|
4399
4403
|
//! locale : Arabic [ar]
|
|
4400
4404
|
//! author : Abdel Said: https://github.com/abdelsaid
|
|
@@ -5052,7 +5052,12 @@
|
|
|
5052
5052
|
fieldDefs = [];
|
|
5053
5053
|
parent.gridOptions.setCurrentPage(1);
|
|
5054
5054
|
}
|
|
5055
|
-
var currentPage
|
|
5055
|
+
var currentPage;
|
|
5056
|
+
if (parent.widgetType === "wm-table") {
|
|
5057
|
+
currentPage = parent.gridOptions.showviewlessbutton && parent.gridOptions.mode === "viewless" ? parent.gridOptions.getCurrentPage() : parent.currentPage;
|
|
5058
|
+
} else {
|
|
5059
|
+
currentPage = parent.currentPage;
|
|
5060
|
+
}
|
|
5056
5061
|
var dataNavigator = parent.dataNavigator;
|
|
5057
5062
|
var pagesize = parent.pagesize;
|
|
5058
5063
|
if (!isDefined(fieldDefs) || dataNavigator.isFirstPage()) {
|
|
@@ -64701,6 +64706,13 @@
|
|
|
64701
64706
|
type: core.AbstractHttpService
|
|
64702
64707
|
} ];
|
|
64703
64708
|
};
|
|
64709
|
+
var Formatter = function() {
|
|
64710
|
+
function Formatter() {}
|
|
64711
|
+
Formatter.prototype.format = function(value, format) {
|
|
64712
|
+
return exports.appManager.getPipe("date").transform(value, format);
|
|
64713
|
+
};
|
|
64714
|
+
return Formatter;
|
|
64715
|
+
}();
|
|
64704
64716
|
var VariablesService = function() {
|
|
64705
64717
|
function VariablesService(httpService, metadataService, navigationService, routerService, toasterService, oAuthService, securityService, dialogService) {
|
|
64706
64718
|
this.httpService = httpService;
|
|
@@ -64807,6 +64819,7 @@
|
|
|
64807
64819
|
if (this.isVariableSeperated(variablesJson, variableName)) {
|
|
64808
64820
|
this.processBinding(varInstance, scope, "dataBinding", this.getBindSourceTarget(varInstance));
|
|
64809
64821
|
varInstance.httpService = this.httpService;
|
|
64822
|
+
varInstance.dateFormatter = new Formatter;
|
|
64810
64823
|
varInstance.subscribe("afterInvoke", (function() {
|
|
64811
64824
|
return core.$invokeWatchers(true);
|
|
64812
64825
|
}));
|
|
@@ -64896,6 +64909,7 @@
|
|
|
64896
64909
|
exports.DB_CONSTANTS = DB_CONSTANTS;
|
|
64897
64910
|
exports.DeviceVariableManager = DeviceVariableManager;
|
|
64898
64911
|
exports.DeviceVariableService = DeviceVariableService;
|
|
64912
|
+
exports.Formatter = Formatter;
|
|
64899
64913
|
exports.MetadataService = MetadataService;
|
|
64900
64914
|
exports.SWAGGER_CONSTANTS = SWAGGER_CONSTANTS;
|
|
64901
64915
|
exports.VARIABLE_CONSTANTS = VARIABLE_CONSTANTS;
|