// 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/SuitabilityModeler/wro/templates/RemapRangeEditor.html":'\x3ctr\x3e\r\n  \x3ctd class\x3d"${baseClass}-label" data-dojo-attach-point\x3d"labelNode"\x3e\x3c/td\x3e\r\n  \x3ctd\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"slider"\x3e\x3c/div\x3e\r\n  \x3c/td\x3e\r\n  \x3ctd\x3e\x3cinput type\x3d"text" class\x3d"${baseClass}-ouput-value"\r\n    data-dojo-type\x3d"dijit/form/NumberTextBox"\r\n    data-dojo-attach-point\x3d"outputValueNode"\r\n    data-dojo-props\x3d"required:true"/\x3e\x3c/td\x3e\r\n\x3c/tr\x3e\r\n',
"url:widgets/SuitabilityModeler/wro/templates/WeightedOverlayLayerEditor.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"layer-row"\x3e\r\n    \x3cdiv class\x3d"layer-row--value pull-right"\x3e\r\n      \x3cinput class\x3d"${baseClass}-weight" type\x3d"text"\r\n        data-dojo-type\x3d"dijit/form/NumberTextBox"\r\n        data-dojo-attach-point\x3d"weightNode"\r\n        data-dojo-attach-event\x3d"onChange:_onWeightChange,onKeyUp:_onWeightChange,onMouseUp:_onFocus,onBlur:_onBlur"\r\n        data-dojo-props\x3d"constraints: {max: 100, min: 0, round:0},required:true"\r\n      /\x3e\x3cspan class\x3d"layer-row--value-mark"\x3e\x26#37;\x3c/span\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"layer-row--title" data-dojo-attach-point\x3d"layerNode" \x3e\r\n      \x3ci class\x3d"sliders-button pull-right" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/i\x3e\r\n      \x3clabel class\x3d"${baseClass}-label" data-dojo-attach-point\x3d"labelNode"\x3e\x3c/label\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"remapRangesEditorWrapper"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"remapRangesEditorContainer"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/on dojo/dom-class dojo/dom-style dojo/string dojo/Evented dojo/fx dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/_Container ./containerUtils dojo/text!./templates/RemapRangeEditor.html dojo/text!./templates/WeightedOverlayLayerEditor.html dijit/form/HorizontalSlider dijit/form/NumberTextBox".split(" "),function(f,v,p,g,q,w,x,h,r,k,l,t,u,y,z,A,B){var C=f([k,l,t,h],{i18n:null,templateString:z,baseClass:"reclass-range-editor",
_setRemapRangeAttr:function(a){var b=" ("+(a.inputMin===a.inputMax?a.inputMin+"":a.inputMin+" - "+a.inputMax)+")";this.labelNode.innerHTML=a.label.substr(0,14)+(15<a.label.length?"\x26hellip;":"")+b;this.labelNode.title=a.label+b;this.outputValueNode.set("value",a.outputValue)},postCreate:function(){var a=this;this.inherited(arguments);this.outputValueNode.set("constraints",{round:0});this.sliderObject=new B({"class":"slider-primary",name:"slider",value:this.outputValueNode.value,minimum:0,maximum:9,
intermediateChanges:!0,discreteValues:10,showButtons:!1},this.slider);this.sliderObject.startup();this.own(g(this.sliderObject,"Change",function(b){a.outputValueNode.set("value",b)}));this.own(g(this.outputValueNode,"Change",function(b){a.outputValueNode&&a.outputValueNode.isValid()&&(a.remapRange.outputValue=b,a.sliderObject.set("value",b))}))},setOutputRange:function(a,b){var d=this.outputValueNode,m=x.substitute(this.i18n.wro.validation.rangeMessage,[a,b]);d.set("constraints",{min:a,max:b});d.set("rangeMessage",
m);this.sliderObject.set({minimum:a,maximum:b})}}),E=f([k,l,u,h],{i18n:null,templateString:'\x3cdiv\x3e\x3ctable class\x3d"${baseClass}-table"\x3e\x3ctbody data-dojo-attach-point\x3d"containerNode"\x3e\x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e',minOutputValue:0,maxOutputValue:0,baseClass:"remap-ranges-editor",_setRemapRangesAttr:function(a){var b=[],d;for(d in a)b.push([a[d],a[d].inputMin]);b.sort(function(c,D){return c[1]-D[1]});a=[];for(var m in b)a.push(b[m][0]);var e=this,n;y.removeChildren(this);
p.forEach(a,function(c){c.label||(c.label=c.inputMin+" - "+c.inputMax);n=new C({i18n:e.i18n,remapRange:c});n.setOutputRange(e.minOutputValue,e.maxOutputValue);e.addChild(n)})},getRemapRanges:function(){var a=[];p.forEach(this.getChildren(),function(b){a.push(b.getRemapRange())});return a}});return f([k,l,t,u,h],{i18n:null,templateString:A,baseClass:"weighted-overlay-layer-editor",_setOverlayLayerAttr:function(a){this.weightNode.set("value",a.weight);this.labelNode.innerHTML=a.title;this.remapRangesEditor=
new E({i18n:this.i18n,minOutputValue:0,maxOutputValue:9,remapRanges:a.remapRanges},this.remapRangesEditorContainer)},postCreate:function(){this.inherited(arguments);this.attachWeightingToggle();this.weightNode.rangeMessage=this.i18n.wro.validation.rangeMessage100},attachWeightingToggle:function(){w.set(this.remapRangesEditorWrapper,"display","none");var a=0;this.own(g(this.layerNode,"click",v.hitch(this,function(){0===a?(q.add(this.domNode,"is-open"),r.wipeIn({node:this.remapRangesEditorWrapper}).play(),
a=1):(q.remove(this.domNode,"is-open"),r.wipeOut({node:this.remapRangesEditorWrapper}).play(),a=0)})))},isValid:function(){return this.weightNode.isValid()},_onWeightChange:function(){var a=parseInt(this.weightNode.valueNode.value,10);a=isNaN(a)?0:a;this.overlayLayer.weight=a;this.emit("WeightChange",a)},_onFocus:function(){this.weightNode.focusNode.select()},_onBlur:function(){var a=parseInt(this.weightNode.valueNode.value,10);isNaN(a)&&(this.weightNode.value=0,this.emit("WeightChange",a))}})});