OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
docroot
/
static
/
js
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/17/2022 10:16:47 AM
rwxrwxr-x
📄
app.0851a83f.js
436.37 KB
11/17/2022 10:16:47 AM
rw-rw-r--
📄
app.0851a83f.js.map
1.48 MB
11/17/2022 10:16:47 AM
rw-rw-r--
📄
chunk-vendors.c4757b4c.js
3.26 MB
11/17/2022 10:16:47 AM
rw-rw-r--
📄
chunk-vendors.c4757b4c.js.map
13.04 MB
11/17/2022 10:16:47 AM
rw-rw-r--
Editing: app.0851a83f.js
Close
(function(){var __webpack_modules__={56922:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(21703),core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__),vuex__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(63822),_mixins_cubmixin__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(42095);__webpack_exports__["Z"]={name:"cub-add-filter",mixins:[_mixins_cubmixin__WEBPACK_IMPORTED_MODULE_1__.Z],props:["showDialog"],model:{prop:"showDialog",event:"change"},data:function(){return{currentincompatible:[{table:"time",column:"yrmth"}],incorrectExpression:!1,searchInput:"",dims:[],meas:[],dateRange:"",isDimensionFilter:!0,complexFilterClause:"",filterName:"",optedDim:"",fromValue:"",isLoading:!1,toValue:"",filterList:[],selectedDimension:"",filterExpression:"",decodedFilterExpression:"",filterItemIds:"",isPermanentFilter:"",encodeOperDict:{eq:"=",lt:"<",gt:">",ge:">=",le:"<=",ne:"!=",bw:"bw",lk:"Contains",nlk:"Not Contains"},toggleExposureIcon:!1,selectedOperator:"Equal To",snackbarItems:{showSnack:!1,timeout:3e3,color:"success",msg:"hello"},dimNamesWithGroup:[],measNamesWithGroup:[],decodeOperDict:{eq:"Equal To",gt:"Greater Than",lt:"Lesser Than",ne:"Not Equal To",ge:"Greater Equal To",le:"Lesser Equal To",bw:"Between",lk:"Contains",nlk:"Not Contains",ms:"Equal To"},getAllDimFilters:[],selectedDimFilters:[],isAllSelected:!1,checked:[],startdatemenu:!1,enddatemenu:!1,getAllDimFilters:[],timeGroup:{"Last 7 Days":{itemId:146,operator:"Between",values:["current-7","current-1"]},"Last 14 Days":{itemId:146,operator:"Between",values:["current-14","current-1"]},"Last 28 Days":{itemId:146,operator:"Between",values:["current-28","current-1"]},"Last 30 Days":{itemId:146,operator:"Between",values:["current-30","current-1"]},Today:{itemId:146,operator:"Equal To",values:["current"]},Yesterday:{itemId:146,operator:"Equal To",values:["current-1"]}}}},mounted(){this.dims=this.getDimensionTree,this.meas=this.getMeasureTree,this.prepareItemsWithGroupNames(),this.auth_token=this.$store.state.authToken;var e=this.getPermanentFilters,t=this.getPermanentCmplxFilters;if(this.filterList=e.concat(t.concat(this.getSessionFilters)),this.filterId=this.getFilterId,""!=this.getFilterId)if(this.getNormalFilterAttr){for(var r=0;r<this.filterList.length;r++)if(this.filterId==this.filterList[r].FilterId&&this.filterList[r].isNormalFilter){this.isPermanentFilter=this.filterList[r].isPermanentFilter,this.selectedOperator=this.decodeOperDict[this.filterList[r].FilterOper],this.filterName=this.filterList[r].FilterName,this.optedDim=this.filterList[r].FilterItemId,this.optedDim<1e4?this.isDimensionFilter=!0:this.isDimensionFilter=!1,this.selectedDimension=this.filterList[r].FilterItemId,["Like","Contains"].includes(this.selectedOperator)||this.filterList[r].FilterValues[0].startsWith("%")||this.filterList[r].FilterValues[0].endsWith("%")?(this.fromValue=this.filterList[r].FilterValues.join(this.CUB_FILTER_DELIM),this.fromValue.endsWith("%")?(this.fromValue=this.fromValue.substring(0,this.fromValue.length-1).replace("%",""),this.selectedOperator="Begins With"):this.fromValue.startsWith("%")&&(this.fromValue=this.fromValue.substring(1).replace("%",""),this.selectedOperator="Ends With"),"Like"==this.selectedOperator&&(this.selectedOperator="Contains"),this.selectedDimFilters=[],this.operatorSelected()):"Equal To"==this.selectedOperator||"Not Equal To"==this.selectedOperator?this.selectedDimFilters=this.filterList[r].FilterValues:this.isDate&&"Between"!=this.selectedOperator?this.fromValue=this.filterList[r].FilterValues:this.fromValue=this.filterList[r].FilterValues[0],this.optedDimension(this.optedDim),"Between"==this.selectedOperator&&(this.toValue=this.filterList[r].FilterValues[1]);break}}else{this.toggleExposureIcon=!0;for(var s=0;s<this.filterList.length;s++)if(!this.filterList[s].isNormalFilter&&this.filterId==this.filterList[s].FilterId){this.filterName=this.filterList[s].FilterName,this.complexFilterClause=this.filterList[s].FilterValues,this.isPermanentFilter=this.filterList[s].isPermanentFilter,this.filterExpression=this.getComplexFilterWithIndices(this.complexFilterClause);var a=this.decodeExpression(this.filterExpression);this.decodedFilterExpression=a.decodedFilterExpression,this.filterItemIds=a.filterItemIds,this.complexFilterClause=a.complexFilterClause;break}}},computed:{...(0,vuex__WEBPACK_IMPORTED_MODULE_2__.Se)(["getPermanentFilters","getPermanentCmplxFilters","getSessionFilters","getFilterId","getNormalFilterAttr","getDimensionTree","getMeasureTree","getMetaNameById","getItemMetaById"]),isCurrentIncompatible:{get:function(){if(!this.dimMetaObj)return!1;for(var e=0;e<this.currentincompatible.length;e++)if(this.dimMetaObj.Table==this.currentincompatible[e].table&&this.dimMetaObj.Column==this.currentincompatible[e].column)return!0;return!1}},timeList:{get:function(){return Object.keys(this.timeGroup)}},operators:{get:function(){var e=["Equal To","Between","Greater Than","Lesser Than","Not Equal To","Greater Equal To","Lesser Equal To"];return this.isDimensionFilter&&(e=e.concat(["Contains","Not Contains","Begins With","Ends With"])),e}},allItems:{get:function(){var e=this.dims;e=this.isDimensionFilter?this.dims:this.meas;for(var t=new Array,r=0;r<e.length;r++){var s=new Object;if(s.header=e[r].Name,s.Id=e[r].Id,t.push(s),e[r].items)for(var a=0;a<e[r].items.length;a++)t.push(e[r].items[a])}return t}},allItemsWithoutGroupNameSuffix:{get:function(){var e=this.dims;e=this.isDimensionFilter?this.dims:this.meas;for(var t=new Array,r=0;r<e.length;r++){var s=new Object;if(s.header=e[r].Name,s.Id=e[r].Id,t.push(s),e[r].items)for(var a=0;a<e[r].items.length;a++)t.push(e[r].items[a])}return t}},allItemsWithGroupNameSuffix:{get:function(){return this.isDimensionFilter?this.dimNamesWithGroup:this.measNamesWithGroup}},internalShowDialog:{get:function(){return this.showDialog},set:function(e){this.$emit("showDialog",e)}},normalFilterList:function(){for(var e=[],t=0;t<this.getAllFilters.length;t++)this.getAllFilters[t].isNormalFilter&&e.push(this.getAllFilters[t]);return e},dimMetaObj:function(){return""!=this.optedDim?this.getItemMetaById(this.optedDim):""},isLikeCategory:function(){var e=["Contains","Not Contains","Equal To","Not Equal To"].includes(this.selectedOperator);return e},isASCIIFilter:function(){return this.isASCII(this.fromValue)&&this.isASCII(this.toValue)&&this.isASCII(this.filterName)},isDisabled:function(){return!this.toggleExposureIcon&&0==this.selectedDimFilters.length&&0==this.fromValue.length&&0==this.dateRange.length||(!(!this.toggleExposureIcon||""!=this.decodedFilterExpression)||!this.isASCIIFilter)},isEdit:{get:function(){return""!=this.getFilterId&&"undefined"!=typeof this.getFilterId}},isMultiSelect:function(){return!!["Equal To","Not Equal To","Contains","Not Contains","Like"].includes(this.selectedOperator)},showDropDown:function(){return!["Begins With","Ends With"].includes(this.selectedOperator)},isMultiDate:function(){if(!this.isEdit)return["Equal To","Not Equal To"].includes(this.selectedOperator)&&this.isDate&&!this.isEdit?(this.fromValue=[],!0):(this.fromValue="",!1)},isDate:{get:function(){return""!=this.dimMetaObj&&("date"==this.dimMetaObj.DataSubType.toLowerCase()||"date"==this.dimMetaObj.DataType.toLowerCase()&&"time"!=this.dimMetaObj.Table)},set:function(e){}}},watch:{filterExpression:function(e,t){e!=t&&t.length&&(this.incorrectExpression=!1),this.decodedFilterExpression=""}},methods:{prepareItemsWithGroupNames(){for(var e=[],t=0;t<2;t++){e=0==t?JSON.parse(JSON.stringify(this.dims)):JSON.parse(JSON.stringify(this.meas));for(var r=new Array,s=0;s<e.length;s++){var a=new Object;if(a.header=e[s].Name,a.Id=e[s].Id,r.push(a),e[s].items)for(var i=0;i<e[s].items.length;i++){var o=this.getMetaNameById(e[s].items[i].ParentId);o&&(e[s].items[i].Name=e[s].items[i].Name+" ("+o+")"),r.push(e[s].items[i])}}0==t?this.dimNamesWithGroup=r:this.measNamesWithGroup=r}},resetFilterDialog(){this.isPermanentFilter=!1,this.optedDim="",this.fromValue="",this.filterId="",this.selectedOperator="Equal To",this.selectedDimFilters=[],this.selectedOperatorTo="",this.toValue="",this.filterName="",this.$store.commit("setFilterId",""),this.$emit("change",!1)},getComplexFilterWithIndices(e){var t=e;e=e.replaceAll("[","CUB_DELIM["),e=e.replaceAll("]","]CUB_DELIM");for(var r=e.split("CUB_DELIM"),s=0;s<r.length;s++){var a=r[s].trim();if("["==a[0]){var i=this.filterStringToArray(a)[0],o=this.isFilterAvailable(i);o||(o=this.createSessionFilter(i));for(var n=-1,l=0;l<this.normalFilterList.length;l++)if(this.normalFilterList[l].FilterId==o.FilterId){n=l;break}t=t.replace(a,n+1)}}return t=t.replaceAll("and"," and "),t=t.replaceAll("or"," or "),t=t.replace(/ +/g," "),t=t.replace(/^{/g,""),t=t.replace(/}$/g,""),t=t.replaceAll("{","("),t=t.replaceAll("}",")"),t},saveFilter(){if(this.toggleExposureIcon){this.filterExpression="("+this.filterExpression.toLowerCase().trim()+")";var e=this.decodeExpression(this.filterExpression);if(this.decodedFilterExpression=e.decodedFilterExpression,this.filterItemIds=e.filterItemIds,this.complexFilterClause=e.complexFilterClause,this.filterId&&this.$store.commit("deleteSessionFilters",this.filterId),this.isPermanentFilter){var t={operationName:"addFilterExp"};t.filterName=this.filterName,t.filterId=this.filterId,t.filterOperation="eq",t.filterItemIds="",t.filterValueStr=this.complexFilterClause,this.$store.dispatch("doFilterOperation",t).then((e=>{if(e){var t={};t.FilterId=e.filterId,t.FilterItemIds="",t.FilterName=e.filterName,t.FilterOper="eq",t.FilterValues=e.filterValueStr,t.isNormalFilter=!1,t.isPermanentFilter=!0,this.insertIntoCheckedFilters(t)}}))}else{var r=new Object;r.FilterId=(new Date).getTime(),r.isPermanentFilter=!1,r.FilterName=this.filterName,r.isNormalFilter=!1,r.FilterOper="eq",r.FilterValues=this.complexFilterClause,r.FilterItemIds=this.filterItemIds;t={operationName:"deleteFilterExp",filterName:""};t.filterId=this.filterId,t.filterOperation="",t.filterItemId="",t.filterValueStr="",this.$store.dispatch("doFilterOperation",t),this.$store.commit("setSessionFilters",r),this.insertIntoCheckedFilters(r)}this.resetFilterDialog()}else{if(!this.optedDim.length&&!this.toggleExposureIcon)return this.snackbarItems.showSnack=!0,this.snackbarItems.color="error",void(this.snackbarItems.msg="Please choose a dimension.");r=new Object;"Begins With"==this.selectedOperator?this.fromValue=this.fromValue+"%":"Ends With"==this.selectedOperator&&(this.fromValue="%"+this.fromValue),["Contains"].includes(this.selectedOperator)&&(1==this.selectedDimFilters.length?this.selectedOperator="Equal To":this.selectedOperator="Like");var s,a=this.encodeoper(this.selectedOperator);if(this.isDate?(s="bw"==a?this.fromValue.concat(this.CUB_FILTER_DELIM+this.toValue):Array.isArray(this.fromValue)?this.fromValue.join(this.CUB_FILTER_DELIM):this.fromValue,this.dateRange.length&&(a=this.encodeoper(this.timeGroup[this.dateRange]["operator"]),s=this.timeGroup[this.dateRange]["values"].join(this.CUB_FILTER_DELIM))):s="bw"==a?this.fromValue.concat(this.CUB_FILTER_DELIM+this.toValue):this.fromValue.startsWith("%")||this.fromValue.endsWith("%")||this.fromValue.length>0&&!this.isDimensionFilter?this.fromValue:this.fromValue.length>0&&1==this.selectedDimFilters.length?this.selectedDimFilters[0]:this.fromValue.length>0&&0==this.selectedDimFilters.length?this.fromValue:"string"==typeof this.selectedDimFilters?this.selectedDimFilters:this.selectedDimFilters.join(this.CUB_FILTER_DELIM),this.isPermanentFilter){t={operationName:"addFilter"};t.filterName=this.filterName,t.filterId=this.filterId,t.filterOperation=a,t.filterItemId=this.optedDim,t.filterValueStr=s,this.$store.dispatch("doFilterOperation",t).then((e=>{if(e){var t={};t.FilterId=e.filterId,t.FilterItemId=e.filterItemId,t.FilterName=e.filterName,t.FilterOper=e.filterOperation,t.FilterValues=e.filterValueStr.split(this.CUB_FILTER_DELIM),t.isNormalFilter=!0,t.isPermanentFilter=!0,this.insertIntoCheckedFilters(t)}})),this.$store.commit("deleteSessionFilters",t.filterId)}else{for(var i=0;i<this.filterList.length;i++)if(this.filterId==this.filterList[i].FilterId&&this.filterList[i].isPermanentFilter){t={operationName:"deleteFilter",filterName:""};t.filterId=this.filterId,t.filterOperation="",t.filterItemId="",t.filterValueStr="",this.$store.dispatch("doFilterOperation",t)}var o=-1;if(r.isPermanentFilter=!1,r.isNormalFilter=!0,r.FilterItemId=this.optedDim,r.FilterName=this.filterName,r.FilterOper=a,r.FilterType="",r.FilterValues=s.split(this.CUB_FILTER_DELIM),""==this.filterId||void 0==typeof this.filterId)r.FilterId=(new Date).getTime(),this.$store.commit("setSessionFilters",r),this.insertIntoCheckedFilters(r);else{r.FilterId=this.filterId;for(i=0;i<this.getSessionFilters.length;i++)if(this.getSessionFilters[i].FilterId==this.filterId){o=i;break}-1!=o?(this.$store.commit("deleteSessionFilters",r.FilterId),this.$store.commit("setSessionFilters",r)):this.$store.commit("setSessionFilters",r),""==this.filterId&&this.insertIntoCheckedFilters(r)}this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","SAVE_FILTER_SUCCESS")}this.resetFilterDialog()}},filterValuesCallback(e){this.getAllDimFilters=this.getAllDimFilters.filter((e=>!this.selectedDimFilters.includes(e))),Array.isArray(this.selectedDimFilters)||(this.selectedDimFilters=[this.selectedDimFilters]),this.getAllDimFilters=this.selectedDimFilters.concat(e),this.isLoading=!1},encodeoper(e){return"Equal To"==e?"eq":"Between"==e?"bw":"Greater Than"==e?"gt":"Lesser Than"==e?"lt":"Not Equal To"==e?"ne":"Greater Equal To"==e?"ge":"Lesser Equal To"==e?"le":"Contains"==e?"lk":"Not Contains"==e?"nlk":"Not Between"==e?"nb":"Tilldate cal"==e?"td":"Like"==e||"Begins With"==e||"Ends With"==e?"lk":void 0},optedDimension(e){if(""!=e){var t=this.getItemMetaById(e);this.getAllDimFilters.length=0,this.isAllSelected=!1,this.optedDim=e,t.Description.toLowerCase().includes("[date]")||"date"==t.DataSubType.toLowerCase()||"date"==t.DataType.toLowerCase()||(this.isLoading=!0,this.$store.dispatch("getFilterValues",{dimensionId:this.optedDim,whereClause:""}).then((e=>{e&&this.filterValuesCallback(e)})))}},getFilterValuesFunc(e,t){this.$store.dispatch("getFilterValues",{dimensionId:e,whereClause:t}).then((t=>{t&&this.filterValuesCallback(t,e)}))},operatorSelected(){this.isLoading="true";var e=this.getItemMetaById(this.optedDim),t=e.Column;"Contains"==this.selectedOperator||"Equal To"==this.selectedOperator||"Not Equal To"==this.selectedOperator||"Begins With"==this.selectedOperator||"Ends With"==this.selectedOperator?t+=" like ":t+=" not like ",t="Begins With"==this.selectedOperator?t+"'"+this.fromValue+"%'":"Ends With"==this.selectedOperator?t+" '%"+this.fromValue+"'":t+" '%"+this.fromValue+"%'",this.getFilterValuesFunc(this.optedDim,t)},selectAllToggle(){this.isAllSelected=!this.isAllSelected,this.selectAllChanged()},selectAllChanged(){this.isAllSelected?this.selectedDimFilters=this.getAllDimFilters:this.selectedDimFilters=[]},isValidExpression(expression){var formattedExpr=expression.toLowerCase();formattedExpr=expression.replace(new RegExp("and|AND","g"),"+"),formattedExpr=formattedExpr.replace(new RegExp("or|OR","g"),"+");try{return eval(formattedExpr),!0}catch(e){if(e instanceof SyntaxError)return!1}},describeExpression(){if(this.isValidExpression(this.filterExpression)){var e=this.decodeExpression(this.filterExpression);this.decodedFilterExpression=e.decodedFilterExpression,this.filterItemIds=e.filterItemIds,this.complexFilterClause=e.complexFilterClause}else this.incorrectExpression=!0}}}},42095:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Z:function(){return cubmixin}});var xlsx__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(79325),xlsx__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(xlsx__WEBPACK_IMPORTED_MODULE_0__),vuex__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(63822);const NepaliDate=__webpack_require__(82819),cubmixin={data(){return{styleDict:{},itemMetaDict:{},weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["JAN","FEB","MAR","APR","MAY","JUNE","JULY","AUG","SEP","OCT","NOV","DEC"],quarterNames:["Qtr-1","Qtr-2","Qtr-3","Qtr-4"],sortOrderDict:{},nepaliFinMonthNames:["Shrawan","Bhadra","Asoj","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra","Baishakh","Jestha","Ashad"],nepaliMonthNames:["Baishakh","Jestha","Ashad","Shrawan","Bhadra","Asoj","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],encodeOperDict:{eq:"=",lt:"<",gt:">",ge:">=",le:"<=",ne:"!=",bw:"bw",lk:"like",ms:"=",nlk:"not like"}}},computed:{...(0,vuex__WEBPACK_IMPORTED_MODULE_1__.Se)(["finMonthNames","getAllFilters","getCubotDateFormat","getItemMetaById","getMetaNameById","getCheckedFilters","getSessionFilters","getSortOrder","selectedDimensions"]),normalFilterList:function(){for(var e=[],t=0;t<this.getAllFilters.length;t++)this.getAllFilters[t].isNormalFilter&&e.push(this.getAllFilters[t]);return e}},methods:{customDTSort(e){var t=this.sortBy,r=this.sortDesc;return e.sort(((e,s)=>{for(var a=0;a<t.length;a++){var i=t[a];i.includes("_")&&(i=i.split("_")[0]);var o=this.getItemMetaById(i),n=0;if(o.Id>1e4?n=e[t[a]]-s[t[a]]:"sort"!=o.DataSubType?n=isNaN(e[t[a]])||isNaN(s[t[a]])?e[t[a]].toLowerCase().localeCompare(s[t[a]].toLowerCase()):+e[t[a]]-+s[t[a]]:(i in Object.keys(this.sortOrderDict)||(this.sortOrderDict[i]=this.getSortOrder(i)),n=this.sortOrderDict[t[a]][e[t[a]]]-this.sortOrderDict[t[a]][s[t[a]]],isNaN(n)&&(n=0)),0!=n)return r[a]?-1*n:n}return 0})),e},getDisplayValue(e,t,r="Default",s=!1){var a;if(this.itemMetaDict.hasOwnProperty(t)?a=this.itemMetaDict[t]:(a=this.getItemMetaById(t),this.itemMetaDict[t]=a),!a)return e;if(t>1e4){var i=this.getFormat(a.Format);"L"==i.shortFormat&&(r="Default");var o=i.prec,n=void 0;if("t"==i.currency)return e=this.formatTimeValue(e),e;n="i"==i.currency?"en-IN":"en-US";var l={};l.maximumFractionDigits=o,s&&(r=this.getBestShortFormat(e,n)),i.suffix||("Million"==r?e/=1e6:"Billion"==r?e/=1e9:"Lakhs"==r?e/=1e5:"Crores"==r&&(e/=1e7)),e=Number(e).toLocaleString(n,l),i.prefix&&(e=i.prefix+e),i.suffix&&(e+=i.suffix),s&&("Million"==r?e+="M":"Billion"==r?e+="B":"Lakhs"==r?e+="L":"Crores"==r&&(e+="Cr"))}else if(t>0){if(this.isDateDimension(t))return this.formatDate(e,this.getCubotDateFormat);if("time"==a.Table){if(isNaN(e))return e;"month"==a.Column?e=this.monthNames[e-1]:"quarter"==a.Column?e=this.quarterNames[e-1]:"finmth"==a.Column?e=this.finMonthNames[e-1]:"dayofweek"==a.Column&&(e=this.weekDays[e-1])}}return e},getBestShortFormat(e,t="en-US"){return"en-IN"==t?Math.abs(e)/1e7>1?"Crores":Math.abs(e)/1e5>1?"Lakhs":"Default":Math.abs(e)/1e9>1?"Billion":Math.abs(e)/1e6>1?"Million":"Default"},getDisplayStyle(e){if(e in Object.keys(this.styleDict))return this.styleDict[e];var t="";if(-1==e)return"";if(e>1e4)t+="text-align:right;",t+="white-space:nowrap;";else if(t+="text-align:left;",""!=e){var r;if(this.itemMetaDict.hasOwnProperty(e)?r=this.itemMetaDict[e]:(r=this.getItemMetaById(e),this.itemMetaDict[e]=r),!r)return"";"date"==r.DataType.toLowerCase()&&(t+="white-space:nowrap;")}return this.styleDict[e]=t,t},getReadableDateFromSeconds(e){var t=new Date(1e3*e),r=t.getFullYear(),s=this.monthNames[t.getMonth()],a=t.getDate();return a<10&&(a="0"+a),[r,s,a].join("-")},getReadableDateTimeFromSeconds(e){var t=new Date(1e3*e),r=t.getFullYear(),s=this.monthNames[t.getMonth()],a=t.getDate();return a<10&&(a="0"+a),[r,s,a].join("-")+" "+t.toLocaleTimeString()},formatTimeValue(e){if(0==e)return 0;var t=parseInt(e,10),r=Math.floor(t/86400),s=Math.floor((t-86400*r)/3600),a=Math.floor((t-86400*r-3600*s)/60),i=t-86400*r-3600*s-60*a;return r>0?r+=r>1?" Days ":" Day ":r="",s>0?s+=s>1?" Hours ":" Hour ":s="",a>0?a+=a>1?" Minutes ":" Minute ":a="",i>0?i+=i>1?" Seconds":" Second":i="",r+""+s+a+i},encodeSortMap(e){if(!e)return"[]";if(!Array.from(e.keys()).length)return"[]";var t=JSON.stringify(Array.from(e.entries()));return t},decodedFilterValue(e,t){if(e){var r=this.getItemMetaById(e),s=new Array;if("time"==r.Table.toLowerCase()&&"month"==r.Column.toLowerCase()&&t){for(var a=0;a<t.length;a++){var i={};t[a].includes("current")?i.text=t[a]:i.text=this.monthNames[t[a]-1],i.value=t[a],s.push(i)}return s}return t}},decodeSortMap(e){if(!e||!e.length||"Default"==e||"["!=e[0])return new Array;var t=new Map(JSON.parse(e));return t},sortReportData(e,t,r,s){var a=e[0].length!=r.length+t.length,i=Array.from(s.keys());if(!i.length){s=new Map,t=t.filter(Boolean);for(var o=0;o<t.length;o++)s.set(t[o],1);i=Array.from(s.keys())}if(!i.length)return e;var n={},l={};for(o=0;o<i.length;o++){var d=t.indexOf(i[o]);-1==d&&(d=t.length+r.indexOf(i[o])),n[d]=s.get(i[o]),this.getItemMetaById(i[o])&&"sort"==this.getItemMetaById(i[o]).DataSubType&&(l[d]=this.getSortOrder(i[o]))}var h=[];for(o=0;o<i.length;o++)h.push(t.concat(r).indexOf(i[o]));var c=e[0],u=e;return a||(u=e.slice(1)),u.sort((function(e,t){for(var r=0;r<h.length;r++){var s=0;if(Object.keys(l).includes(h[r].toString())?s=(l[h[r]][e[h[r]]]-l[h[r]][t[h[r]]])*n[h[r]]:isNaN(e[h[r]])||isNaN(t[h[r]])?s=e[h[r]].localeCompare(t[h[r]])*n[h[r]]:(s=e[h[r]]-t[h[r]],s*=n[h[r]]),s)return s}return 0})),e=a?u:[c].concat(u),e},viewReportDetails(e){this.$store.commit("setDetailsMeasureId",e),this.$store.commit("enableReportToDetails",1),this.$router.push("/home/details")},resolveCurrentKeyword(itemId,initialValue){if(!isNaN(initialValue))return initialValue;var value=initialValue.toLowerCase();if(-1==value.indexOf("current"))return initialValue;var item=this.getItemMetaById(itemId);if("time"==item.Table){var currentDate=new Date;if("date"==item.Column)return value=value.replace("current","currentDate.getDate()"),currentDate.setDate(eval(value)),currentDate.toISOString().split("T")[0];if("year"==item.Column)return value=value.replace("current","currentDate.getFullYear()"),eval(value);if("month"==item.Column)return currentDate.setDate(1),value=value.replace("current","currentDate.getMonth()"),currentDate.setMonth(eval(value)),currentDate.getMonth()+1;if("finmth"==item.Column)return currentDate.setDate(1),value=value.replace("current","currentDate.getMonth()"),currentDate.setMonth(eval(value)),this.monthNames[currentDate.getMonth()];if("day"==item.Column)return value=value.replace("current","currentDate.getDate()"),currentDate.setDate(eval(value)),currentDate.getDate()}else if("CALENDAR_PERIODS"==item.Table){var currentNepaliDate=new NepaliDate(new Date);if("NEPALYR"==item.Column)return value=value.replace("current","currentNepaliDate.getYear()"),eval(value);if("NEPALMONTH_DESC"==item.Column)return value=value.replace("current","currentNepaliDate.getMonth()"),currentNepaliDate.setMonth(eval(value)),this.nepaliFinMonthNames[currentNepaliDate.getMonth()];if("NEPALFINYR"==item.Column)return value=value.replace("current","currentNepaliDate.getYear()"),eval(value)+"/"+(eval(value)+1);if("CURR_NEPALI_MTH"==item.Column)return value=value.replace("current","currentNepaliDate.getMonth()"),currentNepaliDate.setMonth(eval(value)),this.nepaliMonthNames[currentNepaliDate.getMonth()]}return initialValue},filterStringToArray:function(e,t=0){if(!e)return[];var r=[];if(t){var s={FilterItemId:"",FilterOper:""};s["FilterValues"]=e,s["isNormalFilter"]=!1,r.push(s)}else{var a=e.split(/[\[\]]/);a=a.filter(Boolean);for(var i=0;i<a.length;i++){s={};var o=a[i].split(/\)(.+)/),n=o[0].split("(")[1];"A"==n.split("-")[0]&&(n=n.split("-")[1]),s["FilterItemId"]=o[0].split("(")[0],s["FilterOper"]=n,s["FilterValues"]=o[1].split(this.CUB_FILTER_DELIM),s["isNormalFilter"]=!0,r.push(s)}}return r},uncheckSameDimensionFilters(e){for(var t=0;t<this.getCheckedFilters.length;t++)if(this.getCheckedFilters[t]&&e.FilterItemId==this.getCheckedFilters[t].FilterItemId&&e.FilterId!=this.getCheckedFilters[t].FilterId){var r=document.getElementById(this.getCheckedFilters[t].FilterId);r&&(r.checked=!1),this.$store.commit("deleteCheckedFilters",t)}},getFilterDetails(e){return e.isNormalFilter?this.getMetaNameById(e.FilterItemId)+" "+this.encodeOperDict[e.FilterOper]+" "+e.FilterValues:e.FilterName},isFilterAvailable(e){var t=this.$store.getters.getAllFilters;if(e.isNormalFilter){for(var r=0;r<t.length;r++)if(t[r].FilterItemId==e.FilterItemId&&t[r].FilterOper==e.FilterOper&&this.arraysEqual(t[r].FilterValues,e.FilterValues))return t[r];return!1}for(r=0;r<t.length;r++)if(t[r].FilterValues==e.FilterValues)return t[r];return!1},createSessionFilter(e){return e.FilterId=this.$store.state.sessionFilterId++,e.isPermanentFilter=!1,e.isNormalFilter?(1==e.FilterValues.length?e.FilterName=e.FilterValues[0]:e.FilterName=e.FilterValues[0]+"...",e.isNormalFilter=!0,this.$store.commit("setSessionFilters",e)):(e.FilterName="Temp_"+e.FilterId,this.$store.commit("setSessionFilters",e)),e},insertIntoCheckedFilters(e){var t=this.isFilterAvailable(e);t||(t=this.createSessionFilter(e)),this.uncheckSameDimensionFilters(e),this.$store.commit("setSingleCheckedFilter",t);var r=document.getElementById(t.FilterId);r&&(r.checked=!0)},getDimensionDisplayValue(e,t){var r=this.getItemMetaById(e);return r&&"time"==r.Table&&("month"==r.Column?t=this.monthNames[t-1]:"finmth"==r.Column&&(t=this.finMonthNames[t-1])),t},generateAppliedFilterString(e,t=1){var r="";t&&(r="Applied Filters : ");for(var s=this,a=0;a<e.length;a++){if(e[a].isNormalFilter||void 0==e[a].isNormalFilter){var i=e[a].FilterItemId;Array.isArray(e[a].FilterValues)||(e[a].FilterValues=e[a].FilterValues.split(this.CUB_FILTER_DELIM));for(var o=e[a].FilterValues.map((function(t){return s.resolveCurrentKeyword(e[a].FilterItemId,t)})),n=[],l=0;l<o.length;l++){var d=this.getDimensionDisplayValue(i,o[l]);n.push(d)}o=n.join(", "),r+=[this.getMetaNameById(e[a].FilterItemId),this.encodeOperDict[e[a].FilterOper],o].join(" ")}else{var h=this.getDimensionIDsFromComplexFilterExp(e[a].FilterValues),c=this.getOperatorFromComplexFilterExp(e[a].FilterValues),u=this.getValuesFromComplexFilterExp(e[a].FilterValues),p=e[a].FilterValues.split(/(\]|\})\s*(and|or)\s*/);p=p.filter((e=>["and","or"].includes(e)));l=0;for(var m=0;m<h.length;m++){if(u[m].includes(this.CUB_FILTER_DELIM)){var g="/"+this.CUB_FILTER_DELIM+"/g";g=new RegExp(this.CUB_FILTER_DELIM,"g"),void 0!=p[l]?r+=this.getMetaNameById(h[m])+this.encodeOperDict[c[m]]+u[m].replace(g,",")+" "+p[l]+" ":r+=this.getMetaNameById(h[m])+this.encodeOperDict[c[m]]+u[m].replace(g,",")+" "}else void 0!=p[l]?r+=this.getMetaNameById(h[m])+this.encodeOperDict[c[m]]+u[m]+" "+p[l]+" ":r+=this.getMetaNameById(h[m])+this.encodeOperDict[c[m]]+u[m]+" ";m<p.length&&l++}}a!=e.length-1&&(r+="; ")}return r},getDimensionIDsFromComplexFilterExp(e){for(var t=[...e.matchAll(/\[\d+\(/g)],r=[],s=0;s<t.length;s++)r.push(t[s][0].match(/\d+/)[0]);return r},getOperatorFromComplexFilterExp(e){for(var t=/\[\d+\(\w+\)/g,r=e.match(t),s=[],a=0;a<r.length;a++)s.push(r[a].match(/[a-z]+/g)[0]);return s},getValuesFromComplexFilterExp(e){var t=e.split(/(\]|\})\s*(and|or)\s*/);t=t.filter((e=>!["and","or"].includes(e)));for(var r=[],s=0;s<t.length;s++){var a=t[s].replace(/^([|{)*/,'').replace(/(]|})*$/,"").replace(")","CUB_DELIM");"and"!=a&&"or"!=a||(a=""),a.split("CUB_DELIM").length>1&&r.push(a.split("CUB_DELIM")[1].split("]")[0])}return r},generateFilterQuery(e){for(var t={dimensionFilterList:"",measureFilterList:"",filterLogic:""},r=0;r<e.length;r++)e[r].isNormalFilter?e[r].FilterItemId<1e4?(t.dimensionFilterList+="["+e[r].FilterItemId+"("+e[r].FilterOper+")",Array.isArray(e[r].FilterValues)?t.dimensionFilterList+=e[r].FilterValues.join(this.CUB_FILTER_DELIM):t.dimensionFilterList+=e[r].FilterValues,t.dimensionFilterList+="]"):(t.measureFilterList+="["+e[r].FilterItemId+"("+e[r].FilterOper+")",Array.isArray(e[r].FilterValues)?t.measureFilterList+=e[r].FilterValues.join(this.CUB_FILTER_DELIM):t.measureFilterList+=e[r].FilterValues,t.measureFilterList+="]"):t.filterLogic=e[r].FilterValues;return t},isDateDimension(e){var t=this.getItemMetaById(e);return!!t&&("date"==t.DataSubType.toLowerCase()||"date"==t.DataType.toLowerCase()&&"time"!=t.Table)},datePad(e){return(e<10?"0":"")+e},formatDate(e,t){if(!e.length)return e;if(e.includes("current"))return e;var r=new Date(e+"T00:00");if("Invalid Date"==r&&(r=new Date(e)),"Invalid Date"==r)return e;const s={mm:this.datePad(r.getMonth()+1),dd:this.datePad(r.getDate()),yy:r.getFullYear().toString().slice(-2),yyyy:r.getFullYear(),"%y":r.getFullYear().toString().slice(-2),"%m":this.datePad(r.getMonth()+1),"%d":this.datePad(r.getDate()),"%Y":r.getFullYear()};var a="/";t.includes("-")&&(a="-");var i=t.split(a).join("|"),o=new RegExp(i,"gi");return e.includes(" ")?t.replace(o,(e=>s[e]))+" "+e.split(" ")[1]:t.replace(o,(e=>s[e]))},encodedFilterValue(e,t){if(e){var r=this.getItemMetaById(e),s=new Array;if("time"==r.Table.toLowerCase()&&"month"==r.Column.toLowerCase()){if(t)for(var a=0;a<t.length;a++){var i=t[a].toUpperCase();s.push(this.monthNames.indexOf(i)+1)}}else if("time"==r.Table.toLowerCase()&&"week"==r.Column.toLowerCase())for(a=0;a<t.length;a++)s.push(t[a].split("-")[1]);else s=t;return s}},resolveFilterArrays:function(e,t){var r=[];if(!e.length)return t;if(!t.length)return e;for(var s=0;s<e.length;s++){e[s]["IsValid"]=!0;for(var a=0;a<t.length;a++)e[s].FilterItemId==t[a].FilterItemId&&(e[s]["IsValid"]=!1)}for(s=0;s<e.length;s++)e[s]["IsValid"]&&r.push(e[s]);return r=r.concat(t),r},getFilterLogic:function(e){for(var t=[],r=0;r<e.length;r++)e[r].isNormalFilter||t.push(e[r]);return t},getPseudoHeader:function(e,t){var r=[];0==t&&(t=1);for(var s=0;s<e.length;s++){for(var a=s!=e.length-1?1:t,i=[],o=a;o<e[s].length;o++)for(var n=e[s][o].colspan,l=e[s][o].value,d=0;d<n;d++)i.push(l);r.push(i)}return r},getDataValue:function(e,t,r,s,a,i){for(var o=e.pop(),n=i.indexOf(o),l=0;l<t.length;l++)if(this.arraysEqual(e,t[l].slice(0,r+s-a)))return t[l][r+s-a+n];return 0},arraysEqual:function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;var r=JSON.stringify(e),s=JSON.stringify(t);return e=JSON.parse(r),t=JSON.parse(s),e.sort(),t.sort(),JSON.stringify(e)==JSON.stringify(t)},getTransposedPseudoHeader:function(e){for(var t=new Array,r=0;r<e[0].length;r++){for(var s=new Array,a=0;a<e.length;a++)s.push(e[a][r]);t.push(s)}return t},getAllValues:function(e,t,r,s,a,i,o){o&&t.sort((function(e,t){if("date"==o.DataType.toLowerCase()||"number"==o.DataType.toLowerCase())return e[0]-t[0];if("char"==o.DataType.toLowerCase()||"string"==o.DataType.toLowerCase()){if(e[0]<t[0])return-1;if(e[0]>t[0])return 1}}));var n=[],l=t.map((function(e){return e.slice(0,r)}));l=this.normalize(l);for(var d=this.getPseudoHeader(e,r),h=this.getTransposedPseudoHeader(d),c=0;c<l.length;c++){var u=new Array;u=u.concat(l[c]);for(var p=0;p<h.length;p++){var m=l[c].concat(h[p]),g=this.getDataValue(m,t,r,s,a,i);u.push(g)}0==r&&u.splice(0,0,""),n.push(u)}return n},getDistinctValues:function(e,t){var r=[];r.push(t[0].slice(0,e.length));for(var s=1;s<t.length;s++){for(var a=!1,i=0;i<r.length&&!a;i++)a=this.arraysEqual(t[s].slice(0,e.length),r[i]);a||r.push(t[s].slice(0,e.length))}return r},normalize:function(e){for(var t=[],r=0;r<e.length;++r)this.contains(t,e[r])||t.push(e[r]);return t},contains:function(e,t){for(var r=0;r<e.length;r++)if(this.arraysEqual(e[r],t))return!0;return!1},getDistinctChildCounts:function(e,t){for(var r=t.map((function(t){return t.slice(0,e.length)})),s=0,a=0;a<r.length;a++)this.arraysEqual(e,r[a])&&s++;return s},sortCTData:function(e,t,r,s,a){for(var i=r;i<r+s-a;i++){if(e[i]<t[i])return-1;if(e[i]>t[i])return 1}return 0},multiDimensionalUnique:function(e){for(var t=[],r={},s=0,a=e.length;s<a;s++){var i=JSON.stringify(e[s]);r[i]||(t.push(e[s]),r[i]=!0)}return t},getCTDTValues:function(e,t,r){for(var s=t.length-1,a=new Set,i={},o=0;o<e.length;o++){a.add(e[o][s]);var n=e[o].slice(0,t.length-1),l=JSON.stringify(n);l in i||(i[l]={});for(var d=0;d<t.length-1;d++)i[l][t[d]]=e[o][d];for(var h=0;h<r.length;h++)i[l][r[h]+"_"+e[o][s]]=e[o][t.length+h]}var c=Object.values(i),u=Array.from(a),p=[];for(o=0;o<r.length;o++)for(d=0;d<u.length;d++)p.push(r[o]+"_"+u[d]);for(o=0;o<c.length;o++)for(d=0;d<p.length;d++)p[d]in c[o]||(c[o][p[d]]=0);return c},getCTDTValuesDepreciated:function(e,t,r){for(var s=t.length-1,a=new Set,i=0;i<e.length;i++)a.add(e[i][s]);var o=[];for(i=0;i<t.length;i++)o.push(this.getItemMetaById(t[i]));var n=Array.from(a);n.sort((function(e,t){return isNaN(e)||isNaN(t)?String(e).localeCompare(String(t)):e-t}));var l=[],d=[];for(i=0;i<e.length;i++)d.push(e[i].slice(0,t.length-1));var h=this.multiDimensionalUnique(d);for(i=0;i<h.length;i++){for(var c=new Object,u=0;u<t.length-1;u++)c[o[u].Id]=h[i][u];for(u=0;u<n.length;u++){for(var p=n[u],m=!1,g=0;g<e.length;g++){if(this.arraysEqual(e[g].slice(0,t.length),h[i].concat([p]))){m=!0;for(var f=0;f<r.length;f++)c[r[f]+"_"+p]=e[g][t.length+f]}if(m){e.splice(g,1);break}}if(!m)for(f=0;f<r.length;f++)c[r[f]+"_"+p]=0}l.push(c)}return l},getCTDTHeaderByStyle:function(e,t,r,s="2D",a){return"2M"==s?this.CTDTNLevelHeaderByMeasure(e,t,r,a):this.CTDTNLevelHeader(e,t,r,a)},CTDTNLevelHeaderByMeasure:function(e,t,r,s){for(var a=t.slice(-1*s),i=t.slice(0,t.length-s),o=[],n=0;n<r.length;n++)o.push(this.getItemMetaById(r[n]));var l=[],d={},h=[];for(n=0;n<a.length;n++){var c=this.getItemMetaById(a[n]);"sort"==c.DataSubType?(d[a[n]]=this.getSortOrder(a[n]),h.push(!0)):h.push(!1),l.push(c)}var u=[],p=[],m={};for(n=0;n<e.length;n++){var g=e[n].slice(t.length-s,-1*r.length),f=e[n].slice(0,t.length-s),y=e[n].slice(t.length-s,t.length);p.push(g),u.push(f);var v={},I=f.join("_");m.hasOwnProperty(I)||(m[I]={});for(var b=0;b<r.length;b++)m[I][r[b]+"_"+y.join("_")]=e[n][t.length+b]}u=Array.from(new Set(u.map(JSON.stringify)),JSON.parse),p=Array.from(new Set(p.map(JSON.stringify)),JSON.parse),p.sort((function(e,t){for(var r=0,s=0;s<e.length;s++)if(r=h[s]?d[a[s]][e[s]]-d[a[s]][t[s]]:isNaN(e[s])||isNaN(t[s])?String(e[s]).localeCompare(String(t[s])):e[s]-t[s],0!=r)return r}));var _={},D=[],C=[];for(n=0;n<s;n++)D.push([]),C.push([]);for(n=0;n<p.length;n++)for(b=0;b<p[n].length;b++){I=p[n].slice(0,b+1).join("_");I in _?_[I]++:(C[b].includes(I)||(C[b].push(I),D[b].push(p[n][b])),_[I]=1)}var S=C.slice(-1)[0],F=D.slice(-1)[0],w=[],x=[];x.push({itemId:-1,value:"",text:"",colspan:Math.max(i.length,1)});for(b=0;b<r.length;b++){v=new Object;v["itemId"]=r[b],v["itemKey"]=String(r[b]),v["text"]=o[b].Name,v["value"]=String(r[b]),v["colspan"]=S.length,x.push(v)}w.push(x);for(n=0;n<s-1;n++){x=[];x.push({itemId:a[n],value:a[n],text:this.getMetaNameById(a[n]),colspan:Math.max(i.length,1)});for(var T=0;T<r.length;T++)for(b=0;b<C[n].length;b++){v=new Object;v["itemId"]=a[n],v["value"]=String(D[n][b]),v["text"]=String(D[n][b]),v["colspan"]=_[C[n][b]],x.push(v)}w.push(x)}var E=[];if(!i.length){v={itemId:0,text:"Dimension",itemKey:-1,value:"Result",colspan:1};E.push(v)}for(n=0;n<i.length;n++){v=new Object;v["itemId"]=i[n],v["text"]=this.getMetaNameById(i[n]),v["itemKey"]=i[n],v["value"]=i[n],v["colspan"]=1,E.push(v)}for(b=0;b<r.length;b++)for(n=0;n<S.length;n++){v=new Object;v["itemId"]=r[b],v["itemKey"]=String(r[b])+"_"+String(S[n]),v["text"]=F[n],v["value"]=String(r[b])+"_"+String(S[n]),v["colspan"]=1,E.push(v)}var k=[],L=t.slice(0,t.length-s);for(n=0;n<u.length;n++){for(v={},b=0;b<L.length;b++)v[L[b]]=u[n][b];var M=m[u[n].join("_")],A=Object.keys(M);for(T=0;T<A.length;T++)v[A[T]]=M[A[T]];k.push(v)}w.push(E);var N={header:w,data:k};return N},CTDTNLevelHeader:function(e,t,r,s){for(var a=t.slice(-1*s),i=t.slice(0,t.length-s),o=[],n=0;n<r.length;n++)o.push(this.getItemMetaById(r[n]));var l=[],d={},h=[];for(n=0;n<a.length;n++){var c=this.getItemMetaById(a[n]);"sort"==c.DataSubType?(d[a[n]]=this.getSortOrder(a[n]),h.push(!0)):h.push(!1),l.push(c)}var u=[],p=[],m={};for(n=0;n<e.length;n++){var g=e[n].slice(t.length-s,-1*r.length),f=e[n].slice(0,t.length-s),y=e[n].slice(t.length-s,t.length);p.push(g),u.push(f);var v={},I=f.join("_");m.hasOwnProperty(I)||(m[I]={});for(var b=0;b<r.length;b++)m[I][r[b]+"_"+y.join("_")]=e[n][t.length+b]}u=Array.from(new Set(u.map(JSON.stringify)),JSON.parse),p=Array.from(new Set(p.map(JSON.stringify)),JSON.parse),p.sort((function(e,t){for(var r=0,s=0;s<e.length;s++)if(r=h[s]?d[a[s]][e[s]]-d[a[s]][t[s]]:isNaN(e[s])||isNaN(t[s])?String(e[s]).localeCompare(String(t[s])):e[s]-t[s],0!=r)return r}));var _={},D=[],C=[];for(n=0;n<s;n++)D.push([]),C.push([]);for(n=0;n<p.length;n++)for(b=0;b<p[n].length;b++){I=p[n].slice(0,b+1).join("_");I in _?_[I]++:(C[b].includes(I)||(C[b].push(I),D[b].push(p[n][b])),_[I]=1)}var S=[];for(n=0;n<s;n++){var F=[];F.push({itemId:a[n],value:a[n],text:this.getMetaNameById(a[n]),colspan:Math.max(i.length,1)});for(b=0;b<C[n].length;b++){v=new Object;v["itemId"]=a[n],v["value"]=String(D[n][b]),v["text"]=String(D[n][b]),v["colspan"]=_[C[n][b]]*r.length,F.push(v)}S.push(F)}var w=C.slice(-1)[0],x=[];if(!i.length){v={itemId:0,text:"Dimension",itemKey:-1,value:"Result",colspan:1};x.push(v)}for(n=0;n<i.length;n++){v=new Object;v["itemId"]=i[n],v["text"]=this.getMetaNameById(i[n]),v["itemKey"]=i[n],v["value"]=i[n],v["colspan"]=1,x.push(v)}for(n=0;n<w.length;n++)for(b=0;b<r.length;b++){v=new Object;v["itemId"]=r[b],v["itemKey"]=String(r[b])+"_"+String(w[n]),v["text"]=o[b].Name,v["value"]=String(r[b])+"_"+String(w[n]),v["colspan"]=1,x.push(v)}var T=[],E=t.slice(0,t.length-s);for(n=0;n<u.length;n++){for(v={},b=0;b<E.length;b++)v[E[b]]=u[n][b];for(var k=m[u[n].join("_")],L=Object.keys(k),M=0;M<L.length;M++)v[L[M]]=k[L[M]];T.push(v)}S.push(x);var A={header:S,data:T};return A},getCTDTHeaderByMeasure:function(e,t,r){for(var s=t.length-1,a=[],i=0;i<r.length;i++)a.push(this.getItemMetaById(r[i]));var o=this.getItemMetaById(t[s]),n=!1;"sort"==o.DataSubType&&(n=this.getSortOrder(t[s]));var l=new Set;for(i=0;i<e.length;i++)l.add(e[i][s]);var d=Array.from(l);n?d.sort((function(e,t){return n[e]-n[t]})):d.sort((function(e,t){return isNaN(e)||isNaN(t)?String(e).localeCompare(String(t)):e-t}));var h=[],c=[];c.push({itemId:o.Id,value:o.Id,text:o.Name,colspan:Math.max(t.length-1,1)});for(i=0;i<r.length;i++){var u=new Object;u["itemId"]=r[i],u["value"]=this.getMetaNameById(r[i]),u["text"]=this.getMetaNameById(r[i]),u["colspan"]=d.length,c.push(u)}if(t.length<=1){u={itemId:0,text:"Dimension",itemKey:-1,value:"Result",colspan:1};h.push(u)}for(i=0;i<t.length-1;i++){var p=this.getItemMetaById(t[i]);u=new Object;u["itemId"]=t[i],u["text"]=p.Name,u["itemKey"]=t[i],u["value"]=t[i],u["colspan"]=1,h.push(u)}for(var m=0;m<r.length;m++)for(i=0;i<d.length;i++){u=new Object;u["itemId"]=r[m],u["itemKey"]=String(r[m])+"_"+String(d[i]),u["text"]=d[i],u["value"]=String(r[m])+"_"+String(d[i]),u["colspan"]=1,h.push(u)}return[c,h]},getCTDTHeader:function(e,t,r){for(var s=t.length-1,a=[],i=0;i<r.length;i++)a.push(this.getItemMetaById(r[i]));var o=this.getItemMetaById(t[s]),n=!1;"sort"==o.DataSubType&&(n=this.getSortOrder(t[s]));var l=new Set;for(i=0;i<e.length;i++)l.add(e[i][s]);var d=Array.from(l);n?d.sort((function(e,t){return n[e]-n[t]})):d.sort((function(e,t){return isNaN(e)||isNaN(t)?String(e).localeCompare(String(t)):e-t}));var h=[],c=[];c.push({itemId:o.Id,value:o.Id,text:o.Name,colspan:Math.max(t.length-1,1)});for(i=0;i<d.length;i++){var u=new Object;u["itemId"]=t[t.length-1],u["value"]=String(d[i]),u["text"]=String(d[i]),u["colspan"]=r.length,c.push(u)}if(t.length<=1){u={itemId:0,text:"Dimension",itemKey:-1,value:"Result",colspan:1};h.push(u)}for(i=0;i<t.length-1;i++){var p=this.getItemMetaById(t[i]);u=new Object;u["itemId"]=t[i],u["text"]=p.Name,u["itemKey"]=t[i],u["value"]=t[i],u["colspan"]=1,h.push(u)}for(i=0;i<d.length;i++)for(var m=0;m<r.length;m++){u=new Object;u["itemId"]=r[m],u["itemKey"]=String(r[m])+"_"+String(d[i]),u["text"]=a[m].Name,u["value"]=String(r[m])+"_"+String(d[i]),u["colspan"]=1,h.push(u)}return[c,h]},getDTTotals(e,t,r,s){var a=[],i=[];if(!t.length)return a;for(var o={},n=0;n<e.length;n++)if(e[n].itemId>1e4){var l={},d=0,h=0;l.itemKey=e[n].itemKey,l.itemId=e[n].itemId;for(var c=this.getItemMetaById(l.itemId),u=0,p=Number(t[0][e[n].itemKey]),m=Number(t[0][e[n].itemKey]),g=0;g<t.length;g++)h=Number(t[g][e[n].itemKey]),u+=Number.isNaN(h)?0:h,p=p<h?p:h,m=m>h?m:h;d="Min"==c.AggFunction?p:"Max"==c.AggFunction?m:"avg"==c.AggFunction||c.Description.includes("[avg]")?u/t.length:u,l.value=d,o[e[n].itemKey]=d,i.push(o),a.push(l)}var f=this.buildMeasureComputeFormulasCT(s,e);this.resolveComputeMeasureDT(i,r,f);for(var y=Object.keys(i[0]),v=0;v<y.length;v++)(y[v]=a[v].itemKey)&&(a[v].value=i[0][y[v]]);return a},getDTTotalsNormal(e,t,r){for(var s=this.buildMeasureComputeFormulas(r),a=new Array,i=r,o=e,n=t;n<o[0].length;n++){var l=this.getItemMetaById(i[n-t]);if(void 0!=l){var d=l.AggFunction;l.Description&&l.Description.includes("[avg]")&&(d="avg");for(var h=0,c=1;c<o.length;c++)h+=parseFloat(o[c][n]);a[n]="avg"==d?h/(o.length-1):h}}a=[a],console.log(a),this.resolveComputeMeasureDT(a,t,s),a=a[0];for(var u=[],p=t;p<a.length;p++){var m={};m.itemId=r[p-t],m.itemKey=r[p-t],m.value=a[p],u.push(m)}return console.log(a),u},buildMeasureComputeFormulas:function(e){for(var t=[],r="",s=0;s<e.length&&e[s]>1e4;s++){var a=new Array;r=this.getItemMetaById(e[s]);var i={};if(""==r.AggFunction&&(r.Column.toLowerCase().indexOf("avg")>=0?r.AggFunction="avg":r.Column.toLowerCase().indexOf("min")>=0?r.AggFunction="min":r.Column.toLowerCase().indexOf("max")>=0?r.AggFunction="max":r.AggFunction="sum"),r.Description&&-1!==r.Description.indexOf("avg")&&(r.AggFunction="avg"),i.agg=r.AggFunction,i.formula="NA",i.measId=r.Id,r.Column&&r.Column.indexOf("[")>=0&&r.Column.indexOf("]")>=0){for(var o=r.Column.split("]"),n=0;n<o.length;n++){var l=o[n].split("[");2==l.length&&a.push(l[1])}var d=this.returnFunctionTotal(r.Column,e,a);"NA"!=d&&(i.formula="c.size["+s+"]="+d+";if(isFinite(c.size["+s+"]))c.size["+s+"];else c.size["+s+"]=0;")}t.push(i)}return t},buildMeasureComputeFormulasCT:function(e,t){for(var r=[],s="",a=0;a<t.length;a++)if(t[a].itemId>1e4){var i=new Array;s=this.getItemMetaById(t[a].itemId);var o={};""==s.AggFunction&&(s.Column.toLowerCase().indexOf("avg")>=0?s.AggFunction="avg":s.Column.toLowerCase().indexOf("min")>=0?s.AggFunction="min":s.Column.toLowerCase().indexOf("max")>=0?s.AggFunction="max":s.AggFunction="sum"),s.Description&&-1!==s.Description.indexOf("avg")&&(s.AggFunction="avg"),o.agg=s.AggFunction,o.formula="NA",o.measId=s.Id;var n=t[a].itemKey,l=n.substring(n.indexOf("_")+1);if(s.Column&&s.Column.indexOf("[")>=0&&s.Column.indexOf("]")>=0){for(var d=s.Column.split("]"),h=0;h<d.length;h++){var c=d[h].split("[");2==c.length&&i.push(c[1])}var u=this.returnFunctionTotal(s.Column,e,i,l);"NA"!=u&&(o.formula="c.size['"+n+"']="+u+";if(isFinite(c.size['"+n+"']))c.size['"+n+"'];else c.size['"+n+"']=0;")}r.push(o)}return r},returnFunctionTotal:function(e,t,r,s=""){for(var a=0;a<r.length;a++){var i=t.indexOf(r[a]);if(i<0&&(i=t.indexOf(+r[a])),!(i>=0))return"NA";e=""!=s?e.replace("["+r[a]+"]","c.size['"+r[a]+"_"+s+"']"):e.replace("["+r[a]+"]","c.size["+i+"]")}return e},resolveComputeMeasureDT:function resolveComputeMeasureDT(ReportData,ndims,Measures){var startIndex=1;1==ReportData.length&&(startIndex=0);for(var tempMeas="",i=0;Measures&&i<Measures.length;i++)if(Measures[i].formula&&"NA"!=Measures[i].formula){var column=Measures[i].formula;column=ReportData.length>1?column.replace(/c.size/g,"ReportData[0]"):column.replace(/c.size\[/g,"ReportData[0][ndims+"),eval(column),console.log(eval(column))}},resolveComputeMeasureDTCT:function resolveComputeMeasureDTCT(ReportData,ndims,Measures,measIds,header){var startIndex=1;1==ReportData.length&&(startIndex=0);for(var tempMeas="",i=0;Measures&&i<Measures.length;i++)if(Measures[i].formula&&"NA"!=Measures[i].formula&&Measures[i].measId==ReportData[0]["itemId"]){var column=Measures[i].formula,ct_col=measId;column=column.replace(/c.size\[/g,"ReportData[j][ndims+");for(var j=0;j<ReportData.length;j++)eval(column),console.log(eval(column))}},getHeader:function(e,t,r,s,a,i,o,n,l,d,h){d=a.length;for(var c="",u=[],p=0;p<i.length;p++)i[p]<1e4?c=i[p]:u.push(i[p]);h=this.getItemMetaById(c);var m=!1,g={};"sort"==h.DataSubType&&(m=!0,g=this.getSortOrder(c)),e.sort((function(e,t){if(m)return g[e[d]]-g[t[d]];if("date"==h.DataType.toLowerCase()||"number"==h.DataType.toLowerCase())return new Date(e[d])-new Date(t[d]);if("char"==h.DataType.toLowerCase()||"string"==h.DataType.toLowerCase()){if(e[d]<t[d])return-1;if(e[d]>t[d])return 1}}));var f=[],y=e.map((function(e){return e.slice(t,t+r-s)})),v=this.normalize(y),I=[];for(p=0;p<i.length;p++)+i[p]<1e4&&I.push(o[p]);for(p=0;p<I.length;p++){var b=[],_=new Object;_.value=I[p],_.colspan=0==t?1:t,_.itemId=h.Id,_.text=I[p],b.push(_);for(var D=this.getDistinctValues(I.slice(0,p+1),y),C=0;C<D.length;C++){var S=this.getDistinctChildCounts(D[C],v);_=new Object;_.value=D[C][D[C].length-1],_.colspan=S*s,h&&(_.itemId=h.Id),_.text=D[C][D[C].length-1],b.push(_)}f.push(b)}var F=f[f.length-1].length-1;b=[];if(0==t){_=new Object;_.itemId="",_.value="",_.colspan=1,b.push(_)}for(var w=0;w<t;w++){_=new Object;_.itemId=a[w],_.value=n[w],_.colspan=1,b.push(_)}for(p=0;p<F;p++)for(C=0;C<s;C++){_=new Object;_.itemId=u[C],_.value=l[C],_.colspan=1,b.push(_)}return f.push(b),f},getDTValues:function(e,t){var r=[];if(e[0].length>t.length){for(var s=0;s<e.length;s++)r.push(e[s].slice(1,e[s].length));r=r.slice(1,r.length)}else r=e.slice(1,e.length);var a=[],i=r,o=t,n=o.length;for(s=0;s<i.length;s++){for(var l=i[s],d={},h=0;h<n;h++)""==l[h]&&(l[h]="_"),d[o[h]]=l[h];a.push(d)}return a},getDTHeaders:function(e){e=e.filter((function(e){return""!=e}));for(var t=new Array,r=0;r<e.length;r++){var s=new Object,a=this.getItemMetaById(e[r]);s.itemId=a.Id,s.itemKey=a.Id,s.text=a.Name,s.value=a.Id,t.push(s)}return t},getHeaderForGraph:function(e,t,r,s,a,i,o,n,l,d,h){d=a.length;for(var c="",u=[],p=0;p<i.length;p++)i[p]<1e4?c=i[p]:u.push(i[p]);h=this.getItemMetaById(c);var m=!1,g={};"sort"==h.DataSubType&&(m=!0,g=this.getSortOrder(c)),e.sort((function(e,t){if(m)return g[e[d]]-g[t[d]];if("date"==h.DataType.toLowerCase()||"number"==h.DataType.toLowerCase())return new Date(e[d])-new Date(t[d]);if("char"==h.DataType.toLowerCase()||"string"==h.DataType.toLowerCase()){if(e[d]<t[d])return-1;if(e[d]>t[d])return 1}}));var f=[],y=e.map((function(e){return e.slice(t,t+r-s)})),v=this.normalize(y),I=[];for(p=0;p<v.length;p++)for(var b=0;b<l.length;b++)I=I.concat(this.getDisplayValue(v[p],c)+"_"+l[b]);f=n.concat(I);var _={};return _.nmeas=I.length,_.header=f,_.ndims=t,_},getFormat:function(e){var t={currency:"u",unit:"1",prefix:"",suffix:"",prec:"",dec:".",Gsym:",",shortFormat:"S",showGrandTotal:!0};if("undefined"===typeof e||e.length<1)return t;var r=e.indexOf("c");r>=0&&(t.currency=e.substr(r+1,1));var s=e.indexOf("U");s>=0&&(t.unit=e.substr(s+1,1));var a=e.indexOf("p");a>=0&&(t.prec=+e.substr(a+1,1));var i=e.indexOf("P");i>=0&&(t.prefix=e.substr(i+1,1));var o=e.indexOf("S");o>=0&&(t.suffix=e.substr(o+1,1));var n=e.indexOf("F");n>=0&&(t.shortFormat=e.substr(n+1,1));var l=e.indexOf("G");return l>=0&&(t.showGrandTotal="Y"==e.substr(l+1,1)),"e"==e.charAt(1)&&(t.Gsym=".",t.dec=","),t},getGrandTotalDisplayValue(e,t,r){var s=this.getItemMetaById(t),a=this.getFormat(s.Format);return a.showGrandTotal?this.getDisplayValue(e,t,r):""},getFilterDisplayValue(e){var t="";if(e.isNormalFilter){var r=[];if(r=Array.isArray(e.FilterValues)?e.FilterValues:e.FilterValues.split(this.CUB_FILTER_DELIM),t+=this.getMetaNameById(e.FilterItemId),e.FilterName)t+=" : ",t+=e.FilterName;else{for(var s=[],a=0;a<r.length;a++)s.push(this.getDisplayValue(r[a],e.FilterItemId));var i="normal";"lk"==e.FilterOper?s[0].startsWith("%")?(t+=" Ends With ",i="ends"):s[0].endsWith("%")?(t+=" Begins With ",i="begins"):t+=" "+this.encodeOperDict[e.FilterOper]+" ":t+=" "+this.encodeOperDict[e.FilterOper]+" ","bw"==this.encodeOperDict[e.FilterOper]?t+=s.join(", "):r.length>2?(t+=s[0],t+=" , .."):t+="ends"==i||"begins"==i?s[0].replace("%",""):s.join(", ")}}else t=e.FilterName;return t},hasDateFilter:function(e){for(var t=0;t<e.length;t++)if(e[t].isNormalFilter){var r=this.getItemMetaById(e[t].FilterItemId);if("time"==r.Table)return!0}return!1},checkMandatoryFilters:function(e,t){console.log(e);for(var r=0;r<e.length;r++){var s=this.getItemMetaById(e[r]);if("5"==s.Attributes)return!!this.hasDateFilter(t)||(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","MANDATORY_DATE_FILTER"),this.$store.commit("setErrorMeas",s.Name),!1)}return!0},exportToExcel:function(e,t,r,s,a="",i="",o,n){if("1"!=s){var l=e.slice(1),d=this.getCTDTHeaderByStyle(l,t,r,s,o),h=d["header"],c=d["data"],u=this.getDTTotals(h[h.length-1],c,t.length-o-1,r);this.exportToExcelCrossTab_SheetJSNew(h,c,u,t.length,a,i)}else if("GroupDataTable"==n){h=this.getDTHeaders(t.concat(r)),c=this.getDTValues(e,t.concat(r)),u=this.getDTTotalsNormal(c,t.length+1,r);this.exportToExcelGDT_SheetJSNew(h,c,u,t,r,a,i)}else{h=this.getDTHeaders(t.concat(r)),c=this.getDTValues(e,t.concat(r)),u=this.getDTTotalsNormal(c,t.length+1,r);this.exportToExcel_SheetJSNew(h,c,u,t.length,a,i)}},exportToExcelGDT_SheetJSNew:function(e,t,r,s,a,i="",o=""){var n=e,l=[],d=[],h=0,c=this.groupBy(t,s.slice(0,-1),a),u=this.divide(c,s[s.length-1],a);o&&(l.push([o]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++),i&&(l.push([i]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++),(o||i)&&(l.push([""]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++);for(var p=[],m=0;m<n.length;m++){var g={};g.v=n[m]["text"],g.t="s",p.push(g)}l.push(p),h++;for(var f=0;f<u.length;f++){p=[];Object.keys(u[f]);for(var y=0;y<n.length;y++){if(g={},n[y].itemId>1e4){g.v=u[f][n[y].itemId],g.t="n";var v=this.getItemMetaById(n[y].itemId),I=this.getFormat(v.Format),b=I.prec,_="#,##0";b&&(_+="."+"0".repeat(b)),I.suffix&&(_=_+'"'+I.suffix+'"'),g.z=_}else void 0==u[f][n[y].itemId]?g.v="":g.v=this.getDisplayValue(u[f][n[y].itemId],n[y].itemId),g.t="s";p.push(g)}l.push(p),h++}if(u.length>1){var D=[{v:"Grand Total",t:"s"}],C=n.length-r.length-1;for(f=0;f<C;f++)D.push("");for(y=0;y<r.length;y++){g={};g.v=r[y].value,g.t="n";v=this.getItemMetaById(r[y].itemId),I=this.getFormat(v.Format);I.showGrandTotal||(g.v="");b=I.prec,_="#,##0";b&&(_+="."+"0".repeat(b)),I.suffix&&(_=_+'"'+I.suffix+'"'),g.z=_,D.push(g)}l.push(D),d.push({s:{r:h,c:0},e:{r:h,c:n.length-r.length-1}})}var S=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.aoa_to_sheet(l);S["!merges"]=d;var F=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_new();xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_append_sheet(F,S,"Sheet1");var w=(new Date).getTime();return o.trim()&&(w=o.trim()),xlsx__WEBPACK_IMPORTED_MODULE_0___default().writeFile(F,w+".xlsx")},exportToExcelCrossTab_SheetJSNew:function(e,t,r,s,a="",i=""){var o=e.slice(0,e.length-1),n=e[e.length-1],l=[],d=[],h=0;i&&(l.push([i]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++),a&&(l.push([a]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++),(i||a)&&(l.push([""]),d.push({s:{r:h,c:0},e:{r:h,c:24}}),h++);for(var c=[],u=0,p=0;p<o.length;p++){c=[],u=0;for(var m=0;m<o[p].length;m++){var g={};+o[p][m].itemId<1e4?g.v=this.getDisplayValue(o[p][m].text,o[p][m].itemId):g.v=o[p][m].text,g.t="s",c.push(g),d.push({s:{r:h,c:u},e:{r:h,c:u+o[p][m].colspan-1}}),u+=o[p][m].colspan;for(var f=0;f<o[p][m].colspan-1;f++)c.push("")}l.push(c),h++}c=[];for(m=0;m<n.length;m++){g={};g.v=n[m].text,g.t="s",c.push(g)}l.push(c),h++;for(m=0;m<t.length;m++){c=[];for(var y=0;y<n.length;y++){g={};if(n[y].itemId>1e4){g.v=t[m][n[y].itemKey],g.t="n";var v=this.getItemMetaById(n[y].itemId),I=this.getFormat(v.Format),b=I.prec,_="#,##0";b&&(_+="."+"0".repeat(b)),I.suffix&&(_=_+'"'+I.suffix+'"'),g.z=_}else g.v=this.getDisplayValue(t[m][n[y].itemKey],n[y].itemId),g.t="s";c.push(g)}l.push(c),h++}if(t.length>1){var D=[{v:"Grand Total",t:"s"}],C=n.length-r.length;for(m=1;m<C;m++)D.push("");for(y=0;y<r.length;y++){g={};g.v=r[y].value,g.t="n";v=this.getItemMetaById(r[y].itemId),I=this.getFormat(v.Format);I.showGrandTotal||(g.v="");b=I.prec,_="#,##0";b&&(_+="."+"0".repeat(b)),I.suffix&&(_=_+'"'+I.suffix+'"'),g.z=_,D.push(g)}l.push(D),d.push({s:{r:h,c:0},e:{r:h,c:n.length-r.length-1}})}var S=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.aoa_to_sheet(l);S["!merges"]=d;var F=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_new();xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_append_sheet(F,S,"Sheet1");var w=(new Date).getTime();return i.trim()&&(w=i.trim()),xlsx__WEBPACK_IMPORTED_MODULE_0___default().writeFile(F,w+".xlsx")},groupBy:function(e,t,r){let s=t[0];if(!s)return e;let a=Object.values(e.reduce(((e,t)=>(console.log("ittr"),e[t[s]]||(e[t[s]]={field:s,value:t[s],rows:[]}),e[t[s]].rows.push(t),e)),{}));return t.length&&a.forEach((e=>{for(var s=0;s<r.length;s++)e[r[s]]=this.aggrFunction(e.rows,r[s]);e.rows=this.groupBy(e.rows,t.slice(1),r)})),a},divide:function(e,t,r,s=[]){return e.forEach((e=>{if(e["rows"]){console.log("in else.....");a={};a[e.field]=e.value;for(i=0;i<r.length;i++)a[r[i]]=e[r[i]];s.push(a),this.divide(e.rows,t,r,s)}else{console.log("in if.....");var a={};a[t]=e[t];for(var i=0;i<r.length;i++)a[r[i]]=e[r[i]];s.push(a),console.log(s)}})),console.log(s),s},aggrFunction:function(e,t){var r=e.map((function(e){return e[t]}));return this.getAggregationVal(r,t)},getAggregationVal(e,t){for(var r=this.getItemMetaById(t),s=0,a=0,i=0,o=Number(e[0]),n=Number(e[0]),l=0;l<e.length;l++)a=Number(e[l]),s+=a,o=o<a?o:a,n=n>a?n:a;return i="Min"==r.AggFunction?o:"Max"==r.AggFunction?n:"avg"==r.AggFunction||r.Description.includes("[avg]")?s/e.length:s,i},drawCrossTabGraph(e,t,r,s,a,i,o){this.itemList=this.$store.state.itemList;for(var n=t.DimensionIds.split(this.CUB_FILTER_DELIM),l=t.MeasureIds.split(this.CUB_FILTER_DELIM),d=l.concat(n[n.length-1]),h=new Array,c=0;c<n.length-1;c++)h.push(n[c]);var u=new Array;for(c=0;c<d.length;c++)u.push(this.getItemMetaById(d[c]));var p=new Array;for(c=0;c<n.length-1;c++)p.push(this.getItemMetaById(n[c]));var m=new Array;for(c=0;c<l.length;c++)m.push(this.getItemMetaById(l[c]));var g=new Array,f=new Array,y=new Array,v=new Array,I=new Array;for(c=0;c<m.length;c++)f.push(m[c].Name);for(c=0;c<u.length;c++)I.push(u[c].Id),g.push(u[c].Name);for(c=0;c<p.length;c++)v.push(p[c].Id),y.push(p[c].Name);var b=e.data.slice(1),_=this.getHeaderForGraph(b,p.length,u.length,m.length,v,I,g,y,f,"","");this.crossTabHeader=_;var D=this.getHeader(b,p.length,u.length,m.length,v,I,g,y,f,"",""),C=null;p.length&&(C=p[0]);var S=this.getAllValues(D,b,p.length,u.length,m.length,f,C);n.length&&(S=this.sortReportData(S,n.slice(0,-1),l,s));var F=[_.header],w=F.concat(S);this.drawPlotlyCharts(e.Target,w,_.ndims,_.nmeas,r,t.MeasureIds.split(this.CUB_FILTER_DELIM),t.DimensionIds.split(this.CUB_FILTER_DELIM),a,i,o)},exportToExcel_SheetJSNew:function(e,t,r,s,a="",i=""){-1==e[0].itemId&&(e=e.slice(1));var o=[],n=[],l=0;i&&(o.push([i]),n.push({s:{r:l,c:0},e:{r:l,c:24}}),l++),a&&(o.push([a]),n.push({s:{r:l,c:0},e:{r:l,c:24}}),l++),(i||a)&&(o.push([]),n.push({s:{r:l,c:0},e:{r:l,c:24}}),l++);for(var d=[],h=0;h<e.length;h++)d.push(e[h].text);o.push(d);for(h=0;h<t.length;h++){for(var c=[],u=0;u<e.length;u++){var p={};if(e[u].itemId>1e4){p.v=t[h][e[u].itemId],p.t="n";var m=this.getItemMetaById(e[u].itemId),g=this.getFormat(m.Format),f=g.prec,y="#,##0";f&&(y+="."+"0".repeat(f)),g.suffix&&(y=y+'"'+g.suffix+'"'),p.z=y}else if(e[u].itemId>0){p.v=this.getDisplayValue(t[h][e[u].itemId],e[u].itemId);var v=this.getItemMetaById(e[u].itemId);"Date"==v.DataSubType?p.t="z":p.t="s"}c.push(p)}o.push(c)}if(l+=t.length,t.length>1){c=[{v:"Grand Total",t:"s"}];var I=e.length-r.length;for(h=1;h<I;h++)c.push("");for(u=0;u<r.length;u++){p={};p.v=r[u].value,p.t="n";m=this.getItemMetaById(r[u].itemId),g=this.getFormat(m.Format);g.showGrandTotal||(p.v="");f=g.prec,y="#,##0";f&&(y+="."+"0".repeat(f)),g.suffix&&(y=y+'"'+g.suffix+'"'),p.z=y,c.push(p)}l++,o.push(c),n.push({s:{r:l,c:0},e:{r:l,c:e.length-r.length-1}})}var b=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.aoa_to_sheet(o);b["!merges"]=n;var _=xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_new();xlsx__WEBPACK_IMPORTED_MODULE_0___default().utils.book_append_sheet(_,b,"Sheet1");var D=(new Date).getTime();return i.trim()&&(D=i.trim()),xlsx__WEBPACK_IMPORTED_MODULE_0___default().writeFile(_,D+".xlsx")},isASCII(e){return/^[\x00-\x7F]*$/.test(e)},decodeExpression(e){var t=e.toLowerCase().trim();t=t.replace(/and/g,",and,").replace(/or/g,",or,").replace(/\(/g,",(,").replace(/\)/g,",),");for(var r=t.split(","),s="",a="",i="",o=[],n=0;n<r.length;n++){var l=r[n].trim();if(l)if(["(",")"].includes(l))s=s+" "+l,a+="("==l?"{":"}",i+=l;else if(["and","or"].includes(l))s=s+" "+l,a=a+" "+l,i=i+"{"+l+"}";else{var d=this.normalFilterList[+l-1];if(d.isNormalFilter){var h=this.encodeOperDict[d.FilterOper];if("string"!=typeof d.FilterValues)var c=d.FilterValues;else c=d.FilterValues.split(this.CUB_FILTER_DELIM);new Array;c.length>1&&("="==h?h="in":"bw"==h&&(h="between")),i=i+"["+d.FilterItemId+"("+d.FilterOper+")"+c.join(this.CUB_FILTER_DELIM)+"]",s=s+" "+this.getMetaNameById(d.FilterItemId)+" "+h+" ["+c.join(", ")+"]",o.push(d.FilterItemId),a=a+"["+d.FilterItemId+"("+d.FilterOper+")"+c.join(this.CUB_FILTER_DELIM)+"]"}}}var u={};return u.decodedFilterExpression=s,u.filterItemIds=o.join(this.CUB_FILTER_DELIM),u.complexFilterClause=a,u}}}},89595:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{A:function(){return plotly_mixin}});var lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(50356),lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0__),vuex__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(63822),components_mixins_cubmixin__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(42095),DEFAULT_COLORWAY=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#FCCFEB","#ECDAAF","#CFEDFD","#AFABDA","#EFCAAA","#EEFFDE","#DADBFA","#DCCBEC","#DACEEE","#BAEBCE","#EDEBBD","#FDFFBA","#BCBBEB","#BCCBCC","#ABACCA","#BBCFDD","#CADDFA","#ACABFB","#FCBBAD","#BAEEEC","#CADDFF","#AABFDB","#BFCCDA","#CCFECE","#CBDFBA","#DDBECC","#FEBCCF","#FEEEFD","#EDFDCE","#CCCDEB","#AEFAAD","#CCCFDC","#DCFFBB","#DAEEEF","#DDBCCC","#FABFBB","#EDCBCD","#CDAECA","#BAFEAD","#DFCFAC","#CEADFD","#CDDCEC","#DEDEDC","#EFFBFD","#DDBACA","#DFACEC","#FAEEAC","#FDEFFD","#CBAABE","#CBADAB","#EACCBF","#EDCFAE","#DFCCAE","#ECFECF","#AEBABA","#FBFFCD","#CAFFFF","#FEAABC","#AAAAFE","#EACEDE","#EBFCAA","#AFFDDC","#FEDBFC","#DFECDE","#FAFCCA","#FCAFDD","#EEAFDD","#ECFEDB","#EECCED","#EABFCD","#ABDDBF","#AEACEE","#DAADDF","#ADEFDC","#EFBEFD","#EFCDED","#BBCACD","#CFEEBF","#BCAAED","#FCADEC","#CDDEBF","#CABCCC","#ACEEAE","#CAFDEA","#BAEEBC","#CEDFBC","#FDACBA","#DAEEBD","#BEEBFF","#DCEFBF","#FCCAAD","#CEACFD","#EFCEED","#AAFAEF","#AABBBB","#FBECDA","#AEAEBF","#CBBFBE","#AAFBCE","#AEEFCE","#EDABFF","#CFBEEB","#DBEECD","#ECCACE","#ABAFFA","#ABFDCD","#DCAABC","#FBBCDC","#BECBDB","#DFCCAF","#ABACBF","#EDCFDE","#DBBAAE","#ACEBBE","#CDAAEA","#EEEAEC","#EDBEEF","#DEAABF","#EAADCD","#CCBBFF","#BAADFD","#BDBBBB","#ADECBB","#CAFEBB","#EFEACD","#DFFADA","#BAFCCE","#CDFDEA","#FFFFBA","#ADCCBB","#DCCFCD","#CDBBCA","#FAFADE","#DCAAFF","#ABECCF","#BDCBDD","#EFBABF","#BDAEEA","#AEFFFE","#EACACF","#DCCFCA","#EABEAA","#DAABDC","#CCBAAC","#CFBEEC","#DDBCEB","#CBDEBD","#FCBABF","#FDBBEC","#CDBDFD","#ADEBEF","#FFDBCF","#DCDBAA","#ACAECD","#BDECDF","#FCFCDF","#EFCFDA","#CEFEBC","#EFACDE","#DDACAA","#DCDEDA","#DEFBBC","#BDABBE","#EFABDE","#DCACEB","#FFBEBD","#EDFAAD","#BDDDFE","#BCCCEE","#BECEED","#BBAFBE","#AFADBA","#EBCEFA","#CCACAE","#ACDBED","#BCEBCF","#FBBFDC","#EAFFEB","#BBABFE","#DEEEDE","#CDEFDD","#CDEFEA","#DFEFCB","#BDEFAF","#EAEABE","#FEFACD","#CCAECE","#EAEFBE","#BDDCDD","#CAFBFB"];const plotly_mixin={mixins:[components_mixins_cubmixin__WEBPACK_IMPORTED_MODULE_1__.Z],data(){return{graphConf:{HVLine:{name:"hvline"},Geo:{},Column:{name:"column",type:"bar",barmode:"group"},Line:{name:"line",type:"scatter",mode:"lines"},Scatter:{name:"scatter",type:"scatter",mode:"markers"},Pie:{name:"pie",type:"pie",hole:0},Donut:{name:"donut",type:"pie",hole:.4},StackedBar:{name:"stackedbar",type:"bar",barmode:"stack"},Bar:{name:"bar",type:"bar",orientation:"h"},HorizontalStackedBar:{name:"horizontalStackedbar",type:"bar",orientation:"h",barmode:"stack"},Bubble:{name:"bubble",mode:"markers"},StackedArea:{name:"stackedarea",stackgroup:"one"},Gauge:{name:"gauge"}},icon:{width:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",ascent:850,descent:-150},back:{width:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",ascent:850,descent:-150,color:"#000000"},drillLabels:[{text:"All",depth:0,node:{},points:"0,0 33,0 43,8.5 33,17 0,17",x:"16.5",y:"8.5",width:"43"}],graphSettings:{showCurrency:!1,showSearch:!1,showlegends:!0,reporttitle:"",isComparison:!1,colorscale:"Portland",isReverseScale:!1,desiredValueTendency:"incr",legendorientation:"v",legendposition:{x:1,y:1,anchor:"left"}},axesprops:{showmultiaxes:!1,showxzeroline:!1,showxgridline:!1,autotick:!1},measureprops:{tracetype:"",showmeasure:!0,showpointlabels:!1,textposition:"",layout:{},color:"",showygridline:!1,showyzeroline:!1}}},computed:{...(0,vuex__WEBPACK_IMPORTED_MODULE_2__.Se)(["getItemMetaById","defaultCurrencyFormat","getSelectedDrillOrFilterVal"])},methods:{formatValue:function(e){return"INDIAN"==this.defaultCurrencyFormat&&(e>1e7?e=e/1e7+"C":e>1e5&&(e=e/1e5+"L")),e},isDateDimension(e){var t=this.getItemMetaById(e);return!(!t||"date"!=t.DataSubType.toLowerCase())},getTotals:function(e,t,r){var s=new Array,a=0,i=[],o=[];for(var n in r)o.push(r[n].AggFunction),i.push(r[n].Format);s[0]="Grand Total or Average";for(var l=t;l<e[0].length;l++){a=0;for(var d=1;d<e.length;d++)a+=parseFloat(e[d][l]);"Average"==o[l-t]||"avg"==o[l-t]?a/=e.length-1:"Minimum"==o[l-t]||"Min"==o[l-t]?a=this.getMinMaxValues(l,e,"min"):"Maximum"!=o[l-t]&&"Max"!=o[l-t]||(a=this.getMinMaxValues(l,e,"max")),s[l]=a}return s},getMinMaxValues:function(e,t,r){for(var s=[],a=1;a<t.length;a++)s.push(t[a][e]);var i=Math.max.apply(Math,s),o=Math.min.apply(Math,s);return"min"==r?o:"max"==r?i:void 0},getNestedJson:function(e,t,r,s,a){var i={RD:{}};i["RD"]["General"]={},i["RD"]["General"]["Measures"]=[];for(var o=0;o<s.length;o++){var n=this.getItemMetaById(s[o]);i["RD"]["General"]["Measures"].push(n)}var l=makeJsonFromArrayNew(e,t,r,"",i,s,a);makeParentsJson(l);var d=this.addMeasureColumn(s);return this.resolveComputeMeasure(l,d),l},drawPlotlyCharts:function(e,t,r,s,a,i,o,n,l,d){if(void 0==n)n=this.graphSettings;if(void 0==d)d=this.axesprops;if(void 0==l||""==l)l=this.measureprops;for(var h=[],c=0;c<o.length;c++)h.push(this.isDateDimension(o[c]));if(h.includes(!0)&&(d.autotick=!0),"DataTable"!=a){var u=this.getNestedJson(t,r,s,i,o),p=JSON.parse(JSON.stringify(i));while(s>i.length){if(i.length==s)break;i=i.concat(p)}if(this.plotCharts(a,e,u,s,this.graphConf[a],n,l,d,i),Object.keys(l.layout).length)for(var m=i,g=-1,f=0;f<m.length;f++)g++,l.layout[m[f]].showmeasure||(lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().deleteTraces(e,g),g-=1)}},resolveFormula:function(json,formula){for(var i=0;json.children&&i<json.children.length;i++){var c=json.children[i];if(void 0==typeof c.children)return;c.name=String(c.name),eval(formula),this.resolveFormula(c,formula)}},resolveComputeMeasure:function(json,Measures){for(var i=0;Measures&&i<Measures.length;i++)if(Measures[i].formula&&"NA"!=Measures[i].formula){var c=json;c.name=String(c.name),eval(Measures[i].formula),this.resolveFormula(json,Measures[i].formula)}},addMeasureColumn:function(e){for(var t=new Array,r=0;r<e.length&&e[r]>1e4;r++){var s=new Array,a=this.getItemMetaById(e[r]),i={};if(""==a.AggFunction&&(a.Column.toLowerCase().indexOf("avg")>=0?a.AggFunction="avg":a.Column.toLowerCase().indexOf("min")>=0?a.AggFunction="min":a.Column.toLowerCase().indexOf("max")>=0?a.AggFunction="max":a.AggFunction="sum"),a.Description&&-1!==a.Description.indexOf("avg")&&(a.AggFunction="avg"),i.agg=a.AggFunction,i.formula="NA",a.Column&&a.Column.indexOf("[")>=0&&a.Column.indexOf("]")>=0){for(var o=a.Column.split("]"),n=0;n<o.length;n++){var l=o[n].split("[");2==l.length&&s.push(l[1])}var d=this.returnFunction(a.Column,e,s);"NA"!=d&&(i.formula="c.size["+r+"]="+d+";if(!isFinite(c.size["+r+"])) c.size["+r+"]=0;")}t.push(i)}return t},returnFunction:function(e,t,r){for(var s=0;s<r.length;s++){var a=t.indexOf(r[s]);if(a<0&&(a=t.indexOf(+r[s])),!(a>=0))return"NA";e=e.replace("["+r[s]+"]","c.size["+a+"]")}return e},createFilter(e,t){var r={};r.FilterItemId=e.dimId,r.FilterName="",r.FilterOper="eq",r.isNormalFilter=!0;var s=[];s.push(t);var a=this.encodedFilterValue(e.dimId,s);r.FilterValues=a,this.insertIntoCheckedFilters(r),"All"!=e.parent.name&&this.createFilter(e.parent,e.parent.name)},plotCharts:function(e,t,r,s,a,i,o,n,l){"HorizontalStackedBar"==e||"Column"==e||"Bar"==e||"Scatter"==e||"StackedBar"==e||"Bubble"==e||"StackedArea"==e?this.drawPlotlyChart(t,r,s,this.graphConf[e],i,o,n,l):"Waterfall"==e?this.drawPlotlyWaterFallChart(t,r,s,"waterfall",i,o,n,l):"Line"==e?this.drawPlotlyLineChart(t,r,s,this.graphConf[e],i,o,n,l):"Pareto"==e?this.drawPlotlyParetoChart(t,r,s,this.graphConf[e],i,o,n,l):"HVLine"==e?this.drawPlotlyHVLineChart(t,r,s,this.graphConf[e],i,o,n,l):"Pie"==e||"Donut"==e?this.drawPlotlyPieChart(t,r,this.graphConf[e],s,i,o,n,l):"Sunburst"==e?this.drawPlotlySunburstChart(t,r,"sunburst",s,i,o,n,l):"Treemap"==e?this.drawPlotlyTreemap(t,r,"Treemap",s,i,o,n,l):"InfoBox"==e?this.drawPlotlyIndicator(t,r,s,this.graphConf[e],i,o,n,l):"Funnel"==e?this.drawPlotlyFunnelChart(t,r,s,"funnel",i,o,n,l):"StackedFunnel"==e?this.drawPlotlyStackedFunnelChart(t,r,s,"stackedfunnel",i,o,n,l):"Heatmap"==e?this.drawPlotlyHeatChart(t,r,"heatmap",s,i,o,n,l):"Radar"==e?this.drawPlotlyRadarChart(t,r,s,"scatterpolar",i,o,n,l):"ProgressBar"==e?this.drawPlotlyGaugeChart(t,r,s,"ProgressBar",i,o,n,l):"Geo"==e&&this.drawPlotlyGeoChart(t,r,this.graphConf[e],s,i,o,n,l)},drawPlotlyChart:function(e,t,r,s,a,i,o,n){var l,d=document.getElementById(e),h=t,c=[],u=0;function p(e=0){var t=0,r=0;if(0==e){for(var s=0;s<h.children.length;s++)Math.min.apply(Math,h.children[s].size)<t&&(t=Math.min.apply(Math,h.children[s].size));for(s=0;s<h.children.length;s++)Math.max.apply(Math,h.children[s].size)>r&&(r=Math.max.apply(Math,h.children[s].size))}else{for(s=0;s<h.children.length;s++)h.children[s].size[e]<t&&(t=h.children[s].size[e]);for(s=0;s<h.children.length;s++)h.children[s].size[e]>r&&(r=h.children[s].size[e])}return[t,r]}function m(e){var t=new Array;for(k=0;k<h.children.length;k++)t.push(h.children[k].name);return t}function g(e){var t=new Array;for(l=0;l<h.children.length;l++)t.push(h.children[l].size[e]);return t}function f(e){var t="";return t=h.measName[e],t}function y(){var e="";return e=h.children[0].dimName,e}function v(){var e="";return e=h.children[0].dimId,e}h.parent&&h.parent;var I=[];if("column"==s.name&&0!=Object.keys(i.layout).length)for(var b=0;b<n.length;b++)if(i.layout[n[b]]&&i.layout[n[b]].showtrendline){var _={},D=i.layout[n[b]];_.x=[],_.y=[],_.x.push(m(b)[0]),_.x.push(m(b)[m(b).length-1]),_.y.push(this.leastSquare(g(b))[0]),_.y.push(this.leastSquare(g(b))[1]),_.name=f(b)+"_trend",_.type="scatter",_.showlegend=!1,_.measureId=n[b],_.mode="lines",_.line={},_.line.color=D.trendlinecolor,_.line.dash=D.trendlinetype,_.line.width=3,I.push(_)}var C=r!=n.length;function S(e){return void 0==i?"none":(C&&(e=Math.floor(e%n.length)),void 0==i.layout[n[e]]?"none":i.layout[n[e]].showpointlabels?"auto":"none")}while(u<r)c[u]={orientation:s.orientation,x:"h"==s.orientation?g(u):m(u),y:"h"==s.orientation?m(u):g(u),yaxis:1==o.showmultiaxes&&0!=u?"y"+(u+1):"",name:f(u),mode:s.mode,type:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[n[u]].tracetype?i.layout[n[u]].tracetype:s.type,text:"en_IN.UTF-8"==this.defaultCurrencyFormat?this.getTickTexts(g(u),n[0]):g(u).map(String),hovertemplate:"h"==s.orientation?"%{y}<br><b>%{text}</b><br>":"%{x}<br><b>%{text}</b><br>",textposition:S(u),line:{color:void 0!=i&&void 0!=i.layout[n[u]]?i.layout[n[u]].color:""},marker:"bubble"==s.name?{size:this.getMarkerSize(g(u)),opacity:.9,color:this.getRandomLightColorCodes(g(u).length)}:{color:void 0!=i&&void 0!=i.layout[n[u]]?i.layout[n[u]].color:""},stackgroup:"stackedarea"==s.name?f(u):"",offsetgroup:u},u++;if(I.length&&(c=c.concat(I)),"en_IN.UTF-8"==this.defaultCurrencyFormat)var F=p(),w=getTickValues(F[0],F[1],10),x=this.getTickTexts(w,n[0]),T={autotick:!0,automargin:!0,tickmode:"array",tickvals:"h"==s.orientation?"":w,ticktext:"h"==s.orientation?"":x,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,type:"h"==s.orientation?"category":"-",title:"h"!=s.orientation?1==r?f(0):"":y()};else T={autotick:!0,automargin:!0,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,type:"h"==s.orientation?"category":"-",title:"h"!=s.orientation?1==r?f(0):"":y()};var E={colorway:DEFAULT_COLORWAY,autosize:!0,barmode:s.barmode,hovermode:"closest",yaxis:T,xaxis:{type:"h"!=s.orientation?this.isDateDimension(v())?"Date":"category":"-",categoryorder:"trace",autotick:void 0!=o&&o.autotick,automargin:!0,tickmode:"h"==s.orientation&&"en_IN.UTF-8"==this.defaultCurrencyFormat?"array":"",tickvals:"h"==s.orientation&&"en_IN.UTF-8"==this.defaultCurrencyFormat?w:"",ticktext:"h"==s.orientation&&"en_IN.UTF-8"==this.defaultCurrencyFormat?x:"",title:{text:"h"!=s.orientation?y():1==r?f(0):"",standoff:10},showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline},margin:{t:20,l:20},showlegend:a.showlegends,legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};if(o.showmultiaxes){b=.1;r>=10&&(b=.05);for(var k=0;k<r-1;k++){if("en_IN.UTF-8"==this.defaultCurrencyFormat)F=p(k+1),w=getTickValues(F[0],F[1],10),x=this.getTickTexts(w,n[k+1]);var L={title:f(k+1),overlaying:"y",showgrid:void 0!=i&&void 0!=i.layout[k+1]&&i.layout[k+1].showygridline,zeroline:void 0!=i&&void 0!=i.layout[k+1]&&i.layout[k+1].showyzeroline,gridcolor:"#bdbdbd",gridwidth:2,tickmode:"array",tickvals:"en_IN.UTF-8"==this.defaultCurrencyFormat?w:"",ticktext:"en_IN.UTF-8"==this.defaultCurrencyFormat?x:"",showline:!0,zerolinecolor:"#969696",zerolinewidth:4,side:void 0!=i&&void 0!=i.layout[k+1]?i.layout[k+1].axesposition:"left",position:(r-(k+1))*b};E["yaxis"+(k+2)]=L}L=T;var M={type:"h"!=s.orientation?this.isDateDimension(v())?"Date":"category":"-",autotick:void 0!=o&&o.autotick,categoryorder:"trace",automargin:!0,domain:[b*r,1],showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline};E["yaxis"]=L,E["xaxis"]=M}"bar"!=s.name&&"horizontalStackedbar"!=s.name||(E.xaxis.autotick=!0,E.yaxis.autotick=!1),lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,c,E,{displaylogo:!1,responsive:!0});var A=this;d.on("plotly_click",(function(t){var l,d="h"==s.orientation?t.points[0].y:t.points[0].x,c=h.children,u=new Array;for(l=0;l<c.length;l++)d==c[l].name&&(u=c[l]);var p={h:17,t:10},m=new Array;m[-1]=0,m[0]=33;var g=0,f=A.breadcrumbPoints(u.name,u.depth,p,m,g),y=f.split(","),v=y[2].split(" "),I=v[1];u.children?A.drillLabels.push({text:u.name,depth:u.depth,node:u,points:f,x:g+m[u.depth]/2+p.t*u.depth,y:p.h/2,width:I}):(A.$store.commit("setSnackbarStatus",!0),A.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),A.drawPlotlyChart(e,u,r,s,a,i,o,n)})),d.on("plotly_legendclick",(function(t){if("en_IN.UTF-8"==A.defaultCurrencyFormat){var s=t.curveNumber,a=A.getMinMaxValuesOfArray(t.data,s,t.fullData),i=getTickValues(a[0],a[1],10),o=A.getTickTexts(i,n[0]);t.layout.yaxis.tickvals=i,t.layout.yaxis.ticktext=o}for(var l=-1,d=r;d<t.fullData.length;d++)t.data[t.curveNumber].measureId==t.data[d].measureId&&(l=d);if(-1==l)return!0;if(1==t.fullData[t.curveNumber].visible){var h={visible:"legendonly"};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}else{h={visible:!0};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}}))},breadcrumbPoints:function(e,t,r,s,a){var i=[];return s[t]=6*e.replace("'","'").length+15,a+=s[t],i.push(a-s[t]+r.t*t+",0"),i.push(a+r.t*t+",0"),i.push(r.t*(t+1)+a+","+r.h/2),i.push(a+r.t*t+","+r.h),i.push(r.t*t+(t?a-s[t]:0)+","+r.h),t>0&&i.push(r.t+r.t*t+(t?a-s[t]:0)+","+r.h/2),i.join(" ")},plotAnyChart:function(e,t,r,s,a,i,o,n,l,d){void 0==o&&(o=this.graphSettings),void 0==l&&(l=this.axesprops),void 0==n&&(n=this.measureprops);var h=this.graphConf[i],c=r,u=new Array;t==c.depth?u=c:(json1=json1.parent,this.plotAnyChart(e,t)),this.plotCharts(i,s,u,a,h,o,n,l,d)},drawPlotlyLineChart:function(e,t,r,s,a,i,o,n){var l,d=document.getElementById(e),h=t,c=[],u=0;function p(e=0){var t=0,r=0;if(0==e){for(var s=0;s<h.children.length;s++)Math.min.apply(Math,h.children[s].size)<t&&(t=Math.min.apply(Math,h.children[s].size));for(s=0;s<h.children.length;s++)Math.max.apply(Math,h.children[s].size)>r&&(r=Math.max.apply(Math,h.children[s].size))}else{for(s=0;s<h.children.length;s++)h.children[s].size[e]<t&&(t=h.children[s].size[e]);for(s=0;s<h.children.length;s++)h.children[s].size[e]>r&&(r=h.children[s].size[e])}return[t,r]}function m(e){var t=new Array;for(k=0;k<h.children.length;k++)t.push(h.children[k].name);return t}function g(e){var t=new Array;for(l=0;l<h.children.length;l++)t.push(h.children[l].size[e]);return t}function f(e){var t="";return t=h.measName[e],t}function y(){var e="";return e=h.children[0].dimName,e}function v(){var e="";return e=h.children[0].dimId,e}h.parent&&h.parent;var I=[];if(0!=Object.keys(i.layout).length)for(var b=0;b<n.length;b++)if(i.layout[n[b]]&&i.layout[n[b]].showtrendline){var _={},D=i.layout[n[b]];_.x=[],_.y=[],_.x.push(m(b)[0]),_.x.push(m(b)[m(b).length-1]),_.y.push(this.leastSquare(g(b))[0]),_.y.push(this.leastSquare(g(b))[1]),_.name=f(b)+"_trend",_.measureId=n[u],_.type="scatter",_.showlegend=!1,_.mode="lines",_.line={},_.line.color=D.trendlinecolor,_.line.dash=D.trendlinetype,_.line.width=3,I.push(_)}var C=r!=n.length;function S(e){return void 0==i?"lines+markers":(C&&(e=Math.floor(e%n.length)),void 0==i.layout[n[e]]?"lines+markers":i.layout[n[e]].showpointlabels?"lines+markers+text":"lines+markers")}while(u<r)c[u]={orientation:s.orientation,x:"h"==s.orientation?g(u):m(u),y:"h"==s.orientation?m(u):g(u),yaxis:void 0!=o&&1==o.showmultiaxes&&0!=u?"y"+(u+1):"",name:f(u),mode:S(u),type:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[n[u]].tracetype?i.layout[n[u]].tracetype:s.type,text:"en_IN.UTF-8"==this.defaultCurrencyFormat?this.getTickTexts(g(u),n[0]):g(u).map(String),hovertemplate:"%{x}<br><b>%{text}</b><br>",textposition:"top center",line:{color:void 0!=i&&void 0!=i.layout[n[u]]?i.layout[n[u]].color:""},stackgroup:""},u++;if(I.length&&(c=c.concat(I)),"en_IN.UTF-8"==this.defaultCurrencyFormat)var F=p(),w=getTickValues(F[0],F[1],10),x=this.getTickTexts(w,n[0]),T={automargin:!0,tickmode:"array",tickvals:w,ticktext:x,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,title:"h"!=s.orientation?1==r?f(0):"":y()};else T={automargin:!0,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,title:"h"!=s.orientation?1==r?f(0):"":y()};var E={colorway:DEFAULT_COLORWAY,autosize:!0,hovermode:"closest",yaxis:T,xaxis:{autotick:void 0!=o&&o.autotick,automargin:!0,title:{text:y(),standoff:10},showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline,type:this.isDateDimension(v())?"Date":"category",categoryorder:"trace"},margin:{t:40,l:20},showlegend:a.showlegends,legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};if(o.showmultiaxes){b=.1;r>=10&&(b=.05);for(var k=0;k<r-1;k++){if("en_IN.UTF-8"==this.defaultCurrencyFormat)F=p(k+1),w=getTickValues(F[0],F[1],10),x=this.getTickTexts(w,n[k+1]);var L={title:f(k+1),overlaying:"y",showgrid:void 0!=i&&void 0!=i.layout[k+1]&&i.layout[k+1].showygridline,zeroline:void 0!=i&&void 0!=i.layout[k+1]&&i.layout[k+1].showyzeroline,gridcolor:"#bdbdbd",gridwidth:2,tickmode:"array",tickvals:"en_IN.UTF-8"==this.defaultCurrencyFormat?w:"",ticktext:"en_IN.UTF-8"==this.defaultCurrencyFormat?x:"",showline:!0,zerolinecolor:"#969696",zerolinewidth:4,side:"left",position:(r-(k+1))*b};E["yaxis"+(k+2)]=L}var M={autotick:void 0!=o&&o.autotick,automargin:!0,domain:[b*r,1],showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline,type:this.isDateDimension(v())?"Date":"category",categoryorder:"trace"};E["xaxis"]=M}lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,c,E,{displaylogo:!1,responsive:!0});var A=this;d.on("plotly_click",(function(t){var l,d="h"==s.orientation?t.points[0].y:t.points[0].x,c=h.children,u=new Array;for(l=0;l<c.length;l++)d==c[l].name&&(u=c[l]);"Filter"!=A.getSelectedDrillOrFilterVal||"analyze"!=A.$route.name?(u.children?A.drillLabels.push({text:u.name,depth:u.depth,node:u}):(A.$store.commit("setSnackbarStatus",!0),A.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),A.drawPlotlyLineChart(e,u,r,s,a,i,o,n)):A.createFilter(u,d)})),d.on("plotly_legendclick",(function(t){if("en_IN.UTF-8"==A.defaultCurrencyFormat){var s=t.curveNumber,a=A.getMinMaxValuesOfArray(t.data,s,t.fullData),i=getTickValues(a[0],a[1],10),o=A.getTickTexts(i,n[0]);t.layout.yaxis.tickvals=i,t.layout.yaxis.ticktext=o}for(var l=-1,d=r;d<t.fullData.length;d++)t.data[t.curveNumber].measureId==t.data[d].measureId&&(l=d);if(-1==l)return!0;if(1==t.fullData[t.curveNumber].visible){var h={visible:"legendonly"};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}else{h={visible:!0};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}}))},drawPlotlyParetoChart:function(e,t,r,s,a,i,o,n){var l,d,h=document.getElementById(e),c=t,u=[],p=0;function m(e){for(var t=0;t<e.length;t++)e[t]=[e[t],t];e.sort((function(e,t){return e[0]>t[0]?-1:1})),e.sortIndices=[];for(var r=0;r<e.length;r++)e.sortIndices.push(e[r][1]),e[r]=e[r][0];return e.sortIndices}function g(e){var t=new Array,r=new Array;for(d=0;d<c.children.length;d++)r.push(c.children[d].size[0]);var s=m(r);for(l=0;l<c.children.length;l++)t.push(c.children[s[l]].name);return t}function f(e){var t=new Array,r=new Array;for(d=0;d<c.children.length;d++)r.push(c.children[d].size[0]);var s=m(r);for(d=0;d<c.children.length;d++)t.push(c.children[s[d]].size[e]);return t}function y(e){var t=new Array,r=f(e),s=r.reduce((function(e,t){return e+t}),0),a=0;return t=r.map((function(e){return a+=e,a/s})),console.log(t),t}function v(e){var t="";return t=c.measName[e],t}function I(){var e="";return e=c.children[0].dimName,e}function b(){var e="";return e=c.children[0].dimId,e}c.parent&&c.parent;var _=[];while(p<r)u[p]={orientation:"",x:g(p),y:f(p),yaxis:1==o.showmultiaxes&&0!=p?"y"+(p+1):"",name:v(p),type:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[n[p]].tracetype?i.layout[n[p]].tracetype:"bar",text:f(p).map(String),textposition:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[n[p]].showpointlabels?"auto":"none",line:{color:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[n[p]].color.length?i.layout[n[p]].color:DEFAULT_COLORWAY[p]},marker:{color:void 0!=i&&void 0!=i.layout[n[p]]?i.layout[n[p]].color:""},stackgroup:"",offsetgroup:p,legendgroup:"group"+p},u[p+r]={orientation:"",x:g(p),y:y(p),yaxis:"y2",name:v(p),type:"scatter",mode:"lines+markers",text:y(p).map(String),textposition:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[n[p]].showpointlabels&&""!=i.layout[n[p]].textposition?i.layout[n[p]].textposition:"top",line:{color:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[n[p]].color.length?i.layout[n[p]].color:DEFAULT_COLORWAY[p]},showlegend:!1,stackgroup:"",legendgroup:"group"+p},p++;_.length&&(u=u.concat(_));var D={colorway:DEFAULT_COLORWAY,legend:{x:1,y:.5},barmode:"group",autosize:!0,hovermode:"closest",yaxis:{automargin:!0,showgrid:void 0==i||void 0==i.layout[n[p]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[p]]&&i.layout[0].showyzeroline},yaxis2:{title:"",overlaying:"y",side:"right",tickformat:",.0%",tick0:0,dtick:.1,tickmode:Array,range:[0,1],autotick:!1,anchor:"x",zeroline:!1,showgrid:!1},xaxis:{autotick:void 0!=o&&o.autotick,automargin:!0,title:I(),showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline,type:this.isDateDimension(b())?"Date":"category",categoryorder:"trace"},margin:{t:40,l:20},showlegend:a.showlegends,legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,u,D,{displaylogo:!1,responsive:!0});var C=this;h.on("plotly_click",(function(t){var l,d="h"==s.orientation?t.points[0].y:t.points[0].x,h=c.children,u=new Array;for(l=0;l<h.length;l++)d==h[l].name&&(u=h[l]);"Filter"!=C.getSelectedDrillOrFilterVal||"analyze"!=C.$route.name?(u.children?C.drillLabels.push({text:u.name,depth:u.depth,node:u}):(C.$store.commit("setSnackbarStatus",!0),C.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),C.drawPlotlyParetoChart(e,u,r,s,a,i,o,n)):C.createFilter(u,d)}))},drawPlotlyPieChart:function(e,t,r,s,a,i,o,n){var l,d,h=document.getElementById(e),c=t,u=(s=s,[]),p=1,m=1;p=s<=3?1:2,m=Math.ceil(s/p);var g=0,f=0,y=0;function v(e){var t=new Array;for(l=0;l<c.children.length;l++)t.push(c.children[l].name);return t}function I(e){var t=new Array;for(d=0;d<c.children.length;d++)t.push(c.children[d].size[e]);return t}function b(){var e="";return e=c.children[0].dimName,e}c.parent&&c.parent;while(g<s)u[g]={labels:v(g),values:I(g),hole:r.hole,type:r.type,name:c.measName[g],domain:{row:f,column:y}},g++,y++,y>=m&&(y=0,f++);var _={colorway:DEFAULT_COLORWAY,title:b(),titleposition:"bottom center",showlegend:a.showlegends,grid:{rows:p,columns:m},margin:{t:30,b:20,l:20},legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,u,_,{responsive:!0,displaylogo:!1});var D=this;h.on("plotly_click",(function(t){var l,d=t.points[0].label,h=c.children,u=new Array;for(l=0;l<h.length;l++)t.points[0].label==h[l].name&&(u=h[l]);"Filter"!=D.getSelectedDrillOrFilterVal||"analyze"!=D.$route.name?(u.children?D.drillLabels.push({text:u.name,depth:u.depth,node:u}):(D.$store.commit("setSnackbarStatus",!0),D.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),D.drawPlotlyPieChart(e,u,r,s,a,i,o,n)):D.createFilter(u,d)}))},drawPlotlySunburstChart:function(e,t,r,s,a,i,o,n){var l=t,d=(s=s,[]),h=0;function c(e,t=""){if(!e.children)return[];for(var r=new Array,s=0;s<e.children.length;s++){var a="";a=t?t+" ~ "+e.children[s].name:e.children[s].name,r.push(a),r=r.concat(c(e.children[s],a))}return r}function u(e,t=""){if(!e.children)return[];for(var r=new Array,s=0;s<e.children.length;s++){var a="";a=t?t+" ~ "+e.children[s].name:e.children[s].name,r.push(t),r=r.concat(u(e.children[s],a))}return r}function p(e){if(!e.children)return[];for(var t=new Array,r=0;r<e.children.length;r++){var s=e.children[r].size[0];t.push(s),t=t.concat(p(e.children[r]))}return t}function m(e){if(!e.children)return[];for(var t=new Array,r=0;r<e.children.length;r++){var s=e.children[r].name;t.push(s),t=t.concat(m(e.children[r]))}return t}l.parent&&l.parent;while(h<s)d[h]={ids:c(t),labels:m(t),parents:u(t),values:p(t),type:"sunburst",textposition:"inside",insidetextorientation:"radial",marker:{line:{width:2}}},h++;var g={colorway:DEFAULT_COLORWAY,showlegend:a.showlegends,margin:{t:20,b:20,l:20},legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,d,g,{responsive:!0,displaylogo:!1})},drawPlotlyTreemap:function(e,t,r,s,a,i,o,n){document.getElementById(e);var l=t,d=(s=s,[]),h=0;function c(e,t=""){if(!e.children)return[];for(var r=new Array,s=0;s<e.children.length;s++){var a="";a=t?t+" ~ "+e.children[s].name:e.children[s].name,r.push(a),r=r.concat(c(e.children[s],a))}return r}function u(e,t=""){if(!e.children)return[];for(var r=new Array,s=0;s<e.children.length;s++){var a="";a=t?t+" ~ "+e.children[s].name:e.children[s].name,r.push(t),r=r.concat(u(e.children[s],a))}return r}function p(e){if(!e.children)return[];for(var t=new Array,r=0;r<e.children.length;r++){var s=e.children[r].size[0];t.push(s),t=t.concat(p(e.children[r]))}return t}function m(e){if(!e.children)return[];for(var t=new Array,r=0;r<e.children.length;r++){var s=e.children[r].name;t.push(s),t=t.concat(m(e.children[r]))}return t}function g(){var e="";return e=l.children[0].dimName,e}l.parent&&l.parent;while(h<s)d[h]={ids:c(t),labels:m(t),parents:u(t),values:p(t),name:l.measName[h],type:"treemap",domain:{x:[h/s+.02,(h+1)/s-.02]},textinfo:"label+value",hovertemplate:g()+": %{label} <br> %{value}",outsidetextfont:{size:20,color:"#377eb8"},marker:{line:{width:2}},pathbar:{visible:!1}},h++;var f={colorway:DEFAULT_COLORWAY,margin:{l:0,r:0,t:0,b:0},annotations:[{showarrow:!1,text:"",x:.25,xanchor:"center",y:1.1,yanchor:"bottom"}]};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,d,f,{responsive:!0,displaylogo:!1})},drawPlotlyGaugeChart:function(e,t,r,s,a,i,o,n){var l=0,d=0,h="gauge+number";d=t.size[0],2==t.size.length&&(l=t.size[0],d=t.size[1]),a.isComparison?(h="gauge+number+delta",2==t.size.length?(l=t.size[0],d=t.size[1]):2==t.children.length&&(d=t.children[1].size[0],l=t.children[0].size[0])):d=t.size[0];var c=[{domain:{x:[0,1],y:[0,1]},value:d,type:"indicator",mode:h,delta:{reference:l,relative:!0},gauge:{bar:{color:i.color?i.color:"green"},axis:{range:[null,a.isComparison?l:100]}}}],u={colorway:DEFAULT_COLORWAY,autosize:!0,margin:{t:30,b:10,l:10,r:30}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,c,u,{displaylogo:!1})},drawPlotlyFunnelChart:function(e,t,r,s,a,i,o,n){var l=document.getElementById(e),d=t,h=[],c=0;function u(e){for(var t=[],r=0;r<d.children.length;r++){var s={};s.x=d.children[r].name,s.y=d.children[r].size[e],t.push(s)}return t.sort((function(e,t){return t.y-e.y})),t}d.parent&&d.parent;var p=u(0),m=new Array;p.forEach((function(e){m.push(e.x)}));var g=new Array;p.forEach((function(e){g.push(e.y)})),h=[{labels:m,values:g,type:"funnelarea",title:d.measName[c],hoverinfo:"x+percent previous+percent initial",textinfo:"value",domain:{x:[0,1],y:[0,1]}}];var f={colorway:DEFAULT_COLORWAY,showlegend:a.showlegends,shapes:[],margin:{l:0,r:0,t:0,b:0},legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,h,f,{responsive:!0,displaylogo:!1});var y=this;l.on("plotly_click",(function(t){var l,h=t.points[0].label,c=d.children,u=new Array;for(l=0;l<c.length;l++)t.points[0].label==c[l].name&&(u=c[l]);"Filter"!=y.getSelectedDrillOrFilterVal||"analyze"!=y.$route.name?(u.children?y.drillLabels.push({text:u.name,depth:u.depth,node:u}):(y.$store.commit("setSnackbarStatus",!0),y.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),y.drawPlotlyFunnelChart(e,u,r,s,a,i,o,n)):y.createFilter(u,h)}))},drawPlotlyStackedFunnelChart:function(e,t,r,s,a,i,o,n){var l=document.getElementById(e),d=t,h=[],c=0;function u(e){for(var t=[],s=0;s<d.children.length;s++){var a={};a.x=d.children[s].name,a.y=d.children[s].size[e],a.sum=0;for(var i=0;i<r;i++)a.sum+=d.children[s].size[i];t.push(a)}return t.sort((function(e,t){return t.sum-e.sum})),t}d.parent&&d.parent;while(c<r){var p=u(c),m=new Array;p.forEach((function(e){m.push(e.x)}));var g=new Array;p.forEach((function(e){g.push(e.y)})),h[c]={y:m,x:g,type:"funnel",name:d.measName[c],textposition:"outside",textinfo:"value+percent total"},c++}var f={colorway:DEFAULT_COLORWAY,margin:{l:0,r:0,t:0,b:0},funnelmode:"stack",showlegend:a.showlegends,legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,h,f,{responsive:!0,displaylogo:!1});var y=this;l.on("plotly_click",(function(t){var l,h=t.points[0].y,c=d.children,u=new Array;for(l=0;l<c.length;l++)t.points[0].y==c[l].name&&(u=c[l]);"Filter"!=y.getSelectedDrillOrFilterVal||"analyze"!=y.$route.name?(u.children?y.drillLabels.push({text:u.name,depth:u.depth,node:u}):(y.$store.commit("setSnackbarStatus",!0),y.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),y.drawPlotlyStackedFunnelChart(e,u,r,s,a,i,o,n)):y.createFilter(u,h)}))},drawPlotlyFunnelAreaChart:function(e,t,r,s,a,i,o,n){var l=0,d=.5,h=0,c=0,u=1;var p=0,m=document.getElementById(e),g=t,f=[],y=0;function v(e){for(var t=[],r=0;r<g.children.length;r++){var s={};s.x=g.children[r].name,s.y=g.children[r].size[e],t.push(s)}return t.sort((function(e,t){return t.y-e.y})),t}g.parent&&g.parent;while(y<r){var I=v(y),b=new Array;I.forEach((function(e){b.push(e.x)}));var _=new Array;I.forEach((function(e){_.push(e.y)})),f[y]={labels:b,values:_,type:"funnelarea",title:g.measName[y],hoverinfo:"x+percent previous+percent initial",domain:{x:[l,d],y:[h,c]}},y++,h+=.5,c+=.5,p++,p>=u&&(h=0,c=.5,l+=.5,d+=.5)}for(var D=[],C=0;C<f.length;C++){var S={};S.x0=f[C].domain.x[0],S.x1=f[C].domain.x[1],S.y0=f[C].domain.y[0],S.y1=f[C].domain.y[1],D.push(S)}var F={colorway:DEFAULT_COLORWAY,margin:{l:150},shapes:D,showlegend:a.showlegends};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(m,f,F)},drawPlotlyHeatChart:function(e,t,r,s,a,i,o,n){for(var l=[],d=[],h={},c=[],u=0;u<t.children.length;u++){var p=t.children[u].name;l.push(p),h[p]={};for(var m=0;m<t.children[u].children.length;m++){var g=t.children[u].children[m].name;h[p][g]=t.children[u].children[m].size[0],d.includes(g)||d.push(g)}}for(u=0;u<l.length;u++){var f=new Array(d.length);for(m=0;m<d.length;m++)h[l[u]][d[m]]&&(f[m]=h[l[u]][d[m]]);c.push(f)}var y=[{type:"heatmap",x:d,y:l,z:c,hoverongaps:!1,hovertemplate:t.children[0].children[0].dimName+": %{x}<br>"+t.children[0].dimName+": %{y}<br>"+t.children[0].measName[0]+": %{z}<extra></extra>"}];a.colorscale?(y[0]["colorscale"]=a.colorscale,y[0]["reversescale"]=a.isReverseScale):(y[0]["colorscale"]="Portland",y[0]["reversescale"]=!1);var v={colorway:DEFAULT_COLORWAY,xaxis:{autotick:void 0!=o&&o.autotick,title:t.children[0].children[0].dimName},yaxis:{autotick:!1,title:t.children[0].dimName},autosize:!0,automargin:!0,margin:{t:24}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,y,v,{responsive:!0,displaylogo:!1})},drawPlotlyHVLineChart:function(e,t,r,s,a,i,o,n){var l,d=document.getElementById(e),h=t,c=[],u=0;function p(e=0){var t=0,r=0;if(0==e){for(var s=0;s<h.children.length;s++)Math.min.apply(Math,h.children[s].size)<t&&(t=Math.min.apply(Math,h.children[s].size));for(s=0;s<h.children.length;s++)Math.max.apply(Math,h.children[s].size)>r&&(r=Math.max.apply(Math,h.children[s].size))}else{for(s=0;s<h.children.length;s++)h.children[s].size[e]<t&&(t=h.children[s].size[e]);for(s=0;s<h.children.length;s++)h.children[s].size[e]>r&&(r=h.children[s].size[e])}return[t,r]}function m(e){var t=new Array;for(x=0;x<h.children.length;x++)t.push(h.children[x].name);return t}function g(e){var t=new Array;for(l=0;l<h.children.length;l++)t.push(h.children[l].size[e]);return t}function f(e){var t="";return t=h.measName[e],t}function y(){var e="";return e=h.children[0].dimName,e}function v(){var e="";return e=h.children[0].dimId,e}h.parent&&h.parent;var I=r!=n.length;function b(e){return void 0==i?"lines+markers":(I&&(e=Math.floor(e%n.length)),void 0==i.layout[n[e]]?"lines+markers":i.layout[n[e]].showpointlabels?"lines+markers+text":"lines+markers")}while(u<r)c[u]={x:m(u),y:g(u),yaxis:void 0!=o&&1==o.showmultiaxes&&0!=u?"y"+(u+1):"",name:f(u),mode:b(u),type:"scatter",text:g(u).map(String),textposition:"top center",line:{color:void 0!=i&&void 0!=i.layout[n[u]]?i.layout[n[u]].color:"",shape:"hv"},stackgroup:""},u++;if("en_IN.UTF-8"==this.defaultCurrencyFormat)var _=p(),D=getTickValues(_[0],_[1],10),C=this.getTickTexts(D,n[0]),S={automargin:!0,tickmode:"array",tickvals:D,ticktext:C,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,title:"h"!=s.orientation?1==r?f(0):"":y()};else S={automargin:!0,showgrid:void 0==i||void 0==i.layout[n[u]]||i.layout[0].showygridline,zeroline:void 0!=i&&void 0!=i.layout[n[u]]&&i.layout[0].showyzeroline,title:"h"!=s.orientation?1==r?f(0):"":y()};var F={colorway:DEFAULT_COLORWAY,autosize:!0,hovermode:"closest",yaxis:S,xaxis:{autotick:void 0!=o&&o.autotick,automargin:!0,title:{text:y(),standoff:10},showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline,type:this.isDateDimension(v())?"Date":"category",categoryorder:"trace"},margin:{t:20,l:20},showlegend:a.showlegends,legend:{orientation:"h"==a.legendorientation?"h":"v",x:a.legendposition?a.legendposition.x:1,xanchor:a.legendposition?a.legendposition.anchor:"left",y:a.legendposition?a.legendposition.y:1}};if(o.showmultiaxes){var w=.1;r>=10&&(w=.05);for(var x=0;x<r-1;x++){if("en_IN.UTF-8"==this.defaultCurrencyFormat)_=p(x+1),D=getTickValues(_[0],_[1],10),C=this.getTickTexts(D,n[x+1]);var T={title:f(x+1),overlaying:"y",showgrid:void 0!=i&&void 0!=i.layout[x+1]&&i.layout[x+1].showygridline,zeroline:void 0!=i&&void 0!=i.layout[x+1]&&i.layout[x+1].showyzeroline,gridcolor:"#bdbdbd",gridwidth:2,tickmode:"array",tickvals:"en_IN.UTF-8"==this.defaultCurrencyFormat?D:"",ticktext:"en_IN.UTF-8"==this.defaultCurrencyFormat?C:"",showline:!0,zerolinecolor:"#969696",zerolinewidth:4,side:"left",position:(r-(x+1))*w};F["yaxis"+(x+2)]=T}var E={autotick:void 0!=o&&o.autotick,automargin:!0,domain:[w*r,1],showgrid:void 0!=o&&o.showxgridline,zeroline:void 0!=o&&o.showxzeroline};F["xaxis"]=E}lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,c,F,{displaylogo:!1,responsive:!0});var k=this;d.on("plotly_click",(function(t){var l,d="h"==s.orientation?t.points[0].y:t.points[0].x,c=h.children,u=new Array;for(l=0;l<c.length;l++)d==c[l].name&&(u=c[l]);"Filter"!=k.getSelectedDrillOrFilterVal||"analyze"!=k.$route.name?(u.children?k.drillLabels.push({text:u.name,depth:u.depth,node:u}):(k.$store.commit("setSnackbarStatus",!0),k.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),k.drawPlotlyHVLineChart(e,u,r,s,a,i,o,n)):k.createFilter(u,d)})),d.on("plotly_legendclick",(function(t){if("en_IN.UTF-8"==k.defaultCurrencyFormat){var s=t.curveNumber,a=k.getMinMaxValuesOfArray(t.data,s,t.fullData),i=getTickValues(a[0],a[1],10),o=k.getTickTexts(i,n[0]);t.layout.yaxis.tickvals=i,t.layout.yaxis.ticktext=o}for(var l=-1,d=r;d<t.fullData.length;d++)t.data[t.curveNumber].measureId==t.data[d].measureId&&(l=d);if(-1==l)return!0;if(1==t.fullData[t.curveNumber].visible){var h={visible:"legendonly"};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}else{h={visible:!0};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().restyle(e,h,l)}}))},drawPlotlyRadarChart:function(e,t,r,s,a,i,o,n){var l,d,h=document.getElementById(e),c=t,u=[],p=0;function m(e){var t=new Array;for(l=0;l<c.children.length;l++)t.push(c.children[l].name);return t}function g(e){var t=new Array;for(d=0;d<c.children.length;d++)t.push(c.children[d].size[e]);return t}function f(e){var t="";return t=c.measName[e],t}c.parent&&c.parent;while(p<r)u[p]={r:g(p),theta:m(p),type:"scatterpolar",name:f(p),fill:"toself"},p++;var y={colorway:DEFAULT_COLORWAY,margin:{l:0,r:0,t:0,b:0},polar:{radialaxis:{visible:!0}},showlegend:a.showlegends};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,u,y,{responsive:!0,displaylogo:!1});var v=this;h.on("plotly_click",(function(t){var l,d=t.points[0].theta,h=c.children,u=new Array;for(l=0;l<h.length;l++)t.points[0].theta==h[l].name&&(u=h[l]);"Filter"!=v.getSelectedDrillOrFilterVal||"analyze"!=v.$route.name?(u.children?v.drillLabels.push({text:u.name,depth:u.depth,node:u}):(v.$store.commit("setSnackbarStatus",!0),v.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),v.drawPlotlyRadarChart(e,u,r,s,a,i,o,n)):v.createFilter(u,d)}))},getValueFormat:function(e){return e%1?".2s":"s"},drawPlotlyIndicator:function(e,t,r,s,a,i,o,n){var l=0,d=0,h="number",c=this.getItemMetaById(n[0]).Format;d=t.size[0],2==t.size.length&&(l=t.size[0],d=t.size[1]),a.isComparison?(h="number+delta",2==t.size.length?(l=t.size[0],d=t.size[1]):2==t.children.length&&(d=t.children[1].size[0],l=t.children[0].size[0])):d=t.size[0];var u=c.indexOf("S")+1,p=!1;"%"!=c.substring(u,11)&&"%"!=c.charAt(u)||(p=!0);var m="";if("en_IN.UTF-8"==this.defaultCurrencyFormat){var g=formatSmallScale(d,c);d=g.substring(0,g.length-1),m=g[g.length-1]}var f={domain:{x:[0,1],y:[0,1]},value:d,type:"indicator",mode:h,number:p?{suffix:"%"}:{suffix:m}};a.isComparison&&(f["delta"]={reference:l,relative:!0,position:"top"}),"decr"==a.desiredValueTendency&&(f["delta"]["increasing"]={color:"red"},f["delta"]["decreasing"]={color:"green"});var y=[f],v={colorway:DEFAULT_COLORWAY,autosize:!0,margin:{t:0,b:0,l:0,r:0}};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,y,v,{displaylogo:!1,responsive:!0})},drawPlotlyWaterFallChart:function(e,t,r,s,a,i,o,n){var l,d,h=document.getElementById(e),c=t,u=[],p=0;function m(e){var t=new Array;for(l=0;l<c.children.length;l++)t.push(c.children[l].name);return t}function g(e){var t=new Array;for(d=0;d<c.children.length;d++)t.push(c.children[d].size[e]);return t}function f(e){var t="";return t=c.measName[e],t}c.parent&&c.parent;while(p<r)u[p]={orientation:"v",x:"h"==s.orientation?g(p):m(p),y:"h"==s.orientation?m(p):g(p),name:f(p),mode:s.mode,type:"waterfall",text:"h"==s.orientation?m(p).map(String):g(p).map(String),textposition:"outside",connector:{line:{color:"rgb(63, 63, 63)"}}},p++;var y={colorway:DEFAULT_COLORWAY,xaxis:{type:"category"},yaxis:{type:"linear"},autosize:!0,showlegend:a.showlegends};lib_custom_plotly_js__WEBPACK_IMPORTED_MODULE_0___default().newPlot(e,u,y,{displaylogo:!1,responsive:!0});var v=this;h.on("plotly_click",(function(t){var l,d="h"==s.orientation?t.points[0].y:t.points[0].x,h=c.children,u=new Array;for(l=0;l<h.length;l++)d==h[l].name&&(u=h[l]);"Filter"!=v.getSelectedDrillOrFilterVal||"analyze"!=v.$route.name?(u.children?v.drillLabels.push({text:u.name,depth:u.depth,node:u}):(v.$store.commit("setSnackbarStatus",!0),v.$store.commit("setSnackbarCode","INVALID_DIMENSIONS")),v.drawPlotlyWaterFallChart(e,u,r,s,a,i,o,n)):v.createFilter(u,d)}))},getRandomLightColorCodes:function(e){for(var t=[],r="ABCDEF".split(""),s=0;t.length<e;s++){for(var a="#",i=0;i<6;i++)a+=r[Math.floor(Math.random()*r.length)];t.includes(a)||t.push(a)}return t},leastSquare:function(e){for(var t=e.length,r=0,s=0,a=t*(t+1)/2,i=t*(t+1)*(2*t+1)/6,o=0;o<e.length;o++)s+=e[o],r+=(o+1)*e[o];var n=(t*r-a*s)/(t*i-a*a),l=(s-n*a)/t,d=1*n+l,h=n*t+l;return[d,h]},getMarkerSize:function(e){var t=[],r=Math.max.apply(Math,e),s=100,a=2;for(var i in e){var o=e[i]*s/r;t.push(Math.max(a,o))}return t},getMax(e){return Math.max(...e.map((e=>Array.isArray(e)?this.getMax(e):e)))},getMin(e){return Math.min(...e.map((e=>Array.isArray(e)?this.getMin(e):e)))},getMinMaxValuesOfArray(e,t,r){for(var s=[],a=0;a<e.length;a++)t==a&&"legendonly"==r[a].visible&&s.push(e[a].y),t!=a&&1==r[a].visible&&s.push(e[a].y);var i=this.getMin(s),o=this.getMax(s);return[i,o]},getTickTexts(e,t){for(var r=[],s=this.getItemMetaById(t).Format,a=0;a<e.length;a++)r.push(formatSmallScale(e[a],s,this.defaultCurrencyFormat));return r}}}},49038:function(e,t,r){function s(e){this.data=e}function a(){if(this)return data}function i(e){this.title=e}function o(){return title}function n(e){this.systitle=e}function l(){return systitle}function d(e){this.subtitle=e}function h(){return subtitle}function c(e){this.gtype=e}function u(){var e=this;return e.gtype}function p(e){this.height=e}function m(){return height}function g(e){this.width=e}function f(){return width}function y(e){this.layout=e}function v(){var e=this;return e.layout}function I(e){this.dimensions=e}function b(){var e=this;return e.dimensions}function _(e,t){void 0!=this.dimensions&&0!=this.dimensions.length||(this.dimensions=new Array),we(this.dimensions,e,t)}function D(e){xe(this.dimensions,e)}function C(e){this.dimmeta=e}function S(){var e=this;return e.dimmeta}function F(e,t){void 0!=this.dimmeta&&0!=this.dimmeta.length||(this.dimmeta=new Array),this.dimmeta.indexOf(e<0)&&(void 0!=t&&t>=0&&void 0!=this.dimmeta[t]?this.dimmeta.splice(t,0,e):this.dimmeta.push(e))}function w(e){if(void 0==this.dimmeta||0==this.dimmeta.length)return!1;var t=this.dimmeta.indexOf(e);return t>=0&&(this.dimmeta.splice(t,1),!0)}function x(e){this.measures=e}function T(){var e=this;return e.measures}function E(e,t){void 0!=this.measures&&0!=this.measures.length||(this.measures=new Array),we(this.measures,e,t)}function k(e){xe(this.measures,e)}function L(e){this.formats=e}function M(){return formats}function A(e,t){void 0!=this.formats&&0!=this.formats.length||(this.formats=new Array),we(this.formats,e,t)}function N(e){xe(this.formats,e)}function R(e){this.minmax=e}function O(){return minmax}function B(e,t){void 0!=this.minmax&&0!=this.minmax.length||(this.minmax=new Array),we(this.minmax,e,t)}function Z(e){xe(this.minmax,e)}function P(e){this.sortcolumn=e}function V(){var e=this;return e.sortcolumn}function U(e){this.topn=e}function $(){var e=this;return e.topn}function G(e){this.dimensionIds=e}function j(e){var t=this;return t.dimensionIds}function z(e,t){void 0!=this.dimensionIds&&0!=this.dimensionIds.length||(this.dimensionIds=new Array),this.dimensionIds.indexOf(e)<0&&(void 0!=t&&t>=0&&void 0!=this.dimensionIds[t]?this.dimensionIds.splice(t,0,e):this.dimensionIds.push(e))}function q(e){if(void 0==this.dimensionIds||0==this.dimensionIds.length)return!1;var t=this.dimensionIds.indexOf(e);return t>=0?(this.dimensionIds.splice(t,1),t):-1}function W(e){this.measureIds=e}function J(){var e=this;return e.measureIds}function H(e,t){void 0!=this.measureIds&&0!=this.measureIds.length||(this.measureIds=new Array),this.measureIds.indexOf(e)<0&&(void 0!=t&&t>=0&&void 0!=this.measureIds[t]?this.measureIds.splice(t,0,e):this.measureIds.push(e))}function K(e){if(void 0==this.measureIds||0==this.measureIds.length)return!1;var t=this.measureIds.indexOf(e);return t>=0&&(this.measureIds.splice(t,1),!0)}function Y(e){this.dimensionFilters=e instanceof Array?e:[e]}function X(){return"undefined"!=typeof this.dimensionFilters?this.dimensionFilters:[]}function Q(e,t){void 0!=this.dimensionFilters&&0!=this.dimensionFilters.length||(this.dimensionFilters=new Array),this.dimensionFilters.indexOf(e)<0&&(void 0!=t&&t>=0&&void 0!=this.dimensionFilters[t]?this.dimensionFilters.splice(t,0,e):this.dimensionFilters.push(e))}function ee(e){if(void 0==this.dimensionFilters||0==this.dimensionFilters.length)return!1;var t=this.dimensionFilters.indexOf(e);return t>=0&&(this.dimensionFilters.splice(t,1),!0)}function te(e){this.measureFilters=e instanceof Array?e:[e]}function re(){return"undefined"!=typeof this.measureFilters?this.measureFilters:[]}function se(e,t){void 0!=this.measureFilters&&0!=this.measureFilters.length||(this.measureFilters=new Array),this.measureFilters.indexOf(e<0)&&(void 0!=t&&t>=0&&void 0!=this.measureFilters[t]?this.measureFilters.splice(t,0,e):this.measureFilters.push(e))}function ae(e){if(void 0==this.measureFilters||0==this.measureFilters.length)return!1;var t=this.measureFilters.indexOf(e);return t>=0&&(this.measureFilters.splice(t,1),!0)}function ie(e){this.graphId=e}function oe(){return graphId}function ne(e){this.parentId=e}function le(){return parentId}function de(e){this.instance=e}function he(){return instance}function ce(e){this.properties=e}function ue(){return properties}function pe(e,t){if(void 0!=this.properties)for(var r=0;r<this.properties.length;r++)if(this.properties[r][0]==e)return void(this.properties[r][1]=t);var s=new Array;s[0]=new Array(2),s[0][0]=e,s[0][1]=t,void 0!=this.properties&&this.properties instanceof Array?this.properties.push(s[0]):this.properties=s}function me(e){for(var t=0;this.properties&&t<this.properties.length;t++)if(this.properties[t][0]==e)return this.properties[t][1];return""}function ge(e){this.description=e}function fe(){return description}function ye(e){this.note=e}function ve(){return note}function Ie(e){this.refresh=e}function be(){return refresh}function _e(e){this.category=e}function De(){return category}function Ce(e,t,r){var s=new Array;s[0]=new Array(3),s[0][0]=e,s[0][1]=t,s[0][2]=r,void 0!=this.reportPermission?this.reportPermission.push(s[0]):this.reportPermission=s}function Se(e){this.reportPermission=e}function Fe(){return reportPermission}function we(e,t,r){void 0!=e&&e instanceof Array||(e=new Array),e.indexOf(t<0)&&(void 0!=r&&r>=0&&void 0!=e[r]?e.splice(r,0,t):e.push(t))}function xe(e,t){if(void 0==e||0==e.length)return!1;var r=e.indexOf(t);return r>=0&&(e.splice(r,1),!0)}function Te(e){this.addDimensionIds(e.Id),this.addDimensions(e.Name),this.addDimMeta(e.Column)}function Ee(e){this.delDimensionIds(e.Id),this.delDimensions(e.Name),this.delDimMeta(e.Column),this.delMinMax(e.MinimumValue+":"+e.MaximumValue)}function ke(e){this.addMeasureIds(e.Id),this.addMeasures(e.Name),this.addFormats(e.Format),this.addMinMax(e.MinimumValue+":"+e.MaximumValue)}function Le(e){this.delMeasureIds(e.Id),this.delMeasures(e.Name),this.delFormats(e.Format),this.delMinmax(e.MinimumValue+":"+e.MaximumValue)}r.g.Report=function(e,t,r,we,xe,Me,Ae,Ne,Re,Oe,Be,Ze,Pe,Ve,Ue){this.data=e,this.title=t,this.gtype=r,this.height=we,this.width=xe,this.layout=Me,this.dimensions=Ae,this.dimmeta=Ne,this.measures=Re,this.formats=Oe,this.minmax=Be,this.systitle=Ze,this.subtitle=Pe,this.sortcolumn=Ve,this.topn=Ue,this.dimensionIds,this.measureIds,this.dimensionFilters,this.measureFilters,this.filterList,this.graphId,this.parentId,this.instance,this.description,this.note,this.expire,this.refresh,this.category,this.isdasboard,this.properties,this.reportPermission,this.dispObj={},this.compute=new computedColumnList,this.setdata=s,this.getdata=a,this.setsystitle=n,this.getsystitle=l,this.setsubtitle=d,this.getsubtitle=h,this.settitle=i,this.gettitle=o,this.setgtype=c,this.getgtype=u,this.setheight=p,this.getheight=m,this.setwidth=g,this.getwidth=f,this.setlayout=y,this.getlayout=v,this.setdimensions=I,this.getdimensions=b,this.addDimensions=_,this.delDimensions=D,this.setdimmeta=C,this.getdimmeta=S,this.addDimMeta=F,this.delDimMeta=w,this.setmeasures=x,this.getmeasures=T,this.addMeasures=E,this.delMeasures=k,this.setformats=L,this.getformats=M,this.addFormats=A,this.delFormats=N,this.setminmax=R,this.getminmax=O,this.addMinMax=B,this.delMinMax=Z,this.setsortcolumn=P,this.getsortcolumn=V,this.settopn=U,this.gettopn=$,this.setdimensionIds=G,this.getdimensionIds=j,this.addDimensionIds=z,this.delDimensionIds=q,this.setmeasureIds=W,this.getmeasureIds=J,this.addMeasureIds=H,this.delMeasureIds=K,this.setdimensionFilters=Y,this.getdimensionFilters=X,this.addDimensionFilters=Q,this.delDimensionFilters=ee,this.setmeasureFilters=te,this.getmeasureFilters=re,this.addMeasureFilters=se,this.delMeasureFilters=ae,this.addDimensionToReport=Te,this.deleteDimensionFromReport=Ee,this.addMeasureToReport=ke,this.deleteMeasureFromReport=Le,this.setgraphId=ie,this.getgraphId=oe,this.setparentId=ne,this.getparentId=le,this.setinstance=de,this.getinstance=he,this.setdescription=ge,this.getdescription=fe,this.setnote=ye,this.getnote=ve,this.setrefresh=Ie,this.getrefresh=be,this.setcategory=_e,this.getcategory=De,this.setproperties=ce,this.getproperties=ue,this.setPropsValue=pe,this.getPropsValue=me,this.setPermission=Ce,this.setReportPermission=Se,this.getReportPermission=Fe,this.deleteMeasureFromReport=Le}},50356:function(e,t,r){var s=r(56933);s.register([r(54727),r(7193),r(74476),r(74718),r(3931),r(40965),r(94199),r(11163),r(79717),r(5116)]),e.exports=s},24019:function(e,t,r){r.g.DefaultMeasureProps=class{constructor(){this.tracetype="",this.showmeasure=!0,this.showygridline=!1,this.showyzeroline=!1,this.showpointlabels=!1,this.textposition="",this.color=""}}},25229:function(e,t,r){r.g.getCookie=function(e){var t,r,s,a=document.cookie.split(";");for(t=0;t<a.length;t++)if(r=a[t].substr(0,a[t].indexOf("=")),s=a[t].substr(a[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==e)return unescape(s)},r.g.setCookie=function(e,t,r){var s=new Date;s.setDate(s.getDate()+r);var a=escape(t)+(null==r?"":"; expires="+s.toUTCString()+";path=/");document.cookie=e+"="+a},r.g.rand=function(){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",t=8,r="",s=0;s<t;s++){var a=Math.floor(Math.random()*e.length);r+=e.substring(a,a+1)}return r},r.g.xmlToJson=function e(t){var r={};if(1==t.nodeType){if(t.attributes.length>0){r["@attributes"]={};for(var s=0;s<t.attributes.length;s++){var a=t.attributes.item(s);r["@attributes"][a.nodeName]=decodeXML(a.nodeValue)}}}else 3==t.nodeType&&(r=t.nodeValue);if(t.hasChildNodes()&&1===t.childNodes.length&&3===t.childNodes[0].nodeType)r=decodeXML(t.childNodes[0].nodeValue);else if(t.hasChildNodes())for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes.item(i),n=o.nodeName;if("undefined"==typeof r[n])r[n]=e(o);else{if("undefined"==typeof r[n].push){var l=r[n];r[n]=[],r[n].push(l)}r[n].push(e(o))}}return 0==Object.keys(r).length&&(r=""),r},r.g.decodeXML=function(e){return e?e.replace(new RegExp(" ","g")," ").replace(new RegExp("&","g"),"&").replace(new RegExp(""","g"),'"').replace(new RegExp("'","g"),"'").replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">").replace(new RegExp("%","g"),"%"):e},r.g.getFormat=function(e){var t={currency:"u",unit:"1",prefix:"",suffix:"",prec:"",dec:".",Gsym:","};if("undefined"===typeof e||e.length<1)return t;var r=e.indexOf("c");r>=0&&(t.currency=e.substr(r+1,1));var s=e.indexOf("U");s>=0&&(t.unit=e.substr(s+1,1));var a=e.indexOf("p");a>=0&&(t.prec=e.substr(a+1,1));var i=e.indexOf("P");i>=0&&(t.prefix=e.substr(i+1,1));var o=e.indexOf("S");return o>=0&&(t.suffix=e.substr(o+1,1)),"e"==e.charAt(1)&&(t.Gsym=".",t.dec=","),t}},4836:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){function formatReportData(e,t){var r=["","Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],s=["","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],a=["","Qtr-1","Qtr-2","Qtr-3","Qtr-4"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=-1,n=-1,l=-1,d=-1,h=-1,c=-1,u=0,p=0,m=0,g=JSON.parse(JSON.stringify(e)),f=e.length,y=e[0].slice(0,t);for(y=y.map((function(e){return e.toLowerCase()})),u=0;u<t;u++)"month"==y[u]&&(o=u),"quarter"!=y[u]&&"finqtr"!=y[u]||(l=u),"finmth"!=y[u]&&"fin. month"!=y[u]||(n=u),"week"!=y[u]&&"finwk"!=y[u]||(d=u),"day of week"==y[u]&&(h=u),"yrmth"==y[u]&&(c=u);for(u=1;u<f;u++)if(o>-1&&parseInt(g[u][o])>0&&parseInt(g[u][o])<=12&&(g[u][o]=r[g[u][o]]),l>-1&&parseInt(g[u][l])>0&&parseInt(g[u][l])<=5&&(g[u][l]=a[g[u][l]]),n>-1&&parseInt(g[u][n])>0&&parseInt(g[u][n])<=12&&(g[u][n]=s[g[u][n]]),d>-1&&parseInt(g[u][d])>=0&&(g[u][d]="Week-"+g[u][d]),h>-1&&parseInt(g[u][h])>=0&&parseInt(g[u][h])<=7&&(g[u][h]=i[g[u][h]-1]),c>-1&&parseInt(g[u][c])>=0){var v=g[u][c].split("-");g[u][c]=v[0]+"-"+r[parseInt(v[1])]}for(u=1;u<f;u++)for(p=m;p<g[u].length;p++)""==g[u][p]&&(g[u][p]=0);return g}function sortReportData(e,t){e.sort((function(e,r){return r[t]-e[t]}))}function sortWeekData(e,t){if(!(e.length<2)){var r=+e[1][t].split("-")[1],s=2,a=!1,i=12,o=0;for(s=2;s<e.length;s++)if(+e[s][t].split("-")[1]!=r)if(+e[s][t].split("-")[1]==r+1)r=+e[s][t].split("-")[1];else{if(o=+e[s][t].split("-")[1]-r,o>=i){a=!0;break}r=+e[s][t].split("-")[1]}if(a){var n=e.splice(1,s-1);for(s=0;s<n.length;s++)e.push(n[s])}}}function isWeekColumn(e){return e=e.toLowerCase(),"week"==e||"finwk"==e}function isTimeColumn(e){return e=e.toLowerCase(),"year"==e||"month"==e||"fin. month"==e||"finmth"==e||"quarter"==e||"finqtr"==e||"week"==e||"finwk"==e||"finmth"==e||"finyr"==e||"dayofweek"==e||"day"==e||"date"==e||"hour"==e}function resolveComputeMeasure(json,Measures){for(var i=0;Measures&&i<Measures.length;i++)if(Measures[i].formula&&"NA"!=Measures[i].formula){var c=json;c.name=String(c.name),eval(Measures[i].formula),resolveFormula(json,Measures[i].formula)}}function addMeasureColumn(e,t){var r=createItemList(t),s=e.getmeasureIds(),a="";e.dispObj.RDsetGeneral(),e.dispObj.RD.General["Measures"]=new Array;for(var i=0;i<s.length&&s[i]>1e4;i++){var o=new Array;a=r.getItemById(s[i]);var n={};if(""==a.AggFunction&&(a.Column.toLowerCase().indexOf("avg")>=0?a.AggFunction="avg":a.Column.toLowerCase().indexOf("min")>=0?a.AggFunction="min":a.Column.toLowerCase().indexOf("max")>=0?a.AggFunction="max":a.AggFunction="sum"),a.Description&&-1!==a.Description.indexOf("avg")&&(a.AggFunction="avg"),n.agg=a.AggFunction,n.formula="NA",a.Column&&a.Column.indexOf("[")>=0&&a.Column.indexOf("]")>=0){for(var l=a.Column.split("]"),d=0;d<l.length;d++){var h=l[d].split("[");2==h.length&&o.push(h[1])}var c=returnFunction(a.Column,s,o);"NA"!=c&&(n.formula="c.size["+i+"]="+c+";if(!isFinite(c.size["+i+"])) c.size["+i+"]=0;")}e.dispObj.RD.General.Measures.push(n)}}function appendToTreeNew(e,t,r,s,a,i,o,n,l,d){for(var h=e,c=new Array(s),u=0;u<r;u++){var p=0,m=0;for(m=0;h["children"]&&m<h["children"].length;m++)if(h["children"][m]["name"]==t[i][u]){p=1;break}if(1==p)h=h["children"][m];else{var g={};for(j=0;j<s;j++){c[j]=new Array;for(var f=0;f<t.length;f++){for(var y=1,v=0;v<=u;v++)t[f][v]!=t[i][v]&&(y=0);1==y&&c[j].push(parseFloat(t[f][r+j]))}}for(g["name"]=t[i][u],g["dimName"]=t[0][u],g["dimId"]=d[u],g["measName"]=new Array(s),g["measId"]=new Array(s),g["size"]=new Array(s),g["percent"]=new Array(s),g["percentOfTotal"]=new Array(s),j=0;j<s;j++){var I=+returnValByAggFunc(c[j],n[j]);g["percentOfTotal"][j]=(100*I/o[j]).toFixed(2)+"%",g["percent"][j]=(100*I/h["size"][j]).toFixed(2)+"%",g["measName"][j]=t[0][r+j],g["measId"][j]=l[j],g["size"][j]=+I.toFixed(2)}g["measFormat"]=a,h["children"]||(h["children"]=new Array),h["children"].push(g),h=g}}}function returnValByAggFunc(e,t){var r=0,s=String(t).toLowerCase();if("sum"==s||"avg"==s){for(var a=0;a<e.length;a++)r+=+e[a];"avg"==s&&(r/=e.length)}else if("max"==s){r=e[0];for(a=1;a<e.length;a++)r<e[a]&&(r=e[a])}else if("min"==s){r=e[0];for(a=1;a<e.length;a++)r>e[a]&&(r=e[a])}else for(a=0;a<e.length;a++)r+=+e[a];return r}__webpack_require__.g.makeJsonFromArrayNew=function(e,t,r,s,a,i,o){e=formatReportData(e,t);var n={},l=rand();console.log((new Date).getTime()+" : Start preparing tree for "+e.length+" rows, "+e[0].length+" columns , rdn="+l),n["name"]="All",n["dimName"]=e[0][0],n["dimId"]=o.length?o[0]:"0",n["measName"]=new Array(r),n["measId"]=new Array(r),n["size"]=new Array(r),n["percent"]=new Array(r),n["percentOfTotal"]=new Array(r),n["measFormat"]=s,n["children"]=new Array;var d=0,h=0,c=new Array,u=a.RD.General.Measures;if(u&&u.length>0){for(d=0;u&&d<u.length;d++)c.push(u[d].AggFunction);for(d=u.length;d<r;d++)e[0][t+d].indexOf("(%)")>0?c.push("avg"):c.push(u[0].AggFunction)}else for(d=0;d<r;d++)c.push("sum");var p=new Array(r),m=new Array;for(h=0;h<r;h++){for(n["measName"][h]=e[0][e[0].length-(r-h)],n["measId"][h]=i[h],p[h]=new Array,d=1;d<e.length;d++)p[h].push(parseFloat(e[d][t+h]));m[h]=+returnValByAggFunc(p[h],c[h]).toFixed(2),n["size"][h]=m[h],n["percent"][h]="100%",n["percentOfTotal"][h]="100%"}for(d=1;d<e.length;d++)appendToTreeNew(n,e,t,r,s,d,m,c,i,o);return console.log((new Date).getTime()+" : End preparing tree, rdn="+l),n}},24784:function(e,t,r){function s(e,t){for(var r=t.map((function(t){return t.slice(0,e.length)})),s=0,i=0;i<r.length;i++)a(e,r[i])&&s++;return s}function a(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}function i(e,t){var r=[];r.push(t[0].slice(0,e.length));for(var s=1;s<t.length;s++){for(var i=!1,o=0;o<r.length&&!i;o++)i=a(t[s].slice(0,e.length),r[o]);i||r.push(t[s].slice(0,e.length))}return r}function o(e){for(var t=[],r=0;r<e.length;++r)n(t,e[r])||t.push(e[r]);return t}function n(e,t){for(var r=0;r<e.length;r++)if(a(e[r],t))return!0;return!1}function l(e,t){for(var r=[],s=0;s<e.length;s++){for(var a=s!=e.length-1?1:t,i=[],o=a;o<e[s].length;o++)for(var n=e[s][o].colspan,l=e[s][o].value,d=0;d<n;d++)i.push(l);r.push(i)}return r}function d(e,t,r,s,i,o){for(var n=e.pop(),l=o.indexOf(n),d=0;d<t.length;d++)if(a(e,t[d].slice(0,r+s-i)))return t[d][r+s-i+l];return 0}function h(e){for(var t=new Array,r=0;r<e[0].length;r++){for(var s=new Array,a=0;a<e.length;a++)s.push(e[a][r]);t.push(s)}return t}r.g.makeParentsJson=function(e,t){var r=d3.layout.hierarchy().sort(null).value((function(e){return+e.size[t-1]}));r(e)},r.g.arrToObject=function(e){for(var t=e[0],r=e.slice(1,e.length),s=[],a=r,i=t,o=i.length,n=0;n<a.length;n++){for(var l=a[n],d={},h=0;h<o;h++)d[i[h]]=l[h];s.push(d)}return s},r.g.arrayToJson=function(e,t){for(var r=new Array,s=0;s<e.length;s++){var a=new Object;t&&(a.itemId=t[s]),a.text=e[s],a.value=e[s],r.push(a)}return r},r.g.getHeader=function(e,t,r,a,n,l,d,h,c,u,p,m){var g=e;p=l.length;for(var f="",y=[],v=0;v<d.length;v++)d[v]<1e4?f=d[v]:y.push(d[v]);m=getOptedItemData(f,g.dimensionTree),t.sort((function(e,t){if("date"==m.DataType.toLowerCase()||"number"==m.DataType.toLowerCase())return new Date(e[p])-new Date(t[p]);if("char"==m.DataType.toLowerCase()||"string"==m.DataType.toLowerCase()){if(e[p]<t[p])return-1;if(e[p]>t[p])return 1}}));var I=[],b=t.map((function(e){return e.slice(r,r+a-n)})),_=o(b),D=[];for(v=0;v<d.length;v++)+d[v]<1e4&&D.push(h[v]);for(v=0;v<D.length;v++){var C=[],S=new Object;S.value=D[v],S.colspan=r,S.itemId=m.Id,S.text=D[v],C.push(S);for(var F=i(D.slice(0,v+1),b),w=0;w<F.length;w++){var x=s(F[w],_);S=new Object;S.value=F[w][F[w].length-1],S.colspan=x*n,m&&(S.itemId=m.Id),S.text=F[w][F[w].length-1],C.push(S)}I.push(C)}for(var T=I[I.length-1].length-1,E=(C=[],0);E<r;E++){S=new Object;S.itemId=l[E],S.value=c[E],S.colspan=1,C.push(S)}if(0==r){S=new Object;S.itemId=0,S.value="",S.colspan=0,C.push(S)}for(v=0;v<T;v++)for(w=0;w<n;w++){S=new Object;S.itemId=y[w],S.value=u[w],S.colspan=1,C.push(S)}return I.push(C),I},r.g.getAllValues=function(e,t,r,s,a,i,n){n&&t.sort((function(e,t){if("date"==n.DataType.toLowerCase()||"number"==n.DataType.toLowerCase())return new Date(e[0])-new Date(t[0]);if("char"==n.DataType.toLowerCase()||"string"==n.DataType.toLowerCase()){if(e[0]<t[0])return-1;if(e[0]>t[0])return 1}}));var c=[],u=t.map((function(e){return e.slice(0,r)}));u=o(u);for(var p=l(e,r),m=h(p),g=0;g<u.length;g++){var f=new Array;f=f.concat(u[g]);for(var y=0;y<m.length;y++){var v=u[g].concat(m[y]),I=d(v,t,r,s,a,i);f.push(I)}c.push(f)}return c},r.g.getOptedItemData=function(e,t){for(var r=0;r<t.length;r++)for(var s=0;s<t[r].items.length;s++)if(e==t[r].items[s].Id)return t[r].items[s];return null}},74270:function(e,t,r){function s(e,t,r){var s=",",i=".",o=0,n="",d="";return"undefined"==typeof t&&(t=l()),t&&"e"==t.currency&&(s=".",i=","),t&&t.suffix?d=t.suffix:"en_IN.UTF-8"==r?Math.abs(e)>=1e7?(e/=1e7,d="Cr",o=2):Math.abs(e)>=1e5?(e/=1e5,d="L",o=2):Math.abs(e)>=1e3&&(e/=1e3,d="K",o=1):Math.abs(e)>=1e12?(e/=1e12,d="T",o=2):Math.abs(e)>=1e9?(e/=1e9,d="B",o=2):Math.abs(e)>=1e6?(e/=1e6,d="M",o=1):Math.abs(e)>=1e3?(e/=1e3,d="K",o=1):Math.abs(e)<5&&(o=Number.isInteger(e)?0:1),""!=t.prefix&&(n=t.prefix),a(e,n,d,o,i,s)}function a(e,t,r,s,a,i){var o=e,n=(s=isNaN(s=Math.abs(s))?2:s,a=void 0==a?",":a,i=void 0==i?".":i,o<0?"-":""),l=parseInt(o=Math.abs(+o||0).toFixed(s))+"",d=(d=l.length)>3?d%3:0,h=d?l.substr(0,d)+i:"",c=l.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+i),u=s?a+Math.abs(o-l).toFixed(s).slice(2):"";return 0==parseFloat(u)&&(u=""),t+n+h+c+u+r}function i(e,t,r,s,a,i){var o=e,n=(s=isNaN(s=Math.abs(s))?2:s,a=void 0==a?",":a,i=void 0==i?".":i,o<0?"-":""),l=parseInt(o=Math.abs(+o||0).toFixed(s))+"",d=l.substring(l.length-3),h=l.substring(0,l.length-3).replace(/\B(?=(\d{2})+(?!\d))/g,i),c=s?a+Math.abs(o-l).toFixed(s).slice(2):"";return t+n+h+(h.length>0?i:"")+d+c+r}function o(e){if(0==e)return 0;var t=parseInt(e,10),r=Math.floor(t/86400),s=Math.floor((t-86400*r)/3600),a=Math.floor((t-86400*r-3600*s)/60),i=t-86400*r-3600*s-60*a;return r>0?r+=r>1?" Days ":" Day ":r="",s>0?s+=s>1?" Hours ":" Hour ":s="",a>0?a+=a>1?" Minutes ":" Minute ":a="",i>0?i+=i>1?" Seconds":" Second":i="",r||(s||(a||r+""+s+a+i))}function n(e){var t=parseInt(e,10),r=Math.floor(t/86400),s=Math.floor((t-86400*r)/3600),a=Math.floor((t-86400*r-3600*s)/60),i=t-86400*r-3600*s-60*a;r>0?r+=r>1?" Days ":" Day ":r="",s<10&&(s="0"+s),a<10&&(a="0"+a),i<10&&(i="0"+i);var o=r+""+s+":"+a+":"+i;return o}function l(e){var t={currency:"u",unit:"1",prefix:"",suffix:"",prec:"",dec:".",Gsym:","};if("undefined"===typeof e||e.length<1)return t;var r=e.indexOf("c");r>=0&&(t.currency=e.substr(r+1,1));var s=e.indexOf("U");s>=0&&(t.unit=e.substr(s+1,1));var a=e.indexOf("p");a>=0&&(t.prec=e.substr(a+1,1));var i=e.indexOf("P");i>=0&&(t.prefix=e.substr(i+1,1));var o=e.indexOf("S");return o>=0&&(t.suffix=e.substr(o+1,1)),"e"==e.charAt(1)&&(t.Gsym=".",t.dec=","),t}function d(e,t,r,d){var h=l(t);return r||2==h.unit?t&&"t"==t.charAt(1)?o(e):s(e,h,d):t&&"t"==t.charAt(1)?n(e):"i"==h.currency?i(e,h.prefix,h.suffix,h.prec,h.dec,h.Gsym):a(e,h.prefix,h.suffix,h.prec,h.dec,h.Gsym)}r.g.formatSmallScale=function(e,t,r="en_US.UTF-8"){return String(d(e,t,1,r)).replace(" Days","D").replace(" Day","D").replace(" Hours","H").replace(" Hour","H").replace(" Minutes","M").replace(" Minute","M").replace(" Seconds","S").replace(" Second","S")},r.g.getNticks=function(e,t){var r=Math.max(Math.floor((e-t)/20),2);return r>10&&(r=10),r},r.g.nicenum=function(e,t){var r=Math.floor(Math.log(e)/Math.LN10),s=e/Math.pow(10,r);return nf=t?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,nf*Math.pow(10,r)},r.g.getTickValues=function(e,t,r){for(var s=nicenum(t-e,!1),a=nicenum(s/(r-1),!0),i=Math.floor(e/a)*a,o=Math.ceil(t/a)*a,n=(Math.max(-Math.floor(Math.log(a)/Math.LN10),0),new Array),l=i;l<o+.5*a;l+=a)n.push(l);return n}},13397:function(e,t,r){"use strict";r(8556),r(49038),r(4836),r(24784),r(74270),r(24019),r(25229);var s=r(3032),a=r(31858),i=r(40998),o=r(60266),n=r(69256),l=r(29592),d=r(11713),h=function(){var e=this,t=e._self._c;return t(i.Z,[t("cub-error",{attrs:{cubErrorAlertType:e.errorType,cubErrorMessage:e.errorMessage},model:{value:e.isError,callback:function(t){e.isError=t},expression:"isError"}}),t("cub-snackbar",{attrs:{snackbarAlertType:e.snackbarType,snackbarMessage:e.snackbarMessage},model:{value:e.isSnackbar,callback:function(t){e.isSnackbar=t},expression:"isSnackbar"}}),e.getWSLoading?t(n.Z,{staticStyle:{height:"100vh"}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v(" "+e._s(e.isWSError?"Something went wrong. Kindly contact system administrator.":"Fetching metadata")+" "),t("div",[t("b",[e._v(e._s(e.isWSError?e.wsErrorMessage:""))])])]),e.isWSError?e._e():t(o.Z,{attrs:{cols:"6"}},[t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1)],1)],1):t("router-view")],1)},c=[],u=r(83694),p=r(64562),m=r(34145),g=r(54886),f=r(34061),y=r(13687),v=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"","max-width":"500"},model:{value:e.isCubError,callback:function(t){e.isCubError=t},expression:"isCubError"}},[t(m.Z,[t(u.Z,{staticClass:"headline",attrs:{type:e.cubErrorAlertType,value:!0}},[t("span",[e._v(e._s(e.cubErrorMessage))])]),t(g.h7,[t(y.Z),t(p.Z,{attrs:{color:"green darken-1",text:""},on:{click:function(t){return e.resetErrorDialog()}}},[e._v("OK")])],1)],1)],1)},I=[],b={name:"cub-error",props:["isCubError","cubErrorAlertType","cubErrorMessage"],model:{prop:"isCubError",event:"isCubError"},created(){},methods:{resetErrorDialog(){this.$store.commit("setErrorStatus",!1)}}},_=b,D=r(1001),C=(0,D.Z)(_,v,I,!1,null,null,null),S=C.exports,F=r(63822),w=r(89258),x=function(){var e=this,t=e._self._c;return t(w.Z,{attrs:{color:this.snackbarAlertType,top:"",timeout:e.timeout},model:{value:e.isSnackbarInternal,callback:function(t){e.isSnackbarInternal=t},expression:"isSnackbarInternal"}},[e._v(e._s(e.snackbarMessage)+" ")])},T=[],E={name:"cub-snackbar",props:["isSnackbar","snackbarAlertType","snackbarMessage"],model:{prop:"isSnackbar",event:"isSnackbar"},data(){return{timeout:2e3}},created(){},methods:{},computed:{isSnackbarInternal:{get(){return this.isSnackbar},set(e){this.$store.commit("setSnackbarStatus",e)}}}},k=E,M=(0,D.Z)(k,x,T,!1,null,null,null),A=M.exports,N={name:"app",data(){return{}},computed:{...(0,F.Se)(["getWSLoading","getServiceLoadingCount","isError","errorMessage","errorType","isSnackbar","snackbarType","snackbarMessage","wsErrorMessage"]),isWSError(){return this.$store.state.isWSError}},components:{"cub-error":S,"cub-snackbar":A}},R=N,O=(0,D.Z)(R,h,c,!1,null,null,null),B=O.exports,Z=r(55727),P=r(56265),V=r.n(P),U={convertFlatToHierarchialJSON(e){for(var t={},r=0;r<e.length;r++)e[r].children=[],t[e[r].Id]=e[r];var s=new Object;s.children=[];for(r=0;r<e.length;r++)if(e[r].ParentId){var a=t[e[r].ParentId];a?(a.children||(a.children=[]),a.children.push(e[r])):s.children.push(e[r])}return s},get_ElementsByTagNameNS(e,t,r){if(null==t||t.length<1)return"";var s="";return s=t.getElementsByTagNameNS?t.getElementsByTagNameNS(e,r):t.getElementsByTagName("n:"+r),s},getTagValue(e,t){var r="http://www.robustdesigns.com/services/cubotsvc",s="",a=this.get_ElementsByTagNameNS(r,e,t);if(a.length<1)return"";if(a[0].childNodes[0]){for(var i=0;i<a[0].childNodes.length;i++)s+=a[0].childNodes[i].nodeValue;return"NO-DATA-FOUND"!=s?s:""}return""},hexToSymbol(e){return e?e.replace(new RegExp("%2B","g"),"+"):e},symbolToHex(e){return e?e.replace(/\+/g,"%2B"):e},decodeXML(e){return e?e.replace("%%","%").replace(new RegExp(" ","g")," ").replace(new RegExp(" ","g")," ").replace(new RegExp("&","g"),"&").replace(new RegExp(""","g"),'"').replace(new RegExp("'","g"),"'").replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">").replace(new RegExp("%","g"),"%"):e},xmlEscape(e){return e?e.replace(new RegExp("%","g"),"%%").replace(new RegExp("&","g"),"&").replace(new RegExp('"',"g"),""").replace(new RegExp("'","g"),"'").replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">"):e},filterStringToArray(e,t=0){if(!e)return[];var r=[];if(t){var s={FilterItemId:"",FilterOper:""};s["FilterValues"]=e,s["isNormalFilter"]=!1,r.push(s)}else{var a=e.split(/[\[\]]/);a=a.filter(Boolean);for(var i=0;i<a.length;i++){s={};var o=a[i].split(/\)(.+)/),n=o[0].split("(")[1];"A"==n.split("-")[0]&&(n=n.split("-")[1]),s["FilterItemId"]=o[0].split("(")[0],s["FilterOper"]=n,s["FilterValues"]=o[1].split(this.CUB_FILTER_DELIM),s["isNormalFilter"]=!0,r.push(s)}}return r},generateFilterQuery(e){for(var t={dimensionFilterList:"",measureFilterList:"",filterLogic:""},r=0;r<e.length;r++)e[r].isNormalFilter?e[r].FilterItemId<1e4?(t.dimensionFilterList+="["+e[r].FilterItemId+"("+e[r].FilterOper+")",Array.isArray(e[r].FilterValues)?t.dimensionFilterList+=e[r].FilterValues.join(this.CUB_FILTER_DELIM):t.dimensionFilterList+=e[r].FilterValues,t.dimensionFilterList+="]"):(t.measureFilterList+="["+e[r].FilterItemId+"("+e[r].FilterOper+")",Array.isArray(e[r].FilterValues)?t.measureFilterList+=e[r].FilterValues.join(this.CUB_FILTER_DELIM):t.measureFilterList+=e[r].FilterValues,t.measureFilterList+="]"):t.filterLogic=e[r].FilterValues;return t},createItemList(e){var t=new G;e=e.sort((function(e,t){return e[1]-t[1]}));for(var r=[],s=0;s<e.length;s++)0!=e[s][2]&&1e4!=e[s][2]&&5e4!=e[s][2]&&(0==e[s][1]?(t.dimensionTree.push(new q(e[s])),t.dimensionTree[t.dimensionTree.length-1].items=new Array):1e4==e[s][1]&&e[s][2]<2e4?(t.measureTree.push(new q(e[s])),t.measureTree[t.measureTree.length-1].items=new Array):r.push(new q(e[s])));for(s=0;s<r.length;s++)if(r[s].Id<1e4)for(var a=0;a<t.dimensionTree.length;a++)r[s].ParentId==t.dimensionTree[a].Id&&t.dimensionTree[a].items.push(r[s]);else if(r[s].Id<2e4)for(a=0;a<t.measureTree.length;a++)r[s].ParentId==t.measureTree[a].Id&&t.measureTree[a].items.push(r[s]);return t}};function G(){this.dimensionTree=new Array,this.measureTree=new Array,this.myMeasureTree=new Array,this.targetTree=new Array,this.getItemNameById=j,this.getItemById=z}function j(e){var t=null;t=e<1e4?this.dimensionTree:e>1e4&&e<2e4?this.measureTree:e>2e4&&e<5e4?this.myMeasureTree:this.targetTree;for(var r=0;r<t.length;r++){if(t[r].Id==e)return t[r].Name;for(var s=0;s<t[r].items.length;s++)if(t[r].items[s].Id==e)return t[r].items[s].Name}t=this.myMeasureTree;for(r=0;r<t.length;r++){if(t[r].Id==e)return t[r].Name;for(s=0;s<t[r].items.length;s++)if(t[r].items[s].Id==e)return t[r].items[s].Name}}function z(e){var t=null;t=e<1e4?this.dimensionTree:e>1e4&&e<2e4?this.measureTree:e>2e4&&e<5e4?this.myMeasureTree:this.targetTree;for(var r=0;r<t.length;r++){if(t[r].Id==e)return t[r];for(var s=0;t[r].items&&s<t[r].items.length;s++)if(t[r].items[s].Id==e)return t[r].items[s]}t=this.myMeasureTree;for(r=0;r<t.length;r++){if(t[r].Id==e)return t[r];for(s=0;s<t[r].items.length;s++)if(t[r].items[s].Id==e)return t[r].items[s]}return t}function q(e){this.Group=e[0],this.ParentId=e[1],this.Id=e[2],this.Name=e[3],this.Table=e[4],this.Column=e[5],this.AggFunction=e[6],this.WhereClause1=e[7],this.WhereClause2=e[8],this.WhereClause3=e[9],this.IsFloorTgt=e[10],this.TimeColumn=e[11],this.Description=e[12],this.GroupParentId=e[13],this.HavingClause=e[14],this.Attributes=e[15],this.Format=e[16],this.DataType=e[17],this.DataSubType=e[18],this.DataPrefix=e[19],this.DataSuffix=e[20],this.JoinTable=e[21],this.MinimumValue=e[22],this.MaximumValue=e[23],this.items}var W=r(74806);s["default"].use(F.ZP);const J=()=>({METADATA_RETRY_NUM:0,REPORTLIST_RETRY_NUM:0,defaultPageAfterLogin:"/home/analyze",serviceLoadingCount:0,availableInstances:["Default","partner_perf"],isError:!1,errorCode:"DEFAULT",appStatus:"INACTIVE",errorDict:{CROSSTAB_GRAPH_ERROR:"Need atleast two dimensions for a pivot graph",MANDATORY_DATE_FILTER:"Filter on date dimension is mandatory for",INVALID_GRAPHTYPE:"Graph Type Not Supported",INVALID_MD:"No relation between",MAX_CF_LIMIT_REACHED:"Cannot select more than one complex filter",NO_PROPER_ITEM_SELECTION:"Please select a measure along with dimension or filter to view details.",DETAILS_DOWNLOAD_MSG:"Download request has been placed. Will be downloaded automatically.",CUBOT_AUTH_ERROR:"Your session is expired. Please login again.",PIVOT_LIMIT_REACHED:"Not more than one pivot level is allowed",DIM_LIMIT_REACHED:"Cannot select more than 7 dimensions",NO_MEASURE:"Please select atleast one measure.",NO_FILTER:"Please select atleast one filter",NO_META_ITEM:"Please select atleast one item.",NEITHER_DIM_NOR_FILTER:"Please select a dimension or filter.",SESSION_EXPIRED:"Your session has been expired. Login to continue.",DEFAULT:"Something went wrong. Try again after sometime.",METADATA_LIMIT_EXCEEDED:"Sorry, Can't select more than {} items",NODATA_TO_EXPORT:"Please generate report before export.","NO-DATA":"No Data Found"},wsErrorCode:"DEFAULT",wsErrorDict:{DEFAULT:"Something went wrong. Kindly check with Admin",ITEMLIST:"Unable to fetch item list.",DETAILS:"Unable to fetch details.",REPORTLIST:"Unable to fetch report list"},metaData:[],reportNameList:[],instanceName:"",isWSError:!1,tableJoins:{},errorDim:"",errorMeas:"",updatedReports:[],folderCategories:[{categoryId:102,categoryName:"Cases"}],isSnackbar:!1,snackbarCode:"DEFAULT",snackbarDict:{SAVE_QUERY_SUCCESS:"Query Saved Successfully",DELETE_QUERY_SUCCESS:"Query deleted Successfully",SAVE_FILTER_FAILURE:"Unable to save the filter",DELETE_FILTER_FAILURE:"Unable to delete the filter",DELETE_FILTER_SUCCESS:"Filter deleted successfully",SAVE_FILTER_SUCCESS:"Filter saved successfully",DELETE_NOTIFY_SUCCESS:"E-mail schedule deleted successfully","E-mail_SUCCESS":"E-mail sent successfully.","E-mail_FAIL":"E-mail sent failed",DASH_SHARE_FAILED:"Dashboard share unsuccessful.",DASH_SHARE_SUCCESS:"Dashboard share info updated successfully.",NO_DASH_SELECTED:"Select atleast one dashboard.",REPORT_DELETE:"Report deleted successfully",DASH_SUCCESS:"Dashboard Saved Successfully.",REPORT_SUCCESS:"Report Saved Successfully...",REPORT_FAILED:"Report Save Failed...",REPORT_TITLE:"Please provide a title to save the report...",DUPLICATE_TITLE:"Report with same name is already available.",INVALID_CREDENTIALS:"Invalid user name and password.",INVALID_DIMENSIONS:"No Further Dimensions..."},authToken:"",rdNS:"http://www.robustdesigns.com/services/cubotsvc",accessList:["Analyze","View Details","Dashboard","Reports","Query"],itemList:"",loading:0,reportToDetails:0,sharedDashboardReports:[],sharedDashboardList:[],sharedDashboardContent:{},graphProperties:[],reportList:[],userId:"",userName:"",connId:"",selectedDrillOrFilter:"Drill",REGEN_START_TIME:-1,REGEN_END_TIME:-1,standardFilters:["146","184","187","1101","182","205","203"],dependencyFilters:{205:["203"],187:["1101"]},selectedDashFilters:{},selectedReports:[],defaultCurrency:"NON-INDIAN",dimensionSortOrderDict:{},selectedItems:{selectedRows:[],selectedColumns:[],selectedDimensions:[],selectedMeasures:[]},componentKey:"1",pageId:"",sessionFilterId:1e6,detailsMeasureId:"",selectedDashFilters:{},sessionFilters:[],permanentFilters:[],permanentCmplxFilters:[],selectedFilters:[],checkedFilters:[],standardFilterArray:[],sessionFiltersChecked:{},filterId:"",dashId:"",isDashPageChanged:!1,isNormalFilter:!0,folderList:[],userList:[],groupList:[],dashboardCollection:[],selectedMyDashFilters:{},dashPageDetails:{},selectedMetadata:[],sharedDashboardInfo:{},menuItems:{},notifyList:[],mapCoords:{},informationSchema:{},savedInstances:"",defaultMapCoords:{AHMEDABAD:[23.0395677,72.56600449999996],BANGALORE:[12.9715987,77.59456269999998],BHUBANESHWAR:[20.2960587,85.82453980000003],CHANDIGARH:[30.733315,76.779418],CHENNAI:[13.0524139,80.25082459999999],COIMBATORE:[11.004556,76.961632],ERNAKULAM:[11.004556,77.961632],NA:[11.004556,79.961632],GOA:[15.496777,73.827827],GUWAHATI:[26.147129,91.73555110000007],HYDERABAD:[17.385044,78.486671],INDORE:[22.7195687,75.85772580000003],JAIPUR:[26.9124165,75.78728790000002],KANPUR:[26.449923,80.3318736],KOLKATA:[22.572646,88.36389499999996],LUCKNOW:[26.8465108,80.94668320000005],MANGALORE:[12.9141417,74.85595680000006],MUMBAI:[19.0759837,72.87765590000004],NAGPUR:[21.1458004,79.08815460000005],NASIK:[19.9974533,73.78980230000002],"NEW DELHI":[28.635308,77.22496000000001],PATNA:[25.61046,85.14166699999998],PUNE:[18.5204303,73.85674369999992],RAIPUR:[21.2513844,81.6296413],RAJKOT:[22.3038945,70.80215989999999],RANCHI:[23.3440997,85.30956200000003],SURAT:[21.195,72.81944399999998],VARANASI:[25.3176452,82.97391440000001]},isWSLoading:!1,userSettings:{},detailedReportList:[],dashCollectionInfo:{},db_id:1});var H=new F.ZP.Store({state:J(),getters:{getConnId:e=>e.connId,getWSLoading:e=>e.isWSLoading,getUserId:e=>e.userId,getCubotDateFormat:e=>{var t=e.userSettings["51"];return t||(t="%Y-%m-%d"),t},getInformationSchemaDbData:e=>{var t="db"+e.db_id;return t in e.informationSchema?e.informationSchema[t]:[]},getETLStartTime:e=>e.userSettings["5"],getETLEndTime:e=>e.userSettings["6"],getRegenStartTime:e=>e.userSettings["2"],getRegenEndTime:e=>e.userSettings["3"],getRegenStatus:e=>Object.keys(e.userSettings).includes("5")||Object.keys(e.userSettings).includes("6")?1==+e.userSettings["5"]||1==+e.userSettings["6"]?"INVALID":e.userSettings["5"]>e.userSettings["6"]?"INPROGRESS":"COMPLETED":"INVALID",enableRowClickFunctionality:e=>{var t=e.userSettings["125"];return t||(t="N"),t},showSerialNumInDT:e=>{var t=e.userSettings["126"];return t||(t="Y"),t},defaultCurrencyFormat:e=>e.userSettings["64"],finMonthNames:e=>{var t=e.userSettings["110"];return t=t?JSON.parse(t):["APR","MAY","JUNE","JULY","AUG","SEP","OCT","NOV","DEC","JAN","FEB","MAR"],t},getDataAsOf:e=>{var t=e.userSettings["100"];return t||(t=0),t},getDetailsMeasureId:e=>e.detailsMeasureId,getSelectedDrillOrFilterVal:e=>e.selectedDrillOrFilter,isWSError:e=>e.isWSError,getInstanceName:e=>e.instanceName,getAccessList:e=>e.accessList,getDetailsMetaNameById:e=>t=>{for(var r=0;r<e.metaData.length;r++)for(var s=0;s<e.metaData[r].items.length;s++)if(t==e.metaData[r].items[s].itemId)return e.metaData[r].items[s].itemName;return""},isReportNameused:e=>t=>!!e.reportNameList.includes(t),getDefaultPageAfterLogin:e=>e.defaultPageAfterLogin,getNotifyById:e=>t=>{for(var r=0;r<e.notifyList.length;r++)if(t==e.notifyList[r].NotifyId)return e.notifyList[r];return{}},getNotifyListByReportId:e=>t=>{for(var r=[],s=0;s<e.notifyList.length;s++)t==e.notifyList[s].ReportId&&r.push(e.notifyList[s]);return r},getUserNameById:e=>t=>{for(var r=0;r<e.userList.length;r++){var s=e.userList[r].split(":");if(s[0]==t)return s[1]}},getGroupNameById:e=>t=>{for(var r=0;r<e.groupList.length;r++){var s=e.groupList[r].split(":");if(s[0]==t)return s[1]}},reportCategories:e=>e.folderCategories,getServiceLoadingCount:e=>e.serviceLoadingCount,getMetadataItems:e=>e.metaData,getTableJoins:e=>e.tableJoins,isSharedDashboard:e=>t=>!(t in e.dashPageDetails)&&t in e.sharedDashboardContent,getSharedDashboardInfo:e=>t=>t in e.sharedDashboardInfo?e.sharedDashboardInfo[t]:[],getDashboardSharedBy:e=>t=>{for(var r=0;r<e.sharedDashboardList.length;r++)if(e.sharedDashboardList[r].Id==t)return e.sharedDashboardList[r].SharedBy},getDashPageDetailsById:e=>t=>{if(t in e.dashPageDetails)return e.dashPageDetails[t];if(t in e.sharedDashboardContent)return e.sharedDashboardContent[t];var r={};for(var s in e.dashboardCollection)e.dashboardCollection[s].Id==t&&(r=e.dashboardCollection[s]);var a=r.Name;return{dashId:t,dashName:a,dashContent:[]}},getDashPageById:e=>t=>{for(var r in e.dashboardCollection)if(e.dashboardCollection[r].Id==t)return e.dashboardCollection[r];if(t in e.sharedDashboardContent)return{Id:e.sharedDashboardContent[t].dashId,Name:e.sharedDashboardContent[t].dashName}},getGraphPropertiesById:e=>t=>t in e.graphProperties?e.graphProperties[t]:{},getMyDashFilterValuesById:e=>t=>t in e.selectedMyDashFilters?e.selectedMyDashFilters[t]:[],getSelectedMyDashFilterValues:e=>e.selectedMyDashFilters,availableInstances:e=>e.availableInstances,isError:e=>e.isError,errorType:e=>"DETAILS_DOWNLOAD_MSG"==e.errorCode||"DASH_SUCCESS"==e.errorCode?"success":"error",errorMessage:e=>"INVALID_MD"==e.errorCode?e.errorDict[e.errorCode]+" "+e.errorDim+" and "+e.errorMeas:"MANDATORY_DATE_FILTER"==e.errorCode?e.errorDict[e.errorCode]+" "+e.errorMeas:e.errorDict[e.errorCode],isSnackbar:e=>e.isSnackbar,snackbarType:e=>["SAVE_QUERY_SUCCESS","DELETE_QUERY_SUCCESS","SAVE_FILTER_SUCCESS","DELETE_FILTER_SUCCESS","DELETE_NOTIFY_SUCCESS","DASH_SHARE_SUCCESS","DASH_SUCCESS","REPORT_SUCCESS","E-mail_SUCCESS"].includes(e.snackbarCode)?"success":"error",snackbarMessage:e=>e.snackbarDict[e.snackbarCode],wsErrorMessage:e=>e.wsErrorDict[e.wsErrorCode],isUpdatedReport:e=>t=>e.updatedReports.includes(t),dashboardCollection:e=>e.dashboardCollection,getcomponentKey:e=>e.componentKey,getPageId:e=>e.pageId,getDimensionTree:e=>e.itemList.dimensionTree,getMeasureTree:e=>e.itemList.measureTree,getSelectedReports:e=>e.selectedReports,selectedDimensions:e=>e.selectedItems.selectedDimensions,selectedMeasures:e=>e.selectedItems.selectedMeasures,selectedRows:e=>e.selectedItems.selectedRows,selectedColumns:e=>e.selectedItems.selectedColumns,getSessionFilters:e=>e.sessionFilters,getPermanentFilters:e=>e.permanentFilters,getAllFilters:e=>{var t=new Array;return t=t.concat(e.permanentFilters),t=t.concat(e.sessionFilters),e.permanentCmplxFilters.length&&(t=t.concat(e.permanentCmplxFilters)),t.sort((function(e,t){return+e.FilterItemId-+t.FilterItemId})),t},getPermanentCmplxFilters:e=>e.permanentCmplxFilters,getSelectedFilters:e=>e.selectedFilters,getCheckedFilters:e=>e.checkedFilters,getStandardFilterArray:e=>e.standardFilterArray,getSessionFiltersChecked:e=>e.sessionFiltersChecked,getFilterId:e=>e.filterId,getNormalFilterAttr:e=>e.isNormalFilter,getSortOrder:e=>t=>t in e.dimensionSortOrderDict?e.dimensionSortOrderDict[t]:[],getMapCoords:e=>t=>t in e.mapCoords?e.mapCoords[t]:e.defaultMapCoords,getLoggedInUserId:e=>e.userId,getReportToDetails:e=>e.reportToDetails,getReportOverviewById:e=>t=>{var r=ee({Id:-1,children:e.reportList},t);return r},getSharedDashboardReportById:e=>t=>{for(var r=0;r<e.sharedDashboardReports.length;r++)if(e.sharedDashboardReports[r].Id==t)return e.sharedDashboardReports[r];return!1},getReportById:e=>t=>{for(var r=0;r<e.detailedReportList.length;r++)if(e.detailedReportList[r].Id==t)return e.detailedReportList[r];return!1},getDashFilterValuesById:e=>t=>t in e.selectedDashFilters?e.selectedDashFilters[t]:[],getSelectedDashFilterValues:e=>e.selectedDashFilters,getItemMetaById:e=>t=>e.menuItems[t],getMetaNameById:e=>t=>e.menuItems[t].Name,getFolderList:e=>e.folderList,getUserListGetter:e=>e.userList,getGroupList:e=>e.groupList},actions:{initDashboard({state:e,commit:t,dispatch:r}){r("getDashboardCollection").then((t=>{for(var s=e.dashboardCollection,a=0;a<s.length;a++)r("getDashboardContent",s[a].Id).then((e=>{}))})),r("getSharedDashboardList").then((e=>{if(e)for(var t=0;t<e.length;t++)r("getSharedDashboardContent",e[t].Id)}))},initSession({state:e,commit:t,dispatch:r}){return Promise.all([r("getItemList"),r("getUserProperties"),r("getUserAccess"),r("getTableJoins"),r("getReportList"),r("getUserSettings"),r("getFolderList"),r("getUserList"),r("getFolderCategories"),r("doFilterOperation",{operationName:"getFilterList"}),r("doFilterOperation",{operationName:"getFilterExp"}),r("initDashboard"),r("getDashboardShareInfo"),r("doNotifyOperation",{operationName:"getNotifyList",notifyId:"",notifyReportId:""})])},async shareDashboard({commit:e,state:t,dispatch:r},s){return r("revokeDashboardAccess",s).then((e=>{if(e)return r("addDashboardAccess",s).then((e=>"CUBOT_SUCCESS"==e))}))},async addDashboardAccess({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/doShareObject/"+t.authToken+"/Add/"+r.dashId+"/-D/Users="+r.userList+";Groups="+r.groupList+"/"+rand();return await V().get(s,{responseType:"text/xml"}).then((e=>{var r=(new DOMParser).parseFromString(e.data,"text/xml"),s=U.get_ElementsByTagNameNS(t.rdNS,r,"doShareObjectResponse"),a=U.getTagValue(s[0],"Object");return a}))},async revokeDashboardAccess({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/doShareObject/"+t.authToken+"/Remove/"+r.dashId+"/-D/Users=ALL;Groups=ALL/"+rand();return await V().get(s,{responseType:"text/xml"}).then((e=>{var r=(new DOMParser).parseFromString(e.data,"text/xml"),s=U.get_ElementsByTagNameNS(t.rdNS,r,"doShareObjectResponse"),a=U.getTagValue(s[0],"Object");return a}))},async getSharedDashboardContent({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getSharedObjectContent/"+t.authToken+"/"+r+"/-DashboardContent/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{var a=(new DOMParser).parseFromString(s.data,"text/xml"),i=U.get_ElementsByTagNameNS(t.rdNS,a,"getSharedObjectContentResponse"),o=JSON.parse(U.getTagValue(i[0],"Content"));e("setSharedDashboardContent",{dashId:r,dashContent:o})}))},async loginCubot({commit:e,state:t,dispatch:r},s){var a="<loginCubot><dbSchema>"+s[2]+"</dbSchema><domainName>"+s[3]+"</domainName><userId>"+s[0]+"</userId><password>"+s[1]+"</password><signature>"+rand()+"</signature></loginCubot>",i="/axis2/rx/cubotsvc/loginCubot/"+rand();return e("setAppStatus","LOGGING-IN"),e("setInstanceName",s[2]),await V().post(i,a,{headers:{"Content-Type":"text/xml"}}).then((s=>{var a=(new DOMParser).parseFromString(s.data,"text/xml"),i=U.get_ElementsByTagNameNS(t.rdNS,a,"loginCubotResponse"),o=U.getTagValue(i[0],"sessionId");if("CUBOT-AUTH-ERROR"==o)return setCookie("RXSESSION","",0),e("resetState"),!1;var n=o.split("RX")[1];return setCookie("RXSESSION",o,1),e("setAuthToken",o),e("setConnId",n),e("setWSLoading",!0),r("initSession").then((t=>(e("setWSLoading",!1),!0)))}))},async resetDashboardOrder({commit:e,state:t,dispatch:r},s){e("setDashboardCollection",s);var a={contentId:0,contentType:"#DashboardCollection"};a.content=t.dashboardCollection,r("saveDashboard",a).then((e=>{r("getDashboardCollection")}))},async logoutCubot({commit:e,state:t,dispatch:r}){var s="/axis2/rx/cubotsvc/logoutCubot/"+t.authToken+"/"+rand();return await V().get(s,{responseType:"text/xml"}).then((r=>{var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"logoutCubotResponse"),i=U.getTagValue(a[0],"status");return("CUBOT-SUCCESS"==i||"CUBOT-AUTH-ERROR"==i)&&(setCookie("RXSESSION","",0),e("resetState"),!0)}))},checkSessionStatus({commit:e,state:t},r){var s=U.get_ElementsByTagNameNS(t.rdNS,r,"status");s.length>0&&"CUBOT-AUTH-ERROR"==s[0].childNodes[0].nodeValue&&(setCookie("RXSESSION","",0),e("resetState"))},async getTableJoins({commit:e,state:t,dispatch:r}){var s="/axis2/rx/cubotsvc/getTableJoins/"+t.authToken+"/"+rand();return await V().get(s,{responseType:"data"}).then((r=>{for(var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"TABLEJOINSROW"),i={},o=0;o<a.length;o++){var n=U.getTagValue(a[o],"FactTable"),l=U.getTagValue(a[o],"JoinTables");i[n]=l.split(":")}e("setTableJoins",i)})).catch((t=>{e("setWSErrorStatus",!0)}))},async getFolderCategories({commit:e,state:t}){var r="/axis2/rx/cubotsvc/getFolderCategories/"+t.authToken+"/"+rand();return await V().get(r,{responseType:"data"}).then((r=>{for(var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"FOLDERCATEGORIES"),i=[],o=0;o<a.length;o++){var n={};n["categoryId"]=U.getTagValue(a[o],"fc_id"),n["categoryName"]=U.getTagValue(a[o],"fc_category"),i.push(n)}i.length&&e("setFolderCategories",i)}))},async getItemList({commit:e,state:t,dispatch:r}){var s="/axis2/rx/cubotsvc/getMetaData/"+t.authToken+"/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{var a=(new DOMParser).parseFromString(s.data,"text/xml");if(t.authToken){var i=new Array("Group","ParentId","Id","Name","Table","Column","AggFunction","WhereClause1","WhereClause2","WhereClause3","IsFloorTgt","TimeColumn","Description","GroupParentId","HavingClause","Attributes","Format","DataType","DataSubType","DataPrefix","DataSuffix","JoinTable","MinimumValue","MaximumValue"),o=U.get_ElementsByTagNameNS(t.rdNS,a,"METADATAROW"),n=new Array;if(U.getTagValue(o[0],"Id")){for(var l=0;l<o.length;l++){n[l]=new Array(i.length);for(var d=0;d<i.length;d++)n[l][d]=U.decodeXML(U.getTagValue(o[l],i[d]));"sort-geo"==n[l][17]&&(n[l][17]="geo",n[l][18]="sort")}var h=U.createItemList(n),c={};for(l=0;l<h.dimensionTree.length;l++){h.dimensionTree=h.dimensionTree.filter((e=>"time"===e.Table)).concat(h.dimensionTree.filter((e=>"time"!==e.Table)).sort((function(e,t){return e.Name.localeCompare(t.Name)})));var u=h.dimensionTree[l];c[u.Id]={Name:u.Name},u.items.sort((function(e,t){return e.Name.localeCompare(t.Name)}));for(d=0;d<u.items.length;d++)c[u.items[d].Id]=u.items[d]}for(l=0;l<h.measureTree.length;l++){h.measureTree.sort((function(e,t){return e.Name.localeCompare(t.Name)}));var p=h.measureTree[l];c[p.Id]={Name:p.Name},p.items.sort((function(e,t){return e.Name.localeCompare(t.Name)}));for(d=0;d<p.items.length;d++)c[p.items[d].Id]=p.items[d]}e("setItemList",h),e("setMenuItems",c),r("initSortOrderAndGeoRequests")}}})).catch((s=>{[502,504].includes(s.response.status)&&t.METADATA_RETRY_NUM<10?(r("getItemList"),t.METADATA_RETRY_NUM++):(e("setWSErrorCode","ITEMLIST"),e("setWSErrorStatus",!0))}))},async getSavedQueriesList({commit:e,state:t}){var r="/py/getSavedQueriesList/"+t.authToken;return await V().get(r,{responseType:"application/json"}).then((e=>(t.savedQueries=e.data,e)))},async getInstancesList({commit:e,state:t}){var r="/py/getInstancesList/"+t.authToken;return await V().get(r,{responseType:"application/json"}).then((e=>(t.savedInstances=e.data,e)))},async getInformationSchema({commit:e,state:t},r){0==r&&(r=1),t.db_id=r;var s={};s.sesssionid=t.authToken,s.db_id=r;var a="/py/getInformationSchema/"+t.authToken+"/"+r;return await V().get(a,{responseType:"application/json"}).then((r=>{var s={};return s.db_id="db"+t.db_id,s.data=r.data,e("setInformationSchema",s),"success"}))},async saveQuery({commit:e,state:t,dispatch:r},s){var a="/py/save/";return s.sessionid=t.authToken,await V().post(a,s).then((e=>r("getSavedQueriesList").then((e=>(e&&(t.savedQueries=e.data),e)))))},async deleteQuery({commit:e,state:t,dispatch:r},s){var a="/py/delete/";return s.sessionid=t.authToken,await V().post(a,s).then((e=>(console.log(e),r("getSavedQueriesList").then((e=>(e&&(t.savedQueries=e.data),e))))))},async getQueryResult({commit:e,state:t},r){r.sessionid=t.authToken;var s="/py/query/";return await V().post(s,r).then((e=>(console.log(e),e)))},async getUserSettings({commit:e,state:t}){var r="/axis2/rx/cubotsvc/getUserSettings/"+t.authToken+"/null/"+rand();return await V().get(r,{responseType:"data"}).then((r=>{for(var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"Data"),i={},o=0;o<a.length;o++){var n=String(U.getTagValue(a[o],"ParamId")),l=U.getTagValue(a[o],"ParamValue");i[n]=l}e("setUserSettings",i)}))},async getMetadata({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getDetailsMetaData/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((t=>{var r=(new DOMParser).parseFromString(t.data,"text/xml"),s=(new XMLSerializer).serializeToString(r);s=s.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var a=(new DOMParser).parseFromString(s,"text/xml"),i=xmlToJson(a),o=[];i.getDetailsMetaDataResponse.METADATAROW&&(o=i.getDetailsMetaDataResponse.METADATAROW);var n=[];if("CUBOT-NO-METADATA-FOUND"!=o){for(var l=!1,d=0;d<o.length;d++){l=!1;var h=o[d].GroupId,c=new Object;c.itemId=o[d].Id,c.itemName=o[d].Name;for(var u=0;u<n.length;u++)n[u].groupId==h&&(l=!0,n[u].items.push(c));if(!l){var p=new Object;p.groupId=h,p.groupName=o[d].Group,p.items=new Array,p.items.push(c),n.push(p)}}n.sort((function(e,t){return e.groupName.localeCompare(t.groupName)}))}e("setMetadata",n)})).catch((t=>{e("setWSErrorCode","DETAILS"),e("setWSErrorStatus",!0)}))},initSortOrderAndGeoRequests({state:e,dispatch:t}){for(var r=e.itemList.dimensionTree,s=0;s<r.length;s++)for(var a=0;a<r[s].items.length;a++)"sort"==r[s].items[a].DataSubType?t("getDimensionSortOrder",r[s].items[a].Id):("geo"==r[s].items[a].DataType||r[s].items[a].Description.includes("[geo]"))&&t("getMapCoords",r[s].items[a].Id)},addDashboard({commit:e,state:t,dispatch:r},s){return r("getUniqueNumber").then((a=>{if(a){var i=a,o={};o.Name=s,o.Id=i,e("addNewDashboard",o),e("addReportToDashboard",{dashId:i,dashName:s,report:!1});var n={contentId:0,contentType:"#DashboardCollection"};return n.content=t.dashboardCollection,r("saveDashboard",n).then((e=>{r("getDashboardCollection"),r("saveDashboardToServer",i)})),a}}))},deleteDashboard({commit:e,state:t,dispatch:r},s){e("deleteDashboardCommit",s);var a={contentId:0,contentType:"#DashboardCollection"};a.content=t.dashboardCollection,r("saveDashboard",a).then((e=>{r("getDashboardCollection")}))},renameDashboard({commit:e,state:t,dispatch:r},s){e("renameDashboardCommit",s),r("saveDashboardToServer",s.dashId);var a={contentId:0,contentType:"#DashboardCollection"};a.content=t.dashboardCollection,r("saveDashboard",a).then((e=>{r("getDashboardCollection")}))},async getDimensionSortOrder({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getSortOrder/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{for(var a=(new DOMParser).parseFromString(s.data,"text/xml"),i=U.get_ElementsByTagNameNS(t.rdNS,a,"Data"),o=new Object,n=0;n<i.length;n++)o[U.getTagValue(i[n],"Value")]=Number(U.getTagValue(i[n],"Position"));e("setDimensionSortOrder",[r,o])}))},async getReportData({commit:e,state:t},r){r.dimensionList||(r.dimensionList=""),r.measureList||(r.measureList=""),r.dimensionFilterList||(r.dimensionFilterList=""),r.measureFilterList||(r.measureFilterList=""),r.dimensionFilterList=U.symbolToHex(r.dimensionFilterList);var s="/axis2/rx/cubotsvc/createResultSet/"+rand(),a="<createResultSet><sessionId>"+t.authToken+"</sessionId><dimensionIds>"+r.dimensionList+"</dimensionIds><measureIds>"+r.measureList+"</measureIds><dimensionFilters>"+U.xmlEscape(r.dimensionFilterList)+"</dimensionFilters><measureFilters>"+r.measureFilterList+"</measureFilters><filterLogic>"+U.symbolToHex(U.xmlEscape(r.filterLogic))+"</filterLogic><instanceId>"+r.uiInstance+"</instanceId><DataInstanceId>"+r.dataInstanceId+"</DataInstanceId><signature>"+rand()+"</signature></createResultSet>";return await V().post(s,a,{headers:{"Content-Type":"text/xml"}}).then((e=>{for(var r=(new DOMParser).parseFromString(e.data,"text/xml"),s=U.get_ElementsByTagNameNS(t.rdNS,r,"DATA"),a=s.length,i=new Array(a),o=!1,n=0;n<a;n++){var l=U.get_ElementsByTagNameNS(t.rdNS,s[n],"COL"),d=l.length;i[n]=new Array(d);for(var h=0;h<d;h++)l[h].childNodes[0]?(i[n][h]=U.decodeXML(l[h].childNodes[0].nodeValue),i[n][h].startsWith("Rest")&&i[n][h].endsWith("Total")&&!o&&(o=!0)):i[n][h]="";o&&i.splice(n,1)}return i})).catch((e=>null))},async getMapCoords({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getMapCoords/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{var a=(new DOMParser).parseFromString(s.data,"text/xml"),i=U.get_ElementsByTagNameNS(t.rdNS,a,"Data");if("ERROR"!=i[0].innerHTML){for(var o=new Object,n=0;n<i.length;n++)o[U.getTagValue(i[n],"Value")]=JSON.parse(U.decodeXML(U.getTagValue(i[n],"Position")));e("setMapCoords",[r,o])}}))},async getDashboardShareInfo({commit:e,state:t}){var r="/axis2/rx/cubotsvc/getSharedObject/"+t.authToken+"/-D/3/"+rand();return await V().get(r,{responseType:"data"}).then((t=>{var r=t.data;r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s),i=new Array;Array.isArray(a.getSharedObjectResponse.Object)?i=a.getSharedObjectResponse.Object:"NO-DATA-FOUND"!=a.getSharedObjectResponse.Object&&i.push(a.getSharedObjectResponse.Object),e("setSharedDashboardShareInfo",i)}))},async getSharedDashboardList({commit:e,state:t,getters:r}){var s="/axis2/rx/cubotsvc/getSharedObject/"+t.authToken+"/-D/1/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{var a=s.data;a=a.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var i=(new DOMParser).parseFromString(a,"text/xml"),o=xmlToJson(i),n=new Array;Array.isArray(o.getSharedObjectResponse.Object)?n=o.getSharedObjectResponse.Object:"NO-DATA-FOUND"!=o.getSharedObjectResponse.Object&&n.push(o.getSharedObjectResponse.Object);for(var l=[],d=0;d<n.length;d++)r.getUserNameById(n[d].SharedBy)!=t.userId&&l.push(n[d]);return e("setSharedDashboardList",l),n}))},async getSharedDashboardReport({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getReportList/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((s=>{var a=s.data;a=a.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var i=(new DOMParser).parseFromString(a,"text/xml"),o=xmlToJson(i),n=new Array;Array.isArray(o.getReportListResponse.Report)?n=o.getReportListResponse.Report:n.push(o.getReportListResponse.Report);var l=ee({Id:-1,children:t.reportList},r);return l&&t.detailedReportList.push(n[0]),!!n.length&&(e("addSharedDashboardReport",n[0]),!0)}))},async getReportListById({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getReportList/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((t=>{var r=t.data;r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s),i=new Array;return Array.isArray(a.getReportListResponse.Report)?i=a.getReportListResponse.Report:i.push(a.getReportListResponse.Report),!!i.length&&(e("addReportDetails",i[0]),!0)}))},async getReportPermission({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getReportPermission/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((e=>{var r=e.data;r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s),i=a.getReportPermissionResponse.Data;Array.isArray(i)||(i=[i]);for(var o=0;o<i.length;o++){var n=i[o];if("N"==n.IsGroup)for(var l=0;l<t.userList.length;l++){var d=t.userList[l].split(":"),h=d[1];h==n.User&&(i[o].UserId=d[0])}else for(l=0;l<t.groupList.length;l++){var c=t.groupList[l].split(":"),u=c[1];u==n.User&&(i[o].GroupId=c[0])}}return i}))},async getReportList({commit:e,state:t,dispatch:r}){var s="/axis2/rx/cubotsvc/getReportList/"+t.authToken+"/null/"+rand();return await V().get(s,{responseType:"data"}).then((t=>{var r=t.data;r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s),i=new Array;Array.isArray(a.getReportListResponse.Report)?i=a.getReportListResponse.Report:i.push(a.getReportListResponse.Report);for(var o=[],n=0;n<a.getReportListResponse.Report.length;n++)"Folder"!=a.getReportListResponse.Report[n].ReportType&&"Personal"==a.getReportListResponse.Report[n].ReportPermission&&o.push(a.getReportListResponse.Report[n].Title);var l=U.convertFlatToHierarchialJSON(i),d=l.children,h=new Array,c={Id:"0",ParentId:"0",ReportType:"Folder",children:[],Title:"Shared Reports"};for(n=0;n<d.length;n++)"Shared"==d[n].ReportPermission?c.children.push(d[n]):h.push(d[n]);c.children.length>0&&h.push(c),e("setPersonalReportNameList",o),e("setReportList",h),e("clearUpdatedReports")})).catch((s=>{[502,504].includes(s.response.status)&&t.REPORTLIST_RETRY_NUM<10?(r("getReportList"),t.REPORTLIST_RETRY_NUM++):e("setWSErrorStatus",!0)}))},async getUserAccess({commit:e,state:t}){var r="/axis2/rx/cubotsvc/userManagement/"+rand(),s="<userManagement><sessionId>"+t.authToken+"</sessionId><Operation>GetUserAccess</Operation><tagvaluepair>userid=thisuser</tagvaluepair><signature>"+rand()+"</signature></userManagement>";return V().post(r,s,{headers:{"Content-Type":"text/xml"}}).then((r=>{var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"userManagementResponse"),i=U.getTagValue(a[0],"status");if(i&&"CUBOT-AUTH-ERROR"==i)return e("setAppStatus","INACTIVE"),setCookie("RXSESSION","",0),e("resetState"),"INVALID";var o=a[0].childNodes[0].childNodes[1].textContent.split("~_");return o="Analyze:View Details:Dashboard:Reports".split(":"),e("setAppAccess",o),o}))},async checkSessionValidity({commit:e,state:t}){var r="/axis2/rx/cubotsvc/userManagement/"+rand(),s="<userManagement><sessionId>"+t.authToken+"</sessionId><Operation>GetUserProperties</Operation><tagvaluepair>userid=thisuser</tagvaluepair><signature>"+rand()+"</signature></userManagement>";return V().post(r,s,{headers:{"Content-Type":"text/xml"}}).then((r=>{var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"userManagementResponse"),i=U.getTagValue(a[0],"status");return i&&"CUBOT-AUTH-ERROR"==i?(e("setAppStatus","INACTIVE"),setCookie("RXSESSION","",0),e("resetState"),"INVALID"):(e("setAppStatus","ACTIVE"),"VALID")}))},async getUserProperties({commit:e,state:t}){var r="/axis2/rx/cubotsvc/userManagement/"+rand(),s="<userManagement><sessionId>"+t.authToken+"</sessionId><Operation>GetUserProperties</Operation><tagvaluepair>userid=thisuser</tagvaluepair><signature>"+rand()+"</signature></userManagement>";return await V().post(r,s,{headers:{"Content-Type":"text/xml"}}).then((r=>{var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"GetUserProperties"),i=U.getTagValue(a[0],"UserId");if(i){e("setUserId",i);var o=U.getTagValue(a[0],"UserName");o||(o=i),e("setUserName",o)}else e("setAppStatus","INACTIVE")})).catch((t=>{e("setWSErrorStatus",!0)}))},async getFilterValues({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getFilterValues/"+rand(),a="<getFilterValues><sessionId>"+t.authToken+"</sessionId><dimensionId>"+r.dimensionId+"</dimensionId><offset>"+"-1</offset><dimWhereClause>"+U.symbolToHex(U.xmlEscape(r.whereClause))+"</dimWhereClause><signature>"+rand()+"</signature></getFilterValues>";return await V().post(s,a,{headers:{"Content-Type":"text/xml"}}).then((e=>{for(var r=(new DOMParser).parseFromString(e.data,"text/xml"),s=U.get_ElementsByTagNameNS(t.rdNS,r,"FILTERVALUES"),a=U.get_ElementsByTagNameNS(t.rdNS,s[0],"value"),i=new Array,o=0;o<a.length;o++)if(a[o].childNodes[0]){var n=a[o].childNodes[0].nodeValue;n&&i.push(n)}return i}))},async getFactDetails({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getFactReportDtls/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((e=>{var t=e.data;t=t.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var r=(new DOMParser).parseFromString(t,"text/xml"),s=xmlToJson(r),a=s["getFactReportDtlsResponse"]["FactReportDtls"];return a}))},async saveDashboardToServer({commit:e,state:t,dispatch:r},s){var a={contentType:"-DashboardContent"};a.contentId=s;var i=t.dashPageDetails[s].dashName,o=[];return t.dashPageDetails[s]&&(o=t.dashPageDetails[s].dashContent),o||(o=[]),o=Q(o),a.content={dashId:s,dashName:i,dashContent:o},r("saveDashboard",a).then((e=>"success"==e?"success":"failed"))},async saveDashboard({commit:e,state:t},r){var s=JSON.stringify(r.content).length;if(!(s>8e3)){e("dashOverflowMessage",!1);var a="/axis2/rx/cubotsvc/doContentOperation/"+rand(),i="<doContentOperation><sessionId>"+t.authToken+"</sessionId><Operation>putContent</Operation><contentId>"+r.contentId+"</contentId><contentType>"+r.contentType+"</contentType><content>"+U.xmlEscape(JSON.stringify(r.content))+"</content><signature>"+rand()+"</signature></doContentOperation>";return await V().post(a,i,{headers:{"Content-Type":"text/xml"}}).then((r=>{var s=(new DOMParser).parseFromString(r.data,"text/xml"),a=U.get_ElementsByTagNameNS(t.rdNS,s,"doContentOperationResponse");if(t.userId||e("setAppStatus","INACTIVE"),"CUBOT-SUCCESS"==a[0].textContent)return"success"}))}e("dashOverflowMessage","Unable to save. Dashoard size("+s+") is more than the limit 8k characters.")},async getUniqueNumber({state:e}){var t="/axis2/rx/cubotsvc/getUniqueNumber/"+e.authToken+"/"+rand();return await V().get(t,{responseType:"data"}).then((t=>{var r=(new DOMParser).parseFromString(t.data,"text/xml"),s=U.get_ElementsByTagNameNS(e.rdNS,r,"getUniqueNumberResponse");return U.getTagValue(s[0],"ID")?U.getTagValue(s[0],"ID"):0}))},async getMetadataResult({state:e},t){var r="/axis2/rx/cubotsvc/getMetadataResultSet/"+rand();t.dimensionFilterList=U.symbolToHex(U.xmlEscape(t.dimensionFilterList)),t.filterLogic||(t.filterLogic="");var s="<getMetadataResultSet><sessionId>"+e.authToken+"</sessionId><dispoption>"+t.displayOption+"</dispoption><measureid>"+t.measureId+"</measureid><mdids>"+t.selectedItemList+"</mdids><dimensionFilters>"+t.dimensionFilterList+"</dimensionFilters><filterLogic>"+U.symbolToHex(U.xmlEscape(t.filterLogic))+"</filterLogic><signature>"+rand()+"</signature></getMetadataResultSet>";return await V().post(r,s,{headers:{"Content-Type":"text/xml"}}).then((e=>{var t=(new DOMParser).parseFromString(e.data,"text/xml"),r=(new XMLSerializer).serializeToString(t);r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s);return a.getMetadataResultSetResponse["DATA"]}))},async getDashboardCollection({commit:e,state:t}){var r={contentType:"#DashboardCollection",contentId:0,content:""},s="/axis2/rx/cubotsvc/doContentOperation/"+rand(),a="<doContentOperation><sessionId>"+t.authToken+"</sessionId><Operation>getContent</Operation><contentId>"+r.contentId+"</contentId><contentType>"+r.contentType+"</contentType><content></content><signature>"+rand()+"</signature></doContentOperation>";return await V().post(s,a,{headers:{"Content-Type":"text/xml"}}).then((r=>{var s=[],a=(new DOMParser).parseFromString(r.data,"text/xml"),i=U.get_ElementsByTagNameNS(t.rdNS,a,"doContentOperationResponse");if(U.getTagValue(i[0],"getContent")){var o=U.getTagValue(i[0],"getContent");o&&"NO-DATA-FOUND"!=o&&(s=JSON.parse(o))}e("setDashboardCollection",s)})).catch((t=>{e("setWSErrorStatus",!0)}))},async getDashboardContent({commit:e,state:t},r){var s={contentType:"-DashboardContent"};s.contentId=r,s.content="";var a="/axis2/rx/cubotsvc/doContentOperation/"+rand(),i="<doContentOperation><sessionId>"+t.authToken+"</sessionId><Operation>getContent</Operation><contentId>"+s.contentId+"</contentId><contentType>"+s.contentType+"</contentType><content></content><signature>"+rand()+"</signature></doContentOperation>";return await V().post(a,i,{headers:{"Content-Type":"text/xml"}}).then((s=>{var a=[],i=(new DOMParser).parseFromString(s.data,"text/xml"),o=U.get_ElementsByTagNameNS(t.rdNS,i,"doContentOperationResponse");if(U.getTagValue(o[0],"getContent")){var n=U.getTagValue(o[0],"getContent");n&&"NO-DATA-FOUND"!=n&&(a=JSON.parse(n))}e("setDashboardContent",{dashId:r,dashContent:a})}))},async doNotifyOperation({commit:e,state:t,dispatch:r},s){var a="/axis2/rx/cubotsvc/doNotifyOperations/"+rand(),i="<doNotifyOperations><sessionId>"+t.authToken+"</sessionId><Operation>"+s.operationName+"</Operation><message>"+s.notifyBody+"</message><notifydata>notifyid="+s.notifyId+";to="+s.notifyTo+";subject="+s.notifySubject+";reportid="+s.notifyReportId+";frequency="+s.notifyFrequency+";startDate="+s.notifyStartDate+";endDate="+s.notifyEndDate+";time="+s.notifyTime+";days="+s.notifydays+";bcc="+s.notifyBcc+";userids="+s.notifyUserIds+";groupids="+s.notifyGroupIds+";breakinfo="+s.breakDimId+";IncBrkDimYN="+s.includeBreakDim+";consolidateRpt="+s.addConsolidateReport+"</notifydata><signature>"+rand()+"</signature></doNotifyOperations>";return await V().post(a,i,{headers:{"Content-Type":"text/xml"}}).then((t=>{var a=(new DOMParser).parseFromString(t.data,"text/xml"),i=(new XMLSerializer).serializeToString(a);i=i.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var o=(new DOMParser).parseFromString(i,"text/xml"),n=xmlToJson(o),l=[];if(n.doNotifyOperations.NotifyList)if(Array.isArray(n.doNotifyOperations.NotifyList))l=n.doNotifyOperations.NotifyList;else{var d=new Array;"object"==typeof n.doNotifyOperations.NotifyList&&d.push(n.doNotifyOperations.NotifyList),l=d}else l=[];if("getNotifyList"==s.operationName)e("setNotifyList",l);else if("deleteNotify"==s.operationName||"setNotify"==s.operationName){if(r("doNotifyOperation",{operationName:"getNotifyList",notifyId:"",notifyReportId:""}),"setNotify"==s.operationName)return n.doNotifyOperations.setNotify;if("deleteNotify"==s.operationName)return n.doNotifyOperations.deleteNotify}}))},async doFilterOperation({commit:e,state:t,dispatch:r},s){var a="/axis2/rx/cubotsvc/doFilterOperation/"+rand(),i="";s.filterName&&(s.filterName=s.filterName.replace(new RegExp("'","g"),"\\'"));var o="fhvalue="+U.xmlEscape(s.filterValueStr);"addFilterExp"==s.operationName&&(o="fhexp="+s.filterValueStr);i="<doFilterOperation><sessionId>"+t.authToken+"</sessionId><Operation>"+s.operationName+"</Operation><filterdata>fhname="+U.symbolToHex(U.xmlEscape(s.filterName))+";fhid="+s.filterId+";fhoper="+s.filterOperation+";fhitemid="+s.filterItemId+";"+U.symbolToHex(U.xmlEscape(o))+"</filterdata><signature>"+rand()+"</signature></doFilterOperation>";return await V().post(a,i,{headers:{"Content-Type":"text/xml"}}).then((t=>{var a=(new DOMParser).parseFromString(t.data,"text/xml"),i=(new XMLSerializer).serializeToString(a);i=i.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var o=(new DOMParser).parseFromString(i,"text/xml"),n=xmlToJson(o),l=[];if(n.doFilterOperationResponse.FilterList)if(Array.isArray(n.doFilterOperationResponse.FilterList))l=n.doFilterOperationResponse.FilterList;else{var d=new Array;"object"==typeof n.doFilterOperationResponse.FilterList&&d.push(n.doFilterOperationResponse.FilterList),l=d}else l=[];if("getFilterList"==s.operationName){for(var h=0;h<l.length;h++)l[h].isPermanentFilter=!0,l[h].isNormalFilter=!0,l[h].FilterValues=U.hexToSymbol(l[h].FilterValues).split("~_");return e("setPermanentFilters",l),!0}if("getFilterExp"==s.operationName){for(h=0;h<l.length;h++)l[h].isPermanentFilter=!0,l[h].isNormalFilter=!1;return e("setPermanentCmplxFilters",l),!0}if("deleteFilterExp"==s.operationName||"addFilterExp"==s.operationName){var c={operationName:"getFilterExp",filterName:"",filterId:"",filterOperation:"",filterItemId:"",filterValueStr:""};return r("doFilterOperation",c).then((e=>{if(e)return s}))}if("deleteFilter"==s.operationName||"addFilter"==s.operationName){c={operationName:"getFilterList",filterName:"",filterId:"",filterOperation:"",filterItemId:"",filterValueStr:""};return r("doFilterOperation",c).then((e=>{if(e)return s}))}["addFilter","addFilterExp"].includes(s.operationName)?"SUCCESS"==n.doFilterOperationResponse.addFilter||"SUCCESS"==n.doFilterOperationResponse.addFilterExp?(e("setSnackbarStatus",!0),e("setSnackbarCode","SAVE_FILTER_SUCCESS")):(e("setSnackbarStatus",!0),e("setSnackbarCode","SAVE_FILTER_FAILURE")):["deleteFilter","deleteFilterExp"].includes(s.operationName)&&("SUCCESS"==n.doFilterOperationResponse.deleteFilter||"SUCCESS"==n.doFilterOperationResponse.deleteFilterExp?(e("setSnackbarStatus",!0),e("setSnackbarCode","DELETE_FILTER_SUCCESS")):(e("setSnackbarStatus",!0),e("setSnackbarCode","DELETE_FILTER_FAILURE")))}))},async saveReportImpl({commit:e,state:t,dispatch:r},s){var a="/axis2/rx/cubotsvc/doReportOperation/"+rand();if(s.dim_filter_list=U.xmlEscape(U.symbolToHex(s.dim_filter_list)),s.cmplx_filter_list=U.xmlEscape(U.symbolToHex(s.cmplx_filter_list)),"undefined"==typeof s.cmplx_filter_list)var i="<doReportOperation><sessionId>"+t.authToken+"</sessionId><operation>"+s.operation+"</operation><reportId>"+s.report_id+"</reportId><dimensionIds>"+s.dim_list+"</dimensionIds><measureIds>"+s.meas_list+"</measureIds><dimensionFilters>"+s.dim_filter_list+"</dimensionFilters><measureFilters>"+s.meas_filter_list+"</measureFilters><instanceId>"+s.instance_id+"</instanceId><tagvaluepair>"+U.symbolToHex(U.xmlEscape(s.tagValuePair))+"</tagvaluepair><signature>"+rand()+"</signature></doReportOperation>";else i="<doReportOperation><sessionId>"+t.authToken+"</sessionId><operation>"+s.operation+"</operation><reportId>"+s.report_id+"</reportId><dimensionIds>"+s.dim_list+"</dimensionIds><measureIds>"+s.meas_list+"</measureIds><dimensionFilters>"+s.dim_filter_list+"</dimensionFilters><filterLogic>"+U.symbolToHex(U.xmlEscape(s.cmplx_filter_list))+"</filterLogic><measureFilters>"+s.meas_filter_list+"</measureFilters><instanceId>"+s.instance_id+"</instanceId><tagvaluepair>"+U.symbolToHex(U.xmlEscape(s.tagValuePair))+"</tagvaluepair><signature>"+rand()+"</signature></doReportOperation>";return s.report_id&&t.updatedReports.push(s.report_id),await V().post(a,i,{headers:{"Content-Type":"text/xml"}}).then((e=>{var t=(new DOMParser).parseFromString(e.data,"text/xml"),a=xmlToJson(t);return"SUCCESS"==a["n:doReportOperationResponse"]["n:saveReport"]?("REPORT"==s.reportType?r("getReportList"):r("getFolderList"),s.report_id&&r("getReportListById",s.report_id),!0):"SUCCESS"==a["n:doReportOperationResponse"]["n:deleteReportFromTrash"]&&(r("getReportList"),!0)}))},async getFolderList({commit:e,state:t}){var r="/axis2/rx/cubotsvc/getFolderList/"+t.authToken+"/"+rand();return await V().get(r,{responseType:"data"}).then((t=>{var r=(new DOMParser).parseFromString(t.data,"text/xml"),s=(new XMLSerializer).serializeToString(r);s=s.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var a=(new DOMParser).parseFromString(s,"text/xml"),i=xmlToJson(a),o=i.getFolderListResponse.FolderList;Array.isArray(o)||(o=[o]),e("setFolderList",te(o))})).catch((t=>{e("setWSErrorStatus",!0)}))},async getUserList({commit:e,state:t}){var r="/axis2/rx/cubotsvc/getUserListToShare/"+t.authToken+"/"+rand();return await V().get(r,{responseType:"data"}).then((t=>{var r=(new DOMParser).parseFromString(t.data,"text/xml"),s=(new XMLSerializer).serializeToString(r);s=s.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var a=(new DOMParser).parseFromString(s,"text/xml"),i=xmlToJson(a);e("setUserList",i.getUserListToShareResponse.UserList.value),e("setGroupList",i.getUserListToShareResponse.GroupList.value)}))},async getGroupList({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getUserListToShare/"+t.authToken+"/"+rand();return await V().get(s,{responseType:"data"}).then((t=>{var r=(new DOMParser).parseFromString(t.data,"text/xml"),s=(new XMLSerializer).serializeToString(r);s=s.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var a=(new DOMParser).parseFromString(s,"text/xml"),i=xmlToJson(a);e("setGroupList",i.getUserListToShareResponse.GroupList.value)}))},async getGraphProperties({commit:e,state:t},r){var s="/axis2/rx/cubotsvc/getGraphProperties/"+t.authToken+"/"+r+"/"+rand();return await V().get(s,{responseType:"data"}).then((e=>{var t=(new DOMParser).parseFromString(e.data,"text/xml"),r=(new XMLSerializer).serializeToString(t);r=r.replace(/<(\/?)([^:>\s]*:)?([^>]+)>/g,"<$1$3>");var s=(new DOMParser).parseFromString(r,"text/xml"),a=xmlToJson(s);return"getGraphPropertiesResponse"in a?a["getGraphPropertiesResponse"]:{}}))}},mutations:{setSelectedDrillOrFilterVal:(e,t)=>{e.selectedDrillOrFilter=t},setUserSettings(e,t){e.userSettings=t,t["103"]&&(e.standardFilters=JSON.parse(t["103"])),t["104"]&&(e.dependencyFilters=JSON.parse(t["104"]))},clearUpdatedReports(e){e.updatedReports=new Array},setMenuItems(e,t){e.menuItems=t},setPersonalReportNameList(e,t){e.reportNameList=t},enableReportToDetails(e,t){e.reportToDetails=t},setAuthToken(e,t){e.authToken=t},setConnId(e,t){e.connId=t},setInstanceName(e,t){e.instanceName=t},setTableJoins(e,t){e.tableJoins=t},setFolderCategories(e,t){e.folderCategories=t},setWSErrorStatus(e,t){e.isWSError=t},setSharedDashboardList(e,t){e.sharedDashboardList=t},setPageId(e,t){e.pageId=t},setItemList(e,t){e.itemList=t},setReportList(e,t){e.reportList=t},setErrorDim(e,t){e.errorDim=t},setErrorMeas(e,t){e.errorMeas=t},setSharedDashboardContent(e,t){s["default"].set(e.sharedDashboardContent,t.dashId,t.dashContent)},addSharedDashboardReport(e,t){e.sharedDashboardReports.push(t)},addReportDetails(e,t){for(var r=!1,s=t.DimensionIds.split("~_"),a=t.MeasureIds.split("~_"),i=[],o=[],n=0;n<s.length;n++){var l=e.menuItems[s[n]];void 0!=l&&i.push(s[n])}for(n=0;n<a.length;n++){l=e.menuItems[a[n]];void 0!=l&&o.push(a[n])}t.DimensionIds=i.join("~_"),t.MeasureIds=o.join("~_");var d=U.filterStringToArray(t.DimensionFilters),h=[];for(n=0;n<d.length;n++){var c=e.menuItems[d[n].FilterItemId];void 0!=c&&h.push(d[n])}var u=U.filterStringToArray(t.MeasureFilters),p=[];for(n=0;n<u.length;n++){c=e.menuItems[u[n].FilterItemId];void 0!=c&&p.push(u[n])}t.DimensionFilters=U.generateFilterQuery(h).dimensionFilterList,t.MeasureFilters=U.generateFilterQuery(p).measureFilterList;for(n=0;n<e.detailedReportList.length;n++)e.detailedReportList[n].Id==t.Id&&(r=!0,e.detailedReportList[n]=t);r||e.detailedReportList.push(t)},setSelectedReports(e,t){e.selectedReports=t},setUserId(e,t){e.userId=t},setUserName(e,t){e.userName=t},setAppStatus(e,t){console.log(t),e.appStatus=t},setGraphPropertiesById(e,t){e.graphProperties[t.reportId]=t.graphProperties},setDashPageVariable(e,t){e.isDashPageChanged=t},setAppAccess(e,t){e.accessList=t},resetState(e){Object.assign(e,J())},setMapCoords(e,t){e.mapCoords[t[0]]=t[1]},setDashFilters(e,t){s["default"].set(e.selectedDashFilters,t.dimId,t.selectedValues)},setDimensionSortOrder(e,t){s["default"].set(e.dimensionSortOrderDict,t[0],t[1])},insertMeasures:(e,t)=>{e.selectedItems.selectedMeasures.push(t)},insertDimensions:(e,t)=>{e.selectedItems.selectedDimensions.push(t)},draggedRows:(e,t)=>{e.selectedItems.selectedRows=t},draggedColumns:(e,t)=>{e.selectedItems.selectedColumns=t},insertRows:(e,t)=>{-1==e.selectedItems.selectedRows.indexOf(t)&&e.selectedItems.selectedRows.push(t)},insertColumns:(e,t)=>{-1==e.selectedItems.selectedColumns.indexOf(t)&&e.selectedItems.selectedColumns.push(t)},deleteMeasures:(e,t)=>{e.selectedItems.selectedMeasures.splice(t,1)},deleteDimensions:(e,t)=>{e.selectedItems.selectedDimensions.splice(t,1)},deleteRows:(e,t)=>{e.selectedItems.selectedRows.splice(t,1)},deleteColumns:(e,t)=>{e.selectedItems.selectedColumns.splice(t,1)},deleteAllRows:e=>{s["default"].set(e.selectedItems,"selectedRows",[])},deleteAllColumns:e=>{s["default"].set(e.selectedItems,"selectedColumns",[])},deleteAllDimensions:e=>{s["default"].set(e.selectedItems,"selectedDimensions",[])},deleteAllMeasures:e=>{s["default"].set(e.selectedItems,"selectedMeasures",[])},deleteAllSelectedFilters:e=>{s["default"].set(e,"selectedFilters",[])},deleteAllCheckedFilters:e=>{s["default"].set(e,"checkedFilters",[])},setCheckedFilters:(e,t)=>{e.checkedFilters=t},setSingleCheckedFilter:(e,t)=>{e.checkedFilters.push(t)},setSingleSelectedFilter:(e,t)=>{e.selectedFilters.push(t)},deleteCheckedFilters:(e,t)=>{e.checkedFilters.splice(t,1)},setComponentKey(e,t){e.componentKey=t},deleteDashFilters:e=>{e.selectedDashFilters=new Object},setSessionFilters:(e,t)=>{e.sessionFilters.push(t)},setPermanentFilters:(e,t)=>{e.permanentFilters=t},setPermanentCmplxFilters:(e,t)=>{e.permanentCmplxFilters=t},setSelectedFilters:(e,t)=>{e.selectedFilters=JSON.parse(JSON.stringify(t))},setStandardFilterArray:(e,t)=>{e.standardFilterArray=t},deleteStandardFilterArray:e=>{e.standardFilterArray=[]},setDetailsMeasureId:(e,t)=>{e.detailsMeasureId=t},setSelectedMetadata:(e,t)=>{e.selectedMetadata=t},setSessionFiltersChecked:(e,t)=>{e.sessionFiltersChecked=t},deleteSelectedFilters:(e,t)=>{e.selectedFilters.splice(t,1)},deleteSessionFilters:(e,t)=>{for(var r=0;r<e.sessionFilters.length;r++)e.sessionFilters[r].FilterId==t&&e.sessionFilters.splice(r,1)},dashOverflowMessage:(e,t)=>{t&&(e.errorDict["DASH_OVERFLOW_MSG"]=t,e.errorCode="DASH_OVERFLOW_MSG",e.isError=!0)},setSharedDashboardShareInfo:(e,t)=>{e.sharedDashboardInfo={},e.dashCollectionInfo={};for(var r={},s=0;s<t.length;s++){e.sharedDashboardInfo[t[s].Id]=t[s].SharedTo.split("~_");var a=t[s].SharedTo.split("~_"),i={};if(void 0!=a)i.groupView=a.filter((function(e){return e<1e5})),i.userView=a.filter((function(e){return e>=1e5}));else i={userView:[],groupView:[]};r[t[s].Id]=i}e.dashCollectionInfo=r},setFilterId:(e,t)=>{e.filterId=t},setNormalFilterAttr:(e,t)=>{e.isNormalFilter=t},setErrorStatus:(e,t)=>{e.isError=t},setErrorCode:(e,t)=>{e.errorCode=t},setWSErrorCode:(e,t)=>{e.wsErrorCode=t},setSnackbarStatus:(e,t)=>{e.isSnackbar=t},setSnackbarCode:(e,t)=>{e.snackbarCode=t},setFolderList:(e,t)=>{e.folderList=t},setUserList:(e,t)=>{e.userList=t},setGroupList:(e,t)=>{"undefined"==typeof t&&(t=[]),Array.isArray(t)||(t=[t]),e.groupList=t},setDashboardCollection:(e,t)=>{e.dashboardCollection=t},setNotifyList:(e,t)=>{e.notifyList=t},setDashboardContent:(e,t)=>{s["default"].set(e.dashPageDetails,t.dashId,t.dashContent)},addNewDashboard:(e,t)=>{e.dashboardCollection.push(t)},deleteMyDashFilters:e=>{e.selectedMyDashFilters=new Object},incrementServiceLoadingCount:e=>{e.serviceLoadingCount++},decrementServiceLoadingCount:e=>{e.serviceLoadingCount--},setMyDashFilters(e,t){s["default"].set(e.selectedMyDashFilters,t.dimId,t.selectedValues)},setWSLoading(e,t){e.isWSLoading=t},addReportToDashboard(e,t){var r=e.dashPageDetails[t.dashId]?e.dashPageDetails[t.dashId].dashContent:[];t.report&&r.push(t.report),s["default"].set(e.dashPageDetails,t.dashId,{dashId:t.dashId,dashName:t.dashName,dashContent:r})},setMetadata(e,t){e.metaData=t},setInformationSchema(e,t){e.informationSchema[t.db_id]||(e.informationSchema[t.db_id]=t.data),s["default"].set(e.informationSchema,t.db_id,t.data)},deleteReportFromDashPage(e,t){var r,a=-1;if(t.dashId in e.dashPageDetails){r=e.dashPageDetails[t.dashId];for(var i=0;i<r.dashContent.length;i++)t.reportId==r.dashContent[i].reportId&&(a=i)}a>-1&&(r.dashContent.splice(a,1),s["default"].set(e.dashPageDetails,t.dashId,r))},deleteDashboardCommit(e,t){for(var r=-1,s=0;s<e.dashboardCollection.length;s++)t==e.dashboardCollection[s].Id&&(r=s);r>-1&&e.dashboardCollection.splice(r,1)},renameDashboardCommit(e,t){t.dashId in e.dashPageDetails&&(e.dashPageDetails[t.dashId].dashName=t.dashName);for(var r=-1,s=0;s<e.dashboardCollection.length;s++)t.dashId==e.dashboardCollection[s].Id&&(r=s);r>-1&&(e.dashboardCollection[r].Name=t.dashName)}},modules:{}});const K={showlegends:!0,showpointlabels:!1,reporttitle:"",showCurrency:!1,headerColor:"#344f60",showSearch:!1,isComparison:!1,desiredValueTendency:"incr",legendorientation:"v",legendposition:{x:"1",y:"1",anchor:"left"}},Y={tracetype:"",showmeasure:!0,layout:{},showygridline:!1,showyzeroline:!1,color:""},X={showmultiaxes:!1,showxgridline:!1,showxzeroline:!1,autotick:!1},Q=e=>{for(var t=0;t<e.length;t++){var r=e[t].layout?.graphSettings?.reporttitle;if("ProgressBar"==e[t].gtype){var s=e[t].layout.graphSettings["isComparison"],a=e[t].layout.graphSettings["desiredValueTendency"],i=e[t]["layout"]["measureprops"]["color"];delete e[t].layout;var o={isComparison:s,desiredValueTendency:a},n={measureprops:{color:i}};e[t]["layout"]=n,e[t]["layout"]["graphSettings"]=o}else if("InfoBox"==e[t].gtype){s=e[t].layout.graphSettings["isComparison"],a=e[t].layout.graphSettings["desiredValueTendency"];delete e[t].layout;n={isComparison:s,desiredValueTendency:a};e[t]["layout"]={},e[t]["layout"]["graphSettings"]=n}else if("DataTable"==e[t].gtype){var l=e[t].layout.graphSettings["showCurrency"],d=e[t].layout.graphSettings["showSearch"],h=e[t].layout.graphSettings["headerColor"];delete e[t].layout;n={showCurrency:l,showSearch:d,headerColor:h};e[t]["layout"]={},e[t]["layout"]["graphSettings"]=n}else W.isEqual(e[t]["layout"]["graphSettings"],K)&&delete e[t]["layout"]["graphSettings"],W.isEqual(e[t]["layout"]["measureprops"],Y)&&delete e[t]["layout"]["measureprops"],W.isEqual(e[t]["layout"]["axesprops"],X)&&delete e[t]["layout"]["axesprops"];r&&(e[t]["layout"]["graphSettings"]["reporttitle"]=r)}return e},ee=(e,t)=>{var r,s,a;if(t==e.Id)return e;for(r=0;r<e.children.length;r+=1)if(s=e.children[r],a=ee(s,t),!1!==a)return a;return!1},te=e=>{var t,r,s=[],a={};e=re(e,"FolderId");for(var i=0,o=e.length;i<o;i++)t=e[i],a[t.FolderId]=t,a[t.FolderId]["Children"]=[];for(var n in a)a.hasOwnProperty(n)&&(r=a[n],a[r["ParentId"]]?a[r["ParentId"]]["Children"].push(r):s.push(r));return s},re=(e,t)=>e.sort((function(e,r){var s=e[t],a=r[t];return s<a?-1:s>a?1:0}));var se=r(16232),ae=r(55550),ie=r(83272),oe=r(4324),ne=r(65808),le=r(54525),de=r(3059),he=r(44568),ce=r(99709),ue=r(10626),pe=r(1989),me=r(31475),ge=r(82082),fe=function(){var e=this,t=e._self._c;return t("div",[t("cub-standard-filter-drawer",{model:{value:e.filterDrawer,callback:function(t){e.filterDrawer=t},expression:"filterDrawer"}}),t(ce.Z,{attrs:{app:""},model:{value:e.drawer,callback:function(t){e.drawer=t},expression:"drawer"}},[t(g.EB,{staticStyle:{position:"relative",color:"white",cursor:"pointer","background-color":"#367fa9",height:"48px","align-content":"center","justify-content":"center","font-size":"1.5rem","text-decoration":"none !important"},attrs:{href:"/index.html",tag:"a"}},[e._v(" CUBOT BI "),t(g.Qq,{staticStyle:{right:"0px",position:"absolute","padding-left":"2px","font-size":"0.65rem"}},[e._v("v11.20 ")])],1),t("router-view",{attrs:{name:"nav_drawer"}})],1),t(se.Z,{attrs:{app:"",color:"#3c8dbc",dark:"",height:"48"}},[t(ae.Z,{on:{click:function(t){t.stopPropagation(),e.drawer=!e.drawer}}}),t(pe.Z,{attrs:{dark:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t(me.Z),e._l(e.tabs,(function(r){return t(ue.Z,{key:r.id,attrs:{to:r.location}},[e._v(e._s(r.name))])}))],2),t(y.Z),t("router-link",{staticStyle:{display:"none","text-decoration":"None",color:"white","font-size":"larger","margin-right":"8px"},attrs:{title:"Metadata",to:"/metadata",target:"_blank"}},[e._v("M")]),t(ie.Z,{attrs:{tile:"",content:e.appliedFilterCount,color:"#3c8dbc"}},[t(oe.Z,{attrs:{dark:"",title:"Filter",ripple:"false"},on:{click:function(t){e.filterDrawer=!e.filterDrawer}}},[e._v("mdi-filter")])],1),t(he.Z,{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(p.Z,e._g(e._b({attrs:{text:"",small:""}},"v-btn",s,!1),r),[e._v(e._s(e.userName))])]}}])},[t(ne.Z,[t(le.Z,{on:{click:e.logout}},[e._v("Logout")])],1)],1),t(ge.Z,{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return["INVALID"!=e.getRegenStatus?t(oe.Z,e._g(e._b({attrs:{dark:"",ripple:"false"}},"v-icon",s,!1),r),[e._v(e._s("INPROGRESS"==e.getRegenStatus?"mdi-autorenew mdi-spin":"mdi-autorenew"))]):e._e()]}}])},[t("span",[e._v(e._s(e.getRegenMessage))])])],1),t(de.Z,{attrs:{app:""}},[t("router-view",{ref:"myroute",attrs:{name:"content_window"}})],1)],1)},ye=[],ve=r(42095),Ie=r(82936),be=r(44127),_e=r(83336),De=r(92540),Ce=r(17808),Se=function(){var e=this,t=e._self._c;return t(ce.Z,{staticClass:"el1",style:`margin-top: ${e.$vuetify.application.top}px`,attrs:{"hide-overlay":"",temporary:"",right:"",clipped:"",app:""},model:{value:e.internalShowFilterList,callback:function(t){e.internalShowFilterList=t},expression:"internalShowFilterList"}},[t(g.EB,{staticClass:"pa-1",staticStyle:{height:"48px"}},[t(y.Z),t(p.Z,{staticClass:"ma-1",attrs:{tile:"",color:"#3c8dbc",dark:""},on:{click:function(t){return e.applyFilters()}}},[e._v("Apply Filter")])],1),t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%"},attrs:{id:"filterList"}},[e.addFilterDialog?t("div",[t("cub-add-filter",{model:{value:e.addFilterDialog,callback:function(t){e.addFilterDialog=t},expression:"addFilterDialog"}})],1):e._e(),t(g.ZB,{staticClass:"pa-0 ml-0",staticStyle:{height:"calc(100% - 96px)"}},[t(De.Z,{staticStyle:{height:"24px","background-color":"#3c8dbc",color:"white"},attrs:{light:""}},[e._v(" Quick Filters "),t(y.Z),t(oe.Z,{staticClass:"ma-1",attrs:{dark:"",title:"Clear quick filters"},on:{click:function(t){return e.clearSessionFilters()}}},[e._v("mdi-filter-remove ")])],1),t("div",{style:{height:"40%",overflow:"hidden auto"}},e._l(e.sessionFilterDimensions,(function(r,s){return t("div",{key:s,staticClass:"px-1",attrs:{xs4:"",sm2:""}},["time"==r.Table&&r.DataSubType&&"date"==r.DataSubType?t(he.Z,{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({}){return[t(Ce.Z,{attrs:{"append-icon":"event","hide-details":"",label:r.Name},on:{"click:append":function(t){e.dateMenu=!e.dateMenu}},model:{value:e.dateValue,callback:function(t){e.dateValue=t},expression:"dateValue"}})]}}],null,!0),model:{value:e.dateMenu,callback:function(t){e.dateMenu=t},expression:"dateMenu"}},[t(_e.Z,{attrs:{range:"","no-title":"",scrollable:""},model:{value:e.dateValue,callback:function(t){e.dateValue=t},expression:"dateValue"}},[t(y.Z),t(p.Z,{attrs:{text:"",color:"primary"},on:{click:function(t){e.dateMenu=!1}}},[e._v("OK")])],1)],1):"CALENDAR_PERIODS"==r.Table&&"LOCAL_DATE"==r.Column?t(he.Z,{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({}){return[t(Ce.Z,{attrs:{"append-icon":"event","hide-details":"",label:r.Name},on:{"click:append":function(t){e.nepaliDateMenu=!e.nepaliDateMenu}},model:{value:e.nepaliDateValue,callback:function(t){e.nepaliDateValue=t},expression:"nepaliDateValue"}})]}}],null,!0),model:{value:e.nepaliDateMenu,callback:function(t){e.nepaliDateMenu=t},expression:"nepaliDateMenu"}},[t("v-nepalidatepicker",{attrs:{calenderType:"Nepali",placeholder:r.Name,format:"YYYYMMDD"},model:{value:e.nepaliDateValue,callback:function(t){e.nepaliDateValue=t},expression:"nepaliDateValue"}},[t(y.Z),t(p.Z,{attrs:{text:"",color:"primary"},on:{click:function(t){e.nepaliDateMenu=!1}}},[e._v("OK")])],1)],1):t(Ie.Z,{staticStyle:{"margin-top":"16px"},attrs:{dense:"","hide-details":"","item-key":r.Id,items:e.sessionFilterDisplayValues[r.Id],loading:e.isLoading,label:r.Name,multiple:""},on:{change:function(t){return e.getDependentFilterValues(r)}},scopedSlots:e._u([{key:"selection",fn:function({item:s,index:a}){return[0==a&&1==e.sessionFiltersChecked[r.Id].length?t(be.Z,[s.text?t("span",[e._v(e._s(s.text))]):t("span",[e._v(e._s(s))])]):e._e(),1===a?t("span",{staticClass:"grey--text caption"},[e._v(e._s(e.sessionFiltersChecked[r.Id].length)+" Options Selected")]):e._e()]}}],null,!0),model:{value:e.sessionFiltersChecked[r.Id],callback:function(t){e.$set(e.sessionFiltersChecked,r.Id,t)},expression:"sessionFiltersChecked[element.Id]"}})],1)})),0),t(De.Z,{staticStyle:{height:"24px","background-color":"#3c8dbc",color:"white"},attrs:{light:""}},[e._v(" My Filters "),t(y.Z),t(oe.Z,{staticClass:"ma-1",staticStyle:{"margin-top":"8px",float:"right",cursor:"pointer"},attrs:{dark:"",title:"Add Filter"},on:{click:function(t){return t.stopPropagation(),(()=>{e.addFilterDialog=!0}).apply(null,arguments)}}},[e._v("add")])],1),t("div",{staticClass:"pl-1",staticStyle:{height:"calc(60% - 48px)",overflow:"hidden auto","min-height":"44px"}},e._l(e.checkItems,(function(r,s){return t("div",{key:s},[t("div",{staticStyle:{display:"inline-block",height:"auto",width:"-webkit-fill-available"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.checkboxes,expression:"checkboxes"}],key:r.FilterId,attrs:{id:r.FilterId,type:"checkbox"},domProps:{value:r,checked:Array.isArray(e.checkboxes)?e._i(e.checkboxes,r)>-1:e.checkboxes},on:{change:[function(t){var s=e.checkboxes,a=t.target,i=!!a.checked;if(Array.isArray(s)){var o=r,n=e._i(s,o);a.checked?n<0&&(e.checkboxes=s.concat([o])):n>-1&&(e.checkboxes=s.slice(0,n).concat(s.slice(n+1)))}else e.checkboxes=i},function(t){return t.stopPropagation(),t.preventDefault(),e.toggleUserFilter(r)}]}}),t("label",{staticStyle:{color:"black"},attrs:{title:e.getFilterDetails(r)}},[e._v(e._s(e.getFilterDisplayValue(r)))]),t(oe.Z,{staticStyle:{float:"right",cursor:"pointer"},attrs:{slot:"activator",small:""},on:{click:function(t){return e.deleteFilter(r)}},slot:"activator"},[e._v("delete ")]),t(oe.Z,{staticStyle:{float:"right",cursor:"pointer"},attrs:{slot:"activator",small:""},on:{click:function(t){return e.editFilter(r)}},slot:"activator"},[e._v("create ")])],1)])})),0)],1)],1)],1)},Fe=[],we=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"background-color":"white"}},[t("div",{staticClass:"calendar__body"},[t("div",{staticClass:"calendar__month"},[t("button",{staticClass:"calendar__month__prev",on:{click:function(t){return e.prev()}}},[t("b",[e._v(">")])]),t("span",[e._v(e._s(e.formatedYearOrMonth))]),this.monthSelect?t("select",{directives:[{name:"model",rawName:"v-model",value:e.monthValue,expression:"monthValue"}],attrs:{size:"mini"},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.monthValue=t.target.multiple?r:r[0]},e.monthSelectChange]}},e._l(e.getMonthsList,(function(e,r){return t("option",{key:e,staticStyle:{"text-align-last":"center"},attrs:{label:e},domProps:{value:r}})})),0):e._e(),this.yearSelect?t("select",{directives:[{name:"model",rawName:"v-model",value:e.yearValue,expression:"yearValue"}],staticStyle:{"margin-left":"5px"},attrs:{size:"mini"},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.yearValue=t.target.multiple?r:r[0]},e.yearSelectChange]}},e._l(e.numberofYears,(function(r){return t("option",{key:r,staticStyle:{"text-align-last":"center"},attrs:{label:e.formatNepali?e.getNepaliDateWithYear(e.startingYear+(r-1)).substr(0,4):e.startingYear+(r-1)},domProps:{value:e.startingYear+(r-1)}})})),0):e._e(),t("button",{attrs:{icon:"el-icon-arrow-right"},on:{click:function(t){return e.next()}}},[t("b",[e._v(">")])])]),t("div",{staticStyle:{padding:"3px"}},[t("div",{staticClass:"calendar__weeks"},e._l(e.weekdays,(function(r,s){return t("div",{key:s,staticClass:"calendar__weekday",staticStyle:{"font-weight":"bold"}},[e._v(" "+e._s(r)+" ")])})),0),t("div",{staticClass:"calendar__days"},[t("div",{staticClass:"calendar__day_spacer",style:{gridColumn:`span ${e.startweek}`}}),e._l(e.days,(function(r,s){return t("div",{key:s,class:["calendar__day",{selected:e.active(r)},{today:e.checkToday(r)}],on:{click:function(t){return e.select(r)}}},[e._v(" "+e._s(e.formatNepali?e.convertToNepali(r).substr(8,10):r.day)+" ")])}))],2)])]),t("div",{staticClass:"calendar__footer"},[t("button",{on:{click:function(t){return e.today()}}},[e._v(e._s(e.formatedTodayText))])])])},xe=[],Te=r(51778);const Ee=[{year:2e3,value:[30,32,31,32,31,30,30,30,29,30,29,31]},{year:2001,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2002,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2003,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2004,value:[30,32,31,32,31,30,30,30,29,30,29,31]},{year:2005,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2006,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2007,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2007,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2008,value:[31,31,31,32,31,31,29,30,30,29,29,31]},{year:2009,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2010,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2011,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2012,value:[31,31,31,32,31,31,29,30,30,29,30,30]},{year:2013,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2014,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2015,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2016,value:[31,31,31,32,31,31,29,30,30,29,30,30]},{year:2017,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2018,value:[31,32,31,32,31,30,30,29,30,29,30,30]},{year:2019,value:[31,32,31,32,31,30,30,30,29,30,29,31]},{year:2020,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2021,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2022,value:[31,32,31,32,31,30,30,30,29,29,30,30]},{year:2023,value:[31,32,31,32,31,30,30,30,29,30,29,31]},{year:2024,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2025,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2026,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2027,value:[30,32,31,32,31,30,30,30,29,30,29,31]},{year:2028,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2029,value:[31,31,32,31,32,30,30,29,30,29,30,30]},{year:2030,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2031,value:[30,32,31,32,31,30,30,30,29,30,29,31]},{year:2032,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2033,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2034,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2035,value:[30,32,31,32,31,31,29,30,30,29,29,31]},{year:2036,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2037,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2038,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2039,value:[31,31,31,32,31,31,29,30,30,29,30,30]},{year:2040,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2041,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2042,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2043,value:[31,31,31,32,31,31,29,30,30,29,30,30]},{year:2044,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2045,value:[31,32,31,32,31,30,30,29,30,29,30,30]},{year:2046,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2047,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2048,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2049,value:[31,32,31,32,31,30,30,30,29,29,30,30]},{year:2050,value:[31,32,31,32,31,30,30,30,29,30,29,31]},{year:2051,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2052,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2053,value:[31,32,31,32,31,30,30,30,29,29,30,30]},{year:2054,value:[31,32,31,32,31,30,30,30,29,30,29,31]},{year:2055,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2056,value:[31,31,32,31,32,30,30,29,30,29,30,30]},{year:2057,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2058,value:[30,32,31,32,31,30,30,30,29,30,29,31]},{year:2059,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2060,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2061,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2062,value:[30,32,31,32,31,31,29,30,29,30,29,31]},{year:2063,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2064,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2065,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2066,value:[31,31,31,32,31,31,29,30,30,29,29,31]},{year:2067,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2068,value:[31,31,32,32,31,30,30,29,30,29,30,30]},{year:2069,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2070,value:[31,31,31,32,31,31,29,30,30,29,30,30]},{year:2071,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2072,value:[31,32,31,32,31,30,30,29,30,29,30,30]},{year:2073,value:[31,32,31,32,31,30,30,30,29,29,30,31]},{year:2074,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2075,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2076,value:[31,32,31,32,31,30,30,30,29,29,30,30]},{year:2077,value:[31,32,31,32,31,30,30,30,29,30,29,31]},{year:2078,value:[31,31,31,32,31,31,30,29,30,29,30,30]},{year:2079,value:[31,31,32,31,31,31,30,29,30,29,30,30]},{year:2080,value:[31,32,31,32,31,30,30,30,29,29,30,30]},{year:2081,value:[31,31,32,32,31,30,30,30,29,30,30,30]},{year:2082,value:[30,32,31,32,31,30,30,30,29,30,30,30]},{year:2083,value:[31,31,32,31,31,30,30,30,29,30,30,30]},{year:2084,value:[31,31,32,31,31,30,30,30,29,30,30,30]},{year:2085,value:[31,32,31,32,30,31,30,30,29,30,30,30]},{year:2086,value:[30,32,31,32,31,30,30,30,29,30,30,30]},{year:2087,value:[31,31,32,31,31,31,30,30,29,30,30,30]},{year:2088,value:[30,31,32,32,30,31,30,30,29,30,30,30]},{year:2089,value:[30,32,31,32,31,30,30,30,29,30,30,30]},{year:2090,value:[30,32,31,32,31,30,30,30,29,30,30,30]},{year:2091,value:[31,31,32,31,31,31,30,30,29,30,30,30]},{year:2092,value:[30,31,32,32,31,30,30,30,29,30,30,30]},{year:2093,value:[30,32,31,32,31,30,30,30,29,30,30,30]},{year:2094,value:[31,31,32,31,31,30,30,30,29,30,30,30]},{year:2095,value:[31,31,32,31,31,31,30,29,30,30,30,30]},{year:2096,value:[30,31,32,32,31,30,30,29,30,29,30,30]},{year:2097,value:[31,32,31,32,31,30,30,30,29,30,30,30]},{year:2098,value:[31,31,32,31,31,31,29,30,29,30,29,31]},{year:2099,value:[31,31,32,31,31,31,30,29,29,30,30,30]}],ke=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Le=["आइत","सोम","मंगल","बुध","बिहि","शुक्र","शनि"],Me=["Baisakh","Jestha","Asar","Shrawan","Bhadra","Aswin","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],Ae=["बैशाख","जेठ","असार","श्रावण","भाद्र","आश्विन","कार्तिक","मंसिर","पौष","माघ","फाल्गुण","चैत्र"];var Ne={name:"VNepalidatepicker",props:{value:{type:Array,default:[]},format:{type:String,default:"YYYY-MM-DD"},calenderType:{type:String,default:"English"},yearSelect:{type:Boolean,default:!0},monthSelect:{type:Boolean,default:!0},classValue:{type:String,default:""},placeholder:{type:String,default:""}},model:{event:"change"},data(){return{selectedDates:[],date:""==this.value?new Te["default"]:new Te["default"](this.value),formatedValue:this.value,visible:!1,startingYear:2001,numberofYears:87,formatNepali:"Nepali"==this.calenderType,endDay:null,yearValue:""==this.value?(new Te["default"]).getYear():new Te["default"](this.value).getYear(),monthValue:""==this.value?(new Te["default"]).getMonth():new Te["default"](this.value).getMonth(),startMonthValue:null,currentDateValue:void 0}},computed:{getMonthsList(){return this.formatNepali?Ae:Me},year(){return this.date.year},weekdays(){return this.formatNepali?Le:ke},days(){return Ee.forEach((e=>{e.year==this.date.year&&e.value.forEach(((e,t)=>{t==this.date.month&&(this.endDay=e)}))})),Array(this.endDay).fill().map(((e,t)=>new Te["default"](this.year,this.date.month,t+1)))},startweek(){let e=new Te["default"](this.yearValue,this.monthValue,1);return ke.forEach(((t,r)=>{"Sun"==e.format("DDD")?this.startMonthValue=7:e.format("DDD")==t&&(this.startMonthValue=r)})),this.startMonthValue},formatedYearOrMonth(){return 0==this.monthSelect&&0==this.yearSelect?this.formatNepali?this.date.format("mmmm yyyy"):this.date.format("MMMM YYYY"):0==this.monthSelect?this.formatNepali?this.date.format("mmmm"):this.date.format("MMMM"):0==this.yearSelect?this.formatNepali?this.date.format("yyyy"):this.date.format("YYYY"):""},formatedYear(){return this.formatNepali?this.date.format("yyyy"):this.date.format("YYYY")},formatedDate(){return this.formatNepali?this.date.format("dddd, dd mmmm"):this.date.format("DDDD, DD MMMM")},formatedTodayText(){return this.formatNepali?"आज":"Today"}},methods:{convertToNepali(e){return new Te["default"](e).format("yyyy-mm-dd")},getNepaliDateWithYear(e){return new Te["default"](e,0,1).format("yyyy-mm-dd")},checkToday(e){let t=new Te["default"];return e.day==t.day&&e.year==t.year&&e.month==t.month},next(){let e=this.date.month+1,t=this.date.year;e>11&&(t++,e=0),this.setMonthAndYear(e,t),this.date=new Te["default"](t,e,1)},prev(){let e=this.date.month-1,t=this.date.year;e<0&&(t--,e=11),this.setMonthAndYear(e,t),this.date=new Te["default"](t,e,1)},monthSelectChange(){this.date.setMonth(this.monthValue)},yearSelectChange(){this.date.setYear(this.yearValue)},active(e){return 2==this.selectedDates.length&&e.getTime()>=this.selectedDates[0].getTime()&&e.getTime()<=this.selectedDates[1].getTime()||e.getTime()===this.date.getTime()},select(e){this.date=e,this.formatedValue=this.date.format(this.format),2==this.selectedDates.length&&(this.selectedDates=[]),this.selectedDates.push(e),this.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})),2==this.selectedDates.length&&this.selectedDates[0].getTime()===this.selectedDates[1].getTime()&&this.selectedDates.shift();var t=this,r=this.selectedDates.map((function(e){return e.format(t.format)}));this.$emit("change",r),this.hide()},show(){this.visible=!0,setTimeout((()=>document.addEventListener("click",this.hide)),200)},hide(){this.visible=!1,document.removeEventListener("click",this.hide)},today(){this.select(new Te["default"]),this.setMonthAndYear(this.date.getMonth(),this.date.getYear())},setMonthAndYear(e,t){this.monthValue=e,this.yearValue=t}}},Re=Ne,Oe=(0,D.Z)(Re,we,xe,!1,null,"6d163aa0",null),Be=Oe.exports,Ze=r(31267),Pe=r(43201),Ve=r(45187),Ue=r(91137),$e=r(36878),Ge=r(29884),je=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"700px"},model:{value:e.internalShowDialog,callback:function(t){e.internalShowDialog=t},expression:"internalShowDialog"}},[t(w.Z,{attrs:{timeout:e.snackbarItems.timeout,color:e.snackbarItems.color,top:!0},model:{value:e.snackbarItems.showSnack,callback:function(t){e.$set(e.snackbarItems,"showSnack",t)},expression:"snackbarItems.showSnack"}},[e._v(e._s(e.snackbarItems.msg))]),t(m.Z,{attrs:{id:"add-filter"}},[t(g.EB,{staticClass:"grey lighten-4 py-4 title"},[e._v(" "+e._s(e.isEdit?"Edit Filter":"Add Filter")+" "),t(y.Z),t(oe.Z,{attrs:{title:"Toggle filter mode"},on:{click:()=>e.toggleExposureIcon=!e.toggleExposureIcon}},[e._v("exposure")])],1),e.toggleExposureIcon?e.toggleExposureIcon?t(n.Z,{staticClass:"pa-2"},[t(Pe.Z,[t(Ze.Z,{attrs:{xs12:"",sm6:"",md4:""}},[t(ne.Z,{staticStyle:{height:"300px","overflow-y":"auto"},attrs:{dense:""}},e._l(e.normalFilterList,(function(r,s){return t(le.Z,{key:s,staticStyle:{"min-height":"24px",height:"24px"},attrs:{title:e.getFilterDetails(r)}},[r.isNormalFilter?t(Ue.km,[t(Ue.V9,[e._v(" "+e._s(s+1)+") "+e._s(e.getFilterDisplayValue(r))+" ")])],1):e._e()],1)})),1)],1),t(Ze.Z,{attrs:{"pl-2":"",md8:""}},[t(Pe.Z,{attrs:{column:""}},[t(Ze.Z,{attrs:{md1:""}},[t(Ce.Z,{attrs:{label:"Filter Name"},model:{value:e.filterName,callback:function(t){e.filterName=t},expression:"filterName"}})],1),t(Ze.Z,{attrs:{md1:""}},[t(Ce.Z,{attrs:{hint:e.incorrectExpression?"Incorrect expression..!":"",label:"Filter Expression"},model:{value:e.filterExpression,callback:function(t){e.filterExpression=t},expression:"filterExpression"}},[t("template",{slot:"append"},[t(p.Z,{attrs:{small:"",color:"primary"},on:{click:function(t){return e.describeExpression()}}},[e._v("Describe")])],1)],2)],1),t(Ze.Z,{attrs:{"fill-height":"",md9:""}},[t("h3",[e._v("Filter Description:")]),t("p",[e._v(e._s(e.decodedFilterExpression))])]),t(Ze.Z,{attrs:{"align-self-end":"",md1:""}},[t(Pe.Z,{attrs:{"align-end":"","justify-end":""}},[t(Ge.Z,{staticStyle:{float:"right"},attrs:{ripple:"",label:"Permanent Filter"},model:{value:e.isPermanentFilter,callback:function(t){e.isPermanentFilter=t},expression:"isPermanentFilter"}})],1)],1)],1)],1)],1)],1):e._e():t(n.Z,{staticClass:"pa-2",attrs:{"grid-list-sm":""}},[t(Pe.Z,{attrs:{row:"",wrap:""}},[t(Ze.Z,{attrs:{xs12:"","align-center":"","justify-space-between":""}},[t(p.Z,{attrs:{depressed:"",color:e.isDimensionFilter?"primary":"",title:"Dimensions"},on:{click:()=>e.isDimensionFilter=!0}},[e._v("Dimension")]),t(p.Z,{attrs:{depressed:"",color:e.isDimensionFilter?"":"primary",title:"Measures"},on:{click:()=>e.isDimensionFilter=!1}},[e._v("Measure")]),t(Pe.Z,{staticStyle:{"margin-top":"12px"},attrs:{"align-center":""}},[t(Ie.Z,{staticStyle:{"margin-right":"4px"},attrs:{dense:"",items:e.searchInput&&0!=e.searchInput.length?e.allItemsWithGroupNameSuffix:e.allItemsWithoutGroupNameSuffix,label:e.isDimensionFilter?"Select Dimension":"Select Measure","search-input":e.searchInput,"item-text":"Name","item-value":"Id"},on:{"update:searchInput":function(t){e.searchInput=t},"update:search-input":function(t){e.searchInput=t},change:function(t){return e.optedDimension(e.selectedDimension)}},model:{value:e.selectedDimension,callback:function(t){e.selectedDimension=t},expression:"selectedDimension"}})],1)],1),t(Ze.Z,{attrs:{xs12:""}},[t(Ce.Z,{attrs:{value:e.filterName,label:"Filter Name",maxlength:"25",hint:"max. of 25 characters allowed"},on:{change:t=>e.filterName=t}})],1),t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t($e.Z,{attrs:{items:e.operators,label:"Filter Operator",standard:""},model:{value:e.selectedOperator,callback:function(t){e.selectedOperator=t},expression:"selectedOperator"}})],1),e.isDate?t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t(he.Z,{ref:"startdatemenu",attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({attrs:{label:"Start Date","append-icon":"event"},model:{value:e.fromValue,callback:function(t){e.fromValue=t},expression:"fromValue"}},r))]}}],null,!1,2683260674),model:{value:e.startdatemenu,callback:function(t){e.startdatemenu=t},expression:"startdatemenu"}},[t(_e.Z,{attrs:{"no-title":"",scrollable:"",multiple:e.isMultiDate},model:{value:e.fromValue,callback:function(t){e.fromValue=t},expression:"fromValue"}})],1)],1):t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t(Ce.Z,{attrs:{label:"Between"!=e.selectedOperator?"Value":"From Value","append-icon":e.isLikeCategory?"refresh":void 0},on:{"click:append":e.operatorSelected},model:{value:e.fromValue,callback:function(t){e.fromValue=t},expression:"fromValue"}})],1),e.isDate&&"Between"==e.selectedOperator?t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t(he.Z,{ref:"enddatemenu",attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({attrs:{label:"End Date","append-icon":"event"},model:{value:e.toValue,callback:function(t){e.toValue=t},expression:"toValue"}},r))]}}],null,!1,3188354048),model:{value:e.enddatemenu,callback:function(t){e.enddatemenu=t},expression:"enddatemenu"}},[t(_e.Z,{attrs:{"no-title":"",scrollable:""},on:{input:function(t){e.enddatemenu=!1}},model:{value:e.toValue,callback:function(t){e.toValue=t},expression:"toValue"}})],1)],1):e._e(),e.isDate&&"Equal To"==e.selectedOperator&&e.isDimensionFilter?t(Ze.Z,{attrs:{xs12:"",md4:""}},[t($e.Z,{attrs:{items:e.timeList,label:"Date Range"},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1):e._e(),!e.isDate&&"Between"!=e.selectedOperator&&e.isDimensionFilter&&e.showDropDown?t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t(Ie.Z,{staticStyle:{"margin-right":"4px","margin-top":"22px"},attrs:{dense:"",items:e.decodedFilterValue(e.selectedDimension,e.getAllDimFilters),loading:e.isLoading,label:"Select Values",multiple:e.isMultiSelect},scopedSlots:e._u([{key:"selection",fn:function({item:r,index:s}){return[0===s&&1==e.selectedDimFilters.length&&"string"!=typeof e.selectedDimFilters?t(be.Z,[r.text?t("span",[e._v(e._s(r.text))]):t("span",[e._v(e._s(r))])]):e._e(),0===s&&"string"==typeof e.selectedDimFilters?t(be.Z,[t("span",[e._v(e._s(e.selectedDimFilters))])]):e._e(),1===s?t("span",{staticClass:"grey--text caption"},[e._v(e._s(e.selectedDimFilters.length)+" Options Selected")]):e._e()]}}],null,!1,3175027965),model:{value:e.selectedDimFilters,callback:function(t){e.selectedDimFilters=t},expression:"selectedDimFilters"}},[e.isMultiSelect?t(le.Z,{attrs:{slot:"prepend-item",ripple:""},on:{click:function(t){return e.selectAllToggle()}},slot:"prepend-item"},[t(Ve.Z,[t(oe.Z,{attrs:{color:e.selectedDimFilters.length>0?"indigo darken-4":""}},[e._v("select_all")])],1),t(Ue.V9,[e._v("Select All")])],1):e._e()],1)],1):e._e(),"Between"!=e.selectedOperator||e.isDate?e._e():t(Ze.Z,{attrs:{xs12:"",sm4:""}},[t(Ce.Z,{attrs:{value:e.toValue,label:"To Value"},on:{change:t=>e.toValue=t}})],1),e.isASCIIFilter?e._e():t(Ze.Z,{attrs:{md12:""}},[t(g.EB,{staticClass:"my-0 py-0",staticStyle:{color:"red"}},[e._v("Note: Only ASCII characters are allowed.")])],1),e.isCurrentIncompatible?t(Ze.Z,{attrs:{md12:""}},[t(g.EB,{staticClass:"my-0 py-0",staticStyle:{color:"red"}},[e._v("Note: Current keyword is not allowed for this dimension.")])],1):e._e(),t("strong",{staticClass:"ma-4"}),"Between"!=e.selectedOperator?t(Ze.Z,{staticStyle:{height:"100px",overflow:"auto"},attrs:{xs12:"",sm8:""}},["string"!=typeof e.selectedDimFilters?t("div",e._l(e.decodedFilterValue(e.selectedDimension,e.selectedDimFilters),(function(r,s){return t(be.Z,{key:s,attrs:{small:"",color:"#387CA3","text-color":"white"}},["string"==typeof e.selectedDimFilters?t("span",[e._v(e._s(e.selectedDimFilters))]):e._e(),r.text&&"string"!=typeof e.selectedDimFilters?t("span",[e._v(e._s(r.text))]):t("span",[e._v(e._s(r))])])})),1):e._e(),"string"==typeof e.selectedDimFilters?t("div",["string"==typeof e.selectedDimFilters?t(be.Z,{attrs:{small:"",color:"#387CA3","text-color":"white"}},[t("span",[e._v(e._s(e.selectedDimFilters))])]):e._e()],1):e._e()]):e._e(),t(Ze.Z,{staticStyle:{float:"right"}},[t(y.Z),t(Ge.Z,{staticStyle:{float:"right"},attrs:{ripple:"",label:"Permanent Filter"},model:{value:e.isPermanentFilter,callback:function(t){e.isPermanentFilter=t},expression:"isPermanentFilter"}})],1)],1)],1),t(g.h7,[t(y.Z),t(p.Z,{attrs:{text:"",color:"red"},on:{click:function(t){return e.resetFilterDialog()}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:"",color:"primary",disabled:e.isDisabled},on:{click:function(t){return e.saveFilter()}}},[e._v("Save")])],1)],1)],1)},ze=[],qe=r(56922),We=qe.Z,Je=(0,D.Z)(We,je,ze,!1,null,"47702c96",null),He=Je.exports,Ke={name:"cub-standard-filter-drawer",mixins:[ve.Z],props:{showFilterList:Boolean},model:{prop:"showFilterList",event:"change"},components:{"cub-add-filter":He,"v-nepalidatepicker":Be},data:()=>({nepaliDateValue:[],reportId:"",dateValue:[],addFilterDialog:!1,getAllDimFilters:{},isLoading:!1,encodeOperDict:{eq:"=",lt:"<",gt:">",ge:">=",le:"<=",ne:"!=",bw:"bw",lk:"Contains",nlk:"Not Contains"},dateMenu:!1,nepaliDateMenu:!1}),created(){this.$root.$refs.CubStandardFilterDrawer=this,this.$route.params.reportId&&(this.reportId=this.$route.params.reportId,this.populateFilterItems())},watch:{$route(e,t){e.params.reportId?(this.reportId=e.params.reportId,this.populateFilterItems()):this.getReportToDetails||this.$store.commit("deleteAllCheckedFilters")},dateValue(e){2==e.length&&e[0]>e[1]&&e.sort()}},computed:{...(0,F.Se)(["getCheckedFilters","getReportById","getItemMetaById","getMetaNameById","getAllFilters","getSelectedFilters","getSessionFiltersChecked","getReportToDetails","getSharedDashboardReportById","getStandardFilterArray"]),checkboxes:{get:function(){return this.getCheckedFilters},set:function(e){this.$store.commit("setCheckedFilters",e)}},dependencyFilters(){return this.$store.state.dependencyFilters},quickFiltersHeight(){return 48*this.sessionFilterDimensionIds.length},checkItems(){for(var e=[],t=0;t<this.getAllFilters.length;t++)this.getAllFilters[t].isNormalFilter?this.getAllFilters[t].FilterItemId in this.$store.state.menuItems&&e.push(this.getAllFilters[t]):e.push(this.getAllFilters[t]);return e},sessionFiltersChecked:{get:function(){return this.getSessionFiltersChecked}},sessionFilterDisplayValues:{get:function(){for(var e={},t=0;t<this.sessionFilterDimensionIds.length;t++)void 0==this.sessionFiltersChecked[this.sessionFilterDimensionIds[t]]?e[this.sessionFilterDimensionIds[t]]=this.decodedFilterValue(this.sessionFilterDimensionIds[t],this.sessionFilterUnselectedValues[this.sessionFilterDimensionIds[t]]):e[this.sessionFilterDimensionIds[t]]=this.decodedFilterValue(this.sessionFilterDimensionIds[t],this.sessionFiltersChecked[this.sessionFilterDimensionIds[t]].concat(this.sessionFilterUnselectedValues[this.sessionFilterDimensionIds[t]]));return e}},sessionFilterUnselectedValues:function(){for(var e={},t=0;t<this.sessionFilterDimensionIds.length;t++)void 0==this.sessionFiltersChecked[this.sessionFilterDimensionIds[t]]?e[this.sessionFilterDimensionIds[t]]=this.getAllDimFilters[this.sessionFilterDimensionIds[t]]:e[this.sessionFilterDimensionIds[t]]=this.getAllDimFilters[this.sessionFilterDimensionIds[t]].filter((e=>!this.sessionFiltersChecked[this.sessionFilterDimensionIds[t]].includes(e)));return e},sessionFilterDimensions:{get:function(){for(var e=[],t=0;t<this.sessionFilterDimensionIds.length;t++)e.push(this.getItemMetaById(this.sessionFilterDimensionIds[t]));return e}},sessionFilterDimensionIds:{get:function(){for(var e=[],t=this.$store.state.standardFilters,r=0;r<t.length;r++)this.getItemMetaById(t[r])&&(e.push(t[r]),this.getFilterValuesFunc(t[r],""));return e}},internalShowFilterList:{get:function(){return this.showFilterList},set:function(e){this.$emit("change",e)}}},methods:{getDependentFilterValues(e){if(Object.keys(this.dependencyFilters).includes(e.Id)){var t=this.sessionFiltersChecked[e.Id];if(!t.length)return;var r=this.dependencyFilters[e.Id];if("CALENDAR_PERIODS"==e.Table&&"NEPALFINYR"==e.Column)for(var s=0;s<r.length;s++){var a=this.getItemMetaById(r[s]);"MST_CALPERIODS"==a.Table&&a.Column}for(s=0;s<r.length;s++){a=this.getItemMetaById(r[s]);var i="";if("CALENDAR_PERIODS"==e.Table&&"NEPALFINYR"==e.Column)"MST_CALPERIODS"==a.Table&&"FINYRPERIOD"==a.Column&&this.getMatchingValues(r[s],t);else{for(var o=[],n=0;n<t.length;n++)o.push("'"+t[n]+"'");i=e.Column+" in ("+o.join(",")+")",this.getFilterValuesFunc(r[s],i)}}}},getMatchingValues(e,t){this.$store.dispatch("getFilterValues",{dimensionId:e,whereClause:""}).then((r=>{if(r){for(var s=[],a=0;a<r.length;a++)for(var i=0;i<t.length;i++)r[a].includes(t[i])&&s.push(r[a]);this.filterValuesCallback(s,e)}}))},deleteFilter(e){var t=this.getCheckedFilters.findIndex((t=>t.FilterId==e.FilterId&&t.isNormalFilter==e.isNormalFilter));-1!=t&&this.$store.commit("deleteCheckedFilters",t);var r=this.getSelectedFilters.findIndex((t=>t.FilterId==e.FilterId));if(-1!=r&&this.$store.commit("deleteSelectedFilters",r),e.isPermanentFilter)if(e.isNormalFilter){var s={operationName:"deleteFilter",filterName:""};s.filterId=e.FilterId,s.filterOperation="",s.filterItemId="",s.filterValueStr="",this.$store.dispatch("doFilterOperation",s).then((e=>{}))}else{s={operationName:"deleteFilterExp",filterName:""};s.filterId=e.FilterId,s.filterOperation="",s.filterItemId="",s.filterValueStr="",this.$store.dispatch("doFilterOperation",s).then((e=>{}))}else this.$store.commit("deleteSessionFilters",e.FilterId),this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DELETE_FILTER_SUCCESS")},editFilter(e){var t=this.getCheckedFilters.findIndex((t=>t==e));-1!=t&&this.$store.commit("deleteCheckedFilters",t);var r=this.getSelectedFilters.findIndex((t=>t==e));-1!=r&&this.$store.commit("deleteSelectedFilters",r),this.$store.commit("setFilterId",e.FilterId),this.$store.commit("setNormalFilterAttr",e.isNormalFilter),this.addFilterDialog=!0},filterValuesCallback(e,t){this.sessionFiltersChecked[t]?this.$set(this.getAllDimFilters,t,this.sessionFiltersChecked[t].concat(e)):this.$set(this.getAllDimFilters,t,e)},getFilterValuesFunc(e,t){this.$store.dispatch("getFilterValues",{dimensionId:e,whereClause:t}).then((t=>{t&&this.filterValuesCallback(t,e)}))},toggleUserFilter(e){if(!e)return!1;this.uncheckSameDimensionFilters(e)},applyFilters(){this.$store.commit("deleteAllSelectedFilters"),this.$store.commit("setSelectedFilters",this.checkboxes);var e=Object.keys(this.sessionFiltersChecked),t=new Array;if(this.$store.commit("deleteStandardFilterArray"),e.length)for(var r=0;r<e.length;r++)if("146"!=e[r]&&"184"!=e[r]&&this.sessionFiltersChecked[e[r]].length){var s=new Object;s.FilterItemId=e[r],s.FilterOper="eq",s.FilterValues=Object.values(this.sessionFiltersChecked[e[r]]).join(this.CUB_FILTER_DELIM),s.isNormalFilter=!0,t.push(s)}if(this.dateValue.length){s=new Object;s.FilterItemId="146",s.FilterOper="eq",2==this.dateValue.length&&(s.FilterOper="bw"),s.FilterValues=this.dateValue.join(this.CUB_FILTER_DELIM),s.isNormalFilter=!0,t.push(s),this.sessionFiltersChecked["146"]=this.dateValue}if(this.nepaliDateValue.length){s=new Object;s.FilterItemId="184",s.FilterOper="eq",2==this.nepaliDateValue.length&&(s.FilterOper="bw"),s.FilterValues=this.nepaliDateValue.join(this.CUB_FILTER_DELIM),s.isNormalFilter=!0,t.push(s),this.sessionFiltersChecked["184"]=this.nepaliDateValue}this.$store.commit("setStandardFilterArray",t),this.$parent.$refs.myroute.applyFilters()},populateFilterItems(){if("reports"==this.$route.name||"analyze"==this.$route.name||!this.getSelectedFilters.length){this.$store.commit("deleteAllCheckedFilters");var e=this.getReportById(this.reportId);e||(e=this.getSharedDashboardReportById(this.reportId));for(var t=e.DimensionFilters,r=e.MeasureFilters,s=this.filterStringToArray(t),a=this.filterStringToArray(r),i=this.filterStringToArray(e.FilterLogic,1),o=s.concat(a.concat(i)),n=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray),l=this.resolveFilterArrays(o,n),d=0;d<l.length;d++)this.getStandardFilterArray.includes(l[d])||this.insertIntoCheckedFilters(l[d]);this.$store.commit("setSelectedFilters",this.checkboxes)}},clearSessionFilters(){this.sessionFiltersChecked={},this.dateValue=[],this.nepaliDateValue=[],this.$store.commit("setSessionFiltersChecked",{}),this.$store.commit("deleteStandardFilterArray")},resetReportFilters(){this.$store.commit("deleteAllSelectedFilters"),this.applyFilters()}}},Ye=Ke,Xe=(0,D.Z)(Ye,Se,Fe,!1,null,null,null),Qe=Xe.exports,et={name:"home",mixins:[ve.Z],components:{"cub-standard-filter-drawer":Qe},data:()=>({test:!1,filterDrawer:!1,drawer:!0,activeTab:"/home/dashboard",timer:null}),created(){this.timer=setInterval((()=>{this.$store.dispatch("getUserSettings")}),6e4)},computed:{...(0,F.Se)(["getDefaultPageAfterLogin","getConnId","getInstanceName","getUserId","getSelectedFilters","getStandardFilterArray","getAccessList","getDataAsOf","getRegenStatus","getETLStartTime","getETLEndTime"]),getRegenMessage(){return"INPROGRESS"==this.getRegenStatus?"ETL IN PROGRESS. STARTED AT: "+this.getETLStartTime:"LAST ETL COMPLETED AT: "+this.getETLEndTime},tabs(){var e=[];return this.getAccessList.includes("Reports")&&e.push({id:1,name:"Reports",location:"/home/reports"}),this.getAccessList.includes("Dashboard")&&e.push({id:2,name:"Dashboard",location:"/home/dashboard"}),this.getAccessList.includes("Analyze")&&e.push({id:3,name:"Explorer",location:"/home/analyze"}),this.getAccessList.includes("View Details")&&e.push({id:4,name:"Details",location:"/home/details"}),this.getAccessList.includes("Query")&&e.push({id:4,name:"Query",location:"/home/query"}),e},appliedFilterCount(){var e=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray);return e.length},userName(){return this.$store.state.userName},vboxLink(){return"/VBox/index.html?noiframe=1&rdn="+Math.floor(1e9*Math.random())+"&conn="+this.getConnId+"&mmenu=35&db="+this.getInstanceName+"&uid="+this.getUserId}},methods:{logout(){this.$store.dispatch("logoutCubot").then((e=>{e&&this.$router.push("/login")}))}}},tt=et,rt=(0,D.Z)(tt,fe,ye,!1,null,"2425f125",null),st=rt.exports,at=r(9570),it=r(65005),ot=r(96313),nt=r(97953),lt=function(){var e=this,t=e._self._c;return t(i.Z,[t(de.Z,[t(n.Z,{attrs:{fluid:"","fill-height":""}},[t(Pe.Z,{attrs:{"align-center":"","justify-center":""}},[t(Ze.Z,{attrs:{xs12:"",sm8:"",md4:""}},[t(m.Z,{staticClass:"elevation-12"},[t(it.Z,{ref:"form",model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[t(ot.Z,{attrs:{color:"primary",dark:"",flat:""}},[t(nt.qW,[e._v("Login")])],1),t(g.ZB,[t(at.Z,{attrs:{required:"",items:e.availableInstances,label:"Instance"},model:{value:e.selectedInstance,callback:function(t){e.selectedInstance=t},expression:"selectedInstance"}}),t(Ce.Z,{attrs:{required:"",rules:[e.rules.required],label:"User Name","prepend-icon":"person",type:"text"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userLogin.apply(null,arguments)}},model:{value:e.userId,callback:function(t){e.userId=t},expression:"userId"}}),t(Ce.Z,{attrs:{required:"",label:"Password","prepend-icon":"lock",type:"password",error:e.isError,rules:[e.rules.required],"error-messages":e.errorMessage},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userLogin.apply(null,arguments)}},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1),t(g.h7,[t(y.Z),t(p.Z,{attrs:{disabled:!e.valid,color:"primary"},on:{click:e.userLogin}},[e._v("Login")])],1)],1)],1)],1)],1)],1)],1)],1)},dt=[],ht={name:"cub-login",data:function(){return{userId:"",password:"",isError:!1,errorMessage:"",selectedInstance:"",rules:{required:e=>!!e||"Required."},valid:!1}},created:function(){},mounted:function(){this.selectedInstance=this.availableInstances[0]},computed:{...(0,F.Se)(["availableInstances"])},methods:{userLogin(){this.$store.dispatch("loginCubot",[this.userId,this.password,this.selectedInstance,""]).then((e=>{e?this.$router.push("/home"):(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","INVALID_CREDENTIALS"))}))}}},ct=ht,ut=(0,D.Z)(ct,lt,dt,!1,null,null,null),pt=ut.exports,mt=r(99223),gt=r(77912),ft=function(){var e=this,t=e._self._c;return t(m.Z,{staticStyle:{height:"calc(100% - 48px)",overflow:"auto"}},[t(f.Z,{attrs:{width:"700px"},model:{value:e.dashNameDialog,callback:function(t){e.dashNameDialog=t},expression:"dashNameDialog"}},[t(m.Z,[t(g.EB,{staticStyle:{"background-color":"rgb(60, 141, 188)",color:"white"}},[e._v(" Dashboard Name: "),t(y.Z),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){e.dashNameDialog=!1}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){return e.addDashboard()}}},[e._v("Add")])],1),t(g.ZB,[t(Ce.Z,{attrs:{label:"Name"},model:{value:e.dashName,callback:function(t){e.dashName=t},expression:"dashName"}})],1)],1)],1),t(g.EB,[e._v(" My Dashboards "),t(y.Z),t(oe.Z,{attrs:{large:"",color:"green darken-2",title:"Add Dashboard"},on:{click:function(t){e.dashNameDialog=!0}}},[e._v("mdi-plus")])],1),t(mt.Z),e.dashboardCollection.length?e._e():t("p",{staticClass:"font-italic text-center mb-0"},[e._v(" Nothing to show. ")]),t(g.ZB,{staticClass:"pa-0"},[t(gt.Z,{attrs:{color:"indigo"},model:{value:e.dashId,callback:function(t){e.dashId=t},expression:"dashId"}},[t("draggable",{attrs:{tag:"v-list",handle:".handle"},model:{value:e.dashboardCollection,callback:function(t){e.dashboardCollection=t},expression:"dashboardCollection"}},e._l(e.dashboardCollection,(function(r){return t(le.Z,{key:r.Id,staticClass:"px-1",attrs:{value:r.Id},on:{click:function(t){return e.dashChanged(r.Id)}}},[t(oe.Z,{staticClass:"handle"},[e._v("mdi-drag-vertical")]),t(Ue.km,{attrs:{id:r.Id}},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name)+" ")])],1)],1)})),1)],1)],1),t(mt.Z),t(g.EB,[e._v("Shared Dashboards")]),t(mt.Z),e.sharedDashboards.length?e._e():t("p",{staticClass:"font-italic text-center mb-0"},[e._v(" Nothing to show. ")]),t(g.ZB,{staticClass:"pa-0"},[t(gt.Z,{attrs:{color:"indigo"},model:{value:e.dashId,callback:function(t){e.dashId=t},expression:"dashId"}},[t(ne.Z,e._l(e.sharedDashboards,(function(r){return t(le.Z,{key:r.dashId,staticClass:"px-1",attrs:{value:r.dashId},on:{click:function(t){return e.dashChanged(r.dashId)}}},[t(oe.Z,{staticClass:"handle",attrs:{title:r.SharedBy}},[e._v("mdi-account-circle")]),t(Ue.km,{attrs:{id:r.dashId}},[t(Ue.V9,{attrs:{title:r.dashName}},[e._v(e._s(r.dashName))])],1)],1)})),1)],1)],1),t(f.Z,{attrs:{persistent:"",width:"700"},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[t(m.Z,[t(g.EB,{staticClass:"headline"},[e._v("Do you want to SaveDashboard?")]),t(g.h7,[t(y.Z),t(p.Z,{attrs:{color:"green darken-1",text:""},on:{click:function(t){return e.cancelDash()}}},[e._v("Disagree")]),t(p.Z,{attrs:{color:"green darken-1",text:""},on:{click:function(t){return e.saveDash()}}},[e._v("Agree")])],1)],1)],1)],1)},yt=[],vt=r(76983),It=r.n(vt),bt={name:"dashboard-nav",data(){return{dashName:"",dashNameDialog:!1,dialog:!1,dashId:"",toDashId:"",deepCopyDashPages:{}}},created(){this.$route.params.dashId&&(this.dashId=this.$route.params.dashId)},mounted(){this.$root.$on("addNewDash",(e=>{var t=this;e&&(t.dashNameDialog=e,Vue.nextTick((function(){t.addDashboard()})))}))},components:{draggable:It()},computed:{...(0,F.Se)(["getUserNameById","getGroupNameById","getDashboardSharedBy","getUserId","getSharedDashboardInfo"]),sharedDashboards:{get(){for(var e=this.$store.state.sharedDashboardContent,t=Object.keys(e),r=[],s=0;s<t.length;s++){var a=this.getDashboardSharedBy(t[s]);a&&(e[t[s]]["SharedBy"]=this.getUserNameById(a),this.getUserId!=e[t[s]]["SharedBy"]&&r.push(e[t[s]]))}return r}},sharedDashboardList:{get(){return this.$store.state.sharedDashboardList}},dashboardCollection:{get(){return this.$store.state.dashboardCollection},set(e){this.$store.dispatch("resetDashboardOrder",e)}}},methods:{addDashboard(){var e=this;this.$store.dispatch("addDashboard",this.dashName).then((t=>{e.dashId=t,e.$router.push({path:"/home/dashboard/"+t,params:{pageId:t}})})),this.dashNameDialog=!1},dashChanged(e){this.dashId=this.$route.params.dashId,this.toDashId=e,this.$router.push({path:"/home/dashboard/"+e,params:{pageId:e}})},saveDash(){this.$store.dispatch("saveDashboardToServer",this.dashId).then((e=>{"success"==e&&(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DASH_SUCCESS"),this.deepCopyDashPages=JSON.parse(JSON.stringify(this.$store.state.dashPageDetails)),this.$router.push({path:"/home/dashboard/"+this.toDashId,params:{pageId:this.toDashId}}),this.dialog=!1)}))},cancelDash(){this.dashPageDetails[this.dashId]=this.deepCopyDashPages[this.dashId],this.$router.push({path:"/home/dashboard/"+this.toDashId,params:{pageId:this.toDashId}}),this.dialog=!1}}},_t=bt,Dt=(0,D.Z)(_t,ft,yt,!1,null,"ace56ec4",null),Ct=Dt.exports,St=r(38224),Ft=function(){var e=this,t=e._self._c;return t(n.Z,{ref:"dashboardview",staticStyle:{padding:"4px"},attrs:{fluid:""}},[t("cub-dashboard-share",{attrs:{dashId:e.dashId},model:{value:e.showShareDialog,callback:function(t){e.showShareDialog=t},expression:"showShareDialog"}}),t(m.Z,{attrs:{height:"100%"}},[t("div",[t(f.Z,{attrs:{scrollable:"",width:"700px"},model:{value:e.reportsDialog,callback:function(t){e.reportsDialog=t},expression:"reportsDialog"}},[t(m.Z,[t(g.EB,{staticStyle:{"background-color":"rgb(60, 141, 188)",color:"white"}},[e._v(" Select Reports "),t(y.Z),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){return e.cancelReportList()}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){return e.addReports()}}},[e._v("Add")])],1),t(g.EB,[t(Ce.Z,{staticClass:"pt-1",staticStyle:{"margin-top":"0px","background-color":"whitesmoke"},attrs:{outlined:"",height:"10",label:"Search...","single-line":"","hide-details":""},model:{value:e.reportSearch,callback:function(t){e.reportSearch=t},expression:"reportSearch"}})],1),t(g.ZB,{staticStyle:{height:"300px"}},[t("report-list",{attrs:{search:e.reportSearch}})],1)],1)],1),t(f.Z,{attrs:{persistent:"","max-width":"290"},model:{value:e.confirmDeleteDashboard,callback:function(t){e.confirmDeleteDashboard=t},expression:"confirmDeleteDashboard"}},[t(m.Z,[t(g.EB,{staticClass:"headline"},[e._v("Delete dashboard?")]),t(g.ZB,[e._v("Are you sure want to delete this dashboard?")]),t(g.h7,[t(y.Z),t(p.Z,{attrs:{color:"red darken-1",text:""},on:{click:function(t){e.confirmDeleteDashboard=!1}}},[e._v("No")]),t(p.Z,{attrs:{color:"green darken-1",text:""},on:{click:()=>{e.deleteDashboard(),e.confirmDeleteDashboard=!1}}},[e._v("Yes")])],1)],1)],1),void 0!=e.dashId?t(g.EB,{staticClass:"py-1"},[e.editDashName?t(Ce.Z,{staticStyle:{"max-width":"300px"},attrs:{clearable:"","clear-icon":"mdi-close-circle","append-icon":"mdi-check"},on:{"click:clear":function(t){e.editDashName=!1},"click:append":function(t){return e.renameDashboard()}},model:{value:e.dashNameUpdated,callback:function(t){e.dashNameUpdated=t},expression:"dashNameUpdated"}},[e._v(e._s(e.dashNameUpdated))]):t(St.Z,{scopedSlots:e._u([{key:"default",fn:function({hover:r}){return[t("h4",[e._v(" "+e._s(e.dashName)+" "),r&&!e.isShared?t(oe.Z,{attrs:{title:"edit"},on:{click:function(t){e.editDashName=!0}}},[e._v("mdi-pencil")]):e._e()],1)]}}],null,!1,1705281782)}),t(y.Z),e.isShared?e._e():t(oe.Z,{attrs:{title:"Share Dashboard"},on:{click:function(t){e.showShareDialog=!0}}},[e._v("mdi-share-variant")]),e.isShared?e._e():t(oe.Z,{attrs:{title:"Save Dashboard"},on:{click:function(t){return e.saveDashboard()}}},[e._v("mdi-content-save")]),e.isShared?e._e():t(oe.Z,{attrs:{title:"Delete Dashboard"},on:{click:function(t){e.confirmDeleteDashboard=!0}}},[e._v("mdi-delete")]),e.isShared?e._e():t(oe.Z,{attrs:{title:"Add Reports"},on:{click:function(t){e.reportsDialog=!0}}},[e._v("mdi-plus-thick")]),e.appliedFilterStr.length>0?t(g.ZB,{staticClass:"pa-0",staticStyle:{color:"red"}},[e._v(e._s(e.appliedFilterStr)),t(oe.Z,{staticClass:"pl-1",attrs:{color:"black",small:"",title:"Clear filters"},on:{click:e.clearDashboardFilters}},[e._v("mdi-close-circle")])],1):e._e()],1):e._e(),e._l(e.reportFiltersArr,(function(r){return t(be.Z,{key:r.Id,staticClass:"area",attrs:{close:"",small:"",color:"#387CA3","text-color":"white",title:e.getFilterDetails(r)},on:{"update:active":function(t){return e.deleteSelectedFilter(r)}}},[e._v(e._s(e.getFilterDisplayValue(r)))])})),void 0==e.dashId||e.pageDetails.length?e._e():t(p.Z,{staticStyle:{top:"40vh",left:"calc(50% - 36px)",position:"absolute"},attrs:{dark:"",tile:"",color:"#3c8dbc"},on:{click:function(t){e.reportsDialog=!0}}},[e._v("Add Reports")]),void 0!=e.dashId||e.dashboardCollection.length?t("grid-layout",{ref:"gridLayout",attrs:{layout:e.pageDetails,"col-num":12,"row-height":30,"is-resizable":!0,"is-mirrored":!1,"vertical-compact":!0,margin:[10,10],"use-css-transforms":!0}},e._l(e.pageDetails,(function(r){return t("grid-item",{key:r.reportId,attrs:{x:r.x,y:r.y,w:r.w,h:r.h,i:r.i,minH:1,"drag-allow-from":".v-card__title",autosize:!0},on:{resize:function(t){return e.resizePlot(r)},resized:e.resizedEvent,moved:e.movedEvent}},[t("cub-plotly",{key:e.key,tag:"cub-plotly",attrs:{conf:r,dashId:e.dashId,reportFilterStr:e.filterStr,currencyFormat:e.currencyFormat}})],1)})),1):t(p.Z,{staticStyle:{top:"40vh",left:"calc(50% - 36px)",position:"absolute"},attrs:{dark:"",tile:"",color:"#3c8dbc"},on:{click:function(t){return e.addDash()}}},[e._v("Add Dashboard")])],2)])],1)},wt=[],xt=r(49344),Tt=r(16746),Et=function(){var e=this,t=e._self._c;return t(m.Z,{staticStyle:{height:"100%"},attrs:{color:e.item.color,light:""},on:{mouseover:function(t){e.showMenuIcon=!0},mouseleave:function(t){e.showMenuIcon=!1}}},[t(g.EB,{staticStyle:{height:"32px",padding:"0px 0px 0px 5px"}},[e.isdetailReport?t("router-link",{staticClass:"d-inline-block text-truncate",staticStyle:{"text-decoration":"none",color:"black","font-size":"0.9rem"},attrs:{to:{path:"/home/details/"+e.report.Id,params:{reportId:e.report.Id}},title:"click to Analyze"}},[e._v(e._s(e.item.title?e.item.title:e.report.Title))]):t("router-link",{staticClass:"d-inline-block text-truncate",staticStyle:{"text-decoration":"none",color:"black","font-size":"0.9rem"},attrs:{to:{path:"/home/analyze/"+e.report.Id,params:{reportId:e.report.Id}},title:"click to Analyze"}},[e._v(e._s(e.item.title?e.item.title:e.report.Title))]),t(y.Z),t(he.Z,{attrs:{bottom:"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(p.Z,e._g(e._b({directives:[{name:"show",rawName:"v-show",value:e.showMenuIcon,expression:"showMenuIcon"}],staticStyle:{position:"fixed",right:"0px"},attrs:{light:"",icon:""}},"v-btn",s,!1),{...r}),[t(oe.Z,[e._v("mdi-dots-vertical")])],1)]}}])},[t(ne.Z,[e.isdetailReport?e._e():t(he.Z,{attrs:{"open-on-hover":"","offset-x":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(le.Z,e._g(e._b({key:e.i},"v-list-item",s,!1),{...r}),[e.isdetailReport?e._e():t(Ue.V9,[e._v("Graph Type")])],1)]}}],null,!1,1705853761)},[e.isdetailReport?e._e():t(m.Z,[t("table",{staticClass:"gtypeTable",attrs:{border:"0",cellpadding:"0",cellspacing:"0"}},[t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportPie",attrs:{title:"Pie"},on:{click:function(t){return e.redrawGraph("Pie")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportDonut",attrs:{title:"Donut Chart"},on:{click:function(t){return e.redrawGraph("Donut")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportSunburst",attrs:{title:"Sunburst Chart"},on:{click:function(t){return e.redrawGraph("Sunburst")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionHVLine",attrs:{title:"HVLine"},on:{click:function(t){return e.redrawGraph("HVLine")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportLine",attrs:{title:"Line"},on:{click:function(t){return e.redrawGraph("Line")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStackedArea",attrs:{title:"Stacked Area Chart"},on:{click:function(t){return e.redrawGraph("StackedArea")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportBar",attrs:{title:"Bar"},on:{click:function(t){return e.redrawGraph("Bar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportColumn",attrs:{title:"Column chart"},on:{click:function(t){return e.redrawGraph("Column")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStack",attrs:{title:"Stacked Bar"},on:{click:function(t){return e.redrawGraph("StackedBar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionFunnelChart",attrs:{title:"Funnel Chart"},on:{click:function(t){return e.redrawGraph("Funnel")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportZoomTree",attrs:{title:"Zoomable Tree"},on:{click:function(t){return e.redrawGraph("Treemap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportHeat",attrs:{title:"Heat Chart"},on:{click:function(t){return e.redrawGraph("Heatmap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportMap",attrs:{title:"Map"},on:{click:function(t){return e.redrawGraph("Geo")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportDataTable",attrs:{title:"Data Table"},on:{click:function(t){return e.redrawGraph("DataTable")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionProgressBar",attrs:{title:"Progress Bar"},on:{click:function(t){return e.redrawGraph("ProgressBar")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionStackedFunnel",attrs:{title:"Stacked Funnel"},on:{click:function(t){return e.redrawGraph("StackedFunnel")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionInfoBox",attrs:{title:"InfoBox"},on:{click:function(t){return e.redrawGraph("InfoBox")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionPareto",attrs:{title:"Pareto Chart"},on:{click:function(t){return e.redrawGraph("Pareto")}}})])])])])])],1),e._l(e.menuitems,(function(r,s){return t(le.Z,{key:s,on:{click:function(t){return e.menuItem(r)}}},[t(Ue.V9,[e._v(e._s(r.title))])],1)}))],2)],1)],1),!e.isError&&e.timeFilterString.length?t("div",{attrs:{id:"timefilterstring",title:e.timeFilterString}},[e._v(" ("+e._s(e.timeFilterString)+") ")]):e._e(),t(xt.Z,{directives:[{name:"show",rawName:"v-show",value:e.drillLabels.length>1,expression:"drillLabels.length > 1"}],attrs:{items:e.drillLabels},scopedSlots:e._u([{key:"item",fn:function({item:r}){return[t(Tt.Z,{on:{click:function(t){return e.breadcrumbClick(r.text,r.depth,r.node)}}},[e._v(e._s(r.text)+" ")])]}},{key:"divider",fn:function(){return[t(oe.Z,[e._v("mdi-chevron-right")])]},proxy:!0}])}),e.showGraphSettingsDialog?t("div",[t("cub-graph-settings",{key:JSON.stringify(e.conf),attrs:{conf:e.conf},on:{event:e.changeGraph,cancelevent:e.cancelGraphSettings},model:{value:e.showGraphSettingsDialog,callback:function(t){e.showGraphSettingsDialog=t},expression:"showGraphSettingsDialog"}})],1):e._e(),e.isReportFound?e.isError?t("p",{staticClass:"text-center",staticStyle:{color:"red"}},[e._v(" Something went wrong. "),t("br"),e._v("Please try again or contact system administrator. ")]):t("div",{staticClass:"text-center",style:e.changeHeight?"width: 100%; height: calc(100% - 54px)":"width: 100%; height: calc(100% - 64px)"},[t("div",{staticStyle:{height:"100%",width:"100%"},attrs:{id:e.item.Target}},[t("stretch",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}]}),!e.isdatatable||e.isCrossTab||e.isgroupdatatable||e.isdetailReport?e.isgroupdatatable&&!e.isdetailReport?t("div",{staticStyle:{width:"100%",height:"100%"}},[t("grouped-data-table",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,chartdataJSON:e.reportdataTableItems.chartdataJSON,dimIds:this.item.dimensions,measIds:this.item.measures}})],1):e.isCrossTab&&e.isdatatable?t("div",{staticStyle:{width:"100%",height:"100%"}},[t("cub-data-table-n-level-crosstab",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,chartdataJSON:e.reportdataTableItems.chartdataJSON,totalArray:e.reportdataTableItems.totalArray,ndims:e.item.dimensions.length,"show-currency":!!e.settings.graphSettings&&e.settings.graphSettings.showCurrency,"show-search":!!e.settings.graphSettings&&e.settings.graphSettings.showSearch,"header-color":e.settings.graphSettings?e.settings.graphSettings.headerColor:"",height:"auto","pivot-level":e.pivotLevel,filterCreation:!0,dimensions:e.item.dimensions,target:e.item.Target}})],1):e.isMap?t("div",{staticStyle:{height:"100%",width:"100%"}},[t("cub-leaflet",{key:e.dataTableKey,attrs:{"measure-count":e.item.measures.length,dimensions:e.item.dimensions,conf:e.conf,"nested-json":e.nestedJson},on:{zoomValueUpdated:e.zoomValUpdated,centerValueUpdated:e.centerValUpdated}})],1):e._e():t("div",{staticStyle:{width:"100%",height:"100%"}},[t("cub-data-table",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,chartdataJSON:e.reportdataTableItems.chartdataJSON,totalArray:e.reportdataTableItems.totalArray,dataTableCurrenyFormat:e.currencyFormat,filterCreation:!0,"show-currency":!!e.settings.graphSettings&&e.settings.graphSettings.showCurrency,"show-search":!!e.settings.graphSettings&&e.settings.graphSettings.showSearch,"header-color":e.settings.graphSettings?e.settings.graphSettings.headerColor:"",height:"auto",ndims:e.item.dimensions.length,dimensions:e.item.dimensions,target:e.item.Target},on:{"update:dataTableCurrenyFormat":function(t){e.currencyFormat=t},"update:data-table-curreny-format":function(t){e.currencyFormat=t}}})],1),"DETAIL_REPORT"==e.report.ReportType&&e.isdetailReport&&!e.loading?t("div",{staticStyle:{width:"100%",height:"100%"}},[t("cub-data-table-detail",{key:e.dataTableKey,attrs:{headers:e.reportmetaDataItems.metadataResultHeader,chartdataJSON:e.reportmetaDataItems.metadataResultData,"header-color":e.settings.graphSettings?e.settings.graphSettings.headerColor:"",target:e.item.Target}})],1):e.loading?e._e():t("div")],1)]):t("p",[e._v("Report has been deleted or unshared.")])],1)},kt=[],Lt=r(89595),Mt=r(50629),At=function(){var e=this,t=e._self._c;return t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%",overflow:"hidden auto"}},[t(Pe.Z,[e.showSearch?t(Ze.Z,{attrs:{sm2:""}},[t(Ce.Z,{attrs:{"append-icon":"search",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1):e._e(),t(y.Z),e.showCurrency?t(Ze.Z,{attrs:{sm2:""}},[t($e.Z,{attrs:{items:e.shortFormatItems,label:"Units","hide-details":""},model:{value:e.shortFormat,callback:function(t){e.shortFormat=t},expression:"shortFormat"}})],1):e._e()],1),t(Mt.Z,{staticClass:"elevation-0",attrs:{height:e.height,headers:e.headers,"items-per-page":e.rowsPerPage,"fixed-header":e.isFixedHeader,"items-per-page-options":e.rowsPerPageItems,items:e.chartdataJSON,search:e.search,"multi-sort":"","item-key":"itemId","sort-by":e.sortBy,"sort-desc":e.sortDesc,"custom-sort":e.customDTSort},on:{"update:sortBy":function(t){e.sortBy=t},"update:sort-by":function(t){e.sortBy=t},"update:sortDesc":function(t){e.sortDesc=t},"update:sort-desc":function(t){e.sortDesc=t}},scopedSlots:e._u([e.chartdataJSON.length?{key:"body",fn:function({items:r,headers:s}){return[t("tbody",{staticClass:"text-no-wrap"},[e._l(r,(function(r,a){return t("tr",{key:a,class:r===e.selectedRow?"custom-highlight-row":"",on:{click:function(t){return e.rowClicked(r)}}},[e._l(s,(function(s){return[t("td",{key:s.itemId,staticClass:"px-1",style:e.getDisplayStyle(s.itemId)},[e._v(" "+e._s(-1==s.itemId?a+1:e.getDisplayValue(r[s.value],s.itemId,e.shortFormat))+" ")])]}))],2)})),e.chartdataJSON.length>1?t("tr",[t("td",{staticClass:"text-center",attrs:{colspan:e.totalLabelColspan}},[e._v("Grand Total")]),e._l(e.totalArray,(function(r){return[t("td",{key:r.itemId,staticStyle:{"text-align":"right","white-space":"nowrap"}},[e._v(" "+e._s(e.getGrandTotalDisplayValue(r.value,r.itemId,e.shortFormat))+" ")])]}))],2):e._e()],2)]}}:null],null,!0)},[t("template",{slot:"no-data"},[t(u.Z,{attrs:{value:!0,color:"error",icon:"warning"}},[e._v("Sorry, nothing to display here :(")])],1)],2)],1)},Nt=[],Rt={name:"cub-data-table",mixins:[ve.Z],props:{headers:Array,chartdataJSON:Array,totalArray:Array,dataTableCurrenyFormat:{type:String,default:"Default"},showCurrency:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},height:String,filterCreation:{type:Boolean,default:!1},ndims:Number,headerColor:{type:String,default:"#344f60"},dimensions:{type:Array,default:[]},target:{type:String,default:"target1"}},data:()=>({sortBy:[],sortDesc:[],search:"",selectedRow:{},dataTableHeight:150,isFixedHeader:!0,rowsPerPage:100,rowsPerPageItems:[5,10,25,100],serialNumItem:{itemId:-1,text:"S.No.",value:"S.No.",isDummyHeader:!0},selectedRow:{},totalLabelColspan:0}),mounted(){"Y"==this.showSerialNumInDT?this.totalLabelColspan=this.ndims+1:this.totalLabelColspan=this.ndims,this.chartdataJSON.length<=5?(this.isFixedHeader=!1,this.dataTableHeight=void 0):(this.isFixedHeader=!0,this.dataTableHeight=450),this.serialNumItem.class=this.getClassName(this.headerColor);for(var e=0;e<this.headers.length;e++)this.headers[e].class=this.getClassName(this.headerColor);"Y"==this.showSerialNumInDT&&-1!=this.headers[0].itemId&&this.headers.unshift(this.serialNumItem)},computed:{...(0,F.Se)(["selectedDimensions","defaultCurrencyFormat","enableRowClickFunctionality","showSerialNumInDT"]),shortFormatItems:{get:function(){return"en_IN.UTF-8"==this.defaultCurrencyFormat?["Default","Lakhs","Crores"]:["Default","Million","Billion"]}},shortFormat:{get:function(){return this.dataTableCurrenyFormat},set:function(e){this.$emit("update:dataTableCurrenyFormat",e),this.$emit("updateCurrenyFormat",e)}},filteredHeaders:{get:function(){return this.headers},set:function(e){return e}}},methods:{getClassName(e){var t=document.createElement("style");return t.innerHTML=".header-class-"+this.target+" { background: "+e+" !important;}",document.getElementsByTagName("th")[0].appendChild(t),"header-class-"+this.target},getHeaderStyle(){return this.headerColor.length>0?"background-color:"+this.headerColor+";":""},rowClicked(e){if("N"!=this.enableRowClickFunctionality&&this.filterCreation){var t=!0;this.selectedRow===e?(t=!1,this.selectedRow={}):(t=!0,this.selectedRow=e);var r=Object.keys(e),s=[],a=[],i=[];if(this.selectedDimensions.length)i=this.selectedDimensions;else for(var o=0;o<this.dimensions.length;o++)i.push(this.getItemMetaById(this.dimensions[o]));for(var n=0;n<i.length;n++)for(var l=0;l<r.length;l++)i[n].Id==r[l]&&(s.push(r[l]),a.push(i[n].Id));var d=[];for(n=0;n<s.length;n++){var h={};h.FilterValues=[e[s[n]]],h.FilterItemId=a[n],h.FilterOper="eq",h.FilterName="",h.isNormalFilter=!0,d.push(h)}for(n=0;n<d.length;n++)t?this.insertIntoCheckedFilters(d[n]):this.uncheckSameDimensionFilters(d[n]);"dashboard"==this.$route.name&&this.$root.$refs.CubStandardFilterDrawer.applyFilters()}}}},Ot=Rt,Bt=(0,D.Z)(Ot,At,Nt,!1,null,"51a491f4",null),Zt=Bt.exports,Pt=function(){var e=this,t=e._self._c;return t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%",overflow:"hidden auto"}},[t(Pe.Z,[e.showSearch?t(Ze.Z,{attrs:{sm2:""}},[t(Ce.Z,{attrs:{"append-icon":"search",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1):e._e(),t(y.Z),e.showCurrency?t(Ze.Z,{attrs:{sm2:""}},[t($e.Z,{attrs:{items:e.shortFormatItems,label:"Units","hide-details":""},model:{value:e.shortFormat,callback:function(t){e.shortFormat=t},expression:"shortFormat"}})],1):e._e()],1),t(Mt.Z,{attrs:{"multi-sort":"","item-key":"itemKey",search:e.search,headers:e.childHeader,items:e.chartdataJSON,"items-per-page":e.rowsPerPage,page:e.page,"sort-by":e.sortBy,"sort-desc":e.sortDesc,"custom-sort":e.customDTSort},on:{"update:page":function(t){e.page=t},"update:sortBy":function(t){e.sortBy=t},"update:sort-by":function(t){e.sortBy=t},"update:sortDesc":function(t){e.sortDesc=t},"update:sort-desc":function(t){e.sortDesc=t}},scopedSlots:e._u([{key:"header",fn:function(){return[t("thead",[t("tr",e._l(e.parentHeader,(function(r,s){return t("th",{key:s,attrs:{role:"columnheader",colspan:r.colspan}},[e._v(" "+e._s(+r.itemId>1e4?r.text:e.getDisplayValue(r.text,r.itemId))+" ")])})),0)])]},proxy:!0},{key:"no-data",fn:function(){return[t(u.Z,{attrs:{value:!0,color:"error",icon:"warning"}},[e._v("Sorry, nothing to display here :(")])]},proxy:!0},e.chartdataJSON.length?{key:"body",fn:function({items:r,headers:s}){return[t("tbody",{staticClass:"text-no-wrap"},[e._l(r,(function(r,a){return t("tr",{key:a},[e._l(s,(function(s){return[t("td",{key:s.itemKey,style:e.getDisplayStyle(s.itemId)},[e._v(" "+e._s(-1==s.itemId?a+1:e.getDisplayValue(r[s.itemKey],s.itemId,e.shortFormat))+" ")])]}))],2)})),e.chartdataJSON.length>1?t("tr",[t("td",{staticClass:"text-center",attrs:{colspan:e.ndims-1}},[e._v("Grand Total")]),e._l(e.totalArray,(function(r){return[t("td",{key:r.itemKey,staticStyle:{"text-align":"right","white-space":"nowrap"}},[e._v(" "+e._s(e.getGrandTotalDisplayValue(r.value,r.itemId,e.shortFormat))+" ")])]}))],2):e._e()],2)]}}:null],null,!0)})],1)},Vt=[],Ut={name:"cub-data-table-crosstab",props:{headers:Array,chartdataJSON:Array,totalArray:Array,dataTableCurrenyFormat:{type:String,default:"Default"},showCurrency:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},ndims:Number},mixins:[ve.Z],data:()=>({search:"",rowsPerPage:5,page:1,rowsPerPageItems:[5,10,25,100],sortBy:[],sortDesc:[],childHeader:[],parentHeader:[],serialNumItem:{itemId:-1,text:"S.No.",value:"S.No.",isDummyHeader:!0}}),created(){this.childHeader=this.headers[1],this.parentHeader=this.headers[0]},methods:{},computed:{...(0,F.Se)(["selectedDimensions","defaultCurrencyFormat"]),shortFormatItems:{get:function(){return"en_IN.UTF-8"==this.defaultCurrencyFormat?["Default","Lakhs","Crores"]:["Default","Million","Billion"]}},shortFormat:{get:function(){return this.dataTableCurrenyFormat},set:function(e){this.$emit("update:dataTableCurrenyFormat",e),this.$emit("updateCurrenyFormat",e)}}}},$t=Ut,Gt=(0,D.Z)($t,Pt,Vt,!1,null,null,null),jt=Gt.exports,zt=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100%",overflow:"hidden auto"}},[t(Pe.Z,[t(Ze.Z,{attrs:{sm2:""}},[t(Ce.Z,{staticClass:"pt-0",attrs:{"append-icon":"search",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t(y.Z)],1),t(Mt.Z,{staticClass:"elevation-1",attrs:{id:"normalTable",headers:e.headers,"items-per-page":e.rowsPerPage,"items-per-page-options":e.rowsPerPageItems,page:e.page,items:e.chartdataJSON,search:e.search,"fixed-header":!0,"multi-sort":"","item-key":"name"},on:{"update:page":function(t){e.page=t}},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}},[t("template",{slot:"no-data"},[t(u.Z,{attrs:{value:!0,color:"error",icon:"warning"}},[e._v("Sorry, nothing to display here :(")])],1)],2)],1)},qt=[],Wt={name:"cub-data-table-detail",mixins:[ve.Z],props:{headers:Array,chartdataJSON:Array,totalArray:Array,headerColor:{type:String,default:"#344f60"},target:{type:String,default:"target3"}},data:()=>({selected:[],rowsPerPage:5,page:1,rowsPerPageItems:[5,10,25,100],search:""}),created(){for(var e=0;e<this.headers.length;e++)this.headers[e].class=this.getClassName(this.headerColor)},mounted(){for(var e=0;e<this.headers.length;e++)this.headers[e].class=this.getClassName(this.headerColor)},computed:{filteredHeaders:{get:function(){return this.headers},set:function(e){return e}}},directives:{sortable:{inserted:function(e,t,r){new Sortable(e,t.value||{})}}},methods:{getHeaderStyle(){return this.headerColor.length>0?"background-color:"+this.headerColor+";":""},getClassName(e){var t=document.createElement("style");return t.innerHTML=".header-class-detail-"+this.target+" { background: "+e+" !important;}",document.head.append(t),"header-class-detail-"+this.target},customSort(e,t,r){if(void 0==t)return e;var s=["JAN","FEB","MAR","APR","MAY","JUNE","JULY","AUG","SEP","OCT","NOV","DEC"];return"Fin Month"==t&&(s=["APR","MAY","JUNE","JULY","AUG","SEP","OCT","NOV","DEC","JAN","FEB","MAR"]),e.sort(((e,a)=>-1!=["Fin Month","Month"].indexOf(t)?r?s.indexOf(a[t])-s.indexOf(e[t]):s.indexOf(e[t])-s.indexOf(a[t]):isNaN(e[t])?r?a[t].localeCompare(e[t]):e[t].localeCompare(a[t]):r?a[t]-e[t]:e[t]-a[t])),e},updateHeaderOrder(e){let t=this.filteredHeaders,r=e.oldIndex,s=e.newIndex;if(s>=t.length){var a=s-t.length+1;while(a--)t.push(void 0)}t.splice(s,0,t.splice(r,1)[0]),this.filteredHeaders=t}}},Jt=Wt,Ht=(0,D.Z)(Jt,zt,qt,!1,null,"4542916f",null),Kt=Ht.exports,Yt=function(){var e=this,t=e._self._c;return t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%",width:"100%",overflow:"auto"}},[t("table",{staticClass:"display nowrap",attrs:{id:"example",width:"100%"}})])},Xt=[],Qt=(r(65305),r(27287),r(12167),{name:"grouped-data-table",mixins:[ve.Z],props:{headers:Array,chartdataJSON:Array,totalArray:Array,dimIds:Array,measIds:Array,dataTableCurrenyFormat:{type:String,default:"Default"},showCurrency:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},height:String,filterCreation:{type:Boolean,default:!1}},data:()=>({headerObjArr:[],sortBy:[],sortDesc:[],search:"",dataTableHeight:150,rowsPerPage:100,rowsPerPageItems:[5,10,25,100]}),mounted(){this.headerObjArr=[];for(var e=JSON.parse(JSON.stringify(this.headers)),t=JSON.parse(JSON.stringify(this.chartdataJSON)),r=JSON.parse(JSON.stringify(this.dimIds)),s=JSON.parse(JSON.stringify(this.measIds)),a=0;a<e.length;a++){var i={};i.title=e[a].text,i.data=e[a].itemId,i.render=this.formatDTData,this.headerObjArr.push(i)}for(var o=[],n=0;n<r.length-1;n++)o.push(r[n]);var l=[];for(n=0;n<r.length-1;n++)l.push(n);for(var d=[],h=r.length;h<r.concat(s).length;h++)d.push(h);var c={},u="",p=this,m="<tfoot><tr>";for(a=0;a<this.dimIds.concat(this.measIds).length;a++)a==this.dimIds.length-1?m+="<th>Grand Total</th>":m+="<th></th>";m+="</tr></tfoot>",$("#example").append(m);var g=$("#example").DataTable({scrollX:!0,scrollY:"400px",paging:!1,data:t,columns:this.headerObjArr,fixedHeader:{header:!0},rowGroup:{dataSrc:o,emptyDataGroup:"No categories assigned yet",startRender:function(e,t,r){var a;if(0===r)u=t,a=t;else{if(c[u])return;a=u+t}var i,o=!!c[a],n=$("<tr/>");n.append("<td colspan=1>"+p.getDisplayValue(t,p.headerObjArr[r].data)+" </td>").attr("data-name",a).toggleClass("collapsed",o);var l=$("#example thead th").length;for(i=1;i<l;i++){for(var d=e.data().length,h=[],m=0;m<d;m++)h.push(+e.data()[m][s[i-1]]);var g=p.getAggregationVal(h,s[i-1]);n.append("<td class=text-right>"+p.getDisplayValue(g,s[i-1])+"</td>")}return 1==e.nodes().length?e.nodes().each((function(e){"_"==e.childNodes[0].textContent&&(e.style.display="none")})):e.nodes().each((function(e){e.style.display=o?"none":""})),$(n)}},buttons:[{extend:"print",footer:!0}],columnDefs:[{targets:l,visible:!1},{targets:d,className:"text-right"}],footerCallback:function(e,t,r,a,i){for(var o=this.api(),n=d,l=0;l<n.length;l++){for(var h=o.column(n[l],{filter:"applied",search:"applied"}).data(),c=[],u=0;u<h.length;u++)c.push(h[u]);var m=p.getAggregationVal(c,s[n[l]-p.dimIds.length]);$(o.column(n[l]).footer()).html(p.getDisplayValue(m,s[n[l]-p.dimIds.length]))}}});$("#example tbody tr.group-start").each((function(){var e=$(this).data("name");c[e]=!c[e],g.draw(!1)})),$("#example tbody").on("click","tr.dtrg-start",(function(){var e=$(this).data("name");c[e]=!c[e],g.draw(!1)}))},computed:{...(0,F.Se)(["selectedDimensions","selectedMeasures"])},methods:{formatDTData(e,t,r,s){return this.getDisplayValue(e,this.headerObjArr[s.col].data)},getAggregationVal(e,t){for(var r=this.getItemMetaById(t),s=0,a=0,i=0,o=Number(e[0]),n=Number(e[0]),l=0;l<e.length;l++)a=Number(e[l]),s+=a,o=o<a?o:a,n=n>a?n:a;return i="Min"==r.AggFunction?o:"Max"==r.AggFunction?n:"avg"==r.AggFunction||r.Description.includes("[avg]")?s/e.length:s,i}}}),er=Qt,tr=(0,D.Z)(er,Yt,Xt,!1,null,null,null),rr=tr.exports,sr=function(){var e=this,t=e._self._c;return t("div",{staticClass:"spinner spinner--stretch",style:e.styles},[t("div",{staticClass:"rect rect-1",style:e.rectStyles}),t("div",{staticClass:"rect rect-2",style:e.rectStyles}),t("div",{staticClass:"rect rect-3",style:e.rectStyles}),t("div",{staticClass:"rect rect-4",style:e.rectStyles}),t("div",{staticClass:"rect rect-5",style:e.rectStyles})])},ar=[],ir={props:{size:{default:"40px"},background:{default:"#41b883"},duration:{default:"1.2s"}},computed:{rectStyles(){return{backgroundColor:this.background,animationDuration:this.duration}},styles(){return{width:this.size,height:this.size}}}},or=ir,nr=(0,D.Z)(or,sr,ar,!1,null,"7693c8fe",null),lr=nr.exports,dr=r(63486),hr=r(3577),cr=r(78419),ur=r(56379),pr=r(62165),mr=function(){var e=this,t=e._self._c;return t(f.Z,{staticStyle:{top:"20%"},attrs:{width:"700px",persistent:""},model:{value:e.internalShowGraphSettingsDialog,callback:function(t){e.internalShowGraphSettingsDialog=t},expression:"internalShowGraphSettingsDialog"}},[t(pe.Z,{attrs:{"background-color":"#00796b",dark:""}},[t(ue.Z,{attrs:{href:"#tabinmenuform-1"}},[e._v("General")]),e.isGraph&&!e.isMap?t(ue.Z,{attrs:{href:"#tabinmenuform-2"}},[e._v("Measures")]):e._e(),e.isGraph&&!e.isMap?t(ue.Z,{attrs:{href:"#tabinmenuform-3"}},[e._v("Axes")]):e._e(),e._l(3,(function(r){return t(pr.Z,{key:r,attrs:{value:"tabinmenuform-"+r}},[1==r?t(m.Z,{staticClass:"mx-1",attrs:{flat:"",tile:""}},[t(Ce.Z,{staticClass:"mt-0",attrs:{label:"Title","single-line":""},model:{value:e.gSettings.reporttitle,callback:function(t){e.$set(e.gSettings,"reporttitle",t)},expression:"gSettings.reporttitle"}}),t(d.Z,["Heatmap"==e.selectedGraphType?t(o.Z,[t($e.Z,{attrs:{items:e.colorscales,label:"Color Scale"},model:{value:e.gSettings.colorscale,callback:function(t){e.$set(e.gSettings,"colorscale",t)},expression:"gSettings.colorscale"}})],1):e._e(),"Geo"==e.selectedGraphType?t(o.Z,[t($e.Z,{attrs:{items:e.markerTypes,label:"Marker"},model:{value:e.gSettings.markerType,callback:function(t){e.$set(e.gSettings,"markerType",t)},expression:"gSettings.markerType"}})],1):e._e(),"Heatmap"==e.selectedGraphType?t(o.Z,[t(dr.Z,{attrs:{label:"Reverse Scale"},model:{value:e.gSettings.isReverseScale,callback:function(t){e.$set(e.gSettings,"isReverseScale",t)},expression:"gSettings.isReverseScale"}})],1):e._e()],1),"ProgressBar"==e.selectedGraphType||"Geo"==e.selectedGraphType&&"Bubble"==e.gSettings.markerType?t(o.Z,{staticStyle:{display:"flex"}},[t(Ce.Z,{attrs:{label:"Geo"==e.selectedGraphType?"Marker Color":"Measure Color"},model:{value:e.measureProps.color,callback:function(t){e.$set(e.measureProps,"color",t)},expression:"measureProps.color"}}),t(he.Z,{attrs:{"close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(oe.Z,e._g({},r),[e._v("mdi-palette")])]}}],null,!0)},[t(hr.Z,{staticClass:"mx-auto",attrs:{value:"#7417BE","hide-swatches":""},model:{value:e.measureProps.color,callback:function(t){e.$set(e.measureProps,"color",t)},expression:"measureProps.color"}})],1)],1):e._e(),e.isGraph&&!e.isMap?t("div",[t(d.Z,[t(o.Z,[t(Ge.Z,{attrs:{label:"Show Legends"},model:{value:e.gSettings.showlegends,callback:function(t){e.$set(e.gSettings,"showlegends",t)},expression:"gSettings.showlegends"}})],1)],1),e.gSettings.showlegends?t(d.Z,[t(o.Z,[t("p",[e._v("LegendOrientation")]),t(ur.Z,{attrs:{row:""},model:{value:e.gSettings.legendorientation,callback:function(t){e.$set(e.gSettings,"legendorientation",t)},expression:"gSettings.legendorientation"}},[t(cr.Z,{attrs:{label:"Vertical",value:"v"}}),t(cr.Z,{attrs:{label:"Horizontal",value:"h"}})],1)],1),t(o.Z,[t("p",[e._v("LegendPosition")]),t(d.Z,[t(o.Z,[t(Ce.Z,{attrs:{dense:"",label:"x",rules:[e.rules.counter]},model:{value:e.gSettings.legendposition.x,callback:function(t){e.$set(e.gSettings.legendposition,"x",t)},expression:"gSettings.legendposition.x"}})],1),t(o.Z,[t(Ce.Z,{attrs:{dense:"",label:"y",rules:[e.rules.counter]},model:{value:e.gSettings.legendposition.y,callback:function(t){e.$set(e.gSettings.legendposition,"y",t)},expression:"gSettings.legendposition.y"}})],1),t(o.Z,[t($e.Z,{staticClass:"mt-0 pt-0",attrs:{items:["left","right"],label:"Anchor"},model:{value:e.gSettings.legendposition.anchor,callback:function(t){e.$set(e.gSettings.legendposition,"anchor",t)},expression:"gSettings.legendposition.anchor"}})],1)],1)],1)],1):e._e()],1):e._e(),"DataTable"==e.selectedGraphType?t("div",["DataTable"==e.selectedGraphType&&"DETAIL_REPORT"!=e.report.ReportType?t(dr.Z,{attrs:{label:"Show Currency"},model:{value:e.gSettings.showCurrency,callback:function(t){e.$set(e.gSettings,"showCurrency",t)},expression:"gSettings.showCurrency"}}):e._e(),"DataTable"==e.selectedGraphType&&"DETAIL_REPORT"!=e.report.ReportType?t(dr.Z,{attrs:{label:"Show Search"},model:{value:e.gSettings.showSearch,callback:function(t){e.$set(e.gSettings,"showSearch",t)},expression:"gSettings.showSearch"}}):e._e(),t(Ce.Z,{attrs:{label:"Header Color",clearable:""},model:{value:e.gSettings.headerColor,callback:function(t){e.$set(e.gSettings,"headerColor",t)},expression:"gSettings.headerColor"}})],1):e._e(),"InfoBox"==e.selectedGraphType||"ProgressBar"==e.selectedGraphType?t(dr.Z,{attrs:{label:"isComparison"},model:{value:e.gSettings.isComparison,callback:function(t){e.$set(e.gSettings,"isComparison",t)},expression:"gSettings.isComparison"}}):e._e(),"InfoBox"==e.selectedGraphType||"ProgressBar"==e.selectedGraphType?t("p",[e._v("DesiredValueTendency")]):e._e(),"InfoBox"==e.selectedGraphType||"ProgressBar"==e.selectedGraphType?t(ur.Z,{attrs:{row:""},model:{value:e.gSettings.desiredValueTendency,callback:function(t){e.$set(e.gSettings,"desiredValueTendency",t)},expression:"gSettings.desiredValueTendency"}},[t(cr.Z,{attrs:{label:"Increment",value:"incr"}}),t(cr.Z,{attrs:{label:"Decrement",value:"decr"}})],1):e._e(),t(y.Z),t(g.h7,[t(p.Z,{on:{click:function(t){return e.changeGraph()}}},[e._v("Apply")]),t(p.Z,{on:{click:function(t){return e.cancel()}}},[e._v("Cancel")])],1)],1):e._e(),2==r&&"InfoBox"!=e.selectedGraphType&&"ProgressBar"!=e.selectedGraphType?t(m.Z,{staticStyle:{height:"100%"},attrs:{flat:"",tile:""}},[t(pe.Z,{attrs:{vertical:"","hide-slider":""}},[e._l(e.item.measures,(function(r,s){return t(ue.Z,{key:r,attrs:{href:`#tab-${r}`},on:{click:function(t){return e.measureSelection(r,s)}}},[e._v(e._s(e.getMetaNameById(r)))])})),e._l(e.item.measures,(function(r){return t(pr.Z,{key:r,staticStyle:{"overflow-x":"hidden"},attrs:{value:"tab-"+r}},[t(m.Z,[t(d.Z,[t(o.Z,[t(Ge.Z,{attrs:{label:"Show Measure"},model:{value:e.measureProps.showmeasure,callback:function(t){e.$set(e.measureProps,"showmeasure",t)},expression:"measureProps.showmeasure"}})],1),t(o.Z,[t(Ge.Z,{attrs:{label:"Show Point Labels"},model:{value:e.measureProps.showpointlabels,callback:function(t){e.$set(e.measureProps,"showpointlabels",t)},expression:"measureProps.showpointlabels"}})],1)],1),t(d.Z,["Line"==e.selectedGraphType||"scatter"==e.measureProps.tracetype?t(o.Z,[t($e.Z,{attrs:{items:e.textpositions,label:"Text Position"},model:{value:e.measureProps.textposition,callback:function(t){e.$set(e.measureProps,"textposition",t)},expression:"measureProps.textposition"}})],1):e._e()],1),t(d.Z,[t(o.Z,[t($e.Z,{attrs:{items:e.tracetypes,"item-text":"text","item-value":"value",label:"Trace Type"},model:{value:e.measureProps.tracetype,callback:function(t){e.$set(e.measureProps,"tracetype",t)},expression:"measureProps.tracetype"}})],1),t(o.Z,{staticStyle:{display:"flex"}},[t(Ce.Z,{attrs:{label:"Measure Color"},model:{value:e.measureProps.color,callback:function(t){e.$set(e.measureProps,"color",t)},expression:"measureProps.color"}}),t(he.Z,{attrs:{"close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(oe.Z,e._g({},r),[e._v("mdi-palette")])]}}],null,!0)},[t(hr.Z,{staticClass:"mx-auto",attrs:{value:"#7417BE","hide-swatches":""},model:{value:e.measureProps.color,callback:function(t){e.$set(e.measureProps,"color",t)},expression:"measureProps.color"}})],1)],1)],1),t(d.Z,{staticClass:"align-center"},[t(o.Z,{attrs:{cols:"2"}},[t("div",{staticClass:"text-h6"},[e._v("Y-Axis")])]),t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Show Grid Line"},model:{value:e.measureProps.showygridline,callback:function(t){e.$set(e.measureProps,"showygridline",t)},expression:"measureProps.showygridline"}})],1),t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Show Zero Line"},model:{value:e.measureProps.showyzeroline,callback:function(t){e.$set(e.measureProps,"showyzeroline",t)},expression:"measureProps.showyzeroline"}})],1)],1),"Column"==e.selectedGraphType||"Line"==e.selectedGraphType?t(d.Z,{staticClass:"align-center"},[t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Show Trend Line"},model:{value:e.measureProps.showtrendline,callback:function(t){e.$set(e.measureProps,"showtrendline",t)},expression:"measureProps.showtrendline"}})],1),e.measureProps.showtrendline?t(o.Z,{staticStyle:{display:"flex"}},[t(Ce.Z,{attrs:{label:"Trend Line Color"},model:{value:e.measureProps.trendlinecolor,callback:function(t){e.$set(e.measureProps,"trendlinecolor",t)},expression:"measureProps.trendlinecolor"}}),t(he.Z,{attrs:{"close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(oe.Z,e._g({},r),[e._v("mdi-palette")])]}}],null,!0)},[t(hr.Z,{staticClass:"mx-auto",attrs:{value:"#7417BE","hide-swatches":""},model:{value:e.measureProps.trendlinecolor,callback:function(t){e.$set(e.measureProps,"trendlinecolor",t)},expression:"measureProps.trendlinecolor"}})],1)],1):e._e(),e.measureProps.showtrendline?t(o.Z,[t($e.Z,{attrs:{items:e.trendlinetypes,"item-text":"text","item-value":"value",label:"Trend Trace Type"},model:{value:e.measureProps.trendlinetype,callback:function(t){e.$set(e.measureProps,"trendlinetype",t)},expression:"measureProps.trendlinetype"}})],1):e._e()],1):e._e(),t(g.h7,[t(p.Z,{on:{click:function(t){return e.measurePropsApply()}}},[e._v("Apply")]),t(p.Z,{on:{click:function(t){return e.cancel()}}},[e._v("Cancel")])],1)],1)],1)}))],2)],1):e._e(),3==r&&e.isGraph?t(m.Z,[e.isMultiaxes?t(Ge.Z,{staticClass:"mt-0",attrs:{label:"Show MultiAxes"},model:{value:e.axesProps.showmultiaxes,callback:function(t){e.$set(e.axesProps,"showmultiaxes",t)},expression:"axesProps.showmultiaxes"}}):e._e(),t(d.Z,{staticClass:"align-center"},[t(o.Z,{attrs:{cols:"3"}},[t("div",{staticClass:"text-h5"},[e._v("X-Axis")])]),t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Show Grid Line"},model:{value:e.axesProps.showxgridline,callback:function(t){e.$set(e.axesProps,"showxgridline",t)},expression:"axesProps.showxgridline"}})],1),t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Show Zero Line"},model:{value:e.axesProps.showxzeroline,callback:function(t){e.$set(e.axesProps,"showxzeroline",t)},expression:"axesProps.showxzeroline"}})],1),t(o.Z,[t(Ge.Z,{staticStyle:{"margin-top":"0px",height:"32px"},attrs:{label:"Autotick"},model:{value:e.axesProps.autotick,callback:function(t){e.$set(e.axesProps,"autotick",t)},expression:"axesProps.autotick"}})],1)],1),t(g.h7,[t(p.Z,{on:{click:function(t){return e.changeGraph()}}},[e._v("Apply")]),t(p.Z,{on:{click:function(t){return e.cancel()}}},[e._v("Cancel")])],1)],1):e._e()],1)}))],2)],1)},gr=[],fr={name:"cub-graph-settings",props:["showGraphSettingsDialog","conf"],data(){return{rules:{counter:e=>e<=1},selectedGraphType:"",selectedMeasure:"",gSettings:{showlegends:!0,reporttitle:"",showCurrency:!1,headerColor:"#344f60",showSearch:!1,isComparison:!1,isReverseScale:!1,markerType:"Bubble",center:"",zoom:1,colorscale:"Portland",desiredValueTendency:"incr",legendorientation:"v",legendposition:{x:"1",y:"1",anchor:"left"}},measureProps:{tracetype:"",showmeasure:!0,showpointlabels:!1,showtrendline:!1,trendlinecolor:"",trendlinetype:"dot",textposition:"",layout:{},showygridline:!1,showyzeroline:!1,color:"",axesposition:"left"},axesProps:{showmultiaxes:!1,showxgridline:!1,showxzeroline:!1,autotick:!1},report:"",item:{},markerTypes:["Bubble","Pointer"],colorscales:["Portland","Greys","YlGnBu","Greens","YlOrRd","Bluered","RdBu","Reds","Blues","Picnic","Rainbow","Jet","Hot","Blackbody","Earth","Electric","Viridis","Cividis"],graphTypes:["InfoBox","DataTable","Column","Bar","Line","StackedBar","Heatmap","Pie","Donut","Bubble","Geo","Sunburst","Funnel","StackedFunnel","Treemap","ProgressBar","Scatter","StackedArea","Indicator"],trendlinetypes:[{text:"Solid",value:"solid"},{text:"Dot",value:"dot"},{text:"Dashdot",value:"dashdot"}],tracetypes:[{text:"Bar",value:"bar"},{text:"Line",value:"scatter"}],textpositions:["top","bottom"],menu:!1,measureCollectionInfo:{}}},model:{prop:"showGraphSettingsDialog",event:"showGraphSettingsDialog"},created(){var e=this.getReportById(this.conf.reportId);if(e||(e=this.getSharedDashboardReportById(this.conf.reportId)),e){this.report=e,this.item.Target=this.conf.Target,this.item.title=this.conf.title,this.selectedGraphType=this.conf.gtype,this.item.dimensions=e.DimensionIds.split(this.CUB_FILTER_DELIM),this.item.measures=e.MeasureIds.split(this.CUB_FILTER_DELIM);for(var t=0;t<this.item.measures.length;t++){var r=this.item.measures[t].toString();this.measureProps.layout[r]=new DefaultMeasureProps}this.selectedMeasure=this.item.measures[0],this.item.filter=e.DimensionFilters;var s=this.conf.layout?.graphSettings;s||(s={});var a=this.conf.layout?.measureprops;a||(a={});var i=this.conf.layout?.axesprops;i||(i={}),this.retrieveGraphSettings(this.conf.gtype,s,a,i)}},mounted(){},methods:{changeGraph(){var e={};e.graphSettings=this.gSettings,e.axesprops=this.axesProps,e.measureprops=this.measureProps,e.selectedGraphType=this.selectedGraphType,this.$emit("event",e)},retrieveGraphSettings(e,t,r,s){this.selectedGraphType=e,jQuery.extend(!0,this.gSettings,this.gSettings,t),jQuery.extend(!0,this.measureProps,this.measureProps,r),jQuery.extend(!0,this.axesProps,this.axesProps,s),void 0!=this.gSettings.reporttitle&&""!=this.gSettings.reporttitle||(this.gSettings.reporttitle=this.conf.title)},cancel(){var e=this.conf.layout?.graphSettings;e||(e={});var t=this.conf.layout?.measureprops;t||(t={});var r=this.conf.layout?.axesprops;r||(r={}),this.retrieveGraphSettings(this.conf.gtype,e,t,r),this.$emit("cancelevent",!0)},measurePropsApply(){var e={};e.showmeasure=this.measureProps.showmeasure,e.tracetype=this.measureProps.tracetype,e.showpointlabels=this.measureProps.showpointlabels,e.textposition=this.measureProps.textposition,e.color=this.measureProps.color,e.showygridline=this.measureProps.showygridline,e.showyzeroline=this.measureProps.showyzeroline,e.showtrendline=this.measureProps.showtrendline,e.trendlinecolor=this.measureProps.trendlinecolor,e.trendlinetype=this.measureProps.trendlinetype;var t=this.selectedMeasure.toString();this.measureProps.layout[t]=e,this.measureCollectionInfo[t]=e,this.changeGraph()},measureSelection(e,t){this.selectedMeasure=e;var r=this.measureProps.layout[e];r?(this.measureProps.showmeasure=r.showmeasure,this.measureProps.showpointlabels=r.showpointlabels,this.measureProps.textposition=r.textposition,this.measureProps.tracetype=r.tracetype,this.measureProps.color=r.color,this.measureProps.showygridline=r.showygridline,this.measureProps.showyzeroline=r.showyzeroline,this.measureProps.showtrendline=r.showtrendline,this.measureProps.trendlinecolor=r.trendlinecolor,this.measureProps.trendlinetype=r.trendlinetype):(this.measureProps.showmeasure=!0,this.measureProps.showpointlabels=!1,this.measureProps.textposition="",this.measureProps.tracetype="",this.measureProps.color="",this.measureProps.showygridline=!1,this.measureProps.showyzeroline=!1,this.measureProps.showtrendline=!1,this.measureProps.trendlinecolor="",this.measureProps.trendlinetype="dot")}},computed:{internalShowGraphSettingsDialog:{get:function(){return this.showGraphSettingsDialog},set:function(e){this.$emit("change",e)}},...(0,F.Se)(["getReportById","getMetaNameById","getSharedDashboardReportById"]),isGraph:{get(){return"InfoBox"!=this.selectedGraphType&&"ProgressBar"!=this.selectedGraphType&&"DataTable"!=this.selectedGraphType}},isMap:{get(){return"Treemap"==this.selectedGraphType||"Heatmap"==this.selectedGraphType||"Geo"==this.selectedGraphType}},isMultiaxes:{get(){return"Column"==this.selectedGraphType||"StackedBar"==this.selectedGraphType||"StackedArea"==this.selectedGraphType||"Line"==this.selectedGraphType||"Scatter"==this.selectedGraphType||"Bubble"==this.selectedGraphType}}}},yr=fr,vr=(0,D.Z)(yr,mr,gr,!1,null,"ee5be0b4",null),Ir=vr.exports,br=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100%",width:"100%"}},[t("l-map",{staticStyle:{height:"100%"},attrs:{zoom:e.currentZoom,center:e.currentCenter,bounds:e.bounds},on:{"update:center":e.centerUpdate,"update:zoom":e.zoomUpdate}},[t(w.Z,{attrs:{color:"error",top:"",timeout:"2000"},model:{value:e.isLeaf,callback:function(t){e.isLeaf=t},expression:"isLeaf"}},[e._v("No further levels to show ")]),t("l-tile-layer",{attrs:{url:e.url}}),e._l(e.currentJson.children,(function(r,s){return t("div",{key:s},["Bubble"==e.markerType?t("l-circle-marker",{attrs:{"lat-lng":e.latLng(e.mapCoords[r.dimId][r.name]),radius:"5",color:e.markerColor},on:{click:function(t){return e.markerDrill(r.name)}}},[t("l-tooltip",[t("div",{on:{click:e.innerClick}},[t("strong",{staticStyle:{color:"red"}},[e._v(e._s(r.name))]),t("br"),e._l(r.measName,(function(s,a){return t("div",{key:a},[t("b",[e._v(e._s(s)+" :")]),e._v(" "+e._s(e.getDisplayValue(r[e.head.itemKey],e.head.itemId,"Default",!0))+" "),t("br")])}))],2)])],1):e.mapCoords[r.dimId][r.name]?t("l-marker",{attrs:{"lat-lng":e.latLng(e.mapCoords[r.dimId][r.name]),icon:e.isRagEnabled?r.size[e.ragMeasureIndex]>e.highValue?e.greenIcon:r.size[e.ragMeasureIndex]<e.lowValue?e.redIcon:e.amberIcon:e.defaultIcon},on:{"update:lat-lng":e.centerUpdate,click:function(t){return e.markerDrill(r.name)}}},[t("l-tooltip",[t("div",{on:{click:e.innerClick}},[t("strong",{staticStyle:{color:"red"}},[e._v(e._s(r.name))]),t("br"),e._l(r.measName,(function(s,a){return t("div",{key:a},[t("b",[e._v(e._s(s)+" :")]),e._v(" "+e._s(e.getDisplayValue(r.size[a],r.measId[a],"Default",!0))+" "),t("br")])}))],2)])],1):e._e()],1)})),e.currentDimIndex>0?t("div",{staticClass:"leaflet-bottom leaflet-right"},[t("div",{staticClass:"leaflet-control"},[t("l-icon",{attrs:{title:"Drill Up","icon-size":e.dynamicSize,"icon-url":"../assets/chart_funnel.png"}},[t(oe.Z,{on:{click:e.drillUp}},[e._v("mdi-arrow-up-bold")])],1)],1)]):e._e(),t("div",{staticClass:"leaflet-top leaflet-right"},[t("div",{staticClass:"leaflet-control"},[e.currentJson.parent?t(oe.Z,{attrs:{color:"red",dark:"",title:"Drill Up"},on:{click:e.drillUp}},[e._v(" mdi-arrow-up-bold ")]):e._e(),t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-x":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{title:e.isRagEnabled?"Disable RAG":"",color:"red"},on:{click:e.toggleRAG}},"v-icon",s,!1),r),[e._v("mdi-traffic-light")])]}}])},[t("div",[t(ne.Z,{staticClass:"pa-0",attrs:{dense:""}},[t("div",{staticClass:"text-h7 text-center",staticStyle:{"background-color":"#3c8dbc",color:"white"}},[e._v(" RAG Measure ")]),t(mt.Z),t(gt.Z,{model:{value:e.ragMeasureIndex,callback:function(t){e.ragMeasureIndex=t},expression:"ragMeasureIndex"}},e._l(e.nestedJson.measName,(function(r,s){return t(le.Z,{key:s,staticStyle:{"min-height":"24px"},attrs:{value:s},on:{click:e.updateRagColumn}},[t(Ue.V9,[e._v(e._s(r))])],1)})),1)],1)],1)]),t(he.Z,{attrs:{"open-on-hover":"",bottom:"",left:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{color:"red",dark:""}},"v-icon",s,!1),r),[e._v(" mdi-alert-circle ")])]}}])},[t(ne.Z,{staticClass:"pa-0",attrs:{dense:""}},[t("div",{staticClass:"text-h7 text-center",staticStyle:{"background-color":"#3c8dbc",color:"white"}},[e._v(" Missing Items ")]),t(mt.Z),e._l(e.missedList,(function(r,s){return t(le.Z,{key:s,staticStyle:{"min-height":"24px"}},[t(Ue.V9,[e._v(e._s(r))])],1)}))],2)],1)],1)])],2)],1)},_r=[],Dr=r(73153),Cr=r(23512),Sr=r(29926),Fr=r(7530),wr=r(48344),xr=r(19524),Tr=r(91820),Er=r(2949);r(75830);delete Dr.Icon.Default.prototype._getIconUrl,Dr.Icon.Default.mergeOptions({iconRetinaUrl:r(6431),iconUrl:r(37093),shadowUrl:r(68858)});var kr={name:"cub-leaflet",mixins:[ve.Z],props:["measureCount","dimensions","conf","showTable","nestedJson"],data(){return{ragMeasureIndex:0,isLeaf:!1,dynamicSize:[64,64],currencyFormat:"Default",latLngList:[],currentJson:{},zoom:7,url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",currentCenter:(0,Dr.latLng)(0,0),currentZoom:1,mapOptions:{},defaultIcon:"",dataList:[],nameList:[],sizes:[],radius:[],staticAnchor:[16,37],maxValue:100,mapCoords:{},dimensionCount:this.dimensions.length,drillFilters:{},currentDimIndex:0,latLngDict:{},isRagEnabled:!1,initialBounds:[[6.5546079,68.1113787],[35.6745457,97.395561]],missedList:[],redIcon:"",amberIcon:"",greenIcon:"",allValues:[],highValue:0,lowValue:0,ragMeasureKey:0,filteredTableData:[],tableKey:1}},components:{LMap:Cr.Z,LTileLayer:Sr.Z,LMarker:Fr.Z,LPopup:wr.Z,LTooltip:xr.Z,LIcon:Tr.Z,LCircleMarker:Er.Z,"cub-data-table":Zt,"cub-snackbar":A},created(){for(var e=0;e<this.dimensions.length;e++){var t=this.getItemMetaById(this.dimensions[e]);"geo"==t.DataType&&(this.mapCoords[this.dimensions[e]]=this.getMapCoords(this.dimensions[e]))}this.defaultIcon=L.icon({iconUrl:"http://my.robustdesigns.com/images/default-marker-icon.png",iconSize:[15,20],iconAnchor:[18,18],popupAnchor:[0,-10],shadowSize:[0,0],shadowAnchor:[10,10]}),this.redIcon=L.icon({iconUrl:"http://my.robustdesigns.com/images/red_location_marker.png",iconSize:[24,24],iconAnchor:[18,18],popupAnchor:[0,-10],shadowSize:[0,0],shadowAnchor:[10,10]}),this.amberIcon=L.icon({iconUrl:"http://my.robustdesigns.com/images/amber_location_marker.png",iconSize:[24,24],iconAnchor:[18,18],popupAnchor:[0,-10],shadowSize:[0,0],shadowAnchor:[10,10]}),this.greenIcon=L.icon({iconUrl:"http://my.robustdesigns.com/images/green_location_marker.png",iconSize:[24,24],iconAnchor:[18,18],popupAnchor:[0,-10],shadowSize:[0,0],shadowAnchor:[10,10]}),this.currentJson=this.nestedJson,this.updateRagColumn(),this.updateMissingItems()},computed:{...(0,F.Se)(["getMetaNameById","getReportById","getDashPageDetailsById","getItemMetaById","getGraphPropertiesById","getSharedDashboardReportById","getMapCoords"]),bounds(){return(0,Dr.latLngBounds)(this.initialBounds)},getCircleRadius(){var e=this;return function(t){return isNaN(t)?0:t/e.maxValue*100*e.currentZoom/10}},markerType:{get(){return void 0!=this.conf&&void 0!=this.conf.layout.graphSettings&&void 0!=this.conf.layout.graphSettings.markerType?this.conf.layout.graphSettings.markerType:"Pointer"}},markerColor:{get(){return void 0!=this.conf&&void 0!=this.conf.layout.measureprops&&void 0!=this.conf.layout.measureprops.color?this.conf.layout.measureprops.color:"black"}},center:{get(){return void 0!=this.conf&&void 0!=this.conf.layout.graphSettings&&void 0!=this.conf.layout.graphSettings.center&&""!=this.conf.layout.graphSettings.center?this.conf.layout.graphSettings.center:(0,Dr.latLng)(0,0)}}},methods:{toggleRAG(){this.isRagEnabled=!this.isRagEnabled},drillUp(){this.currentJson=this.currentJson.parent,this.updateRagColumn(),this.updateMissingItems(),this.resetMapBounds()},updateRagColumn(){for(var e=[],t=0;t<this.currentJson.children.length;t++)e.push(this.currentJson.children[t].size[this.ragMeasureIndex]);e.sort((function(e,t){return e-t}));var r=Math.ceil(.7*e.length),s=Math.ceil(.3*e.length);this.highValue=e[r],this.lowValue=e[s]},markerDrill(e){if(this.currentJson.hasOwnProperty("children")&&this.currentJson.children[0].hasOwnProperty("children")){for(var t=0;t<this.currentJson.children.length;t++)if(e==this.currentJson.children[t].name){this.currentJson=this.currentJson.children[t];break}this.updateRagColumn(),this.updateMissingItems(),this.resetMapBounds()}else this.isLeaf=!0},resetMapBounds(){for(var e=[],t=[],r=0;r<this.currentJson.children.length;r++){var s=this.currentJson.children[r],a=this.mapCoords[s.dimId][s["name"]];a&&(e.push(a[0]),t.push(a[1]))}var i=Math.min.apply(null,e)-1,o=Math.max.apply(null,e)+1,n=Math.min.apply(null,t)-1,l=Math.max.apply(null,t)+1;this.initialBounds=[[i,n],[o,l]]},updateMissingItems(){this.missedList=[];for(var e=0;e<this.currentJson.children.length;e++)this.mapCoords[this.currentJson.children[e].dimId][this.currentJson.children[e]["name"]]||this.missedList.push(this.currentJson.children[e]["name"])},latLng(e,t){return(0,Dr.latLng)(e,t)},zoomUpdate(e){this.currentZoom=e,this.$emit("zoomValueUpdated",e)},centerUpdate(e){this.currentCenter=e,this.$emit("centerValueUpdated",e)},showLongText(){this.showParagraph=!this.showParagraph},innerClick(){alert("Click!")}}},Lr=kr,Mr=(0,D.Z)(Lr,br,_r,!1,null,null,null),Ar=Mr.exports,Nr=function(){var e=this,t=e._self._c;return t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%",overflow:"hidden auto"}},[t(Pe.Z,[e.showSearch?t(Ze.Z,{attrs:{sm2:""}},[t(Ce.Z,{attrs:{"append-icon":"search",label:"Search","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1):e._e(),t(y.Z),e.showCurrency?t(Ze.Z,{attrs:{sm2:""}},[t($e.Z,{attrs:{items:e.shortFormatItems,label:"Units","hide-details":""},model:{value:e.shortFormat,callback:function(t){e.shortFormat=t},expression:"shortFormat"}})],1):e._e()],1),t(Mt.Z,{attrs:{"multi-sort":"","item-key":"itemKey",search:e.search,headers:e.childHeader,items:e.chartdataJSON,"items-per-page":e.rowsPerPage,page:e.page,"sort-by":e.sortBy,"sort-desc":e.sortDesc,"custom-sort":e.customDTSort},on:{"update:page":function(t){e.page=t},"update:sortBy":function(t){e.sortBy=t},"update:sort-by":function(t){e.sortBy=t},"update:sortDesc":function(t){e.sortDesc=t},"update:sort-desc":function(t){e.sortDesc=t}},scopedSlots:e._u([{key:"header",fn:function(){return[t("thead",e._l(e.multiHeaders,(function(r,s){return t("tr",{key:s},e._l(r,(function(r,s){return t("th",{key:s,style:e.getHeaderStyle(),attrs:{role:"columnheader",colspan:r.colspan}},[e._v(" "+e._s(+r.itemId>1e4?r.text:e.getDisplayValue(r.text,r.itemId))+" ")])})),0)})),0)]},proxy:!0},{key:"no-data",fn:function(){return[t(u.Z,{attrs:{value:!0,color:"error",icon:"warning"}},[e._v("Sorry, nothing to display here :(")])]},proxy:!0},e.chartdataJSON.length?{key:"body",fn:function({items:r,headers:s}){return[t("tbody",{staticClass:"text-no-wrap"},[e._l(r,(function(r,a){return t("tr",{key:a,class:r===e.selectedRow?"custom-highlight-row":"",on:{click:function(t){return e.rowClicked(r)}}},[e._l(s,(function(s){return[t("td",{key:s.itemKey,staticClass:"px-1",style:e.getDisplayStyle(s.itemId)},[e._v(" "+e._s(-1==s.itemId?a+1:e.getDisplayValue(r[s.itemKey]?r[s.itemKey]:"",s.itemId,e.shortFormat))+" ")])]}))],2)})),e.chartdataJSON.length>1?t("tr",[t("td",{staticClass:"text-center",attrs:{colspan:e.ndims-e.pivotLevel}},[e._v(" Grand Total ")]),e._l(e.totalArray,(function(r){return[t("td",{key:r.itemKey,staticStyle:{"text-align":"right","white-space":"nowrap"}},[e._v(" "+e._s(e.getGrandTotalDisplayValue(r.value,r.itemId,e.shortFormat))+" ")])]}))],2):e._e()],2)]}}:null],null,!0)})],1)},Rr=[],Or={name:"cub-data-table-n-level-crosstab",props:{headers:Array,chartdataJSON:Array,totalArray:Array,pivotLevel:Number,dataTableCurrenyFormat:{type:String,default:"Default"},showCurrency:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},ndims:Number,filterCreation:{type:Boolean,default:!1},headerColor:{type:String,default:"#344f60"},dimensions:{type:Array,default:[]},target:{type:String,default:"target2"}},mixins:[ve.Z],data:()=>({search:"",rowsPerPage:5,page:1,rowsPerPageItems:[5,10,25,100],sortBy:[],sortDesc:[],childHeader:[],parentHeader:[],serialNumItem:{itemId:-1,text:"S.No.",value:"S.No.",isDummyHeader:!0},multiHeaders:[],selectedRow:{}}),created(){},mounted(){this.multiHeaders=this.headers.slice(0,this.headers.length-1),this.childHeader=this.headers[this.headers.length-1],this.serialNumItem.class=this.getClassName(this.headerColor);for(var e=0;e<this.childHeader.length;e++)this.childHeader[e].class=this.getClassName(this.headerColor)},methods:{getClassName(e){var t=document.createElement("style");return t.innerHTML=".header-class-ct-"+this.target+" { background: "+e+" !important;}",document.head.append(t),"header-class-ct-"+this.target},getHeaderStyle(){return this.headerColor.length>0?"background-color:"+this.headerColor+";font-size:11px;":""},rowClicked(e){if(this.filterCreation){var t=!0;this.selectedRow===e?(t=!1,this.selectedRow={}):(t=!0,this.selectedRow=e);var r=Object.keys(e),s=[],a=[],i=[];if(this.selectedDimensions.length)i=this.selectedDimensions;else for(var o=0;o<this.dimensions.length;o++)i.push(this.getItemMetaById(this.dimensions[o]));for(var n=0;n<i.length;n++)for(var l=0;l<r.length;l++)i[n].Id==r[l]&&(s.push(r[l]),a.push(i[n].Id));var d=[];for(n=0;n<s.length;n++){var h={};h.FilterValues=[e[s[n]]],h.FilterItemId=a[n],h.FilterOper="eq",h.FilterName="",h.isNormalFilter=!0,d.push(h)}for(n=0;n<d.length;n++)t?this.insertIntoCheckedFilters(d[n]):this.uncheckSameDimensionFilters(d[n]);"dashboard"==this.$route.name&&this.$root.$refs.CubStandardFilterDrawer.applyFilters()}}},computed:{...(0,F.Se)(["selectedDimensions","defaultCurrencyFormat"]),shortFormatItems:{get:function(){return"en_IN.UTF-8"==this.defaultCurrencyFormat?["Default","Lakhs","Crores"]:["Default","Million","Billion"]}},shortFormat:{get:function(){return this.dataTableCurrenyFormat},set:function(e){this.$emit("update:dataTableCurrenyFormat",e),this.$emit("updateCurrenyFormat",e)}}}},Br=Or,Zr=(0,D.Z)(Br,Nr,Rr,!1,null,"034a01c8",null),Pr=Zr.exports,Vr={name:"cub-plotly",mixins:[ve.Z,Lt.A],props:["conf","dashId","reportFilterStr","currencyFormat"],data(){return{nestedJson:{},reportStyle:"1",dataTableKey:0,isMap:!1,isReportFound:!0,sortDict:new Map,item:{},menuitems:[{title:"Graph Settings"},{title:"Export"},{title:"Remove"},{title:"Refresh"}],reportmetaDataItems:{viewdetailsdialog:!1,transactionchecked:[],viewdetailsjson:[],metadataResult:[],metadataResultHeader:[],metadataResultData:[],metadataResultArray:[],isMetadataResultLoaded:!0},isdetailReport:!1,gSettings:{showlegends:!0,showpointlabels:!1,reporttitle:"",showCurrency:!1,headerColor:"#344f60",showSearch:!1,isComparison:!1,desiredValueTendency:"incr",legendorientation:"v",legendposition:{x:"1",y:"1",anchor:"left"},markerType:"Pointer"},measureProps:{layout:{}},axesProps:{showmultiaxes:!1,showxgridline:!1,showxzeroline:!1,autotick:!1},showMenuIcon:!1,showGraphSettingsDialog:!1,isChart:!1,i:"",reportdataTableItems:{headers:"",chartdata:"",search:"",chartdataJSON:""},isCrossTab:!1,showMenuItems:!1,selectedGraphType:"",report:"",settings:{},isdatatable:!1,isgroupdatatable:!1,loading:!1,reportMeasures:[],crossTabHeader:"",timeFilterString:"",isError:!1,dimLength:0,pivotLevel:1}},created(){this.conf.layout||(this.conf["layout"]={},this.conf["layout"]["graphSettings"]=this.gSettings,this.conf["layout"]["measureprops"]=this.measureProps,this.conf["layout"]["axesprops"]=this.axesProps),this.settings.graphSettings=this.conf.layout.graphSettings,this.loading=!0;var e=null;if(this.isUpdatedReport(this.conf.reportId)||(e=this.getReportById(this.conf.reportId)),e){if(!e)return void(this.isReportFound=!1);this.isReportFound=!0,this.report=e,this.sortDict=this.decodeSortMap(this.report.ReportSortColumn),this.item.Target=this.conf.Target,this.populateReport()}else e=this.getSharedDashboardReportById(this.conf.reportId),e?(this.report=e,this.item.Target=this.conf.Target,this.populateReport()):this.$store.dispatch("getSharedDashboardReport",this.conf.reportId).then((t=>{if(t){if(e=this.getSharedDashboardReportById(this.conf.reportId),!e)return void(this.isReportFound=!1);this.isReportFound=!0,this.report=e,this.item.Target=this.conf.Target,this.populateReport()}}))},computed:{...(0,F.Se)(["getMetaNameById","getReportById","getDashPageDetailsById","getItemMetaById","getGraphPropertiesById","getSharedDashboardReportById","isUpdatedReport"]),changeHeight:{get(){return this.drillLabels.length>1}},pageDetails:{get(){return this.getDashPageDetailsById(this.dashId)}},selectedFilterStr:function(){var e="";return this.reportFiltersArr.length&&(e=this.generateFilterQuery(this.reportFiltersArr)),e}},methods:{resetBreadcrumbs(){this.drillLabels.splice(1)},zoomValUpdated(e){this.conf.layout.graphSettings.zoom=e},centerValUpdated(e){this.conf.layout.graphSettings.center=e},metaResultCallback(e,t){var r="";if(e.getMetadataResultSetResponse.DATA&&(r=e.getMetadataResultSetResponse.DATA),"CUBOT-NO-METADATA-FOUND"==r&&(r=[]),"string"==typeof r){if("CUBOT-NO-METADATA-FOUND"!=r){var s=document.createElement("a");return s.href=r,s.download=r.substring(r.lastIndexOf("/")+1,r.length),void s.dispatchEvent(new MouseEvent("click"))}r=[]}var a=new Array;for(l=0;l<r.length;l++)if("object"===typeof r[l].COL)a.push(r[l].COL);else if("string"===typeof r[l].COL){var i=new Array;i.push(r[l].COL),a.push(i)}var o=new Array;for(l=0;l<this.reportmetaDataItems.transactionchecked.length;l++)o.push(this.reportmetaDataItems.transactionchecked[l].itemName);a.length<2&&(a[0]=o),this.reportmetaDataItems.metadataResultArray=a;for(var n=new Array,l=0;l<a[0].length;l++){var d=new Object;d.text=a[0][l],d.value=a[0][l],d.align="left",n.push(d)}this.reportmetaDataItems.metadataResultHeader=n,this.reportmetaDataItems.metadataResultData=arrToObject(a)},breadcrumbClick(e,t,r){if(t)this.drillLabels=this.drillLabels.slice(0,t+1),this.isCrossTab?this.plotAnyChart(e,r.depth,r,this.item.Target,this.crossTabHeader.nmeas,this.conf.gtype,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops,this.item.measures):this.plotAnyChart(e,r.depth,r,this.item.Target,this.item.measures.length,this.conf.gtype,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops,this.item.measures);else if(this.resetBreadcrumbs(),this.isCrossTab){var s={};s.Target=this.conf.Target,s.data=this.item.data;var a={DimensionIds:this.item.dimensions.join(this.CUB_FILTER_DELIM),MeasureIds:this.item.measures.join(this.CUB_FILTER_DELIM)};this.drawCrossTabGraph(s,a,this.conf.gtype,this.sortDict,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops)}else this.drawPlotlyCharts(this.item.Target,this.item.data,this.item.dimensions.length,this.item.measures.length,this.conf.gtype,this.item.measures,this.item.dimensions,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops)},getTimeFilters(e){for(var t=[],r=0;r<e.length;r++)if(""!=e[r].FilterItemId){var s=this.getItemMetaById(e[r].FilterItemId);["time","CALENDAR_PERIODS"].includes(s.Table)&&t.push(e[r])}return t},populateReport(){if(this.item.gtype=this.conf.gtype,this.selectedGraphType=this.conf.gtype,"DETAIL_REPORT"!=this.report.ReportType){this.item.dimensions=this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.item.measures=this.report.MeasureIds.split(this.CUB_FILTER_DELIM);for(var e=0;e<this.item.measures.length;e++)this.reportMeasures.push(this.getItemMetaById(this.item.measures[e]));this.selectedMeasure=this.item.measures[0],this.item.filter=this.report.DimensionFilters;var t=new Object,r=this.filterStringToArray(this.report.DimensionFilters),s=this.filterStringToArray(this.report.MeasureFilters),a=this.filterStringToArray(this.report.FilterLogic,1),i=r.concat(s.concat(a)),o=this.resolveFilterArrays(i,this.reportFilterStr),n=this.getTimeFilters(o);n.length&&(this.timeFilterString=this.generateAppliedFilterString(n,0));var l=this.generateFilterQuery(o);t.dimensionFilterList=l.dimensionFilterList,t.measureFilterList=l.measureFilterList,t.filterLogic=l.filterLogic,t.dimensionList=this.item.dimensions.join(this.CUB_FILTER_DELIM),t.measureList=this.item.measures.join(this.CUB_FILTER_DELIM),t.dataInstanceId="","-1"!=this.report.ReportTopn&&(t.dataInstanceId=this.topXString(this.report)),t.uiInstance="default",t.params="",this.isError=!1,this.$store.dispatch("getReportData",t).then((e=>{var t=e;this.$store.dispatch("getGraphProperties",this.report.Id).then((e=>{if(e){var r=e.Data;this.pivotLevel=1;for(var s=0;s<r.length;s++)"style"==r[s].Name.toLowerCase()&&(this.reportStyle=r[s].Value),"pivotlevel"==r[s].Name.toLowerCase()&&(this.pivotLevel=Number(r[s].Value));this.reportDataCallback(t)}}))}))}else{this.loading=!0,this.isdetailReport=!0;var d=this;this.$store.dispatch("getFactDetails",d.conf.reportId).then((e=>{if(e){this.factdetails=e;for(var t=e.MetadataOrder.split("-"),r=e.MetadataName.split(","),s=0;s<t.length;s++){var a=new Object;a.itemId=t[s],a.itemName=r[s],d.reportmetaDataItems.transactionchecked.push(a)}d.getDetailReport(e)}}))}},topXString(e){var t="";return"-1"!=e.ReportTopn&&(t="topx="+e.ReportTopn+";sort="+e.ReportSortColumn),t},reportDataCallback(e){if(this.loading=!1,this.isMap=!1,e){if(e.length<2)return void $("#"+this.conf.Target).html("No Data Found");this.item.data=e,this.sortDict=this.decodeSortMap(this.report.ReportSortColumn),this.sortDict&&(this.item.data=this.sortReportData(this.item.data,this.item.dimensions,this.item.measures,this.sortDict)),this.reportdataTableItems.totalArray=this.getTotals(e,this.item.dimensions.length,this.selectedMeasures),"CrossTab"==this.report.ReportLayout?this.isCrossTab=!0:this.isCrossTab=!1,"DETAIL_REPORT"==this.report.ReportType?this.isdetailReport=!0:this.isdetailReport=!1,"Geo"==this.selectedGraphType?(this.nestedJson=this.getNestedJson(this.item.data,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.report.MeasureIds.split(this.CUB_FILTER_DELIM).length,this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.report.DimensionIds.split(this.CUB_FILTER_DELIM)),this.isMap=!0):"DataTable"!=this.selectedGraphType&&"GroupDataTable"!=this.selectedGraphType?(this.isChart=!0,this.isCrossTab?this.drawCrossTabGraph(this.item,this.report,this.selectedGraphType,this.sortDict,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops):this.drawPlotlyCharts(this.item.Target,this.item.data,this.item.dimensions.length,this.item.measures.length,this.selectedGraphType,this.item.measures,this.item.dimensions,this.conf.layout.graphSettings,this.conf.layout.measureprops,this.conf.layout.axesprops)):(this.drawDataTable(),"GroupDataTable"==this.selectedGraphType?(this.isgroupdatatable=!0,this.settings.selectedGraphType="GroupDataTable"):(this.settings.selectedGraphType="DataTable",this.isdatatable=!0))}else this.isError=!0},redrawGraph(e){var t={};this.selectedGraphType=e,jQuery.extend(!0,this.conf.layout.graphSettings,this.gSettings,this.conf.layout.graphSettings),jQuery.extend(!0,this.conf.layout.measureprops,this.measureProps,this.conf.layout.measureprops),jQuery.extend(!0,this.conf.layout.axesprops,this.axesProps,this.conf.layout.axesprops),t.graphSettings=this.conf.layout.graphSettings,t.measureprops=this.conf.layout.measureprops,t.axesprops=this.conf.layout.axesprops,t.selectedGraphType=e,this.changeGraph(t)},changeGraph(e){this.dataTableKey++,this.resetBreadcrumbs(),this.settings=e;var t=e.graphSettings,r=e.axesprops,s=e.measureprops;t||(t=this.gSettings),r||(r=this.axesprops),s||(s=this.measureprops);var a=e.selectedGraphType;this.isMap=!1,this.isdatatable=!1,this.isChart=!1,""!=t.reporttitle&&void 0!=t.reporttitle&&(this.item.title=t.reporttitle),"DETAIL_REPORT"!=this.report.ReportType&&("DataTable"==a?(this.drawDataTable(),$("#"+this.conf.Target+" .plot-container").empty(),"CrossTab"==this.report.ReportLayout?this.isCrossTab=!0:this.isCrossTab=!1,this.isdatatable=!0):"Geo"==a?(this.nestedJson=this.getNestedJson(this.item.data,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.report.MeasureIds.split(this.CUB_FILTER_DELIM).length,this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.report.DimensionIds.split(this.CUB_FILTER_DELIM)),$("#"+this.conf.Target+" .plot-container").empty(),this.isMap=!0):("CrossTab"==this.report.ReportLayout?this.drawCrossTabGraph(this.item,this.report,a,this.sortDict,t,s,r):this.drawPlotlyCharts(this.item.Target,this.item.data,this.item.dimensions.length,this.item.measures.length,a,this.item.measures,this.item.dimensions,t,s,r),this.isChart=!0));for(var i=0;i<this.pageDetails.dashContent.length;i++)this.item.Target==this.pageDetails.dashContent[i].Target&&(this.pageDetails.dashContent[i].layout.axesprops=r,this.pageDetails.dashContent[i].layout.measureprops=s,this.pageDetails.dashContent[i].layout.graphSettings=t,this.pageDetails.dashContent[i].gtype=a,""!=t.reporttitle&&(this.pageDetails.dashContent[i].title=t.reporttitle));this.showGraphSettingsDialog=!1},getDetailReport(e){this.dataTableKey++;var t={measureId:e.MeasureId};t["selectedItemList"]=e.MetadataOrder.replace(/-/g,this.CUB_FILTER_DELIM);var r=this.generateFilterQuery(this.reportFilterStr);t.dimensionFilterList=this.report.DimensionFilters,t.filterLogic=r.filterLogic,t.displayOption="show",this.loading=!0,this.$store.dispatch("getMetadataResult",t).then((e=>{var t=e,r=new Array;for(o=0;o<t.length;o++)if("object"===typeof t[o].COL)r.push(t[o].COL);else if("string"===typeof t[o].COL){var s=new Array;s.push(t[o].COL),r.push(s)}var a=new Array;for(o=0;o<this.reportmetaDataItems.transactionchecked.length;o++)a.push(this.reportmetaDataItems.transactionchecked[o].itemName);r.length<2&&(r[0]=a);for(var i=new Array,o=0;o<r[0].length;o++){var n=new Object;n.text=r[0][o],n.value=r[0][o],n.align="left",i.push(n)}this.reportmetaDataItems.metadataResultHeader=i,this.reportmetaDataItems.metadataResultData=arrToObject(r),this.loading=!1}))},cancelGraphSettings(){this.showGraphSettingsDialog=!1},menuItem(e){if("Graph Settings"==e.title)this.showGraphSettingsDialog=!0;else if("Remove"==e.title){var t={};t.dashId=this.dashId,t.reportId=this.conf.reportId,this.$store.commit("deleteReportFromDashPage",t)}else"Refresh"==e.title?(this.loading=!0,this.isdetailReport=!1,this.dataTableKey++,this.populateReport()):"Export"==e.title&&("DETAIL_REPORT"==this.report.ReportType?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DETAILS_DOWNLOAD_MSG"),this.exportMetadataResult()):this.exportToExcel(this.item.data,this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.reportStyle,"",this.item.title?this.item.title:this.report.Title,this.pivotLevel,this.item.gtype))},exportMetadataResult(){for(var e=new Array,t=0;t<this.reportmetaDataItems.transactionchecked.length;t++)e.push(this.reportmetaDataItems.transactionchecked[t].itemId);var r={measureId:this.factdetails.MeasureId};r["selectedItemList"]=e.join(this.CUB_FILTER_DELIM);var s=this.generateFilterQuery(this.reportFilterStr);r.dimensionFilterList=s.dimensionFilterList,r.filterLogic=s.filterLogic,r.displayOption="download",this.$store.dispatch("getMetadataResult",r).then((e=>{var t=document.createElement("a");t.href=e,t.download=e.substring(e.lastIndexOf("/")+1,e.length),t.dispatchEvent(new MouseEvent("click"))}))},drawDataTable(){if(this.dataTableKey++,this.dimLength=this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.isCrossTab||this.isdetailReport){var e=this.item.data.slice(1),t=this.getCTDTHeaderByStyle(e,this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.reportStyle,this.pivotLevel);this.reportdataTableItems.headers=t["header"],this.reportdataTableItems.chartdataJSON=t["data"],this.reportdataTableItems.totalArray=this.getDTTotals(this.reportdataTableItems.headers[this.reportdataTableItems.headers.length-1],this.reportdataTableItems.chartdataJSON,this.dimLength-this.pivotLevel-1,this.report.MeasureIds.split(this.CUB_FILTER_DELIM))}else{var r=this.item.data;this.reportdataTableItems.headers=this.getDTHeaders(this.report.DimensionIds.split(this.CUB_FILTER_DELIM).concat(this.report.MeasureIds.split(this.CUB_FILTER_DELIM))),this.reportdataTableItems.chartdataJSON=this.getDTValues(r,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).concat(this.report.MeasureIds.split(this.CUB_FILTER_DELIM))),this.reportdataTableItems.totalArray=this.getDTTotalsNormal(r,this.dimLength,this.report.MeasureIds.split(this.CUB_FILTER_DELIM))}}},components:{"cub-data-table":Zt,"grouped-data-table":rr,"cub-data-table-crosstab":jt,"cub-data-table-detail":Kt,"cub-graph-settings":Ir,"cub-leaflet":Ar,Stretch:lr,CubLeaflet:Ar,"cub-data-table-n-level-crosstab":Pr}},Ur=Vr,$r=(0,D.Z)(Ur,Et,kt,!1,null,"50e304e8",null),Gr=$r.exports,jr=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100%"}},[e.incompatible?t(m.Z,[e._v("Cannot plot")]):e.isComparison?t("div",{staticStyle:{height:"100%"}},[t(n.Z,{attrs:{bg:"","fill-height":"","grid-list-md":"","text-xs-center":""}},[t(Pe.Z,{attrs:{row:"",wrap:"","align-center":""}},[t(Ze.Z,[t("div",{staticClass:"justify-center text--primary",staticStyle:{display:"flex"}},[t("p",{staticClass:"mb-0",staticStyle:{"font-size":"60px"}},[e._v(" "+e._s(e.actualValue)+" "),t("span",{staticClass:"display-1"},[e._v(e._s(e.suffix))])]),t(oe.Z,{staticStyle:{"margin-left":"15px"},style:{color:e.isTrendPositive?"green":"red"}},[e._v(e._s(e.isTrendPositive?"mdi-trending-up":"mdi-trending-down"))]),t("p",{staticClass:"mb-0",staticStyle:{"font-size":"30px","margin-top":"25px"},style:{color:e.isTrendPositive?"green":"red"}},[e._v(e._s(e.percentChangeInValue)+"%")])],1)])],1)],1)],1):t("div",{staticStyle:{height:"100%"}},[t(n.Z,{attrs:{bg:"","fill-height":"","grid-list-md":"","text-xs-center":""}},[t(Pe.Z,{attrs:{row:"",wrap:"","align-center":""}},[t(Ze.Z,[t("div",{staticClass:"justify-center display-3 text--primary"},[t("span",[e._v(e._s(e.actualValue))]),t("span",{staticClass:"display-1"},[e._v(e._s(e.suffix))])])])],1)],1)],1)],1)},zr=[],qr={name:"cub-widget-1",props:["data","conf"],data(){return{suffix:"",isLoading:!1,incompatible:0,targetValue:0,actualValue:0,title:"Widget"}},computed:{...(0,F.Se)(["getReportById"]),changeInValue:{get(){return this.actualValue-this.targetValue}},percentChangeInValue:{get(){var e=100*(this.actualValue-this.targetValue)/this.targetValue;return Math.round(100*(+e+Number.EPSILON))/100}},height:{get(){return 25*this.conf.h}},isComparison:{get(){var e=this.conf.layout?.graphSettings?.isComparison;return e||(e=!1),e}},desiredValueTendency:{get(){var e=this.conf.layout?.graphSettings?.desiredValueTendency;return e||(e="incr"),e}},isTrendPositive:{get(){return"incr"==this.desiredValueTendency&&this.percentChangeInValue>0||"decr"==this.desiredValueTendency&&this.percentChangeInValue<0}}},mounted(){var e=this.data;e&&(2==e.length&&2==e[0].length?(this.actualValue=+e[1][1],this.actualValue=Math.round(100*(this.actualValue+Number.EPSILON))/100):2==e.length&&3==e[0].length?(this.actualValue=Math.round(100*(+e[1][2]+Number.EPSILON))/100,this.targetValue=Math.round(100*(+e[1][1]+Number.EPSILON))/100):3==e.length&&2==e[0].length?(this.actualValue=Math.round(100*(+e[2][1]+Number.EPSILON))/100,this.targetValue=Math.round(100*(+e[1][1]+Number.EPSILON))/100):3==e.length&&3==e[0].length?(this.actualValue=Math.round(100*(+e[2][2]+Number.EPSILON))/100,this.targetValue=Math.round(100*(+e[1][2]+Number.EPSILON))/100):this.incompatible=1,this.actualValue>1e9?(this.suffix="Bn",this.actualValue=this.actualValue/1e9,this.targetValue=this.targetValue/1e9):this.actualValue>1e6&&(this.suffix="Mn",this.actualValue=this.actualValue/1e6,this.targetValue=this.targetValue/1e6),this.actualValue=Math.round(100*(this.actualValue+Number.EPSILON))/100)}},Wr=qr,Jr=(0,D.Z)(Wr,jr,zr,!1,null,"12bb991a",null),Hr=Jr.exports,Kr=r(51583),Yr=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"report-list"}},[t(Kr.Z,{attrs:{selectable:"",items:e.reportList,search:e.search,"item-key":"Id","item-text":"Title","selection-type":"leaf",dense:"","open-all":"",transition:"","open-on-click":"","return-object":""},scopedSlots:e._u([{key:"label",fn:function({item:r}){return[t("a",{staticStyle:{color:"black","font-size":"14px"},attrs:{id:r.Id,title:r.Title},on:{click:function(t){return e.toggleSelection(r)}}},[e._v(e._s(r.Title))])]}}]),model:{value:e.selectedReports,callback:function(t){e.selectedReports=t},expression:"selectedReports"}})],1)},Xr=[],Qr={name:"report-list",props:["search"],data(){return{open:[]}},created(){},mounted(){},computed:{reportList(){for(var e=this.$store.state.reportList,t=0;t<e.length;t++)e[t].children.length||e.splice(t,1);return 1==e.length&&0==e[0].Id&&(e=e[0].children),e.length&&(this.open=[e[0].Id]),e},selectedReports:{get(){return this.$store.getters.getSelectedReports},set(e){this.$store.commit("setSelectedReports",e)}}},components:{},methods:{toggleSelection(e){if("Folder"!=e.ReportType){for(var t=!1,r=0;r<this.selectedReports.length;r++)if(e.Id==this.selectedReports[r].Id){this.selectedReports.splice(r,1),t=!0;break}t||this.selectedReports.push(e)}}}},es=Qr,ts=(0,D.Z)(es,Yr,Xr,!1,null,"19b2d432",null),rs=ts.exports,ss=r(50356),as=r.n(ss),is=r(23533),os=r.n(is),ns=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"900px"},model:{value:e.showShareForm,callback:function(t){e.showShareForm=t},expression:"showShareForm"}},[t(m.Z,{attrs:{flat:""}},[t(g.EB,{staticStyle:{"padding-bottom":"0px"}},[e._v("Share Dashboard")]),t(mt.Z),t(n.Z,{attrs:{fluid:"",id:"cub-share"}},[t(m.Z,[t(pe.Z,{attrs:{vertical:"","hide-slider":""},model:{value:e.selectedDashItem.Id,callback:function(t){e.$set(e.selectedDashItem,"Id",t)},expression:"selectedDashItem.Id"}},[e._l(e.dashboardCollection,(function(r){return t(ue.Z,{key:r.Id,attrs:{href:`#${r.Id}`},on:{click:function(t){return e.dashboardSelection(r)}}},[e._v(e._s(r.Name))])})),e._l(e.dashboardCollection,(function(r){return t(pr.Z,{key:r.Id,staticStyle:{"overflow-x":"hidden"},attrs:{value:r.Id}},[t(o.Z,{staticClass:"flex-grow-0 flex-shrink-1"},[t(Ce.Z,{staticClass:"pt-0",staticStyle:{"margin-left":"2px","margin-right":"2px","border-radius":"2px","margin-top":"2px","padding-left":"4px","background-color":"whitesmoke"},attrs:{label:"Search...","single-line":"","hide-details":""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t(pe.Z,{staticStyle:{height:"100%"}},[t(ue.Z,[e._v("Users")]),t(ue.Z,[e._v("Groups")]),t(pr.Z,[t(m.Z,{staticStyle:{"padding-left":"8px","padding-top":"8px",height:"calc(100vh - 400px)",overflow:"hidden auto"},attrs:{flat:""}},e._l(e.filteredUsers,(function(r){return t(dr.Z,{key:r.Id,staticClass:"ma-0 pa-0",staticStyle:{height:"24px","padding-right":"20px"},attrs:{label:r.Name,ripple:!1,value:r.Id},model:{value:e.userCheckArr,callback:function(t){e.userCheckArr=t},expression:"userCheckArr"}})})),1)],1),t(pr.Z,[t(m.Z,{staticStyle:{"padding-left":"8px","padding-top":"8px",height:"calc(100vh - 400px)",overflow:"hidden auto"},attrs:{flat:""}},e._l(e.filteredGroups,(function(r){return t(dr.Z,{key:r.Id,staticClass:"ma-0 pa-0",staticStyle:{height:"24px","padding-right":"20px"},attrs:{label:r.Name,ripple:!1,value:r.Id},model:{value:e.groupCheckArr,callback:function(t){e.groupCheckArr=t},expression:"groupCheckArr"}})})),1)],1)],1)],1)],1)}))],2)],1)],1),t(g.h7,[t(y.Z),t(p.Z,{attrs:{text:"",color:"primary"},on:{click:function(t){return e.cancelShare()}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:""},on:{click:function(t){return e.shareDashboard()}}},[e._v("Share")])],1)],1)],1)},ls=[],ds={name:"cub-dashboard-share",props:["showShareForm","dashId"],model:{prop:"showShareForm",event:"showShareForm"},data(){return{groupCheckArr:[],userCheckArr:[],selectedDashboards:[],jsonUsers:[],jsonGroups:[],userView:[],groupView:[],search:"",selectedDashItem:"",dashCollectionInfo:{}}},watch:{userCheckArr:function(e,t){this.dashCollectionInfo[this.selectedDashItem.Id].userView=e},groupCheckArr:function(e,t){this.dashCollectionInfo[this.selectedDashItem.Id].groupView=e},selectedDashItem:function(e,t){e.Id in this.dashCollectionInfo?(this.userCheckArr=this.dashCollectionInfo[e.Id].userView,this.groupCheckArr=this.dashCollectionInfo[e.Id].groupView):(this.userCheckArr=[],this.groupCheckArr=[])}},computed:{...(0,F.Se)(["getUserListGetter","getGroupList","getSharedDashboardInfo","isSharedDashboard"]),filteredUsers:{get:function(){if(!this.search.length)return this.jsonUsers;if(this.search.length)for(var e=[],t=0;t<this.jsonUsers.length;t++)this.jsonUsers[t].Name.toLowerCase().includes(this.search.toLowerCase())&&e.push(this.jsonUsers[t]);return e}},filteredGroups:{get:function(){if(!this.search.length)return this.jsonGroups;for(var e=[],t=0;t<this.jsonGroups.length;t++)this.jsonGroups[t].Name.toLowerCase().includes(this.search.toLowerCase())&&e.push(this.jsonGroups[t]);return e}},dashboardCollection:{get(){return this.$store.state.dashboardCollection}},isShared:{get(){return this.isSharedDashboard(this.dashId)}}},created(){var e=this.getUserListGetter,t=this.getGroupList,r=[],s=[];if("string"==typeof e?r.push(e):r=e,"string"==typeof t?s.push(t):s=t,this.jsonUsers=[],this.jsonGroups=[],"undefined"!=typeof r)for(var a=0;a<r.length;a++){var i=r[a].split(":"),o={Id:i[0],Name:i[1]};this.jsonUsers.push(o)}if("undefined"!=typeof s)for(a=0;a<s.length;a++){i=s[a].split(":"),o={Id:i[0],Name:i[1]};this.jsonGroups.push(o)}this.populateSharedInfo()},methods:{populateSharedInfo(){if(!this.isShared&&this.dashId){this.selectedDashItem=this.dashboardCollection.filter((e=>e.Id==this.dashId))[0],this.selectedDashboards=[this.dashId];for(var e=0;e<this.dashboardCollection.length;e++){var t=this.getSharedDashboardInfo(this.dashboardCollection[e].Id),r={};if(void 0!=t)r.groupView=t.filter((function(e){return e<1e5})),r.userView=t.filter((function(e){return e>=1e5}));else r={userView:[],groupView:[]};this.dashCollectionInfo[this.dashboardCollection[e].Id]=r}}},cancelShare(){this.$emit("showShareForm",!1),this.clearForm()},clearForm(){this.selectedDashboards=[],this.userView=[],this.groupView=[]},dashboardSelection(e){this.selectedDashItem=e;var t=this.getSharedDashboardInfo(e.Id),r={};if(void 0!=t)r.groupView=t.filter((function(e){return e<1e5})),r.userView=t.filter((function(e){return e>=1e5}));else r={userView:[],groupView:[]};this.dashCollectionInfo[e.Id]=r},shareDashboard(){for(var e=0;e<this.dashboardCollection.length;e++){var t=this.dashCollectionInfo[this.dashboardCollection[e].Id].userView.filter(Boolean),r=this.dashCollectionInfo[this.dashboardCollection[e].Id].groupView.filter(Boolean),s=(t.concat(r),{});s["dashId"]=this.dashboardCollection[e].Id,s["userList"]=t.join(":"),s["groupList"]=r.join(":");var a=0;this.$store.dispatch("shareDashboard",s).then((e=>{a++,e?(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DASH_SHARE_SUCCESS"),a==this.dashboardCollection.length&&this.$store.dispatch("getDashboardShareInfo")):(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DASH_SHARE_FAILED"))}))}this.cancelShare()}}},hs=ds,cs=(0,D.Z)(hs,ns,ls,!1,null,null,null),us=cs.exports,ps={name:"dashboard-view",mixins:[ve.Z],props:["dashId"],data(){return{confirmDeleteDashboard:!1,showShareDialog:!1,reportSearch:"",reportsDialog:!1,filterDrawer:!1,dashInfo:"",editDashName:!1,dashNameUpdated:"",reportFiltersArr:[],appliedFilterStr:"",GraphType:"",currencyFormat:"Default"}},computed:{...(0,F.Se)(["getDashPageById","getDashPageDetailsById","getSelectedMyDashFilterValues","getSelectedFilters","getStandardFilterArray","isSharedDashboard","getMetaNameById"]),isShared:{get(){return this.isSharedDashboard(this.dashId)}},sharedDashboardList:{get(){return this.$store.state.sharedDashboardList}},dashboardCollection:{get(){return this.$store.state.dashboardCollection},set(e){this.$store.dispatch("resetDashboardOrder",e)}},key:{get(){return this.$store.getters.getcomponentKey}},pageDetails:{get(){var e=this.getDashPageDetailsById(+this.dashId);return e?e.dashContent:[]}},filterStr:{get(){return this.reportFiltersArr=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray),this.reportFiltersArr.length?this.appliedFilterStr=this.generateAppliedFilterString(this.reportFiltersArr):this.appliedFilterStr="",this.reportFiltersArr}},oldDashInfo:{get(){return this.getDashPageById(this.dashId)}},dashName:{get:function(){if(this.dashInfo){this.dashNameUpdated=this.dashInfo.dashName;var e=this.dashInfo.dashName;return"CUBOT_DEFAULT"==e&&(e=this.oldDashInfo.Name),e}return""}},selectedDimFiltersLength:{get(){for(var e=0,t=Object.keys(this.getSelectedMyDashFilterValues),r=0;r<t.length;r++)e+=this.getSelectedMyDashFilterValues[t[r]].length;return e}}},watch:{$route(e,t){if(this.editDashName=!1,this.dashId)this.dashInfo=this.getDashPageDetailsById(this.dashId);else{var r="";this.dashboardCollection.length?this.dashId=this.dashboardCollection[0].Id:this.sharedDashboardList.length&&(this.dashId=this.sharedDashboardList[0].Id),this.dashId&&(r=this.$route.path+this.dashId,this.$router.push(r))}this.$store.commit("setSelectedReports",[])},reportsDialog(e){this.reportSearch=""}},methods:{addDash(){this.$root.$emit("addNewDash",!0)},clearDashboardFilters(){this.$store.commit("deleteStandardFilterArray"),this.$store.commit("deleteAllCheckedFilters"),this.$store.commit("deleteAllSelectedFilters"),this.applyFilters()},resizedEvent(e,t,r,s,a){for(var i=0;i<this.pageDetails.length;i++)if(e==this.pageDetails[i].i)if(this.pageDetails[i].w=r,this.pageDetails[i].h=t,t<=5&&r<=3){var o={showlegend:!1,"xaxis.showticklabels":!1,"yaxis.showticklabels":!1};as().relayout(this.pageDetails[i].Target,o)}else{o={"xaxis.showticklabels":!0,"yaxis.showticklabels":!0};as().relayout(this.pageDetails[i].Target,o)}},movedEvent:function(e,t,r){for(var s=0;s<this.pageDetails.length;s++)e==this.pageDetails[s].i&&(this.pageDetails[s].x=t,this.pageDetails[s].y=r)},resizePlot(e){as().Plots.resize(e.Target)},cancelReportList(){this.reportsDialog=!1,this.$store.commit("setSelectedReports",[])},addReports(){for(var e=this.$store.getters.getSelectedReports,t=0;t<e.length;t++)this.getGraphPropertiesById(e[t])},deleteSelectedFilter(e){this.$root.$refs.CubStandardFilterDrawer.deleteFilter(e),this.$root.$refs.CubStandardFilterDrawer.applyFilters()},getGraphPropertiesById(e){var t="",r=this;this.$store.dispatch("getGraphProperties",e.Id).then((s=>{if(s){t=s.Data;for(var a=0;a<t.length;a++)"graphtype"==t[a].Name.toLowerCase()?r.GraphType=t[a].Value:"currencyformat"==t[a].Name.toLowerCase()&&(r.currencyFormat=t[a].Value);""==r.GraphType&&(r.GraphType="DataTable");var i={y:0,x:0,h:8,w:6,i:e.Id,title:e.Title,Target:rand(),layout:{}};i.reportId=e.Id,i["layout"]["axesprops"]={showxgridline:!1,showxzeroline:!1,showmultiaxes:!1,autotick:!1},i["layout"]["measureprops"]={tracetype:"",showmeasure:!0,showpointlabels:!1,textposition:"",ismeasurepropsapplied:!1,layout:{},color:"",showygridline:!1,showyzeroline:!1},i["layout"]["graphSettings"]={showCurrency:!1,showSearch:!1,showlegends:!0,reporttitle:e.Title,headerColor:"#344f60",isComparison:!1,colorscale:"Portland",isReverseScale:!1,desiredValueTendency:"incr",legendorientation:"v",legendposition:{x:1,y:1,anchor:"left"},zoom:1,markerType:"Bubble"},i.gtype=r.GraphType,r.$store.commit("addReportToDashboard",{dashId:r.dashId,dashName:r.dashName,report:i}),r.reportsDialog=!1,r.$store.commit("setSelectedReports",[])}}))},saveDashboard(){this.$store.dispatch("saveDashboardToServer",this.dashId).then((e=>{"success"==e&&(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DASH_SUCCESS"))}))},deleteDashboard(){this.$store.dispatch("revokeDashboardAccess",{dashId:this.dashId}),this.$store.dispatch("deleteDashboard",this.dashId),this.$router.push("/home/dashboard/")},renameDashboard(){var e={};e.dashId=this.dashId,e.dashName=this.dashNameUpdated,this.$store.dispatch("renameDashboard",e),this.editDashName=!1},applyFilters(){this.reportFiltersArr=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray),this.reportFiltersArr.length?this.appliedFilterStr=this.generateAppliedFilterString(this.reportFiltersArr):this.appliedFilterStr="";var e=this.$store.getters.getcomponentKey;this.$store.commit("setComponentKey",++e)}},components:{"cub-dashboard-share":us,"cub-widget-1":Hr,"cub-plotly":Gr,"report-list":rs,GridLayout:os().GridLayout,GridItem:os().GridItem},mounted(){this.$store.commit("deleteMyDashFilters")},created(){this.dashInfo=this.getDashPageDetailsById(this.dashId)}},ms=ps,gs=(0,D.Z)(ms,Ft,wt,!1,null,null,null),fs=gs.exports,ys=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"font-family":"'Fira Sans', sans-serif !important",height:"calc(100vh - 48px)"}},[t(Ce.Z,{staticClass:"pt-0",staticStyle:{"margin-left":"2px","margin-right":"2px","border-radius":"2px","margin-top":"2px","padding-left":"4px","background-color":"whitesmoke"},attrs:{label:"Search...",clearable:"","single-line":"","hide-details":""},on:{input:e.handleSearch},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t(Kr.Z,{ref:"tree",staticStyle:{height:"calc(100% - 32px)",overflow:"auto"},attrs:{items:e.reportList,search:e.search,"item-key":"Id","item-text":"Title",dense:"","expand-icon":"",activatable:"",color:"red",open:e.open,transition:"","open-on-click":""},scopedSlots:e._u([{key:"label",fn:function({item:r}){return[t("span",{staticStyle:{color:"black","font-size":"12px","padding-left":"6px",cursor:"pointer"},attrs:{title:r.Title},on:{click:function(t){return e.reportClicked(r)}}},["Text"==r.ReportType?t(oe.Z,[e._v("mdi-receipt-text-outline")]):e._e(),"DETAIL_REPORT"==r.ReportType?t(oe.Z,[e._v("mdi-border-all")]):e._e(),e._v(e._s(r.Title)+" "+e._s("Folder"==r.ReportType?"("+e.getReportCount(r)+")":"")),0!=r.ParentId&&"Folder"==r.ReportType&&0==e.getReportCount(r)?t(oe.Z,{staticStyle:{position:"absolute",right:"12px",top:"6px"},attrs:{small:""},on:{click:function(t){return t.stopPropagation(),e.deleteFolder(r)}}},[e._v("mdi-delete")]):e._e(),0==r.ParentId&&"Shared Reports"==r.Title?t(oe.Z,{staticStyle:{position:"absolute",right:"12px",top:"6px"},attrs:{small:""},on:{click:function(t){return t.stopPropagation(),e.refreshReportList.apply(null,arguments)}}},[e._v("mdi-sync")]):e._e()],1)]}},{key:"prepend",fn:function({item:r,open:s}){return["Folder"==r.ReportType?t(oe.Z,{attrs:{color:"#2aa9dae3"}},[e._v(e._s(s?"mdi-folder-open":"mdi-folder"))]):e._e()]}}])})],1)},vs=[],Is={name:"report-nav",data(){return{search:"",initialOpen:[],open:[],isRefresh:!1}},computed:{...(0,F.Se)(["getReportById"]),reportList(){for(var e=this.$store.state.reportList,t=0;t<e.length;t++)e[t].children.length||e.splice(t,1);return 1==e.length&&0==e[0].Id&&(e=e[0].children),e.length&&(this.isRefresh||(this.open.push(e[0].Id),this.initialOpen.push(e[0].Id),this.isRefresh=!1)),e}},components:{},methods:{deleteFolder(e){this.$store.dispatch("saveReportImpl",{operation:"deleteReportFromTrash",report_id:e.Id,reportType:"Folder"}).then((e=>{}))},refreshReportList(){this.isRefresh=!0,this.$store.dispatch("getReportList")},handleSearch(e){e?this.$refs.tree.updateAll(!0):(this.$refs.tree.updateAll(!1),this.open=this.initialOpen.slice())},reportClicked(e){if("Folder"==e.ReportType)return!1;var t=this.getReportById(e.Id);t?this.$router.push({path:"/home/reports/"+e.Id,params:{reportId:e.Id}}):this.$store.dispatch("getReportListById",e.Id).then((t=>{this.$router.push({path:"/home/reports/"+e.Id,params:{reportId:e.Id}})}))},getReportCount(e){var t=0;if("Folder"==e.ReportType&&e.children){for(var r=0;r<e.children.length;r++)t+=this.getReportCount(e.children[r]);return t}return 1}}},bs=Is,_s=(0,D.Z)(bs,ys,vs,!1,null,"00efc851",null),Ds=_s.exports,Cs=function(){var e=this,t=e._self._c;return t("div",{ref:"reportview"},[t("cub-save",{key:e.reportId,attrs:{reportId:e.reportId,dimIds:e.report.DimensionIds,measIds:e.report.MeasureIds,filterStr:this.generateFilterQuery(this.reportFilterStr),cmplxFilterStr:e.report.FilterLogic,styleType:e.reportStyle,graphType:e.selectedGraphType,sortMap:e.encodeSortMap(e.sortDict),currencyFormat:e.currencyFormat,factIds:e.factdetails.MetadataOrder,isDetailedReport:!(!e.report||"DETAIL_REPORT"!=e.report.ReportType),pivotLevel:e.pivotLevel},model:{value:e.saveReportDialog,callback:function(t){e.saveReportDialog=t},expression:"saveReportDialog"}}),e.showEmail?t("div",[t("cub-email",{attrs:{reportId:e.reportId,notifyId:e.notifyId},model:{value:e.showEmail,callback:function(t){e.showEmail=t},expression:"showEmail"}})],1):e._e(),e.showNotifyList?t("div",[t("notify-list",{attrs:{reportId:e.reportId},on:{emitNotifyId:function(t){return e.editNotify(t)}},model:{value:e.showNotifyList,callback:function(t){e.showNotifyList=t},expression:"showNotifyList"}})],1):e._e(),t(f.Z,{attrs:{persistent:"","max-width":"290"},model:{value:e.confirmDeleteReport,callback:function(t){e.confirmDeleteReport=t},expression:"confirmDeleteReport"}},[t(m.Z,[t(g.EB,{staticClass:"headline"},[e._v("Delete Report?")]),t(g.ZB,[e._v("Are you sure want to delete this report?")]),t(g.h7,[t(y.Z),t(p.Z,{attrs:{color:"red darken-1",text:""},on:{click:function(t){e.confirmDeleteReport=!1}}},[e._v("No")]),t(p.Z,{attrs:{color:"green darken-1",text:""},on:{click:()=>{e.deleteReport(e.report),e.confirmDeleteReport=!1}}},[e._v("Yes")])],1)],1)],1),e.reportId?t(m.Z,{staticStyle:{width:"100%"}},[t(g.EB,{staticClass:"d-flex justify-space-between py-0"},[t(Pe.Z,[t(Ze.Z,{attrs:{md10:""}},["DETAIL_REPORT"!=e.report.ReportType?t("div",[t("div",[t("router-link",{staticStyle:{cursor:"pointer","text-decoration":"none",color:"black","font-size":"18px"},attrs:{to:{path:"/home/analyze/"+e.reportId,params:{reportId:e.reportId}},title:"click to Analyze"}},[e._v(e._s(e.report.Title))])],1),t("div",{staticStyle:{"line-height":"initial"}},[t("label",{staticStyle:{color:"darkred","font-size":"15px","font-style":"italic"}},[e._v(e._s(e.appliedFilterStr))])])]):t("div",[t("div",[t("router-link",{staticStyle:{cursor:"pointer","text-decoration":"none",color:"black","font-size":"18px"},attrs:{to:{path:"/home/details/"+e.reportId,params:{reportId:e.reportId}},title:"click to view details"}},[e._v(e._s(e.report.Title))])],1),t("div",{staticStyle:{"line-height":"initial"}},[t("label",{staticStyle:{color:"darkred","font-size":"15px","font-style":"italic"}},[e._v(e._s(e.appliedFilterStr))])])])]),t(Ze.Z,{attrs:{md2:""}},[t(Pe.Z,{staticStyle:{"margin-top":"8px"},attrs:{"align-end":"","justify-end":""}},[""!=e.report&&"DETAIL_REPORT"!=e.report.ReportType?t(he.Z,{staticStyle:{"z-index":"999"},attrs:{"open-on-hover":"","offset-x":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{color:"#2aa9dae3",title:"Chart Type"}},"v-icon",s,!1),{...r}),[e._v("mdi-poll")])]}}],null,!1,2615969084)},[t(m.Z,[t("table",{staticClass:"gtypeTable",attrs:{border:"0",cellpadding:"0",cellspacing:"0"}},[t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportPie",attrs:{title:"Pie"},on:{click:function(t){return e.redrawGraph("Pie")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportDonut",attrs:{title:"Donut Chart"},on:{click:function(t){return e.redrawGraph("Donut")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportSunburst",attrs:{title:"Sunburst Chart"},on:{click:function(t){return e.redrawGraph("Sunburst")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionHVLine",attrs:{title:"HVLine"},on:{click:function(t){return e.redrawGraph("HVLine")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportLine",attrs:{title:"Line"},on:{click:function(t){return e.redrawGraph("Line")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStackedArea",attrs:{title:"Stacked Area Chart"},on:{click:function(t){return e.redrawGraph("StackedArea")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportBar",attrs:{title:"Bar"},on:{click:function(t){return e.redrawGraph("Bar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportColumn",attrs:{title:"Column chart"},on:{click:function(t){return e.redrawGraph("Column")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStack",attrs:{title:"Stacked Bar"},on:{click:function(t){return e.redrawGraph("StackedBar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionFunnelChart",attrs:{title:"Funnel Chart"},on:{click:function(t){return e.redrawGraph("Funnel")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportZoomTree",attrs:{title:"Zoomable Tree"},on:{click:function(t){return e.redrawGraph("Treemap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportHeat",attrs:{title:"Heat Chart"},on:{click:function(t){return e.redrawGraph("Heatmap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportMap",attrs:{title:"Map"},on:{click:function(t){return e.redrawGraph("Geo")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t(oe.Z,{attrs:{color:"#3c8dbc",title:"Data Table"},on:{click:function(t){return e.redrawGraph("DataTable")}}},[e._v("mdi-table")])],1)]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionStackedFunnel",attrs:{title:"Stacked Funnel"},on:{click:function(t){return e.redrawGraph("StackedFunnel")}}})])])]),t("tr",{},[t("td",[t("span",{staticClass:"gtypeClass"},[t(oe.Z,{attrs:{color:"#3c8dbc",title:"Grouped Data Table"},on:{click:function(t){return e.redrawGraph("GroupDataTable")}}},[e._v("mdi-format-indent-increase")])],1)]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionPareto",attrs:{title:"Pareto Chart"},on:{click:function(t){return e.redrawGraph("Pareto")}}})])])])])])],1):e._e(),""!=e.report&&"DETAIL_REPORT"!=e.report.ReportType?t(oe.Z,{attrs:{title:"View report details"},on:{click:function(t){return e.viewReportDetails(e.selectedMeasures[0].Id)}}},[e._v("mdi-alpha-d-box")]):e._e(),""!=e.report&&"DETAIL_REPORT"!=e.report.ReportType?t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-x":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{title:"Sort"}},"v-icon",s,!1),r),[e._v("mdi-swap-vertical")])]}}],null,!1,3744813220),model:{value:e.sortMenu,callback:function(t){e.sortMenu=t},expression:"sortMenu"}},[t("multi-sort-menu",{attrs:{sortDict:e.encodeSortMap(e.sortDict),itemIds:e.report.DimensionIds.split(this.CUB_FILTER_DELIM).concat(e.report.MeasureIds.split(this.CUB_FILTER_DELIM))},on:{update:e.sortReport}})],1):e._e(),""!=e.report?t(oe.Z,{attrs:{title:"Download"},on:{click:function(t){return e.exportData()}}},[e._v("mdi-download")]):e._e(),""!=e.report?t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-x":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{title:"E-mail"}},"v-icon",s,!1),r),[e._v("mdi-email")])]}}],null,!1,371826521)},[t(m.Z,[t(ne.Z,e._l(e.emailList,(function(r){return t(le.Z,{key:r.Id,on:{click:function(t){return e.getEmailForms(r.Id)}}},[e._v(e._s(r.Name))])})),1)],1)],1):e._e(),""!=e.report&&"Edit"==e.report.ReportPermissionLevel?t(oe.Z,{staticStyle:{"margin-top":"12px"},attrs:{title:"Edit Report Name"},on:{click:()=>{e.saveReportDialog=!0}}},[e._v("mdi-table-edit")]):e._e(),""!=e.report&&e.report.Owner==e.loggedInUser?t(oe.Z,{attrs:{title:"Delete Report"},on:{click:function(t){e.confirmDeleteReport=!0}}},[e._v("mdi-delete")]):e._e()],1)],1)],1)],1)],1):e._e(),t(xt.Z,{directives:[{name:"show",rawName:"v-show",value:e.drillLabels.length>1,expression:"drillLabels.length > 1"}],attrs:{items:e.drillLabels},scopedSlots:e._u([{key:"item",fn:function({item:r}){return[t(Tt.Z,{on:{click:function(t){return e.breadcrumbClick(r.text,r.depth,r.node)}}},[e._v(e._s(r.text))])]}},{key:"divider",fn:function(){return[t(oe.Z,[e._v("mdi-chevron-right")])]},proxy:!0}])}),e.loading?t(n.Z,{staticStyle:{width:"100%",height:"100%"}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v("Fetching report data")]),t(o.Z,{attrs:{cols:"6"}},[t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1)],1)],1):e.report?t("div",["DETAIL_REPORT"==e.report.ReportType&&e.showResult?t("div",{attrs:{id:"chart_div"}},[t("cub-data-table-detail",{attrs:{headers:e.reportmetaDataItems.metadataResultHeader,chartdataJSON:e.reportmetaDataItems.metadataResultData}})],1):"Geo"==e.selectedGraphType?t("div",{staticStyle:{height:"400px",width:"100%"},attrs:{id:"chart_div"}},[t("cub-leaflet",{key:e.dataTableKey,attrs:{"measure-count":e.report.MeasureIds.split(this.CUB_FILTER_DELIM).length,dimensions:e.report.DimensionIds.split(this.CUB_FILTER_DELIM),"nested-json":e.nestedJson,"show-table":""}})],1):t("div",[e.reportdataTableItems.isCrossTab&&e.reportdataTableItems.isdatatable?t("div",{attrs:{id:"chart_div"}},[t("cub-data-table-n-level-crosstab",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,dataTableCurrenyFormat:e.currencyFormat,chartdataJSON:e.reportdataTableItems.chartdataJSON,totalArray:e.reportdataTableItems.totalArray,ndims:e.dimLength,"pivot-level":e.pivotLevel},on:{"update:dataTableCurrenyFormat":function(t){e.currencyFormat=t},"update:data-table-curreny-format":function(t){e.currencyFormat=t}}})],1):e.reportdataTableItems.isdatatable&&!e.reportdataTableItems.isgroupdatatable?t("div",{attrs:{id:"chart_div"}},[t("cub-data-table",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,chartdataJSON:e.reportdataTableItems.chartdataJSON,totalArray:e.reportdataTableItems.totalArray,dataTableCurrenyFormat:e.currencyFormat,height:e.reportdataTableItems.chartdataJSON.length<5?"auto":"450px",ndims:e.dimLength},on:{"update:dataTableCurrenyFormat":function(t){e.currencyFormat=t},"update:data-table-curreny-format":function(t){e.currencyFormat=t}}})],1):e.reportdataTableItems.isdatatable&&e.reportdataTableItems.isgroupdatatable?t("div",{attrs:{id:"chart_div"}},[t("grouped-data-table",{key:e.dataTableKey,attrs:{headers:e.reportdataTableItems.headers,chartdataJSON:e.reportdataTableItems.chartdataJSON,dimIds:e.report.DimensionIds.split(this.CUB_FILTER_DELIM),measIds:e.report.MeasureIds.split(this.CUB_FILTER_DELIM)}})],1):t("div",{staticStyle:{"min-height":"450px",width:"100%",height:"100%"},attrs:{id:"chart_div"}}),""==e.report||e.loading?e._e():t("div",{staticStyle:{float:"right","margin-right":"12px"}},[t("label",{staticStyle:{"font-size":"small"}},[t("b",[e._v("Created on:")]),e._v(" "+e._s(e.getDisplayTime())+" "),t("b",[e._v("| Last Refreshed on:")]),e._v(" "+e._s(e.getReportRefreshedTime())+" "),t("b",[e._v("| Time taken:")]),e._v(" "+e._s(e.timeTaken)+" ")])])])]):e._e()],1)},Ss=[],Fs=function(){var e=this,t=e._self._c;return t("div")},ws=[],xs={name:"cub-error",props:["isCubError","cubErrorAlertType","cubErrorMessage"],model:{prop:"isCubError",event:"isCubError"},methods:{resetErrorDialog(){this.$emit("isCubError",!1)}}},Ts=xs,Es=(0,D.Z)(Ts,Fs,ws,!1,null,null,null),ks=Es.exports,Ls=function(){var e=this,t=e._self._c;return t(m.Z,[t(ne.Z,e._l(e.sortItems,(function(r){return t(le.Z,{key:r.Id,on:{click:function(t){return e.updateSort(r.Id)}}},[e._v(" "+e._s(r.Name)+" "),t(y.Z),1==e.getCurrentSort(r.Id)?t(oe.Z,{attrs:{small:""}},[e._v("mdi-arrow-up")]):-1==e.getCurrentSort(r.Id)?t(oe.Z,{attrs:{small:""}},[e._v("mdi-arrow-down")]):e._e(),e.getSortSequence(r.Id)?t("span",[e._v(e._s(e.getSortSequence(r.Id)))]):e._e()],1)})),1),t(p.Z,{staticStyle:{width:"100%"},attrs:{tile:"",color:"#3c8dbc",dark:""},on:{click:function(t){return e.sortReport()}}},[e._v("SORT")])],1)},Ms=[],As={name:"multi-sort-menu",mixins:[ve.Z],props:{itemIds:{type:Array,default:[]},sortDict:String},created(){this.sortList=Object.fromEntries(this.decodeSortMap(this.sortDict)),this.sortOrder=Array.from(this.decodeSortMap(this.sortDict).keys())},data:()=>({sortList:{},sortOrder:[]}),computed:{...(0,F.Se)(["getItemMetaById"]),sortItems:{get(){for(var e=[],t=0;t<this.itemIds.length;t++)e.push(this.getItemMetaById(this.itemIds[t]));return e}},getCurrentSort(){return e=>e in this.sortList?this.sortList[e]:0},getSortSequence(){return e=>this.sortOrder.indexOf(e)+1}},methods:{sortReport(){for(var e=new Map,t=0;t<this.sortOrder.length;t++)e.set(this.sortOrder[t],this.sortList[this.sortOrder[t]]);this.$emit("update",e)},updateSort(e){if(e in this.sortList){var t=this.sortList[e],r=t+1;if(2==r&&(r=-1),s["default"].set(this.sortList,e,r),!r){var a=this.sortOrder.indexOf(e);a>-1&&(this.sortOrder.splice(a,1),delete this.sortList[e])}}else this.sortOrder.push(e),s["default"].set(this.sortList,e,1)}}},Ns=As,Rs=(0,D.Z)(Ns,Ls,Ms,!1,null,"91fc7f6a",null),Os=Rs.exports,Bs=r(92648),Zs=r(98695),Ps=function(){var e=this,t=e._self._c;return t("div",[t(f.Z,{attrs:{persistent:"",width:"700px"},model:{value:e.internalShowEmailForm,callback:function(t){e.internalShowEmailForm=t},expression:"internalShowEmailForm"}},[t(w.Z,{attrs:{timeout:e.snackbarItems.timeout,color:e.snackbarItems.color,top:!0},model:{value:e.snackbarItems.showSnack,callback:function(t){e.$set(e.snackbarItems,"showSnack",t)},expression:"snackbarItems.showSnack"}},[e._v(e._s(e.snackbarItems.msg))]),t(m.Z,{attrs:{id:"email_form"}},[t(g.EB,{staticClass:"grey lighten-4 py-4 title"},[e._v("Email Form")]),t(n.Z,{staticClass:"pa-2",attrs:{"grid-list-sm":""}},[t(Pe.Z,{attrs:{row:"",wrap:""}},[t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Ce.Z,{attrs:{label:"Send To"},model:{value:e.sendTo,callback:function(t){e.sendTo=t},expression:"sendTo"}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Ce.Z,{attrs:{label:"BCC"},model:{value:e.sendbcc,callback:function(t){e.sendbcc=t},expression:"sendbcc"}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Ie.Z,{staticStyle:{"margin-top":"16px"},attrs:{dense:"",items:e.userIds,multiple:"",label:"Select User Ids","item-text":"Name","item-value":"Id"},scopedSlots:e._u([{key:"selection",fn:function({item:r,index:s}){return[0===s&&1==e.selectedUserIds.length?t(be.Z,[t("span",[e._v(e._s(r.Name))])]):e._e(),1===s?t("span",{staticClass:"grey--text caption"},[e._v(e._s(e.selectedUserIds.length)+" Options Selected")]):e._e()]}}]),model:{value:e.selectedUserIds,callback:function(t){e.selectedUserIds=t},expression:"selectedUserIds"}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Ie.Z,{staticStyle:{"margin-top":"16px"},attrs:{dense:"",items:e.groupIds,multiple:"",label:"Select Group Ids","item-text":"Name","item-value":"Id"},scopedSlots:e._u([{key:"selection",fn:function({item:r,index:s}){return[0===s&&1==e.selectedGroupIds.length?t(be.Z,[t("span",[e._v(e._s(r.Name))])]):e._e(),1===s?t("span",{staticClass:"grey--text caption"},[e._v(e._s(e.selectedGroupIds.length)+" Options Selected")]):e._e()]}}]),model:{value:e.selectedGroupIds,callback:function(t){e.selectedGroupIds=t},expression:"selectedGroupIds"}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Ce.Z,{attrs:{label:"Subject"},model:{value:e.subject,callback:function(t){e.subject=t},expression:"subject"}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(Bs.Z,{attrs:{rows:"1",label:"Message",counter:e.emailBodyLimit,maxlength:e.emailBodyLimit,rules:e.emailBodyRule},model:{value:e.emailBody,callback:function(t){e.emailBody=t},expression:"emailBody"}})],1),t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(Ie.Z,{staticStyle:{"margin-top":"16px"},attrs:{dense:"",items:e.deliveryOptions,label:"Frequency"},model:{value:e.selectedDeliveryOption,callback:function(t){e.selectedDeliveryOption=t},expression:"selectedDeliveryOption"}})],1),e.showTimePicker?t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(he.Z,{ref:"startdatemenu",attrs:{transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({staticStyle:{padding:"0px","margin-top":"10px"},attrs:{label:"Start Date","append-icon":"event",readonly:""},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}},r))]}}],null,!1,2889312560),model:{value:e.startdatemenu,callback:function(t){e.startdatemenu=t},expression:"startdatemenu"}},[t(_e.Z,{attrs:{"no-title":"",scrollable:"","allowed-dates":e.allowedDates},model:{value:e.startDate,callback:function(t){e.startDate=t},expression:"startDate"}})],1)],1):e._e(),e.showTimePicker?t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(he.Z,{ref:"menu",attrs:{"close-on-content-click":!1,"nudge-right":40,"return-value":e.time,transition:"scale-transition","offset-y":"","max-width":"290px","min-width":"290px"},on:{"update:returnValue":function(t){e.time=t},"update:return-value":function(t){e.time=t}},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({staticStyle:{padding:"0px","margin-top":"10px"},attrs:{label:"Time","prepend-inner-icon":"access_time",readonly:""},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}},r))]}}],null,!1,805534967),model:{value:e.menu2,callback:function(t){e.menu2=t},expression:"menu2"}},[e.menu2?t(Zs.Z,{attrs:{"full-width":"",format:"24hr"},on:{"click:minute":function(t){return e.$refs.menu.save(e.time)}},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}}):e._e()],1)],1):e._e(),e.showTimePicker?t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(he.Z,{ref:"enddatemenu",attrs:{transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({staticStyle:{padding:"0px","margin-top":"10px"},attrs:{label:"End Date","append-icon":"event",readonly:""},model:{value:e.endDate,callback:function(t){e.endDate=t},expression:"endDate"}},r))]}}],null,!1,1440414704),model:{value:e.enddatemenu,callback:function(t){e.enddatemenu=t},expression:"enddatemenu"}},[t(_e.Z,{attrs:{"no-title":"",scrollable:""},model:{value:e.endDate,callback:function(t){e.endDate=t},expression:"endDate"}})],1)],1):e._e(),"WEEKLY"==e.selectedDeliveryOption?t(Ze.Z,{staticClass:"d-flex justify-space-around",attrs:{sm12:""}},[t("span",[e._v("Choose Weekdays: ")]),e._l(e.weekdays,(function(r){return t(dr.Z,{key:r.id,staticClass:"mt-0 pt-0",attrs:{"hide-details":"",dense:"",label:r.name,value:r.id},model:{value:e.selectedWeekdays,callback:function(t){e.selectedWeekdays=t},expression:"selectedWeekdays"}})}))],2):e._e(),"MONTHLY"==e.selectedDeliveryOption||"FORTNIGHT"==e.selectedDeliveryOption?t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(Ie.Z,{staticStyle:{"margin-top":"16px"},attrs:{dense:"",items:e.days,label:"Day of month"},model:{value:e.selectedDay,callback:function(t){e.selectedDay=t},expression:"selectedDay"}})],1):e._e(),t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(dr.Z,{staticClass:"mt-4",attrs:{label:"Break Report"},model:{value:e.isBreakReport,callback:function(t){e.isBreakReport=t},expression:"isBreakReport"}})],1),e.isBreakReport?t(Ze.Z,{attrs:{xs12:"",sm3:""}},[t(Ie.Z,{staticStyle:{"margin-top":"12px"},attrs:{dense:"",items:e.reportDimensions,label:"Break Dimension","item-text":"Name","item-value":"Id"},model:{value:e.breakDimId,callback:function(t){e.breakDimId=t},expression:"breakDimId"}})],1):e._e(),e.isBreakReport?t(Ze.Z,[t(d.Z,{staticClass:"mt-0"},[t(o.Z,{attrs:{cols:"12"}},[t(dr.Z,{staticClass:"mt-0",attrs:{"true-value":"Y","false-value":"N",label:"Include break dimension in the report?"},model:{value:e.includeBreakDim,callback:function(t){e.includeBreakDim=t},expression:"includeBreakDim"}})],1)],1),t(d.Z,{staticClass:"mt-0"},[t(o.Z,{attrs:{cols:"12"}},[t(dr.Z,{staticClass:"mt-0",attrs:{"true-value":"Y","false-value":"N",label:"Include consolidate report?"},model:{value:e.addConsolidateReport,callback:function(t){e.addConsolidateReport=t},expression:"addConsolidateReport"}})],1)],1)],1):e._e()],1)],1),t(g.h7,[t(y.Z),t(p.Z,{attrs:{text:""},on:{click:function(t){return e.configureEmail()}}},[e._v("Save")]),t(p.Z,{attrs:{text:""},on:{click:function(t){e.internalShowEmailForm=!1}}},[e._v("Cancel")])],1)],1)],1)],1)},Vs=[],Us={name:"cub-email",props:["showEmailForm","reportId","notifyId"],model:{prop:"showEmailForm",event:"change"},data:function(){return{days:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],selectedDay:"",selectedWeekdays:[],weekdays:[{id:0,name:"SUN"},{id:1,name:"MON"},{id:2,name:"TUE"},{id:3,name:"WED"},{id:4,name:"THURS"},{id:5,name:"FRI"},{id:6,name:"SAT"}],endDate:"2099-12-31",startDate:new Date(Date.now()-6e4*(new Date).getTimezoneOffset()).toISOString().substr(0,10),startdatemenu:!1,enddatemenu:!1,today:(new Date).toISOString().substr(0,10),customDeliveryTime:null,sendTo:"",bccIdsFile:[],attachmentFile:[],selectedEmailIds:[],customDeliveryOption:!1,customGraphSize:!1,allEmailIds:[],subject:"",emailBody:"",sendcc:"",sendbcc:"",selectedUserIds:[],selectedGroupIds:[],isBreakReport:!1,selectedDeliveryOption:"SEND NOW",selectedReportAction:"",selectedGraphSize:"",deliveryOptions:["SEND NOW","DAILY","WEEKLY","FORTNIGHT","MONTHLY"],menu2:!1,time:null,dimensionWiseReport:!1,breakDimId:"",reportDimensions:[],checkbox1:!1,checkbox2:!1,custompopup:!1,customWidthHeight:!1,includeBreakDim:"N",addConsolidateReport:"N",snackbarItems:{showSnack:!1,timeout:3e3,color:"success",msg:"hello"},emailBodyRule:[e=>e.length<1e3||"Max 1000 characters"],emailBodyLimit:1e3}},computed:{...(0,F.Se)(["getUserListGetter","getGroupList","getNotifyById","getReportById","getItemMetaById"]),showTimePicker:{get:function(){return!!["DAILY","WEEKLY","FORTNIGHT","MONTHLY"].includes(this.selectedDeliveryOption)}},internalShowEmailForm:{get:function(){return this.showEmailForm},set:function(e){this.$emit("change",e)}},userIds:{get:function(){var e=this.getUserListGetter,t=[];"string"==typeof e?t.push(e):t=e;var r=[];if("undefined"!=typeof t)for(var s=0;s<t.length;s++){var a=t[s].split(":"),i={Id:a[0],Name:a[1]};r.push(i)}return r}},groupIds:{get:function(){var e=this.getGroupList,t=[];"string"==typeof e?t.push(e):t=e;var r=[];if("undefined"!=typeof t)for(var s=0;s<t.length;s++){var a=t[s].split(":"),i={Id:a[0],Name:a[1]};r.push(i)}return r}}},mounted(){if(this.notifyId){var e=this.getNotifyById(this.notifyId);this.populateNotify(e)}else{var t=new Date(this.startDate);this.selectedWeekdays=[+t.getDay()]}this.reportId&&this.populateDimensions()},watch:{startDate:{handler(e){if(e&&!this.notifyId){var t=new Date(e);this.selectedWeekdays=[+t.getDay()]}}},selectedDeliveryOption:{handler(e){this.customDeliveryOption="Custom"==e}},selectedGraphSize:{handler(e){this.customGraphSize="Custom"==e}},checkbox:{handler(e){this.dimensionWiseReport=!!e}},notifyId:{handler(e){if(e){var t=this.getNotifyById(this.notifyId);this.populateNotify(t)}}}},methods:{allowedDates:function(e){return console.log(e),console.log(this.today),e>=(new Date).toISOString().substr(0,10)},populateDimensions(){var e=this.getReportById(this.reportId).DimensionIds.split(this.CUB_FILTER_DELIM);console.log("reportDimensions"),console.log(e);for(var t=0;t<e.length;t++)this.reportDimensions.push(this.getItemMetaById(e[t]))},xmlEscapeEmail(e){return e?e.replace(new RegExp("%","g"),"%%").replace(new RegExp("&","g"),"&").replace(new RegExp('"',"g"),""").replace(new RegExp("'","g"),"\\'").replace(new RegExp("<","g"),"<").replace(new RegExp(">","g"),">"):e},populateNotify(e){for(var t=e.SenderDetails.split(";"),r={},s=0;s<t.length;s++)r[t[s].split("=")[0]]=t[s].split("=")[1].replace(/^\,/,"");this.selectedDeliveryOption=e.NotifyFreq,this.subject=e.Subject,this.emailBody=e.Content,this.time=e.Notifytime,Object.keys(e).includes("NotifyStartDate")&&(this.startDate=e.NotifyStartDate,this.endDate=e.NotifyEndDate),this.sendTo=r["TO"],this.sendbcc=r["BCC"],this.selectedDay=+e.NotifyWhen,this.selectedWeekdays=e.NotifyWhen.split("~_").map(Number),this.selectedUserIds=r["USER"].split(","),this.selectedGroupIds=r["GROUP"].split(",");var a=e.SendingOptions.split(";"),i={};for(s=0;s<a.length;s++){var o=a[s].split("=");i[o[0]]=o[1]}this.breakDimId=i["breakdim"],this.includeBreakDim=i["IncBrkDimYN"],this.addConsolidateReport=i["consolidateRpt"],this.breakDimId&&(this.isBreakReport=!0),this.populateDimensions(this.reportId)},configureEmail(){if(""==this.sendTo&&!this.selectedUserIds.length&&!this.selectedGroupIds.length&&""==this.sendbcc)return this.snackbarItems.showSnack=!0,this.snackbarItems.color="error",void(this.snackbarItems.msg="Please select a recepient.");var e={operationName:"setNotify"};this.notifyId||(this.notifyId=""),e.notifyId=this.notifyId,e.notifyTo=this.sendTo,e.notifySubject=this.xmlEscapeEmail(this.subject),e.notifyBody=this.xmlEscapeEmail(this.emailBody),e.notifyReportId=this.reportId,e.notifyFrequency=this.selectedDeliveryOption,e.notifyTime=this.time,e.notifyStartDate=this.startDate,e.notifyEndDate=this.endDate,e.notifyBcc=this.sendbcc,e.notifydays="","WEEKLY"==this.selectedDeliveryOption?e.notifydays=this.selectedWeekdays.join("~_"):["MONTHLY","FORTNIGHT"].includes(this.selectedDeliveryOption)&&(e.notifydays=this.selectedDay),e.notifyUserIds=this.selectedUserIds.concat(":"),e.notifyGroupIds=this.selectedGroupIds.concat(":"),this.isBreakReport&&(e.breakDimId=this.breakDimId,e.includeBreakDim=this.includeBreakDim,e.addConsolidateReport=this.addConsolidateReport),this.$store.dispatch("doNotifyOperation",e).then((e=>{e?(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","E-mail_SUCCESS")):(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","E-mail_FAILED"))})),this.internalShowEmailForm=!1}}},$s=Us,Gs=(0,D.Z)($s,Ps,Vs,!1,null,null,null),js=Gs.exports,zs=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"800px"},model:{value:e.showSaveForm,callback:function(t){e.showSaveForm=t},expression:"showSaveForm"}},[t(pe.Z,{attrs:{color:"#00796b"}},[t(ue.Z,{attrs:{href:"#tabinsaveform-1"}},[e._v("Save")]),1!=e.isDetailedReport?t(ue.Z,{attrs:{href:"#tabinsaveform-2"}},[e._v("Share")]):e._e(),e._l(2,(function(r){return t(pr.Z,{key:r,attrs:{value:"tabinsaveform-"+r}},[1==r?t(m.Z,{attrs:{flat:""}},[t(n.Z,{staticClass:"pa-4",attrs:{"grid-list-sm":""}},[t(Pe.Z,{attrs:{row:"",wrap:""}},[t(d.Z,{attrs:{xs12:""}},[t(Ze.Z,{attrs:{xs6:""}},[t(ur.Z,{attrs:{row:""},model:{value:e.isNewReport,callback:function(t){e.isNewReport=t},expression:"isNewReport"}},[t(cr.Z,{attrs:{label:"New Report",value:"0"}}),e.report&&e.reportId&&"View"!=e.report.ReportPermissionLevel?t(cr.Z,{attrs:{label:"Update Report",value:"1"}}):e._e()],1)],1)],1),t(d.Z,[t("cub-new-folder",{model:{value:e.folderdialog,callback:function(t){e.folderdialog=t},expression:"folderdialog"}}),t(Ze.Z,{staticStyle:{display:"flex",height:"36px"},attrs:{xs6:""}},[t("treeselect",{staticClass:"cub-treeselect",attrs:{options:e.getFolderList,normalizer:e.treeviewNormalizer,clearable:!1,placeholder:"Save In","max-height":200},model:{value:e.saveinfolder,callback:function(t){e.saveinfolder=t},expression:"saveinfolder"}}),t(oe.Z,{on:{click:()=>e.folderdialog=!0}},[e._v("folder")])],1),t(Ze.Z,{attrs:{xs6:""}},[t(Ce.Z,{staticClass:"pt-0 mt-0",attrs:{value:e.title,label:"Title"},on:{change:t=>e.title=t}})],1)],1),t(Ze.Z,{attrs:{xs6:""}},[t(Bs.Z,{attrs:{value:e.description,rows:"1",label:"Description"},on:{change:t=>e.description=t}})],1),t(Ze.Z,{attrs:{xs6:""}},[t(Bs.Z,{attrs:{value:e.note,rows:"1",label:"Note"},on:{change:t=>e.note=t}})],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t(he.Z,{ref:"menu",refInFor:!0,attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","min-width":"290px"},scopedSlots:e._u([{key:"activator",fn:function({on:r}){return[t(Ce.Z,e._g({attrs:{label:"Expiry On","prepend-icon":"event",readonly:""},model:{value:e.expiryon,callback:function(t){e.expiryon=t},expression:"expiryon"}},r))]}}],null,!0),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[t(_e.Z,{attrs:{"no-title":"",scrollable:""},on:{input:function(t){e.menu=!1}},model:{value:e.expiryon,callback:function(t){e.expiryon=t},expression:"expiryon"}})],1)],1),t(Ze.Z,{attrs:{xs12:"",sm6:""}},[t($e.Z,{attrs:{items:["Daily","Weekly","Fortnight","Monthly","Never"],label:"Refresh",standard:""},model:{value:e.refresh,callback:function(t){e.refresh=t},expression:"refresh"}})],1)],1)],1)],1):e._e(),2==r?t("div",[t("cub-share",{attrs:{reportId:e.reportId,userView1:e.userView,userEdit1:e.userEdit,groupView1:e.groupView,groupEdit1:e.groupEdit,reportCategory:e.reportCategory},on:{viewGranted:function(t){e.viewGranted=t},editGranted:function(t){e.editGranted=t},reportCategory:function(t){e.selectedReportCategory=t}}})],1):e._e(),t(g.h7,[t(y.Z),t(p.Z,{attrs:{text:"",color:"primary"},on:{click:function(t){return e.cancelSave()}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:""},on:{click:function(t){return e.saveReport()}}},[e._v("Save")])],1)],1)}))],2)],1)},qs=[],Ws=r(87859),Js=r.n(Ws),Hs=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"700px"},model:{value:e.showFolderDialog,callback:function(t){e.showFolderDialog=t},expression:"showFolderDialog"}},[t(pe.Z,{attrs:{color:"#00796b"}},[t(ue.Z,{attrs:{href:"#tabinsaveform-1"}},[e._v("Save")]),t(ue.Z,{attrs:{href:"#tabinsaveform-2"}},[e._v("Share")]),e._l(2,(function(r){return t(pr.Z,{key:r,attrs:{value:"tabinsaveform-"+r}},[1==r?t(m.Z,[t(n.Z,{staticClass:"pa-4",attrs:{"grid-list-sm":""}},[t(Pe.Z,{attrs:{row:"",wrap:""}},[t(Ze.Z,{attrs:{xs6:""}},[t(Ce.Z,{attrs:{value:e.newFolderName,label:"FolderName"},on:{change:t=>e.newFolderName=t}})],1),t(Ze.Z,{attrs:{xs6:""}},[t("treeselect",{staticClass:"cub-treeselect",attrs:{options:e.getFolderList,normalizer:e.treeviewNormalizer,"max-height":150,clearable:!1,placeholder:"Save In"},model:{value:e.parentFolder,callback:function(t){e.parentFolder=t},expression:"parentFolder"}})],1),t(Ze.Z,{attrs:{xs6:""}},[t(Bs.Z,{attrs:{value:e.folderDescription,label:"Description"},on:{change:t=>e.folderDescription=t}})],1)],1)],1),t(g.h7,[t(y.Z),t(p.Z,{attrs:{text:"",color:"primary"},on:{click:function(t){return e.closeDialog()}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:""},on:{click:function(t){return e.createNewFolder()}}},[e._v("Save")])],1)],1):e._e(),2==r?t("div",[t("cub-share-card",{on:{viewGranted:function(t){e.viewGranted=t},editGranted:function(t){e.editGranted=t}}})],1):e._e()],1)}))],2)],1)},Ks=[],Ys={name:"cub-new-folder",props:["showFolderDialog"],model:{prop:"showFolderDialog",event:"showFolderDialog"},data(){return{newFolderName:"",folderDescription:"",viewGranted:[],editGranted:[],isFolderCreated:!1,parentFolder:""}},created(){this.parentFolder=this.getFolderList[0].FolderId},components:{Treeselect:Js()},computed:{...(0,F.Se)(["getFolderList"])},methods:{treeviewNormalizer(e){return e.Children?e.Children.length>0?{id:e.FolderId,label:e.FolderName,children:e.Children}:{id:e.FolderId,label:e.FolderName}:{id:e.FolderId,label:e.FolderName,children:e.children}},createNewFolder(){var e="parentid="+this.parentFolder+";name="+this.newFolderName+";description="+this.folderDescription+";reporttype=F;;viewby="+this.viewGranted.join(":")+";editby="+this.editGranted.join(":"),t={};t.tagValuePair=e,t.operation="saveReport",t.report_id="",t.dim_list="",t.meas_list="",t.dim_filter_list="",t.meas_filter_list="",t.instance_id="",this.$store.dispatch("saveReportImpl",t),this.isFolderCreated=!0,this.closeDialog()},closeDialog(){this.$emit("refreshFolderList",this.isFolderCreated),this.$emit("showFolderDialog",!1)}}},Xs=Ys,Qs=(0,D.Z)(Xs,Hs,Ks,!1,null,null,null),ea=Qs.exports,ta=function(){var e=this,t=e._self._c;return t(m.Z,{attrs:{flat:""}},[t(n.Z,{attrs:{fluid:"",id:"cub-share"}},[t(Ze.Z,{attrs:{xs12:"",sm12:""}},[t($e.Z,{attrs:{"item-text":"categoryName","item-value":"categoryId",items:e.reportCategories,label:"Report Category",standard:""},model:{value:e.reportCategory,callback:function(t){e.reportCategory=t},expression:"reportCategory"}})],1),t(pe.Z,{attrs:{vertical:""}},["1"==e.showUsers?t(ue.Z,[e._v("Users")]):e._e(),t(ue.Z,[e._v("Groups")]),t(pr.Z,[e.jsonUsers.length&&"1"==e.showUsers?t(Ce.Z,{staticClass:"pt-1",staticStyle:{"margin-top":"0px","background-color":"whitesmoke"},attrs:{outlined:"",height:"10",label:"Search...","single-line":"","hide-details":""},model:{value:e.userSearch,callback:function(t){e.userSearch=t},expression:"userSearch"}}):e._e(),"1"==e.showUsers?t(m.Z,{staticStyle:{"max-height":"400px",overflow:"hidden auto"},attrs:{flat:""}},[t(g.EB),e._l(e.filteredUsers,(function(r){return t(d.Z,{key:r.Id,staticClass:"mb-1 ml-1"},[t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"}},[t(dr.Z,{staticClass:"ma-0 pa-0",staticStyle:{height:"24px","padding-right":"20px"},attrs:{label:"View",ripple:!1,value:r.Id},model:{value:e.userView,callback:function(t){e.userView=t},expression:"userView"}})],1),t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"}},[t(dr.Z,{staticClass:"ma-0 pa-0",staticStyle:{height:"24px"},attrs:{label:"Edit",ripple:!1,value:r.Id},model:{value:e.userEdit,callback:function(t){e.userEdit=t},expression:"userEdit"}})],1),t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"},attrs:{cols:8}},[t(Ue.V9,[e._v(e._s(r.Name))])],1)],1)}))],2):e._e()],1),t(pr.Z,[e.jsonGroups.length?t(Ce.Z,{staticClass:"pt-1",staticStyle:{"margin-top":"0px","background-color":"whitesmoke"},attrs:{outlined:"",height:"10",label:"Search...","single-line":"","hide-details":""},model:{value:e.groupSearch,callback:function(t){e.groupSearch=t},expression:"groupSearch"}}):e._e(),t(m.Z,{staticStyle:{"max-height":"400px",overflow:"hidden auto"},attrs:{flat:""}},[t(g.EB),e._l(e.filteredGroups,(function(r){return t(d.Z,{key:r.Id,staticClass:"mb-1 ml-1"},[t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"}},[t(dr.Z,{staticClass:"ma-0 pa-0",staticStyle:{height:"24px","padding-right":"20px"},attrs:{label:"View",ripple:!1,value:r.Id},model:{value:e.groupView,callback:function(t){e.groupView=t},expression:"groupView"}})],1),t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"}},[t(dr.Z,{staticClass:"ma-0 pa-0",staticStyle:{height:"24px"},attrs:{label:"Edit",ripple:!1,value:r.Id},model:{value:e.groupEdit,callback:function(t){e.groupEdit=t},expression:"groupEdit"}})],1),t(o.Z,{staticClass:"pa-0",staticStyle:{height:"24px"},attrs:{cols:8}},[t(Ue.V9,[e._v(e._s(r.Name))])],1)],1)}))],2)],1)],1)],1)],1)},ra=[],sa={name:"cub-share",props:["reportId","userView1","userEdit1","groupView1","groupEdit1","reportCategory"],data(){return{jsonUsers:[],jsonGroups:[],userView:this.userView1,userEdit:this.userEdit1,groupView:this.groupView1,groupEdit:this.groupEdit1,userSearch:"",groupSearch:""}},watch:{reportId:function(e){this.populateShareForm(e)},reportCategory:{handler:function(e){this.$emit("reportCategory",this.reportCategory)},deep:!0},userView:{handler:function(e){var t=this.userView.concat(this.groupView);t=t.filter(Boolean),this.$emit("viewGranted",t)},deep:!0},groupView:{handler:function(e){var t=this.userView.concat(this.groupView);t=t.filter(Boolean),this.$emit("viewGranted",t)},deep:!0},userEdit:{handler:function(e){var t=this.userEdit.concat(this.groupEdit);t=t.filter(Boolean),this.$emit("editGranted",t)},deep:!0},groupEdit:{handler:function(e){var t=this.userEdit.concat(this.groupEdit);t=t.filter(Boolean),this.$emit("editGranted",t)},deep:!0}},computed:{...(0,F.Se)(["getUserListGetter","getGroupList","reportCategories"]),showUsers:{get:function(){return void 0!=this.$store.state.userSettings[104]?this.$store.state.userSettings[104]:"1"}},filteredUsers:{get:function(){var e=this.jsonUsers;if(!this.userSearch.length)return e;for(var t=[],r=this.userSearch.toLowerCase(),s=0;s<e.length;s++)e[s].Name.toLowerCase().includes(r)&&t.push(e[s]);return t}},filteredGroups:{get:function(){var e=this.jsonGroups;if(!this.userSearch.length)return e;for(var t=[],r=this.groupSearch.toLowerCase(),s=0;s<e.length;s++)e[s].Name.toLowerCase().includes(r)&&t.push(e[s]);return t}}},created(){var e=this.getUserListGetter,t=this.getGroupList,r=[],s=[];if("string"==typeof e?r.push(e):r=e,"string"==typeof t?s.push(t):s=t,this.jsonUsers=[],this.jsonGroups=[],"undefined"!=typeof r)for(var a=0;a<r.length;a++){var i=r[a].split(":");o=void 0!=i[2]&&i[2].length?{Id:i[0],Name:i[2]}:{Id:i[0],Name:i[1]},this.jsonUsers.push(o)}if("undefined"!=typeof s)for(a=0;a<s.length;a++){var o;i=s[a].split(":");o=void 0!=i[2]&&i[2].length?{Id:i[0],Name:i[2]}:{Id:i[0],Name:i[1]},this.jsonGroups.push(o)}this.reportId&&this.populateShareForm(this.reportId)},methods:{populateShareForm(e){this.$store.dispatch("getReportPermission",this.reportId).then((e=>{console.log(e)}))}}},aa=sa,ia=(0,D.Z)(aa,ta,ra,!1,null,null,null),oa=ia.exports,na={name:"cub-save",mixins:[ve.Z],props:{showSaveForm:{type:Boolean,default:!1},pivotLevel:Number,reportId:{type:[String,Number],default:""},dimIds:{type:String,default:""},measIds:{type:String,default:""},factIds:{type:String,default:""},filterStr:{type:Object,default:{}},isDetailedReport:{type:Boolean,default:!1},styleType:{type:String,default:"1"},currencyFormat:{type:String,default:"Default"},graphType:String,sortMap:String,topXProp:{type:String,default:""}},model:{prop:"showSaveForm",event:"showSaveForm"},data(){return{saveinfolder:"",isNewReport:"0",note:"",expiryon:null,useindash:null,reportCategory:"9999",userView:[],userEdit:[],groupView:[],groupEdit:[],folderList:[],description:"",refresh:"",report:"",viewGranted:[],editGranted:[],title:"",menu:!1,refreshFreqDict:{Daily:"1",Weekly:"7",Fortnight:"15",Monthly:"30",Never:"0"},folderdialog:!1,reportStyle:1,selectedReportCategory:"9999"}},components:{Treeselect:Js(),"cub-new-folder":ea,"cub-share":oa},created(){this.reportId?this.populateSaveForm():this.saveinfolder=this.getFolderList[0].FolderId},watch:{isNewReport:{handler:function(e){var t=[],r=[],s=[],a=[];"1"==e?this.$store.dispatch("getReportPermission",this.reportId).then((e=>{e&&console.log(e);for(var i=0;i<e.length;i++)"N"==e[i].IsGroup&&"3"==e[i].Access&&r.push(e[i].User);for(i=0;i<e.length;i++)"N"==e[i].IsGroup&&"1"==e[i].Access&&t.push(e[i].User);for(i=0;i<e.length;i++)"Y"==e[i].IsGroup&&"3"==e[i].Access&&a.push(e[i].User);for(i=0;i<e.length;i++)"Y"==e[i].IsGroup&&"1"==e[i].Access&&s.push(e[i].User);this.userView=t,this.userEdit=r,this.groupView=s,this.groupEdit=a,this.viewGranted=this.userView.concat(this.groupView),this.editGranted=this.userEdit.concat(this.groupEdit)})):(this.userView=[],this.userEdit=[],this.groupView=[],this.groupEdit=[],this.viewGranted=[],this.editGranted=[])},deep:!0}},computed:{...(0,F.Se)(["getReportById","getReportOverviewById","getFolderList","isReportNameused"])},methods:{populateSaveForm(){var e=this.getReportById(this.reportId);this.report=e,this.title=e.Title,this.description=e.Description,this.reportCategory=e.SystemTitle,this.selectedReportCategory=e.SystemTitle,this.note=e.ReportNotes,this.saveinfolder=e.ParentId>=1e5?e.ParentId:this.getFolderList[0].FolderId,"View"==e.ReportPermissionLevel?this.isNewReport="0":this.isNewReport="1"},cancelSave(){this.$emit("showSaveForm",!1)},treeviewNormalizer(e){if(e.Children)return e.Children.length>0?{id:e.FolderId,label:e.FolderName,children:e.Children}:{id:e.FolderId,label:e.FolderName}},saveReport(){if(!this.title.length)return this.$store.commit("setSnackbarStatus",!0),void this.$store.commit("setSnackbarCode","REPORT_TITLE");if(console.log("-------START---------"),console.log(this.isNewReport),"0"==this.isNewReport){var e=this.isReportNameused(this.title);if(console.log(e),e)return this.$store.commit("setSnackbarStatus",!0),void this.$store.commit("setSnackbarCode","DUPLICATE_TITLE")}this.reportStyle=this.styleType;var t="parentid="+this.saveinfolder+";name="+this.title+";description="+this.description+";notes="+this.note+";refreshfreq="+this.refreshFreqDict[this.refresh]+";reportcategory="+this.selectedReportCategory+";reporttype=R;viewby="+this.viewGranted.join(this.CUB_FILTER_DELIM)+";editby="+this.editGranted.join(this.CUB_FILTER_DELIM);this.isDetailedReport?t=t+";properties=style@1"+this.CUB_FILTER_DELIM+"factid@"+this.factIds+";isdetailreport=1":(t=t+";properties=style@"+this.reportStyle+this.CUB_FILTER_DELIM+"pivotlevel@"+this.pivotLevel+this.CUB_FILTER_DELIM+"graphtype@"+this.graphType,t=this.topXProp?t+this.CUB_FILTER_DELIM+this.topXProp.replaceAll("=","@").replace(";",this.CUB_FILTER_DELIM):t+this.CUB_FILTER_DELIM+"sort@"+this.sortMap,t=t+this.CUB_FILTER_DELIM+"currencyformat@"+this.currencyFormat);var r={};r.tagValuePair=t,r.operation="saveReport",r.dim_list=this.dimIds,this.isDetailedReport&&!this.filterStr.dimensionFilterList.length&&(r.dim_list="110"),r.meas_list=this.measIds,r.dim_filter_list=this.filterStr.dimensionFilterList,r.meas_filter_list=this.filterStr.measureFilterList,r.instance_id="",r.reportType="REPORT","1"==this.isNewReport?r.report_id=this.reportId:r.report_id="",""==this.filterStr.filterLogic||(r.cmplx_filter_list=this.filterStr.filterLogic),this.$store.dispatch("saveReportImpl",r).then((e=>{e?(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","REPORT_SUCCESS")):(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","REPORT_FAILED"))})),this.$emit("showSaveForm",!1)}}},la=na,da=(0,D.Z)(la,zs,qs,!1,null,null,null),ha=da.exports,ca=r(67423),ua=r(9449),pa=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"700px"},model:{value:e.internalShowNotifyList,callback:function(t){e.internalShowNotifyList=t},expression:"internalShowNotifyList"}},[t(ca.Z,{attrs:{id:"notify_list"}},[t(n.Z,{staticClass:"pa-1"},[t(Pe.Z,[t(m.Z,{staticStyle:{width:"100%"}},[t(g.EB,{staticStyle:{"background-color":"darkcyan",color:"white"}},[e._v(" Configured List "),t(y.Z),t(p.Z,{staticStyle:{"background-color":"olivedrab",color:"white"},on:{click:function(t){return e.cancelNotify()}}},[e._v("Close")])],1),t(ua.Z,{attrs:{height:"300px"},scopedSlots:e._u([{key:"default",fn:function(){return[t("thead",[t("tr",[t("th",{staticClass:"text-left"},[e._v("No.")]),t("th",{staticClass:"text-left"},[e._v("Created Date")]),t("th",{staticClass:"text-left"},[e._v("Subject")]),t("th",{staticClass:"text-left"},[e._v("Frequency")]),t("th",{staticClass:"text-left"},[e._v("Edit")]),t("th",{staticClass:"text-left"},[e._v("Delete")])])]),t("tbody",e._l(e.notifyLists,(function(r,s){return t("tr",{key:r.NotifyId},[t("td",[e._v(e._s(s+1)+".")]),t("td",[e._v(e._s(r.CreatedOn))]),t("td",[e._v(e._s(r.Subject))]),t("td",[e._v(e._s(r.NotifyFreq))]),t("td",[t(oe.Z,{staticStyle:{float:"right",cursor:"pointer"},attrs:{slot:"activator",small:""},on:{click:function(t){return e.editNotify(r.NotifyId)}},slot:"activator"},[e._v("create")])],1),t("td",[t(oe.Z,{staticStyle:{float:"right",cursor:"pointer"},attrs:{slot:"activator",small:""},on:{click:function(t){return e.deleteNotify(r.NotifyId)}},slot:"activator"},[e._v("delete")])],1)])})),0)]},proxy:!0}])})],1)],1)],1)],1)],1)},ma=[],ga={name:"notify-list",props:{internalShowNotifyList:{type:Boolean,default:!1},reportId:{type:String,default:""}},model:{prop:"internalShowNotifyList",event:"internalShowNotifyList"},data(){return{notifyLists:[]}},created(){this.notifyLists=this.getNotifyListByReportId(this.reportId)},watch:{reportId:function(e,t){this.notifyLists=this.getNotifyListByReportId(t)}},computed:{...(0,F.Se)(["getNotifyListByReportId"])},methods:{deleteNotify(e){this.$store.dispatch("doNotifyOperation",{operationName:"deleteNotify",notifyId:e}).then((e=>{this.notifyLists=this.getNotifyListByReportId(this.reportId),e&&"SUCCESS"==e&&(this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DELETE_NOTIFY_SUCCESS"))}))},editNotify(e){this.$emit("emitNotifyId",e)},cancelNotify(){this.$emit("internalShowNotifyList",!1)}}},fa=ga,ya=(0,D.Z)(fa,pa,ma,!1,null,null,null),va=ya.exports,Ia={name:"report-view",mixins:[ve.Z,Lt.A],props:["reportId"],data(){return{notifyId:"",pivotLevel:1,dimLength:0,saveReportDialog:!1,showEmail:!1,confirmDeleteReport:!1,sortMenu:!1,showFooter:!1,data:{dims:[],meas:[]},reportList:[],selectedMeasures:[],currencyFormat:"Default",selectedReport:"",reportStyle:"1",reportdataTableItems:{isdatatable:!1,headers:"",chartdata:"",search:"",chartdataJSON:"",isCrossTab:!1,crossTabHeaders:[],crossTabData:[],totalArray:[],selected:[],isgroupdatatable:!1},reportmetaDataItems:{viewdetailsdialog:!1,transactionchecked:[],viewdetailsjson:[],metadataResult:[],metadataResultHeader:[],metadataResultData:[],metadataResultArray:[],isMetadataResultLoaded:!0},filterDataItems:{isNormalFilter:"true",complexFilters:[],allFilters:[],selectedFilters:[],permanentFilterList:[],errorFilter:"",checkedFilters:[],filterId:""},auth_token:"",factdetails:"",graph:["DataTable","Column","Bar","Line","Scatter","Pie","Donut","StackedBar","StackedArea","Bubble","Gauge"],nestedJson:{},showResult:!1,reportClicked:!1,report:"",editDetailReport:!1,isError:!1,errorCode:"DEFAULT",errorMsgDict:{MAX_CF_LIMIT_REACHED:"Cannot select more than one complex filter",NODATA_TO_EXPORT:"No data to export.",DEFAULT:"Something went wrong. Please try again later.",DETAILS_DOWNLOAD_MSG:"Download request has been placed. Will be downloaded automatically.",NO_EDIT_ACCESS:"You don't have access to edit this report"},pagination:{rowsPerPage:5,page:1},rowsPerPageItems:[5,10,25,100],metadataPagination:{rowsPerPage:5},id:"",selectedGraphType:"DataTable",appliedFilterStr:"",reportFilterStr:"",filterDrawer:null,filterValidityArray:[],dimensionIds:[110,130],getAllDimFilters:{},enddatemenu:"",toValue:[],date:[],queryStartTime:0,queryEndTime:0,checkedDimFilters:{},reportFilterObj:[],loading:!1,sortDict:new Map,dataTableKey:1,emailList:[{Id:1,Name:"Configure E-mail"},{Id:2,Name:"Configured List"}],configuredListItems:"",notifyLists:"",showNotifyList:!1}},watch:{reportId:function(e,t){this.reportFilterStr=[],this.applyFilters()}},computed:{...(0,F.Se)(["getReportById","getItemMetaById","getMetaNameById","getSelectedFilters","getStandardFilterArray","getNotifyListByReportId"]),timeTaken:{get(){return(this.queryEndTime-this.queryStartTime)/1e3+" Sec"}},loggedInUser(){return this.$store.getters.getLoggedInUserId},selectedComplexFilterCount:{get:function(){var e=0;for(element in this.filterDataItems.selectedFilters)this.filterDataItems.selectedFilters[element].isNormalFilter||e++;return e}},complexFilterExpression:{get:function(){for(element in this.filterDataItems.selectedFilters)if(!this.filterDataItems.selectedFilters[element].isNormalFilter)return this.filterDataItems.selectedFilters[element].FilterValues;return""}},filterDimensions:{get:function(){for(var e=[],t=0;t<this.dimensionIds.length;t++)e.push(this.getItemMetaById(this.dimensionIds[t]));return e}},internalShowReportFilterList:{get:function(){return this.showReportFilterList},set:function(e){this.$emit("change",e)}}},created(){this.reportId&&this.applyFilters()},methods:{topXString(e){var t="";return"-1"!=e.ReportTopn&&(t="topx="+e.ReportTopn+";sort="+e.ReportSortColumn),t},sortReport(e){this.sortDict=e,this.reportdataTableItems.chartdata=this.sortReportData(this.reportdataTableItems.chartdata,this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.report.MeasureIds.split(this.CUB_FILTER_DELIM),e),this.dataTableKey++,this.drawChart()},getEmailForms(e){1==e?(this.configuredListItems="",this.notifyId="",this.showEmail=!0):(this.showNotifyList=!0,this.notifyLists=this.getNotifyListByReportId(this.reportId))},resetBreadcrumbs(){this.drillLabels.splice(1)},breadcrumbClick(e,t,r){if(t)this.drillLabels=this.drillLabels.slice(0,t+1),this.reportdataTableItems.isCrossTab?this.plotAnyChart(e,r.depth,r,"chart_div",this.crossTabHeader.nmeas,this.selectedGraphType,void 0,void 0,void 0,this.report.MeasureIds.split(this.CUB_FILTER_DELIM)):this.plotAnyChart(e,r.depth,r,"chart_div",this.selectedMeasures.length,this.selectedGraphType,void 0,void 0,void 0,this.report.MeasureIds.split(this.CUB_FILTER_DELIM));else if(this.resetBreadcrumbs(),this.reportdataTableItems.isCrossTab){var s={Target:"chart_div"};s.data=this.reportdataTableItems.chartdata,this.drawCrossTabGraph(s,this.report,this.selectedGraphType,this.sortDict)}else this.drawPlotlyCharts("chart_div",this.reportdataTableItems.chartdata,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.selectedMeasures.length,this.selectedGraphType,this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.report.DimensionIds.split(this.CUB_FILTER_DELIM))},getReportAsChart(e){this.resetBreadcrumbs();var t=new Object,r=this.getReportById(this.reportId);this.sortDict=this.decodeSortMap(r.ReportSortColumn),this.selectedReport=r,t.authToken=this.$store.state.authToken,t.dimensionList=r.DimensionIds,t.measureList=r.MeasureIds;var s=this.generateFilterQuery(this.reportFilterStr);t.dimensionFilterList=s.dimensionFilterList,t.measureFilterList=s.measureFilterList,t.filterLogic=s.filterLogic,t.dataInstanceId="","-1"!=this.report.ReportTopn&&(t.dataInstanceId=this.topXString(this.report)),this.loading=!0,this.queryStartTime=(new Date).valueOf(),this.$store.dispatch("getReportData",t).then((e=>{this.queryEndTime=(new Date).valueOf(),e&&(this.reportdataTableItems.isCrossTab&&e[0].length?this.crossTabDataCallback(e,""):(this.reportdataTableItems.isCrossTab=!1,this.reportDataCallback(e,"")),this.loading=!1)}))},editNotify(e){this.notifyId=e,this.showEmail=!0},reportDataCallback(e,t,r){this.reportdataTableItems.isdatatable=!1,this.reportdataTableItems.isgroupdatatable=!1;for(var s=e[0],a=0;a<s.length;a++)s[a]=s[a].replace("~_"," ").replace("%","%");this.selectedGraphType="DataTable",e[0]=s,this.reportdataTableItems.chartdata=e;var i="";this.$store.dispatch("getGraphProperties",this.reportId).then((e=>{if(e){i=e.Data;for(var t=0;t<i.length;t++)"graphtype"==i[t].Name.toLowerCase()?this.selectedGraphType=i[t].Value:"currencyformat"==i[t].Name.toLowerCase()&&(this.currencyFormat=i[t].Value);""==this.selectedGraphType&&(this.selectedGraphType="DataTable"),this.sortDict=this.decodeSortMap(this.report.ReportSortColumn),this.sortReport(this.sortDict)}}))},redrawGraph(e){this.selectedGraphType=e,this.drawChart()},crossTabDataCallback(e,t){this.reportdataTableItems.isdatatable=!1,this.reportdataTableItems.isgroupdatatable=!1;var r="";this.$store.dispatch("getGraphProperties",this.reportId).then((t=>{if(t){r=t.Data,this.pivotLevel=1;for(var s=0;s<r.length;s++)"graphtype"==r[s].Name.toLowerCase()&&(this.selectedGraphType=r[s].Value),"style"==r[s].Name.toLowerCase()&&(this.reportStyle=r[s].Value),"pivotlevel"==r[s].Name.toLowerCase()&&(this.pivotLevel=Number(r[s].Value));""==this.selectedGraphType&&(this.selectedGraphType="DataTable"),this.reportdataTableItems.chartdata=e,this.showResult=!0,this.sortDict=this.decodeSortMap(this.report.ReportSortColumn),this.sortReport(this.sortDict)}}))},getDetailReport(e){this.loading=!0,this.showResult=!1;var t={measureId:e.MeasureId};t["selectedItemList"]=e.MetadataOrder.replace(/-/g,this.CUB_FILTER_DELIM);var r=this.generateFilterQuery(this.reportFilterStr);t.dimensionFilterList=r.dimensionFilterList,t.filterLogic=r.filterLogic,t.displayOption="show",this.loading=!0,this.$store.dispatch("getMetadataResult",t).then((e=>{var t=e,r=new Array;for(o=0;o<t.length;o++)if("object"===typeof t[o].COL)r.push(t[o].COL);else if("string"===typeof t[o].COL){var s=new Array;s.push(t[o].COL),r.push(s)}var a=new Array;for(o=0;o<this.reportmetaDataItems.transactionchecked.length;o++)a.push(this.reportmetaDataItems.transactionchecked[o].itemName);r.length<2&&(r[0]=a);for(var i=new Array,o=0;o<r[0].length;o++){var n=new Object;n.text=r[0][o],n.value=r[0][o],n.align="left",i.push(n)}this.reportmetaDataItems.metadataResultHeader=i,this.reportmetaDataItems.metadataResultData=arrToObject(r),this.showResult=!0,this.loading=!1}))},exportMetadataResult(){for(var e=new Array,t=0;t<this.reportmetaDataItems.transactionchecked.length;t++)e.push(this.reportmetaDataItems.transactionchecked[t].itemId);var r={measureId:this.factdetails.MeasureId};r["selectedItemList"]=e.join(this.CUB_FILTER_DELIM);var s=this.generateFilterQuery(this.reportFilterStr);r.dimensionFilterList=s.dimensionFilterList,r.filterLogic=s.filterLogic,r.displayOption="download",this.$store.dispatch("getMetadataResult",r).then((e=>{var t=document.createElement("a");t.href=e,t.download=e.substring(e.lastIndexOf("/")+1,e.length),t.dispatchEvent(new MouseEvent("click"))}))},getMetadataResult(e,t,r,s,a,i,o){var n=new Object;n.meas_id=t,n.md_list=r,n.filter_list=s,n.complex_filterStr=a,n.disp_option=i;var l=new Object;l.disp_option=i,l.is_report_tab=o,this.$store.dispatch("getMetadataResult",n).then((e=>{e&&this.metaResultCallback(e,l)}))},metaResultCallback(e,t){var r="";if(e.getMetadataResultSetResponse.DATA&&(r=e.getMetadataResultSetResponse.DATA),"CUBOT-NO-METADATA-FOUND"==r&&(r=[]),"string"==typeof r){if("CUBOT-NO-METADATA-FOUND"!=r){var s=document.createElement("a");return s.href=r,s.download=r.substring(r.lastIndexOf("/")+1,r.length),void s.dispatchEvent(new MouseEvent("click"))}r=[]}var a=new Array;for(l=0;l<r.length;l++)if("object"===typeof r[l].COL)a.push(r[l].COL);else if("string"===typeof r[l].COL){var i=new Array;i.push(r[l].COL),a.push(i)}var o=new Array;for(l=0;l<this.reportmetaDataItems.transactionchecked.length;l++)o.push(this.reportmetaDataItems.transactionchecked[l].itemName);a.length<2&&(a[0]=o),this.reportmetaDataItems.metadataResultArray=a;for(var n=new Array,l=0;l<a[0].length;l++){var d=new Object;d.text=a[0][l],d.value=a[0][l],d.align="left",n.push(d)}this.reportmetaDataItems.metadataResultHeader=n,this.reportmetaDataItems.metadataResultData=arrToObject(a),this.showResult=!0},drawChart(){if($(".plot-container").remove(),"DataTable"!=this.selectedGraphType&&"Geo"!=this.selectedGraphType&&"GroupDataTable"!=this.selectedGraphType){if(this.reportdataTableItems.isCrossTab){var e={Target:"chart_div"};e.data=this.reportdataTableItems.chartdata,this.drawCrossTabGraph(e,this.report,this.selectedGraphType,this.sortDict)}else this.drawPlotlyCharts("chart_div",this.reportdataTableItems.chartdata,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.selectedMeasures.length,this.selectedGraphType,this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.report.DimensionIds.split(this.CUB_FILTER_DELIM));this.reportdataTableItems.isdatatable=!1,this.reportdataTableItems.isgroupdatatable=!1}else if("Geo"==this.selectedGraphType)this.nestedJson=this.getNestedJson(this.reportdataTableItems.chartdata,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.selectedMeasures.length,this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.report.DimensionIds.split(this.CUB_FILTER_DELIM));else{if(this.dimLength=this.report.DimensionIds.split(this.CUB_FILTER_DELIM).length,this.reportdataTableItems.isCrossTab){var t=this.reportdataTableItems.chartdata.slice(1),r=this.getCTDTHeaderByStyle(t,this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.reportStyle,this.pivotLevel);this.reportdataTableItems.headers=r["header"],this.reportdataTableItems.chartdataJSON=r["data"],this.reportdataTableItems.totalArray=this.getDTTotals(this.reportdataTableItems.headers[this.reportdataTableItems.headers.length-1],this.reportdataTableItems.chartdataJSON,this.dimLength-this.pivotLevel-1,this.report.MeasureIds.split(this.CUB_FILTER_DELIM))}else{var s=this.reportdataTableItems.chartdata;this.reportdataTableItems.headers=this.getDTHeaders(this.report.DimensionIds.split(this.CUB_FILTER_DELIM).concat(this.report.MeasureIds.split(this.CUB_FILTER_DELIM))),this.reportdataTableItems.chartdataJSON=this.getDTValues(s,this.report.DimensionIds.split(this.CUB_FILTER_DELIM).concat(this.report.MeasureIds.split(this.CUB_FILTER_DELIM))),this.reportdataTableItems.totalArray=this.getDTTotalsNormal(s,this.dimLength,this.report.MeasureIds.split(this.CUB_FILTER_DELIM))}"GroupDataTable"==this.selectedGraphType&&(this.reportdataTableItems.isCrossTab?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","INVALID_GRAPHTYPE")):this.reportdataTableItems.isgroupdatatable=!0),this.reportdataTableItems.isdatatable=!0,this.showResult=!0}},showReport(e){var t=this.getReportById(e);if(this.report=this.getReportById(e),"Folder"!=t.ReportType){"DETAIL_REPORT"==t.ReportType?t.ReportType="DETAIL_REPORT":t.ReportType="DataTable",this.reportmetaDataItems.transactionchecked=[],this.report=t;var r=this.report.MeasureIds.split(this.CUB_FILTER_DELIM);this.selectedMeasures.length=0;for(var s=0;s<r.length;s++)this.selectedMeasures.push(this.getItemMetaById(r[s]));this.reportFilterStr.length?this.appliedFilterStr=this.generateAppliedFilterString(this.reportFilterStr):this.appliedFilterStr="",this.reportClicked=!0,this.showResult=!1,this.report.title=t.Title,"CrossTab"==t.ReportLayout?this.reportdataTableItems.isCrossTab=!0:this.reportdataTableItems.isCrossTab=!1,this.pagination.page=1,this.pagination.rowsPerPage=5,"DETAIL_REPORT"==this.report.ReportType?this.$store.dispatch("getFactDetails",this.reportId).then((e=>{if(e){this.factdetails=e;for(var t=e.MetadataOrder.split("-"),r=e.MetadataName.split(","),s=0;s<t.length;s++){var a=new Object;a.itemId=t[s],a.itemName=r[s],this.reportmetaDataItems.transactionchecked.push(a)}this.getDetailReport(e)}})):this.getReportAsChart(t)}},getDisplayTime(){var e=new Date(0);(new Date).getTimezoneOffset(),this.$store.state.userSettings[101];return e.setSeconds(this.report.CreateDate),e.toLocaleString()},getReportRefreshedTime(){var e=new Date(0);(new Date).getTimezoneOffset(),this.$store.state.userSettings[101];return e.setSeconds(this.report.LastRefreshDate),e.toLocaleString()},exportData(){this.showResult?"DETAIL_REPORT"==this.report.ReportType?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DETAILS_DOWNLOAD_MSG"),this.exportMetadataResult()):this.reportdataTableItems.chartdata.length>0?this.exportToExcel(this.reportdataTableItems.chartdata,this.report.DimensionIds.split(this.CUB_FILTER_DELIM),this.report.MeasureIds.split(this.CUB_FILTER_DELIM),this.reportStyle,this.appliedFilterStr,this.report.Title,this.pivotLevel,this.selectedGraphType):(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NODATA_TO_EXPORT")):(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NODATA_TO_EXPORT"))},deleteReport(e){var t=this;this.$store.dispatch("saveReportImpl",{operation:"deleteReportFromTrash",report_id:e.Id}).then((e=>{e&&(t.showResult=!1,t.reportId="",t.report="",this.$router.push({path:"/home/reports/"})),this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","REPORT_DELETE")}))},getReportCount(e){var t=0;if("Folder"==e.ReportType&&e.children){for(var r=0;r<e.children.length;r++)t+=this.getReportCount(e.children[r]);return t}return 1},applyFilters(){this.reportId&&(this.reportFilterStr=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray),this.showReport(this.reportId))}},components:{"cub-data-table":Zt,"grouped-data-table":rr,"cub-data-table-crosstab":jt,"cub-data-table-detail":Kt,"cub-details-page":ks,"multi-sort-menu":Os,"cub-leaflet":Ar,"cub-email":js,"cub-save":ha,"notify-list":va,"cub-data-table-n-level-crosstab":Pr}},ba=Ia,_a=(0,D.Z)(ba,Cs,Ss,!1,null,null,null),Da=_a.exports,Ca=r(87397),Sa=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"font-family":"'Fira Sans', sans-serif !important",height:"calc(100vh - 48px)"}},[t(Ce.Z,{staticClass:"pt-0",staticStyle:{"margin-left":"2px","margin-right":"2px","border-radius":"2px","margin-top":"2px","padding-left":"4px","background-color":"whitesmoke"},attrs:{label:"Search...","single-line":"","hide-details":"",clearable:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t(pe.Z,{staticStyle:{height:"calc(100% - 32px)",overflow:"auto"},attrs:{"hide-slider":"",grow:"",dark:""},model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},[t(ue.Z,{attrs:{href:"#tab-1"}},[e._v("Dimensions")]),t(ue.Z,{attrs:{href:"#tab-2"}},[e._v("Measures")]),e._l(2,(function(r){return t(pr.Z,{key:r,attrs:{value:"tab-"+r}},[t(ne.Z,{staticClass:"ml-2 pt-0",attrs:{dense:""}},[1==r?t("div",e._l(e.filteredDimensions,(function(r){return t(Ca.Z,{key:r.Id,attrs:{"no-action":""}},[t(Ue.km,{attrs:{slot:"activator"},slot:"activator"},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1),t("draggable",{staticClass:"dragarea",attrs:{group:{name:"md",pull:"clone",put:!1},tag:"ul",move:e.checkMoveDims},model:{value:r.items,callback:function(t){e.$set(r,"items",t)},expression:"item.items"}},e._l(r.items,(function(r){return t(le.Z,{key:r.Id,on:{click:function(t){return e.toggleRow(r)}}},[t(Ue.km,{staticClass:"md-item",attrs:{id:r.Id}},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1)],1)})),1)],1)})),1):e._e(),2==r?t("div",e._l(e.filteredMeasures,(function(r){return t(Ca.Z,{key:r.Id,attrs:{"no-action":""}},[t(Ue.km,{attrs:{slot:"activator"},slot:"activator"},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1),t("draggable",{staticClass:"dragarea",attrs:{group:{name:"md",pull:"clone",put:!1},tag:"ul",move:e.checkMoveMeas},model:{value:r.items,callback:function(t){e.$set(r,"items",t)},expression:"item.items"}},e._l(r.items,(function(r){return t(le.Z,{key:r.Id,on:{click:function(t){return e.toggleColumn(r)}}},[t(Ue.km,{staticClass:"md-item",attrs:{id:r.Id}},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1)],1)})),1)],1)})),1):e._e()])],1)}))],2)],1)},Fa=[],wa={name:"analyze-nav",data(){return{data:{dims:[],meas:[]},currentTab:"",search:""}},components:{draggable:It()},created(){},mounted(){},computed:{...(0,F.Se)(["selectedRows","selectedColumns","selectedMeasures","selectedDimensions","getDimensionTree","getMeasureTree","getItemMetaById","errorMessage","getTableJoins"]),filteredDimensions:{get:function(){var e=this.getDimensionTree;if(!this.search||!this.search.length)return e;for(var t=[],r=this.search.toLowerCase(),s=0;s<e.length;s++)if(e[s].Name.toLowerCase().includes(r))t.push(e[s]);else{var a=JSON.parse(JSON.stringify(e[s]));a.items=[];for(var i=0;i<e[s].items.length;i++){var o=e[s].items[i];o.Name.toLowerCase().includes(r)&&a.items.push(o)}a.items.length&&t.push(a)}return t}},filteredMeasures:{get:function(){var e=this.getMeasureTree;if(!this.search||!this.search.length)return e;for(var t=[],r=this.search.toLowerCase(),s=0;s<e.length;s++)if(e[s].Name.toLowerCase().includes(r))t.push(e[s]);else{var a=JSON.parse(JSON.stringify(e[s]));a.items=[];for(var i=0;i<e[s].items.length;i++){var o=e[s].items[i];o.Name.toLowerCase().includes(r)&&a.items.push(o)}a.items.length&&t.push(a)}return t}},selectedFilters:{get:function(){return this.$store.state.selectedFilters}}},watch:{currentTab:function(e,t){e!=t&&(this.search="")}},methods:{toggleRow(e){if(e.draggedContext&&(e=e.draggedContext.element),!(e.Id>1e4)){var t=this.checkMDValidity(e);if(t){var r=this.selectedDimensions.indexOf(e);if(-1==r)this.selectedDimensions.length>=7?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DIM_LIMIT_REACHED")):(this.$store.commit("insertDimensions",e),this.$store.commit("insertRows",e));else{this.$store.commit("deleteDimensions",r);var s=this.selectedRows.indexOf(e);if(-1!=s)this.$store.commit("deleteRows",s);else{var a=this.selectedColumns.indexOf(e);-1!=a&&this.$store.commit("deleteColumns",a)}}}}},toggleColumn(e){e.draggedContext&&(e=e.draggedContext.element);var t=this.checkMDValidity(e);if(t){var r=this.selectedColumns.indexOf(e);-1==r?this.$store.commit("insertColumns",e):this.$store.commit("deleteColumns",r),e.Id>1e4?(r=this.selectedMeasures.indexOf(e),-1==r?this.$store.commit("insertMeasures",e):this.$store.commit("deleteMeasures",r)):(r=this.selectedDimensions.indexOf(e),-1==r?this.selectedDimensions.length>=7?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DIM_LIMIT_REACHED")):this.$store.commit("insertDimensions",e):this.$store.commit("deleteDimensions",r))}},checkMDValidity(e){var t=1;if(e.Id<1e4){var r=this.selectedMeasures;if(r.length){for(var s in r)if(!(e.Table==r[s].Table||this.getTableJoins[r[s].Table].indexOf(e.Table)>-1)){this.$store.commit("setErrorDim",r[s].Name),this.$store.commit("setErrorMeas",e.Name),t=0;break}}else t=1}else{r=this.selectedDimensions;var a=this.selectedFilters;if(r.length||a.length){for(var s in r)if(!(e.Table==r[s].Table||this.getTableJoins[e.Table].indexOf(r[s].Table)>-1)){this.$store.commit("setErrorMeas",r[s].Name),this.$store.commit("setErrorDim",e.Name),t=0;break}for(var s in a)if(a[s].isNormalFilter){var i=this.getItemMetaById(a[s].FilterItemId);if(!(e.Table==i.Table||this.getTableJoins[e.Table].indexOf(i.Table)>-1)){this.$store.commit("setErrorDim",i.Name),this.$store.commit("setErrorMeas",e.Name),t=0;break}}else for(var o=this.getDimensionIDsFromComplexFilterExp(a[s].FilterValues),n=0;n<o.length;n++){i=this.getItemMetaById(o[n]);if(!(e.Table==i.Table||this.getTableJoins[e.Table].indexOf(i.Table)>-1)){this.$store.commit("setErrorDim",i.Name),this.$store.commit("setErrorMeas",e.Name),t=0;break}}}else t=1}return t||(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","INVALID_MD"),0)},checkMoveDims(e){if("dragarea"==e.to.className)return!1;var t=1;if(!t)return!1;for(var r=this.selectedRows.length,s=0;s<r;s++)if(e.draggedContext.element.Id===this.selectedRows[s].Id)return!1;r=this.selectedColumns.length;for(s=0;s<r;s++)if(e.draggedContext.element.Id===this.selectedColumns[s].Id)return!1;var a=e.draggedContext.element;if(-1==this.selectedRows.indexOf(a)&&-1==this.selectedColumns.indexOf(a)&&-1==this.selectedDimensions.indexOf(a)){if(this.selectedDimensions.length>=7)return this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DIM_LIMIT_REACHED"),!1;this.$store.commit("insertDimensions",a)}return 0},checkMoveMeas(e){if(-1!=["rowdroparea","dragarea"].indexOf(e.to.className))return!1;var t=1;if(!t)return!1;for(var r=this.selectedColumns.length,s=0;s<r;s++)if(e.draggedContext.element.Id===this.selectedColumns[s].Id)return!1;var a=e.draggedContext.element;return-1==this.selectedColumns.indexOf(a)&&-1==this.selectedMeasures.indexOf(a)&&this.$store.commit("insertMeasures",a),0},checkMDRearrange(e){var t=e.to.className;if("rowdroparea"==t&&+e.draggedContext.element.Id>=1e4)return!1;"coldroparea"==t&&+e.draggedContext.element.Id<1e4&&this.pivotLevel}}},xa=wa,Ta=(0,D.Z)(xa,Sa,Fa,!1,null,"566e1e30",null),Ea=Ta.exports,ka=function(){var e=this,t=e._self._c;return t(n.Z,{ref:"analyzeview",attrs:{fluid:""}},[t(m.Z,[t("table",{staticStyle:{width:"100%",top:"10%",position:"relative"}},[t("tr",[t("td",{staticStyle:{width:"48px"}},[e._v("Rows")]),t("td",{staticStyle:{width:"4px"}},[e._v(":")]),t("td",{staticStyle:{"overflow-y":"auto"}},[t("draggable",{staticClass:"rowdroparea",attrs:{group:{name:"md"},move:e.checkMDRearrange},model:{value:e.selectedRows,callback:function(t){e.selectedRows=t},expression:"selectedRows"}},e._l(e.selectedRows,(function(r){return t(be.Z,{key:r.Id,staticClass:"area",attrs:{close:"",small:"",color:"#387CA3","text-color":"white"},on:{"update:active":function(t){return e.toggleRow(r)}}},[e._v(e._s(r.Name))])})),1)],1),t("td",{staticStyle:{align:"center",width:"40px"},attrs:{rowspan:"2"}},[t(p.Z,{attrs:{rounded:"",color:"#3c8dbc",dark:""},on:{click:function(t){return e.applyFilters()}}},[e._v("Go")])],1),t("td",{staticStyle:{align:"center",width:"40px"},attrs:{rowspan:"2"}},[t(p.Z,{attrs:{rounded:"",color:"#3c8dbc",dark:""},on:{click:function(t){return e.clearSelection()}}},[e._v("Clear")])],1)]),t("tr",[t("td",{staticStyle:{width:"40px"}},[e._v("Columns")]),t("td",{staticStyle:{width:"4px"}},[e._v(":")]),t("td",{staticStyle:{"overflow-y":"auto"}},[t("draggable",{staticClass:"coldroparea",attrs:{group:{name:"md"},move:e.checkMDRearrange},model:{value:e.selectedColumns,callback:function(t){e.selectedColumns=t},expression:"selectedColumns"}},e._l(e.selectedColumns,(function(r){return t(be.Z,{key:r.Id,staticClass:"area",attrs:{small:"",close:r.Id<1e4,color:"#98506D","text-color":"white"},on:{"update:active":function(t){return e.toggleColumn(r)}}},[e._v(e._s(r.Name)+" "),+r.Id>1e4?t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:s,attrs:a}){return[t(oe.Z,e._g(e._b({key:r.Id},"v-icon",a,!1),s),[e._v("mdi-chevron-down")])]}}],null,!0)},[t(ne.Z,[t(le.Z,{staticStyle:{"min-height":"12px"},on:{click:function(t){return e.toggleColumn(r)}}},[e._v("Remove")]),t(le.Z,{staticStyle:{"min-height":"12px"},on:{click:function(t){return e.showTopXMenu(r)}}},[e._v("Top/Bottom-X")])],1)],1):e._e()],1)})),1)],1)])])]),e.isError?t("div",[t(g.EB,{staticStyle:{"margin-top":"100px",position:"relative",color:"red","background-color":"white",height:"48px","align-content":"center","justify-content":"center","font-size":"1.5rem"}},[e._v(" Something went wrong. Please try again or contact administrator. ")])],1):e.goClicked?t(Pe.Z,[t(Ze.Z,{attrs:{md8:""}},[t("label",{staticStyle:{color:"darkred","font-size":"15px","font-style":"italic"}},[e._v(e._s(e.AppliedFilters))])]),t(y.Z),t(Ze.Z,[t(Pe.Z,{attrs:{"align-end":"","justify-end":""}},[t(he.Z,{staticStyle:{"z-index":"400"},attrs:{"open-on-hover":"","offset-x":"",left:""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({staticStyle:{"margin-top":"12px"},attrs:{title:"Chart Type",color:"#2aa9dae3"}},"v-icon",s,!1),{...r}),[e._v("mdi-poll")])]}}])},[t(m.Z,[t("table",{staticClass:"gtypeTable",attrs:{border:"0",cellpadding:"0",cellspacing:"0"}},[t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportPie",attrs:{title:"Pie"},on:{click:function(t){return e.redrawGraph("Pie")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportDonut",attrs:{title:"Donut Chart"},on:{click:function(t){return e.redrawGraph("Donut")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportSunburst",attrs:{title:"Sunburst Chart"},on:{click:function(t){return e.redrawGraph("Sunburst")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionHVLine",attrs:{title:"HVLine"},on:{click:function(t){return e.redrawGraph("HVLine")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportLine",attrs:{title:"Line"},on:{click:function(t){return e.redrawGraph("Line")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStackedArea",attrs:{title:"Stacked Area Chart"},on:{click:function(t){return e.redrawGraph("StackedArea")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportBar",attrs:{title:"Bar"},on:{click:function(t){return e.redrawGraph("Bar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportColumn",attrs:{title:"Column chart"},on:{click:function(t){return e.redrawGraph("Column")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportStack",attrs:{title:"Stacked Bar"},on:{click:function(t){return e.redrawGraph("StackedBar")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionFunnelChart",attrs:{title:"Funnel Chart"},on:{click:function(t){return e.redrawGraph("Funnel")}}})])])]),t("tr",[t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportZoomTree",attrs:{title:"Zoomable Tree"},on:{click:function(t){return e.redrawGraph("Treemap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportHeat",attrs:{title:"Heat Chart"},on:{click:function(t){return e.redrawGraph("Heatmap")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionReportMap",attrs:{title:"Map"},on:{click:function(t){return e.redrawGraph("Geo")}}})])]),t("td",[t("span",{staticClass:"gtypeClass"},[t(oe.Z,{attrs:{color:"#3c8dbc",title:"Data Table"},on:{click:function(t){return e.redrawGraph("DataTable")}}},[e._v("mdi-table")])],1)]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionStackedFunnel",attrs:{title:"Stacked Funnel"},on:{click:function(t){return e.redrawGraph("StackedFunnel")}}})])])]),t("tr",{},[t("td",[t("span",{staticClass:"gtypeClass"},[t(oe.Z,{attrs:{color:"#3c8dbc",title:"Grouped Data Table"},on:{click:function(t){return e.redrawGraph("GroupDataTable")}}},[e._v("mdi-format-indent-increase")])],1)]),t("td",[t("span",{staticClass:"gtypeClass"},[t("b",{staticClass:"actionPareto",attrs:{title:"Pareto Chart"},on:{click:function(t){return e.redrawGraph("Pareto")}}})])])])])])],1),t(oe.Z,{attrs:{title:"View report details"},on:{click:function(t){return e.viewReportDetails(e.selectedMeasures[0].Id)}}},[e._v("mdi-alpha-d-box")]),t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-x":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{title:"Sort"}},"v-icon",s,!1),r),[e._v("mdi-swap-vertical")])]}}]),model:{value:e.sortMenu,callback:function(t){e.sortMenu=t},expression:"sortMenu"}},[t("multi-sort-menu",{key:e.selectedDimIds.concat(e.selectedMeasIds).length,attrs:{sortDict:e.encodeSortMap(e.sortDict),itemIds:e.selectedDimIds.concat(e.selectedMeasIds)},on:{update:e.sortReport}})],1),"DataTable"!=e.selectedGraphType?t(he.Z,{attrs:{"open-on-hover":"","close-on-content-click":!1,left:"","offset-x":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(oe.Z,e._g(e._b({attrs:{title:"Sort"}},"v-icon",s,!1),r),[e._v("mdi-filter")])]}}],null,!1,1354019758),model:{value:e.drillOrFilter,callback:function(t){e.drillOrFilter=t},expression:"drillOrFilter"}},[t(m.Z,e._l(e.drillOrFilterItems,(function(r){return t(dr.Z,{key:r,staticClass:"mt-0",attrs:{"hide-details":"",label:r,value:r},model:{value:e.selectedDrillOrFilter,callback:function(t){e.selectedDrillOrFilter=t},expression:"selectedDrillOrFilter"}})})),1)],1):e._e(),t(oe.Z,{staticStyle:{"margin-top":"12px"},attrs:{title:"download"},on:{click:()=>{e.exportData()}}},[e._v("mdi-download")]),t(oe.Z,{staticStyle:{"margin-top":"12px"},attrs:{title:"Save Report"},on:{click:()=>{e.saveReportDialog=!0}}},[e._v("mdi-content-save")])],1)],1),t("cub-save",{key:e.reportId,attrs:{reportId:e.reportId,dimIds:e.selectedDimIds.join(this.CUB_FILTER_DELIM),measIds:e.selectedMeasIds.join(this.CUB_FILTER_DELIM),filterStr:e.selectedFilterStr,styleType:e.reportStyle,graphType:e.selectedGraphType,sortMap:e.encodeSortMap(e.sortDict),currencyFormat:e.currencyFormat,topXProp:e.topXString,pivotLevel:e.pivotLevel},model:{value:e.saveReportDialog,callback:function(t){e.saveReportDialog=t},expression:"saveReportDialog"}})],1):e._e(),e.showTopXWindow?t("div",[t("cub-top-x",{attrs:{topXMeasureName:e.topXMeasureName,topXType:e.topXType,topXValue:e.topXValue},on:{topXType:function(t){e.topXType=t},showTopXValue:function(t){e.topXValue=t}},model:{value:e.showTopXWindow,callback:function(t){e.showTopXWindow=t},expression:"showTopXWindow"}})],1):e._e(),e.isFetchingData?t(n.Z,{staticStyle:{top:"50%",height:"100%",width:"100%"}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v("Getting report data")]),t(o.Z,{attrs:{cols:"6"}},[t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1)],1)],1):e._e(),t("div",{staticStyle:{position:"relative"},attrs:{id:"chart_div"}},[t(xt.Z,{directives:[{name:"show",rawName:"v-show",value:e.drillLabels.length>1,expression:"drillLabels.length > 1"}],staticStyle:{position:"absolute",top:"-18px"},attrs:{items:e.drillLabels},scopedSlots:e._u([{key:"item",fn:function({item:r}){return[t(Tt.Z,{on:{click:function(t){return e.breadcrumbClick(r.text,r.depth,r.node)}}},[e._v(e._s(r.text))])]}},{key:"divider",fn:function(){return[t(oe.Z,[e._v("mdi-chevron-right")])]},proxy:!0}])}),e.goClicked&&e.dataTableItems.isdatatable&&!e.dataTableItems.isCrossTab&&!e.dataTableItems.isgroupdatatable?t("div",[t("cub-data-table",{key:e.dataTableKey,attrs:{headers:e.dataTableItems.headers,chartdataJSON:e.dataTableItems.chartdataJSON,totalArray:e.dataTableItems.totalArray,dataTableCurrenyFormat:e.currencyFormat,height:e.dataTableItems.chartdataJSON.length<5?"auto":"450px",filterCreation:!0,ndims:e.dimLength},on:{"update:dataTableCurrenyFormat":function(t){e.currencyFormat=t},"update:data-table-curreny-format":function(t){e.currencyFormat=t},updateCurrencyFormat:t=>e.currencyFormat=t}})],1):e.goClicked&&e.dataTableItems.isgroupdatatable&&!e.dataTableItems.isCrossTab?t("div",[t("grouped-data-table",{key:e.dataTableKey,attrs:{headers:e.dataTableItems.headers,chartdataJSON:e.dataTableItems.chartdataJSON,dimIds:e.selectedDimIds,measIds:e.selectedMeasIds}})],1):e.goClicked&&e.dataTableItems.isdatatable&&e.dataTableItems.isCrossTab?t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{attrs:{id:"tablediv"}},[t("cub-data-table-n-level-crosstab",{key:e.dataTableKey,attrs:{headers:e.dataTableItems.headers,dataTableCurrenyFormat:e.currencyFormat,chartdataJSON:e.dataTableItems.chartdataJSON,totalArray:e.dataTableItems.totalArray,ndims:e.dimLength,filterCreation:!0,"pivot-level":e.pivotLevel},on:{"update:dataTableCurrenyFormat":function(t){e.currencyFormat=t},"update:data-table-curreny-format":function(t){e.currencyFormat=t}}})],1)]):"Geo"==e.selectedGraphType?t("div",{staticStyle:{height:"400px",width:"100%"}},[t("cub-leaflet",{key:e.dataTableKey,attrs:{"nested-json":e.nestedJson,"show-table":"",dimensions:e.selectedDimIds,"measure-count":e.selectedMeasures.length}})],1):t("div")],1),!e.goClicked||e.isFetchingData||e.isError?e._e():t("div",{staticStyle:{float:"right","margin-right":"12px"}},[t("label",{staticStyle:{"font-size":"small"}},[t("b",[e._v("Created on:")]),e._v(" "+e._s(new Date)+" "),t("b",[e._v("| Time taken:")]),e._v(" "+e._s(e.timeTaken)+" ")])])],1)},La=[],Ma=r(3305),Aa=function(){var e=this,t=e._self._c;return t(Ze.Z,{staticClass:"d-flex justify-center",staticStyle:{height:"100%"}},[e.incompatible?t("div",[e._v("Cannot plot")]):t("div",{staticStyle:{height:"100%"}},[t(n.Z,{attrs:{bg:"","fill-height":"","grid-list-md":"","text-xs-center":""}},[t(Pe.Z,{attrs:{row:"",wrap:"","align-center":""}},[t(Ze.Z,[t(Ma.Z,{staticClass:"align-self-center",attrs:{rotate:e.rotate,size:e.size,value:e.displayData,width:e.width,color:e.conf.layout.measureprops.color}},[e._v(e._s(e.displayData)+"%")])],1)],1)],1)],1)])},Na=[],Ra={name:"cub-progress-widget",props:["conf","data"],data(){return{incompatible:0,rotate:-90,width:20,displayData:0}},computed:{size:{get(){return+this.conf.w>+this.conf.h?25*+this.conf.h-10:25*+this.conf.w}}},mounted(){var e=this.data;e&&(2==e.length&&2==e[0].length?this.displayData=Math.round(100*(+e[1][1]+Number.EPSILON))/100:2==e.length&&3==e[0].length?this.displayData=Math.round(100*(+(e[1][1]-e[1][2])+Number.EPSILON))/100:3==e.length&&2==e[0].length?this.displayData=Math.round(100*(+(e[2][1]-e[1][1])+Number.EPSILON))/100:this.incompatible=1)},methods:{}},Oa=Ra,Ba=(0,D.Z)(Oa,Aa,Na,!1,null,"aef0a66e",null),Za=Ba.exports,Pa=function(){var e=this,t=e._self._c;return t(f.Z,{attrs:{persistent:"",width:"500"},model:{value:e.showTopXWindow,callback:function(t){e.showTopXWindow=t},expression:"showTopXWindow"}},[t(it.Z,{ref:"form",attrs:{"lazy-validation":""},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[t(m.Z,[t(g.EB,{staticClass:"text-h5 grey lighten-2"},[e._v(e._s(e.topXMeasureName))]),t(g.ZB,[t(ur.Z,{attrs:{row:"",mandatory:""},model:{value:e.topXTypeInternal,callback:function(t){e.topXTypeInternal=t},expression:"topXTypeInternal"}},[t(cr.Z,{attrs:{label:"Top",value:"1"}}),t(cr.Z,{attrs:{label:"Bottom",value:"-1"}})],1),t(Ce.Z,{attrs:{rules:e.onlyNumberRule,label:"Value"},model:{value:e.topXValueInternal,callback:function(t){e.topXValueInternal=t},expression:"topXValueInternal"}})],1),t(mt.Z),t(g.h7,[t(y.Z),t(p.Z,{attrs:{color:"primary",text:""},on:{click:e.setTopX}},[e._v(" Set ")]),t(p.Z,{attrs:{color:"primary",text:""},on:{click:e.removeTopX}},[e._v(" Remove ")]),t(p.Z,{attrs:{color:"error",text:""},on:{click:e.closeTopXWindow}},[e._v(" Cancel ")])],1)],1)],1)],1)},Va=[],Ua={name:"cub-top-x",props:["showTopXWindow","topXMeasureName","topXValue","topXType"],model:{prop:"showTopXWindow",event:"showTopXWindow"},data(){return{valid:!0,onlyNumberRule:[e=>!!e||"Value is required",e=>!isNaN(e)||"Value should be a number"],topXTypeInternal:this.topXType,topXValueInternal:this.topXValue}},computed:{},created(){},methods:{removeTopX(){this.$emit("showTopXValue",0),this.$emit("topXType",0),this.$emit("showTopXWindow",!1)},closeTopXWindow(){this.$emit("showTopXWindow",!1)},setTopX(){this.valid=this.$refs.form.validate(),this.valid&&(this.$emit("showTopXValue",this.topXValueInternal),this.$emit("topXType",this.topXTypeInternal),this.closeTopXWindow())}}},$a=Ua,Ga=(0,D.Z)($a,Pa,Va,!1,null,null,null),ja=Ga.exports,za={name:"analyze-view",mixins:[ve.Z,Lt.A],props:["reportId"],data(){return{topXType:0,topXValue:"",drillOrFilterItems:["Drill","Filter"],topXMeasureName:null,showTopXWindow:!1,drillOrFilter:!1,sortDict:new Map,dimLength:0,sortMenu:!1,queryStartTime:0,queryEndTime:0,selectedGraphType:"DataTable",reportStyle:"1",dataTableItems:{isdatatable:!1,headers:"",chartdata:"",chartdataJSON:"",isCrossTab:!1,crossTabHeaders:[],crossTabData:[],totalArray:[],selected:[],isgroupdatatable:!1},saveReportDialog:!1,currencyFormat:"Default",filterDataItems:{isNormalFilter:"true",complexFilters:[],allFilters:[],selectedFilters:[],permanentFilterList:[],errorFilter:"",checkedFilters:[],filterId:""},goClicked:!1,pagination:{rowsPerPage:5,page:1},isFetchingData:!1,rowsPerPageItems:[5,10,25,100],AppliedFilters:"",showAppliedFilters:!1,graphTypes:["DataTable","Column","Bar","Line","HVLine","Scatter","Pie","Donut","Radar","StackedBar","StackedArea","Funnel","StackedFunnel","Bubble","Gauge","Geo","Heatmap","Treemap","Sunburst","Waterfall"],nestedJson:{},items:"",report:"",showAnalyzeFilterDrawer:!1,errorCode:"DEFAULT",checkItem:"",errorDim:"",errorMeas:"",isProgressBar:!1,reportFiltersArr:[],decodeOperDict:{eq:"Equal To",gt:"Greater Than",lt:"Less Than",ne:"Not Equal To",ge:"Greater Equal To",le:"Lesser Equal To",bw:"Between",lk:"Like",ms:"Equal To"},dataTableKey:1,isError:!1,pivotLevel:1}},components:{draggable:It(),"cub-data-table":Zt,"grouped-data-table":rr,"cub-data-table-crosstab":jt,"cub-save":ha,"cub-progress-widget":Za,"multi-sort-menu":Os,"cub-leaflet":Ar,"cub-top-x":ja,"cub-data-table-n-level-crosstab":Pr},created(){this.items=this.$store.state.itemList,console.log(this.CUB_FILTER_DELIM),this.reportId&&this.populateReportItems(this.reportId)},watch:{selectedMeasIds:function(e,t){e.length<t.length&&this.rearrangeSortMap()},selectedDimIds:function(e,t){e.length<t.length&&this.rearrangeSortMap()}},mounted(){},computed:{...(0,F.Se)(["selectedMeasures","selectedDimensions","getReportById","getItemMetaById","getMetaNameById","getAllFilters","getSelectedFilters","getStandardFilterArray","getSharedDashboardReportById","getSelectedDrillOrFilterVal"]),selectedDrillOrFilter:{get(){return this.getSelectedDrillOrFilterVal},set(e){this.$store.commit("setSelectedDrillOrFilterVal",e)}},timeTaken:{get(){return(this.queryEndTime-this.queryStartTime)/1e3+" Sec"}},topXString:{get:function(){var e="";return this.topXType&&(e="topx="+this.topXValue+";sort="+this.topXMeasureName+(this.topXType>0?" (Down);":"")),e}},selectedFilters:{get:function(){return this.$store.state.selectedFilters}},selectedRows:{get(){return this.$store.state.selectedItems.selectedRows},set(e){this.$store.commit("draggedRows",e)}},selectedColumns:{get(){return this.$store.state.selectedItems.selectedColumns},set(e){this.$store.commit("draggedColumns",e)}},selectedDimensionNames:function(){var e=[];for(var t in this.selectedDimensions)e.push(this.selectedDimensions[t].Name);return e},selectedMeasureNames:function(){var e=[];for(var t in this.selectedMeasures)e.push(this.selectedMeasures[t].Name);return e},selectedRowNames:function(){var e=[];for(var t in this.selectedRows)e.push(this.selectedRows[t].Name);return e},selectedColumnNames:function(){var e=[];for(var t in this.selectedColumns)e.push(this.selectedColumns[t].Name);return e},complexFilterStr:function(){var e="";for(var t in this.filterDataItems.selectedFilters)this.filterDataItems.selectedFilters[t].isNormalFilter||(e+=this.filterDataItems.selectedFilters[t].FilterValues);return e},selectedDimIds:function(){var e=[];if(this.selectedRows.length)for(var t in this.selectedRows)e.push(this.selectedRows[t].Id);if(this.selectedColumns.length)for(var r in this.selectedColumns){var s=this.selectedColumns[r].Id;+s<1e4&&e.push(s)}return e},selectedMeasIds:function(){var e=[];for(var t in this.selectedColumns){var r=this.selectedColumns[t].Id;+r>1e4&&e.push(this.selectedColumns[t].Id)}return e},selectedRowIds:function(){var e=[];for(var t in this.selectedRows)e.push(this.selectedRows[t].Id);return e},selectedColumnIds:function(){var e=[];for(var t in this.selectedColumns)e.push(this.selectedColumns[t].Id);return e},selectedFilterStr:function(){var e={dimensionFilterList:"",measureFilterList:"",filterLogic:""};return this.reportFiltersArr.length&&(e=this.generateFilterQuery(this.reportFiltersArr)),e}},methods:{rearrangeSortMap(){for(var e=Array.from(this.sortDict.keys()),t=0;t<e.length;t++)this.selectedDimIds.includes(e[t])||this.selectedMeasIds.includes(e[t])||this.sortDict.delete(e[t])},setTopX(){},showTopXMenu(e){this.showTopXWindow=!0,this.topXMeasureName=e.Name},sortReport(e){e&&(this.sortDict=e),this.sortDict&&(this.dataTableItems.chartdata=this.sortReportData(this.dataTableItems.chartdata,this.selectedDimIds,this.selectedMeasIds,this.sortDict)),$(".plot-container").remove(),this.drawChart()},redrawGraph(e){this.selectedGraphType=e,$(".plot-container").remove(),this.drawChart()},resetBreadcrumbs(){this.drillLabels.splice(1)},breadcrumbClick(e,t,r){if(t)this.drillLabels=this.drillLabels.slice(0,t+1),this.dataTableItems.isCrossTab?this.plotAnyChart(e,r.depth,r,"chart_div",this.crossTabHeader.nmeas,this.selectedGraphType,void 0,void 0,void 0,this.selectedMeasIds):this.plotAnyChart(e,r.depth,r,"chart_div",this.selectedMeasures.length,this.selectedGraphType,void 0,void 0,void 0,this.selectedMeasIds);else if(this.resetBreadcrumbs(),this.dataTableItems.isCrossTab){var s={Target:"chart_div"};s.data=this.dataTableItems.chartdata;var a={DimensionIds:this.selectedDimIds.join(this.CUB_FILTER_DELIM),MeasureIds:this.selectedMeasIds.join(this.CUB_FILTER_DELIM)};this.drawCrossTabGraph(s,a,this.selectedGraphType,this.sortDict)}else this.drawPlotlyCharts("chart_div",this.dataTableItems.chartdata,this.selectedDimensions.length,this.selectedMeasures.length,this.selectedGraphType,this.selectedMeasIds,this.selectedDimIds)},exportData(){this.dataTableItems.chartdata.length>0&&this.exportToExcel(this.dataTableItems.chartdata,this.selectedDimIds,this.selectedMeasIds,this.reportStyle,"","",this.pivotLevel,this.selectedGraphType)},toggleRow(e){if(e.draggedContext&&(e=e.draggedContext.element),!(e.Id>1e4)){var t=1;if(t){var r=this.selectedDimensions.indexOf(e);if(-1==r)this.selectedDimensions.length>=7?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DIM_LIMIT_REACHED")):(this.$store.commit("insertDimensions",e),this.$store.commit("insertRows",e));else{this.$store.commit("deleteDimensions",r);var s=this.selectedRows.indexOf(e);if(-1!=s)this.$store.commit("deleteRows",s);else{var a=this.selectedColumns.indexOf(e);-1!=a&&this.$store.commit("deleteColumns",a)}}}}},toggleColumn(e){e.draggedContext&&(e=e.draggedContext.element);var t=1;if(t){var r=this.selectedColumns.indexOf(e);-1==r?this.$store.commit("insertColumns",e):this.$store.commit("deleteColumns",r),e.Id>1e4?(r=this.selectedMeasures.indexOf(e),-1==r?this.$store.commit("insertMeasures",e):this.$store.commit("deleteMeasures",r),this.topXMeasureName==e.Name&&(this.topXMeasureName="",this.topXType=0)):(r=this.selectedDimensions.indexOf(e),-1==r?this.selectedDimensions.length>=7?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DIM_LIMIT_REACHED")):this.$store.commit("insertDimensions",e):this.$store.commit("deleteDimensions",r))}},checkMDRearrange(e){if(e.from.className==e.to.className)return!0;var t=e.to.className;if("rowdroparea"==t&&+e.draggedContext.element.Id>=1e4)return!1;"coldroparea"==t&&+e.draggedContext.element.Id<1e4&&this.pivotLevel},getVueReport(){if(this.resetBreadcrumbs(),0==this.selectedMeasures.length)this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NO_MEASURE");else if(0==this.selectedDimensions.length&&0==this.reportFiltersArr.length)this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NEITHER_DIM_NOR_FILTER");else{this.pagination.rowsPerPage=5,this.pagination.page=1,this.selectedMeasureNames.length!=this.selectedColumnNames.length?(+this.selectedColumnIds[0]<1e4?this.reportStyle="2D":this.reportStyle="2M",this.dataTableItems.isCrossTab=!0):(this.reportStyle="1",this.dataTableItems.isCrossTab=!1),this.reportFiltersArr.length?(this.showAppliedFilters=!0,this.AppliedFilters=this.generateAppliedFilterString(this.reportFiltersArr)):this.AppliedFilters="",this.goClicked=!0,this.dataTableItems.isdatatable=!1,this.dataTableItems.isgroupdatatable=!1,this.isFetchingData=!0,$(".plot-container").remove();var e=new Object;e.authToken=this.auth_token,e.dimensionList=this.selectedDimIds.join(this.CUB_FILTER_DELIM),e.measureList=this.selectedMeasIds.join(this.CUB_FILTER_DELIM),e.dimensionFilterList=this.selectedFilterStr.dimensionFilterList,e.measureFilterList=this.selectedFilterStr.measureFilterList,e.filterLogic=this.selectedFilterStr.filterLogic,e.dataInstanceId=this.topXString,this.complexFilterStr.length?e.complexFilterStr="{"+this.complexFilterStr+"}":e.complexFilterStr="",this.queryStartTime=(new Date).valueOf(),this.isError=!1,this.$store.dispatch("getReportData",e).then((e=>{this.queryEndTime=(new Date).valueOf(),e?this.vueCallback(e):this.isError=!0,this.isFetchingData=!1}))}},vueCallback(e){if("error"==e)return this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DEFAULT"),0;e.length<2&&(e[0]=this.selectedRowNames.concat(this.selectedColumnNames),this.dataTableItems.isCrossTab=!1,this.selectedGraphType="DataTable"),this.dataTableItems.chartdata=e;var t=0;for(var r in this.selectedColumns)this.selectedColumns[r].Id<1e4&&t++;this.pivotLevel=t,this.sortReport()},drawChart(){if(this.dataTableKey++,this.resetBreadcrumbs(),this.dataTableItems.isdatatable=!1,this.dataTableItems.isgroupdatatable=!1,"DataTable"!=this.selectedGraphType&&"Geo"!=this.selectedGraphType&&"GroupDataTable"!=this.selectedGraphType)if(this.dataTableItems.isCrossTab){var e={Target:"chart_div"};if(e.data=this.dataTableItems.chartdata,this.selectedDimIds.length<=1)return this.$store.commit("setErrorStatus",!0),void this.$store.commit("setErrorCode","CROSSTAB_GRAPH_ERROR");var t={DimensionIds:this.selectedDimIds.join(this.CUB_FILTER_DELIM),MeasureIds:this.selectedMeasIds.join(this.CUB_FILTER_DELIM)};this.drawCrossTabGraph(e,t,this.selectedGraphType,this.sortDict)}else this.drawPlotlyCharts("chart_div",this.dataTableItems.chartdata,this.selectedDimensions.length,this.selectedMeasures.length,this.selectedGraphType,this.selectedMeasIds,this.selectedDimIds);else if("Geo"==this.selectedGraphType)this.nestedJson=this.getNestedJson(this.dataTableItems.chartdata,this.selectedDimensions.length,this.selectedMeasures.length,this.selectedMeasIds,this.selectedDimIds);else{if(this.dataTableItems.isCrossTab){var r=this.dataTableItems.chartdata.slice(1),s=this.getCTDTHeaderByStyle(r,this.selectedDimIds,this.selectedMeasIds,this.reportStyle,this.pivotLevel);this.dataTableItems.headers=s["header"],this.dataTableItems.chartdataJSON=s["data"],this.dataTableItems.totalArray=this.getDTTotals(this.dataTableItems.headers[this.dataTableItems.headers.length-1],this.dataTableItems.chartdataJSON,this.selectedDimIds.length-this.pivotLevel-1,this.selectedMeasIds),this.dimLength=this.selectedDimIds.length}else{var a=this.dataTableItems.chartdata;this.dataTableItems.headers=this.getDTHeaders(this.selectedDimIds.concat(this.selectedMeasIds)),this.dataTableItems.chartdataJSON=this.getDTValues(a,this.selectedDimIds.concat(this.selectedMeasIds)),this.dataTableItems.totalArray=this.getDTTotalsNormal(a,this.selectedDimIds.length,this.selectedMeasIds),this.dimLength=this.selectedDimIds.length}"GroupDataTable"==this.selectedGraphType&&(this.dataTableItems.isCrossTab?(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","INVALID_GRAPHTYPE")):this.dataTableItems.isgroupdatatable=!0),this.dataTableItems.isdatatable=!0}},clearSelection(){this.drillLabels=[],this.goClicked=!1,this.$store.commit("deleteAllRows"),this.$store.commit("deleteAllColumns"),this.$store.commit("deleteAllDimensions"),this.$store.commit("deleteAllMeasures"),this.$store.commit("deleteAllSelectedFilters"),this.$store.commit("deleteAllCheckedFilters"),this.AppliedFilters="",this.reportId="",this.$router.push({path:"/home/analyze/"})},applyFilters(){this.reportFiltersArr=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray);var e=this.reportFiltersArr;this.checkMandatoryFilters(this.selectedMeasIds,e)&&this.getVueReport()},populateReportItems(e){this.$store.commit("deleteAllRows"),this.$store.commit("deleteAllColumns"),this.$store.commit("deleteAllDimensions"),this.$store.commit("deleteAllMeasures");var t=this.$store.getters.getReportById(e);t||(t=this.getSharedDashboardReportById(e)),this.report=t,this.sortDict=this.decodeSortMap(t.ReportSortColumn);for(var r=t.DimensionIds.split(this.CUB_FILTER_DELIM).filter((function(e){return 0!=e.length})),s=t.MeasureIds.split(this.CUB_FILTER_DELIM).filter((function(e){return 0!=e.length})),a=0;a<r.length;a++){var i=this.getItemMetaById(r[a]);this.$store.commit("insertDimensions",i),"CrossTab"!=t.ReportLayout&&this.$store.commit("insertRows",i)}for(var o=0;o<s.length;o++){i=this.getItemMetaById(s[o]);this.$store.commit("insertMeasures",i),this.$store.commit("insertColumns",i)}"-1"!=t.ReportTopn&&(this.topXValue=t.ReportTopn,this.topXType=t.ReportSortColumn.includes("(Down)")?"1":"-1",this.topXMeasureName=t.ReportSortColumn.split("(")[0].trim());var n="";this.$store.dispatch("getGraphProperties",e).then((e=>{if(e){n=e.Data,this.pivotLevel=1;for(var r=0;r<n.length;r++)"graphtype"==n[r].Name&&(this.selectedGraphType=n[r].Value),"style"==n[r].Name.toLowerCase()&&(this.reportStyle=n[r].Value),"pivotlevel"==n[r].Name.toLowerCase()&&(this.pivotLevel=Number(n[r].Value));if(""==this.selectedGraphType&&(this.selectedGraphType="DataTable"),"CrossTab"==t.ReportLayout){var a=this.$store.getters.selectedDimensions.length;if("2M"==this.reportStyle){this.$store.commit("deleteAllColumns");for(var i=0;i<s.length;i++){var o=this.getItemMetaById(s[i]);this.$store.commit("insertColumns",o)}for(r=0;r<this.pivotLevel;r++)this.$store.commit("insertColumns",this.$store.getters.selectedDimensions[a-this.pivotLevel+r])}else{this.$store.commit("deleteAllColumns");for(r=0;r<this.pivotLevel;r++)this.$store.commit("insertColumns",this.$store.getters.selectedDimensions[a-this.pivotLevel+r]);for(i=0;i<s.length;i++){o=this.getItemMetaById(s[i]);this.$store.commit("insertColumns",o)}}for(r=0;r<a-this.pivotLevel;r++)this.$store.commit("insertRows",this.$store.getters.selectedDimensions[r])}this.applyFilters()}}))}}},qa=za,Wa=(0,D.Z)(qa,ka,La,!1,null,"50fbbd60",null),Ja=Wa.exports,Ha=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"font-family":"'Fira Sans', sans-serif !important",height:"calc(100vh - 48px)"}},[t(Ce.Z,{staticClass:"pt-0",staticStyle:{"margin-left":"2px","margin-right":"2px","border-radius":"2px","margin-top":"2px","padding-left":"4px","background-color":"whitesmoke"},attrs:{label:"Search...","single-line":"","hide-details":"",clearable:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t(pe.Z,{staticStyle:{height:"calc(100% - 32px)",overflow:"auto"},attrs:{"hide-slider":"",grow:"",dark:""},model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},[t(ue.Z,{attrs:{href:"#tab-1"}},[e._v("Measures")]),t(ue.Z,{attrs:{href:"#tab-2"}},[e._v("Details")]),e._l(2,(function(r){return t(pr.Z,{key:r,attrs:{value:"tab-"+r}},[t(ne.Z,{staticClass:"ml-2 pt-0",attrs:{dense:""}},[1==r?t("div",e._l(e.filteredMeasures,(function(r){return t(Ca.Z,{key:r.Id,attrs:{draggable:"false","no-action":""}},[t(Ue.km,{attrs:{slot:"activator"},slot:"activator"},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1),e._l(r.items,(function(r){return t(le.Z,{key:r.Id,on:{click:()=>e.selectedMeasureId=r.Id}},[t(Ue.km,{staticClass:"md-item",attrs:{id:r.Id}},[t(Ue.V9,{attrs:{title:r.Name}},[e._v(e._s(r.Name))])],1)],1)}))],2)})),1):e._e(),2==r?t("div",[e.selectedMeasureId?e.isLoadingDetails?t("div",[t("span",[e._v("Fetching details...")]),t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1):t(ne.Z,{staticStyle:{height:"calc(100% - 48px)",overflow:"auto"},attrs:{dense:""}},[t("draggable",{staticClass:"metadatadragarea",staticStyle:{"padding-left":"0px"},attrs:{group:{name:"metadata",pull:"clone",put:!1,revertClone:!0},tag:"ul",move:e.checkMetaData},model:{value:e.getMetadataItems,callback:function(t){e.getMetadataItems=t},expression:"getMetadataItems"}},e._l(e.filteredMetadataItems,(function(r){return t(Ca.Z,{key:r.groupId,attrs:{draggable:"false","no-action":""}},[t(Ue.km,{attrs:{slot:"activator"},slot:"activator"},[t(Ue.V9,{staticClass:"meta-group",attrs:{id:r.groupId,title:r.groupName}},[e._v(e._s(r.groupName))])],1),e._l(r.items,(function(r){return t(le.Z,{key:r.itemId,on:{click:function(t){return e.checkMetaDataWithClick(r)}}},[t(Ue.km,{staticClass:"meta-item",attrs:{id:r.itemId}},[t(Ue.V9,{attrs:{title:r.itemName}},[e._v(e._s(r.itemName))])],1)],1)}))],2)})),1)],1):t(n.Z,{attrs:{"fill-height":"",fluid:""}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v("Select a measure.")])],1)],1)],1):e._e()])],1)}))],2)],1)},Ka=[],Ya={name:"details-nav",data(){return{search:"",transactionchecked:[],isLoadingDetails:!1,currentTab:""}},components:{draggable:It()},created(){this.selectMeasure(this.selectedMeasureId),console.log("Hello")},mounted(){},watch:{currentTab:function(e,t){e!=t&&(this.search="")},selectedMeasureId:function(e){this.selectMeasure(e)}},computed:{...(0,F.Se)(["getMetadataItems","selectedMetadata","getMeasureTree","getDetailsMeasureId","getItemMetaById"]),selectedMetadata:{get(){return this.$store.state.selectedMetadata}},selectedMeasureId:{get(){return this.getDetailsMeasureId},set(e){this.$store.commit("setDetailsMeasureId",e)}},filteredMetadataItems:{get:function(){var e=this.getMetadataItems;if(!this.search||!this.search.length)return e;for(var t=[],r=this.search.toLowerCase(),s=0;s<e.length;s++)if(e[s].groupName.toLowerCase().includes(r))t.push(e[s]);else{var a=JSON.parse(JSON.stringify(e[s]));a.items=[];for(var i=0;i<e[s].items.length;i++){var o=e[s].items[i];o.itemName.toLowerCase().includes(r)&&a.items.push(o)}a.items.length&&t.push(a)}return t}},filteredMeasures:{get:function(){var e=this.getMeasureTree;if(!this.search||!this.search.length)return e;for(var t=[],r=this.search.toLowerCase(),s=0;s<e.length;s++)if(e[s].Name.toLowerCase().includes(r))t.push(e[s]);else{var a=JSON.parse(JSON.stringify(e[s]));a.items=[];for(var i=0;i<e[s].items.length;i++){var o=e[s].items[i];o.Name.toLowerCase().includes(r)&&a.items.push(o)}a.items.length&&t.push(a)}return t}}},methods:{checkMetaData(e){for(var t=e.draggedContext.element.items,r=[],s=0;s<t.length;s++)if("itemId"in t[s]&&t[s].itemId){var a=this.selectedMetadata.findIndex((e=>t[s].itemId==e.itemId));-1==a&&r.push(t[s])}r.length&&this.$store.commit("setSelectedMetadata",this.selectedMetadata.concat(r))},selectMeasure(e){if(e){this.isLoadingDetails=!0;var t=this;this.$store.dispatch("getMetadata",e).then((e=>{t.isLoadingDetails=!1}))}},checkMetaDataWithClick(e){if("itemId"in e){var t=this.selectedMetadata.findIndex((t=>e.itemId==t.itemId));return-1==t?this.$store.commit("setSelectedMetadata",this.selectedMetadata.concat([e])):this.selectedMetadata.splice(t,1),!1}}}},Xa=Ya,Qa=(0,D.Z)(Xa,Ha,Ka,!1,null,"6792f1ec",null),ei=Qa.exports,ti=function(){var e=this,t=e._self._c;return t(n.Z,{staticStyle:{height:"100%"},attrs:{fluid:""}},[e.saveReportDialog?t("div",[t("cub-save",{attrs:{reportId:e.reportId,dimIds:"",measIds:e.selectedMeasure.Id,factIds:e.selectedIds.join("-"),filterStr:e.selectedFilterStr,cmplxFilterStr:"",isDetailedReport:!0,styleType:"1",graphType:"DataTable"},model:{value:e.saveReportDialog,callback:function(t){e.saveReportDialog=t},expression:"saveReportDialog"}})],1):e._e(),t("span",[e._v("Selected Measure:")]),e.selectedMeasure?t(be.Z,{key:e.selectedMeasure.Id,attrs:{close:"",small:"",color:"#98506D","text-color":"white"},on:{"click:close":function(t){e.selectedMeasure=""}}},[e._v(e._s(e.selectedMeasure.Name))]):e._e(),t(m.Z,{staticStyle:{height:"100%"}},[t("draggable",{staticClass:"metadatadroparea",staticStyle:{height:"120px",overflow:"auto"},attrs:{group:{name:"metadata"}},model:{value:e.selectedMetadata,callback:function(t){e.selectedMetadata=t},expression:"selectedMetadata"}},e._l(e.selectedMetadata,(function(r){return t(be.Z,{directives:[{name:"show",rawName:"v-show",value:r.itemId,expression:"item.itemId"}],key:r.itemId,staticClass:"ml-1 mt-1",attrs:{close:"",small:"",color:"#387CA3","text-color":"white"},on:{"update:active":function(t){return e.removeMetadataElement(r)}}},[e._v(e._s(r.itemName))])})),1),t(mt.Z),e.selectedIds.length?t(g.h7,[t(y.Z),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.clearSelection()}}},[e._v("Clear")]),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.applyFilters()}}},[e._v("Show")]),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.exportMetadataResult()}}},[e._v("Download")]),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.saveDetailedReport()}}},[e._v("Save")])],1):e._e(),t(Pe.Z,[t(Ze.Z,{attrs:{md8:""}},[t("label",{staticStyle:{color:"darkred","font-size":"15px","font-style":"italic"}},[e._v(e._s(e.AppliedFilters))])])],1),e.isLoading?t(n.Z,{staticStyle:{height:"100%",width:"100%"}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v("Getting report data")]),t(o.Z,{attrs:{cols:"6"}},[t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1)],1)],1):e._e(),e.showMetadataResult&&!e.isLoading?t("div",{staticStyle:{height:"calc(100vh - 250px)",overflow:"auto"}},[t("cub-data-table-detail",{attrs:{headers:e.resultHeader,chartdataJSON:e.resultData}})],1):e._e()],1)],1)},ri=[],si={name:"details-view",mixins:[ve.Z],props:["reportId"],data(){return{selectedDimIds:[],selectedMeasIds:[],saveReportDialog:!1,complexFilterStr:"",isLoading:!1,resultHeader:[],resultData:[],reportFiltersArr:[],AppliedFilters:"",showMetadataResult:!1}},components:{draggable:It(),"cub-data-table-detail":Kt,"cub-save":ha},created(){this.reportId&&this.populateReportItems(this.reportId)},mounted(){},computed:{...(0,F.Se)(["getMetadataItems","getSelectedFilters","getStandardFilterArray","getItemMetaById","getDetailsMeasureId","getDetailsMetaNameById"]),selectedMeasure:{get(){return this.getItemMetaById(this.getDetailsMeasureId)},set(e){this.$store.commit("setDetailsMeasureId",e)}},selectedFilterStr:function(){var e={dimensionFilterList:"",measureFilterList:"",filterLogic:""};return this.reportFiltersArr.length&&(e=this.generateFilterQuery(this.reportFiltersArr)),e},selectedMetadata:{get(){return this.$store.state.selectedMetadata},set(e){this.$store.commit("setSelectedMetadata",e)}},selectedIds:function(){for(var e=new Array,t=0;t<this.selectedMetadata.length;t++)void 0!=this.selectedMetadata[t].itemId&&e.push(this.selectedMetadata[t].itemId);return e}},methods:{removeMetadataElement(e){var t=this.selectedMetadata,r=t.indexOf(e);-1!=r&&(t.splice(r,1),t=JSON.parse(JSON.stringify(t)),this.$store.commit("setSelectedMetadata",t))},saveDetailedReport(){this.checkValidity()&&(this.saveReportDialog=!0)},populateReportItems(e){var t=this.$store.getters.getReportById(e);this.selectedMeasure=t.MeasureIds.split(this.CUB_FILTER_DELIM)[0],this.$store.dispatch("getFactDetails",this.reportId).then((e=>{if(e){this.factdetails=e;for(var t=e.MetadataId.split(","),r=e.MetadataName.split(","),s=[],a=0;a<t.length;a++){var i=new Object;i.itemId=t[a],i.itemName=r[a],s.push(i)}var o=e.MetadataOrder.split("-"),n=[];for(a=0;a<o.length;a++){i=new Object;i.itemId=o[a];var l=s.filter((e=>e.itemId==o[a]));i.itemName=l[0].itemName,n.push(i)}this.$store.commit("setSelectedMetadata",n),this.applyFilters()}}))},clearSelection(){this.$store.commit("setSelectedMetadata",[])},applyFilters(){this.reportFiltersArr=this.resolveFilterArrays(this.getSelectedFilters,this.getStandardFilterArray),this.fetchMetadataResult()},checkValidity(){return this.selectedMeasure?!(!this.selectedFilterStr.dimensionFilterList.length&&!this.selectedFilterStr.filterLogic.length)||(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NO_FILTER"),!1):(this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","NO_MEASURE"),!1)},exportMetadataResult(){if(this.checkValidity()){var e={measureId:this.selectedMeasure.Id};e["selectedItemList"]=this.selectedIds.join(this.CUB_FILTER_DELIM),e.dimensionFilterList=this.selectedFilterStr.dimensionFilterList,e.filterLogic=this.selectedFilterStr.filterLogic,e.displayOption="download",this.$store.commit("setErrorStatus",!0),this.$store.commit("setErrorCode","DETAILS_DOWNLOAD_MSG"),this.$store.dispatch("getMetadataResult",e).then((e=>{var t=document.createElement("a");t.href=e,t.download=e.substring(e.lastIndexOf("/")+1,e.length),t.dispatchEvent(new MouseEvent("click"))}))}},fetchMetadataResult(){if(this.checkValidity()){this.AppliedFilters=this.generateAppliedFilterString(this.reportFiltersArr),this.isLoading=!0;var e={measureId:this.selectedMeasure.Id};e["selectedItemList"]=this.selectedIds.join(this.CUB_FILTER_DELIM),e.dimensionFilterList=this.selectedFilterStr.dimensionFilterList,e.filterLogic=this.selectedFilterStr.filterLogic,e.displayOption="show",this.$store.dispatch("getMetadataResult",e).then((e=>{var t=e,r=new Array;for(o=0;o<t.length;o++)if("object"===typeof t[o].COL)r.push(t[o].COL);else if("string"===typeof t[o].COL){var s=new Array;s.push(t[o].COL),r.push(s)}var a=new Array;for(o=0;o<this.selectedIds.length;o++)a.push(this.getDetailsMetaNameById(this.selectedIds[o]));r.length<2&&(r[0]=a);for(var i=new Array,o=0;o<r[0].length;o++){var n=new Object;n.text=r[0][o],n.value=r[0][o],n.align="left",i.push(n)}this.resultHeader=i,this.resultData=arrToObject(r),this.isLoading=!1,this.showMetadataResult=!0}))}}}},ai=si,ii=(0,D.Z)(ai,ti,ri,!1,null,"72f2355a",null),oi=ii.exports,ni=r(77394),li=r(42933),di=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{"font-family":"'Fira Sans', sans-serif !important",height:"calc(100vh - 48px)"}},[t(Ce.Z,{staticClass:"pt-0",staticStyle:{"margin-left":"2px","margin-right":"2px","border-radius":"2px","margin-top":"2px","padding-left":"4px","background-color":"whitesmoke"},attrs:{label:"Search...","single-line":"","hide-details":"",clearable:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t(pe.Z,{staticStyle:{height:"calc(100% - 32px)",overflow:"auto"},attrs:{"hide-slider":"",grow:"",dark:""},model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},[t(ue.Z,{attrs:{href:"#tab-1"}},[e._v("Schema")]),t(ue.Z,{attrs:{href:"#tab-2"}},[e._v("Saved Queries")]),e._l(2,(function(r){return t(pr.Z,{key:r,attrs:{value:"tab-"+r}},[1==r?t("div",[e.isLoadingDetails?t("div",[t("span",[e._v("Fetching details...")]),t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1):t("div",{staticStyle:{overflow:"auto",height:"calc(100vh - 150px)"}},[t(Kr.Z,{attrs:{items:e.filteredTableColumnData,dense:"","open-on-click":"","expand-icon":"",activatable:"",color:"red"},scopedSlots:e._u([{key:"prepend",fn:function({item:r}){return[e.images[r.type]?t(oe.Z,{attrs:{small:""}},[e._v(" "+e._s(e.images[r.type])+" ")]):t(oe.Z)]}}],null,!0)})],1)]):e._e(),2==r?t("div",[t(ne.Z,[t(gt.Z,{model:{value:e.selectedQuery,callback:function(t){e.selectedQuery=t},expression:"selectedQuery"}},[e._l(e.filteredQueries,(function(r,s){return[t(St.Z,{key:s,scopedSlots:e._u([{key:"default",fn:function({hover:s}){return[t(le.Z,{key:r.query_id,on:{click:function(t){return e.changeQuery(r)}}},[[t(Ue.km,[t(Ue.V9,{domProps:{textContent:e._s(r.query_name)}})],1),t(ni.Fx,[t(li.Z,{staticStyle:{position:"relative",right:"0px"},attrs:{absolute:"",opacity:.2,value:s}},[t(oe.Z,{attrs:{color:"red"},on:{click:function(t){return e.deleteQuery(r)}}},[e._v("mdi-delete")])],1)],1)]],2)]}}],null,!0)})]}))],2)],1)],1):e._e()])}))],2)],1)},hi=[],ci={name:"query-nav",props:["queryId"],data(){return{search:"",isLoadingDetails:!1,tableSchema:"",currentTab:"",isLoadingDetails:!1,informationSchema:{test:["id","name"],test1:["id","name"]},images:{int:"mdi-numeric",char:"mdi-alphabetical-variant",date:"mdi-calendar-range",decimal:"mdi-decimal"},queryList:"",items:"",selectedQuery:""}},components:{draggable:It()},created(){if(console.log("Hello"),console.log("this is query window"),this.queryId)for(var e=0;e<this.queryItems.length;e++)this.queryId==this.queryItems[e].query_id&&(this.selectedQuery=this.queryItems[e])},mounted(){},watch:{},computed:{...(0,F.Se)(["getInformationSchemaDbData"]),queryItems:{get:function(){return this.$store.state.savedQueries}},filteredTableColumnData:{get:function(){this.isLoadingDetails=!0,this.informationSchema=this.getInformationSchemaDbData,this.isLoadingDetails=!1;for(var e=Object.keys(this.informationSchema),t=[],r=0;r<e.length;r++){var s={};s.id=r,s.name=e[r],s.children=[];for(var a=0;a<this.informationSchema[e[r]].length;a++){var i={};i.id=a,i.name=this.informationSchema[e[r]][a].COLUMN_NAME,i.type=this.informationSchema[e[r]][a].COLUMN_TYPE,i.type.includes("int")?i.type="int":i.type.includes("decimal")?i.type="decimal":i.type.includes("date")?i.type="date":i.type="char",s.children.push(i)}t.push(s)}if(this.tableSchema=t,!this.search||!this.search.length)return t;var o=[],n=this.search.toLowerCase();for(r=0;r<t.length;r++)if(t[r].name.toLowerCase().includes(n))o.push(t[r]);else{var l=JSON.parse(JSON.stringify(t[r]));l.children=[];for(a=0;a<t[r].children.length;a++){var d=t[r].children[a];d.name.toLowerCase().includes(n)&&l.children.push(d)}l.children.length&&o.push(l)}return o}},filteredQueries:{get:function(){if(this.queryItems=this.queryItems.sort(((e,t)=>e.query_name>t.query_name?1:t.query_name>e.query_name?-1:0)),!this.search||!this.search.length)return this.queryItems;for(var e=[],t=this.search.toLowerCase(),r=0;r<this.queryItems.length;r++)this.queryItems[r].query_name.toLowerCase().includes(t)&&e.push(this.queryItems[r]);return e}}},methods:{showSavedQuery(e){this.$router.push({path:"/home/query/"+e.query_id,params:{queryId:e.query_id}})},changeQuery(e){this.selectedQuery=e,this.showSavedQuery(this.selectedQuery)},deleteQuery(e){this.$store.dispatch("deleteQuery",e).then((e=>{"object"==typeof e.data&&console.log(e.data)})),this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","DELETE_QUERY_SUCCESS")}}},ui=ci,pi=(0,D.Z)(ui,di,hi,!1,null,"318fc8a6",null),mi=pi.exports,gi=function(){var e=this,t=e._self._c;return t(n.Z,{staticStyle:{height:"100%"},attrs:{fluid:""}},[t(f.Z,{attrs:{width:"700px"},model:{value:e.saveQueryDialog,callback:function(t){e.saveQueryDialog=t},expression:"saveQueryDialog"}},[t(m.Z,[t(g.EB,{staticStyle:{"background-color":"rgb(60, 141, 188)",color:"white"}},[e._v(" Query Name: "),t(y.Z),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){e.saveQueryDialog=!1}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){return e.saveQuery()}}},[e._v("Save")])],1),t(g.ZB,[t(ur.Z,{attrs:{row:""},model:{value:e.isNewQuery,callback:function(t){e.isNewQuery=t},expression:"isNewQuery"}},[t(cr.Z,{attrs:{label:"New Report",value:"0"}}),e.queryId?t(cr.Z,{attrs:{label:"Update Report",value:"1"}}):e._e()],1),t(Ce.Z,{attrs:{label:"Name"},model:{value:e.queryName,callback:function(t){e.queryName=t},expression:"queryName"}})],1)],1)],1),t(f.Z,{attrs:{width:"700px"},model:{value:e.downloadAlert,callback:function(t){e.downloadAlert=t},expression:"downloadAlert"}},[t(m.Z,[t(g.EB,{staticStyle:{"background-color":"rgb(60, 141, 188)",color:"white"}},[e._v(" Download Options: "),t(y.Z),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){e.downloadAlert=!1}}},[e._v("Cancel")]),t(p.Z,{attrs:{text:"",color:"white"},on:{click:function(t){return e.showQueryResult(e.downloadOption,e.downloadLimitApplied)}}},[e._v("Download")])],1),t(g.ZB,[t(ur.Z,{attrs:{row:""},model:{value:e.downloadLimitApplied,callback:function(t){e.downloadLimitApplied=t},expression:"downloadLimitApplied"}},[t(cr.Z,{attrs:{label:"Download displayed",value:"1"}}),t(cr.Z,{attrs:{label:"Download all",value:"0"}})],1)],1)],1)],1),t("span",[e._v("SQL Query:")]),t($e.Z,{attrs:{items:e.databases,label:"Choose DB","item-text":"db_name","item-value":"db_id"},model:{value:e.selectedInstance,callback:function(t){e.selectedInstance=t},expression:"selectedInstance"}}),t(m.Z,{staticStyle:{height:"100%"}},[t(n.Z,{attrs:{fluid:""}},[t(Bs.Z,{attrs:{"no-resize":"",rows:"5"},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1),t(mt.Z),t(g.h7,[t(y.Z),t(dr.Z,{staticStyle:{"margin-right":"5px"},attrs:{label:"Apply limit"},model:{value:e.islimitApplied,callback:function(t){e.islimitApplied=t},expression:"islimitApplied"}}),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.showQueryResult("show")}}},[e._v("Show")]),t(p.Z,{attrs:{dark:""},on:{click:function(t){e.saveQueryDialog=!0}}},[e._v("Save")]),t(he.Z,{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:r,attrs:s}){return[t(p.Z,e._g(e._b({staticStyle:{"margin-left":"8px"},attrs:{dark:""}},"v-btn",s,!1),r),[e._v(" Download ")])]}}])},[t(ne.Z,e._l(e.items,(function(r,s){return t(le.Z,{key:s,on:{click:function(t){return e.showDownloadWindow(r.title)}}},[t(Ue.V9,[e._v(e._s(r.title))])],1)})),1)],1),t(p.Z,{attrs:{dark:""},on:{click:function(t){return e.clearSelection()}}},[e._v("Clear")])],1),e.isLoading?t(n.Z,{staticStyle:{height:"100%",width:"100%"}},[t(d.Z,{staticClass:"fill-height",attrs:{"align-content":"center",justify:"center"}},[t(o.Z,{staticClass:"subtitle-1 text-center",attrs:{cols:"12"}},[e._v("Getting report data")]),t(o.Z,{attrs:{cols:"6"}},[t(l.Z,{attrs:{color:"deep-purple accent-4",indeterminate:"",rounded:"",height:"6"}})],1)],1)],1):e._e(),e.isError&&!e.isLoading?t("div",{staticClass:"pa-2"},[t(m.Z,[t(g.ZB,{staticStyle:{color:"white",background:"red"}},[e._v(" "+e._s(e.errorMessage))])],1)],1):e._e(),e.isError||e.isLoading?e._e():t("div",{staticStyle:{height:"calc(100vh - 250px)",overflow:"auto"}},[t(ua.Z,{attrs:{"fixed-header":"",height:"300px"},scopedSlots:e._u([{key:"default",fn:function(){return[t("thead",[t("tr",e._l(e.resultHeader,(function(r,s){return t("th",{key:s,staticClass:"text-left",staticStyle:{background:"#3c8dbc !important",color:"white"}},[e._v(" "+e._s(r)+" ")])})),0)]),t("tbody",e._l(e.resultData,(function(r,s){return t("tr",{key:s},e._l(r,(function(r,s){return t("td",{key:s},[e._v(e._s(r))])})),0)})),0)]},proxy:!0}],null,!1,2352257709)})],1)],1)],1)},fi=[],yi={name:"query-view",mixins:[ve.Z],props:["queryId"],data(){return{islimitApplied:1,saveQueryDialog:!1,queryName:"",isLoading:!1,resultHeader:[],resultData:[],errorMessage:"",isError:!1,downloadAlert:!1,downloadLimitApplied:"1",value:"",items:[{title:"json"},{title:"Excel"},{title:"CSV"}],isNewQuery:"0",downloadOption:""}},components:{"cub-save":ha},created(){this.showQuery()},watch:{queryId:function(e,t){this.showQuery()}},mounted(){},computed:{databases:{get(){return this.$store.state.savedInstances}},selectedInstance:{get:function(){return this.$store.state.db_id},set:function(e){this.getInformationSchemaDbData!=[]&&this.$store.dispatch("getInformationSchema",e)}}},methods:{showDownloadWindow(e){this.downloadOption=e,(this.islimitApplied=1)?this.downloadAlert=!0:this.showQueryResult(e)},showQuery(){if(this.queryId)for(var e=this.$store.state.savedQueries,t=0;t<e.length;t++)this.queryId==e[t].query_id&&(this.value=e[t].query_str,this.queryName=e[t].query_name,this.islimitApplied=e[t].islimitapplied,this.$store.state.db_id=e[t].db_id,this.selectedInstance=db_id,this.isNewQuery="1")},saveQuery(){"0"==this.isNewQuery&&(this.queryId=0);var e={query_id:this.queryId?this.queryId:0,query_str:this.value,owner:"sai",query_name:this.queryName,islimitapplied:this.islimitApplied,db_id:this.selectedInstance};this.$store.dispatch("saveQuery",e).then((e=>{"object"==typeof e.data&&console.log(e.data)})),this.$store.commit("setSnackbarStatus",!0),this.$store.commit("setSnackbarCode","SAVE_QUERY_SUCCESS"),this.saveQueryDialog=!1},showQueryResult(e,t=this.islimitApplied){var r=this;this.isLoading=!0;var s={query:this.value,display:e,applylimit:t,db_id:this.selectedInstance};this.$store.dispatch("getQueryResult",s).then((t=>{if("object"==typeof t.data&&"error"in t.data)r.isError=!0,r.errorMessage=t.data.error;else{if("show"!=e){console.log(t);var s=document.createElement("a");s.href=t.data.path,s.download=t.data.path.substring(t.data.path.lastIndexOf("/")+1,t.data.path.length),s.dispatchEvent(new MouseEvent("click"))}else r.resultHeader=t.data.columns,r.resultData=t.data.data;r.isError=!1}r.isLoading=!1}))},clearSelection(){this.value=""}}},vi=yi,Ii=(0,D.Z)(vi,gi,fi,!1,null,"58be5a28",null),bi=Ii.exports,_i=function(){var e=this,t=e._self._c;return t("div",[t(m.Z,{staticClass:"elevation-0",staticStyle:{height:"100%",overflow:"hidden auto"}},[t(g.EB,{staticClass:"py-1",staticStyle:{"background-color":"#367fa9",color:"white","max-height":"48px"}},[e._v(" CUBOT ITEMS LIST "),t(y.Z),t(Ce.Z,{staticClass:"py-0",attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":"",rounded:"","background-color":"white",clearable:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1),t(Mt.Z,{staticStyle:{height:"calc(100vh - 64px)"},attrs:{headers:e.headers,items:e.getItemList,"disable-pagination":"","calculate-widths":"","fixed-header":""},scopedSlots:e._u([e.getItemList.length?{key:"body",fn:function({items:r}){return[t("tbody",{staticClass:"text-no-wrap"},e._l(r,(function(r,s){return t("tr",{key:s},[0==r.ParentId?[t("td",{staticStyle:{color:"blue"},attrs:{colspan:"7"}},[t("b",[e._v(e._s(r.Name))])])]:[t("td",[e._v(e._s(r.Id))]),t("td",[e._v(e._s(r.Name))]),t("td",[e._v(e._s(r.Table))]),t("td",[e._v(e._s(r.Column))]),t("td",[e._v(e._s(r.WhereClause1))]),t("td",[e._v(e._s(r.AggFunction))]),t("td",[e._v(e._s(r.Description))])]],2)})),0)]}}:null],null,!0)})],1)],1)},Di=[],Ci={name:"cub-meta-data-display",data(){return{search:"",itemList:"",headers:[{text:"Item Id",align:"start",value:"Id",width:"20%"},{text:"Item Name",align:"start",value:"Name",width:"20%"},{text:"Table",value:"Table",width:"10%"},{text:"Column",value:"Column",width:"20%"},{text:"Where",value:"WhereClause1",width:"20%"},{text:"SumCnt",value:"AggFunction",width:"10%"},{text:"Description",value:"Description",width:"20%"}]}},created(){var e=JSON.parse(localStorage.getItem("itemListLocal"));this.itemList=e},computed:{...(0,F.Se)(["getDimensionTree","getMeasureTree"]),getItemList:{get(){var e=this.itemList.dimensionTree.concat(this.itemList.measureTree);return this.getFilteredItems(this.search.toLocaleLowerCase(),e)}}},methods:{getFilteredItems(e,t){for(var r=[],s=0;s<t.length;s++)if(!e.length||t[s].Name.toLocaleLowerCase().includes(e)){r.push(t[s]);for(var a=0;a<t[s].items.length;a++)r.push(t[s].items[a])}else{var i=!1,o=[t[s]];for(a=0;a<t[s].items.length;a++)t[s].items[a].Name.toLocaleLowerCase().includes(e)&&(i=!0,o.push(t[s].items[a]));i&&(r=r.concat(o))}return r},customFilter(e,t,r){return null!=e&&null!=t&&"string"===typeof e&&-1!==e.toString().toLocaleUpperCase().indexOf(t)}}},Si=Ci,Fi=(0,D.Z)(Si,_i,Di,!1,null,null,null),wi=Fi.exports;s["default"].use(Z.ZP);const xi=new Z.ZP({mode:"history",routes:[{path:"",redirect:{name:"home"}},{path:"/login",name:"Login",component:pt},{path:"/metadata",name:"Metadata",component:wi},{path:"/home",component:st,name:"home",children:[{path:"dashboard/:dashId?",name:"dashboard",components:{nav_drawer:Ct,content_window:fs},props:{content_window:!0},beforeEnter:(e,t,r)=>{var s;void 0==e.params.dashId&&(H.state.dashboardCollection.length||H.state.sharedDashboardList.length)?(H.state.dashboardCollection.length?s=H.state.dashboardCollection[0].Id:H.state.sharedDashboardList.length&&(s=H.state.sharedDashboardList[0].Id),r({path:"/home/dashboard/"+s,params:{pageId:s}})):r()}},{path:"reports/:reportId?",name:"reports",components:{nav_drawer:Ds,content_window:Da},props:{content_window:!0}},{path:"analyze/:reportId?",name:"analyze",components:{nav_drawer:Ea,content_window:Ja},props:{content_window:!0}},{path:"details/:reportId?",name:"details",components:{nav_drawer:ei,content_window:oi},props:{content_window:!0}},{path:"query/:queryId?",name:"query",components:{nav_drawer:mi,content_window:bi},props:{content_window:!0,nav_drawer:!0}}]}]});function Ti(){var e="";return Ei("reports")?e="/home/reports/":Ei("analyze")?e="/home/analyze/":Ei("dashboard")?e="/home/dashboard/":Ei("details")?e="/home/details/":Ei("query")&&(e="/home/query/"),e}function Ei(e){var t={analyze:"Analyze",details:"View Details",dashboard:"Dashboard",reports:"Reports",query:"Query"},r=H.state.accessList;return!Object.keys(t).includes(e)||r.includes(t[e])}xi.beforeEach(((e,t,r)=>{if(console.log("Router..."),console.log(e.query),console.log(e.name),!t.fullPath.includes(e.fullPath)){if(e.query&&e.query.sessioninit){var s=e.query.sessioninit,a=e.query.db;a=a||"";var i=e.query.domain;return i=i||"",void H.dispatch("loginCubot",["sessioninit="+s,"",a,i]).then((e=>{e?r("/home"):(r("/login"),H.commit("setSnackbarStatus",!0),H.commit("setSnackbarCode","INVALID_CREDENTIALS"))}))}if("query"==e.name&&H.dispatch("getInformationSchema",1).then((e=>{"success"==e&&(H.dispatch("getSavedQueriesList"),H.dispatch("getInstancesList"))})),"details"==t.name&&"analyze"==e.name||"analyze"==e.name&&void 0!=e.params.reportId||"details"==e.name&&H.state.reportToDetails||"Metadata"!==e.name&&(H.commit("deleteAllSelectedFilters"),H.commit("enableReportToDetails",0)),console.log(H.state.appStatus),"INACTIVE"==H.state.appStatus){var o=getCookie("RXSESSION");if(o){var n=o.split("RX")[1];H.commit("setAuthToken",o),H.commit("setConnId",n),H.dispatch("checkSessionValidity").then((t=>{"VALID"==t?(H.commit("setWSLoading",!0),"Metadata"==e.name?(H.commit("setWSLoading",!1),r()):H.dispatch("initSession").then((t=>{H.commit("setWSLoading",!1),H.state.itemList,localStorage.setItem("itemListLocal",JSON.stringify(H.state.itemList)),"/home"==e.path?r(Ti()):"/login"==e.path||"/index.html"==e.path?r("/home"):r()}))):"/login"!==e.path?r("/login"):r()}))}else"/login"!=e.path?r("/login"):r()}else"/home"==e.path&&r(Ti()),Ei(e.name)&&r()}}));var ki=xi,Li=r(5890);s["default"].use(a.Z);const Mi={lang:{locales:{ar:Li.Z}},icons:{iconfont:"mdi"}};var Ai=new a.Z(Mi);s["default"].component("l-map",Cr.Z),s["default"].component("l-tile-layer",Sr.Z),s["default"].component("l-marker",Fr.Z),s["default"].config.productionTip=!1,s["default"].use(a.Z),s["default"].use({install:function(e,t){e.prototype.$=r(77387)}});new a.Z({icons:{iconfont:"mdi"}});new s["default"]({el:"#app",vuetify:new a.Z,store:H,router:ki,template:"<App/>",vuetify:Ai,components:{App:B}}),s["default"].mixin({data:function(){return{CUB_FILTER_DELIM:"~_"}}}),window.$=window.jQuery=r(77387)},55382:function(){},72095:function(){},61219:function(){}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.m=__webpack_modules__,function(){var e=[];__webpack_require__.O=function(t,r,s,a){if(!r){var i=1/0;for(d=0;d<e.length;d++){r=e[d][0],s=e[d][1],a=e[d][2];for(var o=!0,n=0;n<r.length;n++)(!1&a||i>=a)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](r[n])}))?r.splice(n--,1):(o=!1,a<i&&(i=a));if(o){e.splice(d--,1);var l=s();void 0!==l&&(t=l)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[r,s,a]}}(),function(){__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,{a:t}),t}}(),function(){__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){__webpack_require__.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){__webpack_require__.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,r){var s,a,i=r[0],o=r[1],n=r[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(s in o)__webpack_require__.o(o,s)&&(__webpack_require__.m[s]=o[s]);if(n)var d=n(__webpack_require__)}for(t&&t(r);l<i.length;l++)a=i[l],__webpack_require__.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return __webpack_require__.O(d)},r=self["webpackChunkCUBOT"]=self["webpackChunkCUBOT"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var __webpack_exports__=__webpack_require__.O(void 0,[998],(function(){return __webpack_require__(13397)}));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})(); //# sourceMappingURL=app.0851a83f.js.map