DvtObj=function(){};DvtObj.owner=window;dvtm={canvasRendererLoaded:!1};
(function(){dvtm.AMX_NAMESPACE="http://xmlns.oracle.com/adf/mf/amx";dvtm.DVTM_NAMESPACE="http://xmlns.oracle.com/adf/mf/amx/dvt";dvtm.DEFAULT_CHART_WIDTH=300;dvtm.DEFAULT_CHART_HEIGHT=200;dvtm.DEFAULT_COMPONENT_SIZES={sparkChart:{width:300,height:100},ledGauge:{width:100,height:80},dialGauge:{width:150,height:150},statusMeterGauge:{width:300,height:40},ratingGauge:{width:160,height:30,"max-height":50}};dvtm.COMPONENT_INSTANCE="_jsComponentInstance";dvtm.LOADED_RB={};dvtm.RESIZE_CALLBACKS=[];dvtm.addResizeCallback=
function(a,b,d){dvtm.__resizeHandlerRegistered||(dvtm._registerResizeHandler(),dvtm.__resizeHandlerRegistered=!0);dvtm.removeResizeCallback(a);dvtm.RESIZE_CALLBACKS.push({id:a,callback:function(a){return b&&(a=b(a))?a:{}},postCallback:function(a){d&&d(a)}})};dvtm.removeResizeCallback=function(a){for(var b=[],d=dvtm._getResizeCallbacks(),e=0;e<d.length;e++)d[e].id!=a&&b.push(d[e]);dvtm.RESIZE_CALLBACKS=b};dvtm._getResizeCallbacks=function(){return dvtm.RESIZE_CALLBACKS};dvtm._registerResizeHandler=
function(){window.addEventListener("resize",function(a){for(var b=dvtm._getResizeCallbacks(),d=[],e=0;e<b.length;e++)try{var g=b[e].callback(a);d.push(b[e]);g||(g={});g.event=a;d.push(g)}catch(h){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.component","resize.callback","Exception: "+h.message)}for(a=0;a<d.length;a+=2)try{d[a].postCallback(d[a+1])}catch(k){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.component","resize.postCallback","Exception: "+k.message)}})};dvtm.loadDvtResources=
function(a,b){if("undefined"===typeof dvtm.LOADED_RB[a]){var d=adf.mf.locale.getUserLanguage(),d=adf.mf.locale.generateLocaleList(d,!0);dvtm._loadJavaScriptByLocale(d,function(b){return 0==b.indexOf("en")?a+".js":a+"_"+adf.mf.locale.getJavaLanguage(b)+".js"},function(){return b?b():!0},function(b){dvtm.LOADED_RB[a]=null===b})}};dvtm._loadJavaScriptByLocale=function(a,b,d,e){a=$.merge([],a);dvtm._loadJavaScriptByLocaleImpl(a,b,d,e)};dvtm._loadJavaScriptByLocaleImpl=function(a,b,d,e){if(0==a.length)e(null);
else{var g=a.pop(),h=b(g);amx.includeJs(h).isResolved()&&d(g)?e(g):dvtm._loadJavaScriptByLocaleImpl(a,b,d,e)}};dvtm.isSvgAvailable=function(){return 0>DvtAgent.getAgent().getName().indexOf("android 2")};dvtm.loadCanvasToolkitJs=function(){if(!dvtm.canvasRendererLoaded){var a=amx.includeJs("js/toolkit/DvtCanvasToolkit.js");dvtm.canvasRendererLoaded=a.isResolved()}};dvtm.setupLegendDiv=function(a,b){var d=$('<div class="dvtm-legend" style="display:none;"></div>');b.append(d);d=$('<div class="dvtm-legendTitle" style="display:none;"></div>');
b.append(d);d=$('<div class="dvtm-legendSectionTitle" style="display:none;"></div>');b.append(d)};dvtm.setLegendProperties=function(a,b){var d=a._optionsObj,e=a._dataObj,g;g=b.getAttribute("rendered");void 0!==g&&g!==d.legend.rendered&&(d.legend.rendered=g,dvtm.setOptionsDirty(a,!0));g=b.getAttribute("position");void 0!==g&&g!==d.legend.position&&("none"===g&&!amx.isValueFalse(b.getAttribute("rendered"))?d.legend.rendered=!1:d.legend.position=g,dvtm.setOptionsDirty(a,!0));g=b.getAttribute("scrolling");
void 0!==g&&g!==d.legend.scrolling&&(d.legend.scrolling=g,dvtm.setOptionsDirty(a,!0));g=b.getAttribute("titleHalign");void 0!==g&&g!==d.legend.titleHalign&&(d.legend.titleHalign=g,dvtm.setOptionsDirty(a,!0));g=b.getAttribute("sectionTitleHalign");void 0!==g&&g!==d.legend.sectionTitleHalign&&(d.legend.sectionTitleHalign=g,dvtm.setOptionsDirty(a,!0));(g=b.getAttribute("title"))&&(e.legend.title=g);(g=b.getAttribute("referenceObjectTitle"))&&(e.legend.referenceObjectTitle=g)};dvtm.getComponentWidth=
function(a,b){var d=a.get(0).getAttribute("_computedwidth");if(!d||1>d)d=a.width();1>d&&(d=a.parent().width());var e=dvtm.DEFAULT_COMPONENT_SIZES[b.getTag().getName()];e?1>d?d=e.width:e["max-width"]&&d>e["max-width"]&&(d=e["max-width"]):1>d&&(d=dvtm.DEFAULT_CHART_WIDTH);a.get(0).setAttribute("_computedwidth",d);return d};dvtm.getComponentHeight=function(a,b){var d=a.get(0),e=+d.getAttribute("_computedheight");if(!e||1>e)(e=+d.getAttribute("_userheight"))||(e=0);if(1>e){for(var e=a.parent().height(),
g=+d.getAttribute("_relativeheight"),h=g,k=a.parent().children(),m=d.id,n=0;n<k.length;n++)if(m!==k[n].id){var o=$(k[n]),q=k[n].getAttribute("_relativeheight");if(1>o.height()||q){q=+q;if(!q||0>=q)q=+dvtm._parseStyleSize(k[n].style.height,!0);h+=q;e+=o.height()}e-=o.outerHeight(!0)}e*=g/h}(g=dvtm.DEFAULT_COMPONENT_SIZES[b.getTag().getName()])&&(1>e?e=g.height:g["max-height"]&&e>g["max-height"]&&(e=g["max-height"]));1>e&&(e=dvtm.DEFAULT_CHART_HEIGHT);d.setAttribute("_computedheight",e);a.height(e);
return e};dvtm._parseStyleSize=function(a,b){if(a){var d=a.indexOf(b?"%":"px");if(-1<d&&(a=a.substring(0,d),d=parseInt(a),0<d))return d}return b?100:0};dvtm._getComputedStyle=function(a){return window.getComputedStyle(a,null)};dvtm.buildCssStyleString=function(a){var b={},d="",a=dvtm._getComputedStyle(a);a["font-family"]&&(b.fontFamily=a["font-family"],d+="font-family: "+b.fontFamily+";");a["font-size"]&&(b.fontSize=a["font-size"],d+="font-size: "+b.fontSize+";");a["font-weight"]&&(b.fontWeight=a["font-weight"],
d+="font-weight: "+b.fontWeight+";");a.color&&(b.color=a.color,d+="color: "+b.color+";");a["font-style"]&&(b.fontStyle=a["font-style"],d+="font-style: "+b.fontStyle+";");return d};dvtm.initDvtmComponent=function(a,b,d){var e=a.get(0),g=dvtm._parseStyleSize(e.style.height),h=dvtm._parseStyleSize(e.style.width);if(0<g)e.setAttribute("_userheight",g);else{var k=dvtm._parseStyleSize(e.style.height,!0);e.setAttribute("_relativeheight",k)}a.height(0);if(0==h||0==g)a.resize(b,function(){a.get(0).removeAttribute("_computedheight");
a.get(0).removeAttribute("_computedwidth");a.height(0);adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.component","resize","Re-rendering component due to a node resize event.");d(a,b)}),dvtm.addResizeCallback(b.getId(),function(){var b=e.getAttribute("_computedheight"),d=e.getAttribute("_computedwidth");e.removeAttribute("_computedheight");e.removeAttribute("_computedwidth");a.height(0);return{oldwidth:d,oldheight:b}},function(e){var g=dvtm.getComponentHeight(a,b),h=e.oldheight,k=dvtm.getComponentWidth(a,
b),e=e.oldwidth;if(g!=h||k!=e)adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.component","postResizeCallback","Re-rendering component due to a window resize event."),d(a,b)})};dvtm.setCssBasedLegendProperties=function(a,b){var d=b._optionsObj;b.getId().replace(/\:/g,"\\:");var e=a.querySelector(".dvtm-legend"),g=dvtm._getComputedStyle(e);g["background-color"]&&(d.legend.backgroundColor=g["background-color"]);"0px"!=g["border-top-width"]&&g["border-top-color"]&&(d.legend.borderColor=g["border-top-color"]);
e=this.buildCssStyleString(e);d.legend.textStyle=e;e=this.buildCssStyleString(a.querySelector(".dvtm-legendTitle"));d.legend.titleStyle=e;e=this.buildCssStyleString(a.querySelector(".dvtm-legendSectionTitle"));d.legend.sectionTitleStyle=e};dvtm.processAttributeGroup=function(a,b,d,e){for(var a=a._attributeGroups,e=d.isAttributeDefined("id")?d.getAttribute("id"):"__"+e,g=0,g=0;g<a.length&&!(a[g].id===e);g++);g>=a.length?(e={id:e,type:d.getAttribute("type"),items:[]},a.push(e)):e=a[g];g=e.items;for(a=
a=0;a<g.length&&!(g[a].value===d.getAttribute("value"));a++);a>=g.length&&(g={value:d.getAttribute("value")},void 0!=d.isAttributeDefined("label")&&(g.label=d.getAttribute("label")),e.items.push(g));b.attrGroups.push({attrGroup:e,valueIndex:a})};dvtm.processLegendNode=function(a,b){dvtm.setLegendProperties(a,b);for(var d=b.getChildren(),e=0;e<d.length;e++)"legendSection"===d[e].getTag().getName()&&dvtm.processLegendSection(a,d[e])};dvtm.processLegendSection=function(a,b){var d=a._dataObj,e=a._attributeGroups,
g,h;if(b.isAttributeDefined("source")){g=b.getAttribute("source");var k;for(k=0;k<e.length;k++)if(e[k].id===g){h=e[k];break}if(!(k>=e.length)){e={title:b.getAttribute("title"),items:[]};for(g=0;g<h.items.length;g++){k=dvtm.getAttributeFromGroup(a,"color",h,g);var m=dvtm.getAttributeFromGroup(a,"shape",h,g),n={id:h.items[g].value};n.text=void 0!=h.items[g].label?h.items[g].label:n.id;k&&(n.color=k);m&&(n.markerShape=m);e.items.push(n)}void 0==d.legend.sections&&(d.legend.sections=[]);d.legend.sections.push(e)}}};
dvtm.getAttributeFromGroup=function(a,b,d,e){if(0<=d.type.indexOf(b)){switch(b){case "shape":b="shapes";break;case "color":b="colors";break;default:b=null}if(b&&a._optionsObj&&a._optionsObj.styleDefaults&&(a=a._optionsObj.styleDefaults[b],void 0!=a&&-1<e&&0<a.length))return a[e%a.length]}return null};dvtm.isSparkChart=function(a){return"sparkChart"===a.getTag().getName()?!0:!1};dvtm.isGauge=function(a){a=a.getTag().getName();return"ledGauge"===a||"statusMeterGauge"===a||"dialGauge"===a||"ratingGauge"===
a?!0:!1};dvtm.isDialGauge=function(a){return"dialGauge"===a.getTag().getName()?!0:!1};dvtm.isStatusMeterGauge=function(a){return"statusMeterGauge"===a.getTag().getName()?!0:!1};dvtm.isRatingGauge=function(a){return"ratingGauge"===a.getTag().getName()?!0:!1};dvtm.dumpObj=function(a,b,d,e){void 0===d&&(d="");void 0===e&&(e=0);if(5<e)return d+b+": <max dump depth exceeded!>\n";if("object"==typeof a){var g=null,b=d+b+": {\n",d=d+"    ",h;for(h in a){try{g=a[h]}catch(k){g="<unable to evaluate>"}"object"==
typeof g?b+=dvtm.dumpObj(g,h,d,e+1):("string"==typeof g?g='"'+g+'"':null==g&&(g="<null>"),b+=d+h+": "+g+"\n")}return b+d+"}\n"}return a};dvtm.setOptionsDirty=function(a,b){a._optionsDirty=b};dvtm.isOptionsDirty=function(a){return a._optionsDirty};dvtm.dataLayerRenderer={create:function(a){var b="",b='id="'+a.getId()+'"';return $("<div "+b+' style="width: 100%; height: 100%;"></div>')},init:function(){},createChildrenNodes:function(a){return dvtm.createDataLayerChildrenNodes(a)},visitChildren:function(a,
b,d){return dvtm.visitDataLayerChildrenNodes(a,b,d)},updateChildren:function(a,b){return dvtm.updateDataLayerChildrenNodes(a,b)},getDescendentChangeAction:function(a){return dvtm._isDirectChildOfGeographicMap(a)?adf.mf.api.amx.AmxNodeChangeResult.REFRESH:adf.mf.api.amx.AmxNodeChangeResult.RERENDER},refresh:function(a,b){return dvtm.refreshDataLayer(a,b)}};dvtm.createDataLayerChildrenNodes=function(a){a._currentRowKeys=[];var b=a.getAttribute("value");if(void 0===b){if(a.isAttributeDefined("value"))return a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL),
!0;for(var d=a.getTag().getChildren(),e=0;e<d.length;e++)b=d[e].buildAmxNode(a),a._currentRowKeys.push(""+(e+1)),a.addChild(b);a.setState(adf.mf.api.amx.AmxNodeStates.ABLE_TO_RENDER);return!0}if(null==b)return!0;d=a.getAttribute("var");e=adf.mf.api.amx.createIterator(b);if(e.getTotalCount()>e.getAvailableCount())return adf.mf.api.amx.showLoadingIndicator(),adf.mf.api.amx.bulkLoadProviders(b,0,-1,function(){try{adf.mf.internal.amx.markNodeForUpdate(a,{value:!0})}finally{adf.mf.api.amx.hideLoadingIndicator()}},
function(){adf.mf.api.adf.logInfoResource("AMXInfoMessageBundle",adf.mf.log.level.SEVERE,"createChildrenNodes","MSG_ITERATOR_FIRST_NEXT_ERROR",req,resp);adf.mf.api.amx.hideLoadingIndicator()}),a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL),!0;for(;e.hasNext();)b=e.next(),a._currentRowKeys.push(e.getRowKey()),adf.mf.el.addVariable(d,b),a.createStampedChildren(e.getRowKey(),null),adf.mf.el.removeVariable(d);a.setState(adf.mf.api.amx.AmxNodeStates.ABLE_TO_RENDER);return!0};dvtm.visitDataLayerChildrenNodes=
function(a,b,d){var e=a.getAttribute("value");if(void 0===e&&!a.isAttributeDefined("value")){a=a.getChildren();for(e=0;e<a.length;e++)a[e].visit(b,d);return!0}for(var e=adf.mf.api.amx.createIterator(e),g=a.getAttribute("var");e.hasNext();){var h=e.next();adf.mf.el.addVariable(g,h);try{if(a.visitStampedChildren(e.getRowKey(),null,null,b,d))return!0}finally{adf.mf.el.removeVariable(g)}}return!1};dvtm.updateDataLayerChildrenNodes=function(a,b){if(b.hasChanged("value")){var d,e,g,h=a.getAttribute("value");
if(h&&(d=adf.mf.api.amx.createIterator(h),d.getTotalCount()>d.getAvailableCount()))return adf.mf.api.amx.showLoadingIndicator(),adf.mf.api.amx.bulkLoadProviders(h,0,-1,function(){try{adf.mf.internal.amx.markNodeForUpdate(a,{value:!0})}finally{adf.mf.api.amx.hideLoadingIndicator()}},function(){adf.mf.api.adf.logInfoResource("AMXInfoMessageBundle",adf.mf.log.level.SEVERE,"updateChildrenNodes","MSG_ITERATOR_FIRST_NEXT_ERROR",req,resp);adf.mf.api.amx.hideLoadingIndicator()}),adf.mf.api.amx.AmxNodeChangeResult.NONE;
if(void 0!=a._currentRowKeys)for(e=0;e<a._currentRowKeys.length;e++){d=a.getChildren(null,a._currentRowKeys[e]);for(g=d.length-1;0<=g;g--)a.removeChild(d[g])}a._currentRowKeys=[];if(h){e=a.getAttribute("var");for(d=adf.mf.api.amx.createIterator(h);d.hasNext();)h=d.next(),a._currentRowKeys.push(d.getRowKey()),adf.mf.el.addVariable(e,h),a.createStampedChildren(d.getRowKey(),null),adf.mf.el.removeVariable(e)}}return dvtm._isDirectChildOfGeographicMap(a)?adf.mf.api.amx.AmxNodeChangeResult.REFRESH:adf.mf.api.amx.AmxNodeChangeResult.RERENDER};
dvtm.refreshDataLayer=function(a,b){var d=a.getParent(),e=d.getTypeHandler();e&&e.refreshDataLayer&&e.refreshDataLayer(d,a,b)};dvtm.findDataLayerNodeById=function(a,b){for(var d=a.getChildren(),e=adf.mf.api.amx.createIterator(d),g;e.hasNext();)if(g=e.next(),g.getId()==b)return g;for(e=adf.mf.api.amx.createIterator(d);e.hasNext();)if(g=e.next(),d=dvtm.findDataLayerNodeById(g,b))return d;return null};dvtm.findDataLayerIdByIndex=function(a,b){if(null!=a&&null!=b){var d=a._dataObj.dataLayers;if(d)for(var e=
0;e<d.length;e++){var g=d[e];if(g.idx==b)return g.id}}return null};dvtm._isDirectChildOfGeographicMap=function(a){return(a=a.getParent())&&"geographicMap"==a.getTag().getName()?!0:!1};dvtm.isAncestor=function(a,b){for(var d=b.parentNode;d;){if(d==a)return!0;d=d.parentNode}return!1};dvtm.processPercetageAttribute=function(a){var b=1,d=!1;if(void 0!==a&&null!==a)if(a=a.replace(/(^\s*)|(\s*$)/g,""),b=a.length-1,"%"===a.charAt(b)&&(d=!0,a=a.substr(0,b)),b=parseFloat(a),isNaN(b))b=1;else if(d&&(b/=100),
0>b||1<b)b=1;return b};dvtm.getValueByKeyWithDefault=function(a,b,d){var e=void 0;a&&b&&(e=a[b]);void 0===e&&(e=d);return e};dvtm.isSkyros=function(){for(var a=adf.mf.environment.profile.cssResources,b=0;b<a.length;b++)if(0<a[b].indexOf("Fusion"))return!0;return!1};dvtm.isAlta=function(){for(var a=adf.mf.environment.profile.cssResources,b=0;b<a.length;b++)if(0<a[b].indexOf("Alta"))return!0;return!1};dvtm.exception={};dvtm.exception.DvtmException=function(a){this.name="DvtmException";this.message=
a||""};dvtm.exception.DvtmException.prototype=Error();dvtm.exception.NodeNotReadyToRenderException=function(a){this.name="NodeNotReadyToRenderException";this.message=a||"Node not ready to render"};dvtm.exception.NodeNotReadyToRenderException.prototype=Error()})();
(function(){dvtm.DefaultChartStyle={};dvtm.DefaultChartStyle.VERSION_1={chart:{emptyText:null,animationOnDataChange:"none",animationOnDisplay:"none",timeAxisType:"disabled"},titleSeparator:{upperColor:"#74779A",lowerColor:"#FFFFFF",rendered:!1},legend:{position:"auto"},styleDefaults:{colors:"#003366,#CC3300,#666699,#006666,#FF9900,#993366,#99CC33,#624390,#669933,#FFCC33,#006699,#EBEA79".split(","),shapes:"circle,square,plus,diamond,triangleUp,triangleDown,human".split(","),seriesEffect:"gradient",
animationDuration:1E3,animationIndicators:"all",animationUpColor:"#0099FF",animationDownColor:"#FF3300",lineWidth:3,lineStyle:"solid",markerDisplayed:!1,markerColor:null,markerShape:"auto",markerSize:8,pieFeelerColor:"#BAC5D6",sliceLabel:{position:"outside",textType:"percent"}}};dvtm.DefaultChartStyle.SKIN_ALTA={titleSeparator:{upperColor:"#74779A",lowerColor:"#FFFFFF",rendered:!1},styleDefaults:{colors:"#267db3,#68c182,#fad55c,#ed6647,#8561c8,#6ddbdb,#ffb54d,#e371b2,#47bdef,#a2bf39,#a75dba,#f7f37b".split(","),
shapes:"circle,square,diamond,plus,triangleUp,triangleDown,human".split(","),seriesEffect:"color"}};dvtm.DEFAULT_AREA_DATA={groups:["Group A","Group B","Group C","Group D"],series:[{name:"Series 1",data:[74,42,70,46]},{name:"Series 2",data:[50,58,46,54]},{name:"Series 3",data:[34,22,30,32]},{name:"Series 4",data:[18,6,14,22]}]};dvtm.DEFAULT_BAR_DATA={groups:["Group A","Group B"],series:[{name:"Series 1",data:[42,34]},{name:"Series 2",data:[55,30]},{name:"Series 3",data:[36,50]},{name:"Series 4",data:[22,
46]},{name:"Series 5",data:[22,46]}]};dvtm.DEFAULT_LINE_DATA={groups:["Group A","Group B","Group C","Group D","Group E"],series:[{name:"Series 1",data:[74,62,70,76,66]},{name:"Series 2",data:[50,38,46,54,42]},{name:"Series 3",data:[34,22,30,32,26]},{name:"Series 4",data:[18,6,14,22,10]},{name:"Series 5",data:[3,2,3,3,2]}]};dvtm.DEFAULT_BUBBLE_DATA={groups:["Group A","Group B","Group C"],series:[{name:"Series 1",data:[{x:15,y:25,z:5},{x:25,y:30,z:12},{x:25,y:45,z:12}]},{name:"Series 2",data:[{x:15,
y:15,z:8},{x:20,y:35,z:14},{x:40,y:55,z:35}]},{name:"Series 3",data:[{x:10,y:10,z:8},{x:18,y:55,z:10},{x:40,y:50,z:18}]},{name:"Series 4",data:[{x:8,y:20,z:6},{x:11,y:30,z:8},{x:30,y:40,z:15}]}]};dvtm.DEFAULT_SCATTER_DATA={groups:["Group A","Group B","Group C"],series:[{name:"Series 1",data:[{x:15,y:15},{x:25,y:43},{x:25,y:25}]},{name:"Series 2",data:[{x:25,y:15},{x:55,y:45},{x:57,y:47}]},{name:"Series 3",data:[{x:17,y:36},{x:32,y:52},{x:26,y:28}]},{name:"Series 4",data:[{x:38,y:22},{x:43,y:43},{x:58,
y:36}]}]};dvtm.DEFAULT_PIE_DATA={groups:[""],series:[{id:"Series 1",name:"Series 1",data:[42]},{id:"Series 2",name:"Series 2",data:[55]},{id:"Series 3",name:"Series 3",data:[36]},{id:"Series 4",name:"Series 4",data:[22]},{id:"Series 5",name:"Series 5",data:[22]}]};dvtm.DEFAULT_SPARK_DATA=[20,25,15,10,18,15,20,15,25,30,20,18,25,28,30];dvtm.DEFAULT_SPARK_OPTIONS={type:"line",color:"#00FF00"};dvtm.DEFAULT_COMBO_DATA=dvtm.DEFAULT_BAR_DATA})();
(function(){dvtm.CommonChart=function(a){this._chartType=a};dvtm.CommonChart.prototype.createChildrenNodes=function(a){return dvtm.createChartChildrenNodes(a)};dvtm.CommonChart.prototype.visitChildren=function(a,b,d){return dvtm.visitChartChildrenNodes(a,b,d)};dvtm.CommonChart.prototype.create=function(a){return dvtm.createCommonChart(a,this._chartType)};dvtm.CommonChart.prototype.init=function(a,b){dvtm.initChartDomNode(a,b)};dvtm.CommonChart.prototype.postDisplay=function(a,b){dvtm.renderChart(a,
b)};dvtm.CommonChart.prototype.updateChildren=function(a,b){return dvtm.updateChildrenNodes(a,b)};dvtm.CommonChart.prototype.refresh=function(a,b){return dvtm.refreshChart(a,b)};dvtm.CommonChart.prototype.destroy=function(a,b){dvtm.destroyChartDomNode(a,b)};amx.registerRenderers("dvtm",{areaChart:new dvtm.CommonChart("area"),barChart:new dvtm.CommonChart("bar"),bubbleChart:new dvtm.CommonChart("bubble"),comboChart:new dvtm.CommonChart("combo"),horizontalBarChart:new dvtm.CommonChart("horizontalBar"),
lineChart:new dvtm.CommonChart("line"),pieChart:new dvtm.CommonChart("pie"),scatterChart:new dvtm.CommonChart("scatter")});dvtm.createChartChildrenNodes=function(a){a._currentRowKeys=[];if(!amx.dtmode){a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL);if(!a.isAttributeDefined("value"))return!0;var b=a.getAttribute("value");if(void 0===b||null===b)return!0;var d=a.getAttribute("var"),e=adf.mf.api.amx.createIterator(b);if(e.getTotalCount()>e.getAvailableCount())return adf.mf.api.amx.showLoadingIndicator(),
adf.mf.api.amx.bulkLoadProviders(b,0,-1,function(){try{adf.mf.internal.amx.markNodeForUpdate(a,{value:!0})}finally{adf.mf.api.amx.hideLoadingIndicator()}},function(){adf.mf.api.adf.logInfoResource("AMXInfoMessageBundle",adf.mf.log.level.SEVERE,"createChildrenNodes","MSG_ITERATOR_FIRST_NEXT_ERROR",req,resp);adf.mf.api.amx.hideLoadingIndicator()}),a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL),!0;for(b=["dataStamp","seriesStamp"];e.hasNext();){var g=e.next();a._currentRowKeys.push(e.getRowKey());
adf.mf.el.addVariable(d,g);a.createStampedChildren(e.getRowKey(),b);adf.mf.el.removeVariable(d)}}d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"legend");0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d));dvtm.isPieChart(a)?(d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"pieValueFormat"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"sliceLabel")):(d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"xAxis"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),
d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"yAxis"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"y2Axis"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"xFormat"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"yFormat"),0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"y2Format"),0<d.length&&(d=d[0].buildAmxNode(a),
a.addChild(d)),d=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,"zFormat"));0<d.length&&(d=d[0].buildAmxNode(a),a.addChild(d));a.setState(adf.mf.api.amx.AmxNodeStates.ABLE_TO_RENDER);return!0};dvtm.visitChartChildrenNodes=function(a,b,d){for(var e=a.getChildren(),g=0;g<e.length;g++)e[g].visit(b,d);var h=a.getAttribute("value");if(void 0===h)return a.visitStampedChildren(null,null,null,b,d);e=["dataStamp","seriesStamp"];g=a.getAttribute("var");for(h=adf.mf.api.amx.createIterator(h);h.hasNext();){var k=
h.next();adf.mf.el.addVariable(g,k);try{if(a.visitStampedChildren(h.getRowKey(),e,null,b,d))return!0}finally{adf.mf.el.removeVariable(g)}}return!1};dvtm.updateChildrenNodes=function(a,b){if(b.hasChanged("inlineStyle"))return adf.mf.api.amx.AmxNodeChangeResult.REPLACE;if(b.hasChanged("value")){var d,e,g,h=a.getAttribute("value");if(void 0===h||null===h)return adf.mf.api.amx.AmxNodeChangeResult.REPLACE;d=adf.mf.api.amx.createIterator(h);if(d.getTotalCount()>d.getAvailableCount())return adf.mf.api.amx.showLoadingIndicator(),
adf.mf.api.amx.bulkLoadProviders(h,0,-1,function(){try{adf.mf.internal.amx.markNodeForUpdate(a,{value:!0})}finally{adf.mf.api.amx.hideLoadingIndicator()}},function(){adf.mf.api.adf.logInfoResource("AMXInfoMessageBundle",adf.mf.log.level.SEVERE,"updateChildren","MSG_ITERATOR_FIRST_NEXT_ERROR",req,resp);adf.mf.api.amx.hideLoadingIndicator()}),a._waitingForData=!0,adf.mf.api.amx.AmxNodeChangeResult.REFRESH;if(void 0!=a._currentRowKeys)for(e=0;e<a._currentRowKeys.length;e++){d=a.getChildren("dataStamp",
a._currentRowKeys[e]);for(g=d.length-1;0<=g;g--)a.removeChild(d[g]);d=a.getChildren("seriesStamp",a._currentRowKeys[e]);for(g=d.length-1;0<=g;g--)a.removeChild(d[g])}a._currentRowKeys=[];e=["dataStamp","seriesStamp"];if(h=a.getAttribute("value")){g=a.getAttribute("var");for(d=adf.mf.api.amx.createIterator(h);d.hasNext();)h=d.next(),a._currentRowKeys.push(d.getRowKey()),adf.mf.el.addVariable(g,h),a.createStampedChildren(d.getRowKey(),e),adf.mf.el.removeVariable(g)}}return adf.mf.api.amx.AmxNodeChangeResult.REFRESH};
dvtm.createCommonChart=function(a,b){dvtm.initChartAmxNode(a);dvtm.setChartType(a,b);dvtm.setCommonChartProperties(a);var d=dvtm.setupChartDiv(a);if(!amx.dtmode&&!a.isAttributeDefined("value"))return d;try{dvtm.isPieChart(a)?dvtm.processPieChildTags(a):dvtm.processChildTags(a)}catch(e){d._readyToRender=!1,e instanceof dvtm.exception.NodeNotReadyToRenderException?adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.chart","createCommonChart",e):adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.chart",
"createCommonChart","Exception: "+e.message)}return d};dvtm.refreshChart=function(a,b){if(void 0!==a._waitingForData&&a._waitingForData)a._waitingForData=!1;else{var d=$(document.getElementById(a.getId()));d._readyToRender=!0;dvtm.initChartAmxNodeForRefresh(a,b);dvtm.setCommonChartProperties(a);try{dvtm.isPieChart(a)?dvtm.processPieChildTags(a):dvtm.isSparkChart(a)?dvtm.processSparkChildTags(a):dvtm.processChildTags(a),dvtm.renderChart(d,a)}catch(e){d._readyToRender=!1,e instanceof dvtm.exception.NodeNotReadyToRenderException?
adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.chart","refreshChart",e):adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.chart","refreshChart","Exception: "+e.message)}}};dvtm.processAxisNode=function(a,b,d){var e=b.getChildren(),g=!1,h=!1,k=!1,m=!1;dvtm.setAxisProperties(a,b,d);for(b=0;b<e.length;b++)switch(e[b].getTag().getName()){case "referenceObject":dvtm.processReferenceObj(a,e[b],d);break;case "tickLabel":g||(dvtm.processTickLabel(a,e[b],d),g=!0);break;case "axisLine":h||(dvtm.processAxisLine(a,
e[b],d),h=!0);break;case "majorTick":k||(dvtm.processTick(a,e[b],d,!0),k=!0);break;case "minorTick":m||(dvtm.processTick(a,e[b],d,!1),m=!0)}};dvtm.processFormatNode=function(a,b,d){switch(d){case "xFormat":a=a._optionsObj.styleDefaults.x1Format;break;case "yFormat":a=a._optionsObj.styleDefaults.y1Format;break;case "y2Format":a=a._optionsObj.styleDefaults.y2Format;break;case "zFormat":a=a._optionsObj.styleDefaults.zFormat;break;default:return}(b=b.getConverter())&&(a.converter=b)};dvtm.processSimpleChildTags=
function(a){for(var b=!1,d=!1,e=!1,g=!1,h=!1,k=!1,m=!1,n=!1,o=a.getChildren(),q=0;q<o.length;q++)switch(o[q].getTag().getName()){case "legend":b||(dvtm.processLegendNode(a,o[q]),b=!0);break;case "xAxis":d||(dvtm.processAxisNode(a,o[q],"xAxis"),d=!0);break;case "yAxis":e||(dvtm.processAxisNode(a,o[q],"yAxis"),e=!0);break;case "y2Axis":g||(dvtm.processAxisNode(a,o[q],"y2Axis"),g=!0);break;case "xFormat":h||(dvtm.processFormatNode(a,o[q],"xFormat"),h=!0);break;case "yFormat":k||(dvtm.processFormatNode(a,
o[q],"yFormat"),k=!0);break;case "y2Format":m||(dvtm.processFormatNode(a,o[q],"y2Format"),m=!0);break;case "zFormat":n||(dvtm.processFormatNode(a,o[q],"zFormat"),n=!0)}};dvtm.processDataStamp=function(a){var b=a.getAttribute("var"),d=a.getAttribute("value");if(a.getTag().getChildFacetTag("dataStamp"))for(d=adf.mf.api.amx.createIterator(d);d.hasNext();){var e=d.next();adf.mf.el.addVariable(b,e);for(var g=a.getChildren("dataStamp",d.getRowKey()),g=adf.mf.api.amx.createIterator(g);g.hasNext();){var h=
g.next();if(!h.isAttributeDefined("rendered")||!amx.isValueFalse(h.getAttribute("rendered"))){if(!h.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;var k=dvtm.processMarker(a,h,e);if(null!=k)for(var m=h.getChildren(),h=0,m=adf.mf.api.amx.createIterator(m);m.hasNext();){var n=m.next();if(!n.isAttributeDefined("rendered")||!amx.isValueFalse(n.getAttribute("rendered"))){if(!n.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;dvtm.processAttributeGroup(a,k,n,h);h++}}}}adf.mf.el.removeVariable(b)}};
dvtm.processSeriesStamp=function(a){var b=a.getAttribute("var"),d=a.getAttribute("value"),e=dvtm.getChartType(a);if(("area"===e||"bar"===e||"combo"===e||"horizontalBar"===e||"line"===e)&&a.getTag().getChildFacetTag("seriesStamp")&&void 0!==b)for(d=adf.mf.api.amx.createIterator(d);d.hasNext();){e=d.next();adf.mf.el.addVariable(b,e);e=a.getChildren("seriesStamp",d.getRowKey());for(e=adf.mf.api.amx.createIterator(e);e.hasNext();){var g=e.next();if("seriesStyle"===g.getTag().getName()&&(!g.isAttributeDefined("rendered")||
!amx.isValueFalse(g.getAttribute("rendered")))){if(!g.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;dvtm.processSeriesStyle(a,g)}}adf.mf.el.removeVariable(b)}};dvtm.processChildTags=function(a){var b=dvtm.getChartType(a),d=a._dataObj;if(amx.dtmode){switch(b){case "area":d.groups=dvtm.DEFAULT_AREA_DATA.groups;d.series=dvtm.DEFAULT_AREA_DATA.series;break;case "bar":d.groups=dvtm.DEFAULT_BAR_DATA.groups;d.series=dvtm.DEFAULT_BAR_DATA.series;break;case "bubble":d.groups=dvtm.DEFAULT_BUBBLE_DATA.groups;
d.series=dvtm.DEFAULT_BUBBLE_DATA.series;break;case "combo":d.groups=dvtm.DEFAULT_COMBO_DATA.groups;d.series=dvtm.DEFAULT_COMBO_DATA.series;break;case "horizontalBar":d.groups=dvtm.DEFAULT_BAR_DATA.groups;d.series=dvtm.DEFAULT_BAR_DATA.series;break;case "line":d.groups=dvtm.DEFAULT_LINE_DATA.groups;d.series=dvtm.DEFAULT_LINE_DATA.series;break;case "scatter":d.groups=dvtm.DEFAULT_SCATTER_DATA.groups,d.series=dvtm.DEFAULT_SCATTER_DATA.series}dvtm.processSimpleChildTags(a)}else{adf.mf.internal.perf.start("dvtm.processChildTags",
a.getTag().getName());if(!a._refreshing||a._attributeChanges.hasChanged("value"))dvtm.processDataStamp(a),dvtm.applyMarkersToModel(a),dvtm.processSeriesStamp(a);dvtm.processSimpleChildTags(a);adf.mf.internal.perf.stop("dvtm.processChildTags",a.getTag().getName())}};dvtm.processPieChildTags=function(a){var b=a._optionsObj,d=a._dataObj,e=a.getAttribute("value"),g=a.getAttribute("var"),h;h=a.getAttribute("threeDEffect");void 0!==h&&h!==b.styleDefaults.threeDEffect&&(b.styleDefaults.threeDEffect=h,dvtm.setOptionsDirty(a,
!0));h=a.getAttribute("otherThreshold");void 0!==h&&h!==b.chart.otherThreshold&&(b.chart.otherThreshold=dvtm.processPercetageAttribute(h),dvtm.setOptionsDirty(a,!0));h=a.getAttribute("otherColor");void 0!==h&&h!==b.styleDefaults.otherColor&&(b.styleDefaults.otherColor=h,dvtm.setOptionsDirty(a,!0));h=a.getAttribute("sorting");void 0!==h&&h!==b.chart.sorting&&(b.chart.sorting=h,dvtm.setOptionsDirty(a,!0));for(var b=a.getChildren(),k=h=!1,m=!1,n=0;n<b.length;n++)switch(b[n].getTag().getName()){case "sliceLabel":h||
(dvtm.processSliceLabel(a,b[n]),h=!0);break;case "pieValueFormat":k||(dvtm.processPieValueFormat(a,b[n]),k=!0);break;case "legend":m||(dvtm.processLegendNode(a,b[n]),m=!0)}if(amx.dtmode)d.groups=dvtm.DEFAULT_PIE_DATA.groups,d.series=dvtm.DEFAULT_PIE_DATA.series;else if(void 0!=e&&a.getTag().getChildFacetTag("dataStamp")){adf.mf.internal.perf.start("dvtm.processPieChildTags",a.getTag().getName());if(!a._refreshing||a._attributeChanges.hasChanged("value")){d.groups.push("");for(d=adf.mf.api.amx.createIterator(e);d.hasNext();){e=
d.next();adf.mf.el.addVariable(g,e);b=a.getChildren("dataStamp",d.getRowKey());for(b=adf.mf.api.amx.createIterator(b);b.hasNext();)if(h=b.next(),!h.isAttributeDefined("rendered")||!amx.isValueFalse(h.getAttribute("rendered"))){if(!h.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;var k=h.isAttributeDefined("sliceId")?h.getAttribute("sliceId"):h.getAttribute("label"),m=h.getAttribute("value"),o;if(h.isAttributeDefined("action"))o=h.getAttribute("action");else{var q=!1,n=h.getTag().findTags(dvtm.AMX_NAMESPACE,
"setPropertyListener");0<n.length?q=!0:(n=h.getTag().findTags(dvtm.AMX_NAMESPACE,"showPopupBehavior"),0<n.length&&(q=!0));q&&(o=e.rowKey())}n={};n.y=+m;void 0!=o&&(n.action=o);n.id=h.getId();k={id:k,name:h.getAttribute("label"),data:[n]};h.isAttributeDefined("explode")&&(k.pieSliceExplode=h.getAttribute("explode"));h.isAttributeDefined("color")&&(k.color=h.getAttribute("color"));dvtm.addSeriesItem(a,k);a._rowKeyCache[n.id]=e.rowKey()}adf.mf.el.removeVariable(g)}}adf.mf.internal.perf.stop("dvtm.processPieChildTags",
a.getTag().getName())}};dvtm.processSparkDummyData=function(a){void 0==a._dataObj.items&&(a._dataObj.items=[]);if(void 0==a._optionsObj.type||0==a._optionsObj.type.indexOf("#{"))a._optionsObj.type=dvtm.DEFAULT_SPARK_OPTIONS.type;if(void 0==a._optionsObj.color||0==a._optionsObj.color.indexOf("#{"))a._optionsObj.color=dvtm.DEFAULT_SPARK_OPTIONS.color;for(var a=a._dataObj.items,b=adf.mf.api.amx.createIterator(dvtm.DEFAULT_SPARK_DATA);b.hasNext();){var d={markerDisplayed:!1,rendered:!0};d.value=b.next();
a.push(d)}};dvtm.processSparkChildTags=function(a){var b=a.getAttribute("var"),d=a.getAttribute("value"),e;adf.mf.internal.perf.start("dvtm.processSparkChildTags",a.getTag().getName());e=a.getChildren();for(e=adf.mf.api.amx.createIterator(e);e.hasNext();){var g=e.next();"referenceObject"===g.getTag().getName()&&dvtm.processReferenceObj(a,g,"spark")}if(!a._refreshing||a._attributeChanges.hasChanged("value")){if(!a.isAttributeDefined("value")||!a.getTag().getChildFacetTag("dataStamp"))return;for(e=
adf.mf.api.amx.createIterator(d);e.hasNext();){d=e.next();adf.mf.el.addVariable(b,d);d=a.getChildren("dataStamp",e.getRowKey());for(d=adf.mf.api.amx.createIterator(d);d.hasNext();)if(g=d.next(),!g.isAttributeDefined("rendered")||!amx.isValueFalse(g.getAttribute("rendered"))){if(!g.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;dvtm.processSparkDataItem(a,g)}adf.mf.el.removeVariable(b)}}adf.mf.internal.perf.stop("dvtm.processSparkChildTags",a.getTag().getName())};dvtm.loadChartResourceBundles=
function(){amx.dtmode||dvtm.loadDvtResources("js/toolkit/resource/DvtChartBundle",function(){return"undefined"!==typeof DvtChartBundle_RB})};dvtm.initChartAmxNode=function(a){a._optionsObj={chart:{},titleSeparator:{rendered:!1},title:{},subtitle:{},footnote:{},legend:{},xAxis:{tickLabel:{},axisLine:{}},yAxis:{tickLabel:{},axisLine:{}},y2Axis:{tickLabel:{},axisLine:{}},styleDefaults:{sliceLabel:{},x1Format:{},y1Format:{},y2Format:{},zFormat:{}}};a._dataObj=a.isAttributeDefined("data")?a.getAttribute("data"):
dvtm.isSparkChart(a)?{items:[],referenceObjects:[]}:{series:[],groups:[],legend:{}};a[dvtm.COMPONENT_INSTANCE]=null;a._attributeGroups=[];a._markers=[];a._rowKeyCache={};a._stylesResolved=!1;dvtm.loadCanvasToolkitJs();dvtm.loadChartResourceBundles()};dvtm.initChartAmxNodeForRefresh=function(a,b){a._refreshing=!0;a._attributeChanges=b;dvtm.setOptionsDirty(a,!1);if(b.hasChanged("value")){a._dataObj=dvtm.isSparkChart(a)?{items:[],referenceObjects:[]}:{series:[],groups:[],legend:{}};a._attributeGroups=
[];a._markers=[];a._rowKeyCache={};var d=a._selection;void 0!==d&&null!==d&&(a._dataObj.selection=d)}};dvtm.initChartDomNode=function(a,b){dvtm.initDvtmComponent(a,b,function(a,b){var g=dvtm.getComponentWidth(a,b),h=dvtm.getComponentHeight(a,b);b[dvtm.COMPONENT_INSTANCE].render(null,g,h)});dvtm.isGauge(b)&&a.tap(function(){if(amx.acceptEvent()){var b=new amx.ActionEvent;amx.processAmxEvent(a,"action",void 0,void 0,b)}})};dvtm.destroyChartDomNode=function(a,b){dvtm.removeResizeCallback(b.getId())};
dvtm.setupChartDiv=function(a){var b="",d=a.getId();void 0!==d&&(b='id="'+d+'"');b=$("<div "+b+' style="width: 100%; height: 100%;"></div>');b._readyToRender=!0;!dvtm.isGauge(a)&&!dvtm.isSparkChart(a)&&(d=$('<div class="dvtm-chartTitle" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartSubtitle" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartFootnote" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartTitleSeparator" style="display:none;"></div>'),
b.append(d));dvtm.setupLegendDiv(a,b);!dvtm.isGauge(a)&&!dvtm.isSparkChart(a)&&(d=$('<div class="dvtm-chartXAxisTitle" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartYAxisTitle" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartY2AxisTitle" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartXAxisTickLabel" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartYAxisTickLabel" style="display:none;"></div>'),b.append(d),d=
$('<div class="dvtm-chartY2AxisTickLabel" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartPieLabel" style="display:none;"></div>'),b.append(d),d=$('<div class="dvtm-chartSliceLabel" style="display:none;"></div>'),b.append(d));if(dvtm.isGauge(a)){var e="dvtm-gaugeMetricLabel",d="dvtm-gaugeTickLabel";"dialGauge"===a.getTag().getName()&&a.isAttributeDefined("background")&&(e+=" dvtm-dialGauge-background-"+a.getAttribute("background"),d+=" dvtm-dialGauge-background-"+a.getAttribute("background"));
e=$('<div class="'+e+'" style="display:none;"></div>');b.append(e);d=$('<div class="'+d+'" style="display:none;"></div>');b.append(d);d=$('<div class="dvtm-gaugePlotArea" style="display:none;"></div>');b.append(d);if(dvtm.isRatingGauge(a)){var a=$('<div class="dvtm-ratingGaugeSelected" style="display:none;"></div>'),d=$('<div class="dvtm-ratingGaugeUnselected" style="display:none;"></div>'),e=$('<div class="dvtm-ratingGaugeHover" style="display:none;"></div>'),g=$('<div class="dvtm-ratingGaugeChanged" style="display:none;"></div>');
b.append(a);b.append(d);b.append(e);b.append(g)}}return b};dvtm.getChartType=function(a){return a._optionsObj.chart.type};dvtm.setChartType=function(a,b){var d=a._optionsObj;void 0==d.chart&&(d.chart={});d.chart.type!==b&&(d.chart.type=b,dvtm.setOptionsDirty(a,!0))};dvtm._getAttributeValue=function(a,b){return void 0!==a.attributes[b]?a.attributes[b].value:void 0};dvtm.setCommonChartProperties=function(a){var b=a._optionsObj,d=a._dataObj;if(!a._refreshing){var e;e=dvtm.isSkyros()?dvtm.DefaultChartStyle.VERSION_1:
DvtJSONUtils.merge(dvtm.DefaultChartStyle.SKIN_ALTA,dvtm.DefaultChartStyle.VERSION_1);e=void 0!=window.CustomChartStyle?DvtJSONUtils.merge(window.CustomChartStyle,e):e;dvtm.setOptionsDirty(a,!0);a._optionsObj=DvtJSONUtils.merge(e,b);b=a._optionsObj}(e=a.getAttribute("title"))&&(d.title=e);e=a.getAttribute("titleHalign");void 0!==e&&e!==b.title.hAlign&&(b.title.hAlign=e,dvtm.setOptionsDirty(a,!0));(e=a.getAttribute("subtitle"))&&(d.subtitle=e);(e=a.getAttribute("footnote"))&&(d.footnote=e);e=a.getAttribute("footnoteHalign");
void 0!==e&&e!==b.footnote.hAlign&&(b.footnote.hAlign=e,dvtm.setOptionsDirty(a,!0));(e=a.getAttribute("timeAxisType"))&&(d.timeAxisType=e);(e=a.getAttribute("shortDesc"))&&(d.shortDesc=e);e=a.getAttribute("animationOnDisplay");void 0!=e&&e!==b.chart.animationOnDisplay&&(dvtm.isSparkChart(a)?b.animationOnDisplay=e:b.chart.animationOnDisplay=e,dvtm.setOptionsDirty(a,!0));e=a.getAttribute("animationOnDataChange");void 0!=e&&e!==b.chart.animationOnDataChange&&(dvtm.isSparkChart(a)?b.animationOnDataChange=
e:b.chart.animationOnDataChange=e,dvtm.setOptionsDirty(a,!0));a.isAttributeDefined("animationDuration")&&(e=1*a.getAttribute("animationDuration"),e!==b.styleDefaults.animationDuration&&(b.styleDefaults.animationDuration=e,dvtm.setOptionsDirty(a,!0)));e=a.getAttribute("animationIndicators");void 0!=e&&e!==b.styleDefaults.animationIndicators&&(b.styleDefaults.animationIndicators=e,dvtm.setOptionsDirty(a,!0));e=a.getAttribute("animationDownColor");void 0!=e&&e!==b.styleDefaults.animationDownColor&&(b.styleDefaults.animationDownColor=
e,dvtm.setOptionsDirty(a,!0));e=a.getAttribute("animationUpColor");void 0!=e&&e!==b.styleDefaults.animationUpColor&&(b.styleDefaults.animationUpColor=e,dvtm.setOptionsDirty(a,!0));amx.dtmode?(b.chart.dataSelection="none",b.chart.hideAndShowBehavior="none",b.chart.rolloverBehavior="none",b.chart.dataCursor="off"):(e=a.getAttribute("dataSelection"),void 0!==e&&e!==b.chart.dataSelection&&(b.chart.dataSelection=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("hideAndShowBehavior"),void 0!==e&&e!==b.chart.hideAndShowBehavior&&
(b.chart.hideAndShowBehavior=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("rolloverBehavior"),void 0!==e&&e!==b.chart.rolloverBehavior&&(b.chart.rolloverBehavior=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("dataCursor"),void 0!==e&&e!==b.chart.dataCursor&&(b.chart.dataCursor=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("dataCursorBehavior"),void 0!==e&&e!==b.chart.dataCursorBehavior&&(b.chart.dataCursorBehavior=e,dvtm.setOptionsDirty(a,!0)));e=a.getAttribute("stack");void 0!==e&&e!==b.chart.stack&&
(b.chart.stack=e,dvtm.setOptionsDirty(a,!0));e=a.getAttribute("emptyText");void 0!==e&&e!==b.chart.emptyText&&(dvtm.isSparkChart(a)?b.emptyText=e:b.chart.emptyText=e,dvtm.setOptionsDirty(a,!0));"sparkChart"===a.getTag().getName()&&(e=a.getAttribute("type"),void 0!==e&&e!==b.type&&(b.type=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("color"),void 0!==e&&e!==b.color&&(b.color=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("firstColor"),void 0!==e&&e!==b.firstColor&&(b.firstColor=e,dvtm.setOptionsDirty(a,
!0)),e=a.getAttribute("lastColor"),void 0!==e&&e!==b.lastColor&&(b.lastColor=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("highColor"),void 0!==e&&e!==b.highColor&&(b.highColor=e,dvtm.setOptionsDirty(a,!0)),e=a.getAttribute("lowColor"),void 0!==e&&e!==b.lowColor&&(b.lowColor=e,dvtm.setOptionsDirty(a,!0)))};dvtm.addSeriesItem=function(a,b){a._dataObj.series.push(b)};dvtm.setCssBasedProperties=function(a,b){var d=dvtm._getComputedStyle(a),e=b._optionsObj;b.getId().replace(/\:/g,"\\:");dvtm.setOptionsDirty(b,
!0);var g=d["background-color"];if(g){var h=dvtm.isStatusMeterGauge(b)?"color":"backgroundColor";e.plotArea||(e.plotArea={});e.plotArea[h]=g}dvtm.isGauge(b)&&(void 0===e.borderColor&&(g=d["border-bottom-color"])&&(e.borderColor=g),void 0===e.color&&(d=d.color)&&(e.color=d));dvtm.isStatusMeterGauge(b)&&(d=a.querySelector(".dvtm-gaugePlotArea"),d=dvtm._getComputedStyle(d),(g=d["border-bottom-color"])&&(e.plotArea.borderColor=g),(d=d["background-color"])&&(e.plotArea.color=d));!dvtm.isGauge(b)&&!dvtm.isSparkChart(b)&&
(d=this.buildCssStyleString(a.querySelector(".dvtm-chartTitle")),e.title.style=d,d=this.buildCssStyleString(a.querySelector(".dvtm-chartSubtitle")),e.subtitle.style=d,d=this.buildCssStyleString(a.querySelector(".dvtm-chartFootnote")),e.footnote.style=d,d=a.querySelector(".dvtm-chartTitleSeparator"),d=dvtm._getComputedStyle(d),d.visibility&&(e.titleSeparator.rendered=d.visibility),d["border-top-color"]&&(e.titleSeparator.upperColor=d["border-top-color"]),d["border-bottom-color"]&&(e.titleSeparator.lowerColor=
d["border-bottom-color"]));dvtm.setCssBasedLegendProperties(a,b);!dvtm.isGauge(b)&&!dvtm.isSparkChart(b)&&(d=this.buildCssStyleString(a.querySelector(".dvtm-chartXAxisTitle")),e.xAxis.titleStyle=d,d=a.querySelector(".dvtm-chartXAxisTickLabel"),e.xAxis.tickLabel.style=dvtm._mergeOptionsAndDivStyle(d,e.xAxis.tickLabel._labelStyle),d=this.buildCssStyleString(a.querySelector(".dvtm-chartYAxisTitle")),e.yAxis.titleStyle=d,d=a.querySelector(".dvtm-chartYAxisTickLabel"),e.yAxis.tickLabel.style=dvtm._mergeOptionsAndDivStyle(d,
e.yAxis.tickLabel._labelStyle),d=this.buildCssStyleString(a.querySelector(".dvtm-chartY2AxisTitle")),e.y2Axis.titleStyle=d,d=a.querySelector(".dvtm-chartY2AxisTickLabel"),e.y2Axis.tickLabel.style=dvtm._mergeOptionsAndDivStyle(d,e.y2Axis.tickLabel._labelStyle),d=this.buildCssStyleString(a.querySelector(".dvtm-chartPieLabel")),e.styleDefaults.pieLabelStyle=d,d=this.buildCssStyleString(a.querySelector(".dvtm-chartSliceLabel")),e.styleDefaults.sliceLabel.style=d);if(dvtm.isGauge(b)&&(d=a.querySelector(".dvtm-gaugeMetricLabel"),
e.metricLabel.labelStyle=dvtm._mergeOptionsAndDivStyle(d,e.metricLabel._labelStyle),dvtm.isDialGauge(b)&&(d=a.querySelector(".dvtm-gaugeTickLabel"),e.tickLabel.labelStyle=dvtm._mergeOptionsAndDivStyle(d,e.tickLabel._labelStyle)),dvtm.isRatingGauge(b))){var k=a.querySelector(".dvtm-ratingGaugeSelected"),d=a.querySelector(".dvtm-ratingGaugeUnselected"),g=a.querySelector(".dvtm-ratingGaugeHover"),h=a.querySelector(".dvtm-ratingGaugeChanged"),k=dvtm._getComputedStyle(k);void 0!==k["border-top-color"]&&
(e.selected.borderColor=k["border-top-color"]);void 0!==k.color&&(e.selected.color=k.color);k=dvtm._getComputedStyle(d);void 0!==k["border-top-color"]&&(e.unselected.borderColor=k["border-top-color"]);void 0!==k.color&&(e.unselected.color=k.color);k=dvtm._getComputedStyle(g);void 0!==k["border-top-color"]&&(e.hover.borderColor=k["border-top-color"]);void 0!==k.color&&(e.hover.color=k.color);k=dvtm._getComputedStyle(h);void 0!==k["border-top-color"]&&(e.changed.borderColor=k["border-top-color"]);void 0!==
k.color&&(e.changed.color=k.color)}b._stylesResolved=!0};dvtm._mergeOptionsAndDivStyle=function(a,b){if(!a)return b;var d;b&&(d=a.getAttribute("style"),a.setAttribute("style",d+";"+b));var e=this.buildCssStyleString(a);d&&a.setAttribute("style",d);return e};dvtm.getChartStageId=function(a){var b="";return b=dvtm.isSvgAvailable()?a.getId()?a.getId()+"_svg":"chart_svg":a.getId()?a.getId()+"_canvas":"chart_canvas"};dvtm.renderChart=function(a,b){if(!1!==a._readyToRender){var d=null,e=null,g=dvtm.getChartStageId(b),
h=g.replace(/\:/g,"\\:");adf.mf.internal.perf.start("dvtm.renderChart",b.getTag().getName());var k=!dvtm.isSvgAvailable();try{dvtm.isAncestor(document.body,a.get(0))?e=a:(adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.chart","renderChart","Rendering chart on a disconnected DOM node."),d=a.clone(),d.attr("id",a.attr("id")+"_temp"),d.css("position","absolute"),d.css("left","-1000px"),d.css("top","-1000px"),$("body").append(d),e=d);var m=b._optionsObj,n=b._dataObj,o=b[dvtm.COMPONENT_INSTANCE];
(d||!b._stylesResolved)&&dvtm.setCssBasedProperties(e.get(0),b);var q=dvtm.getComponentWidth(e,b),s=dvtm.getComponentHeight(e,b),t;k&&e.find("canvas").remove();if(!k&&dvtm.isOptionsDirty(b)&&o)o.setOptions(m);else if(k||dvtm.isOptionsDirty(b)||!o){if(k){var u=DvtCanvasUtils.createCanvasDocument(q,s,g);e.append(u);t=new DvtCanvasContext(u)}else{e.find("svg").remove();var v=DvtSvgUtils.createSvgDocument(g);e.append(v);t=new DvtSvgContext(v)}e={callback:function(d){var e=b._rowKeyCache,g;if("selection"===
d.getType()){if(d=d.getSelection(),void 0!==d){var h=[],k;for(k=0;k<d.length;k++){g=null;var m=d[k].getId();void 0!==e[m]&&(g=e[m]);null!==g&&h.push(g)}k=new amx.SelectionEvent(h,h);amx.processAmxEvent(a,"selection",void 0,void 0,k);e=[];if(void 0!==d&&null!==d)for(k=0;k<d.length;k++)g=d[k],h={},h.id=g.getId(),h.group=g.getGroup(),h.series=g.getSeries(),e.push(h);b._selection=e}}else if("dvtAct"===d.getType()&&(d=d.getClientId().getId(),void 0!==e[d]&&(g=e[d]),void 0!==g)){var n=b.getChildren("dataStamp",
g)[0];void 0!==n&&null!=n&&(d=new amx.ActionEvent,amx.processAmxEvent(n,"action",void 0,void 0,d).always(function(){var a=n.getTag().getAttribute("action");null!=a&&adf.mf.api.amx.doNavigation(a)}))}}};g={callback:function(b){var d=b.getNewValue();d!==b.getOldValue()&&(b=new amx.ValueChangeEvent(b.getOldValue(),b.getNewValue()),amx.processAmxEvent(a,"valueChange","value",d,b))}};o=dvtm.isSparkChart(b)?DvtSparkChart.newInstance(t,null,null,m):"ledGauge"===b.getTag().getName()?DvtLedGauge.newInstance(t,
null,null,m):"statusMeterGauge"===b.getTag().getName()?DvtStatusMeterGauge.newInstance(t,g.callback,g,m):"dialGauge"===b.getTag().getName()?DvtDialGauge.newInstance(t,g.callback,g,m):dvtm.isRatingGauge(b)?DvtRatingGauge.newInstance(t,g.callback,g,m):e?DvtChart.newInstance(t,e.callback,e,m):DvtChart.newInstance(t,null,null,m);t.getStage().addChild(o);b[dvtm.COMPONENT_INSTANCE]=o;dvtm.setOptionsDirty(b,!1)}o.render(n,q,s);if(d){var w=d.find("svg[id="+h+"]").detach();a.prepend(w);d.remove()}}catch(x){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,
"dvtm.chart","renderChart","Exception: "+x.message),d&&d.remove(),k?a.find("canvas").remove():a.find("svg").remove()}finally{adf.mf.internal.perf.stop("dvtm.renderChart",b.getTag().getName())}}};dvtm.setAxisProperties=function(a,b,d){var e,g,h;switch(d){case "xAxis":e=a._optionsObj.xAxis;g=a._dataObj.xAxis={};break;case "yAxis":e=a._optionsObj.yAxis;g=a._dataObj.yAxis={};break;case "y2Axis":e=a._optionsObj.y2Axis;g=a._dataObj.y2Axis={};break;default:return}h=b.getAttribute("title");void 0!=h&&(g.title=
h);h=b.getAttribute("axisMinValue");h!==e.minValue&&(e.minValue=+h,dvtm.setOptionsDirty(a,!0));h=b.getAttribute("axisMaxValue");h!==e.maxValue&&(e.maxValue=+h,dvtm.setOptionsDirty(a,!0));h=b.getAttribute("majorIncrement");h!==e.majorIncrement&&(e.majorIncrement=+h,dvtm.setOptionsDirty(a,!0));h=b.getAttribute("minorIncrement");h!==e.minorIncrement&&(e.minorIncrement=+h,dvtm.setOptionsDirty(a,!0));h=b.getAttribute("scaledFromBaseline");h!==e.scaledFromBaseline&&(e.scaledFromBaseline=h,dvtm.setOptionsDirty(a,
!0));"xAxis"===d&&(h=b.getAttribute("timeRangeMode"),h!==e.timeRangeMode&&(e.timeRangeMode=h,dvtm.setOptionsDirty(a,!0)));"y2Axis"===d&&(d=e.alignTickMarks,b.isAttributeDefined("alignTickMarks")&&(d=amx.isValueFalse(b.getAttribute("alignTickMarks"))?!1:!0),d!==e.alignTickMarks&&(e.alignTickMarks=d,dvtm.setOptionsDirty(a,!0)))};dvtm.processReferenceObj=function(a,b,d){var e=[],g={};switch(d){case "xAxis":a=a._dataObj.xAxis;break;case "yAxis":a=a._dataObj.yAxis;break;case "y2Axis":a=a._dataObj.y2Axis;
break;case "statusMeterGauge":case "spark":a=a._dataObj;break;default:return}a&&(void 0==a.referenceObjects&&(a.referenceObjects=[]),e=a.referenceObjects);(a=b.getAttribute("text"))&&(g.text=a);(a=b.getAttribute("type"))&&(g.type=a);(a=b.getAttribute("location"))&&(g.location=a);(a=b.getAttribute("color"))&&(g.color=a);(a=b.getAttribute("lineWidth"))&&(g.lineWidth=+a);(a=b.getAttribute("lineStyle"))&&(g.lineStyle=a);(a=b.getAttribute("lineValue"))&&(g.lineValue=+a);(a=b.getAttribute("value"))&&(g.value=
+a);(a=b.getAttribute("lowValue"))&&(g.lowValue=+a);(a=b.getAttribute("highValue"))&&(g.highValue=+a);(a=b.getAttribute("shortDesc"))&&(g.tooltip=a);(a=b.getAttribute("displayInLegend"))&&(g.displayInLegend=a);e.push(g)};dvtm.processSliceLabel=function(a,b){var d=a._optionsObj.styleDefaults.sliceLabel,e;(e=b.getAttribute("position"))&&(d.position=e);(e=b.getAttribute("textType"))&&(d.textType=e);(e=b.getAttribute("scaling"))&&(d.scaling=e);(e=b.getAttribute("autoPrecision"))&&(d.autoPrecision=e);
(e=b.getConverter())&&(d.converter=e)};dvtm.processPieValueFormat=function(a,b){var d=a._optionsObj.styleDefaults.pieValueFormat;void 0==d&&(d=a._optionsObj.styleDefaults.pieValueFormat={});var e=b.getConverter();e&&(d.converter=e)};dvtm.processTickLabel=function(a,b,d){var e,g,h="tickLabel";switch(d){case "xAxis":e=a._optionsObj.xAxis;break;case "yAxis":e=a._optionsObj.yAxis;break;case "y2Axis":e=a._optionsObj.y2Axis;break;case "metric":h="metricLabel";e=a._optionsObj;break;case "scale":e=a._optionsObj;
break;default:return}e&&void 0==e[h]&&(e[h]={});g=b.getAttribute("autoPrecision");void 0!==g&&g!==e[h].autoPrecision&&(e[h].autoPrecision=g,dvtm.setOptionsDirty(a,!0));g=b.getAttribute("rendered");void 0!==g&&g!==e[h].rendered?(e[h].rendered=amx.isValueTrue(g),dvtm.setOptionsDirty(a,!0)):void 0===g&&(e[h].rendered=!0);if((g=b.getAttribute("scaling"))&&g!==e[h].scaling)e[h].scaling=g,dvtm.setOptionsDirty(a,!0);if((g=b.getAttribute("labelStyle"))&&g!==e[h]._labelStyle||!g&&e[h]._labelStyle)e[h]._labelStyle=
g,dvtm.setOptionsDirty(a,!0),a._stylesResolved=!1;"xAxis"==d&&(g=b.getAttribute("rotation"),void 0!==g&&g!==e[h].rotation&&(e[h].rotation=g,dvtm.setOptionsDirty(a,!0)));(g=b.getConverter())&&(e[h].converter=g)};dvtm.processAxisLine=function(a,b,d){var e;switch(d){case "xAxis":d=a._optionsObj.xAxis;break;case "yAxis":d=a._optionsObj.yAxis;break;case "y2Axis":d=a._optionsObj.y2Axis;break;default:return}d&&void 0==d.axisLine&&(d.axisLine={});e=b.getAttribute("lineColor");void 0!==e&&e!==d.axisLine.lineColor&&
(d.axisLine.lineColor=e,dvtm.setOptionsDirty(a,!0));e=b.getAttribute("lineWidth");void 0!==e&&e!==d.axisLine.lineWidth&&(d.axisLine.lineWidth=+e,dvtm.setOptionsDirty(a,!0));e=b.getAttribute("rendered");void 0!==e&&e!==d.axisLine.rendered&&(d.axisLine.rendered=amx.isValueTrue(e)?!0:!1,dvtm.setOptionsDirty(a,!0))};dvtm.processTick=function(a,b,d,e){var g;switch(d){case "xAxis":d=a._optionsObj.xAxis;break;case "yAxis":d=a._optionsObj.yAxis;break;case "y2Axis":d=a._optionsObj.y2Axis;break;default:return}d&&
(e?(void 0===d.majorTick&&(d.majorTick={}),g=d.majorTick):(void 0===d.minorTick&&(d.minorTick={}),g=d.minorTick));e=b.getAttribute("lineColor");void 0!==e&&e!==g.lineColor&&(g.lineColor=e,dvtm.setOptionsDirty(a,!0));e=b.getAttribute("lineWidth");void 0!==e&&e!==g.lineWidth&&(g.lineWidth=+e,dvtm.setOptionsDirty(a,!0));e=b.getAttribute("rendered");void 0!==e&&e!==g.rendered&&(g.rendered=amx.isValueTrue(e)?!0:!1,dvtm.setOptionsDirty(a,!0))};dvtm.processMarker=function(a,b,d){var e,g;e=b.getAttribute("rendered");
if(void 0!=e&&amx.isValueFalse(e))return null;var h={attrGroups:[]};e=b.getAttribute("groupId");void 0!=e&&(h.groupId=e);e=b.getAttribute("group");void 0!=e&&(g=a.getAttribute("timeAxisType"),h.group=g&&"enabled"===g?dvtm._convertDate(e):e);e=b.getAttribute("seriesId");g=b.getAttribute("series");void 0!=e?h.seriesId=e:void 0!=g&&(h.seriesId=g);void 0!=g?h.series=g:(h.series="",void 0==h.seriesId&&(h.seriesId="_1"));h._rowKey=d.rowKey();h.id=b.getId();e=b.getAttribute("x");void 0!=e&&(g=a.getAttribute("timeAxisType"),
h.x=g&&"mixedFrequency"===g?dvtm._convertDate(e):+e);e=b.getAttribute("y");void 0!=e&&(h.y=+e);e=b.getAttribute("z");void 0!=e&&(h.z=+e);e=b.getAttribute("markerSize");void 0!=e&&(h.markerSize=+e);e=b.getAttribute("value");void 0!=e&&(h.value=+e);(e=b.getAttribute("borderColor"))&&(h.borderColor=e);(e=b.getAttribute("color"))&&(h.color=e);if(e=b.getAttribute("markerShape"))h.shape=e;(e=b.getAttribute("shortDesc"))&&(h.shortDesc=e);e=b.getAttribute("markerDisplayed");void 0!=e&&(h.markerDisplayed=
e);e=b.getAttribute("action");void 0!=e?h.action=e:(e=!1,d=b.getTag().findTags(dvtm.AMX_NAMESPACE,"setPropertyListener"),0<d.length?e=!0:(d=b.getTag().findTags(dvtm.AMX_NAMESPACE,"showPopupBehavior"),0<d.length&&(e=!0)),e&&(h.action=h._rowKey));a._markers.push(h);return h};dvtm.applyMarkersToModel=function(a){var b=a._markers,d=a._rowKeyCache,e=dvtm.getChartType(a),g,h,k,m,n;for(g=0;g<b.length;g++)void 0!==b[g].groupId?dvtm.addGroup(a,b[g].groupId,b[g].group):dvtm.addGroup(a,null,b[g].group);for(g=
0;g<b.length;g++){var o=b[g];k=dvtm.getSeriesByIdAndName(a,o.seriesId,o.series);"bubble"!==e&&"scatter"!==e&&(n=dvtm.getGroupIndexByIdOrName(a,o.groupId,o.group));var q={};void 0!=o.x&&(q.x=o.x);void 0!=o.y?q.y=o.y:void 0!=o.value&&(q.y=o.value);void 0!=o.z&&(q.z=o.z);void 0!=o.markerSize&&(q.markerSize=o.markerSize);void 0!=o.shortDesc&&(q.tooltip=o.shortDesc);void 0!=o.borderColor&&(q.borderColor=o.borderColor);if(0<o.attrGroups.length)for(h=0;h<o.attrGroups.length;h++){var s=o.attrGroups[h].attrGroup,
t=o.attrGroups[h].valueIndex;m=dvtm.getAttributeFromGroup(a,"color",s,t);null!=m&&(q.color=m);m=dvtm.getAttributeFromGroup(a,"shape",s,t);null!=m&&(q.markerShape=m);if("bubble"===e||"scatter"===e)void 0==q.categories&&(q.categories=[]),q.categories.push(s.items[t].value)}void 0!=o.color&&(q.color=o.color);void 0!=o.markerShape&&(q.markerShape=o.markerShape);void 0!=o.markerDisplayed&&(q.markerDisplayed=amx.isValueTrue(o.markerDisplayed)?!0:!1);void 0!=o.id&&(q.id=o.id);void 0!=o.action&&(q.action=
o.action);d[o.id]=o._rowKey;"bubble"===e||"scatter"===e?k.data.push(q):k.data[n]=q}};dvtm.getSeriesByIdAndName=function(a,b,d){var e=dvtm.getChartType(a),g=a._dataObj.series,a=a._dataObj.groups,h=[],k;for(k=0;k<g.length&&!(g[k].id===b);k++);if(k<g.length)b=g[k];else{if("bubble"===e||"scatter"===e)b={id:b,name:d,displayInLegend:"off",data:[]};else{for(e=0;e<a.length;e++)h.push(null);b={id:b,name:d,displayInLegend:"on",data:h}}g.push(b)}return b};dvtm.getGroupIndexByIdOrName=function(a,b,d){var a=a._dataObj.groups,
e;if(b)for(e=0;e<a.length;e++){if(a[e].id===b)return e}else for(e=0;e<a.length;e++)if(a[e]===d)return e;return null};dvtm.addGroup=function(a,b,d){for(var a=a._dataObj.groups,e=0,e=0;e<a.length;e++)if(b){if(a[e].id===b)return}else if(a[e]===d)return;e>=a.length&&(b?a.push({id:b,name:d}):void 0!==d&&a.push(d))};dvtm.processSeriesStyle=function(a,b){var d=a._dataObj.series,e;if(b.isAttributeDefined("seriesId"))e=b.getAttribute("seriesId");else if(b.isAttributeDefined("series"))e=b.getAttribute("series");
else return;for(var g=0,g=0;g<d.length&&!(e===d[g].id);g++);if(g<d.length&&(d=d[g],!b.isAttributeDefined("rendered")||!amx.isValueFalse(b.getAttribute("rendered"))))d.type=b.isAttributeDefined("type")?b.getAttribute("type"):"line",b.isAttributeDefined("color")&&(d.color=b.getAttribute("color")),b.isAttributeDefined("borderColor")&&(d.borderColor=b.getAttribute("borderColor")),b.isAttributeDefined("markerDisplayed")&&(d.markerDisplayed="true"===b.getAttribute("markerDisplayed")||"on"===b.getAttribute("markerDisplayed")?
!0:!1),b.isAttributeDefined("markerShape")&&(d.markerShape=b.getAttribute("markerShape")),b.isAttributeDefined("markerColor")&&(d.markerColor=b.getAttribute("markerColor")),b.isAttributeDefined("markerSize")&&(d.markerSize=+b.getAttribute("markerSize")),b.isAttributeDefined("lineWidth")&&(d.lineWidth=+b.getAttribute("lineWidth")),b.isAttributeDefined("lineStyle")&&(d.lineStyle=b.getAttribute("lineStyle")),b.isAttributeDefined("assignedToY2")&&(d.assignedToY2=b.getAttribute("assignedToY2"))};dvtm.processSparkDataItem=
function(a,b){var d=a._dataObj,e={},g;void 0==d.items&&(d.items=[]);(g=b.getAttribute("color"))&&(e.color=g);if(g=b.getAttribute("date"))e.date=g,d.timeAxisType="enabled";g=b.getAttribute("floatValue");void 0!==g&&(e.floatValue=g);b.getAttribute("markerDisplayed");b.isAttributeDefined("markerDisplayed")&&(e.markerDisplayed=amx.isValueTrue(b.getAttribute("markerDisplayed"))?!0:!1);b.isAttributeDefined("rendered")&&(e.rendered=amx.isValueTrue(b.getAttribute("rendered"))?!0:!1);g=b.getAttribute("value");
void 0!==g&&(e.value=g);d.items.push(e)};dvtm.processThreshold=function(a,b){var d=a._dataObj,e={},g;void 0==d.thresholds&&(d.thresholds=[]);(g=b.getAttribute("borderColor"))&&(e.borderColor=g);(g=b.getAttribute("color"))&&(e.color=g);(g=b.getAttribute("text"))&&(e.text=g);(g=b.getAttribute("maxValue"))&&(e.maxValue=+g);d.thresholds.push(e)};dvtm.isPieChart=function(a){return"pieChart"===a.getTag().getName()?!0:!1};dvtm._convertDate=function(a){var b=new Date(a);return isNaN(b)?a:b.getTime()}})();
(function(){dvtm.DefaultGaugeStyle={};dvtm.DefaultGaugeStyle.VERSION_1={animationDuration:1E3,animationOnDataChange:"none",animationOnDisplay:"none",visualEffects:"auto"};dvtm.DefaultGaugeStyle.SKIN_ALTA={animationDuration:1E3,animationOnDataChange:"none",animationOnDisplay:"none",visualEffects:"none"};dvtm.DIAL_GAUGE_IMAGE_PATH="css/images/chart/gauge/";dvtm.DEFAULT_DIAL_GAUGE_PROPERTIES={background:"circleAntique",indicator:"needleAntique"};dvtm.DEFAULT_DIAL_GAUGE_BACKGROUND_INDICATOR_MAPS={indicatorToBackground:{needleAntique:"circleAntique",
needleLight:"circleLight",needleDark:"circleDark"},backgroundToIndicator:{rectangleAntique:"needleAntique",rectangleAntiqueCustom:"needleAntique",domeAntique:"needleAntique",domeAntiqueCustom:"needleAntique",circleAntique:"needleAntique",circleAntiqueCustom:"needleAntique",rectangleLight:"needleLight",rectangleLightCustom:"needleLight",domeLight:"needleLight",domeLightCustom:"needleLight",circleLight:"needleLight",circleLightCustom:"needleLight",rectangleDark:"needleDark",rectangleDarkCustom:"needleDark",
domeDark:"needleDark",domeDarkCustom:"needleDark",circleDark:"needleDark",circleDarkCustom:"needleDark"}};dvtm.DefaultDialGaugeStyle={backgrounds:{rectangleAntique:{anchorX:100.5,anchorY:95.8,startAngle:207.6,angleExtent:235,indicatorLength:1.05,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-200x200-bidi.png",width:200,height:168,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-200x200.png",width:200,height:168},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-400x400-bidi.png",
width:400,height:335,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-400x400.png",width:400,height:335}],metricLabelBounds:{x:79,y:125,width:42,height:40}},rectangleAntiqueCustom:{anchorX:100.5,anchorY:95.8,startAngle:207.6,angleExtent:235,indicatorLength:1.05,radius:65,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-200x200-noLabels.png",width:200,height:168,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-200x200-noLabels.png",
width:200,height:168},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-400x400-noLabels.png",width:400,height:335,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-rectangle-400x400-noLabels.png",width:400,height:335}],metricLabelBounds:{x:79,y:125,width:42,height:40}},domeAntique:{anchorX:99.3,anchorY:95.8,startAngle:195.5,angleExtent:210.8,indicatorLength:0.98,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-200x200-bidi.png",width:200,height:176,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"antique/bg-dome-200x200.png",width:200,height:176},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-400x400-bidi.png",width:400,height:352,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-400x400.png",width:400,height:352}],metricLabelBounds:{x:81,y:135,width:38,height:35}},domeAntiqueCustom:{anchorX:99.3,anchorY:95.8,startAngle:195.5,angleExtent:210.8,indicatorLength:0.98,radius:65,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-200x200-noLabels.png",
width:200,height:176,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-200x200-noLabels.png",width:200,height:176},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-400x400-noLabels.png",width:400,height:352,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-dome-400x400-noLabels.png",width:400,height:352}],metricLabelBounds:{x:81,y:135,width:38,height:35}},circleAntique:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.1,indicatorLength:0.85,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"antique/bg-circle-200x200-bidi.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-200x200.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-400x400-bidi.png",width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-400x400.png",width:400,height:400}],metricLabelBounds:{x:77,y:133,width:46,height:34}},circleAntiqueCustom:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.1,indicatorLength:0.85,radius:63,
majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-200x200-noLabels.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-200x200-noLabels.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-400x400-noLabels.png",width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/bg-circle-400x400-noLabels.png",width:400,height:400}],metricLabelBounds:{x:77,y:133,width:46,height:34}},rectangleLight:{anchorX:100,
anchorY:91.445,startAngle:211,angleExtent:242,indicatorLength:1.1,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-200x200-bidi.png",width:200,height:154,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-200x200.png",width:200,height:154},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-400x400-bidi.png",width:400,height:307,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-400x400.png",width:400,height:307}],metricLabelBounds:{x:78,y:75,width:44,height:38}},
rectangleLightCustom:{anchorX:100,anchorY:91.445,startAngle:211,angleExtent:242,indicatorLength:1.1,radius:60.5,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-200x200-noLabels.png",width:200,height:154,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-200x200-noLabels.png",width:200,height:154},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-400x400-noLabels.png",width:400,height:307,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-rectangle-400x400-noLabels.png",
width:400,height:307}],metricLabelBounds:{x:78,y:75,width:44,height:38}},domeLight:{anchorX:100.2,anchorY:89,startAngle:201,angleExtent:222,indicatorLength:1.23,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-200x200-bidi.png",width:200,height:138,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-200x200.png",width:200,height:138},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-400x400-bidi.png",width:400,height:276,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-400x400.png",
width:400,height:276}],metricLabelBounds:{x:80,y:70,width:41,height:39}},domeLightCustom:{anchorX:100.2,anchorY:89,startAngle:201,angleExtent:222,indicatorLength:1.23,radius:57,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-200x200-noLabels.png",width:200,height:138,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-200x200-noLabels.png",width:200,height:138},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-dome-400x400-noLabels.png",width:400,height:276,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"light/bg-dome-400x400-noLabels.png",width:400,height:276}],metricLabelBounds:{x:80,y:70,width:41,height:39}},circleLight:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.1,indicatorLength:0.82,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-200x200-bidi.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-200x200.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-400x400-bidi.png",width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"light/bg-circle-400x400.png",width:400,height:400}],metricLabelBounds:{x:76,y:82,width:48,height:40}},circleLightCustom:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.1,indicatorLength:0.82,radius:60,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-200x200-noLabels.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-200x200-noLabels.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-400x400-noLabels.png",
width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/bg-circle-400x400-noLabels.png",width:400,height:400}],metricLabelBounds:{x:76,y:82,width:48,height:40}},circleDark:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.5,indicatorLength:0.82,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-200x200-bidi.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-200x200.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-400x400-bidi.png",
width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-400x400.png",width:400,height:400}],metricLabelBounds:{x:76,y:82,width:48,height:40}},circleDarkCustom:{anchorX:100,anchorY:100,startAngle:220.5,angleExtent:261.5,indicatorLength:0.82,radius:63,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-200x200-noLabels.png",width:200,height:200,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-200x200-noLabels.png",width:200,height:200},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"dark/bg-circle-400x400-noLabels.png",width:400,height:400,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-circle-400x400-noLabels.png",width:400,height:400}],metricLabelBounds:{x:76,y:82,width:48,height:40}},rectangleDark:{anchorX:100.2,anchorY:99.5,startAngle:201,angleExtent:222,indicatorLength:1.1,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-200x200-bidi.png",width:200,height:154,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-200x200.png",width:200,height:154},
{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-400x400-bidi.png",width:400,height:307,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-400x400.png",width:400,height:307}],metricLabelBounds:{x:80,y:83,width:41,height:36}},rectangleDarkCustom:{anchorX:100.2,anchorY:99.5,startAngle:201,angleExtent:222,indicatorLength:1.1,radius:65,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-200x200-noLabels.png",width:200,height:154,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+
"dark/bg-rectangle-200x200-noLabels.png",width:200,height:154},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-400x400-noLabels.png",width:400,height:307,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-rectangle-400x400-noLabels.png",width:400,height:307}],metricLabelBounds:{x:80,y:83,width:41,height:36}},domeDark:{anchorX:100.2,anchorY:89,startAngle:201,angleExtent:222,indicatorLength:1.23,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-200x200-bidi.png",width:200,height:138,
bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-200x200.png",width:200,height:138},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-400x400-bidi.png",width:400,height:276,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-400x400.png",width:400,height:276}],metricLabelBounds:{x:80,y:73,width:41,height:36}},domeDarkCustom:{anchorX:100.2,anchorY:89,startAngle:201,angleExtent:222,indicatorLength:1.23,radius:57,majorTickCount:6,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-200x200-noLabels.png",
width:200,height:138,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-200x200-noLabels.png",width:200,height:138},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-400x400-noLabels.png",width:400,height:276,bidi:!0},{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/bg-dome-400x400-noLabels.png",width:400,height:276}],metricLabelBounds:{x:80,y:73,width:41,height:36}}},indicators:{needleAntique:{anchorX:42,anchorY:510,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"antique/needle-1600x1600.png",width:81,
height:734}]},needleLight:{anchorX:227,anchorY:425,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"light/needle-1600x1600.png",width:454,height:652}]},needleDark:{anchorX:227,anchorY:425,images:[{source:dvtm.DIAL_GAUGE_IMAGE_PATH+"dark/needle-1600x1600.png",width:454,height:652}]}}}})();dvtm.dialGaugeStyles={};dvtm.dialGaugeStylesLoaded=!1;
(function(){dvtm.CommonGauge=function(){};dvtm.CommonGauge.prototype.create=function(a){dvtm.initGaugeAmxNode(a);dvtm.setCommonGaugeProperties(a);"dialGauge"===a.getTag().getName()&&dvtm.setDialGaugeProperties(a);"statusMeterGauge"===a.getTag().getName()&&dvtm.setStatusMeterGaugeProperties(a);"ratingGauge"===a.getTag().getName()&&dvtm.setRatingGaugeProperties(a);"ratingGauge"!==a.getTag().getName()&&dvtm.processGaugeChildTags(a);return dvtm.setupChartDiv(a)};dvtm.CommonGauge.prototype.init=function(a,
b){dvtm.initChartDomNode(a,b)};dvtm.CommonGauge.prototype.postDisplay=function(a,b){dvtm.renderChart(a,b)};dvtm.CommonGauge.prototype.updateChildren=function(){return adf.mf.api.amx.AmxNodeChangeResult.REFRESH};dvtm.CommonGauge.prototype.refresh=function(a,b){var d=$(document.getElementById(a.getId()));dvtm.initGaugeAmxNodeForRefresh(a,b);dvtm.setCommonGaugeProperties(a);"dialGauge"===a.getTag().getName()&&dvtm.setDialGaugeProperties(a);"statusMeterGauge"===a.getTag().getName()&&dvtm.setStatusMeterGaugeProperties(a);
"ratingGauge"===a.getTag().getName()?dvtm.setRatingGaugeProperties(a):dvtm.processGaugeChildTags(a);dvtm.renderChart(d,a)};dvtm.CommonGauge.prototype.destroy=function(a,b){dvtm.destroyChartDomNode(a,b)};amx.registerRenderers("dvtm",{ledGauge:new dvtm.CommonGauge,statusMeterGauge:new dvtm.CommonGauge,dialGauge:new dvtm.CommonGauge,ratingGauge:new dvtm.CommonGauge});dvtm.processGaugeChildTags=function(a){for(var b=a._optionsObj,d=a.getChildren(),d=adf.mf.api.amx.createIterator(d),e=!1;d.hasNext();){var g=
d.next();switch(g.getTag().getName()){case "referenceLine":dvtm.processReferenceObj(a,g,"statusMeterGauge");break;case "threshold":dvtm.processThreshold(a,g);break;case "tickLabel":dvtm.processTickLabel(a,g,"scale");break;case "metricLabel":dvtm.processTickLabel(a,g,"metric");break;case "gaugeLabelFormat":if(!e){b.metricLabel||(b.metricLabel={});if(e=g.getConverter())b.metricLabel.converter=e,dvtm.setOptionsDirty(a,!0);g.isAttributeDefined("scaling")&&(g=g.getAttribute("scaling"),g!==b.metricLabel.scaling&&
(b.metricLabel.scaling=g,dvtm.setOptionsDirty(a,!0)));e=!0}}}};dvtm.initGaugeAmxNode=function(a){a._optionsObj={legend:{},metricLabel:{rendered:!1,scaling:"auto"}};a._dataObj={};dvtm.isDialGauge(a)&&(a._optionsObj.tickLabel={rendered:!0,scaling:"auto"});dvtm.isRatingGauge(a)&&(a._optionsObj.selected={},a._optionsObj.unselected={},a._optionsObj.hover={},a._optionsObj.changed={});dvtm.isStatusMeterGauge(a)&&(a._optionsObj.indicatorSize=1,a._optionsObj.thresholdDisplay="onIndicator",a._optionsObj.plotArea=
{rendered:"auto"});a[dvtm.COMPONENT_INSTANCE]=null;dvtm.loadCanvasToolkitJs();dvtm.loadChartResourceBundles()};dvtm.initGaugeAmxNodeForRefresh=function(a,b){a._refreshing=!0;a._attributeChanges=b;dvtm.setOptionsDirty(a,!1);a._dataObj={}};dvtm._createDialGaugeImage=function(a){var b={};b.source=dvtm._getAttributeValue(a,"source");b.width=parseFloat(dvtm._getAttributeValue(a,"width"));b.height=parseFloat(dvtm._getAttributeValue(a,"height"));(a=dvtm._getAttributeValue(a,"bidi"))&&(b.bidi="true"==a.trim().toLowerCase()?
!0:!1);return b};dvtm.setDialGaugeProperties=function(a){var b=a._optionsObj,d=a._refreshing;if("dialGauge"===a.getTag().getName()){if(!d&&!dvtm.dialGaugeStylesResolved&&(dvtm.dialGaugeStylesResolved=!0,dvtm.dialGaugeStyles.backgrounds=dvtm.DefaultDialGaugeStyle.backgrounds,dvtm.dialGaugeStyles.indicators=dvtm.DefaultDialGaugeStyle.indicators,void 0!=window.CustomDialGaugeStyle)){var e,g;if(void 0!=window.CustomDialGaugeStyle.backgrounds)for(e in window.CustomDialGaugeStyle.backgrounds){dvtm.dialGaugeStyles.backgrounds[e]=
window.CustomDialGaugeStyle.backgrounds[e];d=dvtm.dialGaugeStyles.backgrounds[e].images;for(g=0;g<d.length;g++)d[g].source=amx.buildRelativePath(d[g].source)}if(void 0!=window.CustomDialGaugeStyle.indicators)for(e in window.CustomDialGaugeStyle.indicators){dvtm.dialGaugeStyles.indicators[e]=window.CustomDialGaugeStyle.indicators[e];d=dvtm.dialGaugeStyles.indicators[e].images;for(g=0;g<d.length;g++)d[g].source=amx.buildRelativePath(d[g].source)}}e=a.getAttribute("background");a=a.getAttribute("indicator");
if(!e||void 0===dvtm.dialGaugeStyles.backgrounds[e])e=dvtm.getValueByKeyWithDefault(dvtm.DEFAULT_DIAL_GAUGE_BACKGROUND_INDICATOR_MAPS.indicatorToBackground,a,dvtm.DEFAULT_DIAL_GAUGE_PROPERTIES.background);if(!a||void 0===dvtm.dialGaugeStyles.indicators[a])a=dvtm.getValueByKeyWithDefault(dvtm.DEFAULT_DIAL_GAUGE_BACKGROUND_INDICATOR_MAPS.backgroundToIndicator,e,dvtm.DEFAULT_DIAL_GAUGE_PROPERTIES.indicator);b.background=dvtm.dialGaugeStyles.backgrounds[e];b.indicator=dvtm.dialGaugeStyles.indicators[a]}};
dvtm.setStatusMeterGaugeProperties=function(a){if("statusMeterGauge"===a.getTag().getName()){var b=a._optionsObj;if(a.isAttributeDefined("indicatorSize")){var d=a.getAttribute("indicatorSize"),d=dvtm.processPercetageAttribute(d);d!==b.indicatorSize&&(b.indicatorSize=d,dvtm.setOptionsDirty(a,!0))}a.isAttributeDefined("plotArea")&&(d=a.getAttribute("plotArea"),d!==b.plotArea.rendered&&(b.plotArea.rendered=d,dvtm.setOptionsDirty(a,!0)));if(a.isAttributeDefined("thresholdDisplay")&&(d=a.getAttribute("thresholdDisplay"))&&
d!==b.thresholdDisplay)b.thresholdDisplay=d,dvtm.setOptionsDirty(a,!0)}};dvtm.setRatingGaugeProperties=function(a){var b=a._optionsObj,d=a._dataObj,e;a._refreshing||(dvtm.setOptionsDirty(a,!0),e=dvtm.isSkyros()?dvtm.DefaultGaugeStyle.VERSION_1:DvtJSONUtils.merge(dvtm.DefaultGaugeStyle.SKIN_ALTA,dvtm.DefaultGaugeStyle.VERSION_1),e=void 0!=window.CustomGaugeStyle?DvtJSONUtils.merge(window.CustomGaugeStyle,e):e,a._optionsObj=DvtJSONUtils.merge(e,b),b=a._optionsObj);e=a.getAttribute("emptyText");void 0!==
e&&e!==b.emptyText&&(b.emptyText=e,dvtm.setOptionsDirty(a,!0));e=a.getAttribute("value");void 0!==e&&!isNaN(+e)?d.value=+e:amx.dtmode&&(d.value=3);e=a.getAttribute("minValue");d.minValue=void 0!==e&&!isNaN(+e)?+e:0;e=a.getAttribute("maxValue");d.maxValue=void 0!==e&&!isNaN(+e)?+e:5;e="star";var g;a.isAttributeDefined("shape")&&(e=a.getAttribute("shape"),b.selected.shape=e,b.changed.shape=e,b.hover.shape=e);a.isAttributeDefined("unselectedShape")?(g=a.getAttribute("unselectedShape"),b.unselected.shape=
"auto"===g?e:g):b.unselected.shape=e;a.isAttributeDefined("inputIncrement")&&(b.inputIncrement=a.getAttribute("inputIncrement"));e=!1;a.isAttributeDefined("readOnly")&&amx.isValueTrue(a.getAttribute("readOnly"))&&(e=!0);e!==b.readOnly&&(b.readOnly=e,dvtm.setOptionsDirty(a,!0));b=!1;a.isAttributeDefined("changed")&&amx.isValueTrue(a.getAttribute("changed"))&&(b=!0);d.changed=b;a.isAttributeDefined("shortDesc")&&(d.tooltip=a.getAttribute("shortDesc"))};dvtm.setCommonGaugeProperties=function(a){var b=
a._optionsObj,d=a._dataObj,e=a._refreshing,g;e||(dvtm.setOptionsDirty(a,!0),g=void 0!=window.CustomGaugeStyle?DvtJSONUtils.merge(window.CustomGaugeStyle,dvtm.DefaultGaugeStyle):dvtm.DefaultGaugeStyle,a._optionsObj=DvtJSONUtils.merge(g,b),b=a._optionsObj);a.isAttributeDefined("animationDuration")&&(g=1*a.getAttribute("animationDuration"),g!==b.animationDuration&&(b.animationDuration=g,dvtm.setOptionsDirty(a,!0)));if((g=a.getAttribute("animationOnDisplay"))&&g!==b.animationOnDisplay)b.animationOnDisplay=
g,dvtm.setOptionsDirty(a,!0);if((g=a.getAttribute("animationOnDataChange"))&&g!==b.animationOnDataChange)b.animationOnDataChange=g,dvtm.setOptionsDirty(a,!0);g=a.getAttribute("labelDisplay");void 0!==g&&"on"===g!==b.metricLabel.rendered&&(b.metricLabel.rendered="on"===g,dvtm.setOptionsDirty(a,!0));g=a.getAttribute("emptyText");void 0!==g&&g!==b.emptyText&&(b.emptyText=g,dvtm.setOptionsDirty(a,!0));g=a.getAttribute("type");void 0!==g&&g!==b.type&&(b.type=g,dvtm.setOptionsDirty(a,!0));g=a.getAttribute("visualEffects");
void 0!==g&&g!==b.visualEffects&&(b.visualEffects=g,dvtm.setOptionsDirty(a,!0));g=a.getAttribute("value");d.value=void 0!==g&&!isNaN(+g)?+g:65;g=a.getAttribute("minValue");d.minValue=void 0!==g&&!isNaN(+g)?+g:0;g=a.getAttribute("maxValue");d.maxValue=void 0!==g&&!isNaN(+g)?+g:100;"ledGauge"===a.getTag().getName("tagName")&&(g=a.getAttribute("size"),void 0!==g&&(d.size=dvtm.processPercetageAttribute(g)));g=a.getAttribute("borderColor");!e&&void 0==g?b.borderColor=null:g&&g!==b.borderColor&&(b.borderColor=
g,dvtm.setOptionsDirty(a,!0));g=a.getAttribute("color");!e&&void 0==g?b.color="#33CC33":void 0!==g&&g!==b.color&&(b.color=g,dvtm.setOptionsDirty(a,!0));e=!0;a.isAttributeDefined("readOnly")&&amx.isValueFalse(a.getAttribute("readOnly"))&&(e=!1);e!==b.readOnly&&(b.readOnly=e,dvtm.setOptionsDirty(a,!0));a.isAttributeDefined("shortDesc")&&(d.tooltip=a.getAttribute("shortDesc"));a.isAttributeDefined("rotation")&&(d.rotation=a.getAttribute("rotation"))}})();
(function(){amx.registerRenderers("dvtm",{geographicMap:{create:function(a){var b=dvtm.setupGeographicMapDiv(a);try{dvtm.initGeographicMapAmxNode(a),dvtm.setGeographicMapProperties(a),dvtm.processGeographicMapChildTags(b,a)}catch(d){b._readyToRender=!1,d instanceof dvtm.exception.NodeNotReadyToRenderException?adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.geographicMap","create",d):adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.geographicMap","create","Exception: "+d.message)}return b},
init:function(a,b){dvtm.initGeographicMapDomNode(a,b);dvtm.setCssBasedGeographicMapProperties(a,b)},postDisplay:function(a,b){if(!0===a._readyToRender)try{dvtm.renderGeographicMap(a,b)}catch(d){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.geographicMap","postDisplay","Exception: "+d.message)}},refresh:function(a,b){var d=$(document.getElementById(a.getId()));dvtm.initGeographicMapAmxNodeForRefresh(a,b);try{dvtm.setGeographicMapProperties(a),dvtm.processGeographicMapChildTags(d,a),dvtm.renderGeographicMap(d,
a)}catch(e){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.geographicMap","refresh","Exception: "+e.message)}},refreshDataLayer:function(a,b,d){for(var e=a[dvtm.COMPONENT_INSTANCE],g=a._dataObj.dataLayers,h=b.getId(),k=null,m=0;m<g.length;m++)if(g[m].id==h){k=g[m];break}k&&(h=k.idx,k=g[m]={},k.idx=h,dvtm.processSingleGeographicMapPointDataLayerTag(a,b,k),d.hasChanged("value")&&e&&e.selection&&e.selection[h]&&(e.selection[h]=[]),b=$(document.getElementById(a.getId())),dvtm.renderGeographicMap(b,
a))},destroy:function(a,b){dvtm.removeResizeCallback(b.getId())}},pointDataLayer:dvtm.dataLayerRenderer});dvtm.loadJS=function(a,b,d){var e=document.getElementsByTagName("head")[0],g=document.createElement("script");g.type="text/javascript";g.src=a;g.async=!1;g.onload=b;g.onerror=d;e.appendChild(g)};dvtm.getMapId=function(a){var b="";return b=a.getId()?a.getId():"map_canvas"};dvtm.setupGeographicMapDiv=function(a){var b=dvtm.getMapId(a),a=$("<div "+('id="'+b+'"')+' style="width: 100%; height: 100%;"></div>'),
b=$('<div id="'+b+'_canvas" style="width: 100%; height: 100%;"></div>');a.append(b);a._readyToRender=!0;return a};dvtm.initGeographicMapAmxNode=function(a){a._optionsObj={mapOptions:{}};a._dataObj=a.isAttributeDefined("data")?a.getAttribute("data"):{dataLayers:[]};a[dvtm.COMPONENT_INSTANCE]=null;void 0==a._selectionListenerCache&&(a._selectionListenerCache={})};dvtm.initGeographicMapDomNode=function(a,b){dvtm.initDvtmComponent(a,b,dvtm.renderGeographicMap);a.tap(function(){if(amx.acceptEvent()){var b=
new amx.ActionEvent;amx.processAmxEvent(a,"action",void 0,void 0,b)}})};dvtm.initGeographicMapAmxNodeForRefresh=function(a,b){a._refreshing=!0;a._attributeChanges=b;dvtm.setOptionsDirty(a,!1);a._dataObj={dataLayers:[]}};dvtm.setGeographicMapProperties=function(a){var b=a._optionsObj,d;if(d=a.getAttribute("mapType"))b.mapOptions.mapType=d,dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("centerX"))b.mapOptions.centerX=d,dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("centerY"))b.mapOptions.centerY=d,
dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("zoomLevel"))b.mapOptions.zoomLevel=d,dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("initialZooming"))b.mapOptions.initialZooming=d,dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("animationOnDisplay"))b.mapOptions.animationOnDisplay=d,dvtm.setOptionsDirty(a,!0);if(d=a.getAttribute("shortDesc"))b.mapOptions.shortDesc=d,dvtm.setOptionsDirty(a,!0)};dvtm.processGeographicMapChildTags=function(a,b){dvtm.processGeographicMapPointDataLayerTags(a,b,b,!0)};dvtm.processGeographicMapPointDataLayerTags=
function(a,b,d){for(var e=b._dataObj,d=d.getChildren(),d=adf.mf.api.amx.createIterator(d);d.hasNext();){var g=d.next();if((!g.isAttributeDefined("rendered")||!amx.isValueFalse(g.getAttribute("rendered")))&&"pointDataLayer"===g.getTag().getName()){if(!g.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;var h=g.renderNode();h&&a.append(h);var h={},k=d.getRowKey();h.idx=k;dvtm.processSingleGeographicMapPointDataLayerTag(b,g,h);e.dataLayers.push(h)}}};dvtm.processSingleGeographicMapPointDataLayerTag=
function(a,b,d){var e,g=d.idx;(e=b.getAttribute("id"))&&(d.id=e);(e=b.getAttribute("animationOnDuration"))&&(d.animationOnDuration=e);(e=b.getAttribute("animationOnDataChange"))&&(d.animationOnDataChange=e);(e=b.getAttribute("selectedRowKeys"))&&(d.selectedRowKeys=e);(e=b.getAttribute("dataSelection"))&&(d.dataSelection=e);if(e=b.getTag().getAttribute("selectionListener")){var h=a._selectionListenerCache;void 0!==g&&void 0==h[g]&&(h[g]=e)}(e=b.getAttribute("emptyText"))&&(d.emptyText=e);dvtm.processGeographicMapPointLocationTag(a,
d,b)};dvtm.processGeographicMapPointLocationTag=function(a,b,d){b.data=[];var e=d.getAttribute("var"),g=d.getAttribute("value");if(g)for(g=adf.mf.api.amx.createIterator(g);g.hasNext();){var h=g.next(),k=d.getChildren(null,g.getRowKey());adf.mf.el.addVariable(e,h);for(k=adf.mf.api.amx.createIterator(k);k.hasNext();){var m=k.next(),n=h.rowKey();dvtm._processGeographicMapPointLocation(a,b,m,n)}adf.mf.el.removeVariable(e)}else{d=d.getChildren();for(d=adf.mf.api.amx.createIterator(d);d.hasNext();)e=d.next(),
g=""+(d.getRowKey()+1),dvtm._processGeographicMapPointLocation(a,b,e,g)}};dvtm._processGeographicMapPointLocation=function(a,b,d,e){if(!("pointLocation"!==d.getTag().getName()||d.isAttributeDefined("rendered")&&amx.isValueFalse(d.getAttribute("rendered")))){var g={};d.isAttributeDefined("type")&&(g.type=d.getAttribute("type"));d.isAttributeDefined("pointX")&&d.isAttributeDefined("pointY")?(g.x=d.getAttribute("pointX"),g.y=d.getAttribute("pointY")):d.isAttributeDefined("address")&&(g.address=d.getAttribute("address"));
d.isAttributeDefined("id")&&(g.id=d.getAttribute("id"));d=d.getChildren();0<d.length&&"marker"===d[0].getTag().getName()&&(g._rowKey=e,dvtm.processGeographicMapDataItem(a,g,d[0]));b.data.push(g)}};dvtm.processGeographicMapDataItem=function(a,b,d){if(!d.isAttributeDefined("rendered")||!amx.isValueFalse(d.getAttribute("rendered")))if(d.isAttributeDefined("source")&&(b.source=amx.buildRelativePath(d.getAttribute("source"))),d.isAttributeDefined("sourceHover")&&(b.sourceHover=amx.buildRelativePath(d.getAttribute("sourceHover"))),
d.isAttributeDefined("sourceSelected")&&(b.sourceSelected=amx.buildRelativePath(d.getAttribute("sourceSelected"))),d.isAttributeDefined("sourceHoverSelected")&&(b.sourceHoverSelected=amx.buildRelativePath(d.getAttribute("sourceHoverSelected"))),d.isAttributeDefined("shortDesc")&&(b.shortDesc=d.getAttribute("shortDesc")),b.clientId=d.getId(),d.isAttributeDefined("action"))b.action=d.getAttribute("action");else{var a=!1,e;e=d.getTag().findTags(dvtm.AMX_NAMESPACE,"setPropertyListener");0<e.length?a=
!0:(e=d.getTag().findTags(dvtm.AMX_NAMESPACE,"showPopupBehavior"),0<e.length&&(a=!0));a&&(b.action=b._rowKey)}};dvtm.apiCheckPeriodInMs=250;dvtm.apiCheckMaxTimeInMs=1E4;dvtm.apiCheckCountMax=Math.round(dvtm.apiCheckMaxTimeInMs/dvtm.apiCheckPeriodInMs);dvtm.apiCheckCount=0;dvtm.geoMapContext={amxNode:null,mapCavas:null,width:0,height:0,timer:null};window.renderMap=function(){var a=dvtm.geoMapContext.amxNode,b=a._dataObj,d=dvtm.geoMapContext.mapCanvas,e=dvtm.geoMapContext.width,g=dvtm.geoMapContext.height,
h=dvtm.geoMapContext.timer,a=a[dvtm.COMPONENT_INSTANCE];try{window._isGeoMapApiSuccessfullyLoaded(a.getMapProvider())?(h&&(clearTimeout(h),dvtm.geoMapContext.timer=null),a.render(d,b,e,g)):h?dvtm.apiCheckCount>=dvtm.apiCheckCountMax?h&&(dvtm.geoMapContext.timer=null):(dvtm.apiCheckCount++,dvtm.geoMapContext.timer=setTimeout(renderMap,dvtm.apiCheckPeriodInMs)):adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.geographicMap","renderGeographicMap","Failed to load Map API!")}catch(k){throw h&&(clearTimeout(h),
dvtm.geoMapContext.timer=null),k;}};dvtm.renderGeographicMap=function(a,b){var d=b._optionsObj,e=b[dvtm.COMPONENT_INSTANCE],g=dvtm.getComponentWidth(a,b),h=dvtm.getComponentHeight(a,b);dvtm.isOptionsDirty(b);if(!e){var k={callback:function(d){var e=d.getType();if(e==DvtSelectionEvent.TYPE){for(var e=[],g=d.getSelection(),h=d.getParamValue("dataLayerIdx"),d=0;d<g.length;d++){var k=null;g[d].rowKey&&(k=g[d].rowKey);null!=k&&e.push(k)}var m=new amx.SelectionEvent(e,e);amx.processAmxEvent(a,"selection",
void 0,void 0,m).always(function(){var a=[],d=[];a.push(m);d.push(m[".type"]);var e=b._selectionListenerCache[h];e&&amx.invokeEl(e,a,null,d)})}else if(e==DvtMapActionEvent.TYPE&&(e=d.getClientId()))if(g=dvtm.findDataLayerIdByIndex(b,d.getParamValue("dataLayerIdx")))if(g=dvtm.findDataLayerNodeById(b,g))if(d=g.getAttribute("value")?g.getChildren(null,d.getRowKey())[0]:g.getChildren()[parseInt(d.getRowKey())-1]){for(var n=null,d=d.getChildren(),g=0;g<d.length;g++)if(d[g].getId()===e){n=d[g];break}n&&
(d=new amx.ActionEvent,amx.processAmxEvent(n,"action",void 0,void 0,d).always(function(){var a=n.getTag().getAttribute("action");null!=a&&adf.mf.api.amx.doNavigation(a)}))}}},e=DvtGeographicMap.newInstance(k.callback,k,d);b[dvtm.COMPONENT_INSTANCE]=e}dvtm.setOptionsDirty(b,!1);var k=document.getElementById(b.getId()+"_canvas"),m=null,n=null,o=null,q=null,s=null,t=!1,d=["#{applicationScope.configuration.mapProvider}","#{applicationScope.configuration.geoMapKey}","#{applicationScope.configuration.geoMapClientId}",
"#{applicationScope.configuration.mapViewerUrl}","#{applicationScope.configuration.baseMap}"];dvtm.geoMapContext.amxNode=b;dvtm.geoMapContext.width=g;dvtm.geoMapContext.height=h;dvtm.geoMapContext.mapCanvas=k;g=function(d,g){if(g&&0<g.length)for(var h=0;h<g.length;h++){var k=g[h].name,y=g[h].value;if("string"==typeof y||y instanceof String)switch(k){case "#{applicationScope.configuration.mapProvider}":m=y;break;case "#{applicationScope.configuration.geoMapKey}":n=y;break;case "#{applicationScope.configuration.geoMapClientId}":o=
y;break;case "#{applicationScope.configuration.mapViewerUrl}":q=y;break;case "#{applicationScope.configuration.baseMap}":s=y}else"boolean"==typeof y&&"#{applicationScope.configuration.accessibilityEnabled}"==k&&(t=y)}m=m&&("googlemaps"==m.toLowerCase()||"oraclemaps"==m.toLowerCase())?m.toLowerCase():"googlemaps";e.setMapProvider(m);t&&e.setScreenReaderMode(t);window._isGeoMapApiSuccessfullyLoaded=function(a){return"googlemaps"==a?"object"===typeof google&&"object"===typeof google.maps&&"undefined"!==
typeof google.maps.LatLng:"oraclemaps"==a?"undefined"!==typeof MVSdoGeometry:!0};var z=function(){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.geographicMap","renderGeographicMap","Failed to load Map API!");dvtm.mapAPILoaded=!1;$(this).remove();C()},A=function(){a.children(".dvtm-geographicMap-loadPage").each(function(){$(this).remove()})},F=function(){A();var b=document.createElement("div");adf.mf.internal.amx.addCSSClassName(b,"dvtm-geographicMap-loadPage");var d=document.createElement("div"),
e=document.createElement("div");e.appendChild(document.createTextNode(adf.mf.resource.getInfoString("AMXInfoBundle","dvtm_geographicMap_LOADING_API")));d.appendChild(e);b.appendChild(d);a.append(b)},C=function(){A();var d=document.createElement("div");adf.mf.internal.amx.addCSSClassName(d,"dvtm-geographicMap-loadPage");var e=document.createElement("div"),g=document.createElement("div");g.appendChild(document.createTextNode(adf.mf.resource.getInfoString("AMXInfoBundle","dvtm_geographicMap_FAILED_LOAD_API")));
e.appendChild(g);var h=document.createElement("div");h.setAttribute("tabindex","0");g=document.createElement("label");adf.mf.internal.amx.addCSSClassName(g,"amx-commandButton-label");g.appendChild(document.createTextNode(adf.mf.resource.getInfoString("AMXInfoBundle","dvtm_geographicMap_RELOAD_BUTTON_LABEL")));h.appendChild(g);h.setAttribute("role","button");adf.mf.internal.amx.addCSSClassName(h,"amx-node");adf.mf.internal.amx.addCSSClassName(h,"amx-commandButton");$(h).tap(function(){dvtm.renderGeographicMap(a,
b)});e.appendChild(h);d.appendChild(e);a.append(d)},k=function(a,b){dvtm.mapAPILoaded||F();var d=new XMLHttpRequest;d.onreadystatechange=function(){if(4==d.readyState)if(200==d.status){var e=!1;(e="googlemaps"==b?-1!=d.responseText.indexOf("google.maps"):"oraclemaps"==b?-1!=d.responseText.indexOf("MVSdoGeometry"):!0)?dvtm.mapAPILoaded?(dvtm.geoMapContext.timer&&clearTimeout(dvtm.geoMapContext.timer),dvtm.geoMapContext.timer=setTimeout(renderMap,dvtm.apiCheckPeriodInMs)):(dvtm.mapAPILoaded=!0,"googlemaps"==
m?dvtm.loadJS(a,null,z):"oraclemaps"==m&&dvtm.loadJS(a,renderMap,z)):C()}else C()};d.open("GET",a,!0);d.send()};"oraclemaps"==m?(null==q&&(q="http://elocation.oracle.com/mapviewer"),null==s&&(s="ELOCATION_MERCATOR.WORLD_MAP"),e.setMapViewerUrl(q),e.setBaseMap(s),h=q+"/fsmc/jslib/oraclemaps.js",k(h,m)):"googlemaps"==m&&(h=n?"http://maps.googleapis.com/maps/api/js?sensor=false&callback=renderMap&key="+n:o?"http://maps.googleapis.com/maps/api/js?sensor=false&callback=renderMap&client="+o:"http://maps.googleapis.com/maps/api/js?sensor=false&callback=renderMap",
k(h,m))};adf.mf.internal.isJavaAvailable()?adf.mf.el.getValue(d,g,g):g(null,null)};dvtm.setCssBasedGeographicMapProperties=function(a,b){var d=b._optionsObj;dvtm.setOptionsDirty(b,!0);var e=a.css("background-color");e&&(d["background-color"]={"background-color":e})}})();
(function(){amx.registerRenderers("dvtm",{sparkChart:{createChildrenNodes:function(a){var b,d;a._currentRowKeys=[];if(!amx.dtmode){a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL);if(!a.isAttributeDefined("value"))return!0;d=a.getAttribute("value");if(void 0===d||null==d)return!0;var e=a.getAttribute("var");b=adf.mf.api.amx.createIterator(d);if(b.getTotalCount()>b.getAvailableCount())return adf.mf.api.amx.showLoadingIndicator(),adf.mf.api.amx.bulkLoadProviders(d,0,-1,function(){try{adf.mf.internal.amx.markNodeForUpdate(a,
{value:!0})}finally{adf.mf.api.amx.hideLoadingIndicator()}},function(){adf.mf.api.adf.logInfoResource("AMXInfoMessageBundle",adf.mf.log.level.SEVERE,"createChildrenNodes","MSG_ITERATOR_FIRST_NEXT_ERROR",req,resp);adf.mf.api.amx.hideLoadingIndicator()}),a.setState(adf.mf.api.amx.AmxNodeStates.INITIAL),!0;for(;b.hasNext();)d=b.next(),a._currentRowKeys.push(b.getRowKey()),adf.mf.el.addVariable(e,d),a.createStampedChildren(b.getRowKey(),["dataStamp"]),adf.mf.el.removeVariable(e)}b=a.getTag().getChildren(dvtm.DVTM_NAMESPACE,
"referenceObject");for(b=adf.mf.api.amx.createIterator(b);b.hasNext();)d=b.next(),e=d.buildAmxNode(a),a.addChild(e);a.setState(adf.mf.api.amx.AmxNodeStates.ABLE_TO_RENDER);return!0},visitChildren:function(a,b,d){for(var e=a.getChildren(),g=0;g<e.length;g++)e[g].visit(b,d);g=a.getAttribute("value");if(void 0===g)return a.visitStampedChildren(null,null,null,b,d);e=a.getAttribute("var");for(g=adf.mf.api.amx.createIterator(g);g.hasNext();){var h=g.next();adf.mf.el.addVariable(e,h);try{if(a.visitStampedChildren(g.getRowKey(),
["dataStamp"],null,b,d))return!0}finally{adf.mf.el.removeVariable(e)}}return!1},create:function(a){dvtm.initChartAmxNode(a);dvtm.setCommonChartProperties(a);var b=dvtm.setupChartDiv(a);try{amx.dtmode?dvtm.processSparkDummyData(a):dvtm.processSparkChildTags(a)}catch(d){b._readyToRender=!1,adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.sparkChart","create","Exception: "+d.message)}return b},init:function(a,b){dvtm.initChartDomNode(a,b)},postDisplay:function(a,b){dvtm.renderChart(a,b)},updateChildren:function(a,
b){return dvtm.updateChildrenNodes(a,b)},refresh:function(a,b){return dvtm.refreshChart(a,b)},destroy:function(a,b){dvtm.destroyChartDomNode(a,b)}}})})();
(function(){dvtm.DefaultThematicMapStyle={};dvtm.DefaultThematicMapStyle.VERSION_1={areaSelected:{borderColor:"#000000",borderWidth:"1.5px"},areaHover:{borderColor:"#FFFFFF",borderWidth:"2.0px"},marker:{scaleX:1,scaleY:1,type:"circle"},legend:{position:"auto"},styleDefaults:{colors:"#003366,#CC3300,#666699,#006666,#FF9900,#993366,#99CC33,#624390,#669933,#FFCC33,#006699,#EBEA79".split(","),shapes:"circle,square,plus,diamond,triangleUp,triangleDown,human".split(",")}};dvtm.DefaultThematicMapStyle.SKIN_ALTA=
{styleDefaults:{colors:"#267db3,#68c182,#fad55c,#ed6647,#8561c8,#6ddbdb,#ffb54d,#e371b2,#47bdef,#a2bf39,#a75dba,#f7f37b".split(","),shapes:"circle,square,diamond,plus,triangleUp,triangleDown,human".split(",")}};dvtm.THEMATICMAP_DEFAULT_TOP_LAYER_MAPPING={world:"continents",worldRegions:"regions",usa:"country",africa:"continent",asia:"continent",australia:"continent",europe:"continent",northAmerica:"continent",southAmerica:"continent",apac:"region",emea:"region",latinAmerica:"region",usaAndCanada:"region"}})();
(function(){var a={};amx.registerRenderers("dvtm",{thematicMap:{create:function(a){var d=dvtm.setupThematicMapDiv(a);try{dvtm.initThematicMapAmxNode(a),amx.dtmode?dvtm.prepareThematicMapDTMode(a):(dvtm.setThematicMapProperties(a),dvtm.processThematicMapChildren(a))}catch(e){d._readyToRender=!1,e instanceof dvtm.exception.NodeNotReadyToRenderException?adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.thematicMap","create",e):adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.thematicMap",
"create","Exception: "+e.message)}return d},init:function(a,d){dvtm.initThematicMapDomNode(a,d)},postDisplay:function(a,d){!0===a._readyToRender&&dvtm.renderThematicMap(a,d)},refresh:function(a,d){var e=$(document.getElementById(a.getId()));dvtm.initThematicMapAmxNodeForRefresh(a,d);try{dvtm.setThematicMapProperties(a),dvtm.processThematicMapChildren(a),dvtm.renderThematicMap(e,a)}catch(g){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.thematicMap","refresh","Exception: "+g.message)}},destroy:function(a,
d){dvtm.removeResizeCallback(d.getId())}},pointDataLayer:dvtm.dataLayerRenderer,areaDataLayer:dvtm.dataLayerRenderer});dvtm.setupThematicMapDiv=function(a){var d="",e=a.getId();void 0!=e&&(d='id="'+e+'"');d=$("<div "+d+' style="width: 100%; height: 100%;"></div>');d._readyToRender=!0;dvtm.setupLegendDiv(a,d);a=$('<div class="dvtm-area" style="display:none;"></div>');d.append(a);a=$('<div class="dvtm-areaLayer" style="display:none;"></div>');d.append(a);a=$('<div class="dvtm-marker" style="display:none;"></div>');
d.append(a);return d};dvtm.initThematicMapAmxNode=function(a){void 0==a._optionsObj&&(a._optionsObj={animationDuration:1E3,animationOnDisplay:"none",animationOnMapChange:"none",basemap:{},zooming:"none",panning:"none",initialZooming:"none",tooltipDisplay:"auto",areaLayers:[],layers:[],areaLayerStyle:{},areaStyles:{area:{},selected:{},hover:{}},markerStyle:{},legend:{}});a._dataObj=a.isAttributeDefined("data")?a.getAttribute("data"):{dataLayers:[],legend:{}};a[dvtm.COMPONENT_INSTANCE]=null;a._attributeGroups=
[];a._stylesResolved=!1;void 0==a._selectionListenerCache&&(a._selectionListenerCache={});dvtm.loadCanvasToolkitJs()};dvtm.loadMapLayerAndResource=function(a,d){var e=a.charAt(0).toUpperCase()+a.slice(1),g=d.charAt(0).toUpperCase()+d.slice(1);amx.includeJs("js/thematicMap/basemaps/"+("DvtBaseMap"+e+g+".js"));-1===adf.mf.locale.getUserLanguage().indexOf("en")&&dvtm.loadDvtResources("js/thematicMap/resource/"+(e+g+"Bundle"))};dvtm.initThematicMapDomNode=function(a,d){dvtm.initDvtmComponent(a,d,dvtm.renderThematicMap)};
dvtm.initThematicMapAmxNodeForRefresh=function(a,d){a._refreshing=!0;a._attributeChanges=d;dvtm.setOptionsDirty(newAmxNode,!1);d.hasChanged("value")&&(a._dataObj={dataLayers:[]},a._attributeGroups=[],a._rowKeyCache={})};dvtm._getCustomBaseMapMetadata=function(b){if(a[b])return a[b];var d=new XMLHttpRequest;d.open("GET",b,!1);d.send();if(4==d.readyState&&XMLSerializer){for(var d=(new DOMParser).parseFromString(d.responseText,"text/xml"),e=d.getElementsByTagName("layer"),g=0;g<e.length;g++)for(var h=
e[g].getElementsByTagName("image"),k=0;k<h.length;k++){var m=h[k].getAttribute("source"),m=amx.buildRelativePath(m);h[k].setAttribute("source",m)}d=(new XMLSerializer).serializeToString(d);return a[b]=d}return null};dvtm.setThematicMapProperties=function(a){var d=a._optionsObj,e;a._refreshing||(e=dvtm.isSkyros()?dvtm.DefaultThematicMapStyle.VERSION_1:DvtJSONUtils.merge(dvtm.DefaultThematicMapStyle.SKIN_ALTA,dvtm.DefaultThematicMapStyle.VERSION_1),e=void 0!=window.CustomThematicMapStyle?DvtJSONUtils.merge(window.CustomThematicMapStyle,
e):e,dvtm.setOptionsDirty(a,!0),a._optionsObj=DvtJSONUtils.merge(e,d),d=a._optionsObj);e.marker.type&&(d.markerStyle.type=e.marker.type);void 0!=e.marker.scaleX&&(d.markerStyle.scaleX=e.marker.scaleX);void 0!=e.marker.scaleY&&(d.markerStyle.scaleY=e.marker.scaleY);var g="";e.areaSelected.borderColor&&(g=g+"border-color:"+e.areaSelected.borderColor+";");e.areaSelected.borderWidth&&(g=g+"border-width:"+e.areaSelected.borderWidth+";");d.selectStyle=g;g="";e.areaHover.borderColor&&(g=g+"border-color:"+
e.areaHover.borderColor+";");e.areaHover.borderWidth&&(g=g+"border-width:"+e.areaHover.borderWidth+";");d.hoverStyle=g;a.isAttributeDefined("animationDuration")&&(d.animationDuration=a.getAttribute("animationDuration"));a.isAttributeDefined("animationOnDisplay")&&(d.animationOnDisplay=a.getAttribute("animationOnDisplay"));a.isAttributeDefined("animationOnMapChange")&&(d.animationOnMapChange=a.getAttribute("animationOnMapChange"));a.isAttributeDefined("initialZooming")&&(d.initialZooming=a.getAttribute("initialZooming"));
a.isAttributeDefined("initialZooming")&&(d.initialZooming=a.getAttribute("initialZooming"));a.isAttributeDefined("zooming")&&(d.zooming=a.getAttribute("zooming"));a.isAttributeDefined("panning")&&(d.panning=a.getAttribute("panning"));a.isAttributeDefined("source")&&(d.source=amx.buildRelativePath(a.getAttribute("source")),d.customBasemap=dvtm._getCustomBaseMapMetadata(d.source));a.isAttributeDefined("basemap")&&(d.basemap=a.getAttribute("basemap"));a.isAttributeDefined("tooltipDisplay")&&(d.tooltipDisplay=
a.getAttribute("tooltipDisplay"))};dvtm.prepareThematicMapDTMode=function(a){var d=a._optionsObj,a=dvtm._findDTModeBaseMapAndLayer(a);null==a.basemap||null==a.layer?(d.basemap="world",dvtm._createDTModeAreaLayer(d,"continents")):(d.basemap=a.basemap,dvtm._createDTModeAreaLayer(d,a.layer))};dvtm._findDTModeBaseMapAndLayer=function(a){var d=null,e=null;if(a.isAttributeDefined("basemap")&&!a.isAttributeDefined("source")&&(d=dvtm._nullIfEl(a.getAttribute("basemap")),null!=d)){for(var a=a.getChildren(),
g=0;g<a.length&&!("areaLayer"==a[g].getTag().getName()&&(e=dvtm._nullIfEl(a[g].getAttribute("layer")),null!=e));g++);null==e&&(e=dvtm._getDTModeTopLayer(d))}return{basemap:d,layer:e}};dvtm._getDTModeTopLayer=function(a){return(a=dvtm.THEMATICMAP_DEFAULT_TOP_LAYER_MAPPING[a])?a:null};dvtm._nullIfEl=function(a){return!a||null==a||-1<a.indexOf("#{")?null:a};dvtm._createDTModeAreaLayer=function(a,d){a.layers||(a.layers=[]);var e={type:"area"};e.layer=d;dvtm.loadMapLayerAndResource(a.basemap,e.layer);
a.layers.push(e)};dvtm.processThematicMapChildren=function(a){adf.mf.internal.perf.start("dvtm.processThematicMapChildren",a.getTag().getName());var d=a.getChildren();if(!a._refreshing||a._attributeChanges.hasChanged("value"))for(var e=0;e<d.length;e++)switch(d[e].getTag().getName()){case "legend":dvtm.processLegendNode(a,d[e]);break;case "areaLayer":dvtm.processAreaLayerNode(a,d[e]);break;case "pointDataLayer":var g=dvtm.processPointDataLayerNode(a,a,d[e],d[e],!0);!a._optionsObj.source&&g&&dvtm.loadMapLayerAndResource(a._optionsObj.basemap,
"cities")}adf.mf.internal.perf.stop("dvtm.processThematicMapChildren",a.getTag().getName())};dvtm.processAreaLayerNode=function(a,d){if(!d.isAttributeDefined("rendered")||!amx.isValueFalse(d.getAttribute("rendered"))){dvtm.setThematicMapLayerProperties("area",a,d);for(var e=d.getChildren(),g=0;g<e.length;g++)switch(e[g].getTag().getName()){case "areaDataLayer":dvtm.processAreaDataLayerNode(a,d,e[g]);break;case "pointDataLayer":var h=dvtm.processPointDataLayerNode(a,d,e[g],!1);!a._optionsObj.source&&
h&&dvtm.loadMapLayerAndResource(a._optionsObj.basemap,"cities")}}};dvtm.processAreaDataLayerNode=function(a,d,e){if(!e.isAttributeDefined("rendered")||!amx.isValueFalse(e.getAttribute("rendered"))){if(!e.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;var g=a._dataObj,h={};h.associatedLayer=d.getAttribute("layer");void 0!=e.getId()&&(h.id=e.getId());e.isAttributeDefined("animationDuration")&&(h.animationDuration=e.getAttribute("animationDuration"));e.isAttributeDefined("animationOnDataChange")&&
(h.animationOnDataChange=e.getAttribute("animationOnDataChange"));e.isAttributeDefined("disclosedRowKey")&&(h.disclosedRowKey=e.getAttribute("disclosedRowKey"));e.isAttributeDefined("isolatedRowKey")&&(h.isolatedRowKey=e.getAttribute("isolatedRowKey"));e.isAttributeDefined("selectedRowKeys")&&(h.selectedRowKeys=e.getAttribute("selectedRowKeys"));e.isAttributeDefined("dataSelection")&&(h.dataSelection=e.getAttribute("dataSelection"));e.getTag().getAttribute("selectionListener")&&(d=a._selectionListenerCache,
void 0==d[e.getId()]&&(d[e.getId()]=e.getTag().getAttribute("selectionListener")));e.isAttributeDefined("emptyText")&&(h.emptyText=e.getAttribute("emptyText"));d=e.getAttribute("var");h.data=[];var k=e.getAttribute("value");if(k)for(k=adf.mf.api.amx.createIterator(k);k.hasNext();){var m=k.next(),n=e.getChildren(null,k.getRowKey());adf.mf.el.addVariable(d,m);for(n=adf.mf.api.amx.createIterator(n);n.hasNext();){var o=n.next(),q=m.rowKey();dvtm.processAreaLocation(a,h,o,q)}adf.mf.el.removeVariable(d)}else{e=
e.getChildren();for(e=adf.mf.api.amx.createIterator(e);e.hasNext();)d=e.next(),k=""+(e.getRowKey()+1),dvtm.processAreaLocation(a,h,d,k)}g.dataLayers.push(h)}};dvtm.processAreaLocation=function(a,d,e,g){if("areaLocation"==e.getTag().getName()&&(!e.isAttributeDefined("rendered")||amx.isValueTrue(e.getAttribute("rendered"))))for(var h=e.getChildren(),k=0;k<h.length;k++){var m={};m.location=e.getAttribute("name");m.type=h[k].getTag().getName();m._rowKey=g;dvtm.processThematicMapDataItem(a,m,h[k]);d.data.push(m)}};
dvtm.processPointDataLayerNode=function(a,d,e,g){var h=!1;if(e.isAttributeDefined("rendered")&&amx.isValueFalse(e.getAttribute("rendered")))return h;if(!e.isRendered())throw new dvtm.exception.NodeNotReadyToRenderException;var k=a._dataObj;g&&dvtm.setThematicMapLayerProperties("point",a,e);var m={};d.isAttributeDefined("layer")&&(m.associatedLayer=d.getAttribute("layer"));void 0!=e.getId()&&(m.id=e.getId());g||(m.associatedWith=e.getAttribute("layer"));e.isAttributeDefined("animationDuration")&&(m.animationDuration=
e.getAttribute("animationDuration"));e.isAttributeDefined("animationOnDataChange")&&(m.animationOnDataChange=e.getAttribute("animationOnDataChange"));e.isAttributeDefined("selectedRowKeys")&&(m.selectedRowKeys=e.getAttribute("selectedRowKeys"));e.isAttributeDefined("dataSelection")&&(m.dataSelection=e.getAttribute("dataSelection"));e.getTag().getAttribute("selectionListener")&&(d=a._selectionListenerCache,void 0==d[e.getId()]&&(d[e.getId()]=e.getTag().getAttribute("selectionListener")));e.isAttributeDefined("emptyText")&&
(m.emptyText=e.getAttribute("emptyText"));d=e.getAttribute("var");m.data=[];if(g=e.getAttribute("value"))for(g=adf.mf.api.amx.createIterator(g);g.hasNext();){var n=g.next(),o=e.getChildren(null,g.getRowKey());adf.mf.el.addVariable(d,n);for(o=adf.mf.api.amx.createIterator(o);o.hasNext();)var q=o.next(),s=n.rowKey(),h=dvtm._processPointLocationNode(a,m,q,s,h);adf.mf.el.removeVariable(d)}else{e=e.getChildren();for(e=adf.mf.api.amx.createIterator(e);e.hasNext();)d=e.next(),g=""+(e.getRowKey()+1),h=dvtm._processPointLocationNode(a,
m,d,g,h)}k.dataLayers.push(m);return h};dvtm._processPointLocationNode=function(a,d,e,g,h){if("pointLocation"!=e.getTag().getName())return h;if(!e.isAttributeDefined("rendered")||amx.isValueTrue(e.getAttribute("rendered"))){var k=e.getChildren();if(0<k.length){var m={};e.isAttributeDefined("pointName")?(h=!0,m.location=e.getAttribute("pointName")):e.isAttributeDefined("pointX")&&e.isAttributeDefined("pointY")&&(m.x=e.getAttribute("pointX"),m.y=e.getAttribute("pointY"));m.type="marker";m._rowKey=g;
dvtm.processThematicMapDataItem(a,m,k[0]);d.data.push(m)}}return h};dvtm.processThematicMapDataItem=function(a,d,e){var g=a._optionsObj;if(e.isAttributeDefined("rendered")&&amx.isValueFalse(e.getAttribute("rendered")))return null;d.attrGroups=[];for(var h=e.getChildren(),k=0,h=adf.mf.api.amx.createIterator(h);h.hasNext();){var m=h.next();dvtm.processAttributeGroup(a,d,m,k);k++}if(0<d.attrGroups.length)for(k=0;k<d.attrGroups.length;k++){var h=d.attrGroups[k].attrGroup,m=d.attrGroups[k].valueIndex,
n=dvtm.getAttributeFromGroup(a,"color",h,m);null!=n&&(d.color=n);n=dvtm.getAttributeFromGroup(a,"shape",h,m);null!=n&&(d.shape=n);void 0==d.categories&&(d.categories=[]);d.categories.push(h.items[m].value)}e.isAttributeDefined("source")&&(d.source=amx.buildRelativePath(e.getAttribute("source")));e.isAttributeDefined("sourceHover")&&(d.sourceHover=amx.buildRelativePath(e.getAttribute("sourceHover")));e.isAttributeDefined("sourceSelected")&&(d.sourceSelected=amx.buildRelativePath(e.getAttribute("sourceSelected")));
e.isAttributeDefined("sourceHoverSelected")&&(d.sourceHoverSelected=amx.buildRelativePath(e.getAttribute("sourceHoverSelected")));e.isAttributeDefined("fillColor")&&(d.color=e.getAttribute("fillColor"));e.isAttributeDefined("fillPattern")&&(d.fillPattern=e.getAttribute("fillPattern"));e.isAttributeDefined("gradientEffect")&&(d.gradientEffect=e.getAttribute("gradientEffect"));e.isAttributeDefined("opacity")&&(d.opacity=e.getAttribute("opacity"));e.isAttributeDefined("labelDisplay")&&(d.labelDisplay=
e.getAttribute("labelDisplay"));e.isAttributeDefined("labelStyle")&&(d.labelStyle=e.getAttribute("labelStyle"));e.isAttributeDefined("shortDesc")&&(d.shortDesc=e.getAttribute("shortDesc"));e.isAttributeDefined("value")&&(d.label=e.getAttribute("value"));e.isAttributeDefined("labelPosition")&&(d.labelPosition=e.getAttribute("labelPosition"));e.isAttributeDefined("width")&&(d.width=e.getAttribute("width"));e.isAttributeDefined("height")&&(d.height=e.getAttribute("height"));e.isAttributeDefined("scaleX")?
d.scaleX=e.getAttribute("scaleX"):"marker"==d.type&&!e.isAttributeDefined("scaleX")&&(d.scaleX=g.markerStyle.scaleX);e.isAttributeDefined("scaleY")?d.scaleY=e.getAttribute("scaleY"):"marker"==d.type&&!e.isAttributeDefined("scaleY")&&(d.scaleY=g.markerStyle.scaleY);d.shape||(e.isAttributeDefined("shape")?d.shape=e.getAttribute("shape"):"marker"==d.type&&!e.isAttributeDefined("shape")&&(d.shape=g.markerStyle.type));d.clientId=e.getId();e.isAttributeDefined("action")?d.action=e.getAttribute("action"):
(a=!1,g=e.getTag().findTags(dvtm.AMX_NAMESPACE,"setPropertyListener"),0<g.length?a=!0:(g=e.getTag().findTags(dvtm.AMX_NAMESPACE,"showPopupBehavior"),0<g.length&&(a=!0)),a&&(d.action=d._rowKey))};dvtm.setThematicMapLayerProperties=function(a,d,e){var g=d._optionsObj;g.layers||(g.layers=[]);var h={labelDisplay:"auto",labelType:"short"};dvtm.setOptionsDirty(d,!0);e.isAttributeDefined("layer")?(h.layer=e.getAttribute("layer"),g.source||dvtm.loadMapLayerAndResource(g.basemap,h.layer),a&&(h.type=a),e.isAttributeDefined("areaLabelDisplay")&&
(h.labelDisplay=e.getAttribute("areaLabelDisplay")),e.isAttributeDefined("labelStyle")&&(h.labelStyle=e.getAttribute("labelStyle")),e.isAttributeDefined("labelType")&&(h.labelType=e.getAttribute("labelType")),e.isAttributeDefined("animationDuration")&&(h.animationDuration=e.getAttribute("animationDuration")),e.isAttributeDefined("animationOnLayerChange")&&(h.animationOnLayerChange=e.getAttribute("animationOnLayerChange")),g.layers.push(h)):(h.layer="cities",h.type="point")};dvtm.getThematicMapStageId=
function(a){var d="";return d=dvtm.isSvgAvailable()?a.getId()?a.getId()+"_svg":"tmap_svg":a.getId()?a.getId()+"_canvas":"tmap_canvas"};dvtm.renderThematicMap=function(a,d){var e=null,g=null,h=dvtm.getThematicMapStageId(d),k=h.replace(/\:/g,"\\:");adf.mf.internal.perf.start("dvtm.renderThematicMap",d.getTag().getName());var m=!dvtm.isSvgAvailable();try{dvtm.isAncestor(document.body,a.get(0))?g=a:(adf.mf.log.Framework.logp(adf.mf.log.level.INFO,"dvtm.thematicMap","renderThematicMap","Rendering thematicMap on a disconnected DOM node."),
e=a.clone(),e.attr("id",a.attr("id")+"_temp"),e.css("position","absolute"),e.css("left","-1000px"),e.css("top","-1000px"),$("body").append(e),g=e);var n=d._optionsObj,o=d._dataObj,q=d._refreshing,s=d[dvtm.COMPONENT_INSTANCE];d._stylesResolved||dvtm.setCssBasedThematicMapProperties(g.get(0),d);var t=dvtm.getComponentWidth(g,d),u=dvtm.getComponentHeight(g,d),v;m?g.find("canvas").remove():q&&dvtm.isOptionsDirty(d)&&g.find("svg").remove();if(dvtm.isOptionsDirty(d)||!s){if(m){var w=DvtCanvasUtils.createCanvasDocument(t,
u,h);g.append(w);v=new DvtCanvasContext(w)}else{var x=DvtSvgUtils.createSvgDocument(h);g.append(x);v=new DvtSvgContext(x)}g={callback:function(e){var g=e.getType();if(g==DvtSelectionEvent.TYPE){var h=new amx.SelectionEvent(null,e.getSelection());amx.processAmxEvent(a,"selection",void 0,void 0,h).always(function(){var a=d._selectionListenerCache[e.getParamValue("clientId")];a&&amx.invokeEl(a,[h],null,[h[".type"]])})}else if(g==DvtMapActionEvent.TYPE&&(g=dvtm.findDataLayerNodeById(d,e.getParamValue("clientId")))){var k;
if(k=g.getAttribute("value")?g.getChildren(null,e.getRowKey())[0]:g.getChildren()[parseInt(e.getRowKey())-1])if(g=e.getClientId()){var m=null;k=k.getChildren();for(var n=0;n<k.length;n++)if(k[n].getId()===g){m=k[n];break}m&&(g=new amx.ActionEvent,amx.processAmxEvent(m,"action",void 0,void 0,g).always(function(){var a=m.getTag().getAttribute("action");null!=a&&adf.mf.api.amx.doNavigation(a)}))}}}};d.isAttributeDefined("selectionListener")&&(g.selectionListener=d.getAttribute("selectionListener"));
s=DvtAmxThematicMap.newInstance(v,g.callback,g,n);v.getStage().addChild(s);d[dvtm.COMPONENT_INSTANCE]=s;dvtm.setOptionsDirty(d,!1)}s.setId(h);s.render(o,t,u);if(e){var y=e.find("svg[id="+k+"]").detach();a.prepend(y);e.remove()}}catch(z){adf.mf.log.Framework.logp(adf.mf.log.level.SEVERE,"dvtm.thematicMap","renderThematicMap","Exception: "+z.message),e&&e.remove(),m?a.find("canvas").remove():a.find("svg").remove()}finally{adf.mf.internal.perf.stop("dvtm.renderThematicMap",d.getTag().getName())}};dvtm.setCssBasedThematicMapProperties=
function(a,d){var e=d._optionsObj;d.getId().replace(/\:/g,"\\:");var g=dvtm._getComputedStyle(a);dvtm.setOptionsDirty(d,!0);(g=g["background-color"])&&(e["background-color"]={"background-color":g});var h=a.querySelector(".dvtm-areaLayer"),g=dvtm._getComputedStyle(h),h=this.buildCssStyleString(h);g["border-bottom-color"]&&(h+="border-color: "+g["border-bottom-color"]+";");g["border-bottom-width"]&&(h+="border-width: "+g["border-bottom-width"]+";");g["background-color"]&&(h+="background-color: "+g["background-color"]+
";");e.areaLayerStyle=h;g=a.querySelector(".dvtm-area");g=dvtm._getComputedStyle(g);g["border-bottom-color"]&&(e.areaStyles.area["border-color"]=g["border-bottom-color"]);g["border-bottom-width"]&&(e.areaStyles.area["border-width"]=g["border-bottom-width"]);g=a.querySelector(".dvtm-marker");h=dvtm._getComputedStyle(g);h["background-color"]&&(e.markerStyle["background-color"]=h["background-color"]);h.opacity&&(e.markerStyle.opacity=h.opacity);g=this.buildCssStyleString(g);e.markerStyle.textStyle=g;
dvtm.setCssBasedLegendProperties(a,d);d._stylesResolved=!0}})();