// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:widgets/Infographic/setting/dijitsSetting/_dijits/Mark/Mark.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"header" data-dojo-attach-event\x3d"click:_onArrowClicked" class\x3d"header fx-sb"\x3e\r\n\t\t\x3cdiv  data-dojo-attach-point\x3d"title" class\x3d"text textOverFlow"\x3e\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"actions fx-sa"\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"arrow" class\x3d"icon-ct arrow-up"\x3e\x3c/div\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-event\x3d"click:_onDeleteClicked" class\x3d"icon-ct delete"\x3e\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"content" class\x3d"mark-content"\x3e\x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dijit/_WidgetBase dojo/Evented dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./Mark.html dojo/on dojo/_base/html ./MarkLine ./MarkArea jimu/utils dijit/form/Select jimu/dijit/CheckBox".split(" "),function(g,h,k,l,m,n,f,c,p,q,e){return g([h,k,l,m],{baseClass:"infographic-setting-mark",templateString:n,nls:null,closed:!1,constructor:function(){this.uniqueID=e.getRandomString()},postCreate:function(){this.inherited(arguments);this._createMark(this.type,this.config);
this._updateTitleByConfig(this.config)},getConfig:function(){if(this.mark)return this.mark.getConfig()},setConfig:function(a){this.mark&&this.mark.setConfig(a)},_onChange:function(){this.emit("change")},_createMark:function(a,b){"line"===a?this.mark=new p({chartType:this.chartType,nls:this.nls,config:b,folderUrl:this.folderUrl,defaultColor:this.defaultColor}):"area"===a&&(this.mark=new q({chartType:this.chartType,nls:this.nls,config:b,folderUrl:this.folderUrl,defaultColor:this.defaultColor}));this.mark&&
(this.own(f(this.mark,"value-change",function(d){this._updateTitleByValue(d)}.bind(this))),this.own(f(this.mark,"change",function(){this._onChange()}.bind(this))),this.mark.placeAt(this.content),this.closed&&this.closeContent())},_onArrowClicked:function(){c.hasClass(this.header,"close")?this._openContent():this.closeContent()},_onDeleteClicked:function(){this.mark&&(this.mark.destroy(),this.mark=null);this.destroy();this.emit("deleted",this.uniqueID)},closeContent:function(){this.closed=!0;c.addClass(this.header,
"close");c.removeClass(this.arrow,"arrow-up");c.addClass(this.arrow,"arrow-down");c.addClass(this.content,"hide")},_openContent:function(){this.closed=!1;c.removeClass(this.header,"close");c.addClass(this.arrow,"arrow-up");c.removeClass(this.arrow,"arrow-down");c.removeClass(this.content,"hide")},_updateTitleByConfig:function(a){a=this._getSuffixFormConfig(a);this._updateTitle(a)},_updateTitle:function(a){var b="line"===this.type?this.nls.line:this.nls.area;"undefined"!==typeof a&&(b=b+" "+a);this.title.innerHTML=
e.sanitizeHTML(b);this.title.title=b},_updateTitleByValue:function(a){a=this._getSuffix(a);this._updateTitle(a)},_getSuffixFormConfig:function(a){if(a){var b="bar"!==this.chartType?"yAxis":"xAxis",d;"line"===this.type?d=this._getSuffix(a[b]):"area"===this.type&&(d=this._getAreaSuffixFormConfig(a,b));return d}},_getAreaSuffixFormConfig:function(a,b){if(a&&a.length){var d=a[0][b];a=a[1][b];if(void 0!==d&&void 0!==a)return this._getSuffix([d,a])}},_getSuffix:function(a){var b="";Array.isArray(a)&&2===
a.length?b=e.localizeNumber(a[0])+" ~ "+e.localizeNumber(a[1]):"undefined"!==typeof a&&(b=e.localizeNumber(a));return b}})});