 mstrmojo.plugins.VitaraCharts||(mstrmojo.plugins.VitaraCharts={}),(()=>{"use strict";var t={318:(t,e,o)=>{o.d(e,{v:()=>r});void 0===mstrmojo.plugins.VitaraCharts.v538208&&(mstrmojo.plugins.VitaraCharts.v538208={}),void 0===mstrmojo.plugins.VitaraCharts.v538208.dropZones&&(mstrmojo.plugins.VitaraCharts.v538208.dropZones={}),mstrmojo.requiresCls("mstrmojo.vi.models.CustomVisDropZones");var r=mstrmojo.declare(mstrmojo.vi.models.CustomVisDropZones,null,{ENUM_ZONES:{PLAY_AXIS:"Play Axis",CATEGORY:"Category Axis",CATEGORY_AXIS:"Category Axis",CATEGORY_ZONE:"Category",COLOR_BY:"Color By",SLICE_BY:"Slice By",VALUE:"Value",HORIZONTAL_VALUES:"Horizontal Axis",VERTICAL:"Vertical Axis",BUBBLE_SIZE:"Bubble Size",START_VALUE:"Start Value",END_VALUE:"End Value",TOOLTIP:"Tooltip",SMALL_MULTIPLE:"Small Multiples",ATTRIBUTES:"Attributes",METRICS:"Metrics",BREAK_BY:"Break By",DRILL_TARGET:"Drill Target",INTER_VALUE:"Intermediate Value(s)",LAST_VALUE:"Last Value",GROUP_BY:"Group By",NUMERATOR:"Ratio - Numerator Value",DENOMINATOR:"Ratio - Denominator Value",RING_1:"Ring 1 Value",RING_2:"Ring 2 Value",RING_3:"Ring 3 Value",TIME:"Time",TREND_BY:"Trend By",BAR:"Bar",MARKERS:"Markers",DATE:"Date",TOP_LABEL:"Main Label",SUB_LABEL:"Sub Label",THRESHOLD_METRICS:"Threshold Metrics",STACK_BY:"Stack By"},DROPZONES:null,scriptClass:"mstrmojo.plugins.VitaraCharts.v538208.dropZones.VitaraDropZonesBase",getCustomDropZones:function(){var t=mstrmojo.vi.models.CustomVisDropZones.ENUM_ALLOW_DROP_TYPE,e=this.getZones();return[{name:e.ATTRIBUTES,title:mstrmojo.desc(13828,"Drag attributes here"),allowObjectType:t.ATTRIBUTE,disabled:!1},{name:e.METRICS,title:mstrmojo.desc(13827,"Drag metrics here"),allowObjectType:t.METRIC,disabled:!1}]},getZones:function(){var t=this;return this.DROPZONES||(this.DROPZONES={},this.ZONES.forEach(function(e){var o;t.DROPZONES[e]=(null==t||null===(o=t.getConvertedLangString)||void 0===o?void 0:o.call(t,t.ENUM_ZONES[e]))||t.ENUM_ZONES[e]})),this.DROPZONES},getIndex:function(t,e,o){return vitaraLD.findIndex(t,function(t){return t[e]==o})},getRemoveAttrfrmOptions:function(t){try{var e=this.getIndex(t.contents,"scriptClass","mstrmojo.ui.Pulldown"),o=-1!==e?this.getIndex(t.contents[e].items,"n","Automatic"):-1;if(-1===o)throw new Error("failed to remove attr forms options");return t.contents[e].items=[t.contents[e].items[o]],t.contents[e].selectedIndex=0,t}catch(e){return console.error(e),t}},getDropZoneContextMenuItems:function(t,e,o,r){var s=this;this.shouldShowDisplayFormsMenu(o)&&t.addEditorMenuItem(mstrmojo.desc(11908,"Display Attribute Forms"),this.id,function(){return s.getRemoveAttrfrmOptions(s.getDisplayFormsMenu(o))})},getConvertedLangString:function(t){var e,o;if("undefined"!=typeof VitaraGlobal)return null===(e=VitaraGlobal)||void 0===e||null===(e=e.globalUtils)||void 0===e||e.getLanguageMap(getBaseFilePath()),null===(o=VitaraGlobal)||void 0===o||null===(o=o.globalUtils)||void 0===o?void 0:o.convertStringLanguage(t)},shouldAllowObjectsInDropZone:function(t,e,o,r,s){return{allowedItems:vitaraLD.filter(e,function(t){return!0})}},removeItemsFromZone:function(t,e,o){var r=this;vitaraLD.forEach(t,function(t){r.isObjectInZone(t,o)&&r.getRemoveDropZoneObjectsActions(e,o,t)})}})}},e={};function o(r){var s=e[r];if(void 0!==s)return s.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=o(318);mstrmojo.plugins.VitaraCharts.v538208.dropZones.VitaraD3CirclePackedChartDropZones=mstrmojo.declare(r.v,null,{ZONES:["CATEGORY_ZONE","VALUE","TOOLTIP"],scriptClass:"mstrmojo.plugins.VitaraCharts.v538208.dropZones.VitaraD3CirclePackedChartDropZones",getCustomDropZones:function(){var t=mstrmojo.vi.models.CustomVisDropZones.ENUM_ALLOW_DROP_TYPE,e=this.getZones();return[{name:e.CATEGORY_ZONE,title:mstrmojo.desc(13828,"Drag attribute here"),allowObjectType:t.ATTRIBUTE,disabled:!1},{name:e.VALUE,title:mstrmojo.desc(13827,"Drag metrics here"),maxCapacity:1,allowObjectType:t.METRIC,disabled:!1},{name:e.TOOLTIP,title:mstrmojo.desc(13827,"Drag metrics here"),allowObjectType:t.METRIC,disabled:!1}]},shouldAllowObjectsInDropZone:function(t,e,o,r,s){return{allowedItems:mstrmojo.array.filter(e,function(t){return!0})}},getActionsForObjectsDropped:function(t,e,o,r,s){var n=this,i=[],a=this.getZones();switch(n.getDropZoneName(t)){case a.CATEGORY_ZONE:vitaraLD.forEach(e,function(t){n.isObjectInZone(t,a.COLOR_BY)&&n.getRemoveDropZoneObjectsActions(i,a.COLOR_BY,t)});break;case a.VALUE:n.getAddDropZoneObjectsActions(i,a.TOOLTIP,e,o,s)}return i},getActionsForObjectsRemoved:function(t,e){var o=this,r=[],s=o.getZones();return o.getDropZoneName(t)===s.VALUE&&o.getRemoveDropZoneObjectsActions(r,s.TOOLTIP,e),r}})})();
