text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
  //>>built
  define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/on dojo/Deferred dojo/promise/all dojo/json dijit/form/NumberTextBox dijit/form/Select dijit/form/Textarea dijit/form/DateTextBox dijit/form/TimeTextBox jimu/dijit/CheckBox jimu/dijit/URLInput jimu/dijit/DrawBox jimu/utils esri/tasks/LinearUnit esri/tasks/FeatureSet esri/geometry/Polygon esri/graphic esri/graphicsUtils ../BaseEditor ../LayerOrderUtil".split(" "),function(e,k,g,c,m,s,t,n,l,p,u,v,w,x,y,z,q,A,B,C,r,D,f,
  E){var d={};d.UnsupportEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-unsupport",editorName:"UnsupportEditor",postCreate:function(){this.inherited(arguments);c.setAttr(this.domNode,"innerHTML",q.sanitizeHTML(this.message))},getValue:function(){return null}});d.ShowMessage=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-message",editorName:"ShowMessage",postCreate:function(){this.inherited(arguments);c.setAttr(this.domNode,"innerHTML",q.sanitizeHTML(this.message))},getValue:function(){return null}});
  d.GeneralEditorWrapperEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-wrapper",editorName:"GeneralEditorWrapperEditor",postCreate:function(){this.inherited(arguments);c.setStyle(this.gEditor.domNode,"width","100%");"Select"===this.editorName&&c.addClass(this.gEditor.domNode,"restrict-select-width");this.gEditor.placeAt(this.domNode)},getValue:function(){return this.gEditor.getValue()}});d.LongNumberEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-long",editorName:"LongNumberEditor",
  postCreate:function(){this.inherited(arguments);this.value=void 0===this.param.defaultValue?NaN:this.param.defaultValue;this.editor=new l({value:this.value,constraints:{places:0}});this.editor.placeAt(this.domNode)},getValue:function(){var a=this.editor.getValue();return isNaN(a)?null:a}});d.DoubleNumberEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-double",editorName:"DoubleNumberEditor",postCreate:function(){this.inherited(arguments);this.value=void 0===this.param.defaultValue?NaN:this.param.defaultValue;
  this.editor=new l({value:this.value});this.editor.placeAt(this.domNode)},getValue:function(){var a=this.editor.getValue();return isNaN(a)?null:a}});d.MultiValueChooser=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-multivalue-chooser",editorName:"MultiValueChooser",postCreate:function(){this.inherited(arguments);this.checkBoxs=[];g.forEach(this.param.choiceList,function(a){a=new x({label:a,checked:this.param.defaultValue&&-1<this.param.defaultValue.indexOf(a)?!0:!1});a.placeAt(this.domNode);this.checkBoxs.push(a)},
  this)},getValue:function(){var a=[];g.forEach(this.checkBoxs,function(b){b.checked&&a.push(b.label)},this);return a}});d.MultiValueEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-multivalue",editorName:"MultiValueEditor",postCreate:function(){this.inherited(arguments);this.editors=[];var a=c.create("div",{"class":"input-list"},this.domNode),b=k.clone(this.param,a);b.dataType=this.param.dataType.substr(13,this.param.dataType.length);b.originParam=this.param;setTimeout(k.hitch(this,this._initChildEditors,
  b,a),100);this._createAddInputNode(b,a)},_initChildEditors:function(a,b){this.param.defaultValue&&0<this.param.defaultValue.length?g.forEach(this.param.defaultValue,function(h){a.defaultValue=h;this._createSingleInputContainerNode(a,b)},this):(delete a.defaultValue,this._createSingleInputContainerNode(a,b))},getValue:function(){var a=[];g.forEach(this.editors,function(b){a.push(b.getValue())},this);return a},getGPValue:function(){var a=new s,b=[];g.forEach(this.editors,function(a){b.push(a.getGPValue())},
  this);t(b).then(function(b){a.resolve(b)},function(b){a.reject(b)});return a},destroy:function(){g.forEach(this.editors,function(a){a.destroy()});this.editors=[];this.inherited(arguments)},_createSingleInputContainerNode:function(a,b){var h=c.create("div",{"class":"single-input"},b),d=this.editorManager.createEditor(a,"input",this.context,{widgetUID:this.widgetUID,config:this.config}),e=c.getContentBox(this.domNode).w-30-3;c.setStyle(d.domNode,{display:"inline-block",width:e+"px"});d.placeAt(h);this._createRemoveInputNode(h);
  h.inputEditor=d;this.editors.push(d);return h},_createRemoveInputNode:function(a){var b=c.create("div",{"class":"remove",innerHTML:"-"},a);this.own(m(b,"click",k.hitch(this,function(){this.editors.splice(this.editors.indexOf(a.inputEditor),1);a.inputEditor.destroy();c.destroy(a)})));return b},_createAddInputNode:function(a,b){var h=c.create("div",{"class":"add-input"},this.domNode),d=c.create("div",{"class":"add-btn",innerHTML:"+"},h);this.own(m(d,"click",k.hitch(this,function(){this._createSingleInputContainerNode(a,
  b)})));return h}});d.LinerUnitEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-liner-unit",editorName:"LinerUnitEditor",postCreate:function(){this.inherited(arguments);this.distance=void 0===this.param.defaultValue?"":this.param.defaultValue.distance;this.units=void 0===this.param.defaultValue?"":this.param.defaultValue.units;void 0===this.distance&&(this.distance=0);void 0===this.units&&(this.units="esriMeters");this.inputDijit=new l({value:this.distance});this.selectDijit=new p({value:this.units,
  options:[{label:this.nls.Meter,value:"esriMeters"},{label:this.nls.Kilometers,value:"esriKilometers"},{label:this.nls.Feet,value:"esriFeet"},{label:this.nls.Miles,value:"esriMiles"},{label:this.nls.NauticalMiles,value:"esriNauticalMiles"},{label:this.nls.Yards,value:"esriYards"}]});c.addClass(this.selectDijit.domNode,"restrict-select-width");this.inputDijit.placeAt(this.domNode);this.selectDijit.placeAt(this.domNode)},getValue:function(){var a=new A;a.distance=this.inputDijit.getValue();a.units=this.selectDijit.getValue();
  return a}});d.DateTimeEditor=e(f,{baseClass:"jimu-gp-editor-base jimu-gp-editor-datatime",editorName:"DateTimeEditor",postCreate:function(){var a=new Date(this.param.defaultValue);this.value=this.param.defaultValue?new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()):null;this.inherited(arguments);this.dateDijit=new v({value:this.value,style:{width:"60%"}});this.timeDijit=new w({value:this.value,style:{width:"40%"},constraints:{timePattern:"HH:mm:ss",clickableIncrement:"T00:15:00",
  visibleIncrement:"T00:15:00"}});this.dateDijit.placeAt(this.domNode);this.timeDijit.placeAt(this.domNode)},startup:function(){this.dateDijit.startup();this.timeDijit.startup()},getValue:function(){var a=new Date,b=this.dateDijit.getValue(),c=this.timeDijit.getValue();return null!==b&&null!==c?(a.setFullYear(b.getFullYear()),a.setMonth(b.getMonth()),a.setDate(b.getDate()),a.setHours(c.getHours()),a.setMinutes(c.getMinutes()),a.setSeconds(c.getSeconds()),a.getTime()):null}});d.SelectFeatureSetFromDraw=
  e([f,z],{editorName:"SelectFeatureSetFromDraw",constructor:function(a){this.inherited(arguments);this.paramName=a.param.name;this.drawLayerId=a.widgetUID+a.param.name},postCreate:function(){this.inherited(arguments);c.addClass(this.domNode,"jimu-gp-editor-draw");c.addClass(this.domNode,"jimu-gp-editor-base");try{(new E(this.config,this.map)).calculateLayerIndex(this.paramName,this.widgetUID).then(k.hitch(this,function(a){-1!==a&&this.map.reorderLayer(this.drawLayer,a)}))}catch(a){console.error(a.message)}this.startup()},
  getValue:function(){return this.drawLayer&&0<this.drawLayer.graphics.length?this._createFeatureSet(this.drawLayer.graphics):null},_createFeatureSet:function(a){var b=new B,c=[];a=D.getGeometries(a);g.forEach(a,function(a){a="extent"===a.type?new r(C.fromExtent(a)):new r(a);c.push(a)});b.features=c;return b}});d.GetUrlObjectFromLayer=e([f,p],{editorName:"GetUrlObjectFromLayer",postCreate:function(){this.options=[];g.forEach(this.map.graphicsLayerIds,function(a){a=this.map.getLayer(a);if("esri.layers.FeatureLayer"===
  a.declaredClass&&(!this.geometryType||a.geometryType===this.geometryType))this.options.push({label:a.label||a.title||a.name||a.id,value:a.id})},this);this.inherited(arguments);this.setValue(this.value);c.addClass(this.domNode,"jimu-gp-editor-sffl");c.addClass(this.domNode,"jimu-gp-editor-base")},getValue:function(){return this.value},getGPValue:function(){var a,b;g.forEach(this.map.graphicsLayerIds,function(b){var c=this.map.getLayer(b);b===this.getValue()&&(a=c.url)},this);b={url:a};b=this.wrapGPValue(b);
  return this.wrapValueToDeferred(b)}});d.ObjectUrlEditor=e([f,y],{editorName:"ObjectUrlEditor",postCreate:function(){this.rest=!1;this.inherited(arguments);c.addClass(this.domNode,"jimu-gp-editor-ourl");c.addClass(this.domNode,"jimu-gp-editor-base")},getValue:function(){return this.value},getGPValue:function(){var a;a=this.getValue()?{url:this.getValue()}:null;a=this.wrapGPValue(a);return this.wrapValueToDeferred(a)}});d.SimpleJsonEditor=e([f,u],{editorName:"SimpleJsonEditor",postMixInProperties:function(){this.inherited(arguments);
  "object"===typeof this.value&&(this.value=n.stringify(this.value))},postCreate:function(){this.inherited(arguments);c.addClass(this.domNode,"jimu-gp-editor-json");c.addClass(this.domNode,"jimu-gp-editor-base")},getValue:function(){return this.value},getGPValue:function(){var a;a=this.getValue()?n.parse(this.getValue()):null;a=this.wrapGPValue(a);return this.wrapValueToDeferred(a)}});return d});