// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"url:esri/dijit/metadata/types/arcgis/form/templates/InputProfile.html":'\x3cdiv class\x3d"gxeInput"\x3e\r\n  \x3cdiv class\x3d"gxeEditOnly gxeReadOnlyValue" data-dojo-attach-point\x3d"focusNode"\x3e\x3c/div\x3e\r\n  \x3cspan class\x3d"gxeClickableText gxeEditOnly" data-dojo-attach-point\x3d"changeProfileNode" style\x3d"display:none;"\r\n    data-dojo-attach-event\x3d"onclick: _onChangeProfileClick"\x3e${i18nArcGIS.metadataStyle.changeButton}\x3c/span\x3e\r\n  \x3cdiv class\x3d"gxeViewOnlyText gxeViewOnly" data-dojo-attach-point\x3d"viewOnlyNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e'}});
define("esri/dijit/metadata/types/arcgis/form/InputProfile","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/query dijit/registry dojo/dom-class dojo/dom-construct dojo/dom-style dojo/has ../../../../../kernel ../../../base/InputBase dojo/text!./templates/InputProfile.html dojo/i18n!../../../nls/i18nBase dojo/i18n!../../../nls/i18nArcGIS dijit/Dialog ../../../editor/util/OkCancelBar ../../../base/ValidationTracker ../../../base/xml/xmlUtil ../base/arcgisStyles".split(" "),function(g,d,n,
f,h,p,e,A,q,r,t,u,v,k,w,x,y,z,m){g=g([t],{i18nArcGIS:k,templateString:u,_inputValue:null,_displayValue:null,postCreate:function(){this.inherited(arguments)},connectXNode:function(b,c){this.inherited(arguments);var a=b.value;this._inputValue=a;this._displayValue=this._findDisplayValue(a);c?this.applyViewOnly():this.setNodeText(this.focusNode,this._displayValue)},_findDisplayValue:function(b){var c=m.findByName(b);return c?c.label:b},getDisplayValue:function(){return this._displayValue},getInputValue:function(){return this._inputValue},
_onChangeProfileClick:function(){this._showDialog()},_reloadEditor:function(){var b=this.parentXNode.gxeDocument,c=b._editor.primaryToolbar;c._fadeOut(k.metadataStyle.updating,d.hitch(this,function(){var a=new y({ignoreErrors:!0}),a=b.generateXml(a),e=null;if(a)try{e=z.parseFromString(a)}catch(l){e=null,console.error(l)}c.editor.loadEditor(b.documentType,e,!1,!1).then(d.hitch(this,function(a){a.documentType.afterTransform(a,b);c._fadeIn()}),d.hitch(this,function(b){c._fadeIn();c._handleError(v.editor.transform.errorTransforming,
b,!0)}))}))},_resetArcGISStyle:function(b,c){this._inputValue=c.name;this._displayValue=c.label;this.setNodeText(this.focusNode,this._displayValue);var a;(a=f("[data-gxe-path\x3d'/metadata/Esri/ArcGISProfile']",this.parentXNode.parentElement.domNode))&&1===a.length&&(a=h.byNode(a[0]))&&a.inputWidget.setInputValue(c.profile);b.hide();this._reloadEditor()},_showDialog:function(){var b=null,c=k.metadataStyle.dialogTitle,a=e.create("div",{}),g=e.create("div",{"class":"gxeTransformPane"},a),l=d.hitch(this,
function(a){if(this._inputValue!==a.name){var c=a.label,f=e.create("div",{},g),f=e.create("div",{"class":"gxeClickableText gxeLine",onclick:d.hitch(this,function(){this._resetArcGISStyle(b,a)})},f);this.setI18nNodeText(f,c)}}),f=m.getAll();n.forEach(f,function(a){"Item Description"!==a.name&&l(a)});var h=new x({showOk:!1,onCancelClick:d.hitch(this,function(){b&&b.hide()})},e.create("div",{},a)),b=new w({"class":"gxeDialog gxePopupDialog",title:c,content:a});this.isLeftToRight()||p.add(b.domNode,"gxeRtl");
this.own(b.on("hide",d.hitch(this,function(){setTimeout(d.hitch(this,function(){h.destroyRecursive(!1);b.destroyRecursive(!1)}),300)})));b.show()}});q("extend-esri")&&d.setObject("dijit.metadata.types.arcgis.form.InputProfile",g,r);return g});