/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.tasks._task"],["provide","esri.tasks.query"],["provide","dojo.io.iframe"],["provide","dojo.cldr.supplemental"],["provide","dojo.regexp"],["provide","dojo.string"],["provide","dojo.date.locale"],["provide","esri.layers.FeatureLayer"],["provide","dojo.Stateful"],["provide","dijit._WidgetBase"],["provide","dojo.window"],["provide","dijit._base.focus"],["provide","dojo.AdapterRegistry"],["provide","dijit._base.place"],["provide","dijit._base.window"],["provide","dijit._base.popup"],["provide","dijit._base.scroll"],["provide","dojo.uacss"],["provide","dijit._base.sniff"],["provide","dijit._base.typematic"],["provide","dijit._base.wai"],["provide","dijit._base"],["provide","dijit._Widget"],["provide","dojo.date.stamp"],["provide","dojo.parser"],["provide","dojo.cache"],["provide","dijit._Templated"],["provide","dijit._CssStateMixin"],["provide","dijit._editor.selection"],["provide","dijit._editor.range"],["provide","dijit._editor.html"],["provide","dijit._editor.RichText"],["provide","dijit._Container"],["provide","dijit._KeyNavContainer"],["provide","dijit.ToolbarSeparator"],["provide","dijit.Toolbar"],["provide","dijit.form._FormWidget"],["provide","dijit._HasDropDown"],["provide","dijit.form.Button"],["provide","dijit._editor._Plugin"],["provide","dijit._editor.plugins.EnterKeyHandling"],["provide","dijit._Contained"],["provide","dijit.layout._LayoutWidget"],["provide","dijit.Editor"],["provide","dijit.layout._ContentPaneResizeMixin"],["provide","dojo.html"],["provide","dijit.layout.ContentPane"],["provide","dijit.form._FormMixin"],["provide","dijit._DialogMixin"],["provide","dijit.TooltipDialog"],["provide","dijit.form.DropDownButton"],["provide","dijit.form.TextBox"],["provide","dijit.Tooltip"],["provide","dijit.form.ValidationTextBox"],["provide","dojo.data.util.sorter"],["provide","dijit.form._FormSelectWidget"],["provide","dijit.MenuItem"],["provide","dijit.PopupMenuItem"],["provide","dijit.CheckedMenuItem"],["provide","dijit.MenuSeparator"],["provide","dijit.Menu"],["provide","dijit.form.Select"],["provide","dijit._editor.plugins.LinkDialog"],["provide","dojo.colors"],["provide","dijit._PaletteMixin"],["provide","dijit.ColorPalette"],["provide","dijit._editor.plugins.TextColor"],["provide","dojo.data.util.filter"],["provide","dojo.data.util.simpleFetch"],["provide","dojo.data.ItemFileReadStore"],["provide","dijit.dijit"],["provide","dojox.html.metrics"],["provide","dojox.grid.util"],["provide","dojox.grid._Scroller"],["provide","dojox.grid.cells._base"],["provide","dojox.grid.cells"],["provide","dojo.dnd.common"],["provide","dojo.dnd.autoscroll"],["provide","dojo.dnd.Mover"],["provide","dojo.dnd.Moveable"],["provide","dojox.grid._Builder"],["provide","dojo.dnd.Container"],["provide","dojo.dnd.Selector"],["provide","dojo.dnd.Avatar"],["provide","dojo.dnd.Manager"],["provide","dojo.dnd.Source"],["provide","dojox.grid._View"],["provide","dojox.grid._RowSelector"],["provide","dojox.grid._Layout"],["provide","dojox.grid._ViewManager"],["provide","dojox.grid._RowManager"],["provide","dojox.grid._FocusManager"],["provide","dojox.grid._EditManager"],["provide","dojox.grid.Selection"],["provide","dojox.grid._Events"],["provide","dojox.grid._Grid"],["provide","dojox.grid.DataSelection"],["provide","dojox.grid.DataGrid"],["provide","esri.dijit.editing.AttachmentEditor"],["provide","dojo.DeferredList"],["provide","esri.dijit.editing.Util"],["provide","dijit.Calendar"],["provide","dijit.form._DateTimeTextBox"],["provide","dijit.form.DateTextBox"],["provide","dojo.number"],["provide","dijit.form.NumberTextBox"],["provide","dijit.form.ComboBox"],["provide","dijit.form.FilteringSelect"],["provide","dijit.form._Spinner"],["provide","dijit.form.NumberSpinner"],["provide","dijit.form.SimpleTextarea"],["provide","esri.dijit.AttributeInspector"],["provide","esri.dijit.AttributeInspector-all"],["i18n._preloadLocalizations","esri.dijit.nls.AttributeInspector-all",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.tasks._task"]){_4._hasResource["esri.tasks._task"]=true;_4.provide("esri.tasks._task");_4.declare("esri.tasks._Task",null,{constructor:function(_7){if(_7&&_4.isString(_7)){this._url=esri.urlToObject(this.url=_7);}this.normalization=true;this._errorHandler=_4.hitch(this,this._errorHandler);},_encode:function(_8,_9,_a){var _b,_c,_d={},i,p,pl;for(i in _8){if(i==="declaredClass"){continue;}_b=_8[i];_c=typeof (_b);if(_b!==null&&_b!==undefined&&_c!=="function"){if(_4.isArray(_b)){_d[i]=[];pl=_b.length;for(p=0;p<pl;p++){_d[i][p]=this._encode(_b[p]);}}else{if(_c==="object"){if(_b.toJson){var _e=_b.toJson(_a&&_a[i]);if(_b instanceof esri.tasks.FeatureSet){if(_e.spatialReference){_e.sr=_e.spatialReference;delete _e.spatialReference;}}_d[i]=_9?_e:_4.toJson(_e);}}else{_d[i]=_b;}}}}return _d;},_successHandler:function(_f,_10,_11,dfd){if(_10){this[_10].apply(this,_f);}if(_11){_11.apply(null,_f);}if(dfd){esri._resDfd(dfd,_f);}},_errorHandler:function(err,_12,dfd){this.onError(err);if(_12){_12(err);}if(dfd){dfd.errback(err);}},setNormalization:function(_13){this.normalization=_13;},onError:function(){}});_4.declare("esri.tasks.FeatureSet",null,{constructor:function(_14){if(_14){_4.mixin(this,_14);var _15=this.features,sr=_14.spatialReference,_16=esri.Graphic,_17=esri.geometry.getGeometryType(_14.geometryType);sr=(this.spatialReference=new esri.SpatialReference(sr));this.geometryType=_14.geometryType;if(_14.fields){this.fields=_14.fields;}_4.forEach(_15,function(_18,i){var _19=_18.geometry&&_18.geometry.spatialReference;_15[i]=new _16((_17&&_18.geometry)?new _17(_18.geometry):null,_18.symbol&&esri.symbol.fromJson(_18.symbol),_18.attributes);if(_15[i].geometry&&!_19){_15[i].geometry.setSpatialReference(sr);}});}else{this.features=[];}},displayFieldName:null,geometryType:null,spatialReference:null,fields:[],features:[],fieldAliases:null,toJson:function(_1a){var _1b={};if(this.displayFieldName){_1b.displayFieldName=this.displayFieldName;}if(this.fields){_1b.fields=this.fields;}if(this.spatialReference){_1b.spatialReference=this.spatialReference.toJson();}else{if(this.features[0]&&this.features[0].geometry){_1b.spatialReference=this.features[0].geometry.spatialReference.toJson();}}if(this.features[0]){if(this.features[0].geometry){_1b.geometryType=esri.geometry.getJsonType(this.features[0].geometry);}_1b.features=esri._encodeGraphics(this.features,_1a);}_1b.exceededTransferLimit=this.exceededTransferLimit;return esri._sanitize(_1b);}});esri.tasks._SpatialRelationship={SPATIAL_REL_INTERSECTS:"esriSpatialRelIntersects",SPATIAL_REL_CONTAINS:"esriSpatialRelContains",SPATIAL_REL_CROSSES:"esriSpatialRelCrosses",SPATIAL_REL_ENVELOPEINTERSECTS:"esriSpatialRelEnvelopeIntersects",SPATIAL_REL_INDEXINTERSECTS:"esriSpatialRelIndexIntersects",SPATIAL_REL_OVERLAPS:"esriSpatialRelOverlaps",SPATIAL_REL_TOUCHES:"esriSpatialRelTouches",SPATIAL_REL_WITHIN:"esriSpatialRelWithin",SPATIAL_REL_RELATION:"esriSpatialRelRelation"};}if(!_4._hasResource["esri.tasks.query"]){_4._hasResource["esri.tasks.query"]=true;_4.provide("esri.tasks.query");_4.declare("esri.tasks.QueryTask",esri.tasks._Task,{constructor:function(url,_1c){this._handler=_4.hitch(this,this._handler);this._relationshipQueryHandler=_4.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=_4.hitch(this,this._executeForIdsHandler);this._countHandler=_4.hitch(this,this._countHandler);this.source=_1c&&_1c.source;this.gdbVersion=_1c&&_1c.gdbVersion;},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForCount",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},execute:function(_1d,_1e,_1f,_20,_21){var _22=_21.assembly,_23=this._encode(_4.mixin({},this._url.query,{f:"json"},_1d.toJson(_22&&_22[0]))),_24=this._handler,_25=this._errorHandler;if(this.source){var _26={source:this.source.toJson()};_23.layer=_4.toJson(_26);}if(this.gdbVersion){_23.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_23,callbackParamName:"callback",load:function(r,i){_24(r,i,_1e,_1f,_21.dfd);},error:function(r){_25(r,_1f,_21.dfd);},callbackSuffix:_20});},executeRelationshipQuery:function(_27,_28,_29){var _2a=this._encode(_4.mixin({},this._url.query,{f:"json"},_27.toJson())),_2b=this._relationshipQueryHandler,_2c=this._errorHandler;if(this.gdbVersion){_2a.gdbVersion=this.gdbVersion;}var dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/queryRelatedRecords",content:_2a,callbackParamName:"callback",load:function(r,i){_2b(r,i,_28,_29,dfd);},error:function(r){_2c(r,_29,dfd);}});return dfd;},executeForIds:function(_2d,_2e,_2f,_30){var _31=_30.assembly,_32=this._encode(_4.mixin({},this._url.query,{f:"json",returnIdsOnly:true},_2d.toJson(_31&&_31[0]))),_33=this._executeForIdsHandler,_34=this._errorHandler;if(this.source){var _35={source:this.source.toJson()};_32.layer=_4.toJson(_35);}if(this.gdbVersion){_32.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_32,callbackParamName:"callback",load:function(r,i){_33(r,i,_2e,_2f,_30.dfd);},error:function(r){_34(r,_2f,_30.dfd);}});},executeForCount:function(_36,_37,_38,_39){var _3a=_39.assembly,_3b=this._encode(_4.mixin({},this._url.query,{f:"json",returnIdsOnly:true,returnCountOnly:true},_36.toJson(_3a&&_3a[0]))),_3c=this._countHandler,_3d=this._errorHandler;if(this.source){var _3e={source:this.source.toJson()};_3b.layer=_4.toJson(_3e);}if(this.gdbVersion){_3b.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_3b,callbackParamName:"callback",load:function(r,i){_3c(r,i,_37,_38,_39.dfd);},error:function(r){_3d(r,_38,_39.dfd);}});},_handler:function(_3f,io,_40,_41,dfd){try{var _42=new esri.tasks.FeatureSet(_3f);this._successHandler([_42],"onComplete",_40,dfd);}catch(err){this._errorHandler(err,_41,dfd);}},_relationshipQueryHandler:function(_43,io,_44,_45,dfd){try{var gt=_43.geometryType,sr=_43.spatialReference,_46={};_4.forEach(_43.relatedRecordGroups,function(gr){var _47={};_47.geometryType=gt;_47.spatialReference=sr;_47.features=gr.relatedRecords;var _48=new esri.tasks.FeatureSet(_47);_46[gr.objectId]=_48;});this._successHandler([_46],"onExecuteRelationshipQueryComplete",_44,dfd);}catch(err){this._errorHandler(err,_45,dfd);}},_executeForIdsHandler:function(_49,io,_4a,_4b,dfd){try{this._successHandler([_49.objectIds],"onExecuteForIdsComplete",_4a,dfd);}catch(err){this._errorHandler(err,_4b,dfd);}},_countHandler:function(_4c,io,_4d,_4e,dfd){try{var _4f,_50=_4c.features,ids=_4c.objectIds;if(ids){_4f=ids.length;}else{if(_50){throw new Error(esri.bundle.tasks.query.invalid);}else{_4f=_4c.count;}}this._successHandler([_4f],"onExecuteForCountComplete",_4d,dfd);}catch(err){this._errorHandler(err,_4e,dfd);}}});esri._createWrappers("esri.tasks.QueryTask");_4.declare("esri.tasks.Query",null,{constructor:function(){this.spatialRelationship=esri.tasks.Query.SPATIAL_REL_INTERSECTS;},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:false,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,toJson:function(_51){var _52={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset},g=_51&&_51["geometry"]||this.geometry,ids=this.objectIds,_53=this.outFields,_54=this.outSpatialReference,_55=this.groupByFieldsForStatistics,_56=this.orderByFields,_57=this.outStatistics;if(g){_52.geometry=g;_52.geometryType=esri.geometry.getJsonType(g);_52.inSR=g.spatialReference.wkid||_4.toJson(g.spatialReference.toJson());}if(ids){_52.objectIds=ids.join(",");}if(_53){_52.outFields=_53.join(",");}if(_55){_52.groupByFieldsForStatistics=_55.join(",");}if(_56){_52.orderByFields=_56.join(",");}if(_57){var _58=[];_4.forEach(_57,function(_59,idx){_58.push(_59.toJson());});_52.outStatistics=_4.toJson(_58);}if(_54!==null){_52.outSR=_54.wkid||_4.toJson(_54.toJson());}else{if(g){_52.outSR=g.spatialReference.wkid||_4.toJson(g.spatialReference.toJson());}}var _5a=this.timeExtent;_52.time=_5a?_5a.toJson().join(","):null;var _5b=this.relationParam;if(_5b&&this.spatialRelationship===esri.tasks.Query.SPATIAL_REL_RELATION){_52.relationParam=_5b;}_52._ts=this._ts;return _52;}});_4.mixin(esri.tasks.Query,esri.tasks._SpatialRelationship);_4.declare("esri.tasks.RelationshipQuery",null,{definitionExpression:"",relationshipId:null,returnGeometry:false,objectIds:null,outSpatialReference:null,outFields:null,toJson:function(){var _5c={definitionExpression:this.definitionExpression,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset},_5d=this.objectIds,_5e=this.outFields,_5f=this.outSpatialReference;if(_5d){_5c.objectIds=_5d.join(",");}if(_5e){_5c.outFields=_5e.join(",");}if(_5f){_5c.outSR=_5f.toJson();}_5c._ts=this._ts;return _5c;}});_4.declare("esri.tasks.StatisticDefinition",null,{statisticType:null,onStatisticField:null,outStatisticFieldName:null,toJson:function(){var _60={statisticType:this.statisticType,onStatisticField:this.onStatisticField};if(this.outStatisticFieldName){_60.outStatisticFieldName=this.outStatisticFieldName;}return _60;}});}if(!_4._hasResource["dojo.io.iframe"]){_4._hasResource["dojo.io.iframe"]=true;_4.provide("dojo.io.iframe");_4.getObject("io",true,_4);_4.io.iframe={create:function(_61,_62,uri){if(window[_61]){return window[_61];}if(window.frames[_61]){return window.frames[_61];}var _63=null;var _64=uri;if(!_64){if(_4.config["useXDomain"]&&!_4.config["dojoBlankHtmlUrl"]){console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");}_64=(_4.config["dojoBlankHtmlUrl"]||_4.moduleUrl("dojo","resources/blank.html"));}var _63=_4.place("<iframe id=\""+_61+"\" name=\""+_61+"\" src=\""+_64+"\" onload=\""+_62+"\" style=\"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden\">",_4.body());window[_61]=_63;return _63;},setSrc:function(_65,src,_66){try{if(!_66){if(_4.isWebKit){_65.location=src;}else{frames[_65.name].location=src;}}else{var _67;if(_4.isIE||_4.isWebKit){_67=_65.contentWindow.document;}else{_67=_65.contentWindow;}if(!_67){_65.location=src;return;}else{_67.location.replace(src);}}}catch(e){console.log("dojo.io.iframe.setSrc: ",e);}},doc:function(_68){var doc=_68.contentDocument||(((_68.name)&&(_68.document)&&(_4.doc.getElementsByTagName("iframe")[_68.name].contentWindow)&&(_4.doc.getElementsByTagName("iframe")[_68.name].contentWindow.document)))||((_68.name)&&(_4.doc.frames[_68.name])&&(_4.doc.frames[_68.name].document))||null;return doc;},send:function(_69){if(!this["_frame"]){this._frame=this.create(this._iframeName,_4._scopeName+".io.iframe._iframeOnload();");}var dfd=_4._ioSetArgs(_69,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext();},function(dfd){var _6a=null;try{var _6b=dfd.ioArgs;var dii=_4.io.iframe;var ifd=dii.doc(dii._frame);var _6c=_6b.handleAs;_6a=ifd;if(_6c!="html"){if(_6c=="xml"){if(_4.isIE<9||(_4.isIE&&_4.isQuirks)){_4.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _6d=(dii._frame.contentWindow.document).documentElement.innerText;_6d=_6d.replace(/>\s+</g,"><");_6d=_4.trim(_6d);var _6e={responseText:_6d};_6a=_4._contentHandlers["xml"](_6e);}}else{_6a=ifd.getElementsByTagName("textarea")[0].value;if(_6c=="json"){_6a=_4.fromJson(_6a);}else{if(_6c=="javascript"){_6a=_4.eval(_6a);}}}}}catch(e){_6a=e;}finally{_6b._callNext();}return _6a;},function(_6f,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _6f;});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;_4.io.iframe._currentDfd=null;_4.io.iframe._fireNextRequest();}};this._dfdQueue.push(dfd);this._fireNextRequest();_4._ioWatch(dfd,function(dfd){return !dfd.ioArgs["_hasError"];},function(dfd){return (!!dfd.ioArgs["_finished"]);},function(dfd){if(dfd.ioArgs._finished){dfd.callback(dfd);}else{dfd.errback(new Error("Invalid dojo.io.iframe request state"));}});return dfd;},_currentDfd:null,_dfdQueue:[],_iframeName:_4._scopeName+"IoIframe",_fireNextRequest:function(){try{if((this._currentDfd)||(this._dfdQueue.length==0)){return;}do{var dfd=this._currentDfd=this._dfdQueue.shift();}while(dfd&&dfd.canceled&&this._dfdQueue.length);if(!dfd||dfd.canceled){this._currentDfd=null;return;}var _70=dfd.ioArgs;var _71=_70.args;_70._contentToClean=[];var fn=_4.byId(_71["form"]);var _72=_71["content"]||{};if(fn){if(_72){var _73=function(_74,_75){_4.create("input",{type:"hidden",name:_74,value:_75},fn);_70._contentToClean.push(_74);};for(var x in _72){var val=_72[x];if(_4.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_73(x,val[i]);}}else{if(!fn[x]){_73(x,val);}else{fn[x].value=val;}}}}var _76=fn.getAttributeNode("action");var _77=fn.getAttributeNode("method");var _78=fn.getAttributeNode("target");if(_71["url"]){_70._originalAction=_76?_76.value:null;if(_76){_76.value=_71.url;}else{fn.setAttribute("action",_71.url);}}if(!_77||!_77.value){if(_77){_77.value=(_71["method"])?_71["method"]:"post";}else{fn.setAttribute("method",(_71["method"])?_71["method"]:"post");}}_70._originalTarget=_78?_78.value:null;if(_78){_78.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;_4._ioNotifyStart(dfd);fn.submit();}else{var _79=_71.url+(_71.url.indexOf("?")>-1?"&":"?")+_70.query;_4._ioNotifyStart(dfd);this.setSrc(this._frame,_79,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _7a=dfd.ioArgs;var _7b=_7a.args;var _7c=_4.byId(_7b.form);if(_7c){var _7d=_7a._contentToClean;for(var i=0;i<_7d.length;i++){var key=_7d[i];for(var j=0;j<_7c.childNodes.length;j++){var _7e=_7c.childNodes[j];if(_7e.name==key){_4.destroy(_7e);break;}}}if(_7a["_originalAction"]){_7c.setAttribute("action",_7a._originalAction);}if(_7a["_originalTarget"]){_7c.setAttribute("target",_7a._originalTarget);_7c.target=_7a._originalTarget;}}_7a._finished=true;}};}if(!_4._hasResource["dojo.cldr.supplemental"]){_4._hasResource["dojo.cldr.supplemental"]=true;_4.provide("dojo.cldr.supplemental");_4.getObject("cldr.supplemental",true,_4);_4.cldr.supplemental.getFirstDayOfWeek=function(_7f){var _80={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0};var _81=_4.cldr.supplemental._region(_7f);var dow=_80[_81];return (dow===undefined)?1:dow;};_4.cldr.supplemental._region=function(_82){_82=_4.i18n.normalizeLocale(_82);var _83=_82.split("-");var _84=_83[1];if(!_84){_84={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[_83[0]];}else{if(_84.length==4){_84=_83[2];}}return _84;};_4.cldr.supplemental.getWeekend=function(_85){var _86={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5};var _87={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6};var _88=_4.cldr.supplemental._region(_85);var _89=_86[_88];var end=_87[_88];if(_89===undefined){_89=6;}if(end===undefined){end=0;}return {start:_89,end:end};};}if(!_4._hasResource["dojo.regexp"]){_4._hasResource["dojo.regexp"]=true;_4.provide("dojo.regexp");_4.getObject("regexp",true,_4);_4.regexp.escapeString=function(str,_8a){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_8a&&_8a.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};_4.regexp.buildGroupRE=function(arr,re,_8b){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return _4.regexp.group(b.join("|"),_8b);};_4.regexp.group=function(_8c,_8d){return "("+(_8d?"?:":"")+_8c+")";};}if(!_4._hasResource["dojo.string"]){_4._hasResource["dojo.string"]=true;_4.provide("dojo.string");_4.getObject("string",true,_4);_4.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};_4.string.pad=function(_8e,_8f,ch,end){if(!ch){ch="0";}var out=String(_8e),pad=_4.string.rep(ch,Math.ceil((_8f-out.length)/ch.length));return end?out+pad:pad+out;};_4.string.substitute=function(_90,map,_91,_92){_92=_92||_4.global;_91=_91?_4.hitch(_92,_91):function(v){return v;};return _90.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_93,key,_94){var _95=_4.getObject(key,false,map);if(_94){_95=_4.getObject(_94,false,_92).call(_92,_95,key);}return _91(_95,key).toString();});};_4.string.trim=String.prototype.trim?_4.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!_4._hasResource["dojo.date.locale"]){_4._hasResource["dojo.date.locale"]=true;_4.provide("dojo.date.locale");_4.getObject("date.locale",true,_4);(function(){function _96(_97,_98,_99,_9a){return _9a.replace(/([a-z])\1*/ig,function(_9b){var s,pad,c=_9b.charAt(0),l=_9b.length,_9c=["abbr","wide","narrow"];switch(c){case "G":s=_98[(l<4)?"eraAbbr":"eraNames"][_97.getFullYear()<0?0:1];break;case "y":s=_97.getFullYear();switch(l){case 1:break;case 2:if(!_99.fullYear){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_97.getMonth()+1)/3);pad=true;break;case "M":var m=_97.getMonth();if(l<3){s=m+1;pad=true;}else{var _9d=["months","format",_9c[l-3]].join("-");s=_98[_9d][m];}break;case "w":var _9e=0;s=_4.date.locale._getWeekOfYear(_97,_9e);pad=true;break;case "d":s=_97.getDate();pad=true;break;case "D":s=_4.date.locale._getDayOfYear(_97);pad=true;break;case "E":var d=_97.getDay();if(l<3){s=d+1;pad=true;}else{var _9f=["days","format",_9c[l-3]].join("-");s=_98[_9f][d];}break;case "a":var _a0=(_97.getHours()<12)?"am":"pm";s=_99[_a0]||_98["dayPeriods-format-wide-"+_a0];break;case "h":case "H":case "K":case "k":var h=_97.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_97.getMinutes();pad=true;break;case "s":s=_97.getSeconds();pad=true;break;case "S":s=Math.round(_97.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=_4.date.locale._getZone(_97,true,_99);if(s){break;}l=4;case "Z":var _a1=_4.date.locale._getZone(_97,false,_99);var tz=[(_a1<=0?"+":"-"),_4.string.pad(Math.floor(Math.abs(_a1)/60),2),_4.string.pad(Math.abs(_a1)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_9a);}if(pad){s=_4.string.pad(s,l);}return s;});};_4.date.locale._getZone=function(_a2,_a3,_a4){if(_a3){return _4.date.getTimezoneName(_a2);}else{return _a2.getTimezoneOffset();}};_4.date.locale.format=function(_a5,_a6){_a6=_a6||{};var _a7=_4.i18n.normalizeLocale(_a6.locale),_a8=_a6.formatLength||"short",_a9=_4.date.locale._getGregorianBundle(_a7),str=[],_aa=_4.hitch(this,_96,_a5,_a9,_a6);if(_a6.selector=="year"){return _ab(_a9["dateFormatItem-yyyy"]||"yyyy",_aa);}var _ac;if(_a6.selector!="date"){_ac=_a6.timePattern||_a9["timeFormat-"+_a8];if(_ac){str.push(_ab(_ac,_aa));}}if(_a6.selector!="time"){_ac=_a6.datePattern||_a9["dateFormat-"+_a8];if(_ac){str.push(_ab(_ac,_aa));}}return str.length==1?str[0]:_a9["dateTimeFormat-"+_a8].replace(/\{(\d+)\}/g,function(_ad,key){return str[key];});};_4.date.locale.regexp=function(_ae){return _4.date.locale._parseInfo(_ae).regexp;};_4.date.locale._parseInfo=function(_af){_af=_af||{};var _b0=_4.i18n.normalizeLocale(_af.locale),_b1=_4.date.locale._getGregorianBundle(_b0),_b2=_af.formatLength||"short",_b3=_af.datePattern||_b1["dateFormat-"+_b2],_b4=_af.timePattern||_b1["timeFormat-"+_b2],_b5;if(_af.selector=="date"){_b5=_b3;}else{if(_af.selector=="time"){_b5=_b4;}else{_b5=_b1["dateTimeFormat-"+_b2].replace(/\{(\d+)\}/g,function(_b6,key){return [_b4,_b3][key];});}}var _b7=[],re=_ab(_b5,_4.hitch(this,_b8,_b7,_b1,_af));return {regexp:re,tokens:_b7,bundle:_b1};};_4.date.locale.parse=function(_b9,_ba){var _bb=/[\u200E\u200F\u202A\u202E]/g,_bc=_4.date.locale._parseInfo(_ba),_bd=_bc.tokens,_be=_bc.bundle,re=new RegExp("^"+_bc.regexp.replace(_bb,"")+"$",_bc.strict?"":"i"),_bf=re.exec(_b9&&_b9.replace(_bb,""));if(!_bf){return null;}var _c0=["abbr","wide","narrow"],_c1=[1970,0,1,0,0,0,0],_c2="",_c3=_4.every(_bf,function(v,i){if(!i){return true;}var _c4=_bd[i-1];var l=_c4.length;switch(_c4.charAt(0)){case "y":if(l!=2&&_ba.strict){_c1[0]=v;}else{if(v<100){v=Number(v);var _c5=""+new Date().getFullYear(),_c6=_c5.substring(0,2)*100,_c7=Math.min(Number(_c5.substring(2,4))+20,99),num=(v<_c7)?_c6+v:_c6-100+v;_c1[0]=num;}else{if(_ba.strict){return false;}_c1[0]=v;}}break;case "M":if(l>2){var _c8=_be["months-format-"+_c0[l-3]].concat();if(!_ba.strict){v=v.replace(".","").toLowerCase();_c8=_4.map(_c8,function(s){return s.replace(".","").toLowerCase();});}v=_4.indexOf(_c8,v);if(v==-1){return false;}}else{v--;}_c1[1]=v;break;case "E":case "e":var _c9=_be["days-format-"+_c0[l-3]].concat();if(!_ba.strict){v=v.toLowerCase();_c9=_4.map(_c9,function(d){return d.toLowerCase();});}v=_4.indexOf(_c9,v);if(v==-1){return false;}break;case "D":_c1[1]=0;case "d":_c1[2]=v;break;case "a":var am=_ba.am||_be["dayPeriods-format-wide-am"],pm=_ba.pm||_be["dayPeriods-format-wide-pm"];if(!_ba.strict){var _ca=/\./g;v=v.replace(_ca,"").toLowerCase();am=am.replace(_ca,"").toLowerCase();pm=pm.replace(_ca,"").toLowerCase();}if(_ba.strict&&v!=am&&v!=pm){return false;}_c2=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_c1[3]=v;break;case "m":_c1[4]=v;break;case "s":_c1[5]=v;break;case "S":_c1[6]=v;}return true;});var _cb=+_c1[3];if(_c2==="p"&&_cb<12){_c1[3]=_cb+12;}else{if(_c2==="a"&&_cb==12){_c1[3]=0;}}var _cc=new Date(_c1[0],_c1[1],_c1[2],_c1[3],_c1[4],_c1[5],_c1[6]);if(_ba.strict){_cc.setFullYear(_c1[0]);}var _cd=_bd.join(""),_ce=_cd.indexOf("d")!=-1,_cf=_cd.indexOf("M")!=-1;if(!_c3||(_cf&&_cc.getMonth()>_c1[1])||(_ce&&_cc.getDate()>_c1[2])){return null;}if((_cf&&_cc.getMonth()<_c1[1])||(_ce&&_cc.getDate()<_c1[2])){_cc=_4.date.add(_cc,"hour",1);}return _cc;};function _ab(_d0,_d1,_d2,_d3){var _d4=function(x){return x;};_d1=_d1||_d4;_d2=_d2||_d4;_d3=_d3||_d4;var _d5=_d0.match(/(''|[^'])+/g),_d6=_d0.charAt(0)=="'";_4.forEach(_d5,function(_d7,i){if(!_d7){_d5[i]="";}else{_d5[i]=(_d6?_d2:_d1)(_d7.replace(/''/g,"'"));_d6=!_d6;}});return _d3(_d5.join(""));};function _b8(_d8,_d9,_da,_db){_db=_4.regexp.escapeString(_db);if(!_da.strict){_db=_db.replace(" a"," ?a");}return _db.replace(/([a-z])\1*/ig,function(_dc){var s,c=_dc.charAt(0),l=_dc.length,p2="",p3="";if(_da.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+?":"1[0-2]|"+p2+"[1-9]";break;case "D":s="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+p3+"[1-9][0-9]|"+p2+"[1-9]";break;case "d":s="3[01]|[12]\\d|"+p2+"[1-9]";break;case "w":s="[1-4][0-9]|5[0-3]|"+p2+"[1-9]";break;case "E":s="\\S+";break;case "h":s="1[0-2]|"+p2+"[1-9]";break;case "k":s="1[01]|"+p2+"\\d";break;case "H":s="1\\d|2[0-3]|"+p2+"\\d";break;case "K":s="1\\d|2[0-4]|"+p2+"[1-9]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_da.am||_d9["dayPeriods-format-wide-am"],pm=_da.pm||_d9["dayPeriods-format-wide-pm"];s=am+"|"+pm;if(!_da.strict){if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}if(s.indexOf(".")!=-1){s+="|"+s.replace(/\./g,"");}}s=s.replace(/\./g,"\\.");break;default:s=".*";}if(_d8){_d8.push(_dc);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _dd=[];_4.date.locale.addCustomFormats=function(_de,_df){_dd.push({pkg:_de,name:_df});};_4.date.locale._getGregorianBundle=function(_e0){var _e1={};_4.forEach(_dd,function(_e2){var _e3=_4.i18n.getLocalization(_e2.pkg,_e2.name,_e0);_e1=_4.mixin(_e1,_e3);},this);return _e1;};})();_4.date.locale.addCustomFormats("dojo.cldr","gregorian");_4.date.locale.getNames=function(_e4,_e5,_e6,_e7){var _e8,_e9=_4.date.locale._getGregorianBundle(_e7),_ea=[_e4,_e6,_e5];if(_e6=="standAlone"){var key=_ea.join("-");_e8=_e9[key];if(_e8[0]==1){_e8=undefined;}}_ea[1]="format";return (_e8||_e9[_ea.join("-")]).concat();};_4.date.locale.isWeekend=function(_eb,_ec){var _ed=_4.cldr.supplemental.getWeekend(_ec),day=(_eb||new Date()).getDay();if(_ed.end<_ed.start){_ed.end+=7;if(day<_ed.start){day+=7;}}return day>=_ed.start&&day<=_ed.end;};_4.date.locale._getDayOfYear=function(_ee){return _4.date.difference(new Date(_ee.getFullYear(),0,1,_ee.getHours()),_ee)+1;};_4.date.locale._getWeekOfYear=function(_ef,_f0){if(arguments.length==1){_f0=0;}var _f1=new Date(_ef.getFullYear(),0,1).getDay(),adj=(_f1-_f0+7)%7,_f2=Math.floor((_4.date.locale._getDayOfYear(_ef)+adj-1)/7);if(_f1==_f0){_f2++;}return _f2;};}if(!_4._hasResource["esri.layers.FeatureLayer"]){_4._hasResource["esri.layers.FeatureLayer"]=true;_4.provide("esri.layers.FeatureLayer");_4.declare("esri.layers.FeatureLayer",esri.layers.GraphicsLayer,{constructor:function(url,_f3){this._outFields=_f3&&_f3.outFields;this._loadCallback=_f3&&_f3.loadCallback;var _f4=_f3&&_f3._usePatch;this._usePatch=(_f4===null||_f4===undefined)?true:_f4;this._trackIdField=_f3&&_f3.trackIdField;this.objectIdField=_f3&&_f3.objectIdField;this._maxOffset=_f3&&_f3.maxAllowableOffset;this._optEditable=_f3&&_f3.editable;this._optAutoGen=_f3&&_f3.autoGeneralize;this.editSummaryCallback=_f3&&_f3.editSummaryCallback;this.userId=_f3&&_f3.userId;this.userIsAdmin=_f3&&_f3.userIsAdmin;this.useMapTime=(_f3&&_f3.hasOwnProperty("useMapTime"))?(!!_f3.useMapTime):true;this.source=_f3&&_f3.source;this.gdbVersion=_f3&&_f3.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var _f5=this.constructor,_f6=this.mode=(esri._isDefined(_f3&&_f3.mode)?_f3.mode:_f5.MODE_ONDEMAND);switch(_f6){case _f5.MODE_SNAPSHOT:this._mode=new esri.layers._SnapshotMode(this);this._isSnapshot=true;break;case _f5.MODE_ONDEMAND:this._tileWidth=(_f3&&_f3.tileWidth)||512;this._tileHeight=(_f3&&_f3.tileHeight)||512;this._mode=new esri.layers._OnDemandMode(this);var _f7=_f3&&_f3.latticeTiling;this.latticeTiling=_f7;break;case _f5.MODE_SELECTION:this._mode=new esri.layers._SelectionMode(this);this._isSelOnly=true;break;}this._initLayer=_4.hitch(this,this._initLayer);this._selectHandler=_4.hitch(this,this._selectHandler);this._editable=false;if(_4.isObject(url)&&url.layerDefinition){var _f8=url;this._collection=true;this.mode=_f5.MODE_SNAPSHOT;this._initLayer(_f8);return this;}this._task=new esri.tasks.QueryTask(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _f9=this._url.path;this._fserver=false;if(_f9.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _fa=_f3&&_f3.resourceInfo;if(_fa){this._initLayer(_fa);}else{if(this.source){var _fb={source:this.source.toJson()};this._url.query=_4.mixin(this._url.query,{layer:_4.toJson(_fb)});}if(this.gdbVersion){this._url.query=_4.mixin(this._url.query,{gdbVersion:this.gdbVersion});}esri.request({url:_f9,content:_4.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}},_initLayer:function(_fc,io){if(_fc||io){this._json=_fc;this._findCredential();if(this._collection){this._mode=new esri.layers._SnapshotMode(this);this._isSnapshot=true;this._featureSet=_fc.featureSet;this._nextId=_fc.nextObjectId;_fc=_fc.layerDefinition;}if(_fc.hasOwnProperty("capabilities")){var _fd=(this.capabilities=_fc.capabilities);if(_fd&&_fd.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(esri._isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=_4.toJson(this._json);if(this._editable){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_fc.geometryType==="esriGeometryPolyline")||(_fc.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=esri._isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}this.minScale=_fc.minScale||0;this.maxScale=_fc.maxScale||0;this.layerId=_fc.id;this.name=_fc.name;this.description=_fc.description;this.copyright=_fc.copyrightText;this.type=_fc.type;this.geometryType=_fc.geometryType;this.displayField=_fc.displayField;this.defaultDefinitionExpression=_fc.definitionExpression;this.fullExtent=new esri.geometry.Extent(_fc.extent);if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_fc.indexedFields;this.maxRecordCount=_fc.maxRecordCount;this.canModifyLayer=_fc.canModifyLayer;this.supportsStatistics=_fc.supportsStatistics;this.supportsAdvancedQueries=_fc.supportsAdvancedQueries;this.hasLabels=_fc.hasLabels;this.canScaleSymbols=_fc.canScaleSymbols;this.supportsRollbackOnFailure=_fc.supportsRollbackOnFailure;this.syncCanReturnChanges=_fc.syncCanReturnChanges;this.isDataVersioned=_fc.isDataVersioned;this.editFieldsInfo=_fc.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_fc.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_fc.relationships;this.allowGeometryUpdates=esri._isDefined(_fc.allowGeometryUpdates)?_fc.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _fe=(this.fields=[]),_ff=_fc.fields,i;for(i=0;i<_ff.length;i++){_fe.push(new esri.layers.Field(_ff[i]));}if(!this.objectIdField){this.objectIdField=_fc.objectIdField;if(!this.objectIdField){_ff=_fc.fields;for(i=0;i<_ff.length;i++){var _100=_ff[i];if(_100.type==="esriFieldTypeOID"){this.objectIdField=_100.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url},esri.bundle.layers.FeatureLayer.noOIDField));}}if(!esri._isDefined(this._nextId)){var _101=this.objectIdField,_102=-1;if(this._collection&&_101){var fset=this._featureSet,_103=fset&&fset.features,il=_103?_103.length:0,oid,attr;for(i=0;i<il;i++){attr=_103[i].attributes;oid=attr&&attr[_101];if(oid>_102){_102=oid;}}}this._nextId=(_102+1);}this.globalIdField=_fc.globalIdField;this.typeIdField=_fc.typeIdField;this.visibilityField=_fc.visibilityField;var _104=_fc.defaultSymbol;if(_104){this.defaultSymbol=esri.symbol.fromJson(_104);}var _105=this.types=[],_106=_fc.types,_107,_108,_109,_10a=this.editFieldsInfo,_10b=_10a&&_10a.creatorField,_10c=_10a&&_10a.editorField,fix=(_10b||_10c),_10d=[];if(_106){for(i=0;i<_106.length;i++){_107=new esri.layers.FeatureType(_106[i]);_108=_107.templates;if(fix&&_108&&_108.length){_10d=_10d.concat(_108);}_105.push(_107);}}var _10e=_fc.templates,_10f,_110=this.templates=[];if(_10e){for(i=0;i<_10e.length;i++){_10f=new esri.layers.FeatureTemplate(_10e[i]);if(fix){_10d.push(_10f);}_110.push(_10f);}}for(i=0;i<_10d.length;i++){_109=_4.getObject("prototype.attributes",false,_10d[i]);if(_109){if(_10b){delete _109[_10b];}if(_10c){delete _109[_10c];}}}var _111=_fc.timeInfo;if(_111){this.timeInfo=new esri.layers.TimeInfo(_111);this._startTimeField=_111.startTimeField;this._endTimeField=_111.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_111.trackIdField=this._trackIdField;}else{this._trackIdField=_111.trackIdField;}}this.hasAttachments=(!this._collection&&_fc.hasAttachments)?true:false;this.htmlPopupType=_fc.htmlPopupType;var _112=_fc.drawingInfo,_113;if(!this.renderer){if(_112&&_112.renderer){_113=_112.renderer;this.setRenderer(esri.renderer.fromJson(_113));if(_113.type==="classBreaks"){this.renderer._setMaxInclusiveness(true);}if(!this._collection){var _114=_113.type,_115=[];_113=this.renderer;switch(_114){case "simple":_115.push(_113.symbol);break;case "uniqueValue":case "classBreaks":_115.push(_113.defaultSymbol);_115=_115.concat(_4.map(_113.infos,function(info){return info.symbol;}));break;}_115=_4.filter(_115,esri._isDefined);var _116=this._url.path+"/images/",_117=this._getToken();_4.forEach(_115,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_116+url;}if(_117&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_117);}}});}}else{if(_104){_106=this.types;if(_106.length>0){_113=new esri.renderer.UniqueValueRenderer(this.defaultSymbol,this.typeIdField);_4.forEach(_106,function(type){_113.addValue(type.id,type.symbol);});}else{_113=new esri.renderer.SimpleRenderer(this.defaultSymbol);}this.setRenderer(_113);}else{if(!this._isTable){var _118;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_118=new esri.symbol.SimpleMarkerSymbol();break;case "esriGeometryPolyline":_118=new esri.symbol.SimpleLineSymbol();break;case "esriGeometryPolygon":_118=new esri.symbol.SimpleFillSymbol();break;}this.setRenderer(_118?new esri.renderer.SimpleRenderer(_118):null);}}}}var _119=(_112&&_112.transparency)||0;if(!esri._isDefined(this.opacity)&&_119>0){this.opacity=1-(_119/100);}this.version=_fc.currentVersion;if(!this.version){var ver;if("capabilities" in _fc||"drawingInfo" in _fc||"hasAttachments" in _fc||"htmlPopupType" in _fc||"relationships" in _fc||"timeInfo" in _fc||"typeIdField" in _fc||"types" in _fc){ver=10;}else{ver=9.3;}this.version=ver;}if((_4.isIE||_4.isSafari)&&this._editable&&this.version<10.02){this._ts=true;}this.loaded=true;this._fixRendererFields();this._checkFields();this._updateCaps();if(this._collection){this._fireUpdateStart();var _11a=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new esri.tasks.FeatureSet(_11a));this._fcAdded=true;}this.onLoad(this);var _11b=this._loadCallback;if(_11b){delete this._loadCallback;_11b(this);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _11c=this.renderer;if(_11c){this._ager=(_11c.declaredClass.indexOf("TemporalRenderer")!==-1&&_11c.observationAger&&_11c.observationRenderer);var _11d=_4.filter([_11c,_11c.observationRenderer,_11c.latestObservationRenderer,_11c.trackRenderer],esri._isDefined);var _11e=[];_4.forEach(_11d,function(rnd){_11e.push(rnd.attributeField);_11e.push(rnd.attributeField2);_11e.push(rnd.attributeField3);},this);this._rendererFields=_4.filter(_11e,esri._isDefined);}else{this._ager=false;this._rendererFields=[];}if(this.loaded&&this._rendererFields.length>0){this._fixRendererFields();this._checkFields(this._rendererFields);}if(this.loaded&&this._collection){this._typesDirty=true;}},_setMap:function(map,_11f){this._map=map;this._toggleTime(true);var div=this.inherited("_setMap",arguments);this.clearSelection();var _120=this.renderer;if(this.timeInfo){if(this._trackIdField||(_120&&(_120.latestObservationRenderer||_120.trackRenderer))){this._trackManager=new esri.layers._TrackManager(this);this._trackManager.initialize(map);}}this._zoomConnect=_4.connect(map,"onZoomEnd",this,this._zoomHandler);this._zoomHandler();var mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map,_121){var mode=this._mode;if(mode){mode.destroy();this._mode=null;}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}_4.disconnect(this._zoomConnect);this._zoomConnect=null;this._toggleTime(false);this.inherited("_unsetMap",arguments);},refresh:function(){var mode=this._mode;if(mode){mode.refresh();}},setEditable:function(_122){if(!this._collection){console.log("FeatureLayer:setEditCapabilities - this functionality is not yet supported for layer in a feature service");return this;}if(!this.loaded){this._optEditable=_122;return this;}var _123=this._editable;this._editable=_122;this._updateCaps();if(_123!==_122){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_124){var _125={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this._editable){return _125;}var _126=_124&&_124.feature,_127=_124&&_124.userId,caps=_4.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),_4.trim),_128=_4.indexOf(caps,"editing")>-1,_129=_128&&(_4.indexOf(caps,"create")>-1),_12a=_128&&(_4.indexOf(caps,"update")>-1),_12b=_128&&(_4.indexOf(caps,"delete")>-1),_12c=this.ownershipBasedAccessControlForFeatures,_12d=this.editFieldsInfo,_12e=_12d&&_12d.creatorField,_12f=_12d&&_12d.realm,_130=_126&&_126.attributes,_131=(_130&&_12e)?_130[_12e]:undefined,_132,_133=!!this.userIsAdmin,_134=!_12c||_133||!!(_12c.allowOthersToUpdate||_12c.allowUpdateToOthers),_135=!_12c||_133||!!(_12c.allowOthersToDelete||_12c.allowDeleteToOthers);if(_128&&(!(_129||_12a||_12b)||_133)){_129=_12a=_12b=true;}_132={"canCreate":_129,"canUpdate":_12a,"canDelete":_12b};if(_131===null){_132.canUpdate=_12a&&_134;_132.canDelete=_12b&&_135;}else{if(_131===""){return _132;}else{if(_131){_127=_127||this.getUserId();if(_127&&_12f){_127=_127+"@"+_12f;}if(_127.toLowerCase()===_131.toLowerCase()){return _132;}else{_132.canUpdate=_12a&&_134;_132.canDelete=_12b&&_135;}}}}return _132;},getUserId:function(){var _136;if(this.loaded){_136=(this.credential&&this.credential.userId)||this.userId||"";}return _136;},setUserIsAdmin:function(_137){this.userIsAdmin=_137;},setEditSummaryCallback:function(_138){this.editSummaryCallback=_138;},getEditSummary:function(_139,_13a,_13b){_13b=esri._isDefined(_13b)?_13b:(new Date()).getTime();var _13c="",info=this.getEditInfo(_139,_13a,_13b),_13d=(_13a&&_13a.callback)||this.editSummaryCallback;if(_13d){info=_13d(_139,info)||"";}if(_4.isString(info)){_13c=info;}else{if(info){var _13e=info.action,_13f=info.userId,_140=info.timeValue,_141=0;if(_13e){_141++;}if(_13f){_141++;}if(esri._isDefined(_140)){_141++;}if(_141>1){_13c=(_13e==="edit"?"edit":"create")+(_13f?"User":"")+(esri._isDefined(_140)?info.displayPattern:"");}}_13c=_13c&&esri.substitute(info,esri.bundle.layers.FeatureLayer[_13c]);}return _13c;},getEditInfo:function(_142,_143,_144){if(!this.loaded){return;}_144=esri._isDefined(_144)?_144:(new Date()).getTime();var _145=(_143&&_143.action)||"last",_146=this.editFieldsInfo,_147=_146&&_146.creatorField,_148=_146&&_146.creationDateField,_149=_146&&_146.editorField,_14a=_146&&_146.editDateField,_14b=_146&&_146.realm,_14c=_142&&_142.attributes,_14d=(_14c&&_147)?_14c[_147]:undefined,_14e=(_14c&&_148)?_14c[_148]:null,_14f=(_14c&&_149)?_14c[_149]:undefined,_150=(_14c&&_14a)?_14c[_14a]:null,_151=this._getEditData(_14d,_14e,_144),_152=this._getEditData(_14f,_150,_144),_153;switch(_145){case "creation":_153=_151;break;case "edit":_153=_152;break;case "last":_153=_152||_151;break;}if(_153){_153.action=(_153===_152)?"edit":"creation";}return _153;},_getEditData:function(_154,_155,_156){var data,_157,_158,_159=60000,_15a=3600000,_15b=2*_15a,_15c=24*_15a,_15d=7*_15c;if(esri._isDefined(_155)){_157=_156-_155;if(_157<0){_158="Full";}else{if(_157<_159){_158="Seconds";}else{if(_157<(2*_159)){_158="Minute";}else{if(_157<_15a){_158="Minutes";}else{if(_157<_15b){_158="Hour";}else{if(_157<_15c){_158="Hours";}else{if(_157<_15d){_158="WeekDay";}else{_158="Full";}}}}}}}}if((_154!==undefined)||_158){data=data||{};data.userId=_154;if(_158){var _15e=_4.date.locale.format,_15f=new Date(_155);data.minutes=Math.floor(_157/_159);data.hours=Math.floor(_157/_15a);data.weekDay=_15e(_15f,{datePattern:"EEEE",selector:"date"});data.formattedDate=_15e(_15f,{selector:"date"});data.formattedTime=_15e(_15f,{selector:"time"});data.displayPattern=_158;data.timeValue=_155;}}return data;},isEditable:function(){return this._editable;},setMaxAllowableOffset:function(_160){if(!this._editable){this._maxOffset=_160;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_161){if(!this.loaded){this._optAutoGen=_161;}else{if(!this._editable&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_161;if(_161){var map=this._map;if(map&&map.loaded){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}else{delete this._maxOffset;}}}return this;},setScaleRange:function(_162,_163){this.minScale=_162||0;this.maxScale=_163||0;if(this._map&&this._map.loaded){this._updateStatus();}},setGDBVersion:function(_164){if(!this._collection&&(_164!==this.gdbVersion)&&(_164||this.gdbVersion)){this.gdbVersion=_164;this._task.gdbVersion=_164;this._url.query=_4.mixin(this._url.query,{gdbVersion:_164});if(this.loaded){this.clearSelection();if(this._map){this.refresh();}}this.onGDBVersionChange();}return this;},setDefinitionExpression:function(expr){this._defnExpr=expr;var mode=this._mode;if(mode){mode.propertyChangeHandler(1);}return this;},getDefinitionExpression:function(){return this._defnExpr;},setTimeDefinition:function(_165){if(this._isSnapshot){this._timeDefn=_165;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_166,_167){this._timeOffset=_166;this._timeOffsetUnits=_167;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}return this;},setUseMapTime:function(use){this.useMapTime=use;this._toggleTime(!this._suspended);var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},selectFeatures:function(_168,_169,_16a,_16b){_169=_169||this.constructor.SELECTION_NEW;var _16c=this._getShallowClone(_168),map=this._map,_16d,dfd=esri._fixDfd(new _4.Deferred(esri._dfdCanceller));_16c.outFields=this._getOutFields();_16c.returnGeometry=true;if(map){_16c.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_16c)){_16d={features:[]};this._selectHandler(_16d,_169,_16a,_16b,dfd);return dfd;}var _16e=this._canDoClientSideQuery(_16c);if(_16e){_16d={features:this._doQuery(_16c,_16e)};this._selectHandler(_16d,_169,_16a,_16b,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_16b,dfd,true);return dfd;}var self=this;if(this._ts){_16c._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_16c);temp.addCallbacks(function(_16f){self._selectHandler(_16f,_169,_16a,_16b,dfd);},function(err){self._resolve([err],null,_16b,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _170=this._selectedFeatures,_171=[],item;for(item in _170){if(_170.hasOwnProperty(item)){_171.push(_170[item]);}}return _171;},clearSelection:function(_172){var _173=this._selectedFeatures,mode=this._mode,item;for(item in _173){if(_173.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_172){this.onSelectionClear();}return this;},setSelectionSymbol:function(_174){this._selectionSymbol=_174;if(_174){var _175=this._selectedFeatures,item;for(item in _175){if(_175.hasOwnProperty(item)){_175[item].setSymbol(_174);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_176,_177,_178,_179,_17a){var _17b=_17a.assembly,dfd=_17a.dfd;this._applyNormalized(adds,_17b&&_17b[0]);this._applyNormalized(_176,_17b&&_17b[1]);this.onBeforeApplyEdits(adds,_176,_177);var i,_17c={},_17d=this.objectIdField,_17e={f:"json"},_17f=false;if(this._collection){var _180={};_180.addResults=adds?_4.map(adds,function(){_17f=true;return {objectId:this._nextId++,success:true};},this):null;_180.updateResults=_176?_4.map(_176,function(_181){_17f=true;var oid=_181.attributes[_17d];_17c[oid]=_181;return {objectId:oid,success:true};},this):null;_180.deleteResults=_177?_4.map(_177,function(_182){_17f=true;return {objectId:_182.attributes[_17d],success:true};},this):null;if(_17f){this._editHandler(_180,adds,_17c,_178,_179,dfd);}return;}if(adds&&adds.length>0){_17e.adds=this._convertFeaturesToJson(adds,0,1);_17f=true;}if(_176&&_176.length>0){for(i=0;i<_176.length;i++){var _183=_176[i];_17c[_183.attributes[_17d]]=_183;}_17e.updates=this._convertFeaturesToJson(_176,0,0,1);_17f=true;}if(_177&&_177.length>0){var ids=[];for(i=0;i<_177.length;i++){ids.push(_177[i].attributes[_17d]);}_17e.deletes=ids.join(",");_17f=true;}if(_17f){var self=this;return esri.request({url:this._url.path+"/applyEdits",content:_4.mixin(_17e,this._url.query),callbackParamName:"callback",load:function(_184){self._editHandler(_184,adds,_17c,_178,_179,dfd);},error:function(err){self._resolve([err],null,_179,dfd,true);}},{usePost:true});}},queryFeatures:function(_185,_186,_187){return this._query("execute","onQueryFeaturesComplete",_185,_186,_187);},queryRelatedFeatures:function(_188,_189,_18a){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_188,_189,_18a);},queryIds:function(_18b,_18c,_18d){return this._query("executeForIds","onQueryIdsComplete",_18b,_18c,_18d);},queryCount:function(_18e,_18f,_190){return this._query("executeForCount","onQueryCountComplete",_18e,_18f,_190);},queryAttachmentInfos:function(_191,_192,_193){var url=this._url.path+"/"+_191+"/attachments",dfd=new _4.Deferred(esri._dfdCanceller),self=this;dfd._pendingDfd=esri.request({url:url,content:_4.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_194){var _195=_194.attachmentInfos,_196;_4.forEach(_195,function(info){_196=_4.objectToQuery({gdbVersion:self._url.query&&self._url.query.gdbVersion,layer:self._url.query&&self._url.query.layer,token:self._getToken()});info.url=url+"/"+info.id+(_196?("?"+_196):"");info.objectId=_191;});self._resolve([_195],"onQueryAttachmentInfosComplete",_192,dfd);},error:function(err){self._resolve([err],null,_193,dfd,true);}});return dfd;},addAttachment:function(_197,_198,_199,_19a){return this._sendAttachment("add",_197,_198,_199,_19a);},updateAttachment:function(_19b,_19c,_19d,_19e,_19f){_19d.appendChild(_4.create("input",{type:"hidden",name:"attachmentId",value:_19c}));return this._sendAttachment("update",_19b,_19d,_19e,_19f);},deleteAttachments:function(_1a0,_1a1,_1a2,_1a3){var url=this._url.path+"/"+_1a0+"/deleteAttachments",dfd=new _4.Deferred(esri._dfdCanceller),self=this,_1a4={f:"json",attachmentIds:_1a1.join(",")};dfd._pendingDfd=esri.request({url:url,content:_4.mixin(_1a4,this._url.query),callbackParamName:"callback",load:_4.hitch(this,function(_1a5){var _1a6=_1a5.deleteAttachmentResults;_1a6=_4.map(_1a6,function(_1a7){var res=new esri.layers.FeatureEditResult(_1a7);res.attachmentId=res.objectId;res.objectId=_1a0;return res;});self._resolve([_1a6],"onDeleteAttachmentsComplete",_1a2,dfd);}),error:function(err){self._resolve([err],null,_1a3,dfd,true);}},{usePost:true});return dfd;},addType:function(_1a8){if(!this._collection){return false;}var _1a9=this.types;if(_1a9){var _1aa=_4.some(_1a9,function(type){if(type.id==_1a8.id){return true;}return false;});if(_1aa){return false;}else{_1a9.push(_1a8);}}else{this.types=[_1a8];}this._typesDirty=true;return true;},deleteType:function(_1ab){if(!this._collection){return;}var _1ac=this.types;if(_1ac){var _1ad=-1;_4.some(_1ac,function(type,_1ae){if(type.id==_1ab){_1ad=_1ae;return true;}return false;});if(_1ad>-1){this._typesDirty=true;return _1ac.splice(_1ad,1)[0];}}},toJson:function(){var _1af=this._json,json=_4.isString(_1af)?_4.fromJson(_1af):_4.clone(_1af);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _1b0=json.layerDefinition,_1b1=this._collection;if(_1b1&&this._typesDirty){_1b0.types=_4.map(this.types||[],function(type){return type.toJson();});var _1b2=this.renderer,_1b3=_1b0.drawingInfo;if(_1b3&&_1b2&&_1b2.declaredClass.indexOf("TemporalRenderer")===-1){_1b3.renderer=_1b2.toJson();}}var _1b4=null;if(!(_1b1&&!this._fcAdded)){_1b4={geometryType:_1b0.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=_4.mixin({},json.featureSet||{},_1b4);if(_1b1){json.nextObjectId=this._nextId;_1b0.capabilities=this.capabilities;}return json;},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},onQueryCountComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},_updateCaps:function(){var _1b5=this._editable,_1b6=_4.trim(this.capabilities||""),_1b7=_4.map((_1b6?_1b6.split(","):[]),_4.trim),caps=_4.map((_1b6?_1b6.toLowerCase().split(","):[]),_4.trim),_1b8=_4.indexOf(caps,"editing"),cap,i,_1b9,_1ba={"Create":_4.indexOf(caps,"create"),"Update":_4.indexOf(caps,"update"),"Delete":_4.indexOf(caps,"delete")};if(_1b5&&_1b8===-1){_1b7.push("Editing");}else{if(!_1b5&&_1b8>-1){_1b9=[_1b8];for(cap in _1ba){if(_1ba[cap]>-1){_1b9.push(_1ba[cap]);}}_1b9.sort();for(i=_1b9.length-1;i>=0;i--){_1b7.splice(_1b9[i],1);}}}this.capabilities=_1b7.join(",");},_counter:{value:0},_getUniqueId:function(){return this._counter.value++;},_getDesiredStatus:function(){return this.visible&&this._isMapAtVisibleScale();},_isMapAtVisibleScale:function(){if(!this._map){return false;}var _1bb=esri.geometry.getScale(this._map);var _1bc=this.minScale,_1bd=this.maxScale,_1be=!_1bc,_1bf=!_1bd;if(!_1be&&_1bb<=_1bc){_1be=true;}if(!_1bf&&_1bb>=_1bd){_1bf=true;}return (_1be&&_1bf)?true:false;},_suspend:function(){this.inherited("_suspend",arguments);this._toggleTime(false);var mode=this._mode;if(mode){mode.suspend();}},_resume:function(){this.inherited("_resume",arguments);this._toggleTime(true);var mode=this._mode;if(mode){mode.resume();}},_zoomHandler:function(){var map=this._map;if(map&&map.loaded){if(this._autoGeneralize){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}this._updateStatus();}},_toggleTime:function(_1c0){var map=this._map;if(_1c0&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_4.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_4.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_1c1){this._mapTimeExtent=_1c1;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_1c2){var _1c3=this._timeOffset,_1c4=this._timeOffsetUnits;return (_1c2&&_1c3&&_1c4)?_1c2.offset(-1*_1c3,_1c4):_1c2;},_getTimeOverlap:function(_1c5,_1c6){if(_1c5&&_1c6){return _1c5.intersection(_1c6);}else{return _1c5||_1c6;}},_getTimeFilter:function(_1c7){var _1c8=this.getTimeDefinition(),_1c9=null,_1ca;if(_1c8||_1c9){_1ca=this._getTimeOverlap(_1c8,_1c9);if(!_1ca){return [false];}}if(_1c7){_1c7=_1ca?this._getTimeOverlap(_1c7,_1ca):_1c7;if(!_1c7){return [false];}}else{_1c7=_1ca;}return [true,_1c7];},_getAttributeFilter:function(_1cb){var _1cc=this.getDefinitionExpression();if(_1cb){_1cb=_1cc?"("+_1cc+") AND ("+_1cb+")":_1cb;}else{_1cb=_1cc;}return _1cb;},_applyQueryFilters:function(_1cd){_1cd.where=this._getAttributeFilter(_1cd.where);_1cd.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _1ce=this._getTimeFilter(_1cd.timeExtent);if(!_1ce[0]){return false;}else{_1cd.timeExtent=_1ce[1];}}return true;},_add:function(_1cf){var _1d0=this._selectionSymbol,attr=_1cf.attributes,_1d1=this.visibilityField;if(_1d0&&this._isSelOnly){_1cf.setSymbol(_1d0);}if(_1d1&&attr&&attr.hasOwnProperty(_1d1)){_1cf[attr[_1d1]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_1d2){var _1d3=[],map=this._map;if(this._isTable||!map){return;}if(_1d2.text||(_1d2.where&&_1d2.where!==this.getDefinitionExpression())){return;}var _1d4=this._isSnapshot,_1d5=this._isSelOnly;var _1d6=_1d2.geometry;if(_1d6){if(!_1d5&&_1d2.spatialRelationship===esri.tasks.Query.SPATIAL_REL_INTERSECTS&&(_1d6.type==="extent"&&(_1d4||map.extent.contains(_1d6)))){_1d3.push(1);}else{return;}}var ids=_1d2.objectIds;if(ids){if(_1d4){_1d3.push(2);}else{var len=ids.length,mode=this._mode,_1d7=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_1d7++;}}if(_1d7===len){_1d3.push(2);}else{return;}}}if(this.timeInfo){var _1d8=_1d2.timeExtent,_1d9=this._mapTimeExtent;if(_1d4){if(_1d8){_1d3.push(3);}}else{if(_1d5){if(_1d8){return;}}else{if(_1d9){if(_4.indexOf(_1d3,2)!==-1){if(_1d8){_1d3.push(3);}}else{return;}}else{if(_1d3.length>0){if(_1d8){_1d3.push(3);}}else{if(_1d8){return;}}}}}}return _1d3.length>0?_1d3:null;},_doQuery:function(_1da,_1db,_1dc){var _1dd=[],mode=this._mode,_1de=this.objectIdField,i,len,_1df;if(_4.indexOf(_1db,2)!==-1){_1dd=[];var ids=_1da.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_1dd.push(obj);}}if(_1dd.length===0){return [];}}if(_4.indexOf(_1db,1)!==-1){_1df=_1dd.length>0?_1dd:this.graphics;len=_1df.length;var _1e0=_1da.geometry._normalize(null,true);_1dd=[];for(i=0;i<len;i++){var _1e1=_1df[i],_1e2=_1e1.geometry;if(_1e2){if(this.normalization&&_1e0.length){if(_1e0[0].intersects(_1e2)||_1e0[1].intersects(_1e2)){_1dd.push(_1e1);}}else{if(_1e0.intersects(_1e2)){_1dd.push(_1e1);}}}}if(_1dd.length===0){return [];}}if(_4.indexOf(_1db,3)!==-1){if(this.timeInfo){_1df=_1dd.length>0?_1dd:this.graphics;var time=_1da.timeExtent,_1e3=this._filterByTime(_1df,time.startTime,time.endTime);_1dd=_1e3.match;}}if(_1dc){return _4.map(_1dd,function(obj){return obj.attributes[_1de];},this);}else{return _1dd;}},_filterByTime:function(_1e4,_1e5,_1e6){var _1e7=this._startTimeField,_1e8=this._endTimeField,_1e9;if(!this._twoTimeFields){_1e9=_1e7||_1e8;}var _1ea=esri._isDefined,yea=[],nay=[],i,len=_1e4.length,_1eb,_1ec;_1e5=_1e5?_1e5.getTime():-Infinity;_1e6=_1e6?_1e6.getTime():Infinity;if(_1e9){for(i=0;i<len;i++){_1eb=_1e4[i];_1ec=_1eb.attributes;var time=_1ec[_1e9];if(time>=_1e5&&time<=_1e6){yea.push(_1eb);}else{nay.push(_1eb);}}}else{for(i=0;i<len;i++){_1eb=_1e4[i];_1ec=_1eb.attributes;var _1ed=_1ec[_1e7],end=_1ec[_1e8];_1ed=_1ea(_1ed)?_1ed:-Infinity;end=_1ea(end)?end:Infinity;if((_1ed>=_1e5&&_1ed<=_1e6)||(end>=_1e5&&end<=_1e6)||(_1e5>=_1ed&&_1e6<=end)){yea.push(_1eb);}else{nay.push(_1eb);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_1ee,_1ef,dfd,_1f0){if(_1ee){this[_1ee].apply(this,args);}if(_1ef){_1ef.apply(null,args);}if(dfd){esri._resDfd(dfd,args,_1f0);}},_getShallowClone:function(_1f1){var _1f2=new esri.tasks.Query(),prop;for(prop in _1f1){if(_1f1.hasOwnProperty(prop)){_1f2[prop]=_1f1[prop];}}return _1f2;},_query:function(type,_1f3,_1f4,_1f5,_1f6){var that=this,dfd=new _4.Deferred(esri._dfdCanceller);var _1f7=function(_1f8,_1f9){if(!_1f9&&type==="execute"&&!that._isTable){var _1fa=_1f8.features,mode=that._mode,_1fb=that.objectIdField,il=_1fa.length,i;for(i=il-1;i>=0;i--){var oid=_1fa[i].attributes[_1fb];var _1fc=mode._getFeature(oid);if(_1fc){_1fa.splice(i,1,_1fc);}}}that._resolve([_1f8],_1f3,_1f5,dfd);};if(type!=="executeRelationshipQuery"){_1f4=this._getShallowClone(_1f4);_1f4.outFields=this._getOutFields();_1f4.returnGeometry=true;var map=this._map,_1fd;if(map){_1f4.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_1f4)){switch(type){case "execute":_1fd=new esri.tasks.FeatureSet({features:[]});break;case "executeForIds":_1fd=[];break;case "executeForCount":_1fd=0;break;}_1f7(_1fd,true);return dfd;}var _1fe=this._canDoClientSideQuery(_1f4);if(_1fe){var _1ff=this._doQuery(_1f4,_1fe,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_1fd=new esri.tasks.FeatureSet();_1fd.features=_1ff;break;case "executeForIds":_1fd=_1ff;break;case "executeForCount":_1fd=_1ff.length;break;}_1f7(_1fd,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_1f6,dfd,true);return dfd;}if(this._ts){_1f4._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_1f4);temp.addCallbacks(_1f7,function(err){that._resolve([err],null,_1f6,dfd,true);});return dfd;},_convertFeaturesToJson:function(_200,_201,_202,_203){var json=[],_204=this._selectionSymbol,_205=this.visibilityField,i,_206,_207=this.objectIdField;if(_202||_203){_206=_4.filter(this.fields,function(_208){return (_208.editable===false)&&(!_203||(_208.name!==_207));});}for(i=0;i<_200.length;i++){var _209=_200[i],_20a={},_20b=_209.geometry,attr=_209.attributes,_20c=_209.symbol;if(_20b&&(!_203||this.allowGeometryUpdates)){_20a.geometry=_20b.toJson();}if(_205){_20a.attributes=attr=_4.mixin({},attr);attr[_205]=_209.visible?1:0;}else{if(attr){_20a.attributes=_4.mixin({},attr);}}if(_20a.attributes&&_206&&_206.length){_4.forEach(_206,function(_20d){delete _20a.attributes[_20d.name];});}if(_20c&&(_20c!==_204)){_20a.symbol=_20c.toJson();}json.push(_20a);}return _201?json:_4.toJson(json);},_selectHandler:function(_20e,_20f,_210,_211,dfd){var _212,ctor=this.constructor;switch(_20f){case ctor.SELECTION_NEW:this.clearSelection(true);_212=true;break;case ctor.SELECTION_ADD:_212=true;break;case ctor.SELECTION_SUBTRACT:_212=false;break;}var i,_213=_20e.features,mode=this._mode,_214=[],_215=this.objectIdField,_216,oid;if(_212){for(i=0;i<_213.length;i++){_216=_213[i];oid=_216.attributes[_215];var _217=mode._addFeatureIIf(oid,_216);_214.push(_217);this._selectFeatureIIf(oid,_217,mode);}}else{for(i=0;i<_213.length;i++){_216=_213[i];oid=_216.attributes[_215];this._unSelectFeatureIIf(oid,mode);var _218=mode._removeFeatureIIf(oid);_214.push(_218||_216);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_214,_20f,_20e.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_210,dfd);if(_20e.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_219,mode){var _21a=this._selectedFeatures,_21b=_21a[oid];if(!_21b){mode._incRefCount(oid);_21a[oid]=_219;if(!this._isTable){this._setSelectSymbol(_219);}}return _21b||_219;},_unSelectFeatureIIf:function(oid,mode){var _21c=this._selectedFeatures[oid];if(_21c){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_21c);}}return _21c;},_isSelected:function(_21d){},_setSelectSymbol:function(_21e){var _21f=this._selectionSymbol;if(_21f&&!this._isSelOnly){_21e.setSymbol(_21f);}},_setUnSelectSymbol:function(_220){var _221=this._selectionSymbol;if(_221&&!this._isSelOnly){if(_221===_220.symbol){_220.setSymbol(null,true);}}},_getOutFields:function(){var _222=_4.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_223,_224,arr){return !!_223&&(_4.indexOf(arr,_223)===_224);});var _225=_4.clone(this._outFields);if(_225){if(_4.indexOf(_225,"*")!==-1){return _225;}_4.forEach(_222,function(_226){if(_4.indexOf(_225,_226)===-1){_225.push(_226);}});return _225;}else{return _222;}},_checkFields:function(_227){var _228=_227||this._getOutFields();_4.forEach(_228,function(_229){if(_229==="*"){return;}if(!this._getField(_229)){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url,field:_229},esri.bundle.layers.FeatureLayer.fieldNotFound));}},this);if(!_227&&!this._isTable&&!this._fserver&&!this._collection){var _22a=_4.some(this.fields,function(_22b){return (_22b&&_22b.type==="esriFieldTypeGeometry")?true:false;});if(!_22a){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url},esri.bundle.layers.FeatureLayer.noGeometryField));}}},_fixRendererFields:function(){var _22c=this.renderer;if(_22c&&this.fields.length>0){var _22d=_4.filter([_22c,_22c.observationRenderer,_22c.latestObservationRenderer,_22c.trackRenderer],esri._isDefined);var _22e=[];_4.forEach(_22d,function(rnd){var _22f,_230;_230=rnd.attributeField;if(_230){_22f=!this._getField(_230)&&this._getField(_230,true);if(_22f){rnd.attributeField=_22f.name;}}_230=rnd.attributeField2;if(_230){_22f=!this._getField(_230)&&this._getField(_230,true);if(_22f){rnd.attributeField2=_22f.name;}}_230=rnd.attributeField3;if(_230){_22f=!this._getField(_230)&&this._getField(_230,true);if(_22f){rnd.attributeField3=_22f.name;}}_22e.push(rnd.attributeField);_22e.push(rnd.attributeField2);_22e.push(rnd.attributeField3);},this);this._rendererFields=_4.filter(_22e,esri._isDefined);}},_getField:function(_231,_232){var _233=this.fields;if(_233.length===0){return null;}var _234;if(_232){_231=_231.toLowerCase();}_4.some(_233,function(_235){var _236=false;if(_232){_236=(_235&&_235.name.toLowerCase()===_231)?true:false;}else{_236=(_235&&_235.name===_231)?true:false;}if(_236){_234=_235;}return _236;});return _234;},_getDateOpts:function(){if(!this._dtOpts){var _237=_4.map(_4.filter(this.fields,function(_238){return !!(_238&&_238.type==="esriFieldTypeDate");}),function(_239){return _239.name;});this._dtOpts={properties:_237};}return this._dtOpts;},_applyNormalized:function(_23a,_23b){if(_23a&&_23b){_4.forEach(_23a,function(_23c,_23d){if(_23c&&_23b[_23d]){_23c.setGeometry(_23b[_23d]);}});}},_editHandler:function(_23e,adds,_23f,_240,_241,dfd){var _242=_23e.addResults,_243=_23e.updateResults,_244=_23e.deleteResults,i,_245,oid,_246,attr,_247=this.objectIdField,mode=this._mode,_248=this._isTable;var _249=this.editFieldsInfo,_24a=this._getOutFields()||[],_24b=_249&&_249.creatorField,_24c=_249&&_249.creationDateField,_24d=_249&&_249.editorField,_24e=_249&&_249.editDateField,_24f=_249&&_249.realm;if(_4.indexOf(_24a,"*")===-1){if(_24b&&_4.indexOf(_24a,_24b)===-1){_24b=null;}if(_24c&&_4.indexOf(_24a,_24c)===-1){_24c=null;}if(_24d&&_4.indexOf(_24a,_24d)===-1){_24d=null;}if(_24e&&_4.indexOf(_24a,_24e)===-1){_24e=null;}}var _250=(_24c||_24e)?(new Date()).getTime():null,_251=(_24b||_24d)?this.getUserId():undefined;if(_251&&_24f){_251=_251+"@"+_24f;}if(_242){for(i=0;i<_242.length;i++){_242[i]=new esri.layers.FeatureEditResult(_242[i]);if(_248){continue;}_245=_242[i];if(_245.success){oid=_245.objectId;_246=adds[i];var gl=_246._graphicsLayer;if(gl&&gl!==this){gl.remove(_246);}attr=_246.attributes||{};attr[_247]=oid;if(_24b){attr[_24b]=_251;}if(_24d){attr[_24d]=_251;}if(_24c){attr[_24c]=_250;}if(_24e){attr[_24e]=_250;}_246.setAttributes(attr);mode.drawFeature(_246);}}}if(_243){for(i=0;i<_243.length;i++){_243[i]=new esri.layers.FeatureEditResult(_243[i]);if(_248){continue;}_245=_243[i];if(_245.success){oid=_245.objectId;_246=_23f[oid];var _252=mode._getFeature(oid);if(_252){if(_252.geometry!==_246.geometry){_252.setGeometry(esri.geometry.fromJson(_246.geometry.toJson()));}this._repaint(_252,oid);}_246=_252||_246;attr=_246.attributes||{};if(_24d){attr[_24d]=_251;}if(_24e){attr[_24e]=_250;}_246.setAttributes(attr);}}}if(_244){var _253=[];for(i=0;i<_244.length;i++){_244[i]=new esri.layers.FeatureEditResult(_244[i]);if(_248){continue;}_245=_244[i];if(_245.success){oid=_245.objectId;_246=mode._getFeature(oid);if(_246){if(this._unSelectFeatureIIf(oid,mode)){_253.push(_246);}_246._count=0;mode._removeFeatureIIf(oid);}}}if(_253.length>0){this.onSelectionComplete(_253,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_242,_243,_244],"onEditsComplete",_240,dfd);},_sendAttachment:function(type,_254,_255,_256,_257){var _258=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_254+"/"+_258,self=this;var dfd=esri.request({url:url,form:_255,content:_4.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_259){var _25a=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_25b=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_25c=new esri.layers.FeatureEditResult(_259[_25a]);_25c.attachmentId=_25c.objectId;_25c.objectId=_254;self._resolve([_25c],_25b,_256);return _25c;}).addErrback(function(_25d){self._resolve([_25d],null,_257,null,true);});return dfd;},_repaint:function(_25e,oid,_25f){oid=esri._isDefined(oid)?oid:_25e.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_25e.setSymbol(_25e.symbol,_25f);}},_getKind:function(_260){var _261=this._trackManager;if(_261){return _261.isLatestObservation(_260)?1:0;}return 0;}});_4.mixin(esri.layers.FeatureLayer,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});esri._createWrappers("esri.layers.FeatureLayer");_4.declare("esri.layers.FeatureType",null,{constructor:function(json){if(json&&_4.isObject(json)){this.id=json.id;this.name=json.name;var _262=json.symbol;if(_262){this.symbol=esri.symbol.fromJson(_262);}var _263=json.domains,_264,i;var _265=this.domains={};for(_264 in _263){if(_263.hasOwnProperty(_264)){var _266=_263[_264];switch(_266.type){case "range":_265[_264]=new esri.layers.RangeDomain(_266);break;case "codedValue":_265[_264]=new esri.layers.CodedValueDomain(_266);break;case "inherited":_265[_264]=new esri.layers.InheritedDomain(_266);break;}}}var _267=json.templates;if(_267){var _268=this.templates=[];for(i=0;i<_267.length;i++){_268.push(new esri.layers.FeatureTemplate(_267[i]));}}}},toJson:function(){var json={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _269,_26a=this.domains,_26b=this.templates,_26c=esri._sanitize;if(_26a){var _26d=json.domains={};for(_269 in _26a){if(_26a.hasOwnProperty(_269)){_26d[_269]=_26a[_269]&&_26a[_269].toJson();}}_26c(_26d);}if(_26b){json.templates=_4.map(_26b,function(_26e){return _26e.toJson();});}return _26c(json);}});_4.declare("esri.layers.FeatureTemplate",null,{constructor:function(json){if(json&&_4.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _26f=json.prototype;this.prototype=new esri.Graphic(_26f.geometry,null,_26f.attributes);}},toJson:function(){return esri._sanitize({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});_4.mixin(esri.layers.FeatureTemplate,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});_4.declare("esri.layers.FeatureEditResult",null,{constructor:function(json){if(json&&_4.isObject(json)){this.objectId=json.objectId;this.success=json.success;if(!json.success){var err=json.error;this.error=new Error();this.error.code=err.code;this.error.message=err.description;}}}});_4.declare("esri.layers._RenderMode",null,{constructor:function(){this._prefix="jsonp_"+(_4._scopeName||"dojo")+"IoScript";},initialize:function(map){},propertyChangeHandler:function(type){},destroy:function(){},drawFeature:function(_270){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _271=this._featureMap[oid];if(_271){_271._count++;}},_decRefCount:function(oid){var _272=this._featureMap[oid];if(_272){_272._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_273){var fmap=this._featureMap,_274=fmap[oid],_275=this.featureLayer;if(!_274){fmap[oid]=_273;_275._add(_273);_273._count=0;}return _274||_273;},_removeFeatureIIf:function(oid){var _276=this._featureMap[oid],_277=this.featureLayer;if(_276){if(_276._count){return;}delete this._featureMap[oid];_277._remove(_276);}return _276;},_clearIIf:function(){var i,_278=this.featureLayer,_279=_278.graphics,_27a=_278._selectedFeatures,_27b=_278.objectIdField;for(i=_279.length-1;i>=0;i--){var _27c=_279[i];var oid=_27c.attributes[_27b];if(oid in _27a){_27c._count=1;continue;}_27c._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_4.io.script[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_4.io.script[this._prefix+id];if(dfd){try{dfd.cancel();_4.io.script._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_4.io.script._validCheck(null);},_toggleVisibility:function(show){var _27d=this.featureLayer,_27e=_27d.graphics,_27f=show?"show":"hide",i,len=_27e.length;show=show&&_27d._ager;for(i=0;i<len;i++){var _280=_27e[i];_280[_27f]();if(show){_27d._repaint(_280);}}},_applyTimeFilter:function(_281){var _282=this.featureLayer;if(!_282.timeInfo||_282._suspended){return;}if(!_281){_282._fireUpdateStart();}var _283=_282._trackManager;if(_283){_283.clearTracks();}var defn=_282.getTimeDefinition(),_284=_282._getOffsettedTE(_282._mapTimeExtent);if(_284){_284=_282._getTimeOverlap(defn,_284);if(_284){var _285=_282._filterByTime(_282.graphics,_284.startTime,_284.endTime);if(_283){_283.addFeatures(_285.match);}_4.forEach(_285.match,function(_286){var _287=_286._shape;if(!_286.visible){_286.show();_287=_286._shape;_287&&_287._moveToFront();}if(_282._ager&&_287){_282._repaint(_286);}});_4.forEach(_285.noMatch,function(_288){if(_288.visible){_288.hide();}});}else{this._toggleVisibility(false);}}else{if(_283){_283.addFeatures(_282.graphics);}this._toggleVisibility(true);}if(_283){_283.moveLatestToFront();_283.drawTracks();}if(!_281){_282._fireUpdateEnd();}}});_4.declare("esri.layers._SelectionMode",[esri.layers._RenderMode],{constructor:function(_289){this.featureLayer=_289;this._featureMap={};},initialize:function(map){this.map=map;this._init=true;},propertyChangeHandler:function(type){if(this._init&&type===0){this._applyTimeFilter();}},destroy:function(){this._init=false;},resume:function(){this.propertyChangeHandler(0);}});_4.declare("esri.layers._SnapshotMode",[esri.layers._RenderMode],{constructor:function(_28a){this.featureLayer=_28a;this._featureMap={};this._drawFeatures=_4.hitch(this,this._drawFeatures);this._queryErrorHandler=_4.hitch(this,this._queryErrorHandler);},initialize:function(map){this.map=map;var _28b=this.featureLayer;if(_28b._collection){this._applyTimeFilter();}else{this._fetchAll();}this._init=true;},propertyChangeHandler:function(type){if(this._init){if(type){this._fetchAll();}else{this._applyTimeFilter();}}},destroy:function(){this._init=false;},drawFeature:function(_28c){var _28d=this.featureLayer,_28e=_28d.objectIdField,oid=_28c.attributes[_28e];this._addFeatureIIf(oid,_28c);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _28f=this.featureLayer;if(_28f._collection){_28f._fireUpdateStart();_28f._refresh(true);_28f._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_290){var id="_"+_290.name+_290.layerId+_290._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _291=this.featureLayer;if(_291._collection){return;}_291._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_292=this.featureLayer,_293=_292.getDefinitionExpression();var _294=new esri.tasks.Query();_294.outFields=_292._getOutFields();_294.where=_293||"1=1";_294.returnGeometry=true;_294.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());_294.timeExtent=_292.getTimeDefinition();_294.maxAllowableOffset=_292._maxOffset;if(_292._ts){_294._ts=(new Date()).getTime();}var _295;if(_292._usePatch){_295=this._getRequestId(_292);this._cancelPendingRequest(null,_295);}_292._task.execute(_294,this._drawFeatures,this._queryErrorHandler,_295);},_drawFeatures:function(_296){this._purgeRequests();var _297=_296.features,_298=this.featureLayer,_299=_298.objectIdField,i,len=_297.length,_29a,oid;for(i=0;i<len;i++){_29a=_297[i];oid=_29a.attributes[_299];this._addFeatureIIf(oid,_29a);this._incRefCount(oid);}this._applyTimeFilter(true);_298._fireUpdateEnd(null,_296.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_296.exceededTransferLimit){_298.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _29b=this.featureLayer;_29b._errorHandler(err);_29b._fireUpdateEnd(err);}});_4.declare("esri.layers._OnDemandMode",[esri.layers._RenderMode],{constructor:function(_29c){this.featureLayer=_29c;this._featureMap={};this._queryErrorHandler=_4.hitch(this,this._queryErrorHandler);},initialize:function(map){this.map=map;this._initialize();this._init=true;},propertyChangeHandler:function(type){if(this._init){if(type<2){this._zoomHandler();}}},destroy:function(){this._disableConnectors();this._init=false;},drawFeature:function(_29d){var _29e=this._gridLayer,geom=_29d.geometry,_29f=[];if(!geom){return;}_29f=_29e.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _2a0=this._cellMap,i,cell,oid=_29d.attributes[this.featureLayer.objectIdField],_2a1,row,col;for(i=0;i<_29f.length;i++){cell=_29f[i];_2a1=cell.latticeID;row=cell.row;col=cell.col;if(_2a1){cell=(_2a0[_2a1]=(_2a0[_2a1]||cell));}else{_2a0[row]=_2a0[row]||{};cell=(_2a0[row][col]=(_2a0[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_29d);this._addFeatureIIf(oid,_29d);this._incRefCount(oid);}},suspend:function(){if(!this._init){return;}this._disableConnectors();},resume:function(){if(!this._init){return;}this._enableConnectors();this._zoomHandler();},refresh:function(){this._zoomHandler();},_initialize:function(){var map=this.map,_2a2=this.featureLayer;var _2a3=_2a2._srInfo;this._gridLayer=new esri.layers._GridLayout(new esri.geometry.Point(_2a3?_2a3.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_2a2._tileWidth,height:_2a2._tileHeight},{width:map.width,height:map.height},_2a3);this._ioQueue=[];if(!_2a2._suspended){this._zoomHandler();this._enableConnectors();}},_enableConnectors:function(){var map=this.map;this._zoomConnect=_4.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_4.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_4.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_4.disconnect(this._zoomConnect);_4.disconnect(this._panConnect);_4.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _2a4=this.featureLayer,map=this.map;if(_2a4._suspended){return;}_2a4._fireUpdateStart();this._clearIIf();var _2a5=_2a4._trackManager;if(_2a5){_2a5.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_2a6,cell){var id="_"+_2a6.name+_2a6.layerId+_2a6._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_2a7){this._exceeds=false;var _2a8=this.featureLayer,map=this.map,_2a9=_2a7||map.extent,_2aa=this._gridLayer.getCellsInExtent(_2a9,_2a8.latticeTiling),_2ab=_2aa.cells;if(!_2a8._editable){var _2ac=this._cellMap;_2ab=_4.filter(_2ab,function(cell){if(cell.lattice){if(_2ac[cell.latticeID]){return false;}}else{if(_2ac[cell.row]&&_2ac[cell.row][cell.col]){return false;}}return true;});}var _2ad=_2a8._getOutFields(),_2ae=_2a8.getDefinitionExpression(),time=_2a8._getOffsettedTE(_2a8._mapTimeExtent),_2af=_2a8._usePatch,_2b0=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_2b1,_2b2;this._pending=this._pending||0;for(i=0;i<_2ab.length;i++){cell=_2ab[i];_2b1=new esri.tasks.Query();_2b1.geometry=cell.extent||cell.lattice;_2b1.outFields=_2ad;_2b1.where=_2ae;if(_2a8.latticeTiling&&cell.extent){_2b1.spatialRelationship=esri.tasks.Query.SPATIAL_REL_CONTAINS;}_2b1.returnGeometry=true;_2b1.timeExtent=time;_2b1.maxAllowableOffset=_2a8._maxOffset;if(_2a8._ts){_2b1._ts=(new Date()).getTime();}_2b2=null;if(_2af){_2b2=this._getRequestId(_2a8,cell);if(this._isPending(_2b2)){continue;}}this._pending++;_2b0.push(_2a8._task.execute(_2b1,function(){var _2b3=cell;return function(_2b4){func.apply(self,[_2b4,_2b3]);};}.call(this),this._queryErrorHandler,_2b2));}this._removeOldCells(_2a9);this._endCheck();},_drawFeatures:function(_2b5,cell){this._exceeds=this._exceeds||_2b5.exceededTransferLimit;this._finalizeIO();var _2b6=this.featureLayer,map=this.map,_2b7=map.extent,_2b8=cell.extent,row=cell.row,col=cell.col,_2b9=_2b6.objectIdField,_2ba=_2b5.features,_2bb=this._gridLayer,_2bc=this._cellMap,i,len,_2bd=cell.latticeID,_2be=_2bd?_2bc[_2bd]:(_2bc[row]&&_2bc[row][col]);if((cell.resolution!=_2bb._resolution)||(_2bd?(_2bd!==_2bb.getLatticeID(_2b7)):(!_2bb.intersects(_2b8,_2b7)))){if(_2be){this._removeCell(row,col,_2bd);}}else{if(_2be){this._updateCell(_2be,_2ba);}else{cell.features=_2ba;if(_2bd){_2bc[_2bd]=cell;}else{_2bc[row]=_2bc[row]||{};_2bc[row][col]=cell;}len=_2ba.length;for(i=0;i<len;i++){var _2bf=_2ba[i];var oid=_2bf.attributes[_2b9];this._addFeatureIIf(oid,_2bf);this._incRefCount(oid);}}}this._endCheck();},_queryErrorHandler:function(err){this._finalizeIO();this.featureLayer._errorHandler(err);this._endCheck(true);},_finalizeIO:function(){this._purgeRequests();this._pending--;},_endCheck:function(_2c0){if(this._pending===0){this._processIOQueue();var _2c1=this.featureLayer,_2c2=_2c1._trackManager;if(_2c2){_2c2.clearTracks();_2c2.addFeatures(_2c1.graphics);if(_2c1._ager){_4.forEach(_2c1.graphics,function(_2c3){if(_2c3._shape){_2c1._repaint(_2c3);}});}_2c2.moveLatestToFront();_2c2.drawTracks();}this.featureLayer._fireUpdateEnd(_2c0&&new Error("FeatureLayer: "+esri.bundle.layers.FeatureLayer.updateError),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_2c1.onQueryLimitExceeded();}}},_processIOQueue:function(_2c4){this._ioQueue=_4.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_2c4){_4.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_2c5){var _2c6=this._cellMap,_2c7=this._gridLayer,_2c8,_2c9;for(_2c8 in _2c6){if(_2c6[_2c8]){var row=_2c6[_2c8],_2ca=row.latticeID,_2cb=0,_2cc=0;if(_2ca){_2cb++;if(_2ca!==_2c7.getLatticeID(_2c5)){this._removeCell(null,null,_2ca);_2cc++;}}else{for(_2c9 in row){if(row[_2c9]){_2cb++;var _2cd=row[_2c9].extent;if(!_2c7.intersects(_2cd,_2c5)){this._removeCell(_2c8,_2c9);_2cc++;}}}}if(_2cc===_2cb){delete _2c6[_2c8];}}}},_updateCell:function(cell,_2ce){var _2cf=this.featureLayer,_2d0=_2cf.objectIdField,_2d1=_2cf._selectedFeatures,i,len=_2ce.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _2d2=_2ce[i];var oid=_2d2.attributes[_2d0];var _2d3=this._addFeatureIIf(oid,_2d2);if(_2d3===_2d2){this._incRefCount(oid);cell.features.push(_2d3);}else{if(!(oid in _2d1)){_2d3.setGeometry(_2d2.geometry);_2d3.setAttributes(_2d2.attributes);}}}},_removeCell:function(row,col,_2d4){var _2d5=this._cellMap,_2d6=this.featureLayer,_2d7=_2d6.objectIdField;var cell=_2d4?_2d5[_2d4]:(_2d5[row]&&_2d5[row][col]);if(cell){if(_2d4){delete _2d5[_2d4];}else{delete _2d5[row][col];}var _2d8=cell.features,i;for(i=0;i<_2d8.length;i++){var _2d9=_2d8[i];var oid=_2d9.attributes[_2d7];this._decRefCount(oid);if(oid in _2d6._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});_4.declare("esri.layers._GridLayout",null,{constructor:function(_2da,_2db,_2dc,_2dd){this.origin=_2da;this.cellWidth=_2db.width;this.cellHeight=_2db.height;this.mapWidth=_2dc.width;this.mapHeight=_2dc.height;this.srInfo=_2dd;},setResolution:function(_2de){this._resolution=(_2de.xmax-_2de.xmin)/this.mapWidth;if(this.srInfo){var _2df=Math.round((2*this.srInfo.valid[1])/this._resolution),_2e0=Math.round(_2df/this.cellWidth);this._frameStats=[_2e0,0,_2e0-1];}},getCellCoordinates:function(_2e1){var res=this._resolution,_2e2=this.origin;return {row:Math.floor((_2e2.y-_2e1.y)/(this.cellHeight*res)),col:Math.floor((_2e1.x-_2e2.x)/(this.cellWidth*res))};},normalize:function(col){var _2e3=this._frameStats;if(_2e3){var _2e4=_2e3[0],m180=_2e3[1],p180=_2e3[2];if(col<m180){col=col%_2e4;col=col<m180?col+_2e4:col;}else{if(col>p180){col=col%_2e4;}}}return col;},intersects:function(_2e5,_2e6){var _2e7=this.srInfo;if(_2e7){return _4.some(_2e6._getParts(_2e7),function(_2e8){return _2e5.intersects(_2e8.extent);});}else{return _2e5.intersects(_2e6);}},getCellExtent:function(row,col){var res=this._resolution,_2e9=this.origin,_2ea=this.cellWidth,_2eb=this.cellHeight;return new esri.geometry.Extent((col*_2ea*res)+_2e9.x,_2e9.y-((row+1)*_2eb*res),((col+1)*_2ea*res)+_2e9.x,_2e9.y-(row*_2eb*res),new esri.SpatialReference(_2e9.spatialReference.toJson()));},getLatticeID:function(_2ec){var _2ed=this.getCellCoordinates({x:_2ec.xmin,y:_2ec.ymax}),_2ee=this.getCellCoordinates({x:_2ec.xmax,y:_2ec.ymin}),_2ef=_2ed.row,_2f0=_2ee.row,_2f1=this.normalize(_2ed.col),_2f2=this.normalize(_2ee.col);return _2ef+"_"+_2f0+"_"+_2f1+"_"+_2f2;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_2f3,_2f4){var _2f5=this.getCellCoordinates({x:_2f3.xmin,y:_2f3.ymax}),_2f6=this.getCellCoordinates({x:_2f3.xmax,y:_2f3.ymin}),_2f7=_2f5.row,_2f8=_2f6.row,_2f9=_2f5.col,_2fa=_2f6.col,_2fb=[],i,j,nj,_2fc=[],_2fd=[],len,xmin,xmax,ymin,ymax,_2fe=[],_2ff,_300;for(i=_2f7;i<=_2f8;i++){for(j=_2f9;j<=_2fa;j++){nj=this.normalize(j);_2f3=this.getCellExtent(i,nj);_2fb.push({row:i,col:nj,extent:_2f3,resolution:this._resolution});if(_2f4){_2fc.push(_2f3.xmin,_2f3.xmax);_2fd.push(_2f3.ymin,_2f3.ymax);}}}_2f9=this.normalize(_2f9);_2fa=this.normalize(_2fa);_2fc.sort(this.sorter);_2fd.sort(this.sorter);len=_2fc.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_2fc[i]===_2fc[i+1]){_2fc.splice(i,1);}}}len=_2fd.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_2fd[i]===_2fd[i+1]){_2fd.splice(i,1);}}}if(_2fc.length&&_2fd.length){xmin=_2fc[0];xmax=_2fc[_2fc.length-1];ymin=_2fd[0];ymax=_2fd[_2fd.length-1];len=_2fc.length;for(i=0;i<len;i++){_2fe.push([[_2fc[i],ymax],[_2fc[i],ymin]]);}len=_2fd.length;for(i=0;i<len;i++){_2fe.push([[xmin,_2fd[i]],[xmax,_2fd[i]]]);}_2ff=new esri.geometry.Polyline({paths:_2fe,spatialReference:this.origin.spatialReference.toJson()});_300=_2f7+"_"+_2f8+"_"+_2f9+"_"+_2fa;_2fb.push({latticeID:_300,lattice:_2ff,resolution:this._resolution});}return {minRow:_2f7,maxRow:_2f8,minCol:_2f9,maxCol:_2fa,cells:_2fb};}});_4.declare("esri.layers._TrackManager",null,{constructor:function(_301){this.layer=_301;this.trackMap={};},initialize:function(map){this.map=map;var _302=this.layer,_303=_302.renderer.trackRenderer;if(_303&&(_302.geometryType==="esriGeometryPoint")){var _304=(this.container=new esri.layers._GraphicsLayer({id:_302.id+"_tracks",_child:true}));_304._setMap(map,_302._div);_304.setRenderer(_303);}},addFeatures:function(_305){var tkid,_306=this.trackMap,_307=this.layer,_308=_307._trackIdField;_4.forEach(_305,function(_309){var _30a=_309.attributes;tkid=_30a[_308];var ary=(_306[tkid]=(_306[tkid]||[]));ary.push(_309);});var _30b=_307._startTimeField,_30c=_307.objectIdField;var _30d=function(a,b){var _30e=a.attributes[_30b],_30f=b.attributes[_30b];if(_30e===_30f){return (a.attributes[_30c]<b.attributes[_30c])?-1:1;}else{return (_30e<_30f)?-1:1;}};for(tkid in _306){_306[tkid].sort(_30d);}},drawTracks:function(){var _310=this.container;if(!_310){return;}var _311=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_312;for(tkid in _311){ary=_311[tkid];path=[];for(i=ary.length-1;i>=0;i--){_312=ary[i].geometry;if(_312){path.push([_312.x,_312.y]);}}if(path.length>0){_310.add(new esri.Graphic(new esri.geometry.Polyline({paths:[path],spatialReference:sr})));}}},moveLatestToFront:function(){_4.forEach(this.getLatestObservations(),function(_313){var _314=_313._shape;_314&&_314._moveToFront();this._repaint(_313,null,true);},this.layer);},getLatestObservations:function(){var _315=[];if(!this.layer.renderer.latestObservationRenderer){return _315;}var _316=this.trackMap,tkid;for(tkid in _316){var ary=_316[tkid];_315.push(ary[ary.length-1]);}return _315;},clearTracks:function(){var _317=this.getLatestObservations();this.trackMap={};var _318=this.container;if(_318){_318.clear();}_4.forEach(_317,function(_319){this._repaint(_319,null,true);},this.layer);},isLatestObservation:function(_31a){var _31b=this.layer._trackIdField;var _31c=this.trackMap[_31a.attributes[_31b]];if(_31c){return (_31c[_31c.length-1]===_31a);}return false;},destroy:function(){var _31d=this.container;if(_31d){_31d.clear();_31d._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});}if(!_4._hasResource["dojo.Stateful"]){_4._hasResource["dojo.Stateful"]=true;_4.provide("dojo.Stateful");_4.declare("dojo.Stateful",null,{postscript:function(_31e){if(_31e){_4.mixin(this,_31e);}},get:function(name){return this[name];},set:function(name,_31f){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _320=this[name];this[name]=_31f;if(this._watchCallbacks){this._watchCallbacks(name,_320,_31f);}return this;},watch:function(name,_321){var _322=this._watchCallbacks;if(!_322){var self=this;_322=this._watchCallbacks=function(name,_323,_324,_325){var _326=function(_327){if(_327){_327=_327.slice();for(var i=0,l=_327.length;i<l;i++){try{_327[i].call(self,name,_323,_324);}catch(e){console.error(e);}}}};_326(_322["_"+name]);if(!_325){_326(_322["*"]);}};}if(!_321&&typeof name==="function"){_321=name;name="*";}else{name="_"+name;}var _328=_322[name];if(typeof _328!=="object"){_328=_322[name]=[];}_328.push(_321);return {unwatch:function(){_328.splice(_4.indexOf(_328,_321),1);}};}});}if(!_4._hasResource["dijit._WidgetBase"]){_4._hasResource["dijit._WidgetBase"]=true;_4.provide("dijit._WidgetBase");(function(){_4.declare("dijit._WidgetBase",_4.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_329,_32a){this.create(_329,_32a);},create:function(_32b,_32c){this.srcNodeRef=_4.byId(_32c);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_32b){this.params=_32b;_4._mixin(this,_32b);}this.postMixInProperties();if(!this.id){this.id=_5.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_5.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _32d=this.srcNodeRef;if(_32d&&_32d.parentNode&&this.domNode!==_32d){_32d.parentNode.replaceChild(this.domNode,_32d);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _32e=function(attr,_32f){if((_32f.params&&attr in _32f.params)||_32f[attr]){_32f.set(attr,_32f[attr]);}};for(var attr in this.attributeMap){_32e(attr,this);}_4.forEach(this._getSetterAttributes(),function(a){if(!(a in this.attributeMap)){_32e(a,this);}},this);},_getSetterAttributes:function(){var ctor=this.constructor;if(!ctor._setterAttrs){var r=(ctor._setterAttrs=[]),_330,_331=ctor.prototype;for(var _332 in _331){if(_4.isFunction(_331[_332])&&(_330=_332.match(/^_set([a-zA-Z]*)Attr$/))&&_330[1]){r.push(_330[1].charAt(0).toLowerCase()+_330[1].substr(1));}}}return ctor._setterAttrs;},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_4.create("div");}if(this.baseClass){var _333=this.baseClass.split(" ");if(!this.isLeftToRight()){_333=_333.concat(_4.map(_333,function(name){return name+"Rtl";}));}_4.addClass(this.domNode,_333);}},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_334){this._beingDestroyed=true;this.destroyDescendants(_334);this.destroy(_334);},destroy:function(_335){this._beingDestroyed=true;this.uninitialize();var d=_4,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_336){dfe(_336,d.disconnect);});dfe(this._subscribes,function(_337){dun(_337);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_335);_5.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_338){if(this.bgIframe){this.bgIframe.destroy(_338);delete this.bgIframe;}if(this.domNode){if(_338){_4.removeAttr(this.domNode,"widgetId");}else{_4.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_338){_4.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_339){_4.forEach(this.getChildren(),function(_33a){if(_33a.destroyRecursive){_33a.destroyRecursive(_339);}});},uninitialize:function(){return false;},_setClassAttr:function(_33b){var _33c=this[this.attributeMap["class"]||"domNode"];_4.replaceClass(_33c,_33b,this["class"]);this._set("class",_33b);},_setStyleAttr:function(_33d){var _33e=this[this.attributeMap.style||"domNode"];if(_4.isObject(_33d)){_4.style(_33e,_33d);}else{if(_33e.style.cssText){_33e.style.cssText+="; "+_33d;}else{_33e.style.cssText=_33d;}}this._set("style",_33d);},_attrToDom:function(attr,_33f){var _340=this.attributeMap[attr];_4.forEach(_4.isArray(_340)?_340:[_340],function(_341){var _342=this[_341.node||_341||"domNode"];var type=_341.type||"attribute";switch(type){case "attribute":if(_4.isFunction(_33f)){_33f=_4.hitch(this,_33f);}var _343=_341.attribute?_341.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);_4.attr(_342,_343,_33f);break;case "innerText":_342.innerHTML="";_342.appendChild(_4.doc.createTextNode(_33f));break;case "innerHTML":_342.innerHTML=_33f;break;case "class":_4.replaceClass(_342,_33f,this[attr]);break;}},this);},get:function(name){var _344=this._getAttrNames(name);return this[_344.g]?this[_344.g]():this[name];},set:function(name,_345){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _346=this._getAttrNames(name);if(this[_346.s]){var _347=this[_346.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_345);}this._set(name,_345);}return _347||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_348){var _349=this[name];this[name]=_348;if(this._watchCallbacks&&this._created&&_348!==_349){this._watchCallbacks(name,_349,_348);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?_4.query("[widgetId]",this.containerNode).map(_5.byNode):[];},getChildren:function(){return this.containerNode?_5.findWidgets(this.containerNode):[];},connect:function(obj,_34a,_34b){var _34c=[_4._connect(obj,_34a,this,_34b)];this._connects.push(_34c);return _34c;},disconnect:function(_34d){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_34d){_4.forEach(_34d,_4.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_34e,_34f){var _350=_4.subscribe(_34e,this,_34f);this._subscribes.push(_350);return _350;},unsubscribe:function(_351){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_351){_4.unsubscribe(_351);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_4._isBodyLtr();},placeAt:function(_352,_353){if(_352.declaredClass&&_352.addChild){_352.addChild(this,_353);}else{_4.place(this.domNode,_352,_353);}return this;}});})();}if(!_4._hasResource["dojo.window"]){_4._hasResource["dojo.window"]=true;_4.provide("dojo.window");_4.getObject("window",true,_4);_4.window.getBox=function(){var _354=(_4.doc.compatMode=="BackCompat")?_4.body():_4.doc.documentElement;var _355=_4._docScroll();return {w:_354.clientWidth,h:_354.clientHeight,l:_355.x,t:_355.y};};_4.window.get=function(doc){if(_4.isIE&&window!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};_4.window.scrollIntoView=function(node,pos){try{node=_4.byId(node);var doc=node.ownerDocument||_4.doc,body=doc.body||_4.body(),html=doc.documentElement||body.parentNode,isIE=_4.isIE,isWK=_4.isWebKit;if((!(_4.isMoz||isIE||isWK||_4.isOpera)||node==body||node==html)&&(typeof node.scrollIntoView!="undefined")){node.scrollIntoView(false);return;}var _356=doc.compatMode=="BackCompat",_357=(isIE>=9&&node.ownerDocument.parentWindow.frameElement)?((html.clientHeight>0&&html.clientWidth>0&&(body.clientHeight==0||body.clientWidth==0||body.clientHeight>html.clientHeight||body.clientWidth>html.clientWidth))?html:body):(_356?body:html),_358=isWK?body:_357,_359=_357.clientWidth,_35a=_357.clientHeight,rtl=!_4._isBodyLtr(),_35b=pos||_4.position(node),el=node.parentNode,_35c=function(el){return ((isIE<=6||(isIE&&_356))?false:(_4.style(el,"position").toLowerCase()=="fixed"));};if(_35c(node)){return;}while(el){if(el==body){el=_358;}var _35d=_4.position(el),_35e=_35c(el);if(el==_358){_35d.w=_359;_35d.h=_35a;if(_358==html&&isIE&&rtl){_35d.x+=_358.offsetWidth-_35d.w;}if(_35d.x<0||!isIE){_35d.x=0;}if(_35d.y<0||!isIE){_35d.y=0;}}else{var pb=_4._getPadBorderExtents(el);_35d.w-=pb.w;_35d.h-=pb.h;_35d.x+=pb.l;_35d.y+=pb.t;var _35f=el.clientWidth,_360=_35d.w-_35f;if(_35f>0&&_360>0){_35d.w=_35f;_35d.x+=(rtl&&(isIE||el.clientLeft>pb.l))?_360:0;}_35f=el.clientHeight;_360=_35d.h-_35f;if(_35f>0&&_360>0){_35d.h=_35f;}}if(_35e){if(_35d.y<0){_35d.h+=_35d.y;_35d.y=0;}if(_35d.x<0){_35d.w+=_35d.x;_35d.x=0;}if(_35d.y+_35d.h>_35a){_35d.h=_35a-_35d.y;}if(_35d.x+_35d.w>_359){_35d.w=_359-_35d.x;}}var l=_35b.x-_35d.x,t=_35b.y-Math.max(_35d.y,0),r=l+_35b.w-_35d.w,bot=t+_35b.h-_35d.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_356)||isIE>=9)){s=-s;}_35b.x+=el.scrollLeft;el.scrollLeft+=s;_35b.x-=el.scrollLeft;}if(bot*t>0){_35b.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_35b.y-=el.scrollTop;}el=(el!=_358)&&!_35e&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};}if(!_4._hasResource["dijit._base.focus"]){_4._hasResource["dijit._base.focus"]=true;_4.provide("dijit._base.focus");_4.mixin(_5,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return _5.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=_4.doc.selection,cf=_5._curFocus;if(_4.global.getSelection){sel=_4.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};if(sel.rangeCount){bm.mark=sel.getRangeAt(0).cloneRange();}}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_361){var _362=_4.doc,mark=_361.mark;if(mark){if(_4.global.getSelection){var sel=_4.global.getSelection();if(sel&&sel.removeAllRanges){if(mark.pRange){var r=mark;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(mark);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_362.selection&&mark){var rg;if(mark.pRange){rg=mark.range;}else{if(_4.isArray(mark)){rg=_362.body.createControlRange();_4.forEach(mark,function(n){rg.addElement(n);});}else{rg=_362.body.createTextRange();rg.moveToBookmark(mark);}}rg.select();}}}},getFocus:function(menu,_363){var node=!_5._curFocus||(menu&&_4.isDescendant(_5._curFocus,menu.domNode))?_5._prevFocus:_5._curFocus;return {node:node,bookmark:(node==_5._curFocus)&&_4.withGlobal(_363||_4.global,_5.getBookmark),openedForWindow:_363};},focus:function(_364){if(!_364){return;}var node="node" in _364?_364.node:_364,_365=_364.bookmark,_366=_364.openedForWindow,_367=_365?_365.isCollapsed:false;if(node){var _368=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_368&&_368.focus){try{_368.focus();}catch(e){}}_5._onFocusNode(node);}if(_365&&_4.withGlobal(_366||_4.global,_5.isCollapsed)&&!_367){if(_366){_366.focus();}try{_4.withGlobal(_366||_4.global,_5.moveToBookmark,null,[_365]);}catch(e2){}}},_activeStack:[],registerIframe:function(_369){return _5.registerWin(_369.contentWindow,_369);},unregisterIframe:function(_36a){_5.unregisterWin(_36a);},registerWin:function(_36b,_36c){var _36d=function(evt){_5._justMouseDowned=true;setTimeout(function(){_5._justMouseDowned=false;},0);if(_4.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_5._onTouchNode(_36c||evt.target||evt.srcElement,"mouse");};var doc=_4.isIE?_36b.document.documentElement:_36b.document;if(doc){if(_4.isIE){_36b.document.body.attachEvent("onmousedown",_36d);var _36e=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&_5.isTabNavigable(evt.srcElement)){_5._onFocusNode(_36c||evt.srcElement);}else{_5._onTouchNode(_36c||evt.srcElement);}};doc.attachEvent("onactivate",_36e);var _36f=function(evt){_5._onBlurNode(_36c||evt.srcElement);};doc.attachEvent("ondeactivate",_36f);return function(){_36b.document.detachEvent("onmousedown",_36d);doc.detachEvent("onactivate",_36e);doc.detachEvent("ondeactivate",_36f);doc=null;};}else{doc.body.addEventListener("mousedown",_36d,true);var _370=function(evt){_5._onFocusNode(_36c||evt.target);};doc.addEventListener("focus",_370,true);var _371=function(evt){_5._onBlurNode(_36c||evt.target);};doc.addEventListener("blur",_371,true);return function(){doc.body.removeEventListener("mousedown",_36d,true);doc.removeEventListener("focus",_370,true);doc.removeEventListener("blur",_371,true);doc=null;};}}},unregisterWin:function(_372){_372&&_372();},_onBlurNode:function(node){_5._prevFocus=_5._curFocus;_5._curFocus=null;if(_5._justMouseDowned){return;}if(_5._clearActiveWidgetsTimer){clearTimeout(_5._clearActiveWidgetsTimer);}_5._clearActiveWidgetsTimer=setTimeout(function(){delete _5._clearActiveWidgetsTimer;_5._setStack([]);_5._prevFocus=null;},100);},_onTouchNode:function(node,by){if(_5._clearActiveWidgetsTimer){clearTimeout(_5._clearActiveWidgetsTimer);delete _5._clearActiveWidgetsTimer;}var _373=[];try{while(node){var _374=_4.attr(node,"dijitPopupParent");if(_374){node=_5.byId(_374).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===_4.body()){break;}node=_4.window.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_375=id&&_5.byId(id);if(_375&&!(by=="mouse"&&_375.get("disabled"))){_373.unshift(id);}node=node.parentNode;}}}}catch(e){}_5._setStack(_373,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}_5._onTouchNode(node);if(node==_5._curFocus){return;}if(_5._curFocus){_5._prevFocus=_5._curFocus;}_5._curFocus=node;_4.publish("focusNode",[node]);},_setStack:function(_376,by){var _377=_5._activeStack;_5._activeStack=_376;for(var _378=0;_378<Math.min(_377.length,_376.length);_378++){if(_377[_378]!=_376[_378]){break;}}var _379;for(var i=_377.length-1;i>=_378;i--){_379=_5.byId(_377[i]);if(_379){_379._focused=false;_379.set("focused",false);_379._hasBeenBlurred=true;if(_379._onBlur){_379._onBlur(by);}_4.publish("widgetBlur",[_379,by]);}}for(i=_378;i<_376.length;i++){_379=_5.byId(_376[i]);if(_379){_379._focused=true;_379.set("focused",true);if(_379._onFocus){_379._onFocus(by);}_4.publish("widgetFocus",[_379,by]);}}}});_4.addOnLoad(function(){var _37a=_5.registerWin(window);if(_4.isIE){_4.addOnWindowUnload(function(){_5.unregisterWin(_37a);_37a=null;});}});}if(!_4._hasResource["dojo.AdapterRegistry"]){_4._hasResource["dojo.AdapterRegistry"]=true;_4.provide("dojo.AdapterRegistry");_4.AdapterRegistry=function(_37b){this.pairs=[];this.returnWrappers=_37b||false;};_4.extend(_4.AdapterRegistry,{register:function(name,_37c,wrap,_37d,_37e){this.pairs[((_37e)?"unshift":"push")]([name,_37c,wrap,_37d]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}return false;}});}if(!_4._hasResource["dijit._base.place"]){_4._hasResource["dijit._base.place"]=true;_4.provide("dijit._base.place");_5.getViewport=function(){return _4.window.getBox();};_5.placeOnScreen=function(node,pos,_37f,_380){var _381=_4.map(_37f,function(_382){var c={corner:_382,pos:{x:pos.x,y:pos.y}};if(_380){c.pos.x+=_382.charAt(1)=="L"?_380.x:-_380.x;c.pos.y+=_382.charAt(0)=="T"?_380.y:-_380.y;}return c;});return _5._place(node,_381);};_5._place=function(node,_383,_384,_385){var view=_4.window.getBox();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){_4.body().appendChild(node);}var best=null;_4.some(_383,function(_386){var _387=_386.corner;var pos=_386.pos;var _388=0;var _389={w:_387.charAt(1)=="L"?(view.l+view.w)-pos.x:pos.x-view.l,h:_387.charAt(1)=="T"?(view.t+view.h)-pos.y:pos.y-view.t};if(_384){var res=_384(node,_386.aroundCorner,_387,_389,_385);_388=typeof res=="undefined"?0:res;}var _38a=node.style;var _38b=_38a.display;var _38c=_38a.visibility;_38a.visibility="hidden";_38a.display="";var mb=_4.marginBox(node);_38a.display=_38b;_38a.visibility=_38c;var _38d=Math.max(view.l,_387.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_38e=Math.max(view.t,_387.charAt(0)=="T"?pos.y:(pos.y-mb.h)),endX=Math.min(view.l+view.w,_387.charAt(1)=="L"?(_38d+mb.w):pos.x),endY=Math.min(view.t+view.h,_387.charAt(0)=="T"?(_38e+mb.h):pos.y),_38f=endX-_38d,_390=endY-_38e;_388+=(mb.w-_38f)+(mb.h-_390);if(best==null||_388<best.overflow){best={corner:_387,aroundCorner:_386.aroundCorner,x:_38d,y:_38e,w:_38f,h:_390,overflow:_388,spaceAvailable:_389};}return !_388;});if(best.overflow&&_384){_384(node,best.aroundCorner,best.corner,best.spaceAvailable,_385);}var l=_4._isBodyLtr(),s=node.style;s.top=best.y+"px";s[l?"left":"right"]=(l?best.x:view.w-best.x-best.w)+"px";return best;};_5.placeOnScreenAroundNode=function(node,_391,_392,_393){_391=_4.byId(_391);var _394=_4.position(_391,true);return _5._placeOnScreenAroundRect(node,_394.x,_394.y,_394.w,_394.h,_392,_393);};_5.placeOnScreenAroundRectangle=function(node,_395,_396,_397){return _5._placeOnScreenAroundRect(node,_395.x,_395.y,_395.width,_395.height,_396,_397);};_5._placeOnScreenAroundRect=function(node,x,y,_398,_399,_39a,_39b){var _39c=[];for(var _39d in _39a){_39c.push({aroundCorner:_39d,corner:_39a[_39d],pos:{x:x+(_39d.charAt(1)=="L"?0:_398),y:y+(_39d.charAt(0)=="T"?0:_399)}});}return _5._place(node,_39c,_39b,{w:_398,h:_399});};_5.placementRegistry=new _4.AdapterRegistry();_5.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},_5.placeOnScreenAroundNode);_5.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},_5.placeOnScreenAroundRectangle);_5.placeOnScreenAroundElement=function(node,_39e,_39f,_3a0){return _5.placementRegistry.match.apply(_5.placementRegistry,arguments);};_5.getPopupAroundAlignment=function(_3a1,_3a2){var _3a3={};_4.forEach(_3a1,function(pos){switch(pos){case "after":_3a3[_3a2?"BR":"BL"]=_3a2?"BL":"BR";break;case "before":_3a3[_3a2?"BL":"BR"]=_3a2?"BR":"BL";break;case "below-alt":_3a2=!_3a2;case "below":_3a3[_3a2?"BL":"BR"]=_3a2?"TL":"TR";_3a3[_3a2?"BR":"BL"]=_3a2?"TR":"TL";break;case "above-alt":_3a2=!_3a2;case "above":default:_3a3[_3a2?"TL":"TR"]=_3a2?"BL":"BR";_3a3[_3a2?"TR":"TL"]=_3a2?"BR":"BL";break;}});return _3a3;};}if(!_4._hasResource["dijit._base.window"]){_4._hasResource["dijit._base.window"]=true;_4.provide("dijit._base.window");_5.getDocumentWindow=function(doc){return _4.window.get(doc);};}if(!_4._hasResource["dijit._base.popup"]){_4._hasResource["dijit._base.popup"]=true;_4.provide("dijit._base.popup");_5.popup={_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_3a4){var _3a5=_3a4.declaredClass?_3a4._popupWrapper:(_3a4.parentNode&&_4.hasClass(_3a4.parentNode,"dijitPopup")),node=_3a4.domNode||_3a4;if(!_3a5){_3a5=_4.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},_4.body());_3a5.appendChild(node);var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";if(_3a4.declaredClass){_3a4._popupWrapper=_3a5;_4.connect(_3a4,"destroy",function(){_4.destroy(_3a5);delete _3a4._popupWrapper;});}}return _3a5;},moveOffScreen:function(_3a6){var _3a7=this._createWrapper(_3a6);_4.style(_3a7,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_3a8){var _3a9=this._createWrapper(_3a8);_4.style(_3a9,"display","none");},getTopPopup:function(){var _3aa=this._stack;for(var pi=_3aa.length-1;pi>0&&_3aa[pi].parent===_3aa[pi-1].widget;pi--){}return _3aa[pi];},open:function(args){var _3ab=this._stack,_3ac=args.popup,_3ad=args.orient||((args.parent?args.parent.isLeftToRight():_4._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_3ae=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_3ab.length&&(!args.parent||!_4.isDescendant(args.parent.domNode,_3ab[_3ab.length-1].widget.domNode))){_5.popup.close(_3ab[_3ab.length-1].widget);}var _3af=this._createWrapper(_3ac);_4.attr(_3af,{id:id,style:{zIndex:this._beginZIndex+_3ab.length},"class":"dijitPopup "+(_3ac.baseClass||_3ac["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(_4.isIE||_4.isMoz){if(!_3ac.bgIframe){_3ac.bgIframe=new _5.BackgroundIframe(_3af);}}var best=_3ae?_5.placeOnScreenAroundElement(_3af,_3ae,_3ad,_3ac.orient?_4.hitch(_3ac,"orient"):null):_5.placeOnScreen(_3af,args,_3ad=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_3af.style.display="";_3af.style.visibility="visible";_3ac.domNode.style.visibility="visible";var _3b0=[];_3b0.push(_4.connect(_3af,"onkeypress",this,function(evt){if(evt.charOrCode==_4.keys.ESCAPE&&args.onCancel){_4.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===_4.keys.TAB){_4.stopEvent(evt);var _3b1=this.getTopPopup();if(_3b1&&_3b1.onCancel){_3b1.onCancel();}}}}));if(_3ac.onCancel){_3b0.push(_4.connect(_3ac,"onCancel",args.onCancel));}_3b0.push(_4.connect(_3ac,_3ac.onExecute?"onExecute":"onChange",this,function(){var _3b2=this.getTopPopup();if(_3b2&&_3b2.onExecute){_3b2.onExecute();}}));_3ab.push({widget:_3ac,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_3b0});if(_3ac.onOpen){_3ac.onOpen(best);}return best;},close:function(_3b3){var _3b4=this._stack;while((_3b3&&_4.some(_3b4,function(elem){return elem.widget==_3b3;}))||(!_3b3&&_3b4.length)){var top=_3b4.pop(),_3b5=top.widget,_3b6=top.onClose;if(_3b5.onClose){_3b5.onClose();}_4.forEach(top.handlers,_4.disconnect);if(_3b5&&_3b5.domNode){this.hide(_3b5);}if(_3b6){_3b6();}}}};_5._frames=new function(){var _3b7=[];this.pop=function(){var _3b8;if(_3b7.length){_3b8=_3b7.pop();_3b8.style.display="";}else{if(_4.isIE<9){var burl=_4.config["dojoBlankHtmlUrl"]||(_4.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_3b8=_4.doc.createElement(html);}else{_3b8=_4.create("iframe");_3b8.src="javascript:\"\"";_3b8.className="dijitBackgroundIframe";_4.style(_3b8,"opacity",0.1);}_3b8.tabIndex=-1;_5.setWaiRole(_3b8,"presentation");}return _3b8;};this.push=function(_3b9){_3b9.style.display="none";_3b7.push(_3b9);};}();_5.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(_4.isIE||_4.isMoz){var _3ba=(this.iframe=_5._frames.pop());node.appendChild(_3ba);if(_4.isIE<7||_4.isQuirks){this.resize(node);this._conn=_4.connect(node,"onresize",this,function(){this.resize(node);});}else{_4.style(_3ba,{width:"100%",height:"100%"});}}};_4.extend(_5.BackgroundIframe,{resize:function(node){if(this.iframe){_4.style(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){_4.disconnect(this._conn);this._conn=null;}if(this.iframe){_5._frames.push(this.iframe);delete this.iframe;}}});}if(!_4._hasResource["dijit._base.scroll"]){_4._hasResource["dijit._base.scroll"]=true;_4.provide("dijit._base.scroll");_5.scrollIntoView=function(node,pos){_4.window.scrollIntoView(node,pos);};}if(!_4._hasResource["dojo.uacss"]){_4._hasResource["dojo.uacss"]=true;_4.provide("dojo.uacss");(function(){var d=_4,html=d.doc.documentElement,ie=d.isIE,_3bb=d.isOpera,maj=Math.floor,ff=d.isFF,_3bc=d.boxModel.replace(/-/,""),_3bd={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_ie9:maj(ie)==9,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_3bb,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_3bd["dj_"+_3bc]=true;var _3be="";for(var clz in _3bd){if(_3bd[clz]){_3be+=clz+" ";}}html.className=d.trim(html.className+" "+_3be);_4._loaders.unshift(function(){if(!_4._isBodyLtr()){var _3bf="dj_rtl dijitRtl "+_3be.replace(/ /g,"-rtl ");html.className=d.trim(html.className+" "+_3bf);}});})();}if(!_4._hasResource["dijit._base.sniff"]){_4._hasResource["dijit._base.sniff"]=true;_4.provide("dijit._base.sniff");}if(!_4._hasResource["dijit._base.typematic"]){_4._hasResource["dijit._base.typematic"]=true;_4.provide("dijit._base.typematic");_5.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);this._timer=setTimeout(_4.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_3c0,node,_3c1,obj,_3c2,_3c3,_3c4){if(obj!=this._obj){this.stop();this._initialDelay=_3c3||500;this._subsequentDelay=_3c2||0.9;this._minDelay=_3c4||10;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=_4.hitch(_3c0,_3c1);this._fireEventAndReload();this._evt=_4.mixin({faux:true},evt);}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(node,_3c5,_3c6,_3c7,_3c8,_3c9,_3ca){if(_3c5.keyCode){_3c5.charOrCode=_3c5.keyCode;_4.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_3c5.charCode){_3c5.charOrCode=String.fromCharCode(_3c5.charCode);_4.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [_4.connect(node,"onkeypress",this,function(evt){if(evt.charOrCode==_3c5.charOrCode&&(_3c5.ctrlKey===undefined||_3c5.ctrlKey==evt.ctrlKey)&&(_3c5.altKey===undefined||_3c5.altKey==evt.altKey)&&(_3c5.metaKey===undefined||_3c5.metaKey==(evt.metaKey||false))&&(_3c5.shiftKey===undefined||_3c5.shiftKey==evt.shiftKey)){_4.stopEvent(evt);_5.typematic.trigger(evt,_3c6,node,_3c7,_3c5,_3c8,_3c9,_3ca);}else{if(_5.typematic._obj==_3c5){_5.typematic.stop();}}}),_4.connect(node,"onkeyup",this,function(evt){if(_5.typematic._obj==_3c5){_5.typematic.stop();}})];},addMouseListener:function(node,_3cb,_3cc,_3cd,_3ce,_3cf){var dc=_4.connect;return [dc(node,"mousedown",this,function(evt){_4.stopEvent(evt);_5.typematic.trigger(evt,_3cb,node,_3cc,node,_3cd,_3ce,_3cf);}),dc(node,"mouseup",this,function(evt){_4.stopEvent(evt);_5.typematic.stop();}),dc(node,"mouseout",this,function(evt){_4.stopEvent(evt);_5.typematic.stop();}),dc(node,"mousemove",this,function(evt){evt.preventDefault();}),dc(node,"dblclick",this,function(evt){_4.stopEvent(evt);if(_4.isIE){_5.typematic.trigger(evt,_3cb,node,_3cc,node,_3cd,_3ce,_3cf);setTimeout(_4.hitch(this,_5.typematic.stop),50);}})];},addListener:function(_3d0,_3d1,_3d2,_3d3,_3d4,_3d5,_3d6,_3d7){return this.addKeyListener(_3d1,_3d2,_3d3,_3d4,_3d5,_3d6,_3d7).concat(this.addMouseListener(_3d0,_3d3,_3d4,_3d5,_3d6,_3d7));}};}if(!_4._hasResource["dijit._base.wai"]){_4._hasResource["dijit._base.wai"]=true;_4.provide("dijit._base.wai");_5.wai={onload:function(){var div=_4.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif"))+"\");"}},_4.body());var cs=_4.getComputedStyle(div);if(cs){var _3d8=cs.backgroundImage;var _3d9=(cs.borderTopColor==cs.borderRightColor)||(_3d8!=null&&(_3d8=="none"||_3d8=="url(invalid-url:)"));_4[_3d9?"addClass":"removeClass"](_4.body(),"dijit_a11y");if(_4.isIE){div.outerHTML="";}else{_4.body().removeChild(div);}}}};if(_4.isIE||_4.isMoz){_4._loaders.unshift(_5.wai.onload);}_4.mixin(_5,{hasWaiRole:function(elem,role){var _3da=this.getWaiRole(elem);return role?(_3da.indexOf(role)>-1):(_3da.length>0);},getWaiRole:function(elem){return _4.trim((_4.attr(elem,"role")||"").replace("wairole:",""));},setWaiRole:function(elem,role){_4.attr(elem,"role",role);},removeWaiRole:function(elem,role){var _3db=_4.attr(elem,"role");if(!_3db){return;}if(role){var t=_4.trim((" "+_3db+" ").replace(" "+role+" "," "));_4.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_3dc){return elem.hasAttribute?elem.hasAttribute("aria-"+_3dc):!!elem.getAttribute("aria-"+_3dc);},getWaiState:function(elem,_3dd){return elem.getAttribute("aria-"+_3dd)||"";},setWaiState:function(elem,_3de,_3df){elem.setAttribute("aria-"+_3de,_3df);},removeWaiState:function(elem,_3e0){elem.removeAttribute("aria-"+_3e0);}});}if(!_4._hasResource["dijit._base"]){_4._hasResource["dijit._base"]=true;_4.provide("dijit._base");}if(!_4._hasResource["dijit._Widget"]){_4._hasResource["dijit._Widget"]=true;_4.provide("dijit._Widget");_4.connect(_4,"_connect",function(_3e1,_3e2){if(_3e1&&_4.isFunction(_3e1._onConnect)){_3e1._onConnect(_3e2);}});_5._connectOnUseEventHandler=function(_3e3){};_5._lastKeyDownNode=null;if(_4.isIE){(function(){var _3e4=function(evt){_5._lastKeyDownNode=evt.srcElement;};_4.doc.attachEvent("onkeydown",_3e4);_4.addOnWindowUnload(function(){_4.doc.detachEvent("onkeydown",_3e4);});})();}else{_4.doc.addEventListener("keydown",function(evt){_5._lastKeyDownNode=evt.target;},true);}(function(){_4.declare("dijit._Widget",_5._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:_5._connectOnUseEventHandler,onDblClick:_5._connectOnUseEventHandler,onKeyDown:_5._connectOnUseEventHandler,onKeyPress:_5._connectOnUseEventHandler,onKeyUp:_5._connectOnUseEventHandler,onMouseDown:_5._connectOnUseEventHandler,onMouseMove:_5._connectOnUseEventHandler,onMouseOut:_5._connectOnUseEventHandler,onMouseOver:_5._connectOnUseEventHandler,onMouseLeave:_5._connectOnUseEventHandler,onMouseEnter:_5._connectOnUseEventHandler,onMouseUp:_5._connectOnUseEventHandler,create:function(_3e5,_3e6){this._deferredConnects=_4.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==_5._connectOnUseEventHandler){delete this._deferredConnects[attr];}}this.inherited(arguments);if(this.domNode){for(attr in this.params){this._onConnect(attr);}}},_onConnect:function(_3e7){if(_3e7 in this._deferredConnects){var _3e8=this[this._deferredConnects[_3e7]||"domNode"];this.connect(_3e8,_3e7.toLowerCase(),_3e7);delete this._deferredConnects[_3e7];}},focused:false,isFocusable:function(){return this.focus&&(_4.style(this.domNode,"display")!="none");},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},setAttribute:function(attr,_3e9){_4.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_3e9);},attr:function(name,_3ea){if(_4.config.isDebug){var _3eb=arguments.callee._ach||(arguments.callee._ach={}),_3ec=(arguments.callee.caller||"unknown caller").toString();if(!_3eb[_3ec]){_4.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_3ec,"","2.0");_3eb[_3ec]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},nodesWithKeyClick:["input","button"],connect:function(obj,_3ed,_3ee){var d=_4,dc=d._connect,_3ef=this.inherited(arguments,[obj,_3ed=="ondijitclick"?"onclick":_3ed,_3ee]);if(_3ed=="ondijitclick"){if(d.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_3ee);_3ef.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){_5._lastKeyDownNode=e.target;if(!("openDropDown" in this&&obj==this._buttonNode)){e.preventDefault();}}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target==_5._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){_5._lastKeyDownNode=null;return m(e);}}));}}return _3ef;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});})();}if(!_4._hasResource["dojo.date.stamp"]){_4._hasResource["dojo.date.stamp"]=true;_4.provide("dojo.date.stamp");_4.getObject("date.stamp",true,_4);_4.date.stamp.fromISOString=function(_3f0,_3f1){if(!_4.date.stamp._isoRegExp){_4.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _3f2=_4.date.stamp._isoRegExp.exec(_3f0),_3f3=null;if(_3f2){_3f2.shift();if(_3f2[1]){_3f2[1]--;}if(_3f2[6]){_3f2[6]*=1000;}if(_3f1){_3f1=new Date(_3f1);_4.forEach(_4.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _3f1["get"+prop]();}),function(_3f4,_3f5){_3f2[_3f5]=_3f2[_3f5]||_3f4;});}_3f3=new Date(_3f2[0]||1970,_3f2[1]||0,_3f2[2]||1,_3f2[3]||0,_3f2[4]||0,_3f2[5]||0,_3f2[6]||0);if(_3f2[0]<100){_3f3.setFullYear(_3f2[0]||1970);}var _3f6=0,_3f7=_3f2[7]&&_3f2[7].charAt(0);if(_3f7!="Z"){_3f6=((_3f2[8]||0)*60)+(Number(_3f2[9])||0);if(_3f7!="-"){_3f6*=-1;}}if(_3f7){_3f6-=_3f3.getTimezoneOffset();}if(_3f6){_3f3.setTime(_3f3.getTime()+_3f6*60000);}}return _3f3;};_4.date.stamp.toISOString=function(_3f8,_3f9){var _3fa=function(n){return (n<10)?"0"+n:n;};_3f9=_3f9||{};var _3fb=[],_3fc=_3f9.zulu?"getUTC":"get",date="";if(_3f9.selector!="time"){var year=_3f8[_3fc+"FullYear"]();date=["0000".substr((year+"").length)+year,_3fa(_3f8[_3fc+"Month"]()+1),_3fa(_3f8[_3fc+"Date"]())].join("-");}_3fb.push(date);if(_3f9.selector!="date"){var time=[_3fa(_3f8[_3fc+"Hours"]()),_3fa(_3f8[_3fc+"Minutes"]()),_3fa(_3f8[_3fc+"Seconds"]())].join(":");var _3fd=_3f8[_3fc+"Milliseconds"]();if(_3f9.milliseconds){time+="."+(_3fd<100?"0":"")+_3fa(_3fd);}if(_3f9.zulu){time+="Z";}else{if(_3f9.selector!="time"){var _3fe=_3f8.getTimezoneOffset();var _3ff=Math.abs(_3fe);time+=(_3fe>0?"-":"+")+_3fa(Math.floor(_3ff/60))+":"+_3fa(_3ff%60);}}_3fb.push(time);}return _3fb.join("T");};}if(!_4._hasResource["dojo.parser"]){_4._hasResource["dojo.parser"]=true;_4.provide("dojo.parser");new Date("X");_4.parser=new function(){var d=_4;function _400(_401){if(d.isString(_401)){return "string";}if(typeof _401=="number"){return "number";}if(typeof _401=="boolean"){return "boolean";}if(d.isFunction(_401)){return "function";}if(d.isArray(_401)){return "array";}if(_401 instanceof Date){return "date";}if(_401 instanceof d._Url){return "url";}return "object";};function _402(_403,type){switch(type){case "string":return _403;case "number":return _403.length?Number(_403):NaN;case "boolean":return typeof _403=="boolean"?_403:!(_403.toLowerCase()=="false");case "function":if(d.isFunction(_403)){_403=_403.toString();_403=d.trim(_403.substring(_403.indexOf("{")+1,_403.length-1));}try{if(_403===""||_403.search(/[^\w\.]+/i)!=-1){return new Function(_403);}else{return d.getObject(_403,false)||new Function(_403);}}catch(e){return new Function();}case "array":return _403?_403.split(/\s*,\s*/):[];case "date":switch(_403){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_403);}case "url":return d.baseUrl+_403;default:return d.fromJson(_403);}};var _404={},_405={};d.connect(d,"extend",function(){_405={};});function _406(cls,_407){for(var name in cls){if(name.charAt(0)=="_"){continue;}if(name in _404){continue;}_407[name]=_400(cls[name]);}return _407;};function _408(_409,_40a){var c=_405[_409];if(!c){var cls=d.getObject(_409),_40b=null;if(!cls){return null;}if(!_40a){_40b=_406(cls.prototype,{});}c={cls:cls,params:_40b};}else{if(!_40a&&!c.params){c.params=_406(c.cls.prototype,{});}}return c;};this._functionFromScript=function(_40c,_40d){var _40e="";var _40f="";var _410=(_40c.getAttribute(_40d+"args")||_40c.getAttribute("args"));if(_410){d.forEach(_410.split(/\s*,\s*/),function(part,idx){_40e+="var "+part+" = arguments["+idx+"]; ";});}var _411=_40c.getAttribute("with");if(_411&&_411.length){d.forEach(_411.split(/\s*,\s*/),function(part){_40e+="with("+part+"){";_40f+="}";});}return new Function(_40e+_40c.innerHTML+_40f);};this.instantiate=function(_412,_413,args){var _414=[],_413=_413||{};args=args||{};var _415=(args.scope||d._scopeName)+"Type",_416="data-"+(args.scope||d._scopeName)+"-";d.forEach(_412,function(obj){if(!obj){return;}var node,type,_417,_418,_419,_41a;if(obj.node){node=obj.node;type=obj.type;_41a=obj.fastpath;_417=obj.clsInfo||(type&&_408(type,_41a));_418=_417&&_417.cls;_419=obj.scripts;}else{node=obj;type=_415 in _413?_413[_415]:node.getAttribute(_415);_417=type&&_408(type);_418=_417&&_417.cls;_419=(_418&&(_418._noScript||_418.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_417){throw new Error("Could not load class '"+type);}var _41b={};if(args.defaults){d._mixin(_41b,args.defaults);}if(obj.inherited){d._mixin(_41b,obj.inherited);}if(_41a){var _41c=node.getAttribute(_416+"props");if(_41c&&_41c.length){try{_41c=d.fromJson.call(args.propsThis,"{"+_41c+"}");d._mixin(_41b,_41c);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_41c+"'");}}var _41d=node.getAttribute(_416+"attach-point");if(_41d){_41b.dojoAttachPoint=_41d;}var _41e=node.getAttribute(_416+"attach-event");if(_41e){_41b.dojoAttachEvent=_41e;}_4.mixin(_41b,_413);}else{var _41f=node.attributes;for(var name in _417.params){var item=name in _413?{value:_413[name],specified:true}:_41f.getNamedItem(name);if(!item||(!item.specified&&(!_4.isIE||name.toLowerCase()!="value"))){continue;}var _420=item.value;switch(name){case "class":_420="className" in _413?_413.className:node.className;break;case "style":_420="style" in _413?_413.style:(node.style&&node.style.cssText);}var _421=_417.params[name];if(typeof _420=="string"){_41b[name]=_402(_420,_421);}else{_41b[name]=_420;}}}var _422=[],_423=[];d.forEach(_419,function(_424){node.removeChild(_424);var _425=(_424.getAttribute(_416+"event")||_424.getAttribute("event")),type=_424.getAttribute("type"),nf=d.parser._functionFromScript(_424,_416);if(_425){if(type=="dojo/connect"){_422.push({event:_425,func:nf});}else{_41b[_425]=nf;}}else{_423.push(nf);}});var _426=_418.markupFactory||_418.prototype&&_418.prototype.markupFactory;var _427=_426?_426(_41b,node,_418):new _418(_41b,node);_414.push(_427);var _428=(node.getAttribute(_416+"id")||node.getAttribute("jsId"));if(_428){d.setObject(_428,_427);}d.forEach(_422,function(_429){d.connect(_427,_429.event,null,_429.func);});d.forEach(_423,function(func){func.call(_427);});});if(!_413._started){d.forEach(_414,function(_42a){if(!args.noStart&&_42a&&_4.isFunction(_42a.startup)&&!_42a._started&&(!_42a.getParent||!_42a.getParent())){_42a.startup();}});}return _414;};this.parse=function(_42b,args){var root;if(!args&&_42b&&_42b.rootNode){args=_42b;root=args.rootNode;}else{root=_42b;}root=root?_4.byId(root):_4.body();args=args||{};var _42c=(args.scope||d._scopeName)+"Type",_42d="data-"+(args.scope||d._scopeName)+"-";function scan(_42e,list){var _42f=_4.clone(_42e.inherited);_4.forEach(["dir","lang"],function(name){var val=_42e.node.getAttribute(name);if(val){_42f[name]=val;}});var _430=_42e.clsInfo&&!_42e.clsInfo.cls.prototype._noScript?_42e.scripts:null;var _431=(!_42e.clsInfo||!_42e.clsInfo.cls.prototype.stopParser)||(args&&args.template);for(var _432=_42e.node.firstChild;_432;_432=_432.nextSibling){if(_432.nodeType==1){var type,_433=_431&&_432.getAttribute(_42d+"type");if(_433){type=_433;}else{type=_431&&_432.getAttribute(_42c);}var _434=_433==type;if(type){var _435={"type":type,fastpath:_434,clsInfo:_408(type,_434),node:_432,scripts:[],inherited:_42f};list.push(_435);scan(_435,list);}else{if(_430&&_432.nodeName.toLowerCase()=="script"){type=_432.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_430.push(_432);}}else{if(_431){scan({node:_432,inherited:_42f},list);}}}}}};var _436={};if(args&&args.inherited){for(var key in args.inherited){if(args.inherited[key]){_436[key]=args.inherited[key];}}}var list=[];scan({node:root,inherited:_436},list);var _437=args&&args.template?{template:true}:null;return this.instantiate(list,_437,args);};}();(function(){var _438=function(){if(_4.config.parseOnLoad){_4.parser.parse();}};if(_4.getObject("dijit.wai.onload")===_4._loaders[0]){_4._loaders.splice(1,0,_438);}else{_4._loaders.unshift(_438);}})();}if(!_4._hasResource["dojo.cache"]){_4._hasResource["dojo.cache"]=true;_4.provide("dojo.cache");var _439={};_4.cache=function(_43a,url,_43b){if(typeof _43a=="string"){var _43c=_4.moduleUrl(_43a,url);}else{_43c=_43a;_43b=url;}var key=_43c.toString();var val=_43b;if(_43b!=undefined&&!_4.isString(_43b)){val=("value" in _43b?_43b.value:undefined);}var _43d=_43b&&_43b.sanitize?true:false;if(typeof val=="string"){val=_439[key]=_43d?_4.cache._sanitize(val):val;}else{if(val===null){delete _439[key];}else{if(!(key in _439)){val=_4._getText(key);_439[key]=_43d?_4.cache._sanitize(val):val;}val=_439[key];}}return val;};_4.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _43e=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_43e){val=_43e[1];}}else{val="";}return val;};}if(!_4._hasResource["dijit._Templated"]){_4._hasResource["dijit._Templated"]=true;_4.provide("dijit._Templated");_4.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _43f=this.declaredClass,_440=this;return _4.string.substitute(tmpl,this,function(_441,key){if(key.charAt(0)=="!"){_441=_4.getObject(key.substr(1),false,_440);}if(typeof _441=="undefined"){throw new Error(_43f+" template:"+key);}if(_441==null){return "";}return key.charAt(0)=="!"?_441:_441.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _442=_5._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(_4.isString(_442)){node=_4._toDom(this._stringRepl(_442));if(node.nodeType!=1){throw new Error("Invalid template: "+_442);}}else{node=_442.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._startupWidgets=_4.parser.parse(node,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}));this._supportingWidgets=_5.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_443){var dest=this.containerNode;if(_443&&dest){while(_443.hasChildNodes()){dest.appendChild(_443.firstChild);}}},_attachTemplateNodes:function(_444,_445){_445=_445||function(n,p){return n.getAttribute(p);};var _446=_4.isArray(_444)?_444:(_444.all||_444.getElementsByTagName("*"));var x=_4.isArray(_444)?0:-1;for(;x<_446.length;x++){var _447=(x==-1)?_444:_446[x];if(this.widgetsInTemplate&&(_445(_447,"dojoType")||_445(_447,"data-dojo-type"))){continue;}var _448=_445(_447,"dojoAttachPoint")||_445(_447,"data-dojo-attach-point");if(_448){var _449,_44a=_448.split(/\s*,\s*/);while((_449=_44a.shift())){if(_4.isArray(this[_449])){this[_449].push(_447);}else{this[_449]=_447;}this._attachPoints.push(_449);}}var _44b=_445(_447,"dojoAttachEvent")||_445(_447,"data-dojo-attach-event");if(_44b){var _44c,_44d=_44b.split(/\s*,\s*/);var trim=_4.trim;while((_44c=_44d.shift())){if(_44c){var _44e=null;if(_44c.indexOf(":")!=-1){var _44f=_44c.split(":");_44c=trim(_44f[0]);_44e=trim(_44f[1]);}else{_44c=trim(_44c);}if(!_44e){_44e=_44c;}this._attachEvents.push(this.connect(_447,_44c,_44e));}}}var role=_445(_447,"waiRole");if(role){_5.setWaiRole(_447,role);}var _450=_445(_447,"waiState");if(_450){_4.forEach(_450.split(/\s*,\s*/),function(_451){if(_451.indexOf("-")!=-1){var pair=_451.split("-");_5.setWaiState(_447,pair[0],pair[1]);}});}}},startup:function(){_4.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){_4.forEach(this._attachPoints,function(_452){delete this[_452];},this);this._attachPoints=[];_4.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_5._Templated._templateCache={};_5._Templated.getCachedTemplate=function(_453,_454,_455){var _456=_5._Templated._templateCache;var key=_454||_453;var _457=_456[key];if(_457){try{if(!_457.ownerDocument||_457.ownerDocument==_4.doc){return _457;}}catch(e){}_4.destroy(_457);}if(!_454){_454=_4.cache(_453,{sanitize:true});}_454=_4.string.trim(_454);if(_455||_454.match(/\$\{([^\}]+)\}/g)){return (_456[key]=_454);}else{var node=_4._toDom(_454);if(node.nodeType!=1){throw new Error("Invalid template: "+_454);}return (_456[key]=node);}};if(_4.isIE){_4.addOnWindowUnload(function(){var _458=_5._Templated._templateCache;for(var key in _458){var _459=_458[key];if(typeof _459=="object"){_4.destroy(_459);}delete _458[key];}});}_4.extend(_5._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!_4._hasResource["dijit._CssStateMixin"]){_4._hasResource["dijit._CssStateMixin"]=true;_4.provide("dijit._CssStateMixin");_4.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);_4.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent");},this);_4.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(attr){this.watch(attr,_4.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._setStateClass();},_cssMouseEvent:function(_45a){if(!this.disabled){switch(_45a.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var _45b=this.connect(_4.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(_45b);});break;}}},_setStateClass:function(){var _45c=this.baseClass.split(" ");function _45d(_45e){_45c=_45c.concat(_4.map(_45c,function(c){return c+_45e;}),"dijit"+_45e);};if(!this.isLeftToRight()){_45d("Rtl");}if(this.checked){_45d("Checked");}if(this.state){_45d(this.state);}if(this.selected){_45d("Selected");}if(this.disabled){_45d("Disabled");}else{if(this.readOnly){_45d("ReadOnly");}else{if(this.active){_45d("Active");}else{if(this.hovering){_45d("Hover");}}}}if(this._focused){_45d("Focused");}var tn=this.stateNode||this.domNode,_45f={};_4.forEach(tn.className.split(" "),function(c){_45f[c]=true;});if("_stateClasses" in this){_4.forEach(this._stateClasses,function(c){delete _45f[c];});}_4.forEach(_45c,function(c){_45f[c]=true;});var _460=[];for(var c in _45f){_460.push(c);}tn.className=_460.join(" ");this._stateClasses=_45c;},_trackMouseState:function(node,_461){var _462=false,_463=false,_464=false;var self=this,cn=_4.hitch(this,"connect",node);function _465(){var _466=("disabled" in self&&self.disabled)||("readonly" in self&&self.readonly);_4.toggleClass(node,_461+"Hover",_462&&!_463&&!_466);_4.toggleClass(node,_461+"Active",_463&&!_466);_4.toggleClass(node,_461+"Focused",_464&&!_466);};cn("onmouseenter",function(){_462=true;_465();});cn("onmouseleave",function(){_462=false;_463=false;_465();});cn("onmousedown",function(){_463=true;_465();});cn("onmouseup",function(){_463=false;_465();});cn("onfocus",function(){_464=true;_465();});cn("onblur",function(){_464=false;_465();});this.watch("disabled",_465);this.watch("readOnly",_465);}});}if(!_4._hasResource["dijit._editor.selection"]){_4._hasResource["dijit._editor.selection"]=true;_4.provide("dijit._editor.selection");_4.getObject("_editor.selection",true,_5);_4.mixin(_5._editor.selection,{getType:function(){if(_4.isIE<9){return _4.doc.selection.type.toLowerCase();}else{var _467="text";var oSel;try{oSel=_4.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _468=oSel.getRangeAt(0);if((_468.startContainer==_468.endContainer)&&((_468.endOffset-_468.startOffset)==1)&&(_468.startContainer.nodeType!=3)){_467="control";}}return _467;}},getSelectedText:function(){if(_4.isIE<9){if(_5._editor.selection.getType()=="control"){return null;}return _4.doc.selection.createRange().text;}else{var _469=_4.global.getSelection();if(_469){return _469.toString();}}return "";},getSelectedHtml:function(){if(_4.isIE<9){if(_5._editor.selection.getType()=="control"){return null;}return _4.doc.selection.createRange().htmlText;}else{var _46a=_4.global.getSelection();if(_46a&&_46a.rangeCount){var i;var html="";for(i=0;i<_46a.rangeCount;i++){var frag=_46a.getRangeAt(i).cloneContents();var div=_4.doc.createElement("div");div.appendChild(frag);html+=div.innerHTML;}return html;}return null;}},getSelectedElement:function(){if(_5._editor.selection.getType()=="control"){if(_4.isIE<9){var _46b=_4.doc.selection.createRange();if(_46b&&_46b.item){return _4.doc.selection.createRange().item(0);}}else{var _46c=_4.global.getSelection();return _46c.anchorNode.childNodes[_46c.anchorOffset];}}return null;},getParentElement:function(){if(_5._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(_4.isIE<9){var r=_4.doc.selection.createRange();r.collapse(true);return r.parentElement();}else{var _46d=_4.global.getSelection();if(_46d){var node=_46d.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}}return null;},hasAncestorElement:function(_46e){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_46f){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _470=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _471=String(tags[i]).toLowerCase();if(_470==_471){return _471;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},collapse:function(_472){if(window.getSelection){var _473=_4.global.getSelection();if(_473.removeAllRanges){if(_472){_473.collapseToStart();}else{_473.collapseToEnd();}}else{_473.collapse(_472);}}else{if(_4.isIE){var _474=_4.doc.selection.createRange();_474.collapse(_472);_474.select();}}},remove:function(){var sel=_4.doc.selection;if(_4.isIE<9){if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}else{sel=_4.global.getSelection();sel.deleteFromDocument();return sel;}},selectElementChildren:function(_475,_476){var win=_4.global;var doc=_4.doc;var _477;_475=_4.byId(_475);if(doc.selection&&_4.isIE<9&&_4.body().createTextRange){_477=_475.ownerDocument.body.createTextRange();_477.moveToElementText(_475);if(!_476){try{_477.select();}catch(e){}}}else{if(win.getSelection){var _478=_4.global.getSelection();if(_4.isOpera){if(_478.rangeCount){_477=_478.getRangeAt(0);}else{_477=doc.createRange();}_477.setStart(_475,0);_477.setEnd(_475,(_475.nodeType==3)?_475.length:_475.childNodes.length);_478.addRange(_477);}else{_478.selectAllChildren(_475);}}}},selectElement:function(_479,_47a){var _47b;var doc=_4.doc;var win=_4.global;_479=_4.byId(_479);if(_4.isIE<9&&_4.body().createTextRange){try{var tg=_479.tagName?_479.tagName.toLowerCase():"";if(tg==="img"||tg==="table"){_47b=_4.body().createControlRange();}else{_47b=_4.body().createRange();}_47b.addElement(_479);if(!_47a){_47b.select();}}catch(e){this.selectElementChildren(_479,_47a);}}else{if(_4.global.getSelection){var _47c=win.getSelection();_47b=doc.createRange();if(_47c.removeAllRanges){if(_4.isOpera){if(_47c.getRangeAt(0)){_47b=_47c.getRangeAt(0);}}_47b.selectNode(_479);_47c.removeAllRanges();_47c.addRange(_47b);}}}},inSelection:function(node){if(node){var _47d;var doc=_4.doc;var _47e;if(_4.global.getSelection){var sel=_4.global.getSelection();if(sel&&sel.rangeCount>0){_47e=sel.getRangeAt(0);}if(_47e&&_47e.compareBoundaryPoints&&doc.createRange){try{_47d=doc.createRange();_47d.setStart(node,0);if(_47e.compareBoundaryPoints(_47e.START_TO_END,_47d)===1){return true;}}catch(e){}}}else{if(doc.selection){_47e=doc.selection.createRange();try{_47d=node.ownerDocument.body.createControlRange();if(_47d){_47d.addElement(node);}}catch(e1){try{_47d=node.ownerDocument.body.createTextRange();_47d.moveToElementText(node);}catch(e2){}}if(_47e&&_47d){if(_47e.compareEndPoints("EndToStart",_47d)===1){return true;}}}}}return false;}});}if(!_4._hasResource["dijit._editor.range"]){_4._hasResource["dijit._editor.range"]=true;_4.provide("dijit._editor.range");_5.range={};_5.range.getIndex=function(node,_47f){var ret=[],retR=[];var stop=_47f;var _480=node;var _481,n;while(node!=stop){var i=0;_481=node.parentNode;while((n=_481.childNodes[i++])){if(n===node){--i;break;}}ret.unshift(i);retR.unshift(i-_481.childNodes.length);node=_481;}if(ret.length>0&&_480.nodeType==3){n=_480.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=_480.nextSibling;while(n&&n.nodeType==3){retR[retR.length-1]++;n=n.nextSibling;}}return {o:ret,r:retR};};_5.range.getNode=function(_482,_483){if(!_4.isArray(_482)||_482.length==0){return _483;}var node=_483;_4.every(_482,function(i){if(i>=0&&i<node.childNodes.length){node=node.childNodes[i];}else{node=null;return false;}return true;});return node;};_5.range.getCommonAncestor=function(n1,n2,root){root=root||n1.ownerDocument.body;var _484=function(n){var as=[];while(n){as.unshift(n);if(n!==root){n=n.parentNode;}else{break;}}return as;};var n1as=_484(n1);var n2as=_484(n2);var m=Math.min(n1as.length,n2as.length);var com=n1as[0];for(var i=1;i<m;i++){if(n1as[i]===n2as[i]){com=n1as[i];}else{break;}}return com;};_5.range.getAncestor=function(node,_485,root){root=root||node.ownerDocument.body;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(_485.test(name)){return node;}node=node.parentNode;}return null;};_5.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;_5.range.getBlockAncestor=function(node,_486,root){root=root||node.ownerDocument.body;_486=_486||_5.range.BlockTagNames;var _487=null,_488;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(!_487&&_486.test(name)){_487=node;}if(!_488&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){_488=node;}node=node.parentNode;}return {blockNode:_487,blockContainer:_488||node.ownerDocument.body};};_5.range.atBeginningOfContainer=function(_489,node,_48a){var _48b=false;var _48c=(_48a==0);if(!_48c&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,_48a))){_48c=true;}}if(_48c){var _48d=node;_48b=true;while(_48d&&_48d!==_489){if(_48d.previousSibling){_48b=false;break;}_48d=_48d.parentNode;}}return _48b;};_5.range.atEndOfContainer=function(_48e,node,_48f){var _490=false;var _491=(_48f==(node.length||node.childNodes.length));if(!_491&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(_48f))){_491=true;}}if(_491){var _492=node;_490=true;while(_492&&_492!==_48e){if(_492.nextSibling){_490=false;break;}_492=_492.parentNode;}}return _490;};_5.range.adjacentNoneTextNode=function(_493,next){var node=_493;var len=(0-_493.length)||0;var prop=next?"nextSibling":"previousSibling";while(node){if(node.nodeType!=3){break;}len+=node.length;node=node[prop];}return [node,len];};_5.range._w3c=Boolean(window["getSelection"]);_5.range.create=function(win){if(_5.range._w3c){return (win||_4.global).document.createRange();}else{return new _5.range.W3CRange;}};_5.range.getSelection=function(win,_494){if(_5.range._w3c){return win.getSelection();}else{var s=new _5.range.ie.selection(win);if(!_494){s._getCurrentSelection();}return s;}};if(!_5.range._w3c){_5.range.ie={cachedSelection:{},selection:function(win){this._ranges=[];this.addRange=function(r,_495){this._ranges.push(r);if(!_495){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _496=function(){var r=win.document.selection.createRange();var type=win.document.selection.type.toUpperCase();if(type=="CONTROL"){return new _5.range.W3CRange(_5.range.ie.decomposeControlRange(r));}else{return new _5.range.W3CRange(_5.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_496();if(r){this.addRange(r,true);}};},decomposeControlRange:function(_497){var _498=_497.item(0),_499=_497.item(_497.length-1);var _49a=_498.parentNode,_49b=_499.parentNode;var _49c=_5.range.getIndex(_498,_49a).o;var _49d=_5.range.getIndex(_499,_49b).o+1;return [_49a,_49c,_49b,_49d];},getEndPoint:function(_49e,end){var _49f=_49e.duplicate();_49f.collapse(!end);var _4a0="EndTo"+(end?"End":"Start");var _4a1=_49f.parentElement();var _4a2,_4a3,_4a4;if(_4a1.childNodes.length>0){_4.every(_4a1.childNodes,function(node,i){var _4a5;if(node.nodeType!=3){_49f.moveToElementText(node);if(_49f.compareEndPoints(_4a0,_49e)>0){if(_4a4&&_4a4.nodeType==3){_4a2=_4a4;_4a5=true;}else{_4a2=_4a1;_4a3=i;return false;}}else{if(i==_4a1.childNodes.length-1){_4a2=_4a1;_4a3=_4a1.childNodes.length;return false;}}}else{if(i==_4a1.childNodes.length-1){_4a2=node;_4a5=true;}}if(_4a5&&_4a2){var _4a6=_5.range.adjacentNoneTextNode(_4a2)[0];if(_4a6){_4a2=_4a6.nextSibling;}else{_4a2=_4a1.firstChild;}var _4a7=_5.range.adjacentNoneTextNode(_4a2);_4a6=_4a7[0];var _4a8=_4a7[1];if(_4a6){_49f.moveToElementText(_4a6);_49f.collapse(false);}else{_49f.moveToElementText(_4a1);}_49f.setEndPoint(_4a0,_49e);_4a3=_49f.text.length-_4a8;return false;}_4a4=node;return true;});}else{_4a2=_4a1;_4a3=0;}if(!end&&_4a2.nodeType==1&&_4a3==_4a2.childNodes.length){var _4a9=_4a2.nextSibling;if(_4a9&&_4a9.nodeType==3){_4a2=_4a9;_4a3=0;}}return [_4a2,_4a3];},setEndPoint:function(_4aa,_4ab,_4ac){var _4ad=_4aa.duplicate(),node,len;if(_4ab.nodeType!=3){if(_4ac>0){node=_4ab.childNodes[_4ac-1];if(node){if(node.nodeType==3){_4ab=node;_4ac=node.length;}else{if(node.nextSibling&&node.nextSibling.nodeType==3){_4ab=node.nextSibling;_4ac=0;}else{_4ad.moveToElementText(node.nextSibling?node:_4ab);var _4ae=node.parentNode;var _4af=_4ae.insertBefore(node.ownerDocument.createTextNode(" "),node.nextSibling);_4ad.collapse(false);_4ae.removeChild(_4af);}}}}else{_4ad.moveToElementText(_4ab);_4ad.collapse(true);}}if(_4ab.nodeType==3){var _4b0=_5.range.adjacentNoneTextNode(_4ab);var _4b1=_4b0[0];len=_4b0[1];if(_4b1){_4ad.moveToElementText(_4b1);_4ad.collapse(false);if(_4b1.contentEditable!="inherit"){len++;}}else{_4ad.moveToElementText(_4ab.parentNode);_4ad.collapse(true);}_4ac+=len;if(_4ac>0){if(_4ad.move("character",_4ac)!=_4ac){console.error("Error when moving!");}}}return _4ad;},decomposeTextRange:function(_4b2){var _4b3=_5.range.ie.getEndPoint(_4b2);var _4b4=_4b3[0],_4b5=_4b3[1];var _4b6=_4b3[0],_4b7=_4b3[1];if(_4b2.htmlText.length){if(_4b2.htmlText==_4b2.text){_4b7=_4b5+_4b2.text.length;}else{_4b3=_5.range.ie.getEndPoint(_4b2,true);_4b6=_4b3[0],_4b7=_4b3[1];}}return [_4b4,_4b5,_4b6,_4b7];},setRange:function(_4b8,_4b9,_4ba,_4bb,_4bc,_4bd){var _4be=_5.range.ie.setEndPoint(_4b8,_4b9,_4ba);_4b8.setEndPoint("StartToStart",_4be);if(!_4bd){var end=_5.range.ie.setEndPoint(_4b8,_4bb,_4bc);}_4b8.setEndPoint("EndToEnd",end||_4be);return _4b8;}};_4.declare("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=_5.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(node,_4bf){_4bf=parseInt(_4bf);if(this.startContainer===node&&this.startOffset==_4bf){return;}delete this._cachedBookmark;this.startContainer=node;this.startOffset=_4bf;if(!this.endContainer){this.setEnd(node,_4bf);}else{this._updateInternal();}},setEnd:function(node,_4c0){_4c0=parseInt(_4c0);if(this.endContainer===node&&this.endOffset==_4c0){return;}delete this._cachedBookmark;this.endContainer=node;this.endOffset=_4c0;if(!this.startContainer){this.setStart(node,_4c0);}else{this._updateInternal();}},setStartAfter:function(node,_4c1){this._setPoint("setStart",node,_4c1,1);},setStartBefore:function(node,_4c2){this._setPoint("setStart",node,_4c2,0);},setEndAfter:function(node,_4c3){this._setPoint("setEnd",node,_4c3,1);},setEndBefore:function(node,_4c4){this._setPoint("setEnd",node,_4c4,0);},_setPoint:function(what,node,_4c5,ext){var _4c6=_5.range.getIndex(node,node.parentNode).o;this[what](node.parentNode,_4c6.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();_5.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(body){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var r=this._getIERange();r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new _5.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}}if(!_4._hasResource["dijit._editor.html"]){_4._hasResource["dijit._editor.html"]=true;_4.provide("dijit._editor.html");_4.getObject("_editor",true,_5);_5._editor.escapeXml=function(str,_4c7){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_4c7){str=str.replace(/'/gm,"&#39;");}return str;};_5._editor.getNodeHtml=function(node){var _4c8;switch(node.nodeType){case 1:var _4c9=node.nodeName.toLowerCase();if(!_4c9||_4c9.charAt(0)=="/"){return "";}_4c8="<"+_4c9;var _4ca=[];var attr;if(_4.isIE&&node.outerHTML){var s=node.outerHTML;s=s.substr(0,s.indexOf(">")).replace(/(['"])[^"']*\1/g,"");var reg=/(\b\w+)\s?=/g;var m,key;while((m=reg.exec(s))){key=m[1];if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_4ca.push([key,node.getAttribute("_djrealurl")]);continue;}}var val,_4cb;switch(key){case "style":val=node.style.cssText.toLowerCase();break;case "class":val=node.className;break;case "width":if(_4c9==="img"){_4cb=/width=(\S+)/i.exec(s);if(_4cb){val=_4cb[1];}break;}case "height":if(_4c9==="img"){_4cb=/height=(\S+)/i.exec(s);if(_4cb){val=_4cb[1];}break;}default:val=node.getAttribute(key);}if(val!=null){_4ca.push([key,val.toString()]);}}}}else{var i=0;while((attr=node.attributes[i++])){var n=attr.name;if(n.substr(0,3)!="_dj"){var v=attr.value;if(n=="src"||n=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}_4ca.push([n,v]);}}}_4ca.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((attr=_4ca[j++])){_4c8+=" "+attr[0]+"=\""+(_4.isString(attr[1])?_5._editor.escapeXml(attr[1],true):attr[1])+"\"";}if(_4c9==="script"){_4c8+=">"+node.innerHTML+"</"+_4c9+">";}else{if(node.childNodes.length){_4c8+=">"+_5._editor.getChildrenHtml(node)+"</"+_4c9+">";}else{switch(_4c9){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_4c8+=" />";break;default:_4c8+="></"+_4c9+">";}}}break;case 4:case 3:_4c8=_5._editor.escapeXml(node.nodeValue,true);break;case 8:_4c8="<!--"+_5._editor.escapeXml(node.nodeValue,true)+"-->";break;default:_4c8="<!-- Element not recognized - Type: "+node.nodeType+" Name: "+node.nodeName+"-->";}return _4c8;};_5._editor.getChildrenHtml=function(dom){var out="";if(!dom){return out;}var _4cc=dom["childNodes"]||dom;var _4cd=!_4.isIE||_4cc!==dom;var node,i=0;while((node=_4cc[i++])){if(!_4cd||node.parentNode==dom){out+=_5._editor.getNodeHtml(node);}}return out;};}if(!_4._hasResource["dijit._editor.RichText"]){_4._hasResource["dijit._editor.RichText"]=true;_4.provide("dijit._editor.RichText");if(!_4.config["useXDomain"]||_4.config["allowXdRichTextSave"]){if(_4._postLoad){(function(){var _4ce=_4.doc.createElement("textarea");_4ce.id=_5._scopeName+"._editor.RichText.value";_4.style(_4ce,{display:"none",position:"absolute",top:"-100px",height:"3px",width:"3px"});_4.body().appendChild(_4ce);})();}else{try{_4.doc.write("<textarea id=\""+_5._scopeName+"._editor.RichText.value\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");}catch(e){}}}_4.declare("dijit._editor.RichText",[_5._Widget,_5._CssStateMixin],{constructor:function(_4cf){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};if(_4cf&&_4.isString(_4cf.value)){this.value=_4cf.value;}this.onLoadDeferred=new _4.Deferred();},baseClass:"dijitEditor",inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"==this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");}this.contentPreFilters=[_4.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);if(_4.isMoz){this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters);this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters);}if(_4.isWebKit){this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters);this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters);}if(_4.isIE){this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters);}this.inherited(arguments);_4.publish(_5._scopeName+"._editor.RichText::init",[this]);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var exec=_4.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _4d0={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};if(!_4.isIE){_4d0.Z=exec("redo");}for(var key in _4d0){this.addKeyHandler(key,true,false,_4d0[key]);}},events:["onKeyPress","onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(_5._editor._editorCommandsLocalized){this._local2NativeFormatNames=_5._editor._local2NativeFormatNames;this._native2LocalFormatNames=_5._editor._native2LocalFormatNames;return;}_5._editor._editorCommandsLocalized=true;_5._editor._local2NativeFormatNames={};_5._editor._native2LocalFormatNames={};this._local2NativeFormatNames=_5._editor._local2NativeFormatNames;this._native2LocalFormatNames=_5._editor._native2LocalFormatNames;var _4d1=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _4d2="",_4d3,i=0;while((_4d3=_4d1[i++])){if(_4d3.charAt(1)!=="l"){_4d2+="<"+_4d3+"><span>content</span></"+_4d3+"><br/>";}else{_4d2+="<"+_4d3+"><li>content</li></"+_4d3+"><br/>";}}var _4d4={position:"absolute",top:"0px",zIndex:10,opacity:0.01};var div=_4.create("div",{style:_4d4,innerHTML:_4d2});_4.body().appendChild(div);var _4d5=_4.hitch(this,function(){var node=div.firstChild;while(node){try{_5._editor.selection.selectElement(node.firstChild);var _4d6=node.tagName.toLowerCase();this._local2NativeFormatNames[_4d6]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_4d6]]=_4d6;node=node.nextSibling.nextSibling;}catch(e){}}div.parentNode.removeChild(div);div.innerHTML="";});setTimeout(_4d5,0);},open:function(_4d7){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new _4.Deferred();}if(!this.isClosed){this.close();}_4.publish(_5._scopeName+"._editor.RichText::open",[this]);if(arguments.length==1&&_4d7.nodeName){this.domNode=_4d7;}var dn=this.domNode;var html;if(_4.isString(this.value)){html=this.value;delete this.value;dn.innerHTML="";}else{if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;html=ta.value;dn=this.domNode=_4.doc.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;_4.place(dn,ta,"before");var _4d8=_4.hitch(this,function(){_4.style(ta,{display:"block",position:"absolute",top:"-1000px"});if(_4.isIE){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(_4.isIE){setTimeout(_4d8,10);}else{_4d8();}if(ta.form){var _4d9=ta.value;this.reset=function(){var _4da=this.getValue();if(_4da!=_4d9){this.replaceValue(_4d9);}};_4.connect(ta.form,"onsubmit",this,function(){_4.attr(ta,"disabled",this.disabled);ta.value=this.getValue();});}}else{html=_5._editor.getChildrenHtml(dn);dn.innerHTML="";}}var _4db=_4.contentBox(dn);this._oldHeight=_4db.h;this._oldWidth=_4db.w;this.value=html;if(dn.nodeName&&dn.nodeName=="LI"){dn.innerHTML=" <br>";}this.header=dn.ownerDocument.createElement("div");dn.appendChild(this.header);this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);this.footer=dn.ownerDocument.createElement("div");dn.appendChild(this.footer);if(!this.name){this.name=this.id+"_AUTOGEN";}if(this.name!==""&&(!_4.config["useXDomain"]||_4.config["allowXdRichTextSave"])){var _4dc=_4.byId(_5._scopeName+"._editor.RichText.value");if(_4dc&&_4dc.value!==""){var _4dd=_4dc.value.split(this._SEPARATOR),i=0,dat;while((dat=_4dd[i++])){var data=dat.split(this._NAME_CONTENT_SEP);if(data[0]==this.name){html=data[1];_4dd=_4dd.splice(i,1);_4dc.value=_4dd.join(this._SEPARATOR);break;}}}if(!_5._editor._globalSaveHandler){_5._editor._globalSaveHandler={};_4.addOnUnload(function(){var id;for(id in _5._editor._globalSaveHandler){var f=_5._editor._globalSaveHandler[id];if(_4.isFunction(f)){f();}}});}_5._editor._globalSaveHandler[this.id]=_4.hitch(this,"_saveContent");}this.isClosed=false;var ifr=(this.editorObject=this.iframe=_4.doc.createElement("iframe"));ifr.id=this.id+"_iframe";this._iframeSrc=this._getIframeDocTxt();ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(_4.isIE>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=_4.hitch(this,function(win){this.window=win;this.document=this.window.document;if(_4.isIE){this._localizeEditorCommands();}this.onLoad(html);});var s="javascript:parent."+_5._scopeName+".byId(\""+this.id+"\")._iframeSrc";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(_4.isSafari<=4){var src=ifr.getAttribute("src");if(!src||src.indexOf("javascript")==-1){setTimeout(function(){ifr.setAttribute("src",s);},0);}}if(dn.nodeName=="LI"){dn.lastChild.style.marginTop="-1.2em";}_4.addClass(this.domNode,this.baseClass);},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _4de=_4.getComputedStyle(this.domNode);var html="";var _4df=true;if(_4.isIE||_4.isWebKit||(!this.height&&!_4.isMoz)){html="<div id='dijitEditorBody'></div>";_4df=false;}else{if(_4.isMoz){this._cursorToStart=true;html="&nbsp;";}}var font=[_4de.fontWeight,_4de.fontSize,_4de.fontFamily].join(" ");var _4e0=_4de.lineHeight;if(_4e0.indexOf("px")>=0){_4e0=parseFloat(_4e0)/parseFloat(_4de.fontSize);}else{if(_4e0.indexOf("em")>=0){_4e0=parseFloat(_4e0);}else{_4e0="normal";}}var _4e1="";var self=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(_4e2){_4e2=_4e2.replace(/^;/ig,"")+";";var s=_4e2.split(":")[0];if(s){s=_4.trim(s);s=s.toLowerCase();var i;var sC="";for(i=0;i<s.length;i++){var c=s.charAt(i);switch(c){case "-":i++;c=s.charAt(i).toUpperCase();default:sC+=c;}}_4.style(self.domNode,sC,"");}_4e1+=_4e2+";";});var _4e3=_4.query("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html>\n<head>\n":"<html dir='rtl'>\n<head>\n",(_4.isMoz&&_4e3.length?"<title>"+_4e3[0].innerHTML+"</title>\n":""),"<meta http-equiv='Content-Type' content='text/html'>\n","<style>\n","\tbody,html {\n","\t\tbackground:transparent;\n","\t\tpadding: 1px 0 0 0;\n","\t\tmargin: -1px 0 0 0;\n",((_4.isWebKit)?"\t\twidth: 100%;\n":""),((_4.isWebKit)?"\t\theight: 100%;\n":""),"\t}\n","\tbody{\n","\t\ttop:0px;\n","\t\tleft:0px;\n","\t\tright:0px;\n","\t\tfont:",font,";\n",((this.height||_4.isOpera)?"":"\t\tposition: fixed;\n"),"\t\tmin-height:",this.minHeight,";\n","\t\tline-height:",_4e0,";\n","\t}\n","\tp{ margin: 1em 0; }\n",(!_4df&&!this.height?"\tbody,html {overflow-y: hidden;}\n":""),"\t#dijitEditorBody{overflow-x: auto; overflow-y:"+(this.height?"auto;":"hidden;")+" outline: 0px;}\n","\tli > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; }\n",(!_4.isIE?"\tli{ min-height:1.2em; }\n":""),"</style>\n",this._applyEditingAreaStyleSheets(),"\n","</head>\n<body ",(_4df?"id='dijitEditorBody' ":""),"onload='frameElement._loadFunc(window,document)' style='"+_4e1+"'>",html,"</body>\n</html>"].join("");},_applyEditingAreaStyleSheets:function(){var _4e4=[];if(this.styleSheets){_4e4=this.styleSheets.split(";");this.styleSheets="";}_4e4=_4e4.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_4e4[i++])){var _4e5=(new _4._Url(_4.global.location,url)).toString();this.editingAreaStyleSheets.push(_4e5);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_4e5+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new _4._Url(_4.global.location,url)).toString();}if(_4.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.addCallback(_4.hitch(this,function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _4e6=this.document.createElement("link");_4e6.rel="stylesheet";_4e6.type="text/css";_4e6.href=url;head.appendChild(_4e6);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){url=(new _4._Url(_4.global.location,url)).toString();}var _4e7=_4.indexOf(this.editingAreaStyleSheets,url);if(_4e7==-1){return;}delete this.editingAreaStyleSheets[_4e7];_4.withGlobal(this.window,"query",_4,["link:[href=\""+url+"\"]"]).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_4e8){_4e8=!!_4e8;this._set("disabled",_4e8);if(!this.isLoaded){return;}if(_4.isIE||_4.isWebKit||_4.isOpera){var _4e9=_4.isIE&&(this.isLoaded||!this.focusOnLoad);if(_4e9){this.editNode.unselectable="on";}this.editNode.contentEditable=!_4e8;if(_4e9){var _4ea=this;setTimeout(function(){_4ea.editNode.unselectable="off";},0);}}else{try{this.document.designMode=(_4e8?"off":"on");}catch(e){return;}if(!_4e8&&this._mozSettingProps){var ps=this._mozSettingProps;for(var n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(html){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=_5.registerIframe(this.iframe);}if(!_4.isIE&&!_4.isWebKit&&(this.height||_4.isMoz)){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _4eb=this;if(_4.isIE){this.tabStop=_4.create("div",{tabIndex:-1},this.editingArea);this.iframe.onfocus=function(){_4eb.editNode.setActive();};}}this.focusNode=this.editNode;var _4ec=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;_4.forEach(_4ec,function(item){this.connect(ap,item.toLowerCase(),item);},this);this.connect(ap,"onmouseup","onClick");if(_4.isIE){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}else{this.connect(this.document,"onmousedown",function(){delete this._cursorToStart;});}if(_4.isWebKit){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");this.connect(this.document,"onmousedown",function(e){var t=e.target;if(t&&(t===this.document.body||t===this.document)){setTimeout(_4.hitch(this,"placeCursorAtEnd"),0);}});}if(_4.isIE){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.set("disabled",this.disabled);var _4ed=_4.hitch(this,function(){this.setValue(html);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}this.onDisplayChanged();if(this.focusOnLoad){_4.addOnLoad(_4.hitch(this,function(){setTimeout(_4.hitch(this,"focus"),this.updateInterval);}));}this.value=this.getValue(true);});if(this.setValueDeferred){this.setValueDeferred.addCallback(_4ed);}else{_4ed();}},onKeyDown:function(e){if(e.keyCode===_4.keys.TAB&&this.isTabIndent){_4.stopEvent(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(_4.isIE){if(e.keyCode==_4.keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===_4.keys.BACKSPACE&&this.document.selection.type==="Control"){_4.stopEvent(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}return true;},onKeyUp:function(e){return;},setDisabled:function(_4ee){_4.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.set("disabled",_4ee);},_setValueAttr:function(_4ef){this.setValue(_4ef);},_setDisableSpellCheckAttr:function(_4f0){if(this.document){_4.attr(this.document.body,"spellcheck",!_4f0);}else{this.onLoadDeferred.addCallback(_4.hitch(this,function(){_4.attr(this.document.body,"spellcheck",!_4f0);}));}this._set("disableSpellCheck",_4f0);},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_4f1=this._keyHandlers[c],args=arguments;if(_4f1&&!e.altKey){_4.some(_4f1,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^(e.ctrlKey||e.metaKey))){if(!h.handler.apply(this,args)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=_4.hitch(this,"onKeyPressed");}setTimeout(this._onKeyHitch,1);return true;},addKeyHandler:function(key,ctrl,_4f2,_4f3){if(!_4.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_4f2||false,ctrl:ctrl||false,handler:_4f3});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(e){if(!this._focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _4f4=this.getValue(true);if(_4f4!=this.value){this.onChange(_4f4);}this._set("value",_4f4);},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.set("disabled",false);}this.inherited(arguments);}},blur:function(){if(!_4.isIE&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(_4.doc.body.focus){_4.doc.body.focus();}}},focus:function(){if(!this.isLoaded){this.focusOnLoad=true;return;}if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes){this.placeCursorAtStart();return;}}if(!_4.isIE){_5.focus(this.iframe);}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(e){if(this._updateTimer){clearTimeout(this._updateTimer);}if(!this._updateHandler){this._updateHandler=_4.hitch(this,"onNormalizedDisplayChanged");}this._updateTimer=setTimeout(this._updateHandler,this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(_4f5){},_normalizeCommand:function(cmd,_4f6){var _4f7=cmd.toLowerCase();if(_4f7=="formatblock"){if(_4.isSafari&&_4f6===undefined){_4f7="heading";}}else{if(_4f7=="hilitecolor"&&!_4.isMoz){_4f7="backcolor";}}return _4f7;},_qcaCache:{},queryCommandAvailable:function(_4f8){var ca=this._qcaCache[_4f8];if(ca!==undefined){return ca;}return (this._qcaCache[_4f8]=this._queryCommandAvailable(_4f8));},_queryCommandAvailable:function(_4f9){var ie=1;var _4fa=1<<1;var _4fb=1<<2;var _4fc=1<<3;function _4fd(_4fe){return {ie:Boolean(_4fe&ie),mozilla:Boolean(_4fe&_4fa),webkit:Boolean(_4fe&_4fb),opera:Boolean(_4fe&_4fc)};};var _4ff=null;switch(_4f9.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":_4ff=_4fd(_4fa|ie|_4fb|_4fc);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":_4ff=_4fd(_4fa|ie|_4fc|_4fb);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_4ff=_4fd(ie);break;case "cut":case "copy":case "paste":_4ff=_4fd(ie|_4fa|_4fb);break;case "inserttable":_4ff=_4fd(_4fa|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_4ff=_4fd(ie|_4fa);break;default:return false;}return (_4.isIE&&_4ff.ie)||(_4.isMoz&&_4ff.mozilla)||(_4.isWebKit&&_4ff.webkit)||(_4.isOpera&&_4ff.opera);},execCommand:function(_500,_501){var _502;this.focus();_500=this._normalizeCommand(_500,_501);if(_501!==undefined){if(_500=="heading"){throw new Error("unimplemented");}else{if((_500=="formatblock")&&_4.isIE){_501="<"+_501+">";}}}var _503="_"+_500+"Impl";if(this[_503]){_502=this[_503](_501);}else{_501=arguments.length>1?_501:null;if(_501||_500!="createlink"){_502=this.document.execCommand(_500,false,_501);}}this.onDisplayChanged();return _502;},queryCommandEnabled:function(_504){if(this.disabled||!this._disabledOK){return false;}_504=this._normalizeCommand(_504);if(_4.isMoz||_4.isWebKit){if(_504=="unlink"){return this._sCall("hasAncestorElement",["a"]);}else{if(_504=="inserttable"){return true;}}}if(_4.isWebKit){if(_504=="cut"||_504=="copy"){var sel=this.window.getSelection();if(sel){sel=sel.toString();}return !!sel;}else{if(_504=="paste"){return true;}}}var elem=_4.isIE?this.document.selection.createRange():this.document;try{return elem.queryCommandEnabled(_504);}catch(e){return false;}},queryCommandState:function(_505){if(this.disabled||!this._disabledOK){return false;}_505=this._normalizeCommand(_505);try{return this.document.queryCommandState(_505);}catch(e){return false;}},queryCommandValue:function(_506){if(this.disabled||!this._disabledOK){return false;}var r;_506=this._normalizeCommand(_506);if(_4.isIE&&_506=="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_506)];}else{if(_4.isMoz&&_506==="hilitecolor"){var _507;try{_507=this.document.queryCommandValue("styleWithCSS");}catch(e){_507=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_506);this.document.execCommand("styleWithCSS",false,_507);}else{r=this.document.queryCommandValue(_506);}}return r;},_sCall:function(name,args){return _4.withGlobal(this.window,name,_5._editor.selection,args);},placeCursorAtStart:function(){this.focus();var _508=false;if(_4.isMoz){var _509=this.editNode.firstChild;while(_509){if(_509.nodeType==3){if(_509.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_508=true;this._sCall("selectElement",[_509]);break;}}else{if(_509.nodeType==1){_508=true;var tg=_509.tagName?_509.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_509]);}else{this._sCall("selectElementChildren",[_509]);}break;}}_509=_509.nextSibling;}}else{_508=true;this._sCall("selectElementChildren",[this.editNode]);}if(_508){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _50a=false;if(_4.isMoz){var last=this.editNode.lastChild;while(last){if(last.nodeType==3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_50a=true;this._sCall("selectElement",[last]);break;}}else{if(last.nodeType==1){_50a=true;if(last.lastChild){this._sCall("selectElement",[last.lastChild]);}else{this._sCall("selectElement",[last]);}break;}}last=last.previousSibling;}}else{_50a=true;this._sCall("selectElementChildren",[this.editNode]);}if(_50a){this._sCall("collapse",[false]);}},getValue:function(_50b){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_50b);},_getValueAttr:function(){return this.getValue(true);},setValue:function(html){if(!this.isLoaded){this.onLoadDeferred.addCallback(_4.hitch(this,function(){this.setValue(html);}));return;}this._cursorToStart=true;if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);var node=this.isClosed?this.domNode:this.editNode;if(html&&_4.isMoz&&html.toLowerCase()=="<p></p>"){html="<p>&nbsp;</p>";}if(!html&&_4.isWebKit){html="&nbsp;";}node.innerHTML=html;this._preDomFilterContent(node);}this.onDisplayChanged();this._set("value",this.getValue(true));},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!_4.isMoz){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(!html){this._cursorToStart=true;html="&nbsp;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}this._set("value",this.getValue(true));},_preFilterContent:function(html){var ec=html;_4.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;_4.forEach(this.contentDomPreFilters,function(ef){if(ef&&_4.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_50c){var ec;if(!_4.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_50c){dom=_4.clone(dom);}_4.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=_5._editor.getChildrenHtml(dom);}else{ec=dom;}if(!_4.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}_4.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(e){var _50d=_4.byId(_5._scopeName+"._editor.RichText.value");if(_50d.value){_50d.value+=this._SEPARATOR;}_50d.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(true);},escapeXml:function(str,_50e){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_50e){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){_4.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit._editor.getNodeHtml instead",2);return _5._editor.getNodeHtml(node);},getNodeChildrenHtml:function(dom){_4.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit._editor.getChildrenHtml instead",2);return _5._editor.getChildrenHtml(dom);},close:function(save){if(this.isClosed){return;}if(!arguments.length){save=true;}if(save){this._set("value",this.getValue(true));}if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(_4.isIE){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){_5.unregisterIframe(this._iframeRegHandle);delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(_4.isIE){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=this.value;_4.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=this.value;}delete this.iframe;_4.removeClass(this.domNode,this.baseClass);this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;},destroy:function(){if(!this.isClosed){this.close(false);}this.inherited(arguments);if(_5._editor._globalSaveHandler){delete _5._editor._globalSaveHandler[this.id];}},_removeMozBogus:function(html){return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(html){html=html.replace(/\sclass="webkit-block-placeholder"/gi,"");html=html.replace(/\sclass="apple-style-span"/gi,"");html=html.replace(/<meta charset=\"utf-8\" \/>/gi,"");return html;},_normalizeFontStyle:function(html){return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(html){return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_inserthorizontalruleImpl:function(_50f){if(_4.isIE){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_50f);},_unlinkImpl:function(_510){if((this.queryCommandEnabled("unlink"))&&(_4.isMoz||_4.isWebKit)){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_510);},_hilitecolorImpl:function(_511){var _512;if(_4.isMoz){this.document.execCommand("styleWithCSS",false,true);_512=this.document.execCommand("hilitecolor",false,_511);this.document.execCommand("styleWithCSS",false,false);}else{_512=this.document.execCommand("hilitecolor",false,_511);}return _512;},_backcolorImpl:function(_513){if(_4.isIE){_513=_513?_513:null;}return this.document.execCommand("backcolor",false,_513);},_forecolorImpl:function(_514){if(_4.isIE){_514=_514?_514:null;}return this.document.execCommand("forecolor",false,_514);},_inserthtmlImpl:function(_515){_515=this._preFilterContent(_515);var rv=true;if(_4.isIE){var _516=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()=="CONTROL"){var n=_516.item(0);while(_516.length){_516.remove(_516.item(0));}n.outerHTML=_515;}else{_516.pasteHTML(_515);}_516.select();}else{if(_4.isMoz&&!_515.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_515);}}return rv;},_boldImpl:function(_517){if(_4.isIE){this._adaptIESelection();}return this.document.execCommand("bold",false,_517);},_italicImpl:function(_518){if(_4.isIE){this._adaptIESelection();}return this.document.execCommand("italic",false,_518);},_underlineImpl:function(_519){if(_4.isIE){this._adaptIESelection();}return this.document.execCommand("underline",false,_519);},_strikethroughImpl:function(_51a){if(_4.isIE){this._adaptIESelection();}return this.document.execCommand("strikethrough",false,_51a);},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header);},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer);},_getNodeChildrenHeight:function(node){var h=0;if(node&&node.childNodes){var i;for(i=0;i<node.childNodes.length;i++){var size=_4.position(node.childNodes[i]);h+=size.h;}}return h;},_isNodeEmpty:function(node,_51b){if(node.nodeType==1){if(node.childNodes.length>0){return this._isNodeEmpty(node.childNodes[0],_51b);}return true;}else{if(node.nodeType==3){return (node.nodeValue.substring(_51b)=="");}}return false;},_removeStartingRangeFromRange:function(node,_51c){if(node.nextSibling){_51c.setStart(node.nextSibling,0);}else{var _51d=node.parentNode;while(_51d&&_51d.nextSibling==null){_51d=_51d.parentNode;}if(_51d){_51c.setStart(_51d.nextSibling,0);}}return _51c;},_adaptIESelection:function(){var _51e=_5.range.getSelection(this.window);if(_51e&&_51e.rangeCount&&!_51e.isCollapsed){var _51f=_51e.getRangeAt(0);var _520=_51f.startContainer;var _521=_51f.startOffset;while(_520.nodeType==3&&_521>=_520.length&&_520.nextSibling){_521=_521-_520.length;_520=_520.nextSibling;}var _522=null;while(this._isNodeEmpty(_520,_521)&&_520!=_522){_522=_520;_51f=this._removeStartingRangeFromRange(_520,_51f);_520=_51f.startContainer;_521=0;}_51e.removeAllRanges();_51e.addRange(_51f);}}});}if(!_4._hasResource["dijit._Container"]){_4._hasResource["dijit._Container"]=true;_4.provide("dijit._Container");_4.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_523,_524){var _525=this.containerNode;if(_524&&typeof _524=="number"){var _526=this.getChildren();if(_526&&_526.length>=_524){_525=_526[_524-1].domNode;_524="after";}}_4.place(_523.domNode,_525,_524);if(this._started&&!_523._started){_523.startup();}},removeChild:function(_527){if(typeof _527=="number"){_527=this.getChildren()[_527];}if(_527){var node=_527.domNode;if(node&&node.parentNode){node.parentNode.removeChild(node);}}},hasChildren:function(){return this.getChildren().length>0;},destroyDescendants:function(_528){_4.forEach(this.getChildren(),function(_529){_529.destroyRecursive(_528);});},_getSiblingOfChild:function(_52a,dir){var node=_52a.domNode,_52b=(dir>0?"nextSibling":"previousSibling");do{node=node[_52b];}while(node&&(node.nodeType!=1||!_5.byNode(node)));return node&&_5.byNode(node);},getIndexOfChild:function(_52c){return _4.indexOf(this.getChildren(),_52c);},startup:function(){if(this._started){return;}_4.forEach(this.getChildren(),function(_52d){_52d.startup();});this.inherited(arguments);}});}if(!_4._hasResource["dijit._KeyNavContainer"]){_4._hasResource["dijit._KeyNavContainer"]=true;_4.provide("dijit._KeyNavContainer");_4.declare("dijit._KeyNavContainer",_5._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(_52e,_52f){var _530=(this._keyNavCodes={});var prev=_4.hitch(this,this.focusPrev);var next=_4.hitch(this,this.focusNext);_4.forEach(_52e,function(code){_530[code]=prev;});_4.forEach(_52f,function(code){_530[code]=next;});_530[_4.keys.HOME]=_4.hitch(this,"focusFirstChild");_530[_4.keys.END]=_4.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){_4.forEach(this.getChildren(),_4.hitch(this,"_startupChild"));},addChild:function(_531,_532){_5._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(_531);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){var _533=this._getFirstFocusableChild();if(_533){this.focusChild(_533);}},focusLastChild:function(){var _534=this._getLastFocusableChild();if(_534){this.focusChild(_534);}},focusNext:function(){var _535=this._getNextFocusableChild(this.focusedChild,1);this.focusChild(_535);},focusPrev:function(){var _536=this._getNextFocusableChild(this.focusedChild,-1);this.focusChild(_536,true);},focusChild:function(_537,last){if(this.focusedChild&&_537!==this.focusedChild){this._onChildBlur(this.focusedChild);}_537.set("tabIndex",this.tabIndex);_537.focus(last?"end":"start");this._set("focusedChild",_537);},_startupChild:function(_538){_538.set("tabIndex","-1");this.connect(_538,"_onFocus",function(){_538.set("tabIndex",this.tabIndex);});this.connect(_538,"_onBlur",function(){_538.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode){return;}this.focusFirstChild();_4.attr(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){_4.attr(this.domNode,"tabIndex",this.tabIndex);}this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();_4.stopEvent(evt);}},_onChildBlur:function(_539){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1);},_getNextFocusableChild:function(_53a,dir){if(_53a){_53a=this._getSiblingOfChild(_53a,dir);}var _53b=this.getChildren();for(var i=0;i<_53b.length;i++){if(!_53a){_53a=_53b[(dir>0)?0:(_53b.length-1)];}if(_53a.isFocusable()){return _53a;}_53a=this._getSiblingOfChild(_53a,dir);}return null;}});}if(!_4._hasResource["dijit.ToolbarSeparator"]){_4._hasResource["dijit.ToolbarSeparator"]=true;_4.provide("dijit.ToolbarSeparator");_4.declare("dijit.ToolbarSeparator",[_5._Widget,_5._Templated],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\" role=\"presentation\"></div>",buildRendering:function(){this.inherited(arguments);_4.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!_4._hasResource["dijit.Toolbar"]){_4._hasResource["dijit.Toolbar"]=true;_4.provide("dijit.Toolbar");_4.declare("dijit.Toolbar",[_5._Widget,_5._Templated,_5._KeyNavContainer],{templateString:"<div class=\"dijit\" role=\"toolbar\" tabIndex=\"${tabIndex}\" dojoAttachPoint=\"containerNode\">"+"</div>",baseClass:"dijitToolbar",postCreate:function(){this.inherited(arguments);this.connectKeyNavHandlers(this.isLeftToRight()?[_4.keys.LEFT_ARROW]:[_4.keys.RIGHT_ARROW],this.isLeftToRight()?[_4.keys.RIGHT_ARROW]:[_4.keys.LEFT_ARROW]);},startup:function(){if(this._started){return;}this.startupKeyNavChildren();this.inherited(arguments);}});}if(!_4._hasResource["dijit.form._FormWidget"]){_4._hasResource["dijit.form._FormWidget"]=true;_4.provide("dijit.form._FormWidget");_4.declare("dijit.form._FormWidget",[_5._Widget,_5._Templated,_5._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:_4.delegate(_5._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name=\""+this.name.replace(/'/g,"&quot;")+"\""):"";this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown");},_setDisabledAttr:function(_53c){this._set("disabled",_53c);_4.attr(this.focusNode,"disabled",_53c);if(this.valueNode){_4.attr(this.valueNode,"disabled",_53c);}_5.setWaiState(this.focusNode,"disabled",_53c);if(_53c){this._set("hovering",false);this._set("active",false);var _53d="tabIndex" in this.attributeMap?this.attributeMap.tabIndex:"focusNode";_4.forEach(_4.isArray(_53d)?_53d:[_53d],function(_53e){var node=this[_53e];if(_4.isWebKit||_5.hasDefaultTabStop(node)){node.setAttribute("tabIndex","-1");}else{node.removeAttribute("tabIndex");}},this);}else{if(this.tabIndex!=""){this.focusNode.setAttribute("tabIndex",this.tabIndex);}}},setDisabled:function(_53f){_4.deprecated("setDisabled("+_53f+") is deprecated. Use set('disabled',"+_53f+") instead.","","2.0");this.set("disabled",_53f);},_onFocus:function(e){if(this.scrollOnFocus){_4.window.scrollIntoView(this.domNode);}this.inherited(arguments);},isFocusable:function(){return !this.disabled&&this.focusNode&&(_4.style(this.domNode,"display")!="none");},focus:function(){if(!this.disabled){_5.focus(this.focusNode);}},compare:function(val1,val2){if(typeof val1=="number"&&typeof val2=="number"){return (isNaN(val1)&&isNaN(val2))?0:val1-val2;}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(_540){},_onChangeActive:false,_handleOnChange:function(_541,_542){if(this._lastValueReported==undefined&&(_542===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_541;}this._pendingOnChange=this._pendingOnChange||(typeof _541!=typeof this._lastValueReported)||(this.compare(_541,this._lastValueReported)!=0);if((this.intermediateChanges||_542||_542===undefined)&&this._pendingOnChange){this._lastValueReported=_541;this._pendingOnChange=false;if(this._onChangeActive){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);}this._onChangeHandle=setTimeout(_4.hitch(this,function(){this._onChangeHandle=null;this.onChange(_541);}),0);}}},create:function(){this.inherited(arguments);this._onChangeActive=true;},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported);}this.inherited(arguments);},setValue:function(_543){_4.deprecated("dijit.form._FormWidget:setValue("+_543+") is deprecated.  Use set('value',"+_543+") instead.","","2.0");this.set("value",_543);},getValue:function(){_4.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value");},_onMouseDown:function(e){if(!e.ctrlKey&&_4.mouseButtons.isLeft(e)&&this.isFocusable()){var _544=this.connect(_4.body(),"onmouseup",function(){if(this.isFocusable()){this.focus();}this.disconnect(_544);});}}});_4.declare("dijit.form._FormValueWidget",_5.form._FormWidget,{readOnly:false,attributeMap:_4.delegate(_5.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(_545){_4.attr(this.focusNode,"readOnly",_545);_5.setWaiState(this.focusNode,"readonly",_545);this._set("readOnly",_545);},postCreate:function(){this.inherited(arguments);if(_4.isIE<9||(_4.isIE&&_4.isQuirks)){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._lastValueReported=this._resetValue=this.value;}},_setValueAttr:function(_546,_547){this._handleOnChange(_546,_547);},_handleOnChange:function(_548,_549){this._set("value",_548);this.inherited(arguments);},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==_4.keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){var te;if(_4.isIE){e.preventDefault();te=document.createEventObject();te.keyCode=_4.keys.ESCAPE;te.shiftKey=e.shiftKey;e.srcElement.fireEvent("onkeypress",te);}}},_layoutHackIE7:function(){if(_4.isIE==7){var _54a=this.domNode;var _54b=_54a.parentNode;var _54c=_54a.firstChild||_54a;var _54d=_54c.style.filter;var _54e=this;while(_54b&&_54b.clientHeight==0){(function ping(){var _54f=_54e.connect(_54b,"onscroll",function(e){_54e.disconnect(_54f);_54c.style.filter=(new Date()).getMilliseconds();setTimeout(function(){_54c.style.filter=_54d;},0);});})();_54b=_54b.parentNode;}}}});}if(!_4._hasResource["dijit._HasDropDown"]){_4._hasResource["dijit._HasDropDown"]=true;_4.provide("dijit._HasDropDown");_4.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouseDown:function(e){if(this.disabled||this.readOnly){return;}_4.stopEvent(e);this._docHandler=this.connect(_4.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown();},_onDropDownMouseUp:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _550=this.dropDown,_551=false;if(e&&this._opened){var c=_4.position(this._buttonNode,true);if(!(e.pageX>=c.x&&e.pageX<=c.x+c.w)||!(e.pageY>=c.y&&e.pageY<=c.y+c.h)){var t=e.target;while(t&&!_551){if(_4.hasClass(t,"dijitPopup")){_551=true;}else{t=t.parentNode;}}if(_551){t=e.target;if(_550.onItemClick){var _552;while(t&&!(_552=_5.byNode(t))){t=t.parentNode;}if(_552&&_552.onClick&&_552.getParent){_552.getParent().onItemClick(_552,e);}}return;}}}if(this._opened&&_550.focus&&_550.autoFocus!==false){window.setTimeout(_4.hitch(_550,"focus"),1);}},_onDropDownClick:function(e){if(this._stopClickEvents){_4.stopEvent(e);}},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var _553={"after":this.isLeftToRight()?"Right":"Left","before":this.isLeftToRight()?"Left":"Right","above":"Up","below":"Down","left":"Left","right":"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";_4.addClass(this._arrowWrapperNode||this._buttonNode,"dijit"+_553+"ArrowButton");},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp");},destroy:function(){if(this.dropDown){if(!this.dropDown._destroyed){this.dropDown.destroyRecursive();}delete this.dropDown;}this.inherited(arguments);},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown,_554=e.target;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){_4.stopEvent(e);return;}}if(d&&this._opened&&e.charOrCode==_4.keys.ESCAPE){this.closeDropDown();_4.stopEvent(e);}else{if(!this._opened&&(e.charOrCode==_4.keys.DOWN_ARROW||((e.charOrCode==_4.keys.ENTER||e.charOrCode==" ")&&((_554.tagName||"").toLowerCase()!=="input"||(_554.type&&_554.type.toLowerCase()!=="text"))))){this._toggleOnKeyUp=true;_4.stopEvent(e);}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var d=this.dropDown;if(d&&d.focus){setTimeout(_4.hitch(d,"focus"),1);}}},_onBlur:function(){var _555=_5._curFocus&&this.dropDown&&_4.isDescendant(_5._curFocus,this.dropDown.domNode);this.closeDropDown(_555);this.inherited(arguments);},isLoaded:function(){return true;},loadDropDown:function(_556){_556();},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}if(!this._opened){if(!this.isLoaded()){this.loadDropDown(_4.hitch(this,"openDropDown"));return;}else{this.openDropDown();}}else{this.closeDropDown();}},openDropDown:function(){var _557=this.dropDown,_558=_557.domNode,_559=this._aroundNode||this.domNode,self=this;if(!this._preparedNode){this._preparedNode=true;if(_558.style.width){this._explicitDDWidth=true;}if(_558.style.height){this._explicitDDHeight=true;}}if(this.maxHeight||this.forceWidth||this.autoWidth){var _55a={display:"",visibility:"hidden"};if(!this._explicitDDWidth){_55a.width="";}if(!this._explicitDDHeight){_55a.height="";}_4.style(_558,_55a);var _55b=this.maxHeight;if(_55b==-1){var _55c=_4.window.getBox(),_55d=_4.position(_559,false);_55b=Math.floor(Math.max(_55d.y,_55c.h-(_55d.y+_55d.h)));}if(_557.startup&&!_557._started){_557.startup();}_5.popup.moveOffScreen(_557);var mb=_4._getMarginSize(_558);var _55e=(_55b&&mb.h>_55b);_4.style(_558,{overflowX:"hidden",overflowY:_55e?"auto":"hidden"});if(_55e){mb.h=_55b;if("w" in mb){mb.w+=16;}}else{delete mb.h;}if(this.forceWidth){mb.w=_559.offsetWidth;}else{if(this.autoWidth){mb.w=Math.max(mb.w,_559.offsetWidth);}else{delete mb.w;}}if(_4.isFunction(_557.resize)){_557.resize(mb);}else{_4.marginBox(_558,mb);}}var _55f=_5.popup.open({parent:this,popup:_557,around:_559,orient:_5.getPopupAroundAlignment((this.dropDownPosition&&this.dropDownPosition.length)?this.dropDownPosition:["below"],this.isLeftToRight()),onExecute:function(){self.closeDropDown(true);},onCancel:function(){self.closeDropDown(true);},onClose:function(){_4.attr(self._popupStateNode,"popupActive",false);_4.removeClass(self._popupStateNode,"dijitHasDropDownOpen");self._opened=false;}});_4.attr(this._popupStateNode,"popupActive","true");_4.addClass(self._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return _55f;},closeDropDown:function(_560){if(this._opened){if(_560){this.focus();}_5.popup.close(this.dropDown);this._opened=false;}}});}if(!_4._hasResource["dijit.form.Button"]){_4._hasResource["dijit.form.Button"]=true;_4.provide("dijit.form.Button");_4.declare("dijit.form.Button",_5.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:_4.cache("dijit.form","templates/Button.html","<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode,focusNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\"></span\r\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#x25CF;</span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode\"\r\n\t\t\t></span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\" tabIndex=\"-1\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),attributeMap:_4.delegate(_5.form._FormWidget.prototype.attributeMap,{value:"valueNode"}),_onClick:function(e){if(this.disabled){return false;}this._clicked();return this.onClick(e);},_onButtonClick:function(e){if(this._onClick(e)===false){e.preventDefault();}else{if(this.type=="submit"&&!(this.valueNode||this.focusNode).form){for(var node=this.domNode;node.parentNode;node=node.parentNode){var _561=_5.byNode(node);if(_561&&typeof _561._onSubmit=="function"){_561._onSubmit(e);break;}}}else{if(this.valueNode){this.valueNode.click();e.preventDefault();}}}},buildRendering:function(){this.inherited(arguments);_4.setSelectable(this.focusNode,false);},_fillContent:function(_562){if(_562&&(!this.params||!("label" in this.params))){this.set("label",_562.innerHTML);}},_setShowLabelAttr:function(val){if(this.containerNode){_4.toggleClass(this.containerNode,"dijitDisplayNone",!val);}this._set("showLabel",val);},onClick:function(e){return true;},_clicked:function(e){},setLabel:function(_563){_4.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_563);},_setLabelAttr:function(_564){this._set("label",_564);this.containerNode.innerHTML=_564;if(this.showLabel==false&&!this.params.title){this.titleNode.title=_4.trim(this.containerNode.innerText||this.containerNode.textContent||"");}},_setIconClassAttr:function(val){var _565=this.iconClass||"dijitNoIcon",_566=val||"dijitNoIcon";_4.replaceClass(this.iconNode,_566,_565);this._set("iconClass",val);}});_4.declare("dijit.form.DropDownButton",[_5.form.Button,_5._Container,_5._HasDropDown],{baseClass:"dijitDropDownButton",templateString:_4.cache("dijit.form","templates/DropDownButton.html","<span class=\"dijit dijitReset dijitInline\"\r\n\t><span class='dijitReset dijitInline dijitButtonNode'\r\n\t\tdojoAttachEvent=\"ondijitclick:_onButtonClick\" dojoAttachPoint=\"_buttonNode\"\r\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"focusNode,titleNode,_arrowWrapperNode\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\r\n\t\t\t\tdojoAttachPoint=\"iconNode\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\r\n\t\t\t\tdojoAttachPoint=\"containerNode,_popupStateNode\"\r\n\t\t\t\tid=\"${id}_label\"\r\n\t\t\t></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\r\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\r\n\t\t></span\r\n\t></span\r\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\" tabIndex=\"-1\"\r\n\t\tdojoAttachPoint=\"valueNode\"\r\n/></span>\r\n"),_fillContent:function(){if(this.srcNodeRef){var _567=_4.query("*",this.srcNodeRef);_5.form.DropDownButton.superclass._fillContent.call(this,_567[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown&&this.dropDownContainer){var _568=_4.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=_5.byNode(_568);delete this.dropDownContainer;}if(this.dropDown){_5.popup.hide(this.dropDown);}this.inherited(arguments);},isLoaded:function(){var _569=this.dropDown;return (!!_569&&(!_569.href||_569.isLoaded));},loadDropDown:function(){var _56a=this.dropDown;if(!_56a){return;}if(!this.isLoaded()){var _56b=_4.connect(_56a,"onLoad",this,function(){_4.disconnect(_56b);this.openDropDown();});_56a.refresh();}else{this.openDropDown();}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown;}});_4.declare("dijit.form.ComboButton",_5.form.DropDownButton,{templateString:_4.cache("dijit.form","templates/ComboButton.html","<table class=\"dijit dijitReset dijitInline dijitLeft\"\r\n\tcellspacing='0' cellpadding='0' role=\"presentation\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" dojoAttachPoint=\"buttonNode\" dojoAttachEvent=\"ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress\"\r\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\r\n\t\t\tdojoAttachPoint=\"titleNode\"\r\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\r\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" dojoAttachPoint=\"iconNode\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" dojoAttachPoint=\"containerNode\" role=\"presentation\"></div\r\n\t\t></div\r\n\t\t></td\r\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\r\n\t\t\tdojoAttachPoint=\"_popupStateNode,focusNode,_buttonNode\"\r\n\t\t\tdojoAttachEvent=\"onkeypress:_onArrowKeyPress\"\r\n\t\t\ttitle=\"${optionsTitle}\"\r\n\t\t\trole=\"button\" aria-haspopup=\"true\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">&#9660;</div\r\n\t\t></td\r\n\t\t><td style=\"display:none !important;\"\r\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" dojoAttachPoint=\"valueNode\"\r\n\t\t/></td></tr></tbody\r\n></table>\r\n"),attributeMap:_4.mixin(_4.clone(_5.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",cssStateNodes:{"buttonNode":"dijitButtonNode","titleNode":"dijitButtonContents","_popupStateNode":"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(evt){if(evt.charOrCode==_4.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){_5.focus(this._popupStateNode);_4.stopEvent(evt);}},_onArrowKeyPress:function(evt){if(evt.charOrCode==_4.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){_5.focus(this.titleNode);_4.stopEvent(evt);}},focus:function(_56c){if(!this.disabled){_5.focus(_56c=="start"?this.titleNode:this._popupStateNode);}}});_4.declare("dijit.form.ToggleButton",_5.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:_4.mixin(_4.clone(_5.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(evt){this.set("checked",!this.checked);},_setCheckedAttr:function(_56d,_56e){this._set("checked",_56d);_4.attr(this.focusNode||this.domNode,"checked",_56d);_5.setWaiState(this.focusNode||this.domNode,"pressed",_56d);this._handleOnChange(_56d,_56e);},setChecked:function(_56f){_4.deprecated("setChecked("+_56f+") is deprecated. Use set('checked',"+_56f+") instead.","","2.0");this.set("checked",_56f);},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false);}});}if(!_4._hasResource["dijit._editor._Plugin"]){_4._hasResource["dijit._editor._Plugin"]=true;_4.provide("dijit._editor._Plugin");_4.declare("dijit._editor._Plugin",null,{constructor:function(args,node){this.params=args||{};_4.mixin(this,this.params);this._connects=[];this._attrPairNames={};},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:_5.form.Button,disabled:false,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _570=this.getLabel(this.command),_571=this.editor,_572=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _573=_4.mixin({label:_570,dir:_571.dir,lang:_571.lang,showLabel:false,iconClass:_572,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_573);}}if(this.get("disabled")&&this.button){this.button.set("disabled",this.get("disabled"));}},destroy:function(){_4.forEach(this._connects,_4.disconnect);if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(_4.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_574,_575;if(!e||!e.isLoaded||!c.length){return;}var _576=this.get("disabled");if(this.button){try{_575=!_576&&e.queryCommandEnabled(c);if(this.enabled!==_575){this.enabled=_575;this.button.set("disabled",!_575);}if(typeof this.button.checked=="boolean"){_574=e.queryCommandState(c);if(this.checked!==_574){this.checked=_574;this.button.set("checked",e.queryCommandState(c));}}}catch(e){console.log(e);}}},setEditor:function(_577){this.editor=_577;this._initButton();if(this.button&&this.useDefaultCommand){if(this.editor.queryCommandAvailable(this.command)){this.connect(this.button,"onClick",_4.hitch(this.editor,"execCommand",this.command,this.commandArg));}else{this.button.domNode.style.display="none";}}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_578){if(this.button){_578.addChild(this.button);}},set:function(name,_579){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _57a=this._getAttrNames(name);if(this[_57a.s]){var _57b=this[_57a.s].apply(this,Array.prototype.slice.call(arguments,1));}else{this._set(name,_579);}return _57b||this;},get:function(name){var _57c=this._getAttrNames(name);return this[_57c.g]?this[_57c.g]():this[name];},_setDisabledAttr:function(_57d){this.disabled=_57d;this.updateState();},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_57e){var _57f=this[name];this[name]=_57e;}});}if(!_4._hasResource["dijit._editor.plugins.EnterKeyHandling"]){_4._hasResource["dijit._editor.plugins.EnterKeyHandling"]=true;_4.provide("dijit._editor.plugins.EnterKeyHandling");_4.declare("dijit._editor.plugins.EnterKeyHandling",_5._editor._Plugin,{blockNodeForEnter:"BR",constructor:function(args){if(args){if("blockNodeForEnter" in args){args.blockNodeForEnter=args.blockNodeForEnter.toUpperCase();}_4.mixin(this,args);}},setEditor:function(_580){if(this.editor===_580){return;}this.editor=_580;if(this.blockNodeForEnter=="BR"){this.editor.customUndo=true;_580.onLoadDeferred.addCallback(_4.hitch(this,function(d){this.connect(_580.document,"onkeypress",function(e){if(e.charOrCode==_4.keys.ENTER){var ne=_4.mixin({},e);ne.shiftKey=true;if(!this.handleEnterKey(ne)){_4.stopEvent(e);}}});return d;}));}else{if(this.blockNodeForEnter){var h=_4.hitch(this,this.handleEnterKey);_580.addKeyHandler(13,0,0,h);_580.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(e){if(this._checkListLater){if(_4.withGlobal(this.editor.window,"isCollapsed",_5)){var _581=_4.withGlobal(this.editor.window,"getAncestorElement",_5._editor.selection,["LI"]);if(!_581){_5._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _582=_4.withGlobal(this.editor.window,"getAncestorElement",_5._editor.selection,[this.blockNodeForEnter]);if(_582){_582.innerHTML=this.bogusHtmlContent;if(_4.isIE){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(_4.isMoz){if(_581.parentNode.parentNode.nodeName=="LI"){_581=_581.parentNode.parentNode;}}var fc=_581.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_581.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _583=_5.range.create(this.editor.window);_583.setStart(_581.firstChild,0);var _584=_5.range.getSelection(this.editor.window,true);_584.removeAllRanges();_584.addRange(_583);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&nbsp;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _585,_586,_587,_588,_589,_58a,doc=this.editor.document,br,rs,txt;if(e.shiftKey){var _58b=_4.withGlobal(this.editor.window,"getParentElement",_5._editor.selection);var _58c=_5.range.getAncestor(_58b,this.blockNodes);if(_58c){if(_58c.tagName=="LI"){return true;}_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);if(!_586.collapsed){_586.deleteContents();_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);}if(_5.range.atBeginningOfContainer(_58c,_586.startContainer,_586.startOffset)){br=doc.createElement("br");_587=_5.range.create(this.editor.window);_58c.insertBefore(br,_58c.firstChild);_587.setStartBefore(br.nextSibling);_585.removeAllRanges();_585.addRange(_587);}else{if(_5.range.atEndOfContainer(_58c,_586.startContainer,_586.startOffset)){_587=_5.range.create(this.editor.window);br=doc.createElement("br");_58c.appendChild(br);_58c.appendChild(doc.createTextNode(" "));_587.setStart(_58c.lastChild,0);_585.removeAllRanges();_585.addRange(_587);}else{rs=_586.startContainer;if(rs&&rs.nodeType==3){txt=rs.nodeValue;_4.withGlobal(this.editor.window,function(){_588=doc.createTextNode(txt.substring(0,_586.startOffset));_589=doc.createTextNode(txt.substring(_586.startOffset));_58a=doc.createElement("br");if(_589.nodeValue==""&&_4.isWebKit){_589=doc.createTextNode(" ");}_4.place(_588,rs,"after");_4.place(_58a,_588,"after");_4.place(_589,_58a,"after");_4.destroy(rs);_587=_5.range.create(_4.gobal);_587.setStart(_589,0);_585.removeAllRanges();_585.addRange(_587);});return false;}return true;}}}else{_585=_5.range.getSelection(this.editor.window);if(_585.rangeCount){_586=_585.getRangeAt(0);if(_586&&_586.startContainer){if(!_586.collapsed){_586.deleteContents();_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);}rs=_586.startContainer;if(rs&&rs.nodeType==3){_4.withGlobal(this.editor.window,_4.hitch(this,function(){var _58d=false;var _58e=_586.startOffset;if(rs.length<_58e){ret=this._adjustNodeAndOffset(rs,_58e);rs=ret.node;_58e=ret.offset;}txt=rs.nodeValue;_588=doc.createTextNode(txt.substring(0,_58e));_589=doc.createTextNode(txt.substring(_58e));_58a=doc.createElement("br");if(!_589.length){_589=doc.createTextNode(" ");_58d=true;}if(_588.length){_4.place(_588,rs,"after");}else{_588=rs;}_4.place(_58a,_588,"after");_4.place(_589,_58a,"after");_4.destroy(rs);_587=_5.range.create(_4.gobal);_587.setStart(_589,0);_587.setEnd(_589,_589.length);_585.removeAllRanges();_585.addRange(_587);if(_58d&&!_4.isWebKit){_5._editor.selection.remove();}else{_5._editor.selection.collapse(true);}}));}else{_4.withGlobal(this.editor.window,_4.hitch(this,function(){var _58f=doc.createElement("br");rs.appendChild(_58f);var _590=doc.createTextNode(" ");rs.appendChild(_590);_587=_5.range.create(_4.global);_587.setStart(_590,0);_587.setEnd(_590,_590.length);_585.removeAllRanges();_585.addRange(_587);_5._editor.selection.collapse(true);}));}}}else{_5._editor.RichText.prototype.execCommand.call(this.editor,"inserthtml","<br>");}}return false;}var _591=true;_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);if(!_586.collapsed){_586.deleteContents();_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);}var _592=_5.range.getBlockAncestor(_586.endContainer,null,this.editor.editNode);var _593=_592.blockNode;if((this._checkListLater=(_593&&(_593.nodeName=="LI"||_593.parentNode.nodeName=="LI")))){if(_4.isMoz){this._pressedEnterInBlock=_593;}if(/^(\s|&nbsp;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|\xA0)<\/span>)?(<br>)?$/.test(_593.innerHTML)){_593.innerHTML="";if(_4.isWebKit){_587=_5.range.create(this.editor.window);_587.setStart(_593,0);_585.removeAllRanges();_585.addRange(_587);}this._checkListLater=false;}return true;}if(!_592.blockNode||_592.blockNode===this.editor.editNode){try{_5._editor.RichText.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_592={blockNode:_4.withGlobal(this.editor.window,"getAncestorElement",_5._editor.selection,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_592.blockNode){if(_592.blockNode!=this.editor.editNode&&(!(_592.blockNode.textContent||_592.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_592.blockNode);return false;}}else{_592.blockNode=this.editor.editNode;}_585=_5.range.getSelection(this.editor.window);_586=_585.getRangeAt(0);}var _594=doc.createElement(this.blockNodeForEnter);_594.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_592.blockNode);var _595=_586.endOffset;var node=_586.endContainer;if(node.length<_595){var ret=this._adjustNodeAndOffset(node,_595);node=ret.node;_595=ret.offset;}if(_5.range.atEndOfContainer(_592.blockNode,node,_595)){if(_592.blockNode===_592.blockContainer){_592.blockNode.appendChild(_594);}else{_4.place(_594,_592.blockNode,"after");}_591=false;_587=_5.range.create(this.editor.window);_587.setStart(_594,0);_585.removeAllRanges();_585.addRange(_587);if(this.editor.height){_4.window.scrollIntoView(_594);}}else{if(_5.range.atBeginningOfContainer(_592.blockNode,_586.startContainer,_586.startOffset)){_4.place(_594,_592.blockNode,_592.blockNode===_592.blockContainer?"first":"before");if(_594.nextSibling&&this.editor.height){_587=_5.range.create(this.editor.window);_587.setStart(_594.nextSibling,0);_585.removeAllRanges();_585.addRange(_587);_4.window.scrollIntoView(_594.nextSibling);}_591=false;}else{if(_592.blockNode===_592.blockContainer){_592.blockNode.appendChild(_594);}else{_4.place(_594,_592.blockNode,"after");}_591=false;if(_592.blockNode.style){if(_594.style){if(_592.blockNode.style.cssText){_594.style.cssText=_592.blockNode.style.cssText;}}}rs=_586.startContainer;var _596;if(rs&&rs.nodeType==3){var _597,_598;_595=_586.endOffset;if(rs.length<_595){ret=this._adjustNodeAndOffset(rs,_595);rs=ret.node;_595=ret.offset;}txt=rs.nodeValue;_588=doc.createTextNode(txt.substring(0,_595));_589=doc.createTextNode(txt.substring(_595,txt.length));_4.place(_588,rs,"before");_4.place(_589,rs,"after");_4.destroy(rs);var _599=_588.parentNode;while(_599!==_592.blockNode){var tg=_599.tagName;var _59a=doc.createElement(tg);if(_599.style){if(_59a.style){if(_599.style.cssText){_59a.style.cssText=_599.style.cssText;}}}if(_599.tagName==="FONT"){if(_599.color){_59a.color=_599.color;}if(_599.face){_59a.face=_599.face;}if(_599.size){_59a.size=_599.size;}}_597=_589;while(_597){_598=_597.nextSibling;_59a.appendChild(_597);_597=_598;}_4.place(_59a,_599,"after");_588=_599;_589=_59a;_599=_599.parentNode;}_597=_589;if(_597.nodeType==1||(_597.nodeType==3&&_597.nodeValue)){_594.innerHTML="";}_596=_597;while(_597){_598=_597.nextSibling;_594.appendChild(_597);_597=_598;}}_587=_5.range.create(this.editor.window);var _59b;var _59c=_596;if(this.blockNodeForEnter!=="BR"){while(_59c){_59b=_59c;_598=_59c.firstChild;_59c=_598;}if(_59b&&_59b.parentNode){_594=_59b.parentNode;_587.setStart(_594,0);_585.removeAllRanges();_585.addRange(_587);if(this.editor.height){_5.scrollIntoView(_594);}if(_4.isMoz){this._pressedEnterInBlock=_592.blockNode;}}else{_591=true;}}else{_587.setStart(_594,0);_585.removeAllRanges();_585.addRange(_587);if(this.editor.height){_5.scrollIntoView(_594);}if(_4.isMoz){this._pressedEnterInBlock=_592.blockNode;}}}}return _591;},_adjustNodeAndOffset:function(node,_59d){while(node.length<_59d&&node.nextSibling&&node.nextSibling.nodeType==3){_59d=_59d-node.length;node=node.nextSibling;}var ret={"node":node,"offset":_59d};return ret;},removeTrailingBr:function(_59e){var para=/P|DIV|LI/i.test(_59e.tagName)?_59e:_5._editor.selection.getParentOfType(_59e,["P","DIV","LI"]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){_4.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}}});}if(!_4._hasResource["dijit._Contained"]){_4._hasResource["dijit._Contained"]=true;_4.provide("dijit._Contained");_4.declare("dijit._Contained",null,{getParent:function(){var _59f=_5.getEnclosingWidget(this.domNode.parentNode);return _59f&&_59f.isContainer?_59f:null;},_getSibling:function(_5a0){var node=this.domNode;do{node=node[_5a0+"Sibling"];}while(node&&node.nodeType!=1);return node&&_5.byNode(node);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});}if(!_4._hasResource["dijit.layout._LayoutWidget"]){_4._hasResource["dijit.layout._LayoutWidget"]=true;_4.provide("dijit.layout._LayoutWidget");_4.declare("dijit.layout._LayoutWidget",[_5._Widget,_5._Container,_5._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);_4.addClass(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this.inherited(arguments);var _5a1=this.getParent&&this.getParent();if(!(_5a1&&_5a1.isLayoutContainer)){this.resize();this.connect(_4.isIE?this.domNode:_4.global,"onresize",function(){this.resize();});}},resize:function(_5a2,_5a3){var node=this.domNode;if(_5a2){_4.marginBox(node,_5a2);if(_5a2.t){node.style.top=_5a2.t+"px";}if(_5a2.l){node.style.left=_5a2.l+"px";}}var mb=_5a3||{};_4.mixin(mb,_5a2||{});if(!("h" in mb)||!("w" in mb)){mb=_4.mixin(_4.marginBox(node),mb);}var cs=_4.getComputedStyle(node);var me=_4._getMarginExtents(node,cs);var be=_4._getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=_4._getPadExtents(node,cs);this._contentBox={l:_4._toPixelValue(node,cs.paddingLeft),t:_4._toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_5a4){var cls=this.baseClass+"-child "+(_5a4.baseClass?this.baseClass+"-"+_5a4.baseClass:"");_4.addClass(_5a4.domNode,cls);},addChild:function(_5a5,_5a6){this.inherited(arguments);if(this._started){this._setupChild(_5a5);}},removeChild:function(_5a7){var cls=this.baseClass+"-child"+(_5a7.baseClass?" "+this.baseClass+"-"+_5a7.baseClass:"");_4.removeClass(_5a7.domNode,cls);this.inherited(arguments);}});_5.layout.marginBox2contentBox=function(node,mb){var cs=_4.getComputedStyle(node);var me=_4._getMarginExtents(node,cs);var pb=_4._getPadBorderExtents(node,cs);return {l:_4._toPixelValue(node,cs.paddingLeft),t:_4._toPixelValue(node,cs.paddingTop),w:mb.w-(me.w+pb.w),h:mb.h-(me.h+pb.h)};};(function(){var _5a8=function(word){return word.substring(0,1).toUpperCase()+word.substring(1);};var size=function(_5a9,dim){var _5aa=_5a9.resize?_5a9.resize(dim):_4.marginBox(_5a9.domNode,dim);if(_5aa){_4.mixin(_5a9,_5aa);}else{_4.mixin(_5a9,_4.marginBox(_5a9.domNode));_4.mixin(_5a9,dim);}};_5.layout.layoutChildren=function(_5ab,dim,_5ac,_5ad,_5ae){dim=_4.mixin({},dim);_4.addClass(_5ab,"dijitLayoutContainer");_5ac=_4.filter(_5ac,function(item){return item.region!="center"&&item.layoutAlign!="client";}).concat(_4.filter(_5ac,function(item){return item.region=="center"||item.layoutAlign=="client";}));_4.forEach(_5ac,function(_5af){var elm=_5af.domNode,pos=(_5af.region||_5af.layoutAlign);var _5b0=elm.style;_5b0.left=dim.l+"px";_5b0.top=dim.t+"px";_5b0.position="absolute";_4.addClass(elm,"dijitAlign"+_5a8(pos));var _5b1={};if(_5ad&&_5ad==_5af.id){_5b1[_5af.region=="top"||_5af.region=="bottom"?"h":"w"]=_5ae;}if(pos=="top"||pos=="bottom"){_5b1.w=dim.w;size(_5af,_5b1);dim.h-=_5af.h;if(pos=="top"){dim.t+=_5af.h;}else{_5b0.top=dim.t+dim.h+"px";}}else{if(pos=="left"||pos=="right"){_5b1.h=dim.h;size(_5af,_5b1);dim.w-=_5af.w;if(pos=="left"){dim.l+=_5af.w;}else{_5b0.left=dim.l+dim.w+"px";}}else{if(pos=="client"||pos=="center"){size(_5af,dim);}}}});};})();}if(!_4._hasResource["dijit.Editor"]){_4._hasResource["dijit.Editor"]=true;_4.provide("dijit.Editor");_4.declare("dijit.Editor",_5._editor.RichText,{plugins:null,extraPlugins:null,constructor:function(){if(!_4.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","dijit._editor.plugins.EnterKeyHandling"];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(_4.isIE){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postMixInProperties:function(){this.setValueDeferred=new _4.Deferred();this.inherited(arguments);},postCreate:function(){this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);if(_4.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=_4.i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new _5.Toolbar({dir:this.dir,lang:this.lang});this.header.appendChild(this.toolbar.domNode);}_4.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.callback(true);_4.addClass(this.iframe.parentNode,"dijitEditorIFrameContainer");_4.addClass(this.iframe,"dijitEditorIFrame");_4.attr(this.iframe,"allowTransparency",true);if(_4.isWebKit){_4.style(this.domNode,"KhtmlUserSelect","none");}this.toolbar.startup();this.onNormalizedDisplayChanged();},destroy:function(){_4.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_5b2,_5b3){var args=_4.isString(_5b2)?{name:_5b2}:_5b2;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};_4.publish(_5._scopeName+".Editor.getPlugin",[o]);if(!o.plugin){var pc=_4.getObject(args.name);if(pc){o.plugin=new pc(args);}}if(!o.plugin){console.warn("Cannot find plugin",_5b2);return;}_5b2=o.plugin;}if(arguments.length>1){this._plugins[_5b3]=_5b2;}else{this._plugins.push(_5b2);}_5b2.setEditor(this);if(_4.isFunction(_5b2.setToolbar)){_5b2.setToolbar(this.toolbar);}},startup:function(){},resize:function(size){if(size){_5.layout._LayoutWidget.prototype.resize.apply(this,arguments);}},layout:function(){var _5b4=(this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+_4._getPadBorderExtents(this.iframe.parentNode).h+_4._getMarginExtents(this.iframe.parentNode).h));this.editingArea.style.height=_5b4+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _5b5;var b=this.document.body;var _5b6=b.clientWidth;var _5b7=b.clientHeight;var _5b8=b.clientLeft;var _5b9=b.offsetWidth;var _5ba=b.offsetHeight;var _5bb=b.offsetLeft;bodyDir=b.dir?b.dir.toLowerCase():"";if(bodyDir!="rtl"){if(_5b6<_5b9&&e.x>_5b6&&e.x<_5b9){_5b5=true;}}else{if(e.x<_5b8&&e.x>_5bb){_5b5=true;}}if(!_5b5){if(_5b7<_5ba&&e.y>_5b7&&e.y<_5ba){_5b5=true;}}if(!_5b5){delete this._cursorToStart;delete this._savedSelection;if(e.target.tagName=="BODY"){setTimeout(_4.hitch(this,"placeCursorAtEnd"),0);}this.inherited(arguments);}},onBeforeActivate:function(e){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:true,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){clearTimeout(this._editTimer);}this._editTimer=setTimeout(_4.hitch(this,this.endEditing),this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r;var _5bc=/copy|cut|paste/.test(cmd);try{r=this.inherited(arguments);if(_4.isWebKit&&_5bc&&!r){throw {code:1011};}}catch(e){if(e.code==1011&&_5bc){var sub=_4.string.substitute,_5bd={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[_4.isMac?"appleKey":"ctrlKey"],[_5bd[cmd]])]));}r=false;}if(this.customUndo){this._endEditing();}return r;}},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited(arguments);}},_moveToBookmark:function(b){var _5be=b.mark;var mark=b.mark;var col=b.isCollapsed;var r,_5bf,_5c0,sel;if(mark){if(_4.isIE<9){if(_4.isArray(mark)){_5be=[];_4.forEach(mark,function(n){_5be.push(_5.range.getNode(n,this.editNode));},this);_4.withGlobal(this.window,"moveToBookmark",_5,[{mark:_5be,isCollapsed:col}]);}else{if(mark.startContainer&&mark.endContainer){sel=_5.range.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_5.range.create(this.window);_5bf=_5.range.getNode(mark.startContainer,this.editNode);_5c0=_5.range.getNode(mark.endContainer,this.editNode);if(_5bf&&_5c0){r.setStart(_5bf,mark.startOffset);r.setEnd(_5c0,mark.endOffset);sel.addRange(r);}}}}}else{sel=_5.range.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_5.range.create(this.window);_5bf=_5.range.getNode(mark.startContainer,this.editNode);_5c0=_5.range.getNode(mark.endContainer,this.editNode);if(_5bf&&_5c0){r.setStart(_5bf,mark.startOffset);r.setEnd(_5c0,mark.endOffset);sel.addRange(r);}}}}},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._steps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();delete this._undoRedoActive;ret=true;}delete this._undoRedoActive;}return ret;},redo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();ret=true;}delete this._undoRedoActive;}return ret;},endEditing:function(_5c1){if(this._editTimer){clearTimeout(this._editTimer);}if(this._inEditing){this._endEditing(_5c1);this._inEditing=false;}},_getBookmark:function(){var b=_4.withGlobal(this.window,_5.getBookmark);var tmp=[];if(b&&b.mark){var mark=b.mark;if(_4.isIE<9){var sel=_5.range.getSelection(this.window);if(!_4.isArray(mark)){if(sel){var _5c2;if(sel.rangeCount){_5c2=sel.getRangeAt(0);}if(_5c2){b.mark=_5c2.cloneRange();}else{b.mark=_4.withGlobal(this.window,_5.getBookmark);}}}else{_4.forEach(b.mark,function(n){tmp.push(_5.range.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}try{if(b.mark&&b.mark.startContainer){tmp=_5.range.getIndex(b.mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:b.mark.startOffset,endContainer:b.mark.endContainer===b.mark.startContainer?tmp:_5.range.getIndex(b.mark.endContainer,this.editNode).o,endOffset:b.mark.endOffset};}}catch(e){b.mark=null;}}return b;},_beginEditing:function(cmd){if(this._steps.length===0){this._steps.push({"text":_5._editor.getChildrenHtml(this.editNode),"bookmark":this._getBookmark()});}},_endEditing:function(_5c3){var v=_5._editor.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!_4.isIE&&!this.iframe&&e.keyCode==_4.keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode,ks=_4.keys;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){_4.stopEvent(e);this.undo();return;}else{if(k==89||k==121){_4.stopEvent(e);this.redo();return;}}}this.inherited(arguments);switch(k){case ks.ENTER:case ks.BACKSPACE:case ks.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");setTimeout(_4.hitch(this,this.endEditing),1);}else{this.beginEditing("paste");setTimeout(_4.hitch(this,this.endEditing),1);}break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<_4.keys.F1||e.keyCode>_4.keys.F15)){this.beginEditing();break;}case ks.ALT:this.endEditing();break;case ks.UP_ARROW:case ks.DOWN_ARROW:case ks.LEFT_ARROW:case ks.RIGHT_ARROW:case ks.HOME:case ks.END:case ks.PAGE_UP:case ks.PAGE_DOWN:this.endEditing(true);break;case ks.CTRL:case ks.SHIFT:case ks.TAB:break;}},_onBlur:function(){this.inherited(arguments);this.endEditing(true);},_saveSelection:function(){try{this._savedSelection=this._getBookmark();}catch(e){}},_restoreSelection:function(){if(this._savedSelection){delete this._cursorToStart;if(_4.withGlobal(this.window,"isCollapsed",_5)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);},replaceValue:function(html){if(!this.customUndo){this.inherited(arguments);}else{if(this.isClosed){this.setValue(html);}else{this.beginEditing();if(!html){html="&nbsp;";}this.setValue(html);this.endEditing();}}},_setDisabledAttr:function(_5c4){var _5c5=_4.hitch(this,function(){if((!this.disabled&&_5c4)||(!this._buttonEnabledPlugins&&_5c4)){_4.forEach(this._plugins,function(p){p.set("disabled",true);});}else{if(this.disabled&&!_5c4){_4.forEach(this._plugins,function(p){p.set("disabled",false);});}}});this.setValueDeferred.addCallback(_5c5);this.inherited(arguments);},_setStateClass:function(){try{this.inherited(arguments);if(this.document&&this.document.body){_4.style(this.document.body,"color",_4.style(this.iframe,"color"));}}catch(e){}}});_4.subscribe(_5._scopeName+".Editor.getPlugin",null,function(o){if(o.plugin){return;}var args=o.args,p;var _5c6=_5._editor._Plugin;var name=args.name;switch(name){case "undo":case "redo":case "cut":case "copy":case "paste":case "insertOrderedList":case "insertUnorderedList":case "indent":case "outdent":case "justifyCenter":case "justifyFull":case "justifyLeft":case "justifyRight":case "delete":case "selectAll":case "removeFormat":case "unlink":case "insertHorizontalRule":p=new _5c6({command:name});break;case "bold":case "italic":case "underline":case "strikethrough":case "subscript":case "superscript":p=new _5c6({buttonClass:_5.form.ToggleButton,command:name});break;case "|":p=new _5c6({button:new _5.ToolbarSeparator(),setEditor:function(_5c7){this.editor=_5c7;}});}o.plugin=p;});}if(!_4._hasResource["dijit.layout._ContentPaneResizeMixin"]){_4._hasResource["dijit.layout._ContentPaneResizeMixin"]=true;_4.provide("dijit.layout._ContentPaneResizeMixin");_4.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){_4.forEach(this.getChildren(),function(_5c8){_5c8.startup();_5c8._started=true;});},startup:function(){if(this._started){return;}var _5c9=_5._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=_5c9&&_5c9.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._startChildren();if(this._isShown()){this._onShow();}if(!this._childOfLayoutWidget){this.connect(_4.isIE?this.domNode:_4.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize();});}},_checkIfSingleChild:function(){var _5ca=_4.query("> *",this.containerNode).filter(function(node){return node.tagName!=="SCRIPT";}),_5cb=_5ca.filter(function(node){return _4.hasAttr(node,"data-dojo-type")||_4.hasAttr(node,"dojoType")||_4.hasAttr(node,"widgetId");}),_5cc=_4.filter(_5cb.map(_5.byNode),function(_5cd){return _5cd&&_5cd.domNode&&_5cd.resize;});if(_5ca.length==_5cb.length&&_5cc.length==1){this._singleChild=_5cc[0];}else{delete this._singleChild;}_4.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild);},resize:function(_5ce,_5cf){if(!this._wasShown&&this.open!==false){this._onShow();}this._resizeCalled=true;this._scheduleLayout(_5ce,_5cf);},_scheduleLayout:function(_5d0,_5d1){if(this._isShown()){this._layout(_5d0,_5d1);}else{this._needLayout=true;this._changeSize=_5d0;this._resultSize=_5d1;}},_layout:function(_5d2,_5d3){if(_5d2){_4.marginBox(this.domNode,_5d2);}var cn=this.containerNode;if(cn===this.domNode){var mb=_5d3||{};_4.mixin(mb,_5d2||{});if(!("h" in mb)||!("w" in mb)){mb=_4.mixin(_4.marginBox(cn),mb);}this._contentBox=_5.layout.marginBox2contentBox(cn,mb);}else{this._contentBox=_4.contentBox(cn);}this._layoutChildren();delete this._needLayout;},_layoutChildren:function(){if(this.doLayout){this._checkIfSingleChild();}if(this._singleChild&&this._singleChild.resize){var cb=this._contentBox||_4.contentBox(this.containerNode);this._singleChild.resize({w:cb.w,h:cb.h});}else{_4.forEach(this.getChildren(),function(_5d4){if(_5d4.resize){_5d4.resize();}});}},_isShown:function(){if(this._childOfLayoutWidget){if(this._resizeCalled&&"open" in this){return this.open;}return this._resizeCalled;}else{if("open" in this){return this.open;}else{var node=this.domNode,_5d5=this.domNode.parentNode;return (node.style.display!="none")&&(node.style.visibility!="hidden")&&!_4.hasClass(node,"dijitHidden")&&_5d5&&_5d5.style&&(_5d5.style.display!="none");}}},_onShow:function(){if(this._needLayout){this._layout(this._changeSize,this._resultSize);}this.inherited(arguments);this._wasShown=true;}});}if(!_4._hasResource["dojo.html"]){_4._hasResource["dojo.html"]=true;_4.provide("dojo.html");_4.getObject("html",true,_4);(function(){var _5d6=0,d=_4;_4.html._secureForInnerHtml=function(cont){return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");};_4.html._emptyNode=_4.empty;_4.html._setNodeContent=function(node,cont){d.empty(node);if(cont){if(typeof cont=="string"){cont=d._toDom(cont,node.ownerDocument);}if(!cont.nodeType&&d.isArrayLike(cont)){for(var _5d7=cont.length,i=0;i<cont.length;i=_5d7==cont.length?i+1:0){d.place(cont[i],node,"last");}}else{d.place(cont,node,"last");}}return node;};_4.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:_4._scopeName,startup:true,constructor:function(_5d8,node){_4.mixin(this,_5d8||{});node=this.node=_4.byId(this.node||node);if(!this.id){this.id=["Setter",(node)?node.id||node.tagName:"",_5d6++].join("_");}},set:function(cont,_5d9){if(undefined!==cont){this.content=cont;}if(_5d9){this._mixin(_5d9);}this.onBegin();this.setContent();this.onEnd();return this.node;},setContent:function(){var node=this.node;if(!node){throw new Error(this.declaredClass+": setContent given no node");}try{node=_4.html._setNodeContent(node,this.content);}catch(e){var _5da=this.onContentError(e);try{node.innerHTML=_5da;}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);}}this.node=node;},empty:function(){if(this.parseResults&&this.parseResults.length){_4.forEach(this.parseResults,function(w){if(w.destroy){w.destroy();}});delete this.parseResults;}_4.html._emptyNode(this.node);},onBegin:function(){var cont=this.content;if(_4.isString(cont)){if(this.cleanContent){cont=_4.html._secureForInnerHtml(cont);}if(this.extractContent){var _5db=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_5db){cont=_5db[1];}}}this.empty();this.content=cont;return this.node;},onEnd:function(){if(this.parseContent){this._parse();}return this.node;},tearDown:function(){delete this.parseResults;delete this.node;delete this.content;},onContentError:function(err){return "Error occured setting content: "+err;},_mixin:function(_5dc){var _5dd={},key;for(key in _5dc){if(key in _5dd){continue;}this[key]=_5dc[key];}},_parse:function(){var _5de=this.node;try{var _5df={};_4.forEach(["dir","lang","textDir"],function(name){if(this[name]){_5df[name]=this[name];}},this);this.parseResults=_4.parser.parse({rootNode:_5de,noStart:!this.startup,inherited:_5df,scope:this.parserScope});}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(type,err,_5e0){var _5e1=this["on"+type+"Error"].call(this,err);if(_5e0){console.error(_5e0,err);}else{if(_5e1){_4.html._setNodeContent(this.node,_5e1,true);}}}});_4.html.set=function(node,cont,_5e2){if(undefined==cont){console.warn("dojo.html.set: no cont argument provided, using empty string");cont="";}if(!_5e2){return _4.html._setNodeContent(node,cont,true);}else{var op=new _4.html._ContentSetter(_4.mixin(_5e2,{content:cont,node:node}));return op.set();}};})();}if(!_4._hasResource["dijit.layout.ContentPane"]){_4._hasResource["dijit.layout.ContentPane"]=true;_4.provide("dijit.layout.ContentPane");_4.declare("dijit.layout.ContentPane",[_5._Widget,_5.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:_4._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:_4.delegate(_5._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(_5e3,_5e4){if((!_5e3||!_5e3.template)&&_5e4&&!("href" in _5e3)&&!("content" in _5e3)){var df=_4.doc.createDocumentFragment();_5e4=_4.byId(_5e4);while(_5e4.firstChild){df.appendChild(_5e4.firstChild);}_5e3=_4.delegate(_5e3,{content:df});}this.inherited(arguments,[_5e3,_5e4]);},postMixInProperties:function(){this.inherited(arguments);var _5e5=_4.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_4.string.substitute(this.loadingMessage,_5e5);this.errorMessage=_4.string.substitute(this.errorMessage,_5e5);},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}this.domNode.title="";if(!_4.attr(this.domNode,"role")){_5.setWaiRole(this.domNode,"group");}},_startChildren:function(){this.inherited(arguments);if(this._contentSetter){_4.forEach(this._contentSetter.parseResults,function(obj){if(!obj._started&&!obj._destroyed&&_4.isFunction(obj.startup)){obj.startup();obj._started=true;}},this);}},setHref:function(href){_4.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",href);},_setHrefAttr:function(href){this.cancel();this.onLoadDeferred=new _4.Deferred(_4.hitch(this,"cancel"));this.onLoadDeferred.addCallback(_4.hitch(this,"onLoad"));this._set("href",href);if(this.preload||(this._created&&this._isShown())){this._load();}else{this._hrefChanged=true;}return this.onLoadDeferred;},setContent:function(data){_4.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",data);},_setContentAttr:function(data){this._set("href","");this.cancel();this.onLoadDeferred=new _4.Deferred(_4.hitch(this,"cancel"));if(this._created){this.onLoadDeferred.addCallback(_4.hitch(this,"onLoad"));}this._setContent(data||"");this._isDownloaded=false;return this.onLoadDeferred;},_getContentAttr:function(){return this.containerNode.innerHTML;},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;this.onLoadDeferred=null;},uninitialize:function(){if(this._beingDestroyed){this.cancel();}this.inherited(arguments);},destroyRecursive:function(_5e6){if(this._beingDestroyed){return;}this.inherited(arguments);},_onShow:function(){this.inherited(arguments);if(this.href){if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){return this.refresh();}}},refresh:function(){this.cancel();this.onLoadDeferred=new _4.Deferred(_4.hitch(this,"cancel"));this.onLoadDeferred.addCallback(_4.hitch(this,"onLoad"));this._load();return this.onLoadDeferred;},_load:function(){this._setContent(this.onDownloadStart(),true);var self=this;var _5e7={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(_4.isObject(this.ioArgs)){_4.mixin(_5e7,this.ioArgs);}var hand=(this._xhrDfd=(this.ioMethod||_4.xhrGet)(_5e7));hand.addCallback(function(html){try{self._isDownloaded=true;self._setContent(html,false);self.onDownloadEnd();}catch(err){self._onError("Content",err);}delete self._xhrDfd;return html;});hand.addErrback(function(err){if(!hand.canceled){self._onError("Download",err);}delete self._xhrDfd;return err;});delete this._hrefChanged;},_onLoadHandler:function(data){this._set("isLoaded",true);try{this.onLoadDeferred.callback(data);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);}},_onUnloadHandler:function(){this._set("isLoaded",false);try{this.onUnload();}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);}},destroyDescendants:function(){if(this.isLoaded){this._onUnloadHandler();}var _5e8=this._contentSetter;_4.forEach(this.getChildren(),function(_5e9){if(_5e9.destroyRecursive){_5e9.destroyRecursive();}});if(_5e8){_4.forEach(_5e8.parseResults,function(_5ea){if(_5ea.destroyRecursive&&_5ea.domNode&&_5ea.domNode.parentNode==_4.body()){_5ea.destroyRecursive();}});delete _5e8.parseResults;}_4.html._emptyNode(this.containerNode);delete this._singleChild;},_setContent:function(cont,_5eb){this.destroyDescendants();var _5ec=this._contentSetter;if(!(_5ec&&_5ec instanceof _4.html._ContentSetter)){_5ec=this._contentSetter=new _4.html._ContentSetter({node:this.containerNode,_onError:_4.hitch(this,this._onError),onContentError:_4.hitch(this,function(e){var _5ed=this.onContentError(e);try{this.containerNode.innerHTML=_5ed;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}var _5ee=_4.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});_5ec.set((_4.isObject(cont)&&cont.domNode)?cont.domNode:cont,_5ee);delete this._contentSetterParams;if(this.doLayout){this._checkIfSingleChild();}if(!_5eb){if(this._started){this._startChildren();this._scheduleLayout();}this._onLoadHandler(cont);}},_onError:function(type,err,_5ef){this.onLoadDeferred.errback(err);var _5f0=this["on"+type+"Error"].call(this,err);if(_5ef){console.error(_5ef,err);}else{if(_5f0){this._setContent(_5f0,true);}}},onLoad:function(data){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_5f1){},onDownloadError:function(_5f2){return this.errorMessage;},onDownloadEnd:function(){}});}if(!_4._hasResource["dijit.form._FormMixin"]){_4._hasResource["dijit.form._FormMixin"]=true;_4.provide("dijit.form._FormMixin");_4.declare("dijit.form._FormMixin",null,{state:"",reset:function(){_4.forEach(this.getDescendants(),function(_5f3){if(_5f3.reset){_5f3.reset();}});},validate:function(){var _5f4=false;return _4.every(_4.map(this.getDescendants(),function(_5f5){_5f5._hasBeenBlurred=true;var _5f6=_5f5.disabled||!_5f5.validate||_5f5.validate();if(!_5f6&&!_5f4){_4.window.scrollIntoView(_5f5.containerNode||_5f5.domNode);_5f5.focus();_5f4=true;}return _5f6;}),function(item){return item;});},setValues:function(val){_4.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",val);},_setValueAttr:function(obj){var map={};_4.forEach(this.getDescendants(),function(_5f7){if(!_5f7.name){return;}var _5f8=map[_5f7.name]||(map[_5f7.name]=[]);_5f8.push(_5f7);});for(var name in map){if(!map.hasOwnProperty(name)){continue;}var _5f9=map[name],_5fa=_4.getObject(name,false,obj);if(_5fa===undefined){continue;}if(!_4.isArray(_5fa)){_5fa=[_5fa];}if(typeof _5f9[0].checked=="boolean"){_4.forEach(_5f9,function(w,i){w.set("value",_4.indexOf(_5fa,w.value)!=-1);});}else{if(_5f9[0].multiple){_5f9[0].set("value",_5fa);}else{_4.forEach(_5f9,function(w,i){w.set("value",_5fa[i]);});}}}},getValues:function(){_4.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value");},_getValueAttr:function(){var obj={};_4.forEach(this.getDescendants(),function(_5fb){var name=_5fb.name;if(!name||_5fb.disabled){return;}var _5fc=_5fb.get("value");if(typeof _5fb.checked=="boolean"){if(/Radio/.test(_5fb.declaredClass)){if(_5fc!==false){_4.setObject(name,_5fc,obj);}else{_5fc=_4.getObject(name,false,obj);if(_5fc===undefined){_4.setObject(name,null,obj);}}}else{var ary=_4.getObject(name,false,obj);if(!ary){ary=[];_4.setObject(name,ary,obj);}if(_5fc!==false){ary.push(_5fc);}}}else{var prev=_4.getObject(name,false,obj);if(typeof prev!="undefined"){if(_4.isArray(prev)){prev.push(_5fc);}else{_4.setObject(name,[prev,_5fc],obj);}}else{_4.setObject(name,_5fc,obj);}}});return obj;},isValid:function(){return this.state=="";},onValidStateChange:function(_5fd){},_getState:function(){var _5fe=_4.map(this._descendants,function(w){return w.get("state")||"";});return _4.indexOf(_5fe,"Error")>=0?"Error":_4.indexOf(_5fe,"Incomplete")>=0?"Incomplete":"";},disconnectChildren:function(){_4.forEach(this._childConnections||[],_4.hitch(this,"disconnect"));_4.forEach(this._childWatches||[],function(w){w.unwatch();});},connectChildren:function(_5ff){var _600=this;this.disconnectChildren();this._descendants=this.getDescendants();var set=_5ff?function(name,val){_600[name]=val;}:_4.hitch(this,"_set");set("value",this.get("value"));set("state",this._getState());var _601=(this._childConnections=[]),_602=(this._childWatches=[]);_4.forEach(_4.filter(this._descendants,function(item){return item.validate;}),function(_603){_4.forEach(["state","disabled"],function(attr){_602.push(_603.watch(attr,function(attr,_604,_605){_600.set("state",_600._getState());}));});});var _606=function(){if(_600._onChangeDelayTimer){clearTimeout(_600._onChangeDelayTimer);}_600._onChangeDelayTimer=setTimeout(function(){delete _600._onChangeDelayTimer;_600._set("value",_600.get("value"));},10);};_4.forEach(_4.filter(this._descendants,function(item){return item.onChange;}),function(_607){_601.push(_600.connect(_607,"onChange",_606));_602.push(_607.watch("disabled",_606));});},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(attr,_608,_609){this.onValidStateChange(_609=="");});},destroy:function(){this.disconnectChildren();this.inherited(arguments);}});}if(!_4._hasResource["dijit._DialogMixin"]){_4._hasResource["dijit._DialogMixin"]=true;_4.provide("dijit._DialogMixin");_4.declare("dijit._DialogMixin",null,{attributeMap:_5._Widget.prototype.attributeMap,execute:function(_60a){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"));},_getFocusItems:function(){var _60b=_5._getTabNavigable(this.containerNode);this._firstFocusItem=_60b.lowest||_60b.first||this.closeButtonNode||this.domNode;this._lastFocusItem=_60b.last||_60b.highest||this._firstFocusItem;}});}if(!_4._hasResource["dijit.TooltipDialog"]){_4._hasResource["dijit.TooltipDialog"]=true;_4.provide("dijit.TooltipDialog");_4.declare("dijit.TooltipDialog",[_5.layout.ContentPane,_5._Templated,_5.form._FormMixin,_5._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:_4.cache("dijit","templates/TooltipDialog.html","<div role=\"presentation\" tabIndex=\"-1\">\r\n\t<div class=\"dijitTooltipContainer\" role=\"presentation\">\r\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" role=\"dialog\"></div>\r\n\t</div>\r\n\t<div class=\"dijitTooltipConnector\" role=\"presentation\"></div>\r\n</div>\r\n"),_setTitleAttr:function(_60c){this.containerNode.title=_60c;this._set("title",_60c);},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey");},orient:function(node,_60d,_60e){var newC="dijitTooltipAB"+(_60e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_60e.charAt(0)=="T"?"Below":"Above");_4.replaceClass(this.domNode,newC,this._currentOrientClass||"");this._currentOrientClass=newC;},focus:function(){this._getFocusItems(this.containerNode);_5.focus(this._firstFocusItem);},onOpen:function(pos){this.orient(this.domNode,pos.aroundCorner,pos.corner);this._onShow();},onClose:function(){this.onHide();},_onKey:function(evt){var node=evt.target;var dk=_4.keys;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.containerNode);}var _60f=(this._firstFocusItem==this._lastFocusItem);if(evt.charOrCode==dk.ESCAPE){setTimeout(_4.hitch(this,"onCancel"),0);_4.stopEvent(evt);}else{if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_60f){_5.focus(this._lastFocusItem);}_4.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_60f){_5.focus(this._firstFocusItem);}_4.stopEvent(evt);}else{if(evt.charOrCode===dk.TAB){evt.stopPropagation();}}}}}});}if(!_4._hasResource["dijit.form.DropDownButton"]){_4._hasResource["dijit.form.DropDownButton"]=true;_4.provide("dijit.form.DropDownButton");}if(!_4._hasResource["dijit.form.TextBox"]){_4._hasResource["dijit.form.TextBox"]=true;_4.provide("dijit.form.TextBox");_4.declare("dijit.form.TextBox",_5.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:_4.cache("dijit.form","templates/TextBox.html","<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),_singleNodeTemplate:"<input class=\"dijit dijitReset dijitLeft dijitInputField\" dojoAttachPoint=\"textbox,focusNode\" autocomplete=\"off\" type=\"${type}\" ${!nameAttrSetting} />",_buttonInputDisabled:_4.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:_4.delegate(_5.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),postMixInProperties:function(){var type=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||((type=="hidden"||type=="file")&&this.templateString==_5.form.TextBox.prototype.templateString)){this.templateString=this._singleNodeTemplate;}this.inherited(arguments);},_setPlaceHolderAttr:function(v){this._set("placeHolder",v);if(!this._phspan){this._attachPoints.push("_phspan");this._phspan=_4.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after");}this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(v));this._updatePlaceHolder();},_updatePlaceHolder:function(){if(this._phspan){this._phspan.style.display=(this.placeHolder&&!this._focused&&!this.textbox.value)?"":"none";}},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints);},_setValueAttr:function(_610,_611,_612){var _613;if(_610!==undefined){_613=this.filter(_610);if(typeof _612!="string"){if(_613!==null&&((typeof _613!="number")||!isNaN(_613))){_612=this.filter(this.format(_613,this.constraints));}else{_612="";}}}if(_612!=null&&_612!=undefined&&((typeof _612)!="number"||!isNaN(_612))&&this.textbox.value!=_612){this.textbox.value=_612;this._set("displayedValue",this.get("displayedValue"));}this._updatePlaceHolder();this.inherited(arguments,[_613,_611]);},displayedValue:"",getDisplayedValue:function(){_4.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.","","2.0");return this.get("displayedValue");},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value);},setDisplayedValue:function(_614){_4.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",_614);},_setDisplayedValueAttr:function(_615){if(_615===null||_615===undefined){_615="";}else{if(typeof _615!="string"){_615=String(_615);}}this.textbox.value=_615;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",this.get("displayedValue"));},format:function(_616,_617){return ((_616==null||_616==undefined)?"":(_616.toString?_616.toString():_616));},parse:function(_618,_619){return _618;},_refreshState:function(){},_onInput:function(e){if(e&&e.type&&/key/i.test(e.type)&&e.keyCode){switch(e.keyCode){case _4.keys.SHIFT:case _4.keys.ALT:case _4.keys.CTRL:case _4.keys.TAB:return;}}if(this.intermediateChanges){var _61a=this;setTimeout(function(){_61a._handleOnChange(_61a.get("value"),false);},0);}this._refreshState();this._set("displayedValue",this.get("displayedValue"));},postCreate:function(){if(_4.isIE){setTimeout(_4.hitch(this,function(){var s=_4.getComputedStyle(this.domNode);if(s){var ff=s.fontFamily;if(ff){var _61b=this.domNode.getElementsByTagName("INPUT");if(_61b){for(var i=0;i<_61b.length;i++){_61b[i].style.fontFamily=ff;}}}}}),0);}this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(_4.isMoz||_4.isOpera){this.connect(this.textbox,"oninput","_onInput");}else{this.connect(this.textbox,"onkeydown","_onInput");this.connect(this.textbox,"onkeyup","_onInput");this.connect(this.textbox,"onpaste","_onInput");this.connect(this.textbox,"oncut","_onInput");}},_blankValue:"",filter:function(val){if(val===null){return this._blankValue;}if(typeof val!="string"){return val;}if(this.trim){val=_4.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_setBlurValue:function(){this._setValueAttr(this.get("value"),true);},_onBlur:function(e){if(this.disabled){return;}this._setBlurValue();this.inherited(arguments);if(this._selectOnClickHandle){this.disconnect(this._selectOnClickHandle);}if(this.selectOnClick&&_4.isMoz){this.textbox.selectionStart=this.textbox.selectionEnd=undefined;}this._updatePlaceHolder();},_onFocus:function(by){if(this.disabled||this.readOnly){return;}if(this.selectOnClick&&by=="mouse"){this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var _61c;if(_4.isIE){var _61d=_4.doc.selection.createRange();var _61e=_61d.parentElement();_61c=_61e==this.textbox&&_61d.text.length==0;}else{_61c=this.textbox.selectionStart==this.textbox.selectionEnd;}if(_61c){_5.selectInputText(this.textbox);}});}this._updatePlaceHolder();this.inherited(arguments);this._refreshState();},reset:function(){this.textbox.value="";this.inherited(arguments);}});_5.selectInputText=function(_61f,_620,stop){var _621=_4.global;var _622=_4.doc;_61f=_4.byId(_61f);if(isNaN(_620)){_620=0;}if(isNaN(stop)){stop=_61f.value?_61f.value.length:0;}_5.focus(_61f);if(_622["selection"]&&_4.body()["createTextRange"]){if(_61f.createTextRange){var r=_61f.createTextRange();r.collapse(true);r.moveStart("character",-99999);r.moveStart("character",_620);r.moveEnd("character",stop-_620);r.select();}}else{if(_621["getSelection"]){if(_61f.setSelectionRange){_61f.setSelectionRange(_620,stop);}}}};}if(!_4._hasResource["dijit.Tooltip"]){_4._hasResource["dijit.Tooltip"]=true;_4.provide("dijit.Tooltip");_4.declare("dijit._MasterTooltip",[_5._Widget,_5._Templated],{duration:_5.defaultDuration,templateString:_4.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\r\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" role='alert'></div\r\n\t><div class=\"dijitTooltipConnector\" dojoAttachPoint=\"connectorNode\"></div\r\n></div>\r\n"),postCreate:function(){_4.body().appendChild(this.domNode);this.bgIframe=new _5.BackgroundIframe(this.domNode);this.fadeIn=_4.fadeIn({node:this.domNode,duration:this.duration,onEnd:_4.hitch(this,"_onShow")});this.fadeOut=_4.fadeOut({node:this.domNode,duration:this.duration,onEnd:_4.hitch(this,"_onHide")});},show:function(_623,_624,_625,rtl){if(this.aroundNode&&this.aroundNode===_624){return;}this.domNode.width="auto";if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_623;var pos=_5.placeOnScreenAroundElement(this.domNode,_624,_5.getPopupAroundAlignment((_625&&_625.length)?_625:_5.Tooltip.defaultPosition,!rtl),_4.hitch(this,"orient"));_4.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_624;},orient:function(node,_626,_627,_628,_629){this.connectorNode.style.top="";var _62a=_628.w-this.connectorNode.offsetWidth;node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_626+"-"+_627];this.domNode.style.width="auto";var size=_4.contentBox(this.domNode);var _62b=Math.min((Math.max(_62a,1)),size.w);var _62c=_62b<size.w;this.domNode.style.width=_62b+"px";if(_62c){this.containerNode.style.overflow="auto";var _62d=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(_62d>_62b){_62d=_62d+_4.style(this.domNode,"paddingLeft")+_4.style(this.domNode,"paddingRight");this.domNode.style.width=_62d+"px";}}if(_627.charAt(0)=="B"&&_626.charAt(0)=="B"){var mb=_4.marginBox(node);var _62e=this.connectorNode.offsetHeight;if(mb.h>_628.h){var _62f=_628.h-(_629.h/2)-(_62e/2);this.connectorNode.style.top=_62f+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_629.h/2-_62e/2,0),mb.h-_62e)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,size.w-_62a);},_onShow:function(){if(_4.isIE){this.domNode.style.filter="";}},hide:function(_630){if(this._onDeck&&this._onDeck[1]==_630){this._onDeck=null;}else{if(this.aroundNode===_630){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});_5.showTooltip=function(_631,_632,_633,rtl){if(!_5._masterTT){_5._masterTT=new _5._MasterTooltip();}return _5._masterTT.show(_631,_632,_633,rtl);};_5.hideTooltip=function(_634){if(!_5._masterTT){_5._masterTT=new _5._MasterTooltip();}return _5._masterTT.hide(_634);};_4.declare("dijit.Tooltip",_5._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(_635){_4.forEach(this._connections||[],function(_636){_4.forEach(_636,_4.hitch(this,"disconnect"));},this);var ary=_4.isArrayLike(_635)?_635:(_635?[_635]:[]);this._connections=_4.map(ary,function(id){var node=_4.byId(id);return node?[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")]:[];},this);this._set("connectId",_635);this._connectIds=ary;},addTarget:function(node){var id=node.id||node;if(_4.indexOf(this._connectIds,id)==-1){this.set("connectId",this._connectIds.concat(id));}},removeTarget:function(node){var id=node.id||node,idx=_4.indexOf(this._connectIds,id);if(idx>=0){this._connectIds.splice(idx,1);this.set("connectId",this._connectIds);}},buildRendering:function(){this.inherited(arguments);_4.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;_4.forEach(_4.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _637=e.target;this._showTimer=setTimeout(_4.hitch(this,function(){this.open(_637);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_638){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}_5.showTooltip(this.label||this.domNode.innerHTML,_638,this.position,!this.isLeftToRight());this._connectNode=_638;this.onShow(_638,this.position);},close:function(){if(this._connectNode){_5.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_639,_63a){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});_5.Tooltip.defaultPosition=["after","before"];}if(!_4._hasResource["dijit.form.ValidationTextBox"]){_4._hasResource["dijit.form.ValidationTextBox"]=true;_4.provide("dijit.form.ValidationTextBox");_4.declare("dijit.form.ValidationTextBox",_5.form.TextBox,{templateString:_4.cache("dijit.form","templates/ValidationTextBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class=\"dijitReset dijitInputInner\" dojoAttachPoint='textbox,focusNode' autocomplete=\"off\"\r\n\t\t\t${!nameAttrSetting} type='${type}'\r\n\t/></div\r\n></div>\r\n"),baseClass:"dijitTextBox dijitValidationTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",regExpGen:function(_63b){return this.regExp;},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused);},validator:function(_63c,_63d){return (new RegExp("^(?:"+this.regExpGen(_63d)+")"+(this.required?"":"?")+"$")).test(_63c)&&(!this.required||!this._isEmpty(_63c))&&(this._isEmpty(_63c)||this.parse(_63c,_63d)!==undefined);},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0;},isValid:function(_63e){return this.validator(this.textbox.value,this.constraints);},_isEmpty:function(_63f){return (this.trim?/^\s*$/:/^$/).test(_63f);},getErrorMessage:function(_640){return (this.required&&this._isEmpty(this.textbox.value))?this.missingMessage:this.invalidMessage;},getPromptMessage:function(_641){return this.promptMessage;},_maskValidSubsetError:true,validate:function(_642){var _643="";var _644=this.disabled||this.isValid(_642);if(_644){this._maskValidSubsetError=true;}var _645=this._isEmpty(this.textbox.value);var _646=!_644&&_642&&this._isValidSubset();this._set("state",_644?"":(((((!this._hasBeenBlurred||_642)&&_645)||_646)&&this._maskValidSubsetError)?"Incomplete":"Error"));_5.setWaiState(this.focusNode,"invalid",_644?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=_642&&_646;_643=this.getErrorMessage(_642);}else{if(this.state=="Incomplete"){_643=this.getPromptMessage(_642);this._maskValidSubsetError=!this._hasBeenBlurred||_642;}else{if(_645){_643=this.getPromptMessage(_642);}}}this.set("message",_643);return _644;},displayMessage:function(_647){_5.hideTooltip(this.domNode);if(_647&&this._focused){_5.showTooltip(_647,this.domNode,this.tooltipPosition,!this.isLeftToRight());}},_refreshState:function(){this.validate(this._focused);this.inherited(arguments);},constructor:function(){this.constraints={};},_setConstraintsAttr:function(_648){if(!_648.locale&&this.lang){_648.locale=this.lang;}this._set("constraints",_648);this._computePartialRE();},_computePartialRE:function(){var p=this.regExpGen(this.constraints);this.regExp=p;var _649="";if(p!=".*"){this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){switch(re.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":_649+=re;break;case ")":_649+="|$)";break;default:_649+="(?:"+re+"|$)";break;}});}try{"".search(_649);}catch(e){_649=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp);}this._partialre="^(?:"+_649+")$";},postMixInProperties:function(){this.inherited(arguments);this.messages=_4.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$"){this.invalidMessage=this.messages.invalidMessage;}if(!this.invalidMessage){this.invalidMessage=this.promptMessage;}if(this.missingMessage=="$_unset_$"){this.missingMessage=this.messages.missingMessage;}if(!this.missingMessage){this.missingMessage=this.invalidMessage;}this._setConstraintsAttr(this.constraints);},_setDisabledAttr:function(_64a){this.inherited(arguments);this._refreshState();},_setRequiredAttr:function(_64b){this._set("required",_64b);_5.setWaiState(this.focusNode,"required",_64b);this._refreshState();},_setMessageAttr:function(_64c){this._set("message",_64c);this.displayMessage(_64c);},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments);},_onBlur:function(){this.displayMessage("");this.inherited(arguments);}});_4.declare("dijit.form.MappedTextBox",_5.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},serialize:function(val,_64d){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.get("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=_4.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});_4.declare("dijit.form.RangeBoundTextBox",_5.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(_64e,_64f){return ("min" in _64f?(this.compare(_64e,_64f.min)>=0):true)&&("max" in _64f?(this.compare(_64e,_64f.max)<=0):true);},isInRange:function(_650){return this.rangeCheck(this.get("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.get("value");var _651=false;var _652=false;if("min" in this.constraints){var min=this.constraints.min;min=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min);_651=(typeof min=="number")&&min<0;}if("max" in this.constraints){var max=this.constraints.max;max=this.compare(val,((typeof max!="number")||max>0)?max:0);_652=(typeof max=="number")&&max>0;}return _651||_652;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_653){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_653));},getErrorMessage:function(_654){var v=this.get("value");if(v!==null&&v!==""&&v!==undefined&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_654)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=_4.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},_setConstraintsAttr:function(_655){this.inherited(arguments);if(this.focusNode){if(this.constraints.min!==undefined){_5.setWaiState(this.focusNode,"valuemin",this.constraints.min);}else{_5.removeWaiState(this.focusNode,"valuemin");}if(this.constraints.max!==undefined){_5.setWaiState(this.focusNode,"valuemax",this.constraints.max);}else{_5.removeWaiState(this.focusNode,"valuemax");}}},_setValueAttr:function(_656,_657){_5.setWaiState(this.focusNode,"valuenow",_656);this.inherited(arguments);}});}if(!_4._hasResource["dojo.data.util.sorter"]){_4._hasResource["dojo.data.util.sorter"]=true;_4.provide("dojo.data.util.sorter");_4.getObject("data.util.sorter",true,_4);_4.data.util.sorter.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};_4.data.util.sorter.createSortFunction=function(_658,_659){var _65a=[];function _65b(attr,dir,comp,s){return function(_65c,_65d){var a=s.getValue(_65c,attr);var b=s.getValue(_65d,attr);return dir*comp(a,b);};};var _65e;var map=_659.comparatorMap;var bc=_4.data.util.sorter.basicComparator;for(var i=0;i<_658.length;i++){_65e=_658[i];var attr=_65e.attribute;if(attr){var dir=(_65e.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_65a.push(_65b(attr,dir,comp,_659));}}return function(rowA,rowB){var i=0;while(i<_65a.length){var ret=_65a[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!_4._hasResource["dijit.form._FormSelectWidget"]){_4._hasResource["dijit.form._FormSelectWidget"]=true;_4.provide("dijit.form._FormSelectWidget");_4.declare("dijit.form._FormSelectWidget",_5.form._FormValueWidget,{multiple:false,options:null,store:null,query:null,queryOptions:null,onFetch:null,sortByLabel:true,loadChildrenOnOpen:false,getOptions:function(_65f){var _660=_65f,opts=this.options||[],l=opts.length;if(_660===undefined){return opts;}if(_4.isArray(_660)){return _4.map(_660,"return this.getOptions(item);",this);}if(_4.isObject(_65f)){if(!_4.some(this.options,function(o,idx){if(o===_660||(o.value&&o.value===_660.value)){_660=idx;return true;}return false;})){_660=-1;}}if(typeof _660=="string"){for(var i=0;i<l;i++){if(opts[i].value===_660){_660=i;break;}}}if(typeof _660=="number"&&_660>=0&&_660<l){return this.options[_660];}return null;},addOption:function(_661){if(!_4.isArray(_661)){_661=[_661];}_4.forEach(_661,function(i){if(i&&_4.isObject(i)){this.options.push(i);}},this);this._loadChildren();},removeOption:function(_662){if(!_4.isArray(_662)){_662=[_662];}var _663=this.getOptions(_662);_4.forEach(_663,function(i){if(i){this.options=_4.filter(this.options,function(node,idx){return (node.value!==i.value||node.label!==i.label);});this._removeOptionItem(i);}},this);this._loadChildren();},updateOption:function(_664){if(!_4.isArray(_664)){_664=[_664];}_4.forEach(_664,function(i){var _665=this.getOptions(i),k;if(_665){for(k in i){_665[k]=i[k];}}},this);this._loadChildren();},setStore:function(_666,_667,_668){var _669=this.store;_668=_668||{};if(_669!==_666){_4.forEach(this._notifyConnections||[],_4.disconnect);delete this._notifyConnections;if(_666&&_666.getFeatures()["dojo.data.api.Notification"]){this._notifyConnections=[_4.connect(_666,"onNew",this,"_onNewItem"),_4.connect(_666,"onDelete",this,"_onDeleteItem"),_4.connect(_666,"onSet",this,"_onSetItem")];}this._set("store",_666);}this._onChangeActive=false;if(this.options&&this.options.length){this.removeOption(this.options);}if(_666){this._loadingStore=true;_666.fetch(_4.delegate(_668,{onComplete:function(_66a,opts){if(this.sortByLabel&&!_668.sort&&_66a.length){_66a.sort(_4.data.util.sorter.createSortFunction([{attribute:_666.getLabelAttributes(_66a[0])[0]}],_666));}if(_668.onFetch){_66a=_668.onFetch.call(this,_66a,opts);}_4.forEach(_66a,function(i){this._addOptionForItem(i);},this);this._loadingStore=false;this.set("value","_pendingValue" in this?this._pendingValue:_667);delete this._pendingValue;if(!this.loadChildrenOnOpen){this._loadChildren();}else{this._pseudoLoadChildren(_66a);}this._fetchedWith=opts;this._lastValueReported=this.multiple?[]:null;this._onChangeActive=true;this.onSetStore();this._handleOnChange(this.value);},scope:this}));}else{delete this._fetchedWith;}return _669;},_setValueAttr:function(_66b,_66c){if(this._loadingStore){this._pendingValue=_66b;return;}var opts=this.getOptions()||[];if(!_4.isArray(_66b)){_66b=[_66b];}_4.forEach(_66b,function(i,idx){if(!_4.isObject(i)){i=i+"";}if(typeof i==="string"){_66b[idx]=_4.filter(opts,function(node){return node.value===i;})[0]||{value:"",label:""};}},this);_66b=_4.filter(_66b,function(i){return i&&i.value;});if(!this.multiple&&(!_66b[0]||!_66b[0].value)&&opts.length){_66b[0]=opts[0];}_4.forEach(opts,function(i){i.selected=_4.some(_66b,function(v){return v.value===i.value;});});var val=_4.map(_66b,function(i){return i.value;}),disp=_4.map(_66b,function(i){return i.label;});this._set("value",this.multiple?val:val[0]);this._setDisplay(this.multiple?disp:disp[0]);this._updateSelection();this._handleOnChange(this.value,_66c);},_getDisplayedValueAttr:function(){var val=this.get("value");if(!_4.isArray(val)){val=[val];}var ret=_4.map(this.getOptions(val),function(v){if(v&&"label" in v){return v.label;}else{if(v){return v.value;}}return null;},this);return this.multiple?ret:ret[0];},_loadChildren:function(){if(this._loadingStore){return;}_4.forEach(this._getChildren(),function(_66d){_66d.destroyRecursive();});_4.forEach(this.options,this._addOptionItem,this);this._updateSelection();},_updateSelection:function(){this._set("value",this._getValueFromOpts());var val=this.value;if(!_4.isArray(val)){val=[val];}if(val&&val[0]){_4.forEach(this._getChildren(),function(_66e){var _66f=_4.some(val,function(v){return _66e.option&&(v===_66e.option.value);});_4.toggleClass(_66e.domNode,this.baseClass+"SelectedOption",_66f);_5.setWaiState(_66e.domNode,"selected",_66f);},this);}},_getValueFromOpts:function(){var opts=this.getOptions()||[];if(!this.multiple&&opts.length){var opt=_4.filter(opts,function(i){return i.selected;})[0];if(opt&&opt.value){return opt.value;}else{opts[0].selected=true;return opts[0].value;}}else{if(this.multiple){return _4.map(_4.filter(opts,function(i){return i.selected;}),function(i){return i.value;})||[];}}return "";},_onNewItem:function(item,_670){if(!_670||!_670.parent){this._addOptionForItem(item);}},_onDeleteItem:function(item){var _671=this.store;this.removeOption(_671.getIdentity(item));},_onSetItem:function(item){this.updateOption(this._getOptionObjForItem(item));},_getOptionObjForItem:function(item){var _672=this.store,_673=_672.getLabel(item),_674=(_673?_672.getIdentity(item):null);return {value:_674,label:_673,item:item};},_addOptionForItem:function(item){var _675=this.store;if(!_675.isItemLoaded(item)){_675.loadItem({item:item,onComplete:function(i){this._addOptionForItem(item);},scope:this});return;}var _676=this._getOptionObjForItem(item);this.addOption(_676);},constructor:function(_677){this._oValue=(_677||{}).value||null;},buildRendering:function(){this.inherited(arguments);_4.setSelectable(this.focusNode,false);},_fillContent:function(){var opts=this.options;if(!opts){opts=this.options=this.srcNodeRef?_4.query(">",this.srcNodeRef).map(function(node){if(node.getAttribute("type")==="separator"){return {value:"",label:"",selected:false,disabled:false};}return {value:(node.getAttribute("data-"+_4._scopeName+"-value")||node.getAttribute("value")),label:String(node.innerHTML),selected:node.getAttribute("selected")||false,disabled:node.getAttribute("disabled")||false};},this):[];}if(!this.value){this._set("value",this._getValueFromOpts());}else{if(this.multiple&&typeof this.value=="string"){this_set("value",this.value.split(","));}}},postCreate:function(){this.inherited(arguments);this.connect(this,"onChange","_updateSelection");this.connect(this,"startup","_loadChildren");this._setValueAttr(this.value,null);},startup:function(){this.inherited(arguments);var _678=this.store,_679={};_4.forEach(["query","queryOptions","onFetch"],function(i){if(this[i]){_679[i]=this[i];}delete this[i];},this);if(_678&&_678.getFeatures()["dojo.data.api.Identity"]){this.store=null;this.setStore(_678,this._oValue,_679);}},destroy:function(){_4.forEach(this._notifyConnections||[],_4.disconnect);this.inherited(arguments);},_addOptionItem:function(_67a){},_removeOptionItem:function(_67b){},_setDisplay:function(_67c){},_getChildren:function(){return [];},_getSelectedOptionsAttr:function(){return this.getOptions(this.get("value"));},_pseudoLoadChildren:function(_67d){},onSetStore:function(){}});}if(!_4._hasResource["dijit.MenuItem"]){_4._hasResource["dijit.MenuItem"]=true;_4.provide("dijit.MenuItem");_4.declare("dijit.MenuItem",[_5._Widget,_5._Templated,_5._Contained,_5._CssStateMixin],{templateString:_4.cache("dijit","templates/MenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\"\r\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\r\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\r\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\"/>\r\n\t</td>\r\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\r\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\r\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\r\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\r\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\r\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\r\n\t\t</div>\r\n\t</td>\r\n</tr>\r\n"),attributeMap:_4.delegate(_5._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",accelKey:"",disabled:false,_fillContent:function(_67e){if(_67e&&!("label" in this.params)){this.set("label",_67e.innerHTML);}},buildRendering:function(){this.inherited(arguments);var _67f=this.id+"_text";_4.attr(this.containerNode,"id",_67f);if(this.accelKeyNode){_4.attr(this.accelKeyNode,"id",this.id+"_accel");_67f+=" "+this.id+"_accel";}_5.setWaiState(this.domNode,"labelledby",_67f);_4.setSelectable(this.domNode,false);},_onHover:function(){this.getParent().onItemHover(this);},_onUnhover:function(){this.getParent().onItemUnhover(this);this._set("hovering",false);},_onClick:function(evt){this.getParent().onItemClick(this,evt);_4.stopEvent(evt);},onClick:function(evt){},focus:function(){try{if(_4.isIE==8){this.containerNode.focus();}_5.focus(this.focusNode);}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_680){_4.toggleClass(this.domNode,"dijitMenuItemSelected",_680);},setLabel:function(_681){_4.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_681);},setDisabled:function(_682){_4.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_682);},_setDisabledAttr:function(_683){_5.setWaiState(this.focusNode,"disabled",_683?"true":"false");this._set("disabled",_683);},_setAccelKeyAttr:function(_684){this.accelKeyNode.style.display=_684?"":"none";this.accelKeyNode.innerHTML=_684;_4.attr(this.containerNode,"colSpan",_684?"1":"2");this._set("accelKey",_684);}});}if(!_4._hasResource["dijit.PopupMenuItem"]){_4._hasResource["dijit.PopupMenuItem"]=true;_4.provide("dijit.PopupMenuItem");_4.declare("dijit.PopupMenuItem",_5.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var _685=_4.query("*",this.srcNodeRef);_5.PopupMenuItem.superclass._fillContent.call(this,_685[0]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}this.inherited(arguments);if(!this.popup){var node=_4.query("[widgetId]",this.dropDownContainer)[0];this.popup=_5.byNode(node);}_4.body().appendChild(this.popup.domNode);this.popup.startup();this.popup.domNode.style.display="none";if(this.arrowWrapper){_4.style(this.arrowWrapper,"visibility","");}_5.setWaiState(this.focusNode,"haspopup","true");},destroyDescendants:function(){if(this.popup){if(!this.popup._destroyed){this.popup.destroyRecursive();}delete this.popup;}this.inherited(arguments);}});}if(!_4._hasResource["dijit.CheckedMenuItem"]){_4._hasResource["dijit.CheckedMenuItem"]=true;_4.provide("dijit.CheckedMenuItem");_4.declare("dijit.CheckedMenuItem",_5.MenuItem,{templateString:_4.cache("dijit","templates/CheckedMenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\"\r\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\r\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\r\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\"/>\r\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\r\n\t</td>\r\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\r\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\r\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&nbsp;</td>\r\n</tr>\r\n"),checked:false,_setCheckedAttr:function(_686){_4.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_686);_5.setWaiState(this.domNode,"checked",_686);this._set("checked",_686);},onChange:function(_687){},_onClick:function(e){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.inherited(arguments);}});}if(!_4._hasResource["dijit.MenuSeparator"]){_4._hasResource["dijit.MenuSeparator"]=true;_4.provide("dijit.MenuSeparator");_4.declare("dijit.MenuSeparator",[_5._Widget,_5._Templated,_5._Contained],{templateString:_4.cache("dijit","templates/MenuSeparator.html","<tr class=\"dijitMenuSeparator\">\r\n\t<td class=\"dijitMenuSeparatorIconCell\">\r\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\r\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\r\n\t</td>\r\n\t<td colspan=\"3\" class=\"dijitMenuSeparatorLabelCell\">\r\n\t\t<div class=\"dijitMenuSeparatorTop dijitMenuSeparatorLabel\"></div>\r\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\r\n\t</td>\r\n</tr>\r\n"),buildRendering:function(){this.inherited(arguments);_4.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});}if(!_4._hasResource["dijit.Menu"]){_4._hasResource["dijit.Menu"]=true;_4.provide("dijit.Menu");_4.declare("dijit._MenuBase",[_5._Widget,_5._Templated,_5._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(this._started){return;}_4.forEach(this.getChildren(),function(_688){_688.startup();});this.startupKeyNavChildren();this.inherited(arguments);},onExecute:function(){},onCancel:function(_689){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.focusedChild._onClick(evt);}else{var _68a=this._getTopMenu();if(_68a&&_68a._isMenuBar){_68a.focusNext();}}},_onPopupHover:function(evt){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _68b=this.currentPopup.parentMenu;if(_68b.focusedChild){_68b.focusedChild._setSelected(false);}_68b.focusedChild=this.currentPopup.from_item;_68b.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=setTimeout(_4.hitch(this,"_openPopup"),this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _68c=item.popup;if(_68c){this._stopPendingCloseTimer(_68c);_68c._pendingClose_timer=setTimeout(function(){_68c._pendingClose_timer=null;if(_68c.parentMenu){_68c.parentMenu.currentPopup=null;}_5.popup.close(_68c);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null;}},_stopPendingCloseTimer:function(_68d){if(_68d._pendingClose_timer){clearTimeout(_68d._pendingClose_timer);_68d._pendingClose_timer=null;}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null;}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.disabled){return false;}if(item.popup){this._openPopup();}else{this.onExecute();item.onClick(evt);}},_openPopup:function(){this._stopPopupTimer();var _68e=this.focusedChild;if(!_68e){return;}var _68f=_68e.popup;if(_68f.isShowingNow){return;}if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);_5.popup.close(this.currentPopup);}_68f.parentMenu=this;_68f.from_item=_68e;var self=this;_5.popup.open({parent:this,popup:_68f,around:_68e.domNode,orient:this._orient||(this.isLeftToRight()?{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"}:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"}),onCancel:function(){self.focusChild(_68e);self._cleanUp();_68e._setSelected(true);self.focusedChild=_68e;},onExecute:_4.hitch(this,"_cleanUp")});this.currentPopup=_68f;_68f.connect(_68f.domNode,"onmouseenter",_4.hitch(self,"_onPopupHover"));if(_68f.focus){_68f._focus_timer=setTimeout(_4.hitch(_68f,function(){this._focus_timer=null;this.focus();}),0);}},_markActive:function(){this.isActive=true;_4.replaceClass(this.domNode,"dijitMenuActive","dijitMenuPassive");},onOpen:function(e){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;_4.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();var _690=this.focusedChild&&this.focusedChild.from_item;if(this.currentPopup){if(_5._curFocus&&_4.isDescendant(_5._curFocus,this.currentPopup.domNode)){this.focusedChild.focusNode.focus();}_5.popup.close(this.currentPopup);this.currentPopup=null;}if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this._hoveredChild._onUnhover();}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});_4.declare("dijit.Menu",_5._MenuBase,{constructor:function(){this._bindings=[];},templateString:_4.cache("dijit","templates/Menu.html","<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\r\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\r\n</table>\r\n"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(_4.body());}else{_4.forEach(this.targetNodeIds,this.bindDomNode,this);}var k=_4.keys,l=this.isLeftToRight();this._openSubMenuKey=l?k.RIGHT_ARROW:k.LEFT_ARROW;this._closeSubMenuKey=l?k.LEFT_ARROW:k.RIGHT_ARROW;this.connectKeyNavHandlers([k.UP_ARROW],[k.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);_4.stopEvent(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{_4.stopEvent(evt);}break;}},_iframeContentWindow:function(_691){var win=_4.window.get(this._iframeContentDocument(_691))||this._iframeContentDocument(_691)["__parent__"]||(_691.name&&_4.doc.frames[_691.name])||null;return win;},_iframeContentDocument:function(_692){var doc=_692.contentDocument||(_692.contentWindow&&_692.contentWindow.document)||(_692.name&&_4.doc.frames[_692.name]&&_4.doc.frames[_692.name].document)||null;return doc;},bindDomNode:function(node){node=_4.byId(node);var cn;if(node.tagName.toLowerCase()=="iframe"){var _693=node,win=this._iframeContentWindow(_693);cn=_4.withGlobal(win,_4.body);}else{cn=(node==_4.body()?_4.doc.documentElement:node);}var _694={node:node,iframe:_693};_4.attr(node,"_dijitMenu"+this.id,this._bindings.push(_694));var _695=_4.hitch(this,function(cn){return [_4.connect(cn,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(evt){_4.stopEvent(evt);this._scheduleOpen(evt.target,_693,{x:evt.pageX,y:evt.pageY});}),_4.connect(cn,"onkeydown",this,function(evt){if(evt.shiftKey&&evt.keyCode==_4.keys.F10){_4.stopEvent(evt);this._scheduleOpen(evt.target,_693);}})];});_694.connects=cn?_695(cn):[];if(_693){_694.onloadHandler=_4.hitch(this,function(){var win=this._iframeContentWindow(_693);cn=_4.withGlobal(win,_4.body);_694.connects=_695(cn);});if(_693.addEventListener){_693.addEventListener("load",_694.onloadHandler,false);}else{_693.attachEvent("onload",_694.onloadHandler);}}},unBindDomNode:function(_696){var node;try{node=_4.byId(_696);}catch(e){return;}var _697="_dijitMenu"+this.id;if(node&&_4.hasAttr(node,_697)){var bid=_4.attr(node,_697)-1,b=this._bindings[bid];_4.forEach(b.connects,_4.disconnect);var _698=b.iframe;if(_698){if(_698.removeEventListener){_698.removeEventListener("load",b.onloadHandler,false);}else{_698.detachEvent("onload",b.onloadHandler);}}_4.removeAttr(node,_697);delete this._bindings[bid];}},_scheduleOpen:function(_699,_69a,_69b){if(!this._openTimer){this._openTimer=setTimeout(_4.hitch(this,function(){delete this._openTimer;this._openMyself({target:_699,iframe:_69a,coords:_69b});}),1);}},_openMyself:function(args){var _69c=args.target,_69d=args.iframe,_69e=args.coords;if(_69e){if(_69d){var od=_69c.ownerDocument,ifc=_4.position(_69d,true),win=this._iframeContentWindow(_69d),_69f=_4.withGlobal(win,"_docScroll",_4);var cs=_4.getComputedStyle(_69d),tp=_4._toPixelValue,left=(_4.isIE&&_4.isQuirks?0:tp(_69d,cs.paddingLeft))+(_4.isIE&&_4.isQuirks?tp(_69d,cs.borderLeftWidth):0),top=(_4.isIE&&_4.isQuirks?0:tp(_69d,cs.paddingTop))+(_4.isIE&&_4.isQuirks?tp(_69d,cs.borderTopWidth):0);_69e.x+=ifc.x+left-_69f.x;_69e.y+=ifc.y+top-_69f.y;}}else{_69e=_4.position(_69c,true);_69e.x+=10;_69e.y+=10;}var self=this;var _6a0=_5.getFocus(this);function _6a1(){if(self.refocus){_5.focus(_6a0);}_5.popup.close(self);};_5.popup.open({popup:this,x:_69e.x,y:_69e.y,onExecute:_6a1,onCancel:_6a1,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);_5.popup.close(this);};},uninitialize:function(){_4.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});}if(!_4._hasResource["dijit.form.Select"]){_4._hasResource["dijit.form.Select"]=true;_4.provide("dijit.form.Select");_4.declare("dijit.form._SelectMenu",_5.Menu,{buildRendering:function(){this.inherited(arguments);var o=(this.menuTableNode=this.domNode);var n=(this.domNode=_4.create("div",{style:{overflowX:"hidden",overflowY:"scroll"}}));if(o.parentNode){o.parentNode.replaceChild(n,o);}_4.removeClass(o,"dijitMenuTable");n.className=o.className+" dijitSelectMenu";o.className="dijitReset dijitMenuTable";_5.setWaiRole(o,"listbox");_5.setWaiRole(n,"presentation");n.appendChild(o);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousemove",_4.stopEvent);},resize:function(mb){if(mb){_4.marginBox(this.domNode,mb);if("w" in mb){this.menuTableNode.style.width="100%";}}}});_4.declare("dijit.form.Select",[_5.form._FormSelectWidget,_5._HasDropDown],{baseClass:"dijitSelect",templateString:_4.cache("dijit.form","templates/Select.html","<table class=\"dijit dijitReset dijitInline dijitLeft\"\r\n\tdojoAttachPoint=\"_buttonNode,tableNode,focusNode\" cellspacing='0' cellpadding='0'\r\n\trole=\"combobox\" aria-haspopup=\"true\"\r\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\r\n\t\t><td class=\"dijitReset dijitStretch dijitButtonContents dijitButtonNode\" role=\"presentation\"\r\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"  dojoAttachPoint=\"containerNode,_popupStateNode\"></span\r\n\t\t\t><input type=\"hidden\" ${!nameAttrSetting} dojoAttachPoint=\"valueNode\" value=\"${value}\" aria-hidden=\"true\"\r\n\t\t/></td><td class=\"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\t\tdojoAttachPoint=\"titleNode\" role=\"presentation\"\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\r\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">&#9660;</div\r\n\t\t></td\r\n\t></tr></tbody\r\n></table>\r\n"),attributeMap:_4.mixin(_4.clone(_5.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),required:false,state:"",message:"",tooltipPosition:[],emptyLabel:"&nbsp;",_isLoaded:false,_childrenLoaded:false,_fillContent:function(){this.inherited(arguments);if(this.options.length&&!this.value&&this.srcNodeRef){var si=this.srcNodeRef.selectedIndex||0;this.value=this.options[si>=0?si:0].value;}this.dropDown=new _5.form._SelectMenu({id:this.id+"_menu"});_4.addClass(this.dropDown.domNode,this.baseClass+"Menu");},_getMenuItemForOption:function(_6a2){if(!_6a2.value&&!_6a2.label){return new _5.MenuSeparator();}else{var _6a3=_4.hitch(this,"_setValueAttr",_6a2);var item=new _5.MenuItem({option:_6a2,label:_6a2.label||this.emptyLabel,onClick:_6a3,disabled:_6a2.disabled||false});_5.setWaiRole(item.focusNode,"listitem");return item;}},_addOptionItem:function(_6a4){if(this.dropDown){this.dropDown.addChild(this._getMenuItemForOption(_6a4));}},_getChildren:function(){if(!this.dropDown){return [];}return this.dropDown.getChildren();},_loadChildren:function(_6a5){if(_6a5===true){if(this.dropDown){delete this.dropDown.focusedChild;}if(this.options.length){this.inherited(arguments);}else{_4.forEach(this._getChildren(),function(_6a6){_6a6.destroyRecursive();});var item=new _5.MenuItem({label:"&nbsp;"});this.dropDown.addChild(item);}}else{this._updateSelection();}this._isLoaded=false;this._childrenLoaded=true;if(!this._loadingStore){this._setValueAttr(this.value);}},_setValueAttr:function(_6a7){this.inherited(arguments);_4.attr(this.valueNode,"value",this.get("value"));},_setDisplay:function(_6a8){var lbl=_6a8||this.emptyLabel;this.containerNode.innerHTML="<span class=\"dijitReset dijitInline "+this.baseClass+"Label\">"+lbl+"</span>";_5.setWaiState(this.focusNode,"valuetext",lbl);},validate:function(_6a9){var _6aa=this.isValid(_6a9);this._set("state",_6aa?"":"Error");_5.setWaiState(this.focusNode,"invalid",_6aa?"false":"true");var _6ab=_6aa?"":this._missingMsg;if(this.message!==_6ab){this._set("message",_6ab);_5.hideTooltip(this.domNode);if(_6ab){_5.showTooltip(_6ab,this.domNode,this.tooltipPosition,!this.isLeftToRight());}}return _6aa;},isValid:function(_6ac){return (!this.required||this.value===0||!(/^\s*$/.test(this.value||"")));},reset:function(){this.inherited(arguments);_5.hideTooltip(this.domNode);this._set("state","");this._set("message","");},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=_4.i18n.getLocalization("dijit.form","validate",this.lang).missingMessage;},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousemove",_4.stopEvent);},_setStyleAttr:function(_6ad){this.inherited(arguments);_4.toggleClass(this.domNode,this.baseClass+"FixedWidth",!!this.tableNode.style.width);},isLoaded:function(){return this._isLoaded;},loadDropDown:function(_6ae){this._loadChildren(true);this._isLoaded=true;_6ae();},closeDropDown:function(){this.inherited(arguments);if(this.dropDown&&this.dropDown.menuTableNode){this.dropDown.menuTableNode.style.width="";}},uninitialize:function(_6af){if(this.dropDown&&!this.dropDown._destroyed){this.dropDown.destroyRecursive(_6af);delete this.dropDown;}this.inherited(arguments);}});}if(!_4._hasResource["dijit._editor.plugins.LinkDialog"]){_4._hasResource["dijit._editor.plugins.LinkDialog"]=true;_4.provide("dijit._editor.plugins.LinkDialog");_4.declare("dijit._editor.plugins.LinkDialog",_5._editor._Plugin,{buttonClass:_5.form.DropDownButton,useDefaultCommand:false,urlRegExp:"((https?|ftps?|file)\\://|./|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",emailRegExp:"<?(mailto\\:)([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+"+"@"+"((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*>?",htmlTemplate:"<a href=\"${urlInput}\" _djrealurl=\"${urlInput}\""+" target=\"${targetSelect}\""+">${textInput}</a>",tag:"a",_hostRxp:new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),_userAtRxp:new RegExp("^([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?A-Z^-~]+@","i"),linkDialogTemplate:["<table><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' required='true' "+"id='${id}_urlInput' name='urlInput' intermediateChanges='true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' required='true' id='${id}_textInput' "+"name='textInput' intermediateChanges='true'/>","</td></tr><tr><td>","<label for='${id}_targetSelect'>${target}</label>","</td><td>","<select id='${id}_targetSelect' name='targetSelect' dojoType='dijit.form.Select'>","<option selected='selected' value='_self'>${currentWindow}</option>","<option value='_blank'>${newWindow}</option>","<option value='_top'>${topWindow}</option>","<option value='_parent'>${parentWindow}</option>","</select>","</td></tr><tr><td colspan='2'>","<button dojoType='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button dojoType='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),_initButton:function(){var _6b0=this;this.tag=this.command=="insertImage"?"img":"a";var _6b1=_4.mixin(_4.i18n.getLocalization("dijit","common",this.lang),_4.i18n.getLocalization("dijit._editor","LinkDialog",this.lang));var _6b2=(this.dropDown=new _5.TooltipDialog({title:_6b1[this.command+"Title"],execute:_4.hitch(this,"setValue"),onOpen:function(){_6b0._onOpenDialog();_5.TooltipDialog.prototype.onOpen.apply(this,arguments);},onCancel:function(){setTimeout(_4.hitch(_6b0,"_onCloseDialog"),0);}}));_6b1.urlRegExp=this.urlRegExp;_6b1.id=_5.getUniqueId(this.editor.id);this._uniqueId=_6b1.id;this._setContent(_6b2.title+"<div style='border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'></div>"+_4.string.substitute(this.linkDialogTemplate,_6b1));_6b2.startup();this._urlInput=_5.byId(this._uniqueId+"_urlInput");this._textInput=_5.byId(this._uniqueId+"_textInput");this._setButton=_5.byId(this._uniqueId+"_setButton");this.connect(_5.byId(this._uniqueId+"_cancelButton"),"onClick",function(){this.dropDown.onCancel();});if(this._urlInput){this.connect(this._urlInput,"onChange","_checkAndFixInput");}if(this._textInput){this.connect(this._textInput,"onChange","_checkAndFixInput");}this._urlRegExp=new RegExp("^"+this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=_4.hitch(this,function(){var _6b3=this._urlInput.get("value");return this._urlRegExp.test(_6b3)||this._emailRegExp.test(_6b3);});this._connectTagEvents();this.inherited(arguments);},_checkAndFixInput:function(){var self=this;var url=this._urlInput.get("value");var _6b4=function(url){var _6b5=false;var _6b6=false;if(url&&url.length>1){url=_4.trim(url);if(url.indexOf("mailto:")!==0){if(url.indexOf("/")>0){if(url.indexOf("://")===-1){if(url.charAt(0)!=="/"&&url.indexOf("./")!==0){if(self._hostRxp.test(url)){_6b5=true;}}}}else{if(self._userAtRxp.test(url)){_6b6=true;}}}}if(_6b5){self._urlInput.set("value","http://"+url);}if(_6b6){self._urlInput.set("value","mailto:"+url);}self._setButton.set("disabled",!self._isValid());};if(this._delayedCheck){clearTimeout(this._delayedCheck);this._delayedCheck=null;}this._delayedCheck=setTimeout(function(){_6b4(url);},250);},_connectTagEvents:function(){this.editor.onLoadDeferred.addCallback(_4.hitch(this,function(){this.connect(this.editor.editNode,"ondblclick",this._onDblClick);}));},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid();},_setContent:function(_6b7){this.dropDown.set({parserScope:"dojo",content:_6b7});},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}return args;},setValue:function(args){this._onCloseDialog();if(_4.isIE<9){var sel=_5.range.getSelection(this.editor.window);var _6b8=sel.getRangeAt(0);var a=_6b8.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=_4.withGlobal(this.editor.window,"getSelectedElement",_5._editor.selection,[this.tag]);}if(a&&(a.nodeName&&a.nodeName.toLowerCase()===this.tag)){if(this.editor.queryCommandEnabled("unlink")){_4.withGlobal(this.editor.window,"selectElementChildren",_5._editor.selection,[a]);this.editor.execCommand("unlink");}}}args=this._checkValues(args);this.editor.execCommand("inserthtml",_4.string.substitute(this.htmlTemplate,args));},_onCloseDialog:function(){this.editor.focus();},_getCurrentValues:function(a){var url,text,_6b9;if(a&&a.tagName.toLowerCase()===this.tag){url=a.getAttribute("_djrealurl")||a.getAttribute("href");_6b9=a.getAttribute("target")||"_self";text=a.textContent||a.innerText;_4.withGlobal(this.editor.window,"selectElement",_5._editor.selection,[a,true]);}else{text=_4.withGlobal(this.editor.window,_5._editor.selection.getSelectedText);}return {urlInput:url||"",textInput:text||"",targetSelect:_6b9||""};},_onOpenDialog:function(){var a;if(_4.isIE<9){var sel=_5.range.getSelection(this.editor.window);var _6ba=sel.getRangeAt(0);a=_6ba.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=_4.withGlobal(this.editor.window,"getSelectedElement",_5._editor.selection,[this.tag]);}}else{a=_4.withGlobal(this.editor.window,"getAncestorElement",_5._editor.selection,[this.tag]);}this.dropDown.reset();this._setButton.set("disabled",true);this.dropDown.set("value",this._getCurrentValues(a));},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_4.attr(t,"href")){_4.withGlobal(this.editor.window,"selectElement",_5._editor.selection,[t]);this.editor.onDisplayChanged();setTimeout(_4.hitch(this,function(){this.button.set("disabled",false);this.button.openDropDown();}),10);}}}});_4.declare("dijit._editor.plugins.ImgLinkDialog",[_5._editor.plugins.LinkDialog],{linkDialogTemplate:["<table><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' "+"required='true' id='${id}_urlInput' name='urlInput' intermediateChanges='true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' required='false' id='${id}_textInput' "+"name='textInput' intermediateChanges='true'/>","</td></tr><tr><td>","</td><td>","</td></tr><tr><td colspan='2'>","<button dojoType='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button dojoType='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),htmlTemplate:"<img src=\"${urlInput}\" _djrealurl=\"${urlInput}\" alt=\"${textInput}\" />",tag:"img",_getCurrentValues:function(img){var url,text;if(img&&img.tagName.toLowerCase()===this.tag){url=img.getAttribute("_djrealurl")||img.getAttribute("src");text=img.getAttribute("alt");_4.withGlobal(this.editor.window,"selectElement",_5._editor.selection,[img,true]);}else{text=_4.withGlobal(this.editor.window,_5._editor.selection.getSelectedText);}return {urlInput:url||"",textInput:text||""};},_isValid:function(){return this._urlInput.isValid();},_connectTagEvents:function(){this.inherited(arguments);this.editor.onLoadDeferred.addCallback(_4.hitch(this,function(){this.connect(this.editor.editNode,"onmousedown",this._selectTag);}));},_selectTag:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag){_4.withGlobal(this.editor.window,"selectElement",_5._editor.selection,[t]);}}},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}if(args&&args.textInput){args.textInput=args.textInput.replace(/"/g,"&quot;");}return args;},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_4.attr(t,"src")){_4.withGlobal(this.editor.window,"selectElement",_5._editor.selection,[t]);this.editor.onDisplayChanged();setTimeout(_4.hitch(this,function(){this.button.set("disabled",false);this.button.openDropDown();}),10);}}}});_4.subscribe(_5._scopeName+".Editor.getPlugin",null,function(o){if(o.plugin){return;}switch(o.args.name){case "createLink":o.plugin=new _5._editor.plugins.LinkDialog({command:o.args.name});break;case "insertImage":o.plugin=new _5._editor.plugins.ImgLinkDialog({command:o.args.name});break;}});}if(!_4._hasResource["dojo.colors"]){_4._hasResource["dojo.colors"]=true;_4.provide("dojo.colors");_4.getObject("colors",true,_4);(function(){var _6bb=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};_4.colorFromRgb=function(_6bc,obj){var m=_6bc.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_4.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _4.colorFromArray(a,obj);}return _4.colorFromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_6bb(m1,m2,H+1/3)*256,_6bb(m1,m2,H)*256,_6bb(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _4.colorFromArray(a,obj);}}return null;};var _6bd=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};_4.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_6bd(t.r,0,255));t.g=Math.round(_6bd(t.g,0,255));t.b=Math.round(_6bd(t.b,0,255));t.a=_6bd(t.a,0,1);return this;};})();_4.colors.makeGrey=function(g,a){return _4.colorFromArray([g,g,g,a]);};_4.mixin(_4.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});}if(!_4._hasResource["dijit._PaletteMixin"]){_4._hasResource["dijit._PaletteMixin"]=true;_4.provide("dijit._PaletteMixin");_4.declare("dijit._PaletteMixin",[_5._CssStateMixin],{defaultTimeout:500,timeoutChangeRate:0.9,value:null,_selectedCell:-1,tabIndex:"0",cellClass:"dijitPaletteCell",dyeClass:"",_preparePalette:function(_6be,_6bf,_6c0){this._cells=[];var url=this._blankGif;_6c0=_6c0||_4.getObject(this.dyeClass);for(var row=0;row<_6be.length;row++){var _6c1=_4.create("tr",{tabIndex:"-1"},this.gridNode);for(var col=0;col<_6be[row].length;col++){var _6c2=_6be[row][col];if(_6c2){var _6c3=new _6c0(_6c2,row,col);var _6c4=_4.create("td",{"class":this.cellClass,tabIndex:"-1",title:_6bf[_6c2]});_6c3.fillCell(_6c4,url);this.connect(_6c4,"ondijitclick","_onCellClick");this._trackMouseState(_6c4,this.cellClass);_4.place(_6c4,_6c1);_6c4.index=this._cells.length;this._cells.push({node:_6c4,dye:_6c3});}}}this._xDim=_6be[0].length;this._yDim=_6be.length;var _6c5={UP_ARROW:-this._xDim,DOWN_ARROW:this._xDim,RIGHT_ARROW:this.isLeftToRight()?1:-1,LEFT_ARROW:this.isLeftToRight()?-1:1};for(var key in _6c5){this._connects.push(_5.typematic.addKeyListener(this.domNode,{charOrCode:_4.keys[key],ctrlKey:false,altKey:false,shiftKey:false},this,function(){var _6c6=_6c5[key];return function(_6c7){this._navigateByKey(_6c6,_6c7);};}(),this.timeoutChangeRate,this.defaultTimeout));}},postCreate:function(){this.inherited(arguments);this._setCurrent(this._cells[0].node);},focus:function(){_5.focus(this._currentFocus);},_onCellClick:function(evt){var _6c8=evt.currentTarget,_6c9=this._getDye(_6c8).getValue();this._setCurrent(_6c8);setTimeout(_4.hitch(this,function(){_5.focus(_6c8);this._setValueAttr(_6c9,true);}));_4.removeClass(_6c8,"dijitPaletteCellHover");_4.stopEvent(evt);},_setCurrent:function(node){if("_currentFocus" in this){_4.attr(this._currentFocus,"tabIndex","-1");}this._currentFocus=node;if(node){_4.attr(node,"tabIndex",this.tabIndex);}},_setValueAttr:function(_6ca,_6cb){if(this._selectedCell>=0){_4.removeClass(this._cells[this._selectedCell].node,"dijitPaletteCellSelected");}this._selectedCell=-1;if(_6ca){for(var i=0;i<this._cells.length;i++){if(_6ca==this._cells[i].dye.getValue()){this._selectedCell=i;_4.addClass(this._cells[i].node,"dijitPaletteCellSelected");break;}}}this._set("value",this._selectedCell>=0?_6ca:null);if(_6cb||_6cb===undefined){this.onChange(_6ca);}},onChange:function(_6cc){},_navigateByKey:function(_6cd,_6ce){if(_6ce==-1){return;}var _6cf=this._currentFocus.index+_6cd;if(_6cf<this._cells.length&&_6cf>-1){var _6d0=this._cells[_6cf].node;this._setCurrent(_6d0);setTimeout(_4.hitch(_5,"focus",_6d0),0);}},_getDye:function(cell){return this._cells[cell.index].dye;}});}if(!_4._hasResource["dijit.ColorPalette"]){_4._hasResource["dijit.ColorPalette"]=true;_4.provide("dijit.ColorPalette");_4.declare("dijit.ColorPalette",[_5._Widget,_5._Templated,_5._PaletteMixin],{palette:"7x10",_palettes:{"7x10":[["white","seashell","cornsilk","lemonchiffon","lightyellow","palegreen","paleturquoise","lightcyan","lavender","plum"],["lightgray","pink","bisque","moccasin","khaki","lightgreen","lightseagreen","lightskyblue","cornflowerblue","violet"],["silver","lightcoral","sandybrown","orange","palegoldenrod","chartreuse","mediumturquoise","skyblue","mediumslateblue","orchid"],["gray","red","orangered","darkorange","yellow","limegreen","darkseagreen","royalblue","slateblue","mediumorchid"],["dimgray","crimson","chocolate","coral","gold","forestgreen","seagreen","blue","blueviolet","darkorchid"],["darkslategray","firebrick","saddlebrown","sienna","olive","green","darkcyan","mediumblue","darkslateblue","darkmagenta"],["black","darkred","maroon","brown","darkolivegreen","darkgreen","midnightblue","navy","indigo","purple"]],"3x4":[["white","lime","green","blue"],["silver","yellow","fuchsia","navy"],["gray","red","purple","black"]]},templateString:_4.cache("dijit","templates/ColorPalette.html","<div class=\"dijitInline dijitColorPalette\">\r\n\t<table class=\"dijitPaletteTable\" cellSpacing=\"0\" cellPadding=\"0\">\r\n\t\t<tbody dojoAttachPoint=\"gridNode\"></tbody>\r\n\t</table>\r\n</div>\r\n"),baseClass:"dijitColorPalette",buildRendering:function(){this.inherited(arguments);this._preparePalette(this._palettes[this.palette],_4.i18n.getLocalization("dojo","colors",this.lang),_4.declare(_5._Color,{hc:_4.hasClass(_4.body(),"dijit_a11y"),palette:this.palette}));}});_4.declare("dijit._Color",_4.Color,{template:"<span class='dijitInline dijitPaletteImg'>"+"<img src='${blankGif}' alt='${alt}' class='dijitColorPaletteSwatch' style='background-color: ${color}'/>"+"</span>",hcTemplate:"<span class='dijitInline dijitPaletteImg' style='position: relative; overflow: hidden; height: 12px; width: 14px;'>"+"<img src='${image}' alt='${alt}' style='position: absolute; left: ${left}px; top: ${top}px; ${size}'/>"+"</span>",_imagePaths:{"7x10":_4.moduleUrl("dijit.themes","a11y/colors7x10.png"),"3x4":_4.moduleUrl("dijit.themes","a11y/colors3x4.png")},constructor:function(_6d1,row,col){this._alias=_6d1;this._row=row;this._col=col;this.setColor(_4.Color.named[_6d1]);},getValue:function(){return this.toHex();},fillCell:function(cell,_6d2){var html=_4.string.substitute(this.hc?this.hcTemplate:this.template,{color:this.toHex(),blankGif:_6d2,alt:this._alias,image:this._imagePaths[this.palette].toString(),left:this._col*-20-5,top:this._row*-20-5,size:this.palette=="7x10"?"height: 145px; width: 206px":"height: 64px; width: 86px"});_4.place(html,cell);}});}if(!_4._hasResource["dijit._editor.plugins.TextColor"]){_4._hasResource["dijit._editor.plugins.TextColor"]=true;_4.provide("dijit._editor.plugins.TextColor");_4.declare("dijit._editor.plugins.TextColor",_5._editor._Plugin,{buttonClass:_5.form.DropDownButton,useDefaultCommand:false,constructor:function(){this.dropDown=new _5.ColorPalette();this.connect(this.dropDown,"onChange",function(_6d3){this.editor.execCommand(this.command,_6d3);});},updateState:function(){var _6d4=this.editor;var _6d5=this.command;if(!_6d4||!_6d4.isLoaded||!_6d5.length){return;}if(this.button){var _6d6=this.get("disabled");this.button.set("disabled",_6d6);if(_6d6){return;}var _6d7;try{_6d7=_6d4.queryCommandValue(_6d5)||"";}catch(e){_6d7="";}}if(_6d7==""){_6d7="#000000";}if(_6d7=="transparent"){_6d7="#ffffff";}if(typeof _6d7=="string"){if(_6d7.indexOf("rgb")>-1){_6d7=_4.colorFromRgb(_6d7).toHex();}}else{_6d7=((_6d7&255)<<16)|(_6d7&65280)|((_6d7&16711680)>>>16);_6d7=_6d7.toString(16);_6d7="#000000".slice(0,7-_6d7.length)+_6d7;}if(_6d7!==this.dropDown.get("value")){this.dropDown.set("value",_6d7,false);}}});_4.subscribe(_5._scopeName+".Editor.getPlugin",null,function(o){if(o.plugin){return;}switch(o.args.name){case "foreColor":case "hiliteColor":o.plugin=new _5._editor.plugins.TextColor({command:o.args.name});}});}if(!_4._hasResource["dojo.data.util.filter"]){_4._hasResource["dojo.data.util.filter"]=true;_4.provide("dojo.data.util.filter");_4.getObject("data.util.filter",true,_4);_4.data.util.filter.patternToRegExp=function(_6d8,_6d9){var rxp="^";var c=null;for(var i=0;i<_6d8.length;i++){c=_6d8.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_6d8.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_6d9){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!_4._hasResource["dojo.data.util.simpleFetch"]){_4._hasResource["dojo.data.util.simpleFetch"]=true;_4.provide("dojo.data.util.simpleFetch");_4.getObject("data.util.simpleFetch",true,_4);_4.data.util.simpleFetch.fetch=function(_6da){_6da=_6da||{};if(!_6da.store){_6da.store=this;}var self=this;var _6db=function(_6dc,_6dd){if(_6dd.onError){var _6de=_6dd.scope||_4.global;_6dd.onError.call(_6de,_6dc,_6dd);}};var _6df=function(_6e0,_6e1){var _6e2=_6e1.abort||null;var _6e3=false;var _6e4=_6e1.start?_6e1.start:0;var _6e5=(_6e1.count&&(_6e1.count!==Infinity))?(_6e4+_6e1.count):_6e0.length;_6e1.abort=function(){_6e3=true;if(_6e2){_6e2.call(_6e1);}};var _6e6=_6e1.scope||_4.global;if(!_6e1.store){_6e1.store=self;}if(_6e1.onBegin){_6e1.onBegin.call(_6e6,_6e0.length,_6e1);}if(_6e1.sort){_6e0.sort(_4.data.util.sorter.createSortFunction(_6e1.sort,self));}if(_6e1.onItem){for(var i=_6e4;(i<_6e0.length)&&(i<_6e5);++i){var item=_6e0[i];if(!_6e3){_6e1.onItem.call(_6e6,item,_6e1);}}}if(_6e1.onComplete&&!_6e3){var _6e7=null;if(!_6e1.onItem){_6e7=_6e0.slice(_6e4,_6e5);}_6e1.onComplete.call(_6e6,_6e7,_6e1);}};this._fetchItems(_6da,_6df,_6db);return _6da;};}if(!_4._hasResource["dojo.data.ItemFileReadStore"]){_4._hasResource["dojo.data.ItemFileReadStore"]=true;_4.provide("dojo.data.ItemFileReadStore");_4.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_6e8){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_6e8.url;this._ccUrl=_6e8.url;this.url=_6e8.url;this._jsonData=_6e8.data;this.data=null;this._datatypeMap=_6e8.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_6e9){return _4.date.stamp.fromISOString(_6e9);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_6e8.urlPreventCache!==undefined){this.urlPreventCache=_6e8.urlPreventCache?true:false;}if(_6e8.hierarchical!==undefined){this.hierarchical=_6e8.hierarchical?true:false;}if(_6e8.clearOnClose){this.clearOnClose=true;}if("failOk" in _6e8){this.failOk=_6e8.failOk?true:false;}},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");}},_assertIsAttribute:function(_6ea){if(typeof _6ea!=="string"){throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");}},getValue:function(item,_6eb,_6ec){var _6ed=this.getValues(item,_6eb);return (_6ed.length>0)?_6ed[0]:_6ec;},getValues:function(item,_6ee){this._assertIsItem(item);this._assertIsAttribute(_6ee);return (item[_6ee]||[]).slice(0);},getAttributes:function(item){this._assertIsItem(item);var _6ef=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_6ef.push(key);}}return _6ef;},hasAttribute:function(item,_6f0){this._assertIsItem(item);this._assertIsAttribute(_6f0);return (_6f0 in item);},containsValue:function(item,_6f1,_6f2){var _6f3=undefined;if(typeof _6f2==="string"){_6f3=_4.data.util.filter.patternToRegExp(_6f2,false);}return this._containsValue(item,_6f1,_6f2,_6f3);},_containsValue:function(item,_6f4,_6f5,_6f6){return _4.some(this.getValues(item,_6f4),function(_6f7){if(_6f7!==null&&!_4.isObject(_6f7)&&_6f6){if(_6f7.toString().match(_6f6)){return true;}}else{if(_6f5===_6f7){return true;}}});},isItem:function(_6f8){if(_6f8&&_6f8[this._storeRefPropName]===this){if(this._arrayOfAllItems[_6f8[this._itemNumPropName]]===_6f8){return true;}}return false;},isItemLoaded:function(_6f9){return this.isItem(_6f9);},loadItem:function(_6fa){this._assertIsItem(_6fa.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},_fetchItems:function(_6fb,_6fc,_6fd){var self=this,_6fe=function(_6ff,_700){var _701=[],i,key;if(_6ff.query){var _702,_703=_6ff.queryOptions?_6ff.queryOptions.ignoreCase:false;var _704={};for(key in _6ff.query){_702=_6ff.query[key];if(typeof _702==="string"){_704[key]=_4.data.util.filter.patternToRegExp(_702,_703);}else{if(_702 instanceof RegExp){_704[key]=_702;}}}for(i=0;i<_700.length;++i){var _705=true;var _706=_700[i];if(_706===null){_705=false;}else{for(key in _6ff.query){_702=_6ff.query[key];if(!self._containsValue(_706,key,_702,_704[key])){_705=false;}}}if(_705){_701.push(_706);}}_6fc(_701,_6ff);}else{for(i=0;i<_700.length;++i){var item=_700[i];if(item!==null){_701.push(item);}}_6fc(_701,_6ff);}};if(this._loadFinished){_6fe(_6fb,this._getItemsArray(_6fb.queryOptions));}else{if(this._jsonFileUrl!==this._ccUrl){_4.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_6fb,filter:_6fe});}else{this._loadInProgress=true;var _707={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _708=_4.xhrGet(_707);_708.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;_6fe(_6fb,self._getItemsArray(_6fb.queryOptions));self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_6fd(e,_6fb);}});_708.addErrback(function(_709){self._loadInProgress=false;_6fd(_709,_6fb);});var _70a=null;if(_6fb.abort){_70a=_6fb.abort;}_6fb.abort=function(){var df=_708;if(df&&df.fired===-1){df.cancel();df=null;}if(_70a){_70a.call(_6fb);}};}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;_6fe(_6fb,this._getItemsArray(_6fb.queryOptions));}catch(e){_6fd(e,_6fb);}}else{_6fd(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_6fb);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _70b=this._queuedFetches[i],_70c=_70b.args,_70d=_70b.filter;if(_70d){_70d(_70c,this._getItemsArray(_70c.queryOptions));}else{this.fetchItemByIdentity(_70c);}}this._queuedFetches=[];}},_getItemsArray:function(_70e){if(_70e&&_70e.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_70f){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){console.debug("dojo.data.ItemFileReadStore: WARNING!  Data reload "+" information has not been provided."+"  Please set 'url' or 'data' to the appropriate value before"+" the next fetch");}this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_710){var _711=false,self=this;function _712(_713){var _714=((_713!==null)&&(typeof _713==="object")&&(!_4.isArray(_713)||_711)&&(!_4.isFunction(_713))&&(_713.constructor==Object||_4.isArray(_713))&&(typeof _713._reference==="undefined")&&(typeof _713._type==="undefined")&&(typeof _713._value==="undefined")&&self.hierarchical);return _714;};function _715(_716){self._arrayOfAllItems.push(_716);for(var _717 in _716){var _718=_716[_717];if(_718){if(_4.isArray(_718)){var _719=_718;for(var k=0;k<_719.length;++k){var _71a=_719[k];if(_712(_71a)){_715(_71a);}}}else{if(_712(_718)){_715(_718);}}}}};this._labelAttr=_710.label;var i,item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_710.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(_4.isArray(item)){_711=true;}_715(item);item[this._rootItemPropName]=true;}var _71b={},key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _71c=item[key];if(_71c!==null){if(!_4.isArray(_71c)){item[key]=[_71c];}}else{item[key]=[null];}}_71b[key]=key;}}while(_71b[this._storeRefPropName]){this._storeRefPropName+="_";}while(_71b[this._itemNumPropName]){this._itemNumPropName+="_";}while(_71b[this._reverseRefMap]){this._reverseRefMap+="_";}var _71d;var _71e=_710.identifier;if(_71e){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_71e;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_71d=item[_71e];var _71f=_71d[0];if(!Object.hasOwnProperty.call(this._itemsByIdentity,_71f)){this._itemsByIdentity[_71f]=item;}else{if(this._jsonFileUrl){throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_71e+"].  Value collided: ["+_71f+"]");}else{if(this._jsonData){throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_71e+"].  Value collided: ["+_71f+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_71d=item[key];for(var j=0;j<_71d.length;++j){_71c=_71d[j];if(_71c!==null&&typeof _71c=="object"){if(("_type" in _71c)&&("_value" in _71c)){var type=_71c._type;var _720=this._datatypeMap[type];if(!_720){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(_4.isFunction(_720)){_71d[j]=new _720(_71c._value);}else{if(_4.isFunction(_720.deserialize)){_71d[j]=_720.deserialize(_71c._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_71c._reference){var _721=_71c._reference;if(!_4.isObject(_721)){_71d[j]=this._getItemByIdentity(_721);}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _722=this._arrayOfAllItems[k],_723=true;for(var _724 in _721){if(_722[_724]!=_721[_724]){_723=false;}}if(_723){_71d[j]=_722;}}}if(this.referenceIntegrity){var _725=_71d[j];if(this.isItem(_725)){this._addReferenceToMap(_725,item,key);}}}else{if(this.isItem(_71c)){if(this.referenceIntegrity){this._addReferenceToMap(_71c,item,key);}}}}}}}},_addReferenceToMap:function(_726,_727,_728){},getIdentity:function(item){var _729=this._features["dojo.data.api.Identity"];if(_729===Number){return item[this._itemNumPropName];}else{var _72a=item[_729];if(_72a){return _72a[0];}}return null;},fetchItemByIdentity:function(_72b){var item,_72c;if(!this._loadFinished){var self=this;if(this._jsonFileUrl!==this._ccUrl){_4.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_72b});}else{this._loadInProgress=true;var _72d={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _72e=_4.xhrGet(_72d);_72e.addCallback(function(data){var _72f=_72b.scope?_72b.scope:_4.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;item=self._getItemByIdentity(_72b.identity);if(_72b.onItem){_72b.onItem.call(_72f,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_72b.onError){_72b.onError.call(_72f,error);}}});_72e.addErrback(function(_730){self._loadInProgress=false;if(_72b.onError){var _731=_72b.scope?_72b.scope:_4.global;_72b.onError.call(_731,_730);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;item=self._getItemByIdentity(_72b.identity);if(_72b.onItem){_72c=_72b.scope?_72b.scope:_4.global;_72b.onItem.call(_72c,item);}}}}else{item=this._getItemByIdentity(_72b.identity);if(_72b.onItem){_72c=_72b.scope?_72b.scope:_4.global;_72b.onItem.call(_72c,item);}}},_getItemByIdentity:function(_732){var item=null;if(this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,_732)){item=this._itemsByIdentity[_732];}else{if(Object.hasOwnProperty.call(this._arrayOfAllItems,_732)){item=this._arrayOfAllItems[_732];}}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _733=this._features["dojo.data.api.Identity"];if(_733===Number){return null;}else{return [_733];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl!==this._ccUrl){_4.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){var _734={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};var _735=_4.xhrGet(_734);_735.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_735.addErrback(function(_736){throw _736;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});_4.extend(_4.data.ItemFileReadStore,_4.data.util.simpleFetch);}if(!_4._hasResource["dijit.dijit"]){_4._hasResource["dijit.dijit"]=true;_4.provide("dijit.dijit");}if(!_4._hasResource["dojox.html.metrics"]){_4._hasResource["dojox.html.metrics"]=true;_4.provide("dojox.html.metrics");(function(){var dhm=_6.html.metrics;dhm.getFontMeasurements=function(){var _737={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(_4.isIE){_4.doc.documentElement.style.fontSize="100%";}var div=_4.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";_4.body().appendChild(div);for(var p in _737){ds.fontSize=p;_737[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}_4.body().removeChild(div);div=null;return _737;};var _738=null;dhm.getCachedFontMeasurements=function(_739){if(_739||!_738){_738=dhm.getFontMeasurements();}return _738;};var _73a=null,_73b={};dhm.getTextBox=function(text,_73c,_73d){var m,s;if(!_73a){m=_73a=_4.doc.createElement("div");var c=_4.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";_4.body().appendChild(c);}else{m=_73a;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_73c){for(var i in _73c){if(i in _73b){continue;}s[i]=_73c[i];}}if(arguments.length>2&&_73d){m.className=_73d;}m.innerHTML=text;var box=_4.position(m);box.w=m.parentNode.scrollWidth;return box;};var _73e={w:16,h:16};dhm.getScrollbar=function(){return {w:_73e.w,h:_73e.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_73f){var f=dhm._fontResizeNode=_4.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";if(_4.isIE){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[_6._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[_6._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");_4.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};_4.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(_4.isIE&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});_4.addOnLoad(function(){try{var n=_4.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";_4.body().appendChild(n);_73e.w=n.offsetWidth-n.clientWidth;_73e.h=n.offsetHeight-n.clientHeight;_4.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in _4.config&&!!_4.config.fontSizeWatch){dhm.initOnFontResize();}});})();}if(!_4._hasResource["dojox.grid.util"]){_4._hasResource["dojox.grid.util"]=true;_4.provide("dojox.grid.util");(function(){var dgu=_6.grid.util;dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,args){var fn=ob&&ev&&ob[ev];return fn&&(args?fn.apply(ob,args):ob[ev]());};dgu.setStyleHeightPx=function(_740,_741){if(_741>=0){var s=_740.style;var v=_741+"px";if(_740&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_742,_743,_744,_745){var evts=(_745?_745:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_743.connect(_742,"on"+evts[i],_744);}};dgu.removeNode=function(_746){_746=_4.byId(_746);_746&&_746.parentNode&&_746.parentNode.removeChild(_746);return _746;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_747,_748,_749){if(_747.length<=_748){_747[_748]=_749;}else{_747.splice(_748,0,_749);}};dgu.arrayRemove=function(_74a,_74b){_74a.splice(_74b,1);};dgu.arraySwap=function(_74c,inI,inJ){var _74d=_74c[inI];_74c[inI]=_74c[inJ];_74c[inJ]=_74d;};})();}if(!_4._hasResource["dojox.grid._Scroller"]){_4._hasResource["dojox.grid._Scroller"]=true;_4.provide("dojox.grid._Scroller");(function(){var _74e=function(_74f){var i=0,n,p=_74f.parentNode;while((n=p.childNodes[i++])){if(n==_74f){return i-1;}}return -1;};var _750=function(_751){if(!_751){return;}var _752=function(inW){return inW.domNode&&_4.isDescendant(inW.domNode,_751,true);};var ws=_5.registry.filter(_752);for(var i=0,w;(w=ws[i]);i++){w.destroy();}delete ws;};var _753=function(_754){var node=_4.byId(_754);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _755=function(_756,_757){var _758=[];var i=0,n;while((n=_756.childNodes[i])){i++;if(_753(n)==_757){_758.push(n);}}return _758;};var _759=function(_75a){return _755(_75a,"div");};_4.declare("dojox.grid._Scroller",null,{constructor:function(_75b){this.setContentNodes(_75b);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_75c,_75d,_75e){switch(arguments.length){case 3:this.rowsPerPage=_75e;case 2:this.keepRows=_75d;case 1:this.rowCount=_75c;default:break;}this.defaultPageHeight=this.defaultRowHeight*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=_4.hitch(this,"onscroll");}},_getPageCount:function(_75f,_760){return _75f?(Math.ceil(_75f/_760)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_761){this.keepRows=_761;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_762){this.contentNodes=_762;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_763){this.invalidateNodes();this.rowCount=_763;var _764=this.pageCount;if(_764===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_764){for(var i=_764-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_764){this.height+=this.defaultPageHeight*(this.pageCount-_764-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_765){return Boolean(this.getDefaultPageNode(_765));},measurePage:function(_766){if(this.grid.rowHeight){var _767=this.grid.rowHeight+1;return ((_766+1)*this.rowsPerPage>this.rowCount?this.rowCount-_766*this.rowsPerPage:this.rowsPerPage)*_767;}var n=this.getDefaultPageNode(_766);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_768,_769){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_768].style.top=_769+"px";}},repositionPages:function(_76a){var _76b=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_76b[_76a];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_76a):0);for(var p=_76a+1;p<=last;p++){n=_76b[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_76c){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_76c]);}},preparePage:function(_76d,_76e){var p=(_76e?this.popPage():null);for(var i=0;i<this.colCount;i++){var _76f=this.pageNodes[i];var _770=(p===null?this.createPageNode():this.invalidatePageNode(p,_76f));_770.pageIndex=_76d;_76f[_76d]=_770;}},renderPage:function(_771){var _772=[];var i,j;for(i=0;i<this.colCount;i++){_772[i]=this.pageNodes[i][_771];}for(i=0,j=_771*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_772);}},removePage:function(_773){for(var i=0,j=_773*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_774){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_774,this.pageNodes[i]);if(n){_4.destroy(n);}}},pacify:function(_775){},pacifying:false,pacifyTicks:200,setPacifying:function(_776){if(this.pacifying!=_776){this.pacifying=_776;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _777=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _777;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){_6.grid.util.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _778=(!this._invalidating);if(!_778){var ah=this.grid.get("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_778=true;}}if(_778){this.needPage(this.page,this.pageTop);}var _779=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _77a=this.getPageHeight(this.page);this.averageRowHeight=(_77a>0&&_779>0)?(_77a/_779):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _77b=this.pageCount-1;var _77c=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_77b]=_77c;return _77c;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_77d,_77e,_77f){if(this.pageExists(_77d)){var oh=this.getPageHeight(_77d);var h=(this.measurePage(_77d));if(h===undefined){h=oh;}this.pageHeights[_77d]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.get("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_77e)){if(!_77f){this.grid.sizeChange();}else{var ns=this.grid.viewsNode.style;ns.height=parseInt(ns.height)+h-oh+"px";this.repositionPages(_77d);}}else{this.repositionPages(_77d);}}return h;}return 0;},rowHeightChanged:function(_780,_781){this.updatePageHeight(Math.floor(_780/this.rowsPerPage),false,_781);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");_4.attr(p,"role","presentation");p.style.position="absolute";p.style[_4._isBodyLtr()?"left":"right"]="0";return p;},getPageHeight:function(_782){var ph=this.pageHeights[_782];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_783){return this.stack.push(_783);},popPage:function(){return this.stack.shift();},findPage:function(_784){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_784){break;}}this.page=i;this.pageTop=h;},buildPage:function(_785,_786,_787){this.preparePage(_785,_786);this.positionPage(_785,_787);this.installPage(_785);this.renderPage(_785);this.pushPage(_785);},needPage:function(_788,_789){var h=this.getPageHeight(_788),oh=h;if(!this.pageExists(_788)){this.buildPage(_788,(!this.grid._autoHeight&&this.keepPages&&(this.stack.length>=this.keepPages)),_789);h=this.updatePageHeight(_788,true);}else{this.positionPage(_788,_789);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_78a){this.grid.scrollTop=_78a;if(this.colCount){this.startPacify();this.findPage(_78a);var h=this.height;var b=this.getScrollBottom(_78a);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_78a);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_78b){return (this.windowHeight>=0?_78b+this.windowHeight:-1);},processNodeEvent:function(e,_78c){var t=e.target;while(t&&(t!=_78c)&&t.parentNode&&(t.parentNode.parentNode!=_78c)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_78c)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_74e(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_78d,_78e){},removeRow:function(_78f){},getDefaultPageNode:function(_790){return this.getDefaultNodes()[_790];},positionPageNode:function(_791,_792){},getPageNodePosition:function(_793){return _793.offsetTop;},invalidatePageNode:function(_794,_795){var p=_795[_794];if(p){delete _795[_794];this.removePage(_794,p);_750(p);p.innerHTML="";}return p;},getPageRow:function(_796){return _796*this.rowsPerPage;},getLastPageRow:function(_797){return Math.min(this.rowCount,this.getPageRow(_797+1))-1;},getFirstVisibleRow:function(_798,_799,_79a){if(!this.pageExists(_798)){return 0;}var row=this.getPageRow(_798);var _79b=this.getDefaultNodes();var rows=_759(_79b[_798]);for(var i=0,l=rows.length;i<l&&_799<_79a;i++,row++){_799+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_79c,_79d,_79e){if(!this.pageExists(_79c)){return 0;}var _79f=this.getDefaultNodes();var row=this.getLastPageRow(_79c);var rows=_759(_79f[_79c]);for(var i=rows.length-1;i>=0&&_79d>_79e;i--,row--){_79d-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_7a0){var _7a1=this.getDefaultNodes();var rows=_759(_7a1[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_7a0){this.offset=h-(t-_7a0);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_7a2){var _7a3=Math.floor(_7a2/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_7a3;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.page=_7a3;this.needPage(_7a3,this.pageTop);var _7a4=this.getDefaultNodes();var rows=_759(_7a4[_7a3]);var r=_7a2-this.rowsPerPage*_7a3;for(i=0,l=rows.length;i<l&&i<r;i++){t+=rows[i].offsetHeight;}return t;},dummy:0});})();}if(!_4._hasResource["dojox.grid.cells._base"]){_4._hasResource["dojox.grid.cells._base"]=true;_4.provide("dojox.grid.cells._base");_4.declare("dojox.grid._DeferredTextWidget",_5._Widget,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(_4.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});(function(){var _7a5=function(_7a6){try{_6.grid.util.fire(_7a6,"focus");_6.grid.util.fire(_7a6,"select");}catch(e){}};var _7a7=function(){setTimeout(_4.hitch.apply(_4,arguments),0);};var dgc=_6.grid.cells;_4.declare("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_7a8){this._props=_7a8||{};_4.mixin(this,_7a8);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_7a9,_7aa){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_7a9!=this.defaultValue&&f)?f.apply(s,_7aa):_7a9;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new _6.grid._DeferredTextWidget({deferred:v},_4.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_7ab,_7ac){var f,i=this.grid.edit.info,d=this.get?this.get(_7ab,_7ac):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&(?![a-z0-9]{1,8}\;)/ig,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_7ab&&i.cell==this))){return this.formatEditing(d,_7ab);}else{return this._defaultFormat(d,[d,_7ab,this]);}},formatEditing:function(_7ad,_7ae){},getNode:function(_7af){return this.view.getCellNode(_7af,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_7b0){return (this.getNode(_7b0)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&_4.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_7b1,_7b2){this.grid.edit.applyCellEdit(_7b1,this,_7b2);},cancelEdit:function(_7b3){this.grid.doCancelEdit(_7b3);},_onEditBlur:function(_7b4){if(this.grid.edit.isEditCell(_7b4,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_7b5,_7b6){if(this.commitOnBlur){_4.connect(_7b5,"onblur",function(e){setTimeout(_4.hitch(this,"_onEditBlur",_7b6),250);});}},needFormatNode:function(_7b7,_7b8){this._formatPending=true;_7a7(this,"_formatNode",_7b7,_7b8);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_7b9,_7ba){if(this._formatPending){this._formatPending=false;_4.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(_7ba),_7b9,_7ba);}},formatNode:function(_7bb,_7bc,_7bd){if(_4.isIE){_7a7(this,"focus",_7bd,_7bb);}else{this.focus(_7bd,_7bb);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_7be){return this.getEditNode(_7be)[this._valueProp];},setValue:function(_7bf,_7c0){var n=this.getEditNode(_7bf);if(n){n[this._valueProp]=_7c0;}},focus:function(_7c1,_7c2){_7a5(_7c2||this.getEditNode(_7c1));},save:function(_7c3){this.value=this.value||this.getValue(_7c3);},restore:function(_7c4){this.setValue(_7c4,this.value);},_finish:function(_7c5){_4.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_7c6){this.applyEdit(this.getValue(_7c6),_7c6);this._finish(_7c6);},cancel:function(_7c7){this.cancelEdit(_7c7);this._finish(_7c7);}});dgc._Base.markupFactory=function(node,_7c8){var d=_4;var _7c9=d.trim(d.attr(node,"formatter")||"");if(_7c9){_7c8.formatter=_4.getObject(_7c9)||_7c9;}var get=d.trim(d.attr(node,"get")||"");if(get){_7c8.get=_4.getObject(get);}var _7ca=function(attr,cell,_7cb){var _7cc=d.trim(d.attr(node,attr)||"");if(_7cc){cell[_7cb||attr]=!(_7cc.toLowerCase()=="false");}};_7ca("sortDesc",_7c8);_7ca("editable",_7c8);_7ca("alwaysEditing",_7c8);_7ca("noresize",_7c8);_7ca("draggable",_7c8);var _7cd=d.trim(d.attr(node,"loadingText")||d.attr(node,"defaultValue")||"");if(_7cd){_7c8.defaultValue=_7cd;}var _7ce=function(attr,cell,_7cf){var _7d0=d.trim(d.attr(node,attr)||"")||undefined;if(_7d0){cell[_7cf||attr]=_7d0;}};_7ce("styles",_7c8);_7ce("headerStyles",_7c8);_7ce("cellStyles",_7c8);_7ce("classes",_7c8);_7ce("headerClasses",_7c8);_7ce("cellClasses",_7c8);};_4.declare("dojox.grid.cells.Cell",dgc._Base,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_7d1,_7d2){this.needFormatNode(_7d1,_7d2);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_7d1+"\">";},formatNode:function(_7d3,_7d4,_7d5){this.inherited(arguments);this.registerOnBlur(_7d3,_7d5);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){_4.stopEvent(e);}}},_finish:function(_7d6){this.inherited(arguments);var n=this.getEditNode(_7d6);try{_6.grid.util.fire(n,"blur");}catch(e){}}});dgc.Cell.markupFactory=function(node,_7d7){dgc._Base.markupFactory(node,_7d7);var d=_4;var _7d8=d.trim(d.attr(node,"keyFilter")||"");if(_7d8){_7d7.keyFilter=new RegExp(_7d8);}};_4.declare("dojox.grid.cells.RowIndex",dgc.Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_7d9){return _7d9+1;}});dgc.RowIndex.markupFactory=function(node,_7da){dgc.Cell.markupFactory(node,_7da);};_4.declare("dojox.grid.cells.Select",dgc.Cell,{options:null,values:null,returnIndex:-1,constructor:function(_7db){this.values=this.values||this.options;},formatEditing:function(_7dc,_7dd){this.needFormatNode(_7dc,_7dd);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){h.push("<option",(_7dc==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},getValue:function(_7de){var n=this.getEditNode(_7de);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});dgc.Select.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);var d=_4;var _7df=d.trim(d.attr(node,"options")||"");if(_7df){var o=_7df.split(",");if(o[0]!=_7df){cell.options=o;}}var _7e0=d.trim(d.attr(node,"values")||"");if(_7e0){var v=_7e0.split(",");if(v[0]!=_7e0){cell.values=v;}}};_4.declare("dojox.grid.cells.AlwaysEdit",dgc.Cell,{alwaysEditing:true,_formatNode:function(_7e1,_7e2){this.formatNode(this.getEditNode(_7e2),_7e1,_7e2);},applyStaticValue:function(_7e3){var e=this.grid.edit;e.applyCellEdit(this.getValue(_7e3),this,_7e3);e.start(this,_7e3,true);}});dgc.AlwaysEdit.markupFactory=function(node,cell){dgc.Cell.markupFactory(node,cell);};_4.declare("dojox.grid.cells.Bool",dgc.AlwaysEdit,{_valueProp:"checked",formatEditing:function(_7e4,_7e5){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_7e4?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});dgc.Bool.markupFactory=function(node,cell){dgc.AlwaysEdit.markupFactory(node,cell);};})();}if(!_4._hasResource["dojox.grid.cells"]){_4._hasResource["dojox.grid.cells"]=true;_4.provide("dojox.grid.cells");}if(!_4._hasResource["dojo.dnd.common"]){_4._hasResource["dojo.dnd.common"]=true;_4.provide("dojo.dnd.common");_4.getObject("dnd",true,_4);_4.dnd.getCopyKeyState=_4.isCopyKey;_4.dnd._uniqueId=0;_4.dnd.getUniqueId=function(){var id;do{id=_4._scopeName+"Unique"+(++_4.dnd._uniqueId);}while(_4.byId(id));return id;};_4.dnd._empty={};_4.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!_4._hasResource["dojo.dnd.autoscroll"]){_4._hasResource["dojo.dnd.autoscroll"]=true;_4.provide("dojo.dnd.autoscroll");_4.getObject("dnd",true,_4);_4.dnd.getViewport=_4.window.getBox;_4.dnd.V_TRIGGER_AUTOSCROLL=32;_4.dnd.H_TRIGGER_AUTOSCROLL=32;_4.dnd.V_AUTOSCROLL_VALUE=16;_4.dnd.H_AUTOSCROLL_VALUE=16;_4.dnd.autoScroll=function(e){var v=_4.window.getBox(),dx=0,dy=0;if(e.clientX<_4.dnd.H_TRIGGER_AUTOSCROLL){dx=-_4.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-_4.dnd.H_TRIGGER_AUTOSCROLL){dx=_4.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<_4.dnd.V_TRIGGER_AUTOSCROLL){dy=-_4.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-_4.dnd.V_TRIGGER_AUTOSCROLL){dy=_4.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};_4.dnd._validNodes={"div":1,"p":1,"td":1};_4.dnd._validOverflow={"auto":1,"scroll":1};_4.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in _4.dnd._validNodes)){var s=_4.getComputedStyle(n);if(s.overflow.toLowerCase() in _4.dnd._validOverflow){var b=_4._getContentBox(n,s),t=_4.position(n,true);var w=Math.min(_4.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(_4.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-t.x,ry=e.pageY-t.y,dx=0,dy=0;if(_4.isWebKit||_4.isOpera){rx+=_4.body().scrollLeft;ry+=_4.body().scrollTop;}if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}}var _7e6=n.scrollLeft,_7e7=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(_7e6!=n.scrollLeft||_7e7!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}_4.dnd.autoScroll(e);};}if(!_4._hasResource["dojo.dnd.Mover"]){_4._hasResource["dojo.dnd.Mover"]=true;_4.provide("dojo.dnd.Mover");_4.declare("dojo.dnd.Mover",null,{constructor:function(node,e,host){this.node=_4.byId(node);var pos=e.touches?e.touches[0]:e;this.marginBox={l:pos.pageX,t:pos.pageY};this.mouseButton=e.button;var h=(this.host=host),d=node.ownerDocument;this.events=[_4.connect(d,"onmousemove",this,"onFirstMove"),_4.connect(d,"ontouchmove",this,"onFirstMove"),_4.connect(d,"onmousemove",this,"onMouseMove"),_4.connect(d,"ontouchmove",this,"onMouseMove"),_4.connect(d,"onmouseup",this,"onMouseUp"),_4.connect(d,"ontouchend",this,"onMouseUp"),_4.connect(d,"ondragstart",_4.stopEvent),_4.connect(d.body,"onselectstart",_4.stopEvent)];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){_4.dnd.autoScroll(e);var m=this.marginBox,pos=e.touches?e.touches[0]:e;this.host.onMove(this,{l:m.l+pos.pageX,t:m.t+pos.pageY},e);_4.stopEvent(e);},onMouseUp:function(e){if(_4.isWebKit&&_4.isMac&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}_4.stopEvent(e);},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=_4.marginBox(this.node);var b=_4.doc.body;var bs=_4.getComputedStyle(b);var bm=_4._getMarginBox(b,bs);var bc=_4._getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}_4.disconnect(this.events.shift());_4.disconnect(this.events.shift());},destroy:function(){_4.forEach(this.events,_4.disconnect);var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});}if(!_4._hasResource["dojo.dnd.Moveable"]){_4._hasResource["dojo.dnd.Moveable"]=true;_4.provide("dojo.dnd.Moveable");_4.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(node,_7e8){this.node=_4.byId(node);if(!_7e8){_7e8={};}this.handle=_7e8.handle?_4.byId(_7e8.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_7e8.delay>0?_7e8.delay:0;this.skip=_7e8.skip;this.mover=_7e8.mover?_7e8.mover:_4.dnd.Mover;this.events=[_4.connect(this.handle,"onmousedown",this,"onMouseDown"),_4.connect(this.handle,"ontouchstart",this,"onMouseDown"),_4.connect(this.handle,"ondragstart",this,"onSelectStart"),_4.connect(this.handle,"onselectstart",this,"onSelectStart")];},markupFactory:function(_7e9,node){return new _4.dnd.Moveable(node,_7e9);},destroy:function(){_4.forEach(this.events,_4.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&_4.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(_4.connect(this.handle,"onmousemove",this,"onMouseMove"),_4.connect(this.handle,"ontouchmove",this,"onMouseMove"),_4.connect(this.handle,"onmouseup",this,"onMouseUp"),_4.connect(this.handle,"ontouchend",this,"onMouseUp"));var pos=e.touches?e.touches[0]:e;this._lastX=pos.pageX;this._lastY=pos.pageY;}else{this.onDragDetected(e);}_4.stopEvent(e);},onMouseMove:function(e){var pos=e.touches?e.touches[0]:e;if(Math.abs(pos.pageX-this._lastX)>this.delay||Math.abs(pos.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}_4.stopEvent(e);},onMouseUp:function(e){for(var i=0;i<2;++i){_4.disconnect(this.events.pop());}_4.stopEvent(e);},onSelectStart:function(e){if(!this.skip||!_4.dnd.isFormElement(e)){_4.stopEvent(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_7ea){_4.publish("/dnd/move/start",[_7ea]);_4.addClass(_4.body(),"dojoMove");_4.addClass(this.node,"dojoMoveItem");},onMoveStop:function(_7eb){_4.publish("/dnd/move/stop",[_7eb]);_4.removeClass(_4.body(),"dojoMove");_4.removeClass(this.node,"dojoMoveItem");},onFirstMove:function(_7ec,e){},onMove:function(_7ed,_7ee,e){this.onMoving(_7ed,_7ee);var s=_7ed.node.style;s.left=_7ee.l+"px";s.top=_7ee.t+"px";this.onMoved(_7ed,_7ee);},onMoving:function(_7ef,_7f0){},onMoved:function(_7f1,_7f2){}});}if(!_4._hasResource["dojox.grid._Builder"]){_4._hasResource["dojox.grid._Builder"]=true;_4.provide("dojox.grid._Builder");(function(){var dg=_6.grid;var _7f3=function(td){return td.cellIndex>=0?td.cellIndex:_4.indexOf(td.parentNode.cells,td);};var _7f4=function(tr){return tr.rowIndex>=0?tr.rowIndex:_4.indexOf(tr.parentNode.childNodes,tr);};var _7f5=function(_7f6,_7f7){return _7f6&&((_7f6.rows||0)[_7f7]||_7f6.childNodes[_7f7]);};var _7f8=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _7f9=function(_7fa,_7fb){for(var n=_7fa;n&&_7fb(n);n=n.parentNode){}return n;};var _7fc=function(_7fd){var name=_7fd.toUpperCase();return function(node){return node.tagName!=name;};};var _7fe=_6.grid.util.rowIndexTag;var _7ff=_6.grid.util.gridViewTag;dg._Builder=_4.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_800,_801,_802,_803){var _804=[],html;if(_803){var _805=_800.index!=_800.grid.getSortIndex()?"":_800.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_800.id){_800.id=this.grid.id+"Hdr"+_800.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_805,"id=\"",_800.id,"\""];}else{var _806=this.grid.editable&&!_800.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_806];}if(_800.colSpan){html.push(" colspan=\"",_800.colSpan,"\"");}if(_800.rowSpan){html.push(" rowspan=\"",_800.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_800.classes){html.push(_800.classes," ");}if(_802){html.push(_802," ");}_804.push(html.join(""));_804.push("");html=["\" idx=\"",_800.index,"\" style=\""];if(_801&&_801[_801.length-1]!=";"){_801+=";";}html.push(_800.styles,_801||"",_800.hidden?"display:none;":"");if(_800.unitWidth){html.push("width:",_800.unitWidth,";");}_804.push(html.join(""));_804.push("");html=["\""];if(_800.attrs){html.push(" ",_800.attrs);}html.push(">");_804.push(html.join(""));_804.push("");_804.push(_803?"</th>":"</td>");return _804;},isCellNode:function(_807){return Boolean(_807&&_807!=_4.doc&&_4.attr(_807,"idx"));},getCellNodeIndex:function(_808){return _808?Number(_4.attr(_808,"idx")):-1;},getCellNode:function(_809,_80a){for(var i=0,row;((row=_7f5(_809.firstChild,i))&&row.cells);i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_80a){return cell;}}}return null;},findCellTarget:function(_80b,_80c){var n=_80b;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_7ff in n.offsetParent.parentNode&&n.offsetParent.parentNode[_7ff]!=this.view.id))&&(n!=_80c)){n=n.parentNode;}return n!=_80c?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_80d,_80e){var n=_80d;while(n&&(n!=this.domNode)&&(!(_80e in n)||(_7ff in n&&n[_7ff]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_80f){return this.findTarget(_80f,_7fe);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&_4.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});dg._ContentBuilder=_4.extend(function(view){dg._Builder.call(this,view);},dg._Builder.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _810=this.grid.get,_811=this.view.structure.cells;for(var j=0,row;(row=_811[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_810;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_812,_813){var html=this.getTableArray(),v=this.view,_814=v.structure.cells,item=this.grid.getItem(_813);_6.grid.util.fire(this.view,"onBeforeRow",[_813,_814]);for(var j=0,row;(row=_814[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_813,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_7fe];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});dg._HeaderBuilder=_4.extend(function(view){this.moveable=null;dg._Builder.call(this,view);},dg._Builder.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_815,_816){var html=this.getTableArray(),_817=this.view.structure.cells;_6.grid.util.fire(this.view,"onBeforeRow",[-1,_817]);for(var j=0,row;(row=_817[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_818;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_818=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_818[5]=(_816!=undefined?_816:_815(cell));_818[3]=cell.customStyles.join(";");_818[1]=cell.customClasses.join(" ");html.push(_818.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(_4.isMoz||_4.isIE>=9){n=_7f9(e.target,_7fc("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!_4._isBodyLtr()){table=_7f9(n,_7fc("table"));x-=(table&&table.offsetLeft)||0;}}n=_7f9(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=_7f3(e.cellNode);e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(_4.hasClass(_4.body(),"dojoDndMove")){return false;}if(_4.isIE){var tN=e.target;if(_4.hasClass(tN,"dojoxGridArrowButtonNode")||_4.hasClass(tN,"dojoxGridArrowButtonChar")){return false;}}if(_4._isBodyLtr()){return (e.cellIndex>0)&&(e.cellX>0&&e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX>0&&e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(_4.hasClass(_4.body(),"dojoDndMove")){return false;}if(_4.isIE){var tN=e.target;if(_4.hasClass(tN,"dojoxGridArrowButtonNode")||_4.hasClass(tN,"dojoxGridArrowButtonChar")){return false;}}if(_4._isBodyLtr()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}_4.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));_4.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(_4.isIE){var t=e.sourceView.headerNode.scrollLeft;e.sourceView.headerNode.scrollLeft=t;}if(c){_4.stopEvent(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){_4.stopEvent(e);return true;}return false;},colResizeSetup:function(e,_819){var _81a=_4.contentBox(e.sourceView.headerNode);if(_819){this.lineDiv=document.createElement("div");var vw=(_4.position||_4._abs)(e.sourceView.headerNode,true);var _81b=_4.contentBox(e.sourceView.domNode);var l=e.pageX;if(!_4._isBodyLtr()&&_4.isIE<8){l-=_6.html.metrics.getScrollbar().w;}_4.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_81b.h+_81a.h)+"px"});_4.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;_4.body().appendChild(this.lineDiv);}var _81c=[],_81d=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_81d[i]);i++){_81c.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=_4._isBodyLtr()?1:-1;var _81e=e.grid.views.views;var _81f=[];for(var j=view.idx+adj,_820;(_820=_81e[j]);j=j+adj){_81f.push({node:_820.headerNode,left:window.parseInt(_820.headerNode.style.left)});}var _821=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:_4.contentBox(e.cellNode).w,vw:_81a.w,table:_821,tw:_4.contentBox(_821).w,spanners:_81c,followers:_81f};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");_4.style(this.moverDiv,{position:"absolute",left:0});_4.body().appendChild(this.moverDiv);_4.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new _4.dnd.Moveable(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=_4.hitch(this,"doResizeColumn",drag);_4.connect(m,"onMoveStop",_4.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;_4.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_822,_823,_824){var _825=_824.l;var data={deltaX:_825,w:_822.w+(_4._isBodyLtr()?_825:-_825),vw:_822.vw+_825,tw:_822.tw+_825};this.dragRecord={inDrag:_822,mover:_823,leftTop:_824};if(data.w>=this.minColWidth){if(!_823){this.doResizeNow(_822,data);}else{_4.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_826){if(this.dragRecord){var _827=this.dragRecord.leftTop;var _828=_4._isBodyLtr()?_827.l:-_827.l;_828+=Math.max(_826.w+_828,this.minColWidth)-(_826.w+_828);if(_4.isWebKit&&_826.spanners.length){_828+=_4._getPadBorderExtents(_826.spanners[0].node).w;}var data={deltaX:_828,w:_826.w+_828,vw:_826.vw+_828,tw:_826.tw+_828};this.doResizeNow(_826,data);delete this.dragRecord;}_4.destroy(this.lineDiv);_4.destroy(this.moverDiv);_4.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_826.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_826.index);},doResizeNow:function(_829,data){_829.view.convertColPctToFixed();if(_829.view.flexCells&&!_829.view.testFlexCells()){var t=_7f8(_829.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_829.spanners[i]);i++){sw=s.width+data.deltaX;if(sw>0){s.node.style.width=sw+"px";_829.view.setColWidth(s.index,sw);}}if(_4._isBodyLtr()||!_4.isIE){for(i=0;(f=_829.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_829.node.style.width=data.w+"px";_829.view.setColWidth(_829.index,data.w);_829.view.headerNode.style.width=data.vw+"px";_829.view.setColumnsWidth(data.tw);if(!_4._isBodyLtr()){_829.view.headerNode.scrollLeft=_829.scrollLeft+data.deltaX;}}});dg._TableMap=_4.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_82a){var _82b=_82a.length;if(!_82b){return;}this.map=[];var row;for(var k=0;(row=_82a[k]);k++){this.map[k]=[];}for(var j=0;(row=_82a[j]);j++){for(var i=0,x=0,cell,_82c,_82d;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_82d=cell.rowSpan||1;_82c=cell.colSpan||1;for(var y=0;y<_82d;y++){for(var s=0;s<_82c;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_82c;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(_82e,_82f){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_82f&&cell.r==_82e){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_830,_831,_832){var row=_830&&_830.rows[_831];return row&&row.cells[_832];},_findOverlappingNodes:function(_833,_834,_835){var _836=[];var m=this.getMapCoords(_834,_835);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_833,rw.r,rw.c):null);if(n){_836.push(n);}}return _836;},findOverlappingNodes:function(_837){return this._findOverlappingNodes(_7f8(_837),_7f4(_837.parentNode),_7f3(_837));}});})();}if(!_4._hasResource["dojo.dnd.Container"]){_4._hasResource["dojo.dnd.Container"]=true;_4.provide("dojo.dnd.Container");_4.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(node,_838){this.node=_4.byId(node);if(!_838){_838={};}this.creator=_838.creator||null;this.skipForm=_838.skipForm;this.parent=_838.dropParent&&_4.byId(_838.dropParent);this.map={};this.current=null;this.containerState="";_4.addClass(this.node,"dojoDndContainer");if(!(_838&&_838._skipStartup)){this.startup();}this.events=[_4.connect(this.node,"onmouseover",this,"onMouseOver"),_4.connect(this.node,"onmouseout",this,"onMouseOut"),_4.connect(this.node,"ondragstart",this,"onSelectStart"),_4.connect(this.node,"onselectstart",this,"onSelectStart")];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||_4.global;var m=this.map,e=_4.dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return _4.query("> .dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=_4.dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_839,_83a){if(!this.parent.firstChild){_83a=null;}else{if(_839){if(!_83a){_83a=this.parent.firstChild;}}else{if(_83a){_83a=_83a.nextSibling;}}}if(_83a){for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.insertBefore(t.node,_83a);}}else{for(var i=0;i<data.length;++i){var t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){_4.forEach(this.events,_4.disconnect);this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_83b,node){_83b._skipStartup=true;return new _4.dnd.Container(node,_83b);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=_4.dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!_4.dnd.isFormElement(e)){_4.stopEvent(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_83c){var _83d="dojoDnd"+type;var _83e=type.toLowerCase()+"State";_4.replaceClass(this.node,_83d+_83c,_83d+this[_83e]);this[_83e]=_83c;},_addItemClass:function(node,type){_4.addClass(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_4.removeClass(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _83f=node.parentNode;_83f;node=_83f,_83f=node.parentNode){if(_83f==this.parent&&_4.hasClass(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!_4.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=_4.dnd.getUniqueId();}_4.addClass(t.node,"dojoDndItem");return t;}});_4.dnd._createNode=function(tag){if(!tag){return _4.dnd._createSpan;}return function(text){return _4.create(tag,{innerHTML:text});};};_4.dnd._createTrTd=function(text){var tr=_4.create("tr");_4.create("td",{innerHTML:text},tr);return tr;};_4.dnd._createSpan=function(text){return _4.create("span",{innerHTML:text});};_4.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};_4.dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?_4.dnd._createTrTd:_4.dnd._createNode(_4.dnd._defaultCreatorNodes[tag]);return function(item,hint){var _840=item&&_4.isObject(item),data,type,n;if(_840&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(_840&&item.data)?item.data:item;type=(_840&&item.type)?item.type:["text"];n=(hint=="avatar"?_4.dnd._createSpan:c)(String(data));}if(!n.id){n.id=_4.dnd.getUniqueId();}return {node:n,data:data,type:type};};};}if(!_4._hasResource["dojo.dnd.Selector"]){_4._hasResource["dojo.dnd.Selector"]=true;_4.provide("dojo.dnd.Selector");_4.declare("dojo.dnd.Selector",_4.dnd.Container,{constructor:function(node,_841){if(!_841){_841={};}this.singular=_841.singular;this.autoSync=_841.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(_4.connect(this.node,"onmousedown",this,"onMouseDown"),_4.connect(this.node,"onmouseup",this,"onMouseUp"));},singular:false,getSelectedNodes:function(){var t=new _4.NodeList();var e=_4.dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(_4.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(_4.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=_4.dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=_4.byId(i);this.delItem(i);_4.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||_4.global;var s=this.selection,e=_4.dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){_4.dnd.Selector.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=_4.dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}_4.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_842,data,_843,_844){var _845=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_845.call(this,item,hint);if(_842){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};_4.dnd.Selector.superclass.insertNodes.call(this,data,_843,_844);this._normalizedCreator=_845;return this;},destroy:function(){_4.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null;},markupFactory:function(_846,node){_846._skipStartup=true;return new _4.dnd.Selector(node,_846);},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!_4.isCopyKey(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(e.button===_4.mouseButtons.LEFT){_4.stopEvent(e);}return;}if(!this.singular&&e.shiftKey){if(!_4.isCopyKey(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0;for(;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){var node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(_4.isCopyKey(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(_4.isCopyKey(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}_4.stopEvent(e);},onMouseUp:function(e){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(e){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=_4.connect(this.node,"onmousemove",this,"onMouseMove");},onOutEvent:function(){_4.disconnect(this.onmousemoveEvent);delete this.onmousemoveEvent;},_removeSelection:function(){var e=_4.dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=_4.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});}if(!_4._hasResource["dojo.dnd.Avatar"]){_4._hasResource["dojo.dnd.Avatar"]=true;_4.provide("dojo.dnd.Avatar");_4.declare("dojo.dnd.Avatar",null,{constructor:function(_847){this.manager=_847;this.construct();},construct:function(){this.isA11y=_4.hasClass(_4.body(),"dijit_a11y");var a=_4.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_848=this.manager.source,node,b=_4.create("tbody",null,a),tr=_4.create("tr",null,b),td=_4.create("td",null,tr),icon=this.isA11y?_4.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td):null,span=_4.create("span",{innerHTML:_848.generateText?this._generateText():""},td),k=Math.min(5,this.manager.nodes.length),i=0;_4.attr(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_848.creator){node=_848._normalizedCreator(_848.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _849=_4.create("table"),_84a=_4.create("tbody",null,_849);_84a.appendChild(node);node=_849;}}node.id="";tr=_4.create("tr",null,b);td=_4.create("td",null,tr);td.appendChild(node);_4.attr(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_4.destroy(this.node);this.node=false;},update:function(){_4[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");if(this.isA11y){var icon=_4.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}_4.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(node){node.innerHTML=this._generateText();},this);},_generateText:function(){return this.manager.nodes.length.toString();}});}if(!_4._hasResource["dojo.dnd.Manager"]){_4._hasResource["dojo.dnd.Manager"]=true;_4.provide("dojo.dnd.Manager");_4.declare("dojo.dnd.Manager",null,{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:16,OFFSET_Y:16,overSource:function(_84b){if(this.avatar){this.target=(_84b&&_84b.targetState!="Disabled")?_84b:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}_4.publish("/dnd/source/over",[_84b]);},outSource:function(_84c){if(this.avatar){if(this.target==_84c){this.target=null;this.canDropFlag=false;this.avatar.update();_4.publish("/dnd/source/over",[null]);}}else{_4.publish("/dnd/source/over",[null]);}},startDrag:function(_84d,_84e,copy){this.source=_84d;this.nodes=_84e;this.copy=Boolean(copy);this.avatar=this.makeAvatar();_4.body().appendChild(this.avatar.node);_4.publish("/dnd/start",[_84d,_84e,this.copy]);this.events=[_4.connect(_4.doc,"onmousemove",this,"onMouseMove"),_4.connect(_4.doc,"onmouseup",this,"onMouseUp"),_4.connect(_4.doc,"onkeydown",this,"onKeyDown"),_4.connect(_4.doc,"onkeyup",this,"onKeyUp"),_4.connect(_4.doc,"ondragstart",_4.stopEvent),_4.connect(_4.body(),"onselectstart",_4.stopEvent)];var c="dojoDnd"+(copy?"Copy":"Move");_4.addClass(_4.body(),c);},canDrop:function(flag){var _84f=Boolean(this.target&&flag);if(this.canDropFlag!=_84f){this.canDropFlag=_84f;this.avatar.update();}},stopDrag:function(){_4.removeClass(_4.body(),["dojoDndCopy","dojoDndMove"]);_4.forEach(this.events,_4.disconnect);this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new _4.dnd.Avatar(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){_4.dnd.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(_4.isCopyKey(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(_4.isCopyKey(e))),_850=[this.source,this.nodes,copy,this.target,e];_4.publish("/dnd/drop/before",_850);_4.publish("/dnd/drop",_850);}else{_4.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case _4.keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case _4.keys.ESCAPE:_4.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==_4.keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();_4.replaceClass(_4.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});_4.dnd._manager=null;_4.dnd.manager=function(){if(!_4.dnd._manager){_4.dnd._manager=new _4.dnd.Manager();}return _4.dnd._manager;};}if(!_4._hasResource["dojo.dnd.Source"]){_4._hasResource["dojo.dnd.Source"]=true;_4.provide("dojo.dnd.Source");_4.declare("dojo.dnd.Source",_4.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_851){_4.mixin(this,_4.mixin({},_851));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_4.addClass(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_4.addClass(this.node,"dojoDndTarget");}if(this.horizontal){_4.addClass(this.node,"dojoDndHorizontal");}this.topics=[_4.subscribe("/dnd/source/over",this,"onDndSourceOver"),_4.subscribe("/dnd/start",this,"onDndStart"),_4.subscribe("/dnd/drop",this,"onDndDrop"),_4.subscribe("/dnd/cancel",this,"onDndCancel")];},checkAcceptance:function(_852,_853){if(this==_852){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_853.length;++i){var type=_852.getItem(_853[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_854,self){if(_854){return true;}if(arguments.length<2){self=this==_4.dnd.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){_4.dnd.Source.superclass.destroy.call(this);_4.forEach(this.topics,_4.unsubscribe);this.targetAnchor=null;},markupFactory:function(_855,node){_855._skipStartup=true;return new _4.dnd.Source(node,_855);},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}_4.dnd.Source.superclass.onMouseMove.call(this,e);var m=_4.dnd.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _856=this.getSelectedNodes();if(_856.length){m.startDrag(this,_856,this.copyState(_4.isCopyKey(e),true));}}}if(this.isDragging){var _857=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=_4.position(this.current,true);}if(this.horizontal){_857=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);}else{_857=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_857!=this.before){this._markTargetAnchor(_857);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!_4.dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;_4.dnd.Source.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;_4.dnd.Source.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_858){if(this!=_858){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=_4.dnd.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_859,_85a,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_859?(copy?"Copied":"Moved"):"");}var _85b=this.accept&&this.checkAcceptance(_859,_85a);this._changeState("Target",_85b?"":"Disabled");if(this==_859){_4.dnd.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_85c,_85d,copy,_85e){if(this==_85e){this.onDrop(_85c,_85d,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_85f,_860,copy){if(this!=_85f){this.onDropExternal(_85f,_860,copy);}else{this.onDropInternal(_860,copy);}},onDropExternal:function(_861,_862,copy){var _863=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _863.call(this,_861.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node,hint){var t=_861.getItem(node.id);var n=node.cloneNode(true);n.id=_4.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node,hint){var t=_861.getItem(node.id);_861.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_861.selectNone();}this.insertNodes(true,_862,this.before,this.current);if(!copy&&this.creator){_861.deleteSelectedNodes();}this._normalizedCreator=_863;},onDropInternal:function(_864,copy){var _865=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _865.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=_4.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node,hint){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_864,this.before,this.current);this._normalizedCreator=_865;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){_4.dnd.Source.superclass.onOverEvent.call(this);_4.dnd.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){_4.dnd.Source.superclass.onOutEvent.call(this);_4.dnd.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_866){if(this.current==this.targetAnchor&&this.before==_866){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_866;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(!_4.mouseButtons.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(_4.hasClass(node,"dojoDndHandle")){return true;}if(_4.hasClass(node,"dojoDndItem")||_4.hasClass(node,"dojoDndIgnore")){break;}}return false;}});_4.declare("dojo.dnd.Target",_4.dnd.Source,{constructor:function(node,_867){this.isSource=false;_4.removeClass(this.node,"dojoDndSource");},markupFactory:function(_868,node){_868._skipStartup=true;return new _4.dnd.Target(node,_868);}});_4.declare("dojo.dnd.AutoSource",_4.dnd.Source,{constructor:function(node,_869){this.autoSync=true;},markupFactory:function(_86a,node){_86a._skipStartup=true;return new _4.dnd.AutoSource(node,_86a);}});}if(!_4._hasResource["dojox.grid._View"]){_4._hasResource["dojox.grid._View"]=true;_4.provide("dojox.grid._View");(function(){var _86b=function(_86c,_86d){return _86c.style.cssText==undefined?_86c.getAttribute("style"):_86c.style.cssText;};_4.declare("dojox.grid._View",[_5._Widget,_5._Templated],{defaultWidth:"18em",viewWidth:"",templateString:"<div class=\"dojoxGridView\" role=\"presentation\">\r\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\r\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\r\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\r\n\t\t</div>\r\n\t</div>\r\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\r\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\r\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\r\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\r\n\t</div>\r\n</div>\r\n",themeable:false,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:_6.grid._HeaderBuilder,_contentBuilderClass:_6.grid._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");_6.grid.util.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);_6.grid.util.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!_4._isBodyLtr()){this.headerNodeContainer.style.width="";}},destroy:function(){_4.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){_4.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(_4.isIE||_4.isWebKit||_4.isOpera){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_86e){var vs=(this.structure=_86e);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_86f){if(_86f){_4.forEach(_4.query("[widgetId]",_86f).map(_5.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_870,_871){this._onBeforeRow(_870,_871);if(_870>=0){this._cleanupRowWidgets(this.getRowNode(_870));}},onAfterRow:function(_872,_873,_874){this._onAfterRow(_872,_873,_874);var g=this.grid;_4.forEach(_4.query(".dojoxGridStubNode",_874),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _875=window.parseInt(_4.attr(n,"cellIdx"),10);var _876=g.getCell(_875);var w=_5.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.view=this;this.flexCells=this.flexCells||cell.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _877=this.hasVScrollbar();var _878=_4.style(this.scrollboxNode,"overflow");if(this.noscroll||!_878||_878=="hidden"){_877=false;}else{if(_878=="scroll"){_877=true;}}return (_877?_6.html.metrics.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?h.firstChild.offsetWidth:0;},setColumnsWidth:function(_879){this.headerContentNode.firstChild.style.width=_879+"px";if(this.viewWidth){this.viewWidth=_879+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,_4._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _87a=this.grid.layout.cells;var _87b=_4.hitch(this,function(node,_87c){!_4._isBodyLtr()&&(_87c=!_87c);var inc=_87c?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_87a[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_87a[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _87d="dojoxGrid_bottomMarker";var _87e="dojoxGrid_topMarker";if(this.bottomMarker){_4.destroy(this.bottomMarker);}this.bottomMarker=_4.byId(_87d);if(this.topMarker){_4.destroy(this.topMarker);}this.topMarker=_4.byId(_87e);if(!this.bottomMarker){this.bottomMarker=_4.create("div",{"id":_87d,"class":"dojoxGridColPlaceBottom"},_4.body());this._hide(this.bottomMarker);this.topMarker=_4.create("div",{"id":_87e,"class":"dojoxGridColPlaceTop"},_4.body());this._hide(this.topMarker);}this.arrowDim=_4.contentBox(this.bottomMarker);var _87f=_4.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new _4.dnd.Source(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:_4.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(_4.isIE?1:0)){_4.dnd.Source.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:_4.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){_4.dnd.Source.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:_4.hitch(this,function(_880){var src=this.source;if(src.current==src.targetAnchor&&src.before==_880){return;}if(src.targetAnchor&&_87b(src.targetAnchor,src.before)){src._removeItemClass(_87b(src.targetAnchor,src.before),src.before?"After":"Before");}_4.dnd.Source.prototype._markTargetAnchor.call(src,_880);var _881=_880?src.targetAnchor:_87b(src.targetAnchor,src.before);var _882=0;if(!_881){_881=src.targetAnchor;_882=_4.contentBox(_881).w+this.arrowDim.w/2+2;}var pos=(_4.position||_4._abs)(_881,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_882);_4.style(this.bottomMarker,"visibility","visible");_4.style(this.topMarker,"visibility","visible");_4.style(this.bottomMarker,{"left":left+"px","top":(_87f+pos.y)+"px"});_4.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_87b(src.targetAnchor,src.before)){src._addItemClass(_87b(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:_4.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_87b(src.targetAnchor,src.before)){src._removeItemClass(_87b(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);_4.dnd.Source.prototype._unmarkTargetAnchor.call(src);}),destroy:_4.hitch(this,function(){_4.disconnect(this._source_conn);_4.unsubscribe(this._source_sub);_4.dnd.Source.prototype.destroy.call(this.source);if(this.bottomMarker){_4.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){_4.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:_4.hitch(this,function(){_4.dnd.Source.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=_4.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=_4.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(node){_4.style(node,{left:"-10000px",top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_883,_884,copy){if(_4.dnd.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _885=this.grid.views.views;var _886=_885[_883.viewIndex];var _887=_885[this.index];if(_887!=_886){_886.convertColPctToFixed();_887.convertColPctToFixed();}},_onDndDrop:function(_888,_889,copy){if(_4.dnd.manager().target!==this.source){if(_4.dnd.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _88a=function(n){return n?_4.attr(n,"idx"):null;};var w=_4.marginBox(_889[0]).w;if(_888.viewIndex!==this.index){var _88b=this.grid.views.views;var _88c=_88b[_888.viewIndex];var _88d=_88b[this.index];if(_88c.viewWidth&&_88c.viewWidth!="auto"){_88c.setColumnsWidth(_88c.getColumnsWidth()-w);}if(_88d.viewWidth&&_88d.viewWidth!="auto"){_88d.setColumnsWidth(_88d.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!_4._isBodyLtr()&&(stb=!stb);var _88e=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_88e.moveColumn(_888.viewIndex,idx,_88a(_889[0]),_88a(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}_6.grid.util.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_88f){var n=_88f.name||_88f.grid.getCellName(_88f);var ret=["<div class=\"dojoxGridSortNode"];if(_88f.index!=_88f.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_88f.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_88f.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_890){var _891=this._hasHScroll||false;if(this._hasHScroll==undefined||_890){if(this.noscroll){this._hasHScroll=false;}else{var _892=_4.style(this.scrollboxNode,"overflow");if(_892=="hidden"){this._hasHScroll=false;}else{if(_892=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_891!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_893){var _894=this._hasVScroll||false;if(this._hasVScroll==undefined||_893){if(this.noscroll){this._hasVScroll=false;}else{var _895=_4.style(this.scrollboxNode,"overflow");if(_895=="hidden"){this._hasVScroll=false;}else{if(_895=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_894!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _896=false;this.grid.initialWidth="";var _897=_4.query("th",this.headerContentNode);var _898=_4.map(_897,function(c,vIdx){var w=c.style.width;_4.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_896=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return _4.contentBox(c).w;});if(_896){_4.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _899=cell.view.getHeaderCellNode(cell.index);if(_899&&_4.hasAttr(_899,"vIdx")){var vIdx=window.parseInt(_4.attr(_899,"vIdx"));this.setColWidth(idx,_898[vIdx]);_4.removeAttr(_899,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_89a){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var self=this;var _89b=function(){var v;for(var i in self.grid.views.views){v=self.grid.views.views[i];if(v!==self&&v.hasHScrollbar()){return true;}}return false;};if(_89a||(this.noscroll&&_89b())){h-=_6.html.metrics.getScrollbar().h;}_6.grid.util.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_89c){var _89d=this.createRowNode(_89c);this.buildRow(_89c,_89d);this.grid.edit.restore(this,_89c);return _89d;},createRowNode:function(_89e){var node=document.createElement("div");node.className=this.classTag+"Row";if(this instanceof _6.grid._RowSelector){_4.attr(node,"role","presentation");}else{_4.attr(node,"role","row");if(this.grid.selectionMode!="none"){_4.attr(node,"aria-selected","false");}}node[_6.grid.util.gridViewTag]=this.id;node[_6.grid.util.rowIndexTag]=_89e;this.rowNodes[_89e]=node;return node;},buildRow:function(_89f,_8a0){this.buildRowContent(_89f,_8a0);this.styleRow(_89f,_8a0);},buildRowContent:function(_8a1,_8a2){_8a2.innerHTML=this.content.generateHtml(_8a1,_8a1);if(this.flexCells&&this.contentWidth){_8a2.firstChild.style.width=this.contentWidth;}_6.grid.util.fire(this,"onAfterRow",[_8a1,this.structure.cells,_8a2]);},rowRemoved:function(_8a3){if(_8a3>=0){this._cleanupRowWidgets(this.getRowNode(_8a3));}this.grid.edit.save(this,_8a3);delete this.rowNodes[_8a3];},getRowNode:function(_8a4){return this.rowNodes[_8a4];},getCellNode:function(_8a5,_8a6){var row=this.getRowNode(_8a5);if(row){return this.content.getCellNode(row,_8a6);}},getHeaderCellNode:function(_8a7){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_8a7);}},styleRow:function(_8a8,_8a9){_8a9._style=_86b(_8a9);this.styleRowNode(_8a8,_8a9);},styleRowNode:function(_8aa,_8ab){if(_8ab){this.doStyleRowNode(_8aa,_8ab);}},doStyleRowNode:function(_8ac,_8ad){this.grid.styleRowNode(_8ac,_8ad);},updateRow:function(_8ae){var _8af=this.getRowNode(_8ae);if(_8af){_8af.style.height="";this.buildRow(_8ae,_8af);}return _8af;},updateRowStyles:function(_8b0){this.styleRowNode(_8b0,this.getRowNode(_8b0));},lastTop:0,firstScroll:0,doscroll:function(_8b1){var _8b2=_4._isBodyLtr();if(this.firstScroll<2){if((!_8b2&&this.firstScroll==1)||(_8b2&&this.firstScroll===0)){var s=_4.marginBox(this.headerNodeContainer);if(_4.isIE){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(_4.isMoz){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_8b2?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}},setScrollTop:function(_8b3){this.lastTop=_8b3;this.scrollboxNode.scrollTop=_8b3;return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_8b4,_8b5){this.grid.setCellWidth(_8b4,_8b5+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var left=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=left;this.headerNode.scrollLeft=left;}});_4.declare("dojox.grid._GridAvatar",_4.dnd.Avatar,{construct:function(){var dd=_4.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _8b6=this.manager.source,node;if(_8b6.creator){node=_8b6._normalizedCreator(_8b6.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _8b7,_8b8;if(node.tagName.toLowerCase()=="tr"){_8b7=dd.createElement("table");_8b8=dd.createElement("tbody");_8b8.appendChild(node);_8b7.appendChild(_8b8);node=_8b7;}else{if(node.tagName.toLowerCase()=="th"){_8b7=dd.createElement("table");_8b8=dd.createElement("tbody");var r=dd.createElement("tr");_8b7.cellPadding=_8b7.cellSpacing="0";r.appendChild(node);_8b8.appendChild(r);_8b7.appendChild(_8b8);node=_8b7;}}}node.id="";td.appendChild(node);tr.appendChild(img);tr.appendChild(td);_4.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=_4.dnd.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){_4.dnd.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _8b9=_4.dnd.manager().makeAvatar;_4.dnd.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!_4.hasClass(_4.body(),"dijit_a11y")){return new _6.grid._GridAvatar(this);}return _8b9.call(_4.dnd.manager());};})();}if(!_4._hasResource["dojox.grid._RowSelector"]){_4._hasResource["dojox.grid._RowSelector"]=true;_4.provide("dojox.grid._RowSelector");_4.declare("dojox.grid._RowSelector",_6.grid._View,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_8ba,_8bb){var w=this.contentWidth||0;_8bb.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_8bc,_8bd){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_8bc)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_8bc)){n.push("dojoxGridRowbarSelected");}_8bd.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});}if(!_4._hasResource["dojox.grid._Layout"]){_4._hasResource["dojox.grid._Layout"]=true;_4.provide("dojox.grid._Layout");_4.declare("dojox.grid._Layout",null,{constructor:function(_8be){this.grid=_8be;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_8bf,_8c0,_8c1,_8c2,_8c3){var _8c4=this.structure[_8bf].cells[0];var _8c5=this.structure[_8c0].cells[0];var cell=null;var _8c6=0;var _8c7=0;for(var i=0,c;c=_8c4[i];i++){if(c.index==_8c1){_8c6=i;break;}}cell=_8c4.splice(_8c6,1)[0];cell.view=this.grid.views.views[_8c0];for(i=0,c=null;c=_8c5[i];i++){if(c.index==_8c2){_8c7=i;break;}}if(!_8c3){_8c7+=1;}_8c5.splice(_8c7,0,cell);var _8c8=this.grid.getCell(this.grid.getSortIndex());if(_8c8){_8c8._currentlySorted=this.grid.getSortAsc();}this.cells=[];_8c1=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_8c1;this.cells.push(c);if("_currentlySorted" in c){var si=_8c1+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_8c1++;}}}_4.forEach(this.cells,function(c){var _8c9=c.markup[2].split(" ");var _8ca=parseInt(_8c9[1].substring(5));if(_8ca!=c.index){_8c9[1]="idx=\""+c.index+"\"";c.markup[2]=_8c9.join(" ");}});this.grid.setupHeaderMenu();},setColumnVisibility:function(_8cb,_8cc){var cell=this.cells[_8cb];if(cell.hidden==_8cc){cell.hidden=!_8cc;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=_4.marginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_8cd,_8ce,_8cf){var self=this;var _8d0=function(_8d1){var w=0;if(_8d1.colSpan>1){w=0;}else{w=_8d1.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _8d2={grid:this.grid,subrow:_8cd,layoutIndex:_8ce,index:this.cells.length};if(_8cf&&_8cf instanceof _6.grid.cells._Base){var _8d3=_4.clone(_8cf);_8d2.unitWidth=_8d0(_8d3._props);_8d3=_4.mixin(_8d3,this._defaultCellProps,_8cf._props,_8d2);return _8d3;}var _8d4=_8cf.type||_8cf.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||_6.grid.cells.Cell;_8d2.unitWidth=_8d0(_8cf);return new _8d4(_4.mixin({},this._defaultCellProps,_8cf,_8d2));},addRowDef:function(_8d5,_8d6){var _8d7=[];var _8d8=0,_8d9=0,_8da=true;for(var i=0,def,cell;(def=_8d6[i]);i++){cell=this.addCellDef(_8d5,i,def);_8d7.push(cell);this.cells.push(cell);if(_8da&&cell.relWidth){_8d8+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_8d9+=window.parseInt(w,10);}else{if(w=="auto"){_8da=false;}}}}}if(_8d8&&_8da){_4.forEach(_8d7,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_8d8)*(100-_8d9))+"%";}});}return _8d7;},addRowsDef:function(_8db){var _8dc=[];if(_4.isArray(_8db)){if(_4.isArray(_8db[0])){for(var i=0,row;_8db&&(row=_8db[i]);i++){_8dc.push(this.addRowDef(i,row));}}else{_8dc.push(this.addRowDef(0,_8db));}}return _8dc;},addViewDef:function(_8dd){this._defaultCellProps=_8dd.defaultCell||{};if(_8dd.width&&_8dd.width=="auto"){delete _8dd.width;}return _4.mixin({},_8dd,{cells:this.addRowsDef(_8dd.rows||_8dd.cells)});},setStructure:function(_8de){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:_6._scopeName+".grid._RowSelector"};if(_4.isString(this.grid.rowSelector)){var _8df=this.grid.rowSelector;if(_8df=="false"){sel=null;}else{if(_8df!="true"){sel["width"]=_8df;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _8e0=function(def){return ("name" in def||"field" in def||"get" in def);};var _8e1=function(def){if(_4.isArray(def)){if(_4.isArray(def[0])||_8e0(def[0])){return true;}}return false;};var _8e2=function(def){return (def!==null&&_4.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_8e0(def))));};if(_4.isArray(_8de)){var _8e3=false;for(var i=0,st;(st=_8de[i]);i++){if(_8e2(st)){_8e3=true;break;}}if(!_8e3){s.push(this.addViewDef({cells:_8de}));}else{for(i=0;(st=_8de[i]);i++){if(_8e1(st)){s.push(this.addViewDef({cells:st}));}else{if(_8e2(st)){s.push(this.addViewDef(st));}}}}}else{if(_8e2(_8de)){s.push(this.addViewDef(_8de));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});}if(!_4._hasResource["dojox.grid._ViewManager"]){_4._hasResource["dojox.grid._ViewManager"]=true;_4.provide("dojox.grid._ViewManager");_4.declare("dojox.grid._ViewManager",null,{constructor:function(_8e4){this.grid=_8e4;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_8e5){_8e5.idx=this.views.length;this.views.push(_8e5);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _8e6=[];for(var i=0,v;v=this.views[i];i++){_8e6.push(v.contentNode);}return _8e6;},forEach:function(_8e7){for(var i=0,v;v=this.views[i];i++){_8e7(v,i);}},onEach:function(_8e8,_8e9){_8e9=_8e9||[];for(var i=0,v;v=this.views[i];i++){if(_8e8 in v){v[_8e8].apply(v,_8e9);}}},normalizeHeaderNodeHeight:function(){var _8ea=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_8ea.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_8ea);},normalizeRowNodeHeights:function(_8eb){var h=0;var _8ec=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_8eb.length<=1){return;}for(var i=0,n;(n=_8eb[i]);i++){if(!_4.hasClass(n,"dojoxGridNonNormalizedCell")){_8ec[i]=n.firstChild.offsetHeight;h=Math.max(h,_8ec[i]);}}h=(h>=0?h:0);if(_4.isMoz&&h){h++;}}for(i=0;(n=_8eb[i]);i++){if(_8ec[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_8ed){var _8ee=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_8ed));i++){n.firstChild.style.height="";_8ee.push(n);}this.normalizeRowNodeHeights(_8ee);},getViewWidth:function(_8ef){return this.views[_8ef].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_8f0){_8f0.headerContentNode.style.height="";});var h=0;this.forEach(function(_8f1){h=Math.max(_8f1.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_8f2){h=Math.max(_8f2.domNode.offsetHeight,h);});return h;},findClient:function(_8f3){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length;var c=(w<=0?len:this.findClient());var _8f4=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!_4._isBodyLtr()){ds.right=l+"px";if(_4.isMoz){hs.right=l+v.getScrollbarWidth()+"px";hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_8f4(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_8f4(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_8f4(v,l);}return l;},renderRow:function(_8f5,_8f6,_8f7){var _8f8=[];for(var i=0,v,n,_8f9;(v=this.views[i])&&(n=_8f6[i]);i++){_8f9=v.renderRow(_8f5);n.appendChild(_8f9);_8f8.push(_8f9);}if(!_8f7){this.normalizeRowNodeHeights(_8f8);}},rowRemoved:function(_8fa){this.onEach("rowRemoved",[_8fa]);},updateRow:function(_8fb,_8fc){for(var i=0,v;v=this.views[i];i++){v.updateRow(_8fb);}if(!_8fc){this.renormalizeRow(_8fb);}},updateRowStyles:function(_8fd){this.onEach("updateRowStyles",[_8fd]);},setScrollTop:function(_8fe){var top=_8fe;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_8fe);if(_4.isIE&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});}if(!_4._hasResource["dojox.grid._RowManager"]){_4._hasResource["dojox.grid._RowManager"]=true;_4.provide("dojox.grid._RowManager");(function(){var _8ff=function(_900,_901){if(_900.style.cssText==undefined){_900.setAttribute("style",_901);}else{_900.style.cssText=_901;}};_4.declare("dojox.grid._RowManager",null,{constructor:function(_902){this.grid=_902;},linesToEms:2,overRow:-2,prepareStylingRow:function(_903,_904){return {index:_903,node:_904,odd:Boolean(_903&1),selected:!!this.grid.selection.isSelected(_903),over:this.isOver(_903),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_905,_906){var row=this.prepareStylingRow(_905,_906);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_907){var i=_907;i.node.className=i.customClasses;var h=i.node.style.height;_8ff(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_908){this.grid.updateRowStyles(_908);},setOverRow:function(_909){var last=this.overRow;this.overRow=_909;if((last!=this.overRow)&&(_4.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_90a){return (this.overRow==_90a&&!_4.hasClass(this.grid.domNode,"dojoxGridColumnResizing"));}});})();}if(!_4._hasResource["dojox.grid._FocusManager"]){_4._hasResource["dojox.grid._FocusManager"]=true;_4.provide("dojox.grid._FocusManager");_4.declare("dojox.grid._FocusManager",null,{constructor:function(_90b){this.grid=_90b;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(_4.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(_4.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(_4.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(_4.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(_4.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(_4.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(_4.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){_4.forEach(this._connects,_4.disconnect);_4.forEach(this._headerConnects,_4.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders();},isFocusCell:function(_90c,_90d){return (this.cell==_90c)&&(this.rowIndex==_90d);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return _4.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_90e){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){_4.toggleClass(n,this.focusClass,_90e);if(_90e){var sl=this.scrollIntoView();try{if(!this.grid.edit.isEditing()){_6.grid.util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid._focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){_4.toggleClass(n,this.focusClass,true);this.blurHeader();_6.grid.util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();this.grid.domNode.focus();}},_initColumnHeaders:function(){_4.forEach(this._headerConnects,_4.disconnect);this._headerConnects=[];var _90f=this._findHeaderCells();for(var i=0;i<_90f.length;i++){this._headerConnects.push(_4.connect(_90f[i],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(_4.connect(_90f[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _910=_4.query("th",this.grid.viewsHeaderNode);var _911=[];for(var i=0;i<_910.length;i++){var _912=_910[i];var _913=_4.hasAttr(_912,"tabIndex");var _914=_4.attr(_912,"tabIndex");if(_913&&_914<0){_911.push(_912);}}return _911;},_setActiveColHeader:function(_915,_916,_917){_4.attr(this.grid.domNode,"aria-activedescendant",_915.id);if(_917!=null&&_917>=0&&_917!=_916){_4.toggleClass(this._findHeaderCells()[_917],this.focusClass,false);}_4.toggleClass(_915,this.focusClass,true);this._colHeadNode=_915;this._colHeadFocusIdx=_916;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_918){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_918?_918:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_919){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_919);info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _91a=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_91a){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(_4.isIE<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _91b=this.focusView;if(!_91b){for(var i=0,_91c;(_91c=this.grid.views.views[i]);i++){if(_91c.headerNode){_91b=_91c;break;}}}return (_91b&&_4.getComputedStyle(_91b.headerNode).display=="none");},colSizeAdjust:function(e,_91d,_91e){var _91f=this._findHeaderCells();var view=this.focusView;if(!view){for(var i=0,_920;(_920=this.grid.views.views[i]);i++){if(_920.header.tableMap.map){view=_920;break;}}}var _921=_91f[_91d];if(!view||(_91d==_91f.length-1&&_91d===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_921;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _922={l:_91e};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_922);view.update();}},styleRow:function(_923){return;},setFocusIndex:function(_924,_925){this.setFocusCell(this.grid.getCell(_925),_924);},setFocusCell:function(_926,_927){if(_926&&!this.isFocusCell(_926,_927)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_926;this.rowIndex=_927;this._focusifyCellNode(true);}if(_4.isOpera){setTimeout(_4.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _928=this.grid.getCell(col);if(!this.isLastFocusCell()&&(!_928.editable||this.grid.canEdit&&!this.grid.canEdit(_928,row))){this.cell=_928;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _929=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_929.editable){this.cell=_929;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_92a,_92b){var _92c=_92b<0?-1:1;if(this.isNavHeader()){var _92d=this._findHeaderCells();var _92e=currentIdx=_4.indexOf(_92d,this._colHeadNode);currentIdx+=_92b;while(currentIdx>=0&&currentIdx<_92d.length&&_92d[currentIdx].style.display=="none"){currentIdx+=_92c;}if((currentIdx>=0)&&(currentIdx<_92d.length)){this._setActiveColHeader(_92d[currentIdx],currentIdx,_92e);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_92a));if(_92a){if(_92a>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_92a<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_92b));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_92c;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}var n=cell.getNode(row);if(!n&&_92a){if((row+_92a)>=0&&(row+_92a)<=rc){this.move(_92a>0?++_92a:--_92a,_92b);}return;}else{if((!n||_4.style(n,"display")==="none")&&_92b){if((col+_92a)>=0&&(col+_92a)<=cc){this.move(_92a,_92b>0?++_92b:--_92b);}return;}}this.setFocusIndex(row,col);if(_92a){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){_4.stopEvent(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();_4.stopEvent(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){_4.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _92f=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();_4.stopEvent(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){_4.stopEvent(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_930){this.tabbingOut=true;_930.focus();},focusGridView:function(){_6.grid.util.fire(this.focusView,"focus");},focusGrid:function(_931){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _932=true;var _933=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_933){var _934=0;var cell=this.grid.getCell(_934);if(cell.hidden){_934=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_934);}else{if(this.cell&&!_933){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_932=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _932;},focusHeader:function(){var _935=this._findHeaderCells();var _936=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_935[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_935.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_935[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_936);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){_4.removeClass(this._colHeadNode,this.focusClass);_4.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _937=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_937);this._contextMenuBindNode=_937;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){_4.stopEvent(e);return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;_4.stopEvent(e);},doBlur:function(e){_4.stopEvent(e);},doContextMenu:function(e){if(!this.headerMenu){_4.stopEvent(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;_4.stopEvent(e);},doLastNodeBlur:function(e){_4.stopEvent(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,_4.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());_4.stopEvent(e);},doColHeaderBlur:function(e){_4.toggleClass(e.target,this.focusClass,false);}});}if(!_4._hasResource["dojox.grid._EditManager"]){_4._hasResource["dojox.grid._EditManager"]=true;_4.provide("dojox.grid._EditManager");_4.declare("dojox.grid._EditManager",null,{constructor:function(_938){this.grid=_938;if(_4.isIE){this.connections=[_4.connect(document.body,"onfocus",_4.hitch(this,"_boomerangFocus"))];}else{this.connections=[_4.connect(this.grid,"onBlur",this,"apply")];}},info:{},destroy:function(){_4.forEach(this.connections,_4.disconnect);},cellFocus:function(_939,_93a){if(this.grid.singleClickEdit||this.isEditRow(_93a)){this.setEditCell(_939,_93a);}else{this.apply();}if(this.isEditing()||(_939&&_939.editable&&_939.alwaysEditing)){this._focusEditor(_939,_93a);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_93b){if(_93b.index==this.info.rowIndex){_93b.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_93c,_93d){return (this.info.rowIndex===_93c)&&(this.info.cell.index==_93d);},isEditRow:function(_93e){return this.info.rowIndex===_93e;},setEditCell:function(_93f,_940){if(!this.isEditCell(_940,_93f.index)&&this.grid.canEdit&&this.grid.canEdit(_93f,_940)){this.start(_93f,_940,this.isEditRow(_940)||_93f.editable);}},_focusEditor:function(_941,_942){_6.grid.util.fire(_941,"focus",[_942]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(_4.isIE){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_943,_944,_945){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_944)){this.applyRowEdit();this.grid.updateRow(_944);}if(_945){this.info={cell:_943,rowIndex:_944};this.grid.doStartEdit(_943,_944);this.grid.updateRow(_944);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_943,_944);this._doCatchBoomerang();},_editorDo:function(_946){var c=this.info.cell;if(c&&c.editable){c[_946](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_947,_948,_949){if(this.grid.canEdit(_948,_949)){this.grid.doApplyCellEdit(_947,_949,_948.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_94a,_94b){var c=this.info.cell;if(this.isEditRow(_94a)&&(!_94b||c.view==_94b)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_94c,_94d){var c=this.info.cell;if(this.isEditRow(_94d)&&c.view==_94c&&c.editable){c.restore(c,this.info.rowIndex);}}});}if(!_4._hasResource["dojox.grid.Selection"]){_4._hasResource["dojox.grid.Selection"]=true;_4.provide("dojox.grid.Selection");_4.declare("dojox.grid.Selection",null,{constructor:function(_94e){this.grid=_94e;this.selected=[];this.setMode(_94e.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_94f){return this.grid.onCanSelect(_94f);},onCanDeselect:function(_950){return this.grid.onCanDeselect(_950);},onSelected:function(_951){},onDeselected:function(_952){},onChanging:function(){},onChanged:function(){},isSelected:function(_953){if(this.mode=="none"){return false;}return this.selected[_953];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_954){if(this.mode=="none"){return -1;}for(var i=_954+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _955=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_955.push(i);}}return _955;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_956){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_956);this.addToSelection(_956);}else{this.toggleSelect(_956);}},addToSelection:function(_957){if(this.mode=="none"){return;}if(_4.isArray(_957)){_4.forEach(_957,this.addToSelection,this);return;}_957=Number(_957);if(this.selected[_957]){this.selectedIndex=_957;}else{if(this.onCanSelect(_957)!==false){this.selectedIndex=_957;var _958=this.grid.getRowNode(_957);if(_958){_4.attr(_958,"aria-selected","true");}this._beginUpdate();this.selected[_957]=true;this.onSelected(_957);this._endUpdate();}}},deselect:function(_959){if(this.mode=="none"){return;}if(_4.isArray(_959)){_4.forEach(_959,this.deselect,this);return;}_959=Number(_959);if(this.selectedIndex==_959){this.selectedIndex=-1;}if(this.selected[_959]){if(this.onCanDeselect(_959)===false){return;}var _95a=this.grid.getRowNode(_959);if(_95a){_4.attr(_95a,"aria-selected","false");}this._beginUpdate();delete this.selected[_959];this.onDeselected(_959);this._endUpdate();}},setSelected:function(_95b,_95c){this[(_95c?"addToSelection":"deselect")](_95b);},toggleSelect:function(_95d){if(_4.isArray(_95d)){_4.forEach(_95d,this.toggleSelect,this);return;}this.setSelected(_95d,!this.selected[_95d]);},_range:function(_95e,inTo,func){var s=(_95e>=0?_95e:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_95f,inTo){this._range(_95f,inTo,_4.hitch(this,"addToSelection"));},deselectRange:function(_960,inTo){this._range(_960,inTo,_4.hitch(this,"deselect"));},insert:function(_961){this.selected.splice(_961,0,false);if(this.selectedIndex>=_961){this.selectedIndex++;}},remove:function(_962){this.selected.splice(_962,1);if(this.selectedIndex>=_962){this.selectedIndex--;}},deselectAll:function(_963){for(var i in this.selected){if((i!=_963)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_964,_965,_966){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_964);}else{var _967=this.selectedIndex;if(!_965){this.deselectAll(_964);}if(_966){this.selectRange(_967,_964);}else{if(_965){this.toggleSelect(_964);}else{this.addToSelection(_964);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,_4.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});}if(!_4._hasResource["dojox.grid._Events"]){_4._hasResource["dojox.grid._Events"]=true;_4.provide("dojox.grid._Events");_4.declare("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(_968){var i=_968;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_968);this.edit.styleRow(_968);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var dk=_4.keys;var _969;switch(e.keyCode){case dk.ESCAPE:this.edit.cancel();break;case dk.ENTER:if(!this.edit.isEditing()){_969=this.focus.getHeaderIndex();if(_969>=0){this.setSortIndex(_969);break;}else{this.selection.clickSelect(this.focus.rowIndex,_4.isCopyKey(e),e.shiftKey);}_4.stopEvent(e);}if(!e.shiftKey){var _96a=this.edit.isEditing();this.edit.apply();if(!_96a){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _96b=this.focus.focusView||this.views.views[0];_96b.content.decorateEvent(e);this.onRowClick(e);_4.stopEvent(e);}break;case dk.SPACE:if(!this.edit.isEditing()){_969=this.focus.getHeaderIndex();if(_969>=0){this.setSortIndex(_969);break;}else{this.selection.clickSelect(this.focus.rowIndex,_4.isCopyKey(e),e.shiftKey);}_4.stopEvent(e);}break;case dk.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case dk.LEFT_ARROW:case dk.RIGHT_ARROW:if(!this.edit.isEditing()){var _96c=e.keyCode;_4.stopEvent(e);_969=this.focus.getHeaderIndex();if(_969>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_969,(_96c==dk.LEFT_ARROW?-1:1)*5);}else{var _96d=(_96c==dk.LEFT_ARROW)?1:-1;if(_4._isBodyLtr()){_96d*=-1;}this.focus.move(0,_96d);}}break;case dk.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_4.stopEvent(e);this.focus.move(-1,0);}break;case dk.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_4.stopEvent(e);this.focus.move(1,0);}break;case dk.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_4.stopEvent(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case dk.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_4.stopEvent(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){_4.addClass(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){_4.removeClass(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}this.onRowClick(e);},onCellDblClick:function(e){if(this._click.length>1&&_4.isIE){this.edit.setEditCell(this._click[1].cell,this._click[1].rowIndex);}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){this.edit.setEditCell(this._click[0].cell,this._click[0].rowIndex);}else{this.edit.setEditCell(e.cell,e.rowIndex);}}this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_96e,_96f){this.edit.cellFocus(_96e,_96f);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){_4.stopEvent(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){_4.addClass(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){_4.removeClass(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){_4.stopEvent(e);}},onStartEdit:function(_970,_971){},onApplyCellEdit:function(_972,_973,_974){},onCancelEdit:function(_975){},onApplyEdit:function(_976){},onCanSelect:function(_977){return true;},onCanDeselect:function(_978){return true;},onSelected:function(_979){this.updateRowStyles(_979);},onDeselected:function(_97a){this.updateRowStyles(_97a);},onSelectionChanged:function(){}});}if(!_4._hasResource["dojox.grid._Grid"]){_4._hasResource["dojox.grid._Grid"]=true;_4.provide("dojox.grid._Grid");(function(){if(!_4.isCopyKey){_4.isCopyKey=_4.dnd.getCopyKeyState;}_4.declare("dojox.grid._Grid",[_5._Widget,_5._Templated,_6.grid._Events],{templateString:"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\r\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\r\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\r\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\r\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\r\n</div>\r\n",classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,sortInfo:0,themeable:true,_placeholders:null,_layoutClass:_6.grid._Layout,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");_6.html.metrics.initOnFontResize();this.connect(_6.html.metrics,"onFontResize","textSizeChanged");_6.grid.util.funnelEvents(this.domNode,this,"doKeyEvent",_6.grid.util.keyEvents);if(this.selectionMode!="none"){_4.attr(this.domNode,"aria-multiselectable",this.selectionMode=="single"?"false":"true");}_4.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){_4.addClass(this.domNode,this.classTag+"Rtl");}},postMixInProperties:function(){this.inherited(arguments);var _97b=_4.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_4.string.substitute(this.loadingMessage,_97b);this.errorMessage=_4.string.substitute(this.errorMessage,_97b);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){_4.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.scroller){this.scroller.destroy();delete this.scroller;}if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){_4.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_97c){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_97c){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new _6.grid._RowManager(this);this.focus=new _6.grid._FocusManager(this);this.edit=new _6.grid._EditManager(this);},createSelection:function(){this.selection=new _6.grid.Selection(this);},createScroller:function(){this.scroller=new _6.grid._Scroller();this.scroller.grid=this;this.scroller.renderRow=_4.hitch(this,"renderRow");this.scroller.removeRow=_4.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.render();},onResizeColumn:function(_97d){},createViews:function(){this.views=new _6.grid._ViewManager(this);this.views.createView=_4.hitch(this,"createView");},createView:function(_97e,idx){var c=_4.getObject(_97e);var view=new c({grid:this,index:idx});this.viewsNode.appendChild(view.domNode);this.viewsHeaderNode.appendChild(view.headerNode);this.views.addView(view);_4.attr(this.domNode,"align",_4._isBodyLtr()?"left":"right");return view;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||_6._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_97f){var s=_97f;if(s&&_4.isString(s)){_4.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");s=_4.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();this.focus.focusView=null;if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_980){_4.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(_980);},getColumnTogglingItems:function(){return _4.map(this.layout.cells,function(cell){if(!cell.menuItems){cell.menuItems=[];}var self=this;var item=new _5.CheckedMenuItem({label:cell.name,checked:!cell.hidden,_gridCell:cell,onChange:function(_981){if(self.layout.setColumnVisibility(this._gridCell.index,_981)){var _982=this._gridCell.menuItems;if(_982.length>1){_4.forEach(_982,function(item){if(item!==this){item.setAttribute("checked",_981);}},this);}_981=_4.filter(self.layout.cells,function(c){if(c.menuItems.length>1){_4.forEach(c.menuItems,"item.set('disabled', false);");}else{c.menuItems[0].set("disabled",false);}return !c.hidden;});if(_981.length==1){_4.forEach(_981[0].menuItems,"item.set('disabled', true);");}}},destroy:function(){var _983=_4.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_983,1);delete this._gridCell;_5.CheckedMenuItem.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);return item;},this);},_setHeaderMenuAttr:function(menu){if(this._placeholders&&this._placeholders.length){_4.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=menu;if(!menu){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(menu){_4.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(menu);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){_4.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_984){this.setScrollTop(0);},getItem:function(_985){return null;},showMessage:function(_986){if(_986){this.messagesNode.innerHTML=_986;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_987,_988){this._pendingChangeSize=_987;this._pendingResultSize=_988;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||_4._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_989,_98a){_989=_989||this._pendingChangeSize;_98a=_98a||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _98b=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_98b.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_98a){_989=_98a;}if(_989){_4.marginBox(this.domNode,_989);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=this._parentContentBoxHeight||_4._getContentBox(pn).h;this.domNode.style.height=Math.max(0,h)+"px";}}var _98c=_4.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||_4._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_98c&&hh===undefined){hh=this._getHeaderHeight();}}if(_98c){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _98d=(!this.initialWidth&&this.autoWidth);var w=_98d?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_98d){this.domNode.style.width=vw+"px";}},adaptHeight:function(_98e){var t=_98e===undefined?this._getHeaderHeight():_98e;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _98f=0,_990=0;var _991=_4.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_98f++;}else{_990++;}return (!has);});if(_98f>0&&_990>0){_4.forEach(_991,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();_4.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var size=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=size;}},renderRow:function(_992,_993){this.views.renderRow(_992,_993,this._skipRowRenormalize);},rowRemoved:function(_994){this.views.rowRemoved(_994);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_995){_995=Number(_995);if(this.updating){this.invalidated[_995]=true;}else{this.views.updateRow(_995);this.scroller.rowHeightChanged(_995);}},updateRows:function(_996,_997){_996=Number(_996);_997=Number(_997);var i;if(this.updating){for(i=0;i<_997;i++){this.invalidated[i+_996]=true;}}else{for(i=0;i<_997;i++){this.views.updateRow(i+_996,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_996);}},updateRowCount:function(_998){if(this.updating){this.invalidated.rowCount=_998;}else{this.rowCount=_998;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_998);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_999){this.views.updateRowStyles(_999);},getRowNode:function(_99a){if(this.focus.focusView&&!(this.focus.focusView instanceof _6.grid._RowSelector)){return this.focus.focusView.rowNodes[_99a];}else{for(var i=0,_99b;(_99b=this.views.views[i]);i++){if(!(_99b instanceof _6.grid._RowSelector)){return _99b.rowNodes[_99a];}}}return null;},rowHeightChanged:function(_99c){this.views.renormalizeRow(_99c);this.scroller.rowHeightChanged(_99c);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(_4.isIE?100:50),scrollTo:function(_99d){if(!this.fastScroll){this.setScrollTop(_99d);return;}var _99e=Math.abs(this.lastScrollTop-_99d);this.lastScrollTop=_99d;if(_99e>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_99d;this.views.setScrollTop(_99d);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _99f=this;this._pendingScroll=window.setTimeout(function(){delete _99f._pendingScroll;_99f.finishScrollJob();},200);}else{this.setScrollTop(_99d);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_9a0){this.scroller.scroll(this.views.setScrollTop(_9a0));},scrollToRow:function(_9a1){this.setScrollTop(this.scroller.findScrollTop(_9a1)+1);},styleRowNode:function(_9a2,_9a3){if(_9a3){this.rows.styleRowNode(_9a2,_9a3);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_9a4){return this.layout.cells[_9a4];},setCellWidth:function(_9a5,_9a6){this.getCell(_9a5).unitWidth=_9a6;},getCellName:function(_9a7){return "Cell "+_9a7.index;},canSort:function(_9a8){},sort:function(){},getSortAsc:function(_9a9){_9a9=_9a9==undefined?this.sortInfo:_9a9;return Boolean(_9a9>0);},getSortIndex:function(_9aa){_9aa=_9aa==undefined?this.sortInfo:_9aa;return Math.abs(_9aa)-1;},setSortIndex:function(_9ab,_9ac){var si=_9ab+1;if(_9ac!=undefined){si*=(_9ac?1:-1);}else{if(this.getSortIndex()==_9ab){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_9ad){if(this.canSort(_9ad)){this.sortInfo=_9ad;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_9ae,_9af){this.onStartEdit(_9ae,_9af);},doApplyCellEdit:function(_9b0,_9b1,_9b2){this.onApplyCellEdit(_9b0,_9b1,_9b2);},doCancelEdit:function(_9b3){this.onCancelEdit(_9b3);},doApplyEdit:function(_9b4){this.onApplyEdit(_9b4);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});_6.grid._Grid.markupFactory=function(_9b5,node,ctor,_9b6){var d=_4;var _9b7=function(n){var w=d.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_9b5.structure&&node.nodeName.toLowerCase()=="table"){_9b5.structure=d.query("> colgroup",node).map(function(cg){var sv=d.attr(cg,"span");var v={noscroll:(d.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(d.hasAttr(cg,"width")){v.width=_9b7(cg);}return v;});if(!_9b5.structure.length){_9b5.structure.push({__span:Infinity,cells:[]});}d.query("thead > tr",node).forEach(function(tr,_9b8){var _9b9=0;var _9ba=0;var _9bb;var _9bc=null;d.query("> th",tr).map(function(th){if(!_9bc){_9bb=0;_9bc=_9b5.structure[0];}else{if(_9b9>=(_9bb+_9bc.__span)){_9ba++;_9bb+=_9bc.__span;var _9bd=_9bc;_9bc=_9b5.structure[_9ba];}}var cell={name:d.trim(d.attr(th,"name")||th.innerHTML),colSpan:parseInt(d.attr(th,"colspan")||1,10),type:d.trim(d.attr(th,"cellType")||""),id:d.trim(d.attr(th,"id")||"")};_9b9+=cell.colSpan;var _9be=d.attr(th,"rowspan");if(_9be){cell.rowSpan=_9be;}if(d.hasAttr(th,"width")){cell.width=_9b7(th);}if(d.hasAttr(th,"relWidth")){cell.relWidth=window.parseInt(_4.attr(th,"relWidth"),10);}if(d.hasAttr(th,"hidden")){cell.hidden=(d.attr(th,"hidden")=="true"||d.attr(th,"hidden")===true);}if(_9b6){_9b6(th,cell);}cell.type=cell.type?_4.getObject(cell.type):_6.grid.cells.Cell;if(cell.type&&cell.type.markupFactory){cell.type.markupFactory(th,cell);}if(!_9bc.cells[_9b8]){_9bc.cells[_9b8]=[];}_9bc.cells[_9b8].push(cell);});});}return new ctor(_9b5,node);};})();}if(!_4._hasResource["dojox.grid.DataSelection"]){_4._hasResource["dojox.grid.DataSelection"]=true;_4.provide("dojox.grid.DataSelection");_4.declare("dojox.grid.DataSelection",_6.grid.Selection,{getFirstSelected:function(){var idx=_6.grid.Selection.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_9bf){var _9c0=this.grid.getItemIndex(_9bf);var idx=_6.grid.Selection.prototype.getNextSelected.call(this,_9c0);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _9c1=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_9c1.push(this.grid.getItem(i));}}return _9c1;},addToSelection:function(_9c2){if(this.mode=="none"){return;}var idx=null;if(typeof _9c2=="number"||typeof _9c2=="string"){idx=_9c2;}else{idx=this.grid.getItemIndex(_9c2);}_6.grid.Selection.prototype.addToSelection.call(this,idx);},deselect:function(_9c3){if(this.mode=="none"){return;}var idx=null;if(typeof _9c3=="number"||typeof _9c3=="string"){idx=_9c3;}else{idx=this.grid.getItemIndex(_9c3);}_6.grid.Selection.prototype.deselect.call(this,idx);},deselectAll:function(_9c4){var idx=null;if(_9c4||typeof _9c4=="number"){if(typeof _9c4=="number"||typeof _9c4=="string"){idx=_9c4;}else{idx=this.grid.getItemIndex(_9c4);}_6.grid.Selection.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});}if(!_4._hasResource["dojox.grid.DataGrid"]){_4._hasResource["dojox.grid.DataGrid"]=true;_4.provide("dojox.grid.DataGrid");_4.declare("dojox.grid.DataGrid",_6.grid._Grid,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},createSelection:function(){this.selection=new _6.grid.DataSelection(this);},get:function(_9c5,_9c6){if(_9c6&&this.field=="_item"&&!this.fields){return _9c6;}else{if(_9c6&&this.fields){var ret=[];var s=this.grid.store;_4.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_9c6,f));});return ret;}else{if(!_9c6&&typeof _9c5==="string"){return this.inherited(arguments);}}}return (!_9c6?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_9c6:this.grid.store.getValue(_9c6,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _9c7=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_9c7=true;}if(!this.updating){this.beginUpdate();_9c7=true;}if(_9c7){var _9c8=this;this._endUpdateDelay=setTimeout(function(){delete _9c8._endUpdateDelay;_9c8.endUpdate();},this.updateDelay);}}},_onSet:function(item,_9c9,_9ca,_9cb){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_9cc){var idty=this._hasIdentity?this.store.getIdentity(item):_4.toJson(this.query)+":idx:"+_9cc+":sort:"+_4.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_9cd,_9ce){this._by_idx[_9cd]=this._createItem(item,_9cd);if(!_9ce){this.updateRow(_9cd);}},_onNew:function(item,_9cf){this._checkUpdateStatus();var _9d0=this.get("rowCount");this._addingItem=true;this.updateRowCount(_9d0+1);this._addingItem=false;this._addItem(item,_9d0);this.showMessage();},_onDelete:function(item){this._checkUpdateStatus();var idx=this._getItemIndex(item,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}},_onRevert:function(){this._refresh();},setStore:function(_9d1,_9d2,_9d3){this._setQuery(_9d2,_9d3);this._setStore(_9d1);this._refresh(true);},setQuery:function(_9d4,_9d5){this._setQuery(_9d4,_9d5);this._refresh(true);},setItems:function(_9d6){this.items=_9d6;this._setStore(this.store);this._refresh(true);},_setQuery:function(_9d7,_9d8){this.query=_9d7;this.queryOptions=_9d8||this.queryOptions;},_setStore:function(_9d9){if(this.store&&this._store_connects){_4.forEach(this._store_connects,this.disconnect,this);}this.store=_9d9;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(size,req){if(!this.scroller){return;}if(this.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(size);}}if(!size){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_9da,req){if(!this.scroller){return;}if(_9da&&_9da.length>0){_4.forEach(_9da,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_9da.length);if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){console.log(err);delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_9db,_9dc){_9db=_9db||0;if(this.store&&!this._pending_requests[_9db]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_9db]=true;try{if(this.items){var _9dd=this.items;var _9de=this.store;this.rowsPerPage=_9dd.length;var req={start:_9db,count:this.rowsPerPage,isRender:_9dc};this._onFetchBegin(_9dd.length,req);var _9df=0;_4.forEach(_9dd,function(i){if(!_9de.isItemLoaded(i)){_9df++;}});if(_9df===0){this._onFetchComplete(_9dd,req);}else{var _9e0=function(item){_9df--;if(_9df===0){this._onFetchComplete(_9dd,req);}};_4.forEach(_9dd,function(i){if(!_9de.isItemLoaded(i)){_9de.loadItem({item:i,onItem:_9e0,scope:this});}},this);}}else{this.store.fetch({start:_9db,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_9dc,onBegin:_4.hitch(this,"_onFetchBegin"),onComplete:_4.hitch(this,"_onFetchComplete"),onError:_4.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_9db,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var data=this._by_idx[idx];if(!data||(data&&!data.item)){this._preparePage(idx);return null;}return data.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_9e1){if(!_9e1&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_9e2,_9e3){this.query=_9e2;if(_9e3){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_9e4){return this._pending_requests[_9e4];},_rowToPage:function(_9e5){return (this.rowsPerPage?Math.floor(_9e5/this.rowsPerPage):_9e5);},_pageToRow:function(_9e6){return (this.rowsPerPage?this.rowsPerPage*_9e6:_9e6);},_preparePage:function(_9e7){if((_9e7<this._bop||_9e7>=this._eop)&&!this._addingItem){var _9e8=this._rowToPage(_9e7);this._needPage(_9e8);this._bop=_9e8*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_9e9){if(!this._pages[_9e9]){this._pages[_9e9]=true;this._requestPage(_9e9);}},_requestPage:function(_9ea){var row=this._pageToRow(_9ea);var _9eb=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_9eb>0){this._requests++;if(!this._requestsPending(row)){setTimeout(_4.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_9ec){return _9ec.field;},_refresh:function(_9ed){this._clearData();this._fetch(0,_9ed);},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_9ee){if(this.store&&this.store.getState){var _9ef=this.store.getState(_9ee.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_9ef[s]){c=" dojoxGridRow-"+s;break;}}_9ee.customClasses+=c;}},onStyleRow:function(_9f0){this.styleRowState(_9f0);this.inherited(arguments);},canEdit:function(_9f1,_9f2){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _9f3={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_9f4,_9f5){if(!this._cache[_9f5]){this._cache[_9f5]=this._copyAttr(_9f5,_9f4.field);}this.onStartEdit(_9f4,_9f5);},doApplyCellEdit:function(_9f6,_9f7,_9f8){this.store.fetchItemByIdentity({identity:this._by_idx[_9f7].idty,onItem:_4.hitch(this,function(item){var _9f9=this.store.getValue(item,_9f8);if(typeof _9f9=="number"){_9f6=isNaN(_9f6)?_9f6:parseFloat(_9f6);}else{if(typeof _9f9=="boolean"){_9f6=_9f6=="true"?true:_9f6=="false"?false:_9f6;}else{if(_9f9 instanceof Date){var _9fa=new Date(_9f6);_9f6=isNaN(_9fa.getTime())?_9f6:_9fa;}}}this.store.setValue(item,_9f8,_9f6);this.onApplyCellEdit(_9f6,_9f7,_9f8);})});},doCancelEdit:function(_9fb){var _9fc=this._cache[_9fb];if(_9fc){this.updateRow(_9fb);delete this._cache[_9fb];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_9fd,_9fe){var _9ff=this._cache[_9fd];this.onApplyEdit(_9fd);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=_4.hitch(this,function(_a00){if(_a00.length){_4.forEach(_a00,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});_6.grid.DataGrid.cell_markupFactory=function(_a01,node,_a02){var _a03=_4.trim(_4.attr(node,"field")||"");if(_a03){_a02.field=_a03;}_a02.field=_a02.field||_a02.name;var _a04=_4.trim(_4.attr(node,"fields")||"");if(_a04){_a02.fields=_a04.split(",");}if(_a01){_a01(node,_a02);}};_6.grid.DataGrid.markupFactory=function(_a05,node,ctor,_a06){return _6.grid._Grid.markupFactory(_a05,node,ctor,_4.partial(_6.grid.DataGrid.cell_markupFactory,_a06));};}if(!_4._hasResource["esri.dijit.editing.AttachmentEditor"]){_4._hasResource["esri.dijit.editing.AttachmentEditor"]=true;_4.provide("esri.dijit.editing.AttachmentEditor");(function(){var css=[_4.moduleUrl("esri.dijit.editing","css/attachment.css")];var head=document.getElementsByTagName("head").item(0),link,i,il=css.length;for(i=0;i<il;i++){link=document.createElement("link");link.type="text/css";link.rel="stylesheet";link.href=css[i];head.appendChild(link);}}());_4.declare("esri.dijit.editing.AttachmentEditor",[_5._Widget,_5._Templated],{widgetsInTemplate:true,templateString:"<div class=\"attachmentEditor\">\r\n    <br />\r\n    <div>\r\n        <b>${NLS_attachments}</b>\r\n        <hr />\r\n        <br /> \r\n        <span dojoAttachPoint='_attachmentList' style='word-wrap: break-word;'></span>\r\n        <br><br>\r\n        <form dojoAttachPoint='_uploadForm'> ${NLS_add}:&nbsp;&nbsp;<input type='file' name='attachment' dojoAttachPoint='_uploadField' /> </form>\r\n    </div>\r\n</div>\r\n",basePath:_4.moduleUrl("esri.dijit.editing"),_listHtml:"<span id='node_${oid}_${attid}'><a href='${href}' target='_blank'>${name}</a>(<span style='cursor:pointer;color:red;font-weight:bold;' class='deleteAttachment' id='${attid}');'>X</span>)<br/></span>",_aeConnects:[],constructor:function(_a07,_a08){_4.mixin(this,esri.bundle.widgets.attachmentEditor);},startup:function(){this.inherited(arguments);this._uploadField_connect=_4.connect(this._uploadField,"onchange",this,"_addAttachment");},destroy:function(){_4.forEach(this._aeConnects,_4.disconnect);_4.disconnect(this._uploadField_connect);this.inherited(arguments);},showAttachments:function(_a09,_a0a){var list=this._attachmentList;list.innerHTML=this.NLS_none;this._uploadField.value="";if(!_a09){return;}this._featureLayer=_a09.getLayer()||_a0a;if(!this._featureLayer){return;}this._oid=_a09.attributes[this._featureLayer.objectIdField];this._getAttachments(_a09);},_getAttachments:function(_a0b){if(!this._featureLayer||!this._featureLayer.queryAttachmentInfos){return;}this._featureLayer.queryAttachmentInfos(this._oid,_4.hitch(this,"_onQueryAttachmentInfosComplete"));},_addAttachment:function(){if(!this._featureLayer||!this._featureLayer.addAttachment){return;}this._featureLayer.addAttachment(this._oid,this._uploadForm,_4.hitch(this,"_onAddAttachmentComplete"));},_deleteAttachment:function(oid,_a0c){this._featureLayer.deleteAttachments(oid,[_a0c],_4.hitch(this,"_onDeleteAttachmentComplete"));},_onQueryAttachmentInfosComplete:function(_a0d){var list=this._attachmentList,_a0e=_4.map(_a0d,_4.hitch(this,function(info){return esri.substitute({href:info.url,name:info.name,oid:info.objectId,attid:info.id},this._listHtml);}));list.innerHTML=_a0e.join("")||this.NLS_none;this._updateConnects();},_onAddAttachmentComplete:function(_a0f){var _a10=this._uploadField;var _a11=_a10.value;var pos=_a11.lastIndexOf("\\");if(pos>-1){_a11=_a11.substring(pos+1,_a11.length);}_a11=_a11.replace(/\ /g,"_");var list=this._attachmentList,_a12=_4.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var link=esri.substitute({href:this._featureLayer._url.path+"/"+_a0f.objectId+"/attachments/"+_a0f.attachmentId+(_a12?("?"+_a12):""),name:_a11,oid:_a0f.objectId,attid:_a0f.attachmentId},this._listHtml);list.innerHTML=list.innerHTML==this.NLS_none?link:(list.innerHTML+link);this._updateConnects();_a10.value="";},_onDeleteAttachmentComplete:function(_a13){var _a14=_4.every(_a13,function(_a15){return _a15.success;});if(_a14){_4.byId("node_"+_a13[0].objectId+"_"+_a13[0].attachmentId).innerHTML="";}},_updateConnects:function(){_4.forEach(this._aeConnects,_4.disconnect);_4.query(".deleteAttachment").forEach(function(item){this._aeConnects.push(_4.connect(item,"onclick",_4.hitch(this,"_deleteAttachment",this._oid,item.id)));},this);}});}if(!_4._hasResource["dojo.DeferredList"]){_4._hasResource["dojo.DeferredList"]=true;_4.provide("dojo.DeferredList");_4.DeferredList=function(list,_a16,_a17,_a18,_a19){var _a1a=[];_4.Deferred.call(this);var self=this;if(list.length===0&&!_a16){this.resolve([0,[]]);}var _a1b=0;_4.forEach(list,function(item,i){item.then(function(_a1c){if(_a16){self.resolve([i,_a1c]);}else{_a1d(true,_a1c);}},function(_a1e){if(_a17){self.reject(_a1e);}else{_a1d(false,_a1e);}if(_a18){return null;}throw _a1e;});function _a1d(_a1f,_a20){_a1a[i]=[_a1f,_a20];_a1b++;if(_a1b===list.length){self.resolve(_a1a);}};});};_4.DeferredList.prototype=new _4.Deferred();_4.DeferredList.prototype.gatherResults=function(_a21){var d=new _4.DeferredList(_a21,false,true,false);d.addCallback(function(_a22){var ret=[];_4.forEach(_a22,function(_a23){ret.push(_a23[1]);});return ret;});return d;};}if(!_4._hasResource["esri.dijit.editing.Util"]){_4._hasResource["esri.dijit.editing.Util"]=true;_4.provide("esri.dijit.editing.Util");esri.dijit.editing.Util.LayerHelper={findFeatures:function(ids,_a24,_a25){var _a26=_a24.objectIdField;var _a27=_a24.graphics;var _a28=_4.filter(_a27,function(_a29){return _4.some(ids,function(id){return _a29.attributes[_a26]===id.objectId;});});if(_a25){_a25(_a28);}else{return _a28;}},getSelection:function(_a2a){var _a2b=[];_4.forEach(_a2a,function(_a2c){var _a2d=_a2c.getSelectedFeatures();_4.forEach(_a2d,function(_a2e){_a2b.push(_a2e);});});return _a2b;}};}if(!_4._hasResource["dijit.Calendar"]){_4._hasResource["dijit.Calendar"]=true;_4.provide("dijit.Calendar");_4.declare("dijit.Calendar",[_5._Widget,_5._Templated,_5._CssStateMixin],{templateString:_4.cache("dijit","templates/Calendar.html","<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\" aria-labelledby=\"${id}_year\">\r\n\t<thead>\r\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\r\n\t\t\t<th class='dijitReset dijitCalendarArrow' dojoAttachPoint=\"decrementMonth\">\r\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\r\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\r\n\t\t\t</th>\r\n\t\t\t<th class='dijitReset' colspan=\"5\">\r\n\t\t\t\t<div dojoType=\"dijit.form.DropDownButton\" dojoAttachPoint=\"monthDropDownButton\"\r\n\t\t\t\t\tid=\"${id}_mddb\" tabIndex=\"-1\">\r\n\t\t\t\t</div>\r\n\t\t\t</th>\r\n\t\t\t<th class='dijitReset dijitCalendarArrow' dojoAttachPoint=\"incrementMonth\">\r\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\r\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\r\n\t\t</tr>\r\n\t</thead>\r\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut, onmousedown: _onDayMouseDown, onmouseup: _onDayMouseUp\" class=\"dijitReset dijitCalendarBodyContainer\">\r\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\r\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\r\n\t\t<tr>\r\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\r\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\r\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\r\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" id=\"${id}_year\"></span>\r\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\r\n\t\t\t\t</h3>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</tfoot>\r\n</table>\r\n"),widgetsInTemplate:true,value:new Date(""),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date(),baseClass:"dijitCalendar",cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},_isValidDate:function(_a2f){return _a2f&&!isNaN(_a2f)&&typeof _a2f=="object"&&_a2f.toString()!=this.constructor.prototype.value.toString();},setValue:function(_a30){_4.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",_a30);},_getValueAttr:function(){var _a31=new this.dateClassObj(this.value);_a31.setHours(0,0,0,0);if(_a31.getDate()<this.value.getDate()){_a31=this.dateFuncObj.add(_a31,"hour",1);}return _a31;},_setValueAttr:function(_a32,_a33){if(_a32){_a32=new this.dateClassObj(_a32);}if(this._isValidDate(_a32)){if(!this._isValidDate(this.value)||this.dateFuncObj.compare(_a32,this.value)){_a32.setHours(1,0,0,0);if(!this.isDisabledDate(_a32,this.lang)){this._set("value",_a32);this.set("currentFocus",_a32);if(_a33||typeof _a33=="undefined"){this.onChange(this.get("value"));this.onValueSelected(this.get("value"));}}}}else{this._set("value",null);this.set("currentFocus",this.currentFocus);}},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(_4.doc.createTextNode(text));},_populateGrid:function(){var _a34=new this.dateClassObj(this.currentFocus);_a34.setDate(1);var _a35=_a34.getDay(),_a36=this.dateFuncObj.getDaysInMonth(_a34),_a37=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(_a34,"month",-1)),_a38=new this.dateClassObj(),_a39=_4.cldr.supplemental.getFirstDayOfWeek(this.lang);if(_a39>_a35){_a39-=7;}_4.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_a3a,i){i+=_a39;var date=new this.dateClassObj(_a34),_a3b,_a3c="dijitCalendar",adj=0;if(i<_a35){_a3b=_a37-_a35+i+1;adj=-1;_a3c+="Previous";}else{if(i>=(_a35+_a36)){_a3b=i-_a35-_a36+1;adj=1;_a3c+="Next";}else{_a3b=i-_a35+1;_a3c+="Current";}}if(adj){date=this.dateFuncObj.add(date,"month",adj);}date.setDate(_a3b);if(!this.dateFuncObj.compare(date,_a38,"date")){_a3c="dijitCalendarCurrentDate "+_a3c;}if(this._isSelectedDate(date,this.lang)){_a3c="dijitCalendarSelectedDate "+_a3c;}if(this.isDisabledDate(date,this.lang)){_a3c="dijitCalendarDisabledDate "+_a3c;}var _a3d=this.getClassForDate(date,this.lang);if(_a3d){_a3c=_a3d+" "+_a3c;}_a3a.className=_a3c+"Month dijitCalendarDateTemplate";_a3a.dijitDateValue=date.valueOf();_4.attr(_a3a,"dijitDateValue",date.valueOf());var _a3e=_4.query(".dijitCalendarDateLabel",_a3a)[0],text=date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate();this._setText(_a3e,text);},this);var _a3f=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_a34);this.monthDropDownButton.dropDown.set("months",_a3f);this.monthDropDownButton.containerNode.innerHTML=(_4.isIE==6?"":"<div class='dijitSpacer'>"+this.monthDropDownButton.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_a3f[_a34.getMonth()]+"</div>";var y=_a34.getFullYear()-1;var d=new this.dateClassObj();_4.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);},goToToday:function(){this.set("value",new this.dateClassObj());},constructor:function(args){var _a40=(args.datePackage&&(args.datePackage!="dojo.date"))?args.datePackage+".Date":"Date";this.dateClassObj=_4.getObject(_a40,false);this.datePackage=args.datePackage||this.datePackage;this.dateFuncObj=_4.getObject(this.datePackage,false);this.dateLocaleModule=_4.getObject(this.datePackage+".locale",false);},postMixInProperties:function(){if(isNaN(this.value)){delete this.value;}this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);_4.setSelectable(this.domNode,false);var _a41=_4.hitch(this,function(_a42,n){var _a43=_4.query(_a42,this.domNode)[0];for(var i=0;i<n;i++){_a43.parentNode.appendChild(_a43.cloneNode(true));}});_a41(".dijitCalendarDayLabelTemplate",6);_a41(".dijitCalendarDateTemplate",6);_a41(".dijitCalendarWeekTemplate",5);var _a44=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang);var _a45=_4.cldr.supplemental.getFirstDayOfWeek(this.lang);_4.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_a46,i){this._setText(_a46,_a44[(i+_a45)%7]);},this);var _a47=new this.dateClassObj(this.currentFocus);this.monthDropDownButton.dropDown=new _5.Calendar._MonthDropDown({id:this.id+"_mdd",onChange:_4.hitch(this,"_onMonthSelect")});this.set("currentFocus",_a47,false);var _a48=this;var _a49=function(_a4a,_a4b,adj){_a48._connects.push(_5.typematic.addMouseListener(_a48[_a4a],_a48,function(_a4c){if(_a4c>=0){_a48._adjustDisplay(_a4b,adj);}},0.8,500));};_a49("incrementMonth","month",1);_a49("decrementMonth","month",-1);_a49("nextYearLabelNode","year",1);_a49("previousYearLabelNode","year",-1);},_adjustDisplay:function(part,_a4d){this._setCurrentFocusAttr(this.dateFuncObj.add(this.currentFocus,part,_a4d));},_setCurrentFocusAttr:function(date,_a4e){var _a4f=this.currentFocus,_a50=_a4f?_4.query("[dijitDateValue="+_a4f.valueOf()+"]",this.domNode)[0]:null;date=new this.dateClassObj(date);date.setHours(1,0,0,0);this._set("currentFocus",date);this._populateGrid();var _a51=_4.query("[dijitDateValue="+date.valueOf()+"]",this.domNode)[0];_a51.setAttribute("tabIndex",this.tabIndex);if(this._focused||_a4e){_a51.focus();}if(_a50&&_a50!=_a51){if(_4.isWebKit){_a50.setAttribute("tabIndex","-1");}else{_a50.removeAttribute("tabIndex");}}},focus:function(){this._setCurrentFocusAttr(this.currentFocus,true);},_onMonthSelect:function(_a52){this.currentFocus=this.dateFuncObj.add(this.currentFocus,"month",_a52-this.currentFocus.getMonth());this._populateGrid();},_onDayClick:function(evt){_4.stopEvent(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!_4.hasClass(node,"dijitCalendarDisabledDate")){this.set("value",node.dijitDateValue);}},_onDayMouseOver:function(evt){var node=_4.hasClass(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target;if(node&&(node.dijitDateValue||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){_4.addClass(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){return;}var cls="dijitCalendarHoveredDate";if(_4.hasClass(this._currentNode,"dijitCalendarActiveDate")){cls+=" dijitCalendarActiveDate";}_4.removeClass(this._currentNode,cls);this._currentNode=null;},_onDayMouseDown:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue){_4.addClass(node,"dijitCalendarActiveDate");this._currentNode=node;}},_onDayMouseUp:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue){_4.removeClass(node,"dijitCalendarActiveDate");}},handleKey:function(evt){var dk=_4.keys,_a53=-1,_a54,_a55=this.currentFocus;switch(evt.keyCode){case dk.RIGHT_ARROW:_a53=1;case dk.LEFT_ARROW:_a54="day";if(!this.isLeftToRight()){_a53*=-1;}break;case dk.DOWN_ARROW:_a53=1;case dk.UP_ARROW:_a54="week";break;case dk.PAGE_DOWN:_a53=1;case dk.PAGE_UP:_a54=evt.ctrlKey||evt.altKey?"year":"month";break;case dk.END:_a55=this.dateFuncObj.add(_a55,"month",1);_a54="day";case dk.HOME:_a55=new this.dateClassObj(_a55);_a55.setDate(1);break;case dk.ENTER:case dk.SPACE:this.set("value",this.currentFocus);break;default:return true;}if(_a54){_a55=this.dateFuncObj.add(_a55,_a54,_a53);}this._setCurrentFocusAttr(_a55);return false;},_onKeyPress:function(evt){if(!this.handleKey(evt)){_4.stopEvent(evt);}},onValueSelected:function(date){},onChange:function(date){},_isSelectedDate:function(_a56,_a57){return this._isValidDate(this.value)&&!this.dateFuncObj.compare(_a56,this.value,"date");},isDisabledDate:function(_a58,_a59){},getClassForDate:function(_a5a,_a5b){}});_4.declare("dijit.Calendar._MonthDropDown",[_5._Widget,_5._Templated],{months:[],templateString:"<div class='dijitCalendarMonthMenu dijitMenu' "+"dojoAttachEvent='onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'></div>",_setMonthsAttr:function(_a5c){this.domNode.innerHTML=_4.map(_a5c,function(_a5d,idx){return _a5d?"<div class='dijitCalendarMonthLabel' month='"+idx+"'>"+_a5d+"</div>":"";}).join("");},_onClick:function(evt){this.onChange(_4.attr(evt.target,"month"));},onChange:function(_a5e){},_onMenuHover:function(evt){_4.toggleClass(evt.target,"dijitCalendarMonthLabelHover",evt.type=="mouseover");}});}if(!_4._hasResource["dijit.form._DateTimeTextBox"]){_4._hasResource["dijit.form._DateTimeTextBox"]=true;_4.provide("dijit.form._DateTimeTextBox");new Date("X");_4.declare("dijit.form._DateTimeTextBox",[_5.form.RangeBoundTextBox,_5._HasDropDown],{templateString:_4.cache("dijit.form","templates/DropDownBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),hasDownArrow:true,openOnClick:true,regExpGen:_4.date.locale.regexp,datePackage:"dojo.date",compare:function(val1,val2){var _a5f=this._isInvalidDate(val1);var _a60=this._isInvalidDate(val2);return _a5f?(_a60?0:-1):(_a60?1:_4.date.compare(val1,val2,this._selector));},forceWidth:true,format:function(_a61,_a62){if(!_a61){return "";}return this.dateLocaleModule.format(_a61,_a62);},"parse":function(_a63,_a64){return this.dateLocaleModule.parse(_a63,_a64)||(this._isEmpty(_a63)?null:undefined);},serialize:function(val,_a65){if(val.toGregorian){val=val.toGregorian();}return _4.date.stamp.toISOString(val,_a65);},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(args){var _a66=args.datePackage?args.datePackage+".Date":"Date";this.dateClassObj=_4.getObject(_a66,false);this.value=new this.dateClassObj("");this.datePackage=args.datePackage||this.datePackage;this.dateLocaleModule=_4.getObject(this.datePackage+".locale",false);this.regExpGen=this.dateLocaleModule.regexp;this._invalidDate=_5.form._DateTimeTextBox.prototype.value.toString();},buildRendering:function(){this.inherited(arguments);if(!this.hasDownArrow){this._buttonNode.style.display="none";}if(this.openOnClick||!this.hasDownArrow){this._buttonNode=this.domNode;this.baseClass+=" dijitComboBoxOpenOnClick";}},_setConstraintsAttr:function(_a67){_a67.selector=this._selector;_a67.fullYear=true;var _a68=_4.date.stamp.fromISOString;if(typeof _a67.min=="string"){_a67.min=_a68(_a67.min);}if(typeof _a67.max=="string"){_a67.max=_a68(_a67.max);}this.inherited(arguments);},_isInvalidDate:function(_a69){return !_a69||isNaN(_a69)||typeof _a69!="object"||_a69.toString()==this._invalidDate;},_setValueAttr:function(_a6a,_a6b,_a6c){if(_a6a!==undefined){if(typeof _a6a=="string"){_a6a=_4.date.stamp.fromISOString(_a6a);}if(this._isInvalidDate(_a6a)){_a6a=null;}if(_a6a instanceof Date&&!(this.dateClassObj instanceof Date)){_a6a=new this.dateClassObj(_a6a);}}this.inherited(arguments);if(this.dropDown){this.dropDown.set("value",_a6a,false);}},_set:function(attr,_a6d){if(attr=="value"&&this.value instanceof Date&&this.compare(_a6d,this.value)==0){return;}this.inherited(arguments);},_setDropDownDefaultValueAttr:function(val){if(this._isInvalidDate(val)){val=new this.dateClassObj();}this.dropDownDefaultValue=val;},openDropDown:function(_a6e){if(this.dropDown){this.dropDown.destroy();}var _a6f=_4.getObject(this.popupClass,false),_a70=this,_a71=this.get("value");this.dropDown=new _a6f({onChange:function(_a72){_5.form._DateTimeTextBox.superclass._setValueAttr.call(_a70,_a72,true);},id:this.id+"_popup",dir:_a70.dir,lang:_a70.lang,value:_a71,currentFocus:!this._isInvalidDate(_a71)?_a71:this.dropDownDefaultValue,constraints:_a70.constraints,filterString:_a70.filterString,datePackage:_a70.datePackage,isDisabledDate:function(date){return !_a70.rangeCheck(date,_a70.constraints);}});this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_a73,_a74){this._setValueAttr(this.parse(_a73,this.constraints),_a74,_a73);}});}if(!_4._hasResource["dijit.form.DateTextBox"]){_4._hasResource["dijit.form.DateTextBox"]=true;_4.provide("dijit.form.DateTextBox");_4.declare("dijit.form.DateTextBox",_5.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:"dijit.Calendar",_selector:"date",value:new Date("")});}if(!_4._hasResource["dojo.number"]){_4._hasResource["dojo.number"]=true;_4.provide("dojo.number");_4.getObject("number",true,_4);_4.number.format=function(_a75,_a76){_a76=_4.mixin({},_a76||{});var _a77=_4.i18n.normalizeLocale(_a76.locale),_a78=_4.i18n.getLocalization("dojo.cldr","number",_a77);_a76.customs=_a78;var _a79=_a76.pattern||_a78[(_a76.type||"decimal")+"Format"];if(isNaN(_a75)||Math.abs(_a75)==Infinity){return null;}return _4.number._applyPattern(_a75,_a79,_a76);};_4.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;_4.number._applyPattern=function(_a7a,_a7b,_a7c){_a7c=_a7c||{};var _a7d=_a7c.customs.group,_a7e=_a7c.customs.decimal,_a7f=_a7b.split(";"),_a80=_a7f[0];_a7b=_a7f[(_a7a<0)?1:0]||("-"+_a80);if(_a7b.indexOf("%")!=-1){_a7a*=100;}else{if(_a7b.indexOf("‰")!=-1){_a7a*=1000;}else{if(_a7b.indexOf("¤")!=-1){_a7d=_a7c.customs.currencyGroup||_a7d;_a7e=_a7c.customs.currencyDecimal||_a7e;_a7b=_a7b.replace(/\u00a4{1,3}/,function(_a81){var prop=["symbol","currency","displayName"][_a81.length-1];return _a7c[prop]||_a7c.currency||"";});}else{if(_a7b.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _a82=_4.number._numberPatternRE;var _a83=_a80.match(_a82);if(!_a83){throw new Error("unable to find a number expression in pattern: "+_a7b);}if(_a7c.fractional===false){_a7c.places=0;}return _a7b.replace(_a82,_4.number._formatAbsolute(_a7a,_a83[0],{decimal:_a7e,group:_a7d,places:_a7c.places,round:_a7c.round}));};_4.number.round=function(_a84,_a85,_a86){var _a87=10/(_a86||10);return (_a87*+_a84).toFixed(_a85)/_a87;};if((0.9).toFixed()==0){(function(){var _a88=_4.number.round;_4.number.round=function(v,p,m){var d=Math.pow(10,-p||0),a=Math.abs(v);if(!v||a>=d||a*Math.pow(10,p+1)<5){d=0;}return _a88(v,p,m)+(v>0?d:-d);};})();}_4.number._formatAbsolute=function(_a89,_a8a,_a8b){_a8b=_a8b||{};if(_a8b.places===true){_a8b.places=0;}if(_a8b.places===Infinity){_a8b.places=6;}var _a8c=_a8a.split("."),_a8d=typeof _a8b.places=="string"&&_a8b.places.indexOf(","),_a8e=_a8b.places;if(_a8d){_a8e=_a8b.places.substring(_a8d+1);}else{if(!(_a8e>=0)){_a8e=(_a8c[1]||[]).length;}}if(!(_a8b.round<0)){_a89=_4.number.round(_a89,_a8e,_a8b.round);}var _a8f=String(Math.abs(_a89)).split("."),_a90=_a8f[1]||"";if(_a8c[1]||_a8b.places){if(_a8d){_a8b.places=_a8b.places.substring(0,_a8d);}var pad=_a8b.places!==undefined?_a8b.places:(_a8c[1]&&_a8c[1].lastIndexOf("0")+1);if(pad>_a90.length){_a8f[1]=_4.string.pad(_a90,pad,"0",true);}if(_a8e<_a90.length){_a8f[1]=_a90.substr(0,_a8e);}}else{if(_a8f[1]){_a8f.pop();}}var _a91=_a8c[0].replace(",","");pad=_a91.indexOf("0");if(pad!=-1){pad=_a91.length-pad;if(pad>_a8f[0].length){_a8f[0]=_4.string.pad(_a8f[0],pad);}if(_a91.indexOf("#")==-1){_a8f[0]=_a8f[0].substr(_a8f[0].length-pad);}}var _a92=_a8c[0].lastIndexOf(","),_a93,_a94;if(_a92!=-1){_a93=_a8c[0].length-_a92-1;var _a95=_a8c[0].substr(0,_a92);_a92=_a95.lastIndexOf(",");if(_a92!=-1){_a94=_a95.length-_a92-1;}}var _a96=[];for(var _a97=_a8f[0];_a97;){var off=_a97.length-_a93;_a96.push((off>0)?_a97.substr(off):_a97);_a97=(off>0)?_a97.slice(0,off):"";if(_a94){_a93=_a94;delete _a94;}}_a8f[0]=_a96.reverse().join(_a8b.group||",");return _a8f.join(_a8b.decimal||".");};_4.number.regexp=function(_a98){return _4.number._parseInfo(_a98).regexp;};_4.number._parseInfo=function(_a99){_a99=_a99||{};var _a9a=_4.i18n.normalizeLocale(_a99.locale),_a9b=_4.i18n.getLocalization("dojo.cldr","number",_a9a),_a9c=_a99.pattern||_a9b[(_a99.type||"decimal")+"Format"],_a9d=_a9b.group,_a9e=_a9b.decimal,_a9f=1;if(_a9c.indexOf("%")!=-1){_a9f/=100;}else{if(_a9c.indexOf("‰")!=-1){_a9f/=1000;}else{var _aa0=_a9c.indexOf("¤")!=-1;if(_aa0){_a9d=_a9b.currencyGroup||_a9d;_a9e=_a9b.currencyDecimal||_a9e;}}}var _aa1=_a9c.split(";");if(_aa1.length==1){_aa1.push("-"+_aa1[0]);}var re=_4.regexp.buildGroupRE(_aa1,function(_aa2){_aa2="(?:"+_4.regexp.escapeString(_aa2,".")+")";return _aa2.replace(_4.number._numberPatternRE,function(_aa3){var _aa4={signed:false,separator:_a99.strict?_a9d:[_a9d,""],fractional:_a99.fractional,decimal:_a9e,exponent:false},_aa5=_aa3.split("."),_aa6=_a99.places;if(_aa5.length==1&&_a9f!=1){_aa5[1]="###";}if(_aa5.length==1||_aa6===0){_aa4.fractional=false;}else{if(_aa6===undefined){_aa6=_a99.pattern?_aa5[1].lastIndexOf("0")+1:Infinity;}if(_aa6&&_a99.fractional==undefined){_aa4.fractional=true;}if(!_a99.places&&(_aa6<_aa5[1].length)){_aa6+=","+_aa5[1].length;}_aa4.places=_aa6;}var _aa7=_aa5[0].split(",");if(_aa7.length>1){_aa4.groupSize=_aa7.pop().length;if(_aa7.length>1){_aa4.groupSize2=_aa7.pop().length;}}return "("+_4.number._realNumberRegexp(_aa4)+")";});},true);if(_aa0){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_aa8,_aa9,_aaa,_aab){var prop=["symbol","currency","displayName"][_aaa.length-1],_aac=_4.regexp.escapeString(_a99[prop]||_a99.currency||"");_aa9=_aa9?"[\\s\\xa0]":"";_aab=_aab?"[\\s\\xa0]":"";if(!_a99.strict){if(_aa9){_aa9+="*";}if(_aab){_aab+="*";}return "(?:"+_aa9+_aac+_aab+")?";}return _aa9+_aac+_aab;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_a9d,decimal:_a9e,factor:_a9f};};_4.number.parse=function(_aad,_aae){var info=_4.number._parseInfo(_aae),_aaf=(new RegExp("^"+info.regexp+"$")).exec(_aad);if(!_aaf){return NaN;}var _ab0=_aaf[1];if(!_aaf[1]){if(!_aaf[2]){return NaN;}_ab0=_aaf[2];info.factor*=-1;}_ab0=_ab0.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _ab0*info.factor;};_4.number._realNumberRegexp=function(_ab1){_ab1=_ab1||{};if(!("places" in _ab1)){_ab1.places=Infinity;}if(typeof _ab1.decimal!="string"){_ab1.decimal=".";}if(!("fractional" in _ab1)||/^0/.test(_ab1.places)){_ab1.fractional=[true,false];}if(!("exponent" in _ab1)){_ab1.exponent=[true,false];}if(!("eSigned" in _ab1)){_ab1.eSigned=[true,false];}var _ab2=_4.number._integerRegexp(_ab1),_ab3=_4.regexp.buildGroupRE(_ab1.fractional,function(q){var re="";if(q&&(_ab1.places!==0)){re="\\"+_ab1.decimal;if(_ab1.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_ab1.places+"}";}}return re;},true);var _ab4=_4.regexp.buildGroupRE(_ab1.exponent,function(q){if(q){return "([eE]"+_4.number._integerRegexp({signed:_ab1.eSigned})+")";}return "";});var _ab5=_ab2+_ab3;if(_ab3){_ab5="(?:(?:"+_ab5+")|(?:"+_ab3+"))";}return _ab5+_ab4;};_4.number._integerRegexp=function(_ab6){_ab6=_ab6||{};if(!("signed" in _ab6)){_ab6.signed=[true,false];}if(!("separator" in _ab6)){_ab6.separator="";}else{if(!("groupSize" in _ab6)){_ab6.groupSize=3;}}var _ab7=_4.regexp.buildGroupRE(_ab6.signed,function(q){return q?"[-+]":"";},true);var _ab8=_4.regexp.buildGroupRE(_ab6.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=_4.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_ab6.groupSize,grp2=_ab6.groupSize2;if(grp2){var _ab9="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_ab9+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_ab9;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _ab7+_ab8;};}if(!_4._hasResource["dijit.form.NumberTextBox"]){_4._hasResource["dijit.form.NumberTextBox"]=true;_4.provide("dijit.form.NumberTextBox");_4.declare("dijit.form.NumberTextBoxMixin",null,{regExpGen:_4.number.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:_4.number.format,_setConstraintsAttr:function(_aba){var _abb=typeof _aba.places=="number"?_aba.places:0;if(_abb){_abb++;}if(typeof _aba.max!="number"){_aba.max=9*Math.pow(10,15-_abb);}if(typeof _aba.min!="number"){_aba.min=-9*Math.pow(10,15-_abb);}this.inherited(arguments,[_aba]);if(this.focusNode&&this.focusNode.value&&!isNaN(this.value)){this.set("value",this.value);}},_onFocus:function(){if(this.disabled){return;}var val=this.get("value");if(typeof val=="number"&&!isNaN(val)){var _abc=this.format(val,this.constraints);if(_abc!==undefined){this.textbox.value=_abc;}}this.inherited(arguments);},format:function(_abd,_abe){var _abf=String(_abd);if(typeof _abd!="number"){return _abf;}if(isNaN(_abd)){return "";}if(!("rangeCheck" in this&&this.rangeCheck(_abd,_abe))&&_abe.exponent!==false&&/\de[-+]?\d/i.test(_abf)){return _abf;}if(this.editOptions&&this._focused){_abe=_4.mixin({},_abe,this.editOptions);}return this._formatter(_abd,_abe);},_parser:_4.number.parse,parse:function(_ac0,_ac1){var v=this._parser(_ac0,_4.mixin({},_ac1,(this.editOptions&&this._focused)?this.editOptions:{}));if(this.editOptions&&this._focused&&isNaN(v)){v=this._parser(_ac0,_ac1);}return v;},_getDisplayedValueAttr:function(){var v=this.inherited(arguments);return isNaN(v)?this.textbox.value:v;},filter:function(_ac2){return (_ac2===null||_ac2===""||_ac2===undefined)?NaN:this.inherited(arguments);},serialize:function(_ac3,_ac4){return (typeof _ac3!="number"||isNaN(_ac3))?"":this.inherited(arguments);},_setBlurValue:function(){var val=_4.hitch(_4.mixin({},this,{_focused:true}),"get")("value");this._setValueAttr(val,true);},_setValueAttr:function(_ac5,_ac6,_ac7){if(_ac5!==undefined&&_ac7===undefined){_ac7=String(_ac5);if(typeof _ac5=="number"){if(isNaN(_ac5)){_ac7="";}else{if(("rangeCheck" in this&&this.rangeCheck(_ac5,this.constraints))||this.constraints.exponent===false||!/\de[-+]?\d/i.test(_ac7)){_ac7=undefined;}}}else{if(!_ac5){_ac7="";_ac5=NaN;}else{_ac5=undefined;}}}this.inherited(arguments,[_ac5,_ac6,_ac7]);},_getValueAttr:function(){var v=this.inherited(arguments);if(isNaN(v)&&this.textbox.value!==""){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)&&(new RegExp("^"+_4.number._realNumberRegexp(_4.mixin({},this.constraints))+"$").test(this.textbox.value))){var n=Number(this.textbox.value);return isNaN(n)?undefined:n;}else{return undefined;}}else{return v;}},isValid:function(_ac8){if(!this._focused||this._isEmpty(this.textbox.value)){return this.inherited(arguments);}else{var v=this.get("value");if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){return true;}else{return this.inherited(arguments);}}else{return false;}}}});_4.declare("dijit.form.NumberTextBox",[_5.form.RangeBoundTextBox,_5.form.NumberTextBoxMixin],{baseClass:"dijitTextBox dijitNumberTextBox"});}if(!_4._hasResource["dijit.form.ComboBox"]){_4._hasResource["dijit.form.ComboBox"]=true;_4.provide("dijit.form.ComboBox");_4.declare("dijit.form.ComboBoxMixin",_5._HasDropDown,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:_4.cache("dijit.form","templates/DropDownBox.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\"\r\n\trole=\"combobox\"\r\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\r\n\t\tdojoAttachPoint=\"_buttonNode, _popupStateNode\" role=\"presentation\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\r\n\t\t\tdojoAttachPoint=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\r\n\t/></div\r\n></div>\r\n"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(_ac9){var pos=0;if(typeof (_ac9.selectionStart)=="number"){pos=_ac9.selectionStart;}else{if(_4.isIE){var tr=_4.doc.selection.createRange().duplicate();var ntr=_ac9.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);pos=String(ntr.text).replace(/\r/g,"").length;}catch(e){}}}return pos;},_setCaretPos:function(_aca,_acb){_acb=parseInt(_acb);_5.selectInputText(_aca,_acb,_acb);},_setDisabledAttr:function(_acc){this.inherited(arguments);_5.setWaiState(this.domNode,"disabled",_acc);},_abortQuery:function(){if(this.searchTimer){clearTimeout(this.searchTimer);this.searchTimer=null;}if(this._fetchHandle){if(this._fetchHandle.abort){this._fetchHandle.abort();}this._fetchHandle=null;}},_onInput:function(evt){if(!this.searchTimer&&(evt.type=="paste"||evt.type=="input")&&this._lastInput!=this.textbox.value){this.searchTimer=setTimeout(_4.hitch(this,function(){this._onKey({charOrCode:229});}),100);}this.inherited(arguments);},_onKey:function(evt){var key=evt.charOrCode;if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==_4.keys.SHIFT){return;}var _acd=false;var pw=this.dropDown;var dk=_4.keys;var _ace=null;this._prev_key_backspace=false;this._abortQuery();this.inherited(arguments);if(this._opened){_ace=pw.getHighlightedOption();}switch(key){case dk.PAGE_DOWN:case dk.DOWN_ARROW:case dk.PAGE_UP:case dk.UP_ARROW:if(this._opened){this._announceOption(_ace);}_4.stopEvent(evt);break;case dk.ENTER:if(_ace){if(_ace==pw.nextButton){this._nextSearch(1);_4.stopEvent(evt);break;}else{if(_ace==pw.previousButton){this._nextSearch(-1);_4.stopEvent(evt);break;}}}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length);}if(this._opened||this._fetchHandle){evt.preventDefault();}case dk.TAB:var _acf=this.get("displayedValue");if(pw&&(_acf==pw._messages["previousMessage"]||_acf==pw._messages["nextMessage"])){break;}if(_ace){this._selectOption();}if(this._opened){this._lastQuery=null;this.closeDropDown();}break;case " ":if(_ace){_4.stopEvent(evt);this._selectOption();this.closeDropDown();}else{_acd=true;}break;case dk.DELETE:case dk.BACKSPACE:this._prev_key_backspace=true;_acd=true;break;default:_acd=typeof key=="string"||key==229;}if(_acd){this.item=undefined;this.searchTimer=setTimeout(_4.hitch(this,"_startSearchFromInput"),1);}},_autoCompleteText:function(text){var fn=this.focusNode;_5.selectInputText(fn,fn.value.length);var _ad0=this.ignoreCase?"toLowerCase":"substr";if(text[_ad0](0).indexOf(this.focusNode.value[_ad0](0))==0){var cpos=this._getCaretPos(fn);if((cpos+1)>fn.value.length){fn.value=text;_5.selectInputText(fn,cpos);}}else{fn.value=text;_5.selectInputText(fn);}},_openResultList:function(_ad1,_ad2){this._fetchHandle=null;if(this.disabled||this.readOnly||(_ad2.query[this.searchAttr]!=this._lastQuery)){return;}var _ad3=this.dropDown._highlighted_option&&_4.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!_ad1.length&&!this._maxOptions){this.closeDropDown();return;}_ad2._maxOptions=this._maxOptions;var _ad4=this.dropDown.createOptions(_ad1,_ad2,_4.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if(_ad2.direction){if(1==_ad2.direction){this.dropDown.highlightFirstOption();}else{if(-1==_ad2.direction){this.dropDown.highlightLastOption();}}if(_ad3){this._announceOption(this.dropDown.getHighlightedOption());}}else{if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_ad2.query[this.searchAttr])){this._announceOption(_ad4[1]);}}},_showResultList:function(){this.closeDropDown(true);this.displayMessage("");this.openDropDown();_5.setWaiState(this.domNode,"expanded","true");},loadDropDown:function(_ad5){this._startSearchAll();},isLoaded:function(){return false;},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);_5.setWaiState(this.domNode,"expanded","false");_5.removeWaiState(this.focusNode,"activedescendant");}},_setBlurValue:function(){var _ad6=this.get("displayedValue");var pw=this.dropDown;if(pw&&(_ad6==pw._messages["previousMessage"]||_ad6==pw._messages["nextMessage"])){this._setValueAttr(this._lastValueReported,true);}else{if(typeof this.item=="undefined"){this.item=null;this.set("displayedValue",_ad6);}else{if(this.value!=this._lastValueReported){_5.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);}this._refreshState();}}},_onBlur:function(){this.closeDropDown();this.inherited(arguments);},_setItemAttr:function(item,_ad7,_ad8){if(!_ad8){_ad8=this.store.getValue(item,this.searchAttr);}var _ad9=this._getValueField()!=this.searchAttr?this.store.getIdentity(item):_ad8;this._set("item",item);_5.form.ComboBox.superclass._setValueAttr.call(this,_ad9,_ad7,_ad8);},_announceOption:function(node){if(!node){return;}var _ada;if(node==this.dropDown.nextButton||node==this.dropDown.previousButton){_ada=node.innerHTML;this.item=undefined;this.value="";}else{_ada=this.store.getValue(node.item,this.searchAttr).toString();this.set("item",node.item,false,_ada);}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);_5.setWaiState(this.focusNode,"activedescendant",_4.attr(node,"id"));this._autoCompleteText(_ada);},_selectOption:function(evt){if(evt){this._announceOption(evt.target);}this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);_5.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);},_startSearchAll:function(){this._startSearch("");},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));},_getQueryString:function(text){return _4.string.substitute(this.queryExpr,[text]);},_startSearch:function(key){if(!this.dropDown){var _adb=this.id+"_popup",_adc=_4.getObject(this.dropDownClass,false);this.dropDown=new _adc({onChange:_4.hitch(this,this._selectOption),id:_adb,dir:this.dir});_5.removeWaiState(this.focusNode,"activedescendant");_5.setWaiState(this.textbox,"owns",_adb);}var _add=_4.clone(this.query);this._lastInput=key;this._lastQuery=_add[this.searchAttr]=this._getQueryString(key);this.searchTimer=setTimeout(_4.hitch(this,function(_ade,_adf){this.searchTimer=null;var _ae0={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_ade,onBegin:_4.hitch(this,"_setMaxOptions"),onComplete:_4.hitch(this,"_openResultList"),onError:function(_ae1){_adf._fetchHandle=null;console.error("dijit.form.ComboBox: "+_ae1);_adf.closeDropDown();},start:0,count:this.pageSize};_4.mixin(_ae0,_adf.fetchProperties);this._fetchHandle=_adf.store.fetch(_ae0);var _ae2=function(_ae3,_ae4){_ae3.start+=_ae3.count*_ae4;_ae3.direction=_ae4;this._fetchHandle=this.store.fetch(_ae3);this.focus();};this._nextSearch=this.dropDown.onPage=_4.hitch(this,_ae2,this._fetchHandle);},_add,this),this.searchDelay);},_setMaxOptions:function(size,_ae5){this._maxOptions=size;},_getValueField:function(){return this.searchAttr;},constructor:function(){this.query={};this.fetchProperties={};},postMixInProperties:function(){if(!this.store){var _ae6=this.srcNodeRef;this.store=new _5.form._ComboBoxDataStore(_ae6);if(!("value" in this.params)){var item=(this.item=this.store.fetchSelectedItem());if(item){var _ae7=this._getValueField();this.value=this.store.getValue(item,_ae7);}}}this.inherited(arguments);},postCreate:function(){var _ae8=_4.query("label[for=\""+this.id+"\"]");if(_ae8.length){_ae8[0].id=(this.id+"_label");_5.setWaiState(this.domNode,"labelledby",_ae8[0].id);}this.inherited(arguments);},_setHasDownArrowAttr:function(val){this.hasDownArrow=val;this._buttonNode.style.display=val?"":"none";},_getMenuLabelFromItem:function(item){var _ae9=this.labelFunc(item,this.store),_aea=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){_ae9=this.doHighlight(_ae9,this._escapeHtml(this._lastInput));_aea="html";}return {html:_aea=="html",label:_ae9};},doHighlight:function(_aeb,find){var _aec=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),i=this.queryExpr.indexOf("${0}");find=_4.regexp.escapeString(find);return this._escapeHtml(_aeb).replace(new RegExp((i==0?"^":"")+"("+find+")"+(i==(this.queryExpr.length-4)?"$":""),_aec),"<span class=\"dijitComboBoxHighlightMatch\">$1</span>");},_escapeHtml:function(str){str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");return str;},reset:function(){this.item=null;this.inherited(arguments);},labelFunc:function(item,_aed){return _aed.getValue(item,this.labelAttr||this.searchAttr).toString();}});_4.declare("dijit.form._ComboBoxMenu",[_5._Widget,_5._Templated,_5._CssStateMixin],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' style='overflow: \"auto\"; overflow-x: \"hidden\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li>"+"</ul>",_messages:null,baseClass:"dijitComboBoxMenu",postMixInProperties:function(){this.inherited(arguments);this._messages=_4.i18n.getLocalization("dijit.form","ComboBox",this.lang);},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];},_setValueAttr:function(_aee){this.value=_aee;this.onChange(_aee);},onChange:function(_aef){},onPage:function(_af0){},onClose:function(){this._blurOptionNode();},_createOption:function(item,_af1){var _af2=_4.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"});var _af3=_af1(item);if(_af3.html){_af2.innerHTML=_af3.label;}else{_af2.appendChild(_4.doc.createTextNode(_af3.label));}if(_af2.innerHTML==""){_af2.innerHTML="&nbsp;";}_af2.item=item;return _af2;},createOptions:function(_af4,_af5,_af6){this.previousButton.style.display=(_af5.start==0)?"none":"";_4.attr(this.previousButton,"id",this.id+"_prev");_4.forEach(_af4,function(item,i){var _af7=this._createOption(item,_af6);_4.attr(_af7,"id",this.id+i);this.domNode.insertBefore(_af7,this.nextButton);},this);var _af8=false;if(_af5._maxOptions&&_af5._maxOptions!=-1){if((_af5.start+_af5.count)<_af5._maxOptions){_af8=true;}else{if((_af5.start+_af5.count)>_af5._maxOptions&&_af5.count==_af4.length){_af8=true;}}}else{if(_af5.count==_af4.length){_af8=true;}}this.nextButton.style.display=_af8?"":"none";_4.attr(this.nextButton,"id",this.id+"_next");return this.domNode.childNodes;},clearResultList:function(){while(this.domNode.childNodes.length>2){this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);}this._blurOptionNode();},_onMouseDown:function(evt){_4.stopEvent(evt);},_onMouseUp:function(evt){if(evt.target===this.domNode||!this._highlighted_option){return;}else{if(evt.target==this.previousButton){this._blurOptionNode();this.onPage(-1);}else{if(evt.target==this.nextButton){this._blurOptionNode();this.onPage(1);}else{var tgt=evt.target;while(!tgt.item){tgt=tgt.parentNode;}this._setValueAttr({target:tgt},true);}}}},_onMouseOver:function(evt){if(evt.target===this.domNode){return;}var tgt=evt.target;if(!(tgt==this.previousButton||tgt==this.nextButton)){while(!tgt.item){tgt=tgt.parentNode;}}this._focusOptionNode(tgt);},_onMouseOut:function(evt){if(evt.target===this.domNode){return;}this._blurOptionNode();},_focusOptionNode:function(node){if(this._highlighted_option!=node){this._blurOptionNode();this._highlighted_option=node;_4.addClass(this._highlighted_option,"dijitMenuItemSelected");}},_blurOptionNode:function(){if(this._highlighted_option){_4.removeClass(this._highlighted_option,"dijitMenuItemSelected");this._highlighted_option=null;}},_highlightNextOption:function(){if(!this.getHighlightedOption()){var fc=this.domNode.firstChild;this._focusOptionNode(fc.style.display=="none"?fc.nextSibling:fc);}else{var ns=this._highlighted_option.nextSibling;if(ns&&ns.style.display!="none"){this._focusOptionNode(ns);}else{this.highlightFirstOption();}}_4.window.scrollIntoView(this._highlighted_option);},highlightFirstOption:function(){var _af9=this.domNode.firstChild;var _afa=_af9.nextSibling;this._focusOptionNode(_afa.style.display=="none"?_af9:_afa);_4.window.scrollIntoView(this._highlighted_option);},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);_4.window.scrollIntoView(this._highlighted_option);},_highlightPrevOption:function(){if(!this.getHighlightedOption()){var lc=this.domNode.lastChild;this._focusOptionNode(lc.style.display=="none"?lc.previousSibling:lc);}else{var ps=this._highlighted_option.previousSibling;if(ps&&ps.style.display!="none"){this._focusOptionNode(ps);}else{this.highlightLastOption();}}_4.window.scrollIntoView(this._highlighted_option);},_page:function(up){var _afb=0;var _afc=this.domNode.scrollTop;var _afd=_4.style(this.domNode,"height");if(!this.getHighlightedOption()){this._highlightNextOption();}while(_afb<_afd){if(up){if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display=="none"){break;}this._highlightPrevOption();}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none"){break;}this._highlightNextOption();}var _afe=this.domNode.scrollTop;_afb+=(_afe-_afc)*(up?-1:1);_afc=_afe;}},pageUp:function(){this._page(true);},pageDown:function(){this._page(false);},getHighlightedOption:function(){var ho=this._highlighted_option;return (ho&&ho.parentNode)?ho:null;},handleKey:function(evt){switch(evt.charOrCode){case _4.keys.DOWN_ARROW:this._highlightNextOption();return false;case _4.keys.PAGE_DOWN:this.pageDown();return false;case _4.keys.UP_ARROW:this._highlightPrevOption();return false;case _4.keys.PAGE_UP:this.pageUp();return false;default:return true;}}});_4.declare("dijit.form.ComboBox",[_5.form.ValidationTextBox,_5.form.ComboBoxMixin],{_setValueAttr:function(_aff,_b00,_b01){this._set("item",null);if(!_aff){_aff="";}_5.form.ValidationTextBox.prototype._setValueAttr.call(this,_aff,_b00,_b01);}});_4.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(root){this.root=root;if(root.tagName!="SELECT"&&root.firstChild){root=_4.query("select",root);if(root.length>0){root=root[0];}else{this.root.innerHTML="<SELECT>"+this.root.innerHTML+"</SELECT>";root=this.root.firstChild;}this.root=root;}_4.query("> option",root).forEach(function(node){node.innerHTML=_4.trim(node.innerHTML);});},getValue:function(item,_b02,_b03){return (_b02=="value")?item.value:(item.innerText||item.textContent||"");},isItemLoaded:function(_b04){return true;},getFeatures:function(){return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};},_fetchItems:function(args,_b05,_b06){if(!args.query){args.query={};}if(!args.query.name){args.query.name="";}if(!args.queryOptions){args.queryOptions={};}var _b07=_4.data.util.filter.patternToRegExp(args.query.name,args.queryOptions.ignoreCase),_b08=_4.query("> option",this.root).filter(function(_b09){return (_b09.innerText||_b09.textContent||"").match(_b07);});if(args.sort){_b08.sort(_4.data.util.sorter.createSortFunction(args.sort,this));}_b05(_b08,args);},close:function(_b0a){return;},getLabel:function(item){return item.innerHTML;},getIdentity:function(item){return _4.attr(item,"value");},fetchItemByIdentity:function(args){var item=_4.query("> option[value='"+args.identity+"']",this.root)[0];args.onItem(item);},fetchSelectedItem:function(){var root=this.root,si=root.selectedIndex;return typeof si=="number"?_4.query("> option:nth-child("+(si!=-1?si+1:1)+")",root)[0]:null;}});_4.extend(_5.form._ComboBoxDataStore,_4.data.util.simpleFetch);}if(!_4._hasResource["dijit.form.FilteringSelect"]){_4._hasResource["dijit.form.FilteringSelect"]=true;_4.provide("dijit.form.FilteringSelect");_4.declare("dijit.form.FilteringSelect",[_5.form.MappedTextBox,_5.form.ComboBoxMixin],{required:true,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened;},isValid:function(){return this.item||(!this.required&&this.get("displayedValue")=="");},_refreshState:function(){if(!this.searchTimer){this.inherited(arguments);}},_callbackSetLabel:function(_b0b,_b0c,_b0d){if((_b0c&&_b0c.query[this.searchAttr]!=this._lastQuery)||(!_b0c&&_b0b.length&&this.store.getIdentity(_b0b[0])!=this._lastQuery)){return;}if(!_b0b.length){this.valueNode.value="";_5.form.TextBox.superclass._setValueAttr.call(this,"",_b0d||(_b0d===undefined&&!this._focused));this._set("item",null);this.validate(this._focused);}else{this.set("item",_b0b[0],_b0d);}},_openResultList:function(_b0e,_b0f){if(_b0f.query[this.searchAttr]!=this._lastQuery){return;}_5.form.ComboBoxMixin.prototype._openResultList.apply(this,arguments);if(this.item===undefined){this.validate(true);}},_getValueAttr:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValueAttr:function(_b10,_b11){if(!this._onChangeActive){_b11=null;}this._lastQuery=_b10;if(_b10===null||_b10===""){this._setDisplayedValueAttr("",_b11);return;}var self=this;this.store.fetchItemByIdentity({identity:_b10,onItem:function(item){self._callbackSetLabel(item?[item]:[],undefined,_b11);}});},_setItemAttr:function(item,_b12,_b13){this.inherited(arguments);this.valueNode.value=this.value;this._lastDisplayedValue=this.textbox.value;},_getDisplayQueryString:function(text){return text.replace(/([\\\*\?])/g,"\\$1");},_setDisplayedValueAttr:function(_b14,_b15){if(_b14==null){_b14="";}if(!this._created){if(!("displayedValue" in this.params)){return;}_b15=false;}if(this.store){this.closeDropDown();var _b16=_4.clone(this.query);this._lastQuery=_b16[this.searchAttr]=this._getDisplayQueryString(_b14);this.textbox.value=_b14;this._lastDisplayedValue=_b14;this._set("displayedValue",_b14);var _b17=this;var _b18={query:_b16,queryOptions:{ignoreCase:this.ignoreCase,deep:true},onComplete:function(_b19,_b1a){_b17._fetchHandle=null;_4.hitch(_b17,"_callbackSetLabel")(_b19,_b1a,_b15);},onError:function(_b1b){_b17._fetchHandle=null;console.error("dijit.form.FilteringSelect: "+_b1b);_4.hitch(_b17,"_callbackSetLabel")([],undefined,false);}};_4.mixin(_b18,this.fetchProperties);this._fetchHandle=this.store.fetch(_b18);}},undo:function(){this.set("displayedValue",this._lastDisplayedValue);}});}if(!_4._hasResource["dijit.form._Spinner"]){_4._hasResource["dijit.form._Spinner"]=true;_4.provide("dijit.form._Spinner");_4.declare("dijit.form._Spinner",_5.form.RangeBoundTextBox,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:_4.cache("dijit.form","templates/Spinner.html","<div class=\"dijit dijitReset dijitInlineTable dijitLeft\"\r\n\tid=\"widget_${id}\" role=\"presentation\"\r\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\r\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\r\n\t\t\tdojoAttachPoint=\"upArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650;\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\r\n\t\t\tdojoAttachPoint=\"downArrowNode\"\r\n\t\t\t><div class=\"dijitArrowButtonInner\"\r\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660;\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/></div\r\n\t\t></div\r\n\t></div\r\n\t><div class='dijitReset dijitValidationContainer'\r\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935;\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\r\n\t/></div\r\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\r\n\t\t><input class='dijitReset dijitInputInner' dojoAttachPoint=\"textbox,focusNode\" type=\"${type}\" dojoAttachEvent=\"onkeypress:_onKeyPress\"\r\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\r\n\t/></div\r\n></div>\r\n"),baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{"upArrowNode":"dijitUpArrowButton","downArrowNode":"dijitDownArrowButton"},adjust:function(val,_b1c){return val;},_arrowPressed:function(_b1d,_b1e,_b1f){if(this.disabled||this.readOnly){return;}this._setValueAttr(this.adjust(this.get("value"),_b1e*_b1f),false);_5.selectInputText(this.textbox,this.textbox.value.length);},_arrowReleased:function(node){this._wheelTimer=null;if(this.disabled||this.readOnly){return;}},_typematicCallback:function(_b20,node,evt){var inc=this.smallDelta;if(node==this.textbox){var k=_4.keys;var key=evt.charOrCode;inc=(key==k.PAGE_UP||key==k.PAGE_DOWN)?this.largeDelta:this.smallDelta;node=(key==k.UP_ARROW||key==k.PAGE_UP)?this.upArrowNode:this.downArrowNode;}if(_b20==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1,inc);}},_wheelTimer:null,_mouseWheeled:function(evt){_4.stopEvent(evt);var _b21=evt.detail?(evt.detail*-1):(evt.wheelDelta/120);if(_b21!==0){var node=this[(_b21>0?"upArrowNode":"downArrowNode")];this._arrowPressed(node,_b21,this.smallDelta);if(!this._wheelTimer){clearTimeout(this._wheelTimer);}this._wheelTimer=setTimeout(_4.hitch(this,"_arrowReleased",node),50);}},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,!_4.isMozilla?"onmousewheel":"DOMMouseScroll","_mouseWheeled");this._connects.push(_5.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:_4.keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));this._connects.push(_5.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:_4.keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));this._connects.push(_5.typematic.addListener(this.upArrowNode,this.textbox,{charOrCode:_4.keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));this._connects.push(_5.typematic.addListener(this.downArrowNode,this.textbox,{charOrCode:_4.keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));}});}if(!_4._hasResource["dijit.form.NumberSpinner"]){_4._hasResource["dijit.form.NumberSpinner"]=true;_4.provide("dijit.form.NumberSpinner");_4.declare("dijit.form.NumberSpinner",[_5.form._Spinner,_5.form.NumberTextBoxMixin],{adjust:function(val,_b22){var tc=this.constraints,v=isNaN(val),_b23=!isNaN(tc.max),_b24=!isNaN(tc.min);if(v&&_b22!=0){val=(_b22>0)?_b24?tc.min:_b23?tc.max:0:_b23?this.constraints.max:_b24?tc.min:0;}var _b25=val+_b22;if(v||isNaN(_b25)){return val;}if(_b23&&(_b25>tc.max)){_b25=tc.max;}if(_b24&&(_b25<tc.min)){_b25=tc.min;}return _b25;},_onKeyPress:function(e){if((e.charOrCode==_4.keys.HOME||e.charOrCode==_4.keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.get("value")!="undefined"){var _b26=this.constraints[(e.charOrCode==_4.keys.HOME?"min":"max")];if(typeof _b26=="number"){this._setValueAttr(_b26,false);}_4.stopEvent(e);}}});}if(!_4._hasResource["dijit.form.SimpleTextarea"]){_4._hasResource["dijit.form.SimpleTextarea"]=true;_4.provide("dijit.form.SimpleTextarea");_4.declare("dijit.form.SimpleTextarea",_5.form.TextBox,{baseClass:"dijitTextBox dijitTextArea",attributeMap:_4.delegate(_5.form._FormValueWidget.prototype.attributeMap,{rows:"textbox",cols:"textbox"}),rows:"3",cols:"20",templateString:"<textarea ${!nameAttrSetting} dojoAttachPoint='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef){this.value=this.srcNodeRef.value;}this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);if(_4.isIE&&this.cols){_4.addClass(this.textbox,"dijitTextAreaCols");}},filter:function(_b27){if(_b27){_b27=_b27.replace(/\r/g,"");}return this.inherited(arguments);},_previousValue:"",_onInput:function(e){if(this.maxLength){var _b28=parseInt(this.maxLength);var _b29=this.textbox.value.replace(/\r/g,"");var _b2a=_b29.length-_b28;if(_b2a>0){if(e){_4.stopEvent(e);}var _b2b=this.textbox;if(_b2b.selectionStart){var pos=_b2b.selectionStart;var cr=0;if(_4.isOpera){cr=(this.textbox.value.substring(0,pos).match(/\r/g)||[]).length;}this.textbox.value=_b29.substring(0,pos-_b2a-cr)+_b29.substring(pos-cr);_b2b.setSelectionRange(pos-_b2a,pos-_b2a);}else{if(_4.doc.selection){_b2b.focus();var _b2c=_4.doc.selection.createRange();_b2c.moveStart("character",-_b2a);_b2c.text="";_b2c.select();}}}this._previousValue=this.textbox.value;}this.inherited(arguments);}});}if(!_4._hasResource["esri.dijit.AttributeInspector"]){_4._hasResource["esri.dijit.AttributeInspector"]=true;_4.provide("esri.dijit.AttributeInspector");(function(){var link=document.createElement("link");link.type="text/css";link.rel="stylesheet";link.href=_4.moduleUrl("esri","dijit/css/AttributeInspector.css");document.getElementsByTagName("head").item(0).appendChild(link);})();_4.declare("esri.dijit.AttributeInspector",[_5._Widget,_5._Templated],{widgetsInTemplate:true,templateString:"<div class=\"esriAttributeInspector\">\r\n    <div class=\"atiLayerName\" dojoAttachPoint=\"layerName\"></div>\r\n    <div class=\"atiAttributes\" dojoAttachPoint=\"attributeTable\"></div>\r\n    <div dojoAttachPoint=\"attachmentEditor\"></div>\r\n    <div class=\"atiEditorTrackingInfo\" dojoAttachPoint=\"editorTrackingInfoDiv\"></div>\r\n    <div class=\"atiButtons\" dojoAttachPoint=\"editButtons\">\r\n        <button  dojoType=\"dijit.form.Button\" class=\"atiButton atiDeleteButton\"  dojoAttachPoint=\"deleteBtn\" dojoAttachEvent=\"onClick: onDeleteBtn\" showLabel=\"true\" type=\"button\">${NLS_deleteFeature}</button>\r\n        <div class=\"atiNavButtons\" dojoAttachPoint=\"navButtons\">\r\n            <div class=\"atiNavMessage\" dojoAttachPoint=\"navMessage\"></div>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiFirstIcon\" dojoAttachPoint=\"firstFeatureButton\" dojoAttachEvent=\"onClick: onFirstFeature\" showLabel=\"false\" type=\"button\">${NLS_first}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiPrevIcon\" dojoAttachPoint=\"prevFeatureButton\" dojoAttachEvent=\"onClick: onPreviousFeature\" showLabel=\"false\" type=\"button\">${NLS_previous}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiNextIcon\" dojoAttachPoint=\"nextFeatureButton\" dojoAttachEvent=\"onClick: onNextFeature\" showLabel=\"false\" type=\"button\">${NLS_next}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiLastIcon\" dojoAttachPoint=\"lastFeatureButton\" dojoAttachEvent=\"onClick: onLastFeature\" showLabel=\"false\" type=\"button\">${NLS_last}</button>\r\n        </div>\r\n    </div>\r\n</div>\r\n",_navMessage:"( ${idx} ${of} ${numFeatures} )",onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},constructor:function(_b2d,_b2e){_4.mixin(this,esri.bundle.widgets.attributeInspector);_b2d=_b2d||{};if(!_b2d.featureLayer&&!_b2d.layerInfos){console.error("esri.AttributeInspector: please provide correct parameter in the constructor");}this._userIds={};if(_b2d.featureLayer&&_b2d.featureLayer.credential){var _b2f=_b2d.featureLayer.id;this._userIds[_b2f]=_b2d.featureLayer.credential.userId;}else{if(_b2d.layerInfos){var _b30=_b2d.layerInfos;_4.forEach(_b30,function(_b31){if(_b31.featureLayer){var _b32=_b31.featureLayer.id;if(_b31.featureLayer.credential){this._userIds[_b32]=_b31.featureLayer.credential.userId;}if(_b31.userId){this._userIds[_b32]=_b31.userId;}}},this);}}this._datePackage=this._getDatePackage(_b2d);this._layerInfos=_b2d.layerInfos||[{featureLayer:_b2d.featureLayer,options:_b2d.options||[]}];this._aiConnects=[];this._selection=[];this._toolTips=[];this._numFeatures=0;this._featureIdx=0;this._currentLInfo=null;this._currentFeature=null;this._hideNavButtons=_b2d.hideNavButtons||false;},postCreate:function(){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();},destroy:function(){this._destroyAttributeTable();_4.forEach(this._aiConnects,_4.disconnect);delete this._aiConnects;if(this._attachmentEditor){this._attachmentEditor.destroy();delete this._attachmentEditor;}delete this._layerInfos;this._selection=this._currentFeature=this._currentLInfo=this._attributes=this._layerInfos=null;this.inherited(arguments);},refresh:function(){this._updateSelection();},first:function(){this.onFirstFeature();},last:function(){this.onLastFeature();},next:function(){this.onNextFeature();},previous:function(){this.onPreviousFeature();},showFeature:function(_b33,_b34){if(_b34){this._createOnlyFirstTime=true;}this._updateSelection([_b33],_b34);this._updateUI();},onLayerSelectionChange:function(_b35,_b36,_b37){this._createOnlyFirstTime=false;this._featureIdx=(_b37===esri.layers.FeatureLayer.SELECTION_NEW)?0:this._featureIdx;this._updateSelection();this._updateUI();},onLayerSelectionClear:function(){if(!this._selection||this._selection.length<=0){return;}this._numFeatures=0;this._featureIdx=0;this._selection=[];this._currentFeature=null;this._currentLInfo=null;this._updateUI();},onLayerEditsComplete:function(_b38,adds,_b39,_b3a){_b3a=_b3a||[];if(_b3a.length){var _b3b=this._selection;var _b3c=_b38.featureLayer.objectIdField;_4.forEach(_b3a,_4.hitch(this,function(del){_4.some(_b3b,_4.hitch(this,function(item,idx){if(item.attributes[_b3c]!==del.objectId){return false;}this._selection.splice(idx,1);return true;}));}));}adds=adds||[];if(adds.length){this._selection=esri.dijit.editing.Util.LayerHelper.findFeatures(adds,_b38.featureLayer);this._featureIdx=0;}var _b3d=this._numFeatures=this._selection?this._selection.length:0;if(adds.length){var _b3e=_b3d?this._selection[this._featureIdx]:null;var _b3f=_b3e.getLayer();var _b40=_b3f.getEditCapabilities();if(!(_b40.canCreate&&!_b40.canUpdate)){this._showFeature(_b3e);}}this._updateUI();},onFieldValueChange:function(_b41,_b42){_b42=(typeof _b42==="undefined")?null:_b42;var _b43=_b41.field;if(_b43.type==="esriFieldTypeDate"){_b42=(_b42&&_b42.getTime)?_b42.getTime():(_b42&&_b42.toGregorian?_b42.toGregorian().getTime():_b42);}if(this._currentFeature.attributes[_b43.name]===_b42){return;}var _b44=this._currentLInfo;var _b45=this._currentFeature;var _b46=_b43.name;if(_b46===_b44.typeIdField){var type=this._findFirst(_b44.types,"id",_b42);var _b47=_b44.fieldInfos;_4.forEach(_b47,function(_b48){_b43=_b48.field;if(!_b43||_b43.name===_b44.typeIdField){return;}var node=_b48.dijit;var _b49=this._setFieldDomain(node,type,_b43);if(_b49&&node){this._setValue(node,_b45.attributes[_b43.name]+"");if(node.isValid()===false){this._setValue(node,null);}}},this);}this.onAttributeChange(_b45,_b46,_b42);},onDeleteBtn:function(evt){this._deleteFeature();},onNextFeature:function(evt){this._onNextFeature(1);},onPreviousFeature:function(evt){this._onNextFeature(-1);},onFirstFeature:function(evt){this._onNextFeature(this._featureIdx*-1);},onLastFeature:function(evt){this._onNextFeature((this._numFeatures-1)-this._featureIdx);},_initLayerInfos:function(){var _b4a=this._layerInfos;this._editorTrackingInfos={};_4.forEach(_b4a,this._initLayerInfo,this);},_initLayerInfo:function(_b4b){var _b4c=_b4b.featureLayer;this._connect(_b4c,"onSelectionComplete",_4.hitch(this,"onLayerSelectionChange",_b4b));this._connect(_b4c,"onSelectionClear",_4.hitch(this,"onLayerSelectionClear",_b4b));this._connect(_b4c,"onEditsComplete",_4.hitch(this,"onLayerEditsComplete",_b4b));_b4b.showAttachments=_b4c.hasAttachments?(esri._isDefined(_b4b.showAttachments)?_b4b.showAttachments:true):false;_b4b.hideFields=_b4b.hideFields||[];_b4b.htmlFields=_b4b.htmlFields||[];_b4b.isEditable=_b4c.isEditable()?(esri._isDefined(_b4b.isEditable)?_b4b.isEditable:true):false;_b4b.typeIdField=_b4c.typeIdField;_b4b.layerId=_b4c.id;_b4b.types=_b4c.types;if(!_b4b.showGlobalID&&_b4c.globalIdField){_b4b.hideFields.push(_b4c.globalIdField);}if(!_b4b.showObjectID){_b4b.hideFields.push(_b4c.objectIdField);}var _b4d=this._getFields(_b4b.featureLayer);if(!_b4d){return;}var _b4e=_b4b.fieldInfos||[];_b4e=_4.map(_b4e,function(_b4f){return _4.mixin({},_b4f);});if(!_b4e.length){_b4d=_4.filter(_b4d,_4.hitch(this,function(_b50){return !this._isInFields(_b50.name,_b4b.hideFields);}));_b4b.fieldInfos=_4.map(_b4d,_4.hitch(this,function(_b51){var _b52=(this._isInFields(_b51.name,_b4b.htmlFields)?esri.dijit.AttributeInspector.STRING_FIELD_OPTION_RICHTEXT:esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTBOX);return {"fieldName":_b51.name,"field":_b51,"stringFieldOption":_b52};}));}else{_b4b.fieldInfos=_4.filter(_4.map(_b4e,_4.hitch(this,function(_b53){var _b54=_b53.stringFieldOption||(this._isInFields(_b53.fieldName,_b4b.htmlFields)?esri.dijit.AttributeInspector.STRING_FIELD_OPTION_RICHTEXT:esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTBOX);return _4.mixin(_b53,{"field":this._findFirst(_b4d,"name",_b53.fieldName),"stringFieldOption":_b54});})),"return item.field;");}var _b55=[];if(_b4c.editFieldsInfo){if(_b4c.editFieldsInfo.creatorField){_b55.push(_b4c.editFieldsInfo.creatorField);}if(_b4c.editFieldsInfo.creationDateField){_b55.push(_b4c.editFieldsInfo.creationDateField);}if(_b4c.editFieldsInfo.editorField){_b55.push(_b4c.editFieldsInfo.editorField);}if(_b4c.editFieldsInfo.editDateField){_b55.push(_b4c.editFieldsInfo.editDateField);}}this._editorTrackingInfos[_b4c.id]=_b55;},_createAttachmentEditor:function(){this._attachmentEditor=null;var _b56=this._layerInfos;var _b57=_4.filter(_b56,"return item.showAttachments");if(!_b57||!_b57.length){return;}this._attachmentEditor=new esri.dijit.editing.AttachmentEditor({"class":"atiAttachmentEditor"},this.attachmentEditor);this._attachmentEditor.startup();},_setCurrentLInfo:function(_b58){var _b59=this._currentLInfo?this._currentLInfo.featureLayer:null;var _b5a=_b58.featureLayer;if(_b59&&_b59.id===_b5a.id&&!_b59.ownershipBasedAccessControlForFeatures){var _b5b=_b5a.getEditCapabilities();if(!(_b5b.canCreate&&!_b5b.canUpdate)){return;}}this._currentLInfo=_b58;this._createTable();},_updateSelection:function(_b5c,_b5d){this._selection=_b5c||[];var _b5e=this._layerInfos;_4.forEach(_b5e,this._getSelection,this);var _b5f=this._numFeatures=this._selection.length;var _b60=_b5f?this._selection[this._featureIdx]:null;this._showFeature(_b60,_b5d);},_getSelection:function(_b61){var _b62=_b61.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(_b62);},_updateUI:function(){var _b63=this._numFeatures;var _b64=this._currentLInfo;this.layerName.innerHTML=(!_b64||_b63===0)?this.NLS_noFeaturesSelected:(_b64.featureLayer?_b64.featureLayer.name:"");_4.style(this.attributeTable,"display",_b63?"":"none");_4.style(this.editButtons,"display",_b63?"":"none");_4.style(this.navButtons,"display",(!this._hideNavButtons&&(_b63>1)?"":"none"));this.navMessage.innerHTML=esri.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);if(this._attachmentEditor){_4.style(this._attachmentEditor.domNode,"display",((_b64&&_b64.showAttachments)&&_b63)?"":"none");}var _b65=((_b64&&_b64.showDeleteButton===false)||!this._canDelete)?false:true;_4.style(this.deleteBtn.domNode,"display",_b65?"":"none");if(this.domNode.parentNode&&this.domNode.parentNode.scrollTop>0){this.domNode.parentNode.scrollTop=0;}},_onNextFeature:function(_b66){this._featureIdx+=_b66;if(this._featureIdx<0){this._featureIdx=this._numFeatures-1;}else{if(this._featureIdx>=this._numFeatures){this._featureIdx=0;}}var _b67=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(_b67);this._updateUI();this.onNext(_b67);},_deleteFeature:function(){this.onDelete(this._currentFeature);},_showFeature:function(_b68,_b69){if(!_b68){return;}this._currentFeature=_b68;var _b6a=_b69?_b69:_b68.getLayer();var _b6b=_b6a.getEditCapabilities({feature:_b68,userId:this._userIds[_b6a.id]});this._canUpdate=_b6b.canUpdate;this._canDelete=_b6b.canDelete;var _b6c=this._getLInfoFromFeatureLayer(_b6a);if(!_b6c){return;}this._setCurrentLInfo(_b6c);var _b6d=_b68.attributes;var type=this._findFirst(_b6c.types,"id",_b6d[_b6c.typeIdField]);var node,_b6e=null;var _b6f=_b6c.fieldInfos;_4.forEach(_b6f,function(_b70){_b6e=_b70.field;node=_b70.dijit||null;if(!node){return;}var _b71=this._setFieldDomain(node,type,_b6e);var _b72=_b6d[_b6e.name];_b72=(_b72&&_b71&&_b71.codedValues&&_b71.codedValues.length)?(_b71.codedValues[_b72]?_b71.codedValues[_b72].name:_b72):_b72;if(!esri._isDefined(_b72)){_b72="";}if(node.declaredClass==="dijit.form.DateTextBox"){_b72=(_b72==="")?null:new Date(_b72);}else{if(node.declaredClass==="dijit.form.FilteringSelect"){node._lastValueReported=null;_b72=_b6d[_b6e.name]+"";}}try{this._setValue(node,_b72);if(node.declaredClass==="dijit.form.FilteringSelect"&&node.isValid()===false){this._setValue(node,null);}}catch(error){node.set("displayedValue",this.NLS_errorInvalid,false);}},this);if(this._attachmentEditor&&_b6c.showAttachments){this._attachmentEditor.showAttachments(this._currentFeature);}var _b73=_b6a.getEditSummary(_b68);if(_b73){this.editorTrackingInfoDiv.innerHTML=_b73;esri.show(this.editorTrackingInfoDiv);}else{esri.hide(this.editorTrackingInfoDiv);}},_setFieldDomain:function(node,type,_b74){if(!node){return null;}var _b75=_b74.domain;if(type&&type.domains){if(type.domains[_b74.name]&&type.domains[_b74.name] instanceof esri.layers.InheritedDomain===false){_b75=type.domains[_b74.name];}}if(!_b75){return null;}if(_b75.codedValues&&_b75.codedValues.length>0){node.store=this._toStore(_4.map(_b75.codedValues,"return { id: item.code += '', name: item.name };"));this._setValue(node,_b75.codedValues[0].code);}else{node.constraints={min:esri._isDefined(_b75.minValue)?_b75.minValue:Number.MIN_VALUE,max:esri._isDefined(_b75.maxValue)?_b75.maxValue:Number.MAX_VALUE};this._setValue(node,node.constraints.min);}return _b75;},_setValue:function(node,_b76){if(!node.set){return;}node._onChangeActive=false;node.set("value",_b76,true);node._onChangeActive=true;},_getFields:function(_b77){var _b78=_b77._getOutFields();if(!_b78){return null;}var _b79=_b77.fields;return (_b78=="*")?_b79:_4.filter(_4.map(_b78,_4.hitch(this,"_findFirst",_b79,"name")),esri._isDefined);},_isInFields:function(_b7a,_b7b){if(!_b7a||!_b7b&&!_b7b.length){return false;}return _4.some(_b7b,function(name){return name.toLowerCase()===_b7a.toLowerCase();});},_findFirst:function(_b7c,_b7d,_b7e){var _b7f=_4.filter(_b7c,function(item){return item.hasOwnProperty(_b7d)&&item[_b7d]===_b7e;});return (_b7f&&_b7f.length)?_b7f[0]:null;},_getLInfoFromFeatureLayer:function(_b80){var _b81=_b80?_b80.id:null;return this._findFirst(this._layerInfos,"layerId",_b81);},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=_4.create("table",{cellspacing:"0",cellpadding:"0"},this.attributeTable);var _b82=_4.create("tbody",null,this._attributes);var _b83=this._currentFeature;var _b84=this._currentLInfo;var type=this._findFirst(_b84.types,"id",_b83.attributes[_b84.typeIdField]);var _b85=_b84.fieldInfos;_4.forEach(_b85,_4.hitch(this,"_createField",type,_b82),this);this._createOnlyFirstTime=false;},_createField:function(type,_b86,_b87){var _b88=this._currentLInfo;var _b89=_b87.field;if(this._isInFields(_b89.name,_b88.hideFields)){return;}if(this._isInFields(_b89.name,this._editorTrackingInfos[_b88.featureLayer.id])){return;}var node=_4.create("tr",null,_b86);var td=_4.create("td",{innerHTML:_b87.label||_b89.alias||_b89.name,"class":"atiLabel"},node);td=_4.create("td",null,node);var _b8a=null;var _b8b=false;if(_b87.customField){_4.place(_b87.customField.domNode||_b87.customField,_4.create("div",null,td),"first");_b8a=_b87.customField;}else{if(_b88.isEditable===false||_b89.editable===false||_b87.isEditable===false||_b89.type==="esriFieldTypeOID"||_b89.type==="esriFieldTypeGlobalID"||(!this._canUpdate&&!this._createOnlyFirstTime)){_b8b=true;}}if(!_b8a&&(_b88.typeIdField&&_b89.name.toLowerCase()==_b88.typeIdField.toLowerCase())){_b8a=this._createTypeField(_b89,_b87,td);}else{if(!_b8a){_b8a=this._createDomainField(_b89,_b87,type,td);}}if(!_b8a){switch(_b89.type){case "esriFieldTypeString":_b8a=this._createStringField(_b89,_b87,td);break;case "esriFieldTypeDate":_b8a=this._createDateField(_b89,_b87,td);break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":_b8a=this._createIntField(_b89,_b87,td);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":_b8a=this._createFltField(_b89,_b87,td);break;default:_b8a=this._createStringField(_b89,_b87,td);break;}}if(_b87.tooltip&&_b87.tooltip.length){this._toolTips.push(new _5.Tooltip({connectId:[_b8a.id],label:_b87.tooltip}));}_b8a.onChange=_4.hitch(this,"onFieldValueChange",_b87);_b8a.set("disabled",_b8b);_b87.dijit=_b8a;},_createTypeField:function(_b8c,_b8d,node){return new _5.form.FilteringSelect({"class":"atiField",name:_b8c.alias||_b8c.name,store:this._toStore(_4.map(this._currentLInfo.types,"return { id: item.id, name: item.name };")),searchAttr:"name"},_4.create("div",null,node));},_createDomainField:function(_b8e,_b8f,type,node){var _b90=_b8e.domain;if(type&&type.domains){if(type.domains[_b8e.name]&&type.domains[_b8e.name] instanceof esri.layers.InheritedDomain===false){_b90=type.domains[_b8e.name];}}if(!_b90){return null;}if(_b90.codedValues){return new _5.form.FilteringSelect({"class":"atiField",name:_b8e.alias||_b8e.name,store:null,searchAttr:"name",required:_b8e.nullable||false},_4.create("div",null,node));}else{return new _5.form.NumberSpinner({"class":"atiField"},_4.create("div",null,node));}},_createStringField:function(_b91,_b92,node){var _b93={"class":"atiField",trim:true,maxLength:_b91.length};if(_b92.stringFieldOption===esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA){_b93["class"]+=" atiTextAreaField";return new _5.form.SimpleTextarea(_b93,_4.create("div",null,node));}else{if(_b92.stringFieldOption===esri.dijit.AttributeInspector.STRING_FIELD_OPTION_RICHTEXT){_b93["class"]+=" atiRichTextField";_b93.height="100%";_b93.width="100%";_b93.plugins=_b92.richTextPlugins||["bold","italic","underline","foreColor","hiliteColor","|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent","|","createLink"];return new _5.Editor(_b93,_4.create("div",null,node));}else{return new _5.form.TextBox(_b93,_4.create("div",null,node));}}},_createDateField:function(_b94,_b95,node){var _b96={"class":"atiField","trim":true};if(this._datePackage){_b96.datePackage=this._datePackage;}return new _5.form.DateTextBox(_b96,_4.create("div",null,node));},_createIntField:function(_b97,_b98,node){return new _5.form.NumberTextBox({"class":"atiField",constraints:{places:0},invalidMessage:this.NLS_validationInt,trim:true},_4.create("div",null,node));},_createFltField:function(_b99,_b9a,node){return new _5.form.NumberTextBox({"class":"atiField",trim:true,invalidMessage:this.NLS_validationFlt},_4.create("div",null,node));},_toStore:function(_b9b){return new _4.data.ItemFileReadStore({data:{identifier:"id",label:"name",items:_b9b}});},_connect:function(node,evt,func){this._aiConnects.push(_4.connect(node,evt,func));},_getDatePackage:function(_b9c){if(_b9c.datePackage===null){return null;}else{if(_b9c.datePackage){return _b9c.datePackage;}}return null;},_destroyAttributeTable:function(){var _b9d=this.layerInfos;_4.forEach(_b9d,function(_b9e){var _b9f=_b9e.fieldInfos;_4.forEach(_b9f,function(_ba0){var _ba1=_ba0.dijit;if(_ba1){_ba1._onChangeHandle=null;if(_ba0.customField){return;}if(_ba1.destroyRecursive){_ba1.destroyRecursive();}else{if(_ba1.destroy){_ba1.destroy();}}}_ba0.dijit=null;},this);},this);var _ba2=this._toolTips;_4.forEach(_ba2,"item.destroy(); delete item;");this._toolTips=[];if(this._attributes){_4.destroy(this._attributes);}}});_4.mixin(esri.dijit.AttributeInspector,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});}if(!_4._hasResource["esri.dijit.AttributeInspector-all"]){_4._hasResource["esri.dijit.AttributeInspector-all"]=true;_4.provide("esri.dijit.AttributeInspector-all");}}};});
