// 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/NumberDijitSetting.html":'\x3cdiv\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"settingTitle" class\x3d"flex-lc text-label setting-title"\x3e${nls.numberSettings}\x3c/div\x3e\r\n  \x3cdiv class\x3d"infohraphic-setting-tab-container" style\x3d"width:100%;"\x3e\r\n    \x3cdiv style\x3d"margin-top: 20px;" data-dojo-attach-point\x3d"tabNode" class\x3d"tabHeader"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv style\x3d"margin-top: 10px;" data-dojo-attach-point\x3d"dataTab"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv style\x3d"margin-top: 10px;" class\x3d"number-setting-display paddingRight10" data-dojo-attach-point\x3d"display"\x3e\r\n      \x3cdiv class\x3d"section"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"dataFormatSettingNode"\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"section"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"fontSettingNode"\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"section"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"backgroundSettingNode"\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv style\x3d"margin-top: 20px;" class\x3d"indicatorsTitlePane paddingRight10" data-dojo-attach-point\x3d"indicatorsDiv"\x3e\x3c/div\x3e\r\n\r\n  \x3c/div\x3e\r\n\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dijit/_WidgetsInTemplateMixin dojo/text!./NumberDijitSetting.html ./BaseDijitSetting dijit/_TemplatedMixin ./_dijits/NumberIndicator/MultipleIndicators ./_dijits/ValueProvider/ValueProvider ./_dijits/BackgroundSetting ./_dijits/FontSetting ./_dijits/DataFormatSetting dojo/_base/lang dojo/on jimu/dijit/TabContainer3 jimu/dijit/Message ../utils dijit/TitlePane".split(" "),function(f,g,h,k,l,m,n,p,q,r,b,c,t,u,v){return f([k,g,l],{templateString:h,baseClass:"infographic-number-dijit-setting",
type:"number",postMixInProperties:function(){b.mixin(this.nls,window.jimuNls.common)},postCreate:function(){this.inherited(arguments);this._ignoreEvent();this._init();this._careEvent()},getConfig:function(a){this.config||(this.config={});return this.isValid(a)?(this.config.indicators=this.indicators.getConfig(),this.backgroundSetting&&(this.config.background=this.backgroundSetting.getConfig()),this.fontSetting&&(this.config.font=this.fontSetting.getConfig()),this.dataFormatSetting&&(this.config.dataFormat=
this.dataFormatSetting.getConfig()),this.valueProvider&&(a=[{type:"value",config:this.valueProvider.getConfig()}],this.config.statistics=a),this.config):!1},setLayerDefinition:function(a){a&&(this.definition=a=v.preProcessDefinition(a));this.valueProvider&&this.valueProvider.setLayerDefinition(this.definition)},setLayerObject:function(a){a&&(this.layerObject=a)},reset:function(){this.config=this.definition=this.dataSource=null;this.valueProvider&&this.valueProvider.reset()},setConfig:function(a){this._ignoreEvent();
if(this.config=a)this.indicators.setConfig(this.config),(a=this.config.statistics)&&a.length&&this.valueProvider.setConfig(a[0].config),this.config.background&&this.backgroundSetting.setConfig(this.config.background),this.config.font&&this.fontSetting.setConfig(this.config.font),this.config.dataFormat&&this.dataFormatSetting.setConfig(this.config.dataFormat),this._careEvent()},updateDijit:function(){this.dijit&&(this.dijit.setConfig(this.config),this.dijit.startRendering())},_onSettingsChange:function(){!this._ignoreEvents&&
this.domNode&&(this.getConfig(),this.updateDijit())},setDataSource:function(a){this.inherited(arguments);this.dataSource=a},destroy:function(){this.indicators&&(this.indicators.destroy(),this.indicators=null);this.valueProvider&&(this.valueProvider.destroy(),this.valueProvider=null);this.inherited(arguments)},isValid:function(a){return!this.indicators.getConfig(a)&&a?(this.tab.selectTab(this.nls.indicators),new u({message:this.nls.setCorrectyIndicatorTip}),!1):this.backgroundSetting.isValid()&&this.fontSetting.isValid()&&
this.dataFormatSetting.isValid()&&this.valueProvider.isValid()},_init:function(){this._initTabs();this._initIndicators();this._initValueProvider();this._initDisplay()},_initTabs:function(){this.tab=new t({average:!0,tabs:[{title:this.nls.data,content:this.dataTab},{title:this.nls.display,content:this.display},{title:this.nls.indicators,content:this.indicatorsDiv}]},this.tabNode)},_initDisplay:function(){this.backgroundSetting=new p({nls:this.nls});this.backgroundSetting.placeAt(this.backgroundSettingNode);
this.backgroundSetting.startup();this.own(c(this.backgroundSetting,"change",b.hitch(this,function(){this._onSettingsChange()})));this.fontSetting=new q({nls:this.nls});this.fontSetting.placeAt(this.fontSettingNode);this.fontSetting.startup();this.own(c(this.fontSetting,"change",b.hitch(this,function(){this._onSettingsChange()})));this.dataFormatSetting=new r({nls:this.nls});this.dataFormatSetting.placeAt(this.dataFormatSettingNode);this.dataFormatSetting.startup();this.own(c(this.dataFormatSetting,
"change",b.hitch(this,function(){this._onSettingsChange()})))},_initValueProvider:function(){this.valueProvider=new n({nls:this.nls,titleText:this.nls.displayValue});this.valueProvider.placeAt(this.dataTab);this.valueProvider.startup();this.own(c(this.valueProvider,"change",b.hitch(this,function(a){this._handleDePlacesForMainValue(a);this._onSettingsChange()})))},_handleDePlacesForMainValue:function(a){if(a=a&&a.value){var d=this.dataFormatSetting.getConfig(),e=d.decimalPlaces;if("count"===a.type){if("number"!==
typeof e||2===e)d.decimalPlaces=0}else if("number"!==typeof e||0===e)d.decimalPlaces=2;this.dataFormatSetting.setConfig(d)}},_initIndicators:function(){this.indicators=new m({nls:this.nls,type:"number",folderUrl:this.folderUrl});this.indicators.placeAt(this.indicatorsDiv);this.indicators.startup();this.own(c(this.indicators,"change",b.hitch(this,function(){this._onSettingsChange()})))},_ignoreEvent:function(){this._ignoreEvents=!0},_careEvent:function(){setTimeout(function(){this._ignoreEvents=!1}.bind(this),
200)}})});