/*
 RequireJS text 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
 RequireJS i18n 0.24.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
(function(){function b(a,c,e){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var f=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],h=0,k;k=f[h++];)console[k]||function(){var n=k+"";console[n]="log"in console?function(){var m=Array.apply({},arguments);m.unshift(n+":");console.log(m.join(" "))}:function(){};console[n]._fake=true}()}if(typeof a==
"undefined")a={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};var j=a;if(typeof c=="undefined")c={_scopeName:"dijit"};if(typeof e=="undefined")e={_scopeName:"dojox"};if(!j._scopeArgs)j._scopeArgs=[a,c,e];j.global=this;j.config={isDebug:false,debugAtAllCosts:false};if(f=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var g in f)j.config[g]=f[g];a.locale=j.config.locale;g="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:g?+g[0]:NaN,toString:function(){with(j.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",j.version.toString());var i,l,o={};for(h in{toString:1}){i=[];break}a._extraNames=i=i||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];l=i.length;a._mixin=function(n,m){var p,s,q;for(p in m){s=m[p];
if(!(p in n)||n[p]!==s&&(!(p in o)||o[p]!==s))n[p]=s}if(l&&m)for(q=0;q<l;++q){p=i[q];s=m[p];if(!(p in n)||n[p]!==s&&(!(p in o)||o[p]!==s))n[p]=s}return n};a.mixin=function(n){n||(n={});for(var m=1,p=arguments.length;m<p;m++)j._mixin(n,arguments[m]);return n};a._getProp=function(n,m,p){p=p||j.global;for(var s=0,q;p&&(q=n[s]);s++){if(s==0&&j._scopeMap[q])q=j._scopeMap[q];p=q in p?p[q]:m?(p[q]={}):undefined}return p};a.setObject=function(n,m,p){var s=n.split(".");n=s.pop();return(p=j._getProp(s,true,
p))&&n?(p[n]=m):undefined};a.getObject=function(n,m,p){return j._getProp(n.split("."),m,p)};a.exists=function(n,m){return j.getObject(n,false,m)!==undefined};a.eval=function(n){return j.global.eval?j.global.eval(n):eval(n)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:c,dojox:e}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=b();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var d=b();dojo=d.dojo;dijit=d.dijit;dojox=d.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(b,d){var a=["_moduleHasPrefix","_loadPath","_loadUri","_loadUriAndCheck","loaded","_callLoaded","_getModuleSymbols","_loadModule","require","provide","platformRequire","requireIf","requireAfterIf","registerModulePath"],c,e;for(c=0;c<a.length;){e=a[c++];d[e]=function(n){return function(){console.warn("dojo."+n+" not available when using an AMD loader.")}}(e)}var f=function(n){var m=[],p;for(p=0;p<n.length;)m.push(n[p++]);
return m},h=function(n,m){return m?typeof m=="string"?function(){n[m]()}:function(){m.call(n)}:n};d.ready=d.addOnLoad=function(n,m){b.ready(m?h(n,m):n)};d.addOnLoad(function(){d.postLoad=d.config.afterOnLoad=true});if(a=d.config.addOnLoad)d.addOnLoad[a instanceof Array?"apply":"call"](d,a);var k=d._loaders=[],j=function(){var n=k.slice(0);for(Array.prototype.splice.apply(k,[0,k.length]);n.length;)n.shift().call()};k.unshift=function(){Array.prototype.unshift.apply(k,f(arguments));b.ready(j)};k.splice=
function(){Array.prototype.splice.apply(k,f(arguments));b.ready(j)};var g=d._unloaders=[];d.unloaded=function(){for(;g.length;)g.pop().call()};d._onto=function(n,m,p){n.push(p?h(m,p):m)};d._modulesLoaded=function(){};d.loadInit=function(n){n()};var i=function(n){return n.replace(/\./g,"/")};d.getL10nName=function(n,m,p){p=p?p.toLowerCase():d.locale;n="i18n!"+i(n);return/root/i.test(p)?n+"/nls/"+m:n+"/nls/"+p+"/"+m};d.requireLocalization=function(n,m,p){if(b.vendor!="altoviso.com")p=!p||p.toLowerCase()===
d.locale?"root":p;return b(d.getL10nName(n,m,p))};d.i18n={getLocalization:d.requireLocalization,normalizeLocale:function(n){n=n?n.toLowerCase():d.locale;if(n=="root")n="ROOT";return n}};var l=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,o=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;d._Url=function(){for(var n=arguments,m=[n[0]],p=1;p<n.length;p++)if(n[p]){var s=new d._Url(n[p]+"");m=new d._Url(m[0]+"");if(s.path==""&&!s.scheme&&!s.authority&&!s.query){if(s.fragment!=
null)m.fragment=s.fragment;s=m}else if(!s.scheme){s.scheme=m.scheme;if(!s.authority){s.authority=m.authority;if(s.path.charAt(0)!="/"){m=(m.path.substring(0,m.path.lastIndexOf("/")+1)+s.path).split("/");for(var q=0;q<m.length;q++)if(m[q]==".")if(q==m.length-1)m[q]="";else{m.splice(q,1);q--}else if(q>0&&!(q==1&&m[0]=="")&&m[q]==".."&&m[q-1]!="..")if(q==m.length-1){m.splice(q,1);m[q-1]=""}else{m.splice(q-1,2);q-=2}s.path=m.join("/")}}}m=[];s.scheme&&m.push(s.scheme,":");s.authority&&m.push("//",s.authority);
m.push(s.path);s.query&&m.push("?",s.query);s.fragment&&m.push("#",s.fragment)}this.uri=m.join("");p=this.uri.match(l);this.scheme=p[2]||(p[1]?"":null);this.authority=p[4]||(p[3]?"":null);this.path=p[5];this.query=p[7]||(p[6]?"":null);this.fragment=p[9]||(p[8]?"":null);if(this.authority!=null){p=this.authority.match(o);this.user=p[3]||null;this.password=p[4]||null;this.host=p[6]||p[7];this.port=p[9]||null}};d._Url.prototype.toString=function(){return this.uri};d.moduleUrl=function(n,m){if(!n)return null;
n=i(n)+(m?"/"+m:"");m="";var p=n.match(/(.+)(\.[^\/]*)$/);if(p){n=p[1];m=p[2]}return new d._Url(b.nameToUrl(n,m))};return d});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(b){if(typeof window!="undefined"){b.isBrowser=true;b._name="browser";(function(){var a=b;if(document&&document.getElementsByTagName)for(var c=document.getElementsByTagName("script"),e=/dojo(\.xd)?\.js(\W|$)/i,f=0;f<c.length;f++){var h=c[f].getAttribute("src");if(h){var k=h.match(e);if(k){if(!a.config.baseUrl)a.config.baseUrl=h.substring(0,k.index);if(c=c[f].getAttribute("djConfig")||c[f].getAttribute("data-dojo-config")){c=
eval("({ "+c+" })");for(var j in c)b.config[j]=c[j]}break}}}a.baseUrl=a.config.baseUrl;j=navigator;c=j.userAgent;e=j.appVersion;f=parseFloat(e);if(c.indexOf("Opera")>=0)a.isOpera=f;if(c.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=e.indexOf("Konqueror")>=0?f:0;a.isWebKit=parseFloat(c.split("WebKit/")[1])||undefined;a.isChrome=parseFloat(c.split("Chrome/")[1])||undefined;a.isMac=e.indexOf("Macintosh")>=0;if((h=Math.max(e.indexOf("WebKit"),e.indexOf("Safari"),0))&&!b.isChrome){a.isSafari=parseFloat(e.split("Version/")[1]);
if(!a.isSafari||parseFloat(e.substr(h+7))<=419.3)a.isSafari=2}if(c.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=f;if(a.isMoz)a.isFF=parseFloat(c.split("Firefox/")[1]||c.split("Minefield/")[1])||undefined;if(document.all&&!a.isOpera){a.isIE=parseFloat(e.split("MSIE ")[1])||undefined;if((c=document.documentMode)&&c!=5&&Math.floor(a.isIE)!=c)a.isIE=c}if(b.isIE&&window.location.protocol==="file:")b.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
b.config.locale||(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var p,s;if(!b.isIE||!b.config.ieForceActiveXXhr)try{p=new XMLHttpRequest}catch(q){}if(!p)for(var t=0;t<3;++t){var C=a._XMLHTTP_PROGIDS[t];try{p=new ActiveXObject(C)}catch(D){s=D}if(p){a._XMLHTTP_PROGIDS=[C];break}}if(!p)throw new Error("XMLHTTP not available: "+s);return p};a._isDocumentOk=function(p){p=p.status||0;var s=location.protocol;
return p>=200&&p<300||p==304||p==1223||!p&&(s=="file:"||s=="chrome:"||s=="chrome-extension:"||s=="app:")};var g=window.location+"";var i=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(p,s){var q=a._xhrObj();if(!i&&b._Url)p=(new b._Url(g,p)).toString();if(a.config.cacheBust){p+="";p+=(p.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}q.open("GET",p,false);try{q.send(null);if(!a._isDocumentOk(q)){var t=Error("Unable to load "+p+" status:"+q.status);
t.status=q.status;t.responseText=q.responseText;throw t;}}catch(C){if(s)return null;throw C;}return q.responseText};var l=window,o=function(p,s){var q=l.attachEvent||l.addEventListener;p=l.attachEvent?p:p.substring(2);q(p,function(){s.apply(l,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var p=a._windowUnloaders;p.length;)p.pop()();a=null};var n=0;a.addOnWindowUnload=function(p,s){a._onto(a._windowUnloaders,p,s);if(!n){n=1;o("onunload",a.windowUnloaded)}};var m=0;a.addOnUnload=
function(p,s){a._onto(a._unloaders,p,s);if(!m){m=1;o("onbeforeunload",b.unloaded)}}})();b._initFired=false;b._loadInit=function(){if(b._scrollIntervalId){clearInterval(b._scrollIntervalId);b._scrollIntervalId=0}if(!b._initFired){b._initFired=true;!b.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",b._loadInit);b._inFlightCount==0&&b._modulesLoaded()}};if(!b.config.afterOnLoad)if(document.addEventListener){document.addEventListener("DOMContentLoaded",b._loadInit,false);window.addEventListener("load",
b._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",b._loadInit);if(!b.config.skipIeDomLoaded&&self===self.top)b._scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");b._loadInit()}}catch(a){}},30)}if(b.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],c=0,e=1,f=document.createStyleSheet();if(b.isIE>=8){c=
1;e=a.length}for(;c<e;++c)f.addRule("v\\:"+a[c],"behavior:url(#default#VML); display:inline-block")})()}catch(d){}}(function(){var a=b.config.modulePaths;if(a)for(var c in a)b.registerModulePath(c,a[c])})();b.config.isDebug&&b.require("dojo._firebug.firebug");if(b.config.debugAtAllCosts){b.require("dojo._base._loader.loader_debug");b.require("dojo.i18n")}return b});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(b){return dojo=b});
define("dojo/_base/lang",["dojo/lib/kernel"],function(b){(function(){var d=Object.prototype.toString;b.isString=function(j){return typeof j=="string"||j instanceof String};b.isArray=function(j){return j&&(j instanceof Array||typeof j=="array")};b.isFunction=function(j){return d.call(j)==="[object Function]"};b.isObject=function(j){return j!==undefined&&(j===null||typeof j=="object"||b.isArray(j)||b.isFunction(j))};b.isArrayLike=function(j){return j&&j!==undefined&&!b.isString(j)&&!b.isFunction(j)&&
!(j.tagName&&j.tagName.toLowerCase()=="form")&&(b.isArray(j)||isFinite(j.length))};b.isAlien=function(j){return j&&!b.isFunction(j)&&/\{\s*\[native code\]\s*\}/.test(String(j))};b.extend=function(j){for(var g=1,i=arguments.length;g<i;g++)b._mixin(j.prototype,arguments[g]);return j};b._hitchArgs=function(j,g){var i=b._toArray(arguments,2),l=b.isString(g);return function(){var o=b._toArray(arguments),n=l?(j||b.global)[g]:g;return n&&n.apply(j||this,i.concat(o))}};b.hitch=function(j,g){if(arguments.length>
2)return b._hitchArgs.apply(b,arguments);if(!g){g=j;j=null}if(b.isString(g)){j=j||b.global;if(!j[g])throw['dojo.hitch: scope["',g,'"] is null (scope="',j,'")'].join("");return function(){return j[g].apply(j,arguments||[])}}return!j?g:function(){return g.apply(j,arguments||[])}};b.delegate=b._delegate=function(){function j(){}return function(g,i){j.prototype=g;g=new j;j.prototype=null;i&&b._mixin(g,i);return g}}();var a=function(j,g,i){return(i||[]).concat(Array.prototype.slice.call(j,g||0))},c=function(j,
g,i){i=i||[];for(g=g||0;g<j.length;g++)i.push(j[g]);return i};b._toArray=b.isIE?function(j){return(j.item?c:a).apply(this,arguments)}:a;b.partial=function(){return b.hitch.apply(b,[null].concat(b._toArray(arguments)))};var e=b._extraNames,f=e.length,h={};b.clone=function(j){if(!j||typeof j!="object"||b.isFunction(j))return j;if(j.nodeType&&"cloneNode"in j)return j.cloneNode(true);if(j instanceof Date)return new Date(j.getTime());if(j instanceof RegExp)return new RegExp(j);var g,i,l,o;if(b.isArray(j)){g=
[];i=0;for(l=j.length;i<l;++i)i in j&&g.push(b.clone(j[i]))}else g=j.constructor?new j.constructor:{};for(o in j){l=j[o];if(!(o in g)||g[o]!==l&&(!(o in h)||h[o]!==l))g[o]=b.clone(l)}if(f)for(i=0;i<f;++i){o=e[i];l=j[o];if(!(o in g)||g[o]!==l&&(!(o in h)||h[o]!==l))g[o]=l}return g};b.trim=String.prototype.trim?function(j){return j.trim()}:function(j){return j.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var k=/\{([^\}]+)\}/g;b.replace=function(j,g,i){return j.replace(i||k,b.isFunction(g)?g:function(l,
o){return b.getObject(o,false,g)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(c,e,f){return[typeof c=="string"?c.split(""):c,e||b.global,typeof f=="string"?new Function("item","index","array",f):f]},a=function(c,e,f,h){var k=d(e,h,f);e=k[0];f=0;for(h=e.length;f<h;++f){var j=!!k[2].call(k[1],e[f],f,e);if(c^j)return j}return c};b.mixin(b,{indexOf:function(c,e,f,h){var k=1,j=c.length||0,g=0;if(h){g=j-1;k=j=-1}if(f!=undefined)g=f;if(h&&g>j||g<j)for(;g!=j;g+=k)if(c[g]==e)return g;
return-1},lastIndexOf:function(c,e,f){return b.indexOf(c,e,f,true)},forEach:function(c,e,f){if(c&&c.length){var h=d(c,f,e);c=h[0];e=0;for(f=c.length;e<f;++e)h[2].call(h[1],c[e],e,c)}},every:function(c,e,f){return a(true,c,e,f)},some:function(c,e,f){return a(false,c,e,f)},map:function(c,e,f,h){var k=d(c,f,e);c=k[0];e=h?new h:[];f=0;for(h=c.length;f<h;++f)e.push(k[2].call(k[1],c[f],f,c));return e},filter:function(c,e,f){var h=d(c,f,e);c=h[0];e=[];f=0;for(var k=c.length;f<k;++f)h[2].call(h[1],c[f],f,
c)&&e.push(c[f]);return e}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function d(w,z){throw new Error("declare"+(z?" "+z:"")+": "+w);}function a(w,z){for(var x=[],E=[{cls:0,refs:[]}],F={},K=1,J=w.length,L=0,M,Q,N,S,X;L<J;++L){if(M=w[L])t.call(M)!="[object Function]"&&d("mixin #"+L+" is not a callable constructor.",z);else d("mixin #"+L+" is unknown. Did you use dojo.require to pull it in?",z);Q=M._meta?M._meta.bases:[M];N=0;for(M=Q.length-1;M>=0;--M){S=Q[M].prototype;
if(!S.hasOwnProperty("declaredClass"))S.declaredClass="uniqName_"+D++;S=S.declaredClass;if(!F.hasOwnProperty(S)){F[S]={count:0,refs:[],cls:Q[M]};++K}S=F[S];if(N&&N!==S){S.refs.push(N);++N.count}N=S}++N.count;E[0].refs.push(N)}for(;E.length;){N=E.pop();x.push(N.cls);for(--K;X=N.refs,X.length==1;){N=X[0];if(!N||--N.count){N=0;break}x.push(N.cls);--K}if(N){L=0;for(J=X.length;L<J;++L){N=X[L];--N.count||E.push(N)}}}K&&d("can't build consistent linearization",z);M=w[0];x[0]=M?M._meta&&M===x[x.length-M._meta.bases.length]?
M._meta.bases.length:1:0;return x}function c(w,z,x){var E,F,K,J,L,M,Q,N=this._inherited=this._inherited||{};if(typeof w=="string"){E=w;w=z;z=x}x=0;J=w.callee;(E=E||J.nom)||d("can't deduce a name to call inherited()",this.declaredClass);L=this.constructor._meta;K=L.bases;Q=N.p;if(E!=u){if(N.c!==J){Q=0;M=K[0];L=M._meta;if(L.hidden[E]!==J){(F=L.chains)&&typeof F[E]=="string"&&d("calling chained method with inherited: "+E,this.declaredClass);do{L=M._meta;F=M.prototype;if(L&&(F[E]===J&&F.hasOwnProperty(E)||
L.hidden[E]===J))break}while(M=K[++Q]);Q=M?Q:-1}}if(M=K[++Q]){F=M.prototype;if(M._meta&&F.hasOwnProperty(E))x=F[E];else{J=q[E];do{F=M.prototype;if((x=F[E])&&(M._meta?F.hasOwnProperty(E):x!==J))break}while(M=K[++Q])}}x=M&&x||q[E]}else{if(N.c!==J){Q=0;if((L=K[0]._meta)&&L.ctor!==J){F=L.chains;if(!F||F.constructor!=="manual")d("calling chained constructor with inherited",this.declaredClass);for(;M=K[++Q];)if((L=M._meta)&&L.ctor===J)break;Q=M?Q:-1}}for(;M=K[++Q];)if(x=(L=M._meta)?L.ctor:M)break;x=M&&
x}N.c=x;N.p=Q;if(x)return z===true?x:x.apply(this,z||w)}function e(w,z){if(typeof w=="string")return this.inherited(w,z,true);return this.inherited(w,true)}function f(w){for(var z=this.constructor._meta.bases,x=0,E=z.length;x<E;++x)if(z[x]===w)return true;return this instanceof w}function h(w,z){var x,E=0,F=p._extraNames.length;for(x in z)if(x!=u&&z.hasOwnProperty(x))w[x]=z[x];for(;E<F;++E){x=p._extraNames[E];if(x!=u&&z.hasOwnProperty(x))w[x]=z[x]}}function k(w,z){var x,E,F=0,K=p._extraNames.length;
for(x in z){E=z[x];if((E!==q[x]||!(x in q))&&x!=u){if(t.call(E)=="[object Function]")E.nom=x;w[x]=E}}for(;F<K;++F){x=p._extraNames[F];E=z[x];if((E!==q[x]||!(x in q))&&x!=u){if(t.call(E)=="[object Function]")E.nom=x;w[x]=E}}return w}function j(w){k(this.prototype,w);return this}function g(w,z){return function(){var x=arguments,E=x,F=x[0],K,J;J=w.length;var L;if(!(this instanceof x.callee))return m(x);if(z&&(F&&F.preamble||this.preamble)){L=new Array(w.length);L[0]=x;for(K=0;;){if(F=x[0])if(F=F.preamble)x=
F.apply(this,x)||x;F=w[K].prototype;if(F=F.hasOwnProperty("preamble")&&F.preamble)x=F.apply(this,x)||x;if(++K==J)break;L[K]=x}}for(K=J-1;K>=0;--K){F=w[K];if(F=(J=F._meta)?J.ctor:F)F.apply(this,L?L[K]:x)}(F=this.postscript)&&F.apply(this,E)}}function i(w,z){return function(){var x=arguments,E=x,F=x[0];if(!(this instanceof x.callee))return m(x);if(z){if(F)if(F=F.preamble)E=F.apply(this,E)||E;(F=this.preamble)&&F.apply(this,E)}w&&w.apply(this,x);(F=this.postscript)&&F.apply(this,x)}}function l(w){return function(){var z=
arguments,x=0,E,F;if(!(this instanceof z.callee))return m(z);for(;E=w[x];++x)if(E=(F=E._meta)?F.ctor:E){E.apply(this,z);break}(E=this.postscript)&&E.apply(this,z)}}function o(w,z,x){return function(){var E,F,K=0,J=1;if(x){K=z.length-1;J=-1}for(;E=z[K];K+=J){F=E._meta;(E=(F?F.hidden:E.prototype)[w])&&E.apply(this,arguments)}}}function n(w){C.prototype=w.prototype;w=new C;C.prototype=null;return w}function m(w){var z=w.callee,x=n(z);z.apply(x,w);return x}var p=b,s=p._mixin,q=Object.prototype,t=q.toString,
C=new Function,D=0,u="constructor";p.declare=function(w,z,x){if(typeof w!="string"){x=z;z=w;w=""}x=x||{};var E,F,K,J,L,M,Q,N=1,S=z;if(t.call(z)=="[object Array]"){M=a(z,w);K=M[0];N=M.length-K;z=M[N]}else{M=[0];if(z)if(t.call(z)=="[object Function]"){K=z._meta;M=M.concat(K?K.bases:z)}else d("base class is not a callable constructor.",w);else z!==null&&d("unknown base class. Did you use dojo.require to pull it in?",w)}if(z)for(F=N-1;;--F){E=n(z);if(!F)break;K=M[F];(K._meta?h:s)(E,K.prototype);J=new Function;
J.superclass=z;J.prototype=E;z=E.constructor=J}else E={};k(E,x);K=x.constructor;if(K!==q.constructor){K.nom=u;E.constructor=K}for(F=N-1;F;--F)if((K=M[F]._meta)&&K.chains)Q=s(Q||{},K.chains);if(E["-chains-"])Q=s(Q||{},E["-chains-"]);K=!Q||!Q.hasOwnProperty(u);M[0]=J=Q&&Q.constructor==="manual"?l(M):M.length==1?i(x.constructor,K):g(M,K);J._meta={bases:M,hidden:x,chains:Q,parents:S,ctor:x.constructor};J.superclass=z&&z.prototype;J.extend=j;J.prototype=E;E.constructor=J;E.getInherited=e;E.inherited=c;
E.isInstanceOf=f;if(w){E.declaredClass=w;p.setObject(w,J)}if(Q)for(L in Q)if(E[L]&&typeof Q[L]=="string"&&L!=u){K=E[L]=o(L,M,Q[L]==="after");K.nom=L}return J};p.safeMixin=k})();return b.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(b){b._listener={getDispatcher:function(){return function(){var d=Array.prototype,a=arguments.callee,c=a._listeners;a=(a=a.target)&&a.apply(this,arguments);var e;c=[].concat(c);for(e in c)e in d||c[e].apply(this,arguments);return a}},add:function(d,a,c){d=d||b.global;var e=d[a];if(!e||!e._listeners){var f=b._listener.getDispatcher();f.target=e;f._listeners=[];e=d[a]=f}return e._listeners.push(c)},remove:function(d,a,c){(d=(d||
b.global)[a])&&d._listeners&&c--&&delete d._listeners[c]}};b.connect=function(){var d=arguments,a=[],c=0;a.push(b.isString(d[0])?null:d[c++],d[c++]);var e=d[c+1];a.push(b.isString(e)||b.isFunction(e)?d[c++]:null,d[c++]);for(e=d.length;c<e;c++)a.push(d[c]);return b._connect.apply(this,a)};b._connect=function(d,a,c,e){var f=b._listener;c=f.add(d,a,b.hitch(c,e));return[d,a,c,f]};b.disconnect=function(d){if(d&&d[0]!==undefined){b._disconnect.apply(this,d);delete d[0]}};b._disconnect=function(d,a,c,e){e.remove(d,
a,c)};b._topics={};b.subscribe=function(d,a,c){return[d,b._listener.add(b._topics,d,b.hitch(a,c))]};b.unsubscribe=function(d){d&&b._listener.remove(b._topics,d[0],d[1])};b.publish=function(d,a){if(d=b._topics[d])d.apply(this,a||[])};b.connectPublisher=function(d,a,c){var e=function(){b.publish(d,arguments)};return c?b.connect(a,c,e):b.connect(a,e)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(){},a=Object.freeze||function(){};b.Deferred=function(c){function e(n){if(k)throw new Error("This deferred has already been resolved");h=n;k=true;f()}function f(){for(var n;!n&&i;){var m=i;i=i.next;if(n=m.progress==d)k=false;var p=j?m.error:m.resolved;if(p)try{var s=p(h);if(s&&typeof s.then==="function")s.then(b.hitch(m.deferred,"resolve"),b.hitch(m.deferred,"reject"),b.hitch(m.deferred,"progress"));
else{p=n&&s===undefined;if(n&&!p)j=s instanceof Error;m.deferred[p&&j?"reject":"resolve"](p?h:s)}}catch(q){m.deferred.reject(q)}else j?m.deferred.reject(h):m.deferred.resolve(h)}}var h,k,j,g,i,l=this.promise={};this.resolve=this.callback=function(n){this.fired=0;this.results=[n,null];e(n)};this.reject=this.errback=function(n){j=true;this.fired=1;e(n);this.results=[null,n];if(!n||n.log!==false)(b.config.deferredOnError||function(m){console.error(m)})(n)};this.progress=function(n){for(var m=i;m;){var p=
m.progress;p&&p(n);m=m.next}};this.addCallbacks=function(n,m){this.then(n,m,d);return this};this.then=l.then=function(n,m,p){var s=p==d?this:new b.Deferred(l.cancel);n={resolved:n,error:m,progress:p,deferred:s};if(i)g=g.next=n;else i=g=n;k&&f();return s.promise};var o=this;this.cancel=l.cancel=function(){if(!k){var n=c&&c(o);if(!k){n instanceof Error||(n=new Error(n));n.log=false;o.reject(n)}}};a(l)};b.extend(b.Deferred,{addCallback:function(){return this.addCallbacks(b.hitch.apply(b,arguments))},
addErrback:function(){return this.addCallbacks(null,b.hitch.apply(b,arguments))},addBoth:function(){var c=b.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1})})();b.when=function(d,a,c,e){if(d&&typeof d.then==="function")return d.then(a,c,e);return a(d)};return b.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(b){b.fromJson=function(d){return eval("("+d+")")};b._escapeString=function(d){return('"'+d.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};b.toJsonIndentStr="\t";b.toJson=function(d,a,c){if(d===undefined)return"undefined";var e=typeof d;if(e=="number"||e=="boolean")return d+"";if(d===null)return"null";if(b.isString(d))return b._escapeString(d);var f=
arguments.callee,h;c=c||"";var k=a?c+b.toJsonIndentStr:"";h=d.__json__||d.json;if(b.isFunction(h)){h=h.call(d);if(d!==h)return f(h,a,k)}if(d.nodeType&&d.cloneNode)throw new Error("Can't serialize DOM nodes");h=a?" ":"";var j=a?"\n":"";if(b.isArray(d))return"["+b.map(d,function(o){o=f(o,a,k);if(typeof o!="string")o="undefined";return j+k+o}).join(","+h)+j+c+"]";if(e=="function")return null;e=[];var g;for(g in d){var i,l;if(typeof g=="number")i='"'+g+'"';else if(typeof g=="string")i=b._escapeString(g);
else continue;l=f(d[g],a,k);typeof l=="string"&&e.push(j+k+i+":"+h+l)}return"{"+e.join(","+h)+j+c+"}"};return b});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(b){(function(){b.Color=function(d){d&&this.setColor(d)};b.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:b.config.transparentColor||[255,255,255]};b.extend(b.Color,
{r:255,g:255,b:255,a:1,_set:function(d,a,c,e){this.r=d;this.g=a;this.b=c;this.a=e},setColor:function(d){if(b.isString(d))b.colorFromString(d,this);else if(b.isArray(d))b.colorFromArray(d,this);else{this._set(d.r,d.g,d.b,d.a);d instanceof b.Color||this.sanitize()}return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+b.map(["r","g","b"],function(d){d=this[d].toString(16);return d.length<
2?"0"+d:d},this).join("")},toCss:function(d){var a=this.r+", "+this.g+", "+this.b;return(d?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(true)}});b.blendColors=function(d,a,c,e){var f=e||new b.Color;b.forEach(["r","g","b","a"],function(h){f[h]=d[h]+(a[h]-d[h])*c;if(h!="a")f[h]=Math.round(f[h])});return f.sanitize()};b.colorFromRgb=function(d,a){return(d=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&b.colorFromArray(d[1].split(/\s*,\s*/),a)};b.colorFromHex=function(d,
a){var c=a||new b.Color,e=d.length==4?4:8,f=(1<<e)-1;d=Number("0x"+d.substr(1));if(isNaN(d))return null;b.forEach(["b","g","r"],function(h){var k=d&f;d>>=e;c[h]=e==4?17*k:k});c.a=1;return c};b.colorFromArray=function(d,a){a=a||new b.Color;a._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));if(isNaN(a.a))a.a=1;return a.sanitize()};b.colorFromString=function(d,a){var c=b.Color.named[d];return c&&b.colorFromArray(c,a)||b.colorFromRgb(d,a)||b.colorFromHex(d,a)}})();return b.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(b){b.doc=window.document||null;b.body=function(){return b.doc.body||b.doc.getElementsByTagName("body")[0]};b.setContext=function(d,a){b.global=d;b.doc=a};b.withGlobal=function(d,a,c,e){var f=b.global;try{b.global=d;return b.withDoc.call(null,d.document,a,c,e)}finally{b.global=f}};b.withDoc=function(d,a,c,e){var f=b.doc,h=b._bodyLtr,k=b.isQuirks;try{b.doc=d;delete b._bodyLtr;b.isQuirks=b.doc.compatMode=="BackCompat";if(c&&typeof a=="string")a=
c[a];return a.apply(c,e||[])}finally{b.doc=f;delete b._bodyLtr;if(h!==undefined)b._bodyLtr=h;b.isQuirks=k}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var d=b._event_listener={add:function(j,g,i){if(j){g=d._normalizeEventName(g);i=d._fixCallback(g,i);if(!b.isIE&&(g=="mouseenter"||g=="mouseleave")){var l=i;g=g=="mouseenter"?"mouseover":"mouseout";i=function(o){if(!b.isDescendant(o.relatedTarget,j))return l.call(this,o)}}j.addEventListener(g,i,false);return i}},remove:function(j,g,i){if(j){g=d._normalizeEventName(g);if(!b.isIE&&(g=="mouseenter"||g=="mouseleave"))g=
g=="mouseenter"?"mouseover":"mouseout";j.removeEventListener(g,i,false)}},_normalizeEventName:function(j){return j.slice(0,2)=="on"?j.slice(2):j},_fixCallback:function(j,g){return j!="keypress"?g:function(i){return g.call(this,d._fixEvent(i,this))}},_fixEvent:function(j){switch(j.type){case "keypress":d._setKeyChar(j);break}return j},_setKeyChar:function(j){j.keyChar=j.charCode>=32?String.fromCharCode(j.charCode):"";j.charOrCode=j.keyChar||j.keyCode},_punctMap:{106:42,111:47,186:59,187:43,188:44,
189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}};b.fixEvent=function(j,g){return d._fixEvent(j,g)};b.stopEvent=function(j){j.preventDefault();j.stopPropagation()};var a=b._listener;b._connect=function(j,g,i,l,o){o=j&&(j.nodeType||j.attachEvent||j.addEventListener)?o?2:1:0;i=[b._listener,d,a][o].add(j,g,b.hitch(i,l));return[j,g,i,o]};b._disconnect=function(j,g,i,l){[b._listener,d,a][l].remove(j,g,i)};b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:b.isSafari?91:224,
PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,
F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:b.isMac&&!b.isAIR?b.isSafari?91:224:17};var c=b.isMac?"metaKey":"ctrlKey";b.isCopyKey=function(j){return j[c]};b.mouseButtons=b.isIE<9||b.isIE&&b.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(j,g){return j.button&g},isLeft:function(j){return j.button&1},isMiddle:function(j){return j.button&4},isRight:function(j){return j.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(j,g){return j.button==g},isLeft:function(j){return j.button==
0},isMiddle:function(j){return j.button==1},isRight:function(j){return j.button==2}};if(b.isIE){var e=function(j,g){try{return j.keyCode=g}catch(i){return 0}},f=b._listener,h=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks){a=f=b._ie_listener={handlers:[],add:function(j,g,i){j=j||b.global;var l=j[g];if(!l||!l[h]){var o=b._getIeDispatcher();o.target=l&&k.push(l)-1;o[h]=[];l=j[g]=o}return l[h].push(k.push(i)-1)},remove:function(j,g,i){g=(j=(j||b.global)[g])&&j[h];if(j&&g&&
i--){delete k[g[i]];delete g[i]}}};var k=f.handlers}b.mixin(d,{add:function(j,g,i){if(j){g=d._normalizeEventName(g);if(g=="onkeypress"){var l=j.onkeydown;if(!l||!l[h]||!l._stealthKeydownHandle){var o=d.add(j,"onkeydown",d._stealthKeyDown);l=j.onkeydown;l._stealthKeydownHandle=o;l._stealthKeydownRefs=1}else l._stealthKeydownRefs++}return f.add(j,g,d._fixCallback(i))}},remove:function(j,g,i){g=d._normalizeEventName(g);f.remove(j,g,i);if(g=="onkeypress"){g=j.onkeydown;if(--g._stealthKeydownRefs<=0){f.remove(j,
"onkeydown",g._stealthKeydownHandle);delete g._stealthKeydownHandle}}},_normalizeEventName:function(j){return j.slice(0,2)!="on"?"on"+j:j},_nop:function(){},_fixEvent:function(j,g){if(!j)j=(g&&(g.ownerDocument||g.document||g).parentWindow||window).event;if(!j)return j;j.target=j.srcElement;j.currentTarget=g||j.srcElement;j.layerX=j.offsetX;j.layerY=j.offsetY;g=(g=j.srcElement)&&g.ownerDocument||document;g=b.isIE<6||g.compatMode=="BackCompat"?g.body:g.documentElement;var i=b._getIeDocumentElementOffset();
j.pageX=j.clientX+b._fixIeBiDiScrollLeft(g.scrollLeft||0)-i.x;j.pageY=j.clientY+(g.scrollTop||0)-i.y;if(j.type=="mouseover")j.relatedTarget=j.fromElement;if(j.type=="mouseout")j.relatedTarget=j.toElement;if(b.isIE<9||b.isQuirks){j.stopPropagation=d._stopPropagation;j.preventDefault=d._preventDefault}return d._fixKeys(j)},_fixKeys:function(j){switch(j.type){case "keypress":var g="charCode"in j?j.charCode:j.keyCode;if(g==10){g=0;j.keyCode=13}else if(g==13||g==27)g=0;else if(g==3)g=99;j.charCode=g;d._setKeyChar(j);
break}return j},_stealthKeyDown:function(j){var g=j.currentTarget.onkeypress;if(g&&g[h]){var i=j.keyCode,l=(i!=13||b.isIE>=9&&!b.isQuirks)&&i!=32&&i!=27&&(i<48||i>90)&&(i<96||i>111)&&(i<186||i>192)&&(i<219||i>222);if(l||j.ctrlKey){l=l?0:i;if(j.ctrlKey)if(i==3||i==13)return;else if(l>95&&l<106)l-=48;else if(!j.shiftKey&&l>=65&&l<=90)l+=32;else l=d._punctMap[l]||l;i=d._synthesizeEvent(j,{type:"keypress",faux:true,charCode:l});g.call(j.currentTarget,i);if(b.isIE<9||b.isIE&&b.isQuirks)j.cancelBubble=
i.cancelBubble;j.returnValue=i.returnValue;e(j,i.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&e(this,0);this.returnValue=false}});b.stopEvent=b.isIE<9||b.isQuirks?function(j){j=j||window.event;d._stopPropagation.call(j);d._preventDefault.call(j)}:b.stopEvent}d._synthesizeEvent=function(j,g){g=b.mixin({},j,g);d._setKeyChar(g);g.preventDefault=function(){j.preventDefault()};g.stopPropagation=function(){j.stopPropagation()};
return g};b.isOpera&&b.mixin(d,{_fixEvent:function(j){switch(j.type){case "keypress":var g=j.which;if(g==3)g=99;g=g<41&&!j.shiftKey?0:g;if(j.ctrlKey&&!j.shiftKey&&g>=65&&g<=90)g+=32;return d._synthesizeEvent(j,{charCode:g})}return j}});if(b.isWebKit){d._add=d.add;d._remove=d.remove;b.mixin(d,{add:function(j,g,i){if(j){var l=d._add(j,g,i);if(d._normalizeEventName(g)=="keypress")l._stealthKeyDownHandle=d._add(j,"keydown",function(o){var n=o.keyCode,m=n!=13&&n!=32&&(n<48||n>90)&&(n<96||n>111)&&(n<186||
n>192)&&(n<219||n>222);if(m||o.ctrlKey){m=m?0:n;if(o.ctrlKey)if(n==3||n==13)return;else if(m>95&&m<106)m-=48;else if(!o.shiftKey&&m>=65&&m<=90)m+=32;else m=d._punctMap[m]||m;n=d._synthesizeEvent(o,{type:"keypress",faux:true,charCode:m});i.call(o.currentTarget,n)}});return l}},remove:function(j,g,i){if(j){i._stealthKeyDownHandle&&d._remove(j,"keydown",i._stealthKeyDownHandle);d._remove(j,g,i)}},_fixEvent:function(j){switch(j.type){case "keypress":if(j.faux)return j;var g=j.charCode;g=g>=32?g:0;return d._synthesizeEvent(j,
{charCode:g,faux:true})}return j}})}})();if(b.isIE){b._ieDispatcher=function(d,a){var c=Array.prototype,e=b._ie_listener.handlers,f=d.callee,h=f[b._ieListenersName];f=(f=e[f.target])&&f.apply(a,d);h=[].concat(h);for(var k in h){var j=e[h[k]];!(k in c)&&j&&j.apply(a,d)}return f};b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")};b._event_listener._fixCallback=function(d){var a=b._event_listener._fixEvent;return function(c){return d.call(this,a(c,this))}}}return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",false,true)}catch(d){}b.byId=b.isIE?function(a,c){if(typeof a!="string")return a;var e=c||b.doc;if((c=e.getElementById(a))&&(c.attributes.id.value==a||c.id==a))return c;else{var f=e.all[a];if(!f||f.nodeName)f=[f];for(var h=0;c=f[h++];)if(c.attributes&&c.attributes.id&&c.attributes.id.value==a||c.id==a)return c}}:function(a,c){return(typeof a=="string"?(c||b.doc).getElementById(a):
a)||null};(function(){var a=b.byId,c=null,e;b.addOnWindowUnload(function(){c=null});b._destroyElement=b.destroy=function(r){r=a(r);try{var v=r.ownerDocument;if(!c||e!=v){c=v.createElement("div");e=v}c.appendChild(r.parentNode?r.parentNode.removeChild(r):r);c.innerHTML=""}catch(A){}};b.isDescendant=function(r,v){try{r=a(r);for(v=a(v);r;){if(r==v)return true;r=r.parentNode}}catch(A){}return false};b.setSelectable=function(r,v){r=a(r);if(b.isMozilla)r.style.MozUserSelect=v?"":"none";else if(b.isKhtml||
b.isWebKit)r.style.KhtmlUserSelect=v?"auto":"none";else if(b.isIE){v=r.unselectable=v?"":"on";b.query("*",r).forEach("item.unselectable = '"+v+"'")}};var f=function(r,v){var A=v.parentNode;A&&A.insertBefore(r,v)},h=function(r,v){var A=v.parentNode;if(A)A.lastChild==v?A.appendChild(r):A.insertBefore(r,v.nextSibling)};b.place=function(r,v,A){v=a(v);if(typeof r=="string")r=/^\s*</.test(r)?b._toDom(r,v.ownerDocument):a(r);if(typeof A=="number"){var I=v.childNodes;!I.length||I.length<=A?v.appendChild(r):
f(r,I[A<0?0:A])}else switch(A){case "before":f(r,v);break;case "after":h(r,v);break;case "replace":v.parentNode.replaceChild(r,v);break;case "only":b.empty(v);v.appendChild(r);break;case "first":if(v.firstChild){f(r,v.firstChild);break}default:v.appendChild(r)}return r};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var k;k=b.isWebKit?function(r){var v;if(r.nodeType==1){var A=r.ownerDocument.defaultView;v=A.getComputedStyle(r,null);if(!v&&
r.style){r.style.display="";v=A.getComputedStyle(r,null)}}return v||{}}:b.isIE?function(r){return r.nodeType==1?r.currentStyle:{}}:function(r){return r.nodeType==1?r.ownerDocument.defaultView.getComputedStyle(r,null):{}};b.getComputedStyle=k;b._toPixelValue=b.isIE?function(r,v){if(!v)return 0;if(v=="medium")return 4;if(v.slice&&v.slice(-2)=="px")return parseFloat(v);with(r){r=style.left;var A=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=v;v=style.pixelLeft}catch(I){v=0}style.left=
r;runtimeStyle.left=A}return v}:function(r,v){return parseFloat(v)||0};var j=b._toPixelValue,g=function(r,v){try{return r.filters.item("DXImageTransform.Microsoft.Alpha")}catch(A){return v?{}:null}};b._getOpacity=b.isIE<9?function(r){try{return g(r).Opacity/100}catch(v){return 1}}:function(r){return k(r).opacity};b._setOpacity=b.isIE<9?function(r,v){var A=v*100,I=v==1;r.style.zoom=I?"":1;if(g(r))g(r,1).Opacity=A;else{if(I)return v;r.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
A+")"}g(r,1).Enabled=!I;r.nodeName.toLowerCase()=="tr"&&b.query("> td",r).forEach(function(O){b._setOpacity(O,v)});return v}:function(r,v){return r.style.opacity=v};var i={left:true,top:true},l=/margin|padding|width|height|max|min|offset/,o=function(r,v,A){v=v.toLowerCase();if(b.isIE){if(A=="auto"){if(v=="height")return r.offsetHeight;if(v=="width")return r.offsetWidth}if(v=="fontweight")switch(A){case 700:return"bold";case 400:default:return"normal"}}v in i||(i[v]=l.test(v));return i[v]?j(r,A):A},
n=b.isIE?"styleFloat":"cssFloat",m={cssFloat:n,styleFloat:n,"float":n};b.style=function(r,v,A){var I=a(r),O=arguments.length,R=v=="opacity";v=m[v]||v;if(O==3)return R?b._setOpacity(I,A):(I.style[v]=A);if(O==2&&R)return b._getOpacity(I);R=k(I);if(O==2&&typeof v!="string"){for(var Z in v)b.style(r,Z,v[Z]);return R}return O==1?R:o(I,v,R[v]||I.style[v])};b._getPadExtents=function(r,v){v=v||k(r);var A=j(r,v.paddingLeft),I=j(r,v.paddingTop);return{l:A,t:I,w:A+j(r,v.paddingRight),h:I+j(r,v.paddingBottom)}};
b._getBorderExtents=function(r,v){v=v||k(r);var A=v.borderLeftStyle!="none"?j(r,v.borderLeftWidth):0,I=v.borderTopStyle!="none"?j(r,v.borderTopWidth):0;return{l:A,t:I,w:A+(v.borderRightStyle!="none"?j(r,v.borderRightWidth):0),h:I+(v.borderBottomStyle!="none"?j(r,v.borderBottomWidth):0)}};b._getPadBorderExtents=function(r,v){var A=v||k(r);v=b._getPadExtents(r,A);r=b._getBorderExtents(r,A);return{l:v.l+r.l,t:v.t+r.t,w:v.w+r.w,h:v.h+r.h}};b._getMarginExtents=function(r,v){v=v||k(r);var A=j(r,v.marginLeft),
I=j(r,v.marginTop),O=j(r,v.marginRight);r=j(r,v.marginBottom);if(b.isWebKit&&v.position!="absolute")O=A;return{l:A,t:I,w:A+O,h:I+r}};b._getMarginBox=function(r,v){var A=v||k(r);v=b._getMarginExtents(r,A);var I=r.offsetLeft-v.l,O=r.offsetTop-v.t,R=r.parentNode;if(b.isMoz){var Z=parseFloat(A.left);A=parseFloat(A.top);if(!isNaN(Z)&&!isNaN(A)){I=Z;O=A}else if(R&&R.style){Z=k(R);if(Z.overflow!="visible"){R=b._getBorderExtents(R,Z);I+=R.l;O+=R.t}}}else if(b.isOpera||b.isIE>7&&!b.isQuirks)if(R){R=b._getBorderExtents(R);
I-=R.l;O-=R.t}return{l:I,t:O,w:r.offsetWidth+v.w,h:r.offsetHeight+v.h}};b._getMarginSize=function(r,v){r=a(r);v=b._getMarginExtents(r,v||k(r));r=r.getBoundingClientRect();return{w:r.right-r.left+v.w,h:r.bottom-r.top+v.h}};b._getContentBox=function(r,v){var A=v||k(r);v=b._getPadExtents(r,A);A=b._getBorderExtents(r,A);var I=r.clientWidth;if(I){r=r.clientHeight;A.w=A.h=0}else{I=r.offsetWidth;r=r.offsetHeight}if(b.isOpera){v.l+=A.l;v.t+=A.t}return{l:v.l,t:v.t,w:I-v.w-A.w,h:r-v.h-A.h}};b._getBorderBox=
function(r,v){var A=v||k(r);v=b._getPadExtents(r,A);r=b._getContentBox(r,A);return{l:r.l-v.l,t:r.t-v.t,w:r.w+v.w,h:r.h+v.h}};b._setBox=function(r,v,A,I,O,R){R=R||"px";r=r.style;if(!isNaN(v))r.left=v+R;if(!isNaN(A))r.top=A+R;if(I>=0)r.width=I+R;if(O>=0)r.height=O+R};b._isButtonTag=function(r){return r.tagName=="BUTTON"||r.tagName=="INPUT"&&(r.getAttribute("type")||"").toUpperCase()=="BUTTON"};b._usesBorderBox=function(r){var v=r.tagName;return b.boxModel=="border-box"||v=="TABLE"||b._isButtonTag(r)};
b._setContentSize=function(r,v,A,I){if(b._usesBorderBox(r)){I=b._getPadBorderExtents(r,I);if(v>=0)v+=I.w;if(A>=0)A+=I.h}b._setBox(r,NaN,NaN,v,A)};b._setMarginBox=function(r,v,A,I,O,R){var Z=R||k(r);R=b._usesBorderBox(r)?p:b._getPadBorderExtents(r,Z);if(b.isWebKit)if(b._isButtonTag(r)){var ga=r.style;if(I>=0&&!ga.width)ga.width="4px";if(O>=0&&!ga.height)ga.height="4px"}Z=b._getMarginExtents(r,Z);if(I>=0)I=Math.max(I-R.w-Z.w,0);if(O>=0)O=Math.max(O-R.h-Z.h,0);b._setBox(r,v,A,I,O)};var p={l:0,t:0,w:0,
h:0};b.marginBox=function(r,v){r=a(r);var A=k(r);return!v?b._getMarginBox(r,A):b._setMarginBox(r,v.l,v.t,v.w,v.h,A)};b.contentBox=function(r,v){r=a(r);var A=k(r);return!v?b._getContentBox(r,A):b._setContentSize(r,v.w,v.h,A)};b._docScroll=function(){var r=b.global;return"pageXOffset"in r?{x:r.pageXOffset,y:r.pageYOffset}:(r=b.isQuirks?b.doc.body:b.doc.documentElement,{x:b._fixIeBiDiScrollLeft(r.scrollLeft||0),y:r.scrollTop||0})};b._isBodyLtr=function(){return"_bodyLtr"in b?b._bodyLtr:(b._bodyLtr=(b.body().dir||
b.doc.documentElement.dir||"ltr").toLowerCase()=="ltr")};b._getIeDocumentElementOffset=function(){var r=b.doc.documentElement;if(b.isIE<8){var v=r.getBoundingClientRect(),A=v.left;v=v.top;if(b.isIE<7){A+=r.clientLeft;v+=r.clientTop}return{x:A<0?0:A,y:v<0?0:v}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(r){var v=b.isIE;if(v&&!b._isBodyLtr()){var A=b.isQuirks,I=A?b.doc.body:b.doc.documentElement;if(v==6&&!A&&b.global.frameElement&&I.scrollHeight>I.clientHeight)r+=I.clientLeft;return v<8||
A?r+I.clientWidth-I.scrollWidth:-r}return r};b._abs=b.position=function(r,v){r=a(r);var A=b.body(),I=A.parentNode;r=r.getBoundingClientRect();r={x:r.left,y:r.top,w:r.right-r.left,h:r.bottom-r.top};if(b.isIE){I=b._getIeDocumentElementOffset();r.x-=I.x+(b.isQuirks?A.clientLeft+A.offsetLeft:0);r.y-=I.y+(b.isQuirks?A.clientTop+A.offsetTop:0)}else if(b.isFF==3){A=k(I);r.x-=j(I,A.marginLeft)+j(I,A.borderLeftWidth);r.y-=j(I,A.marginTop)+j(I,A.borderTopWidth)}if(v){v=b._docScroll();r.x+=v.x;r.y+=v.y}return r};
b.coords=function(r,v){r=a(r);var A=k(r);A=b._getMarginBox(r,A);v=b.position(r,v);A.x=v.x;A.y=v.y;return A};var s={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},q={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},t={innerHTML:1,className:1,htmlFor:b.isIE,value:1},C=function(r){return q[r.toLowerCase()]||r},D=function(r,v){return(r=r.getAttributeNode&&r.getAttributeNode(v))&&
r.specified};b.hasAttr=function(r,v){var A=v.toLowerCase();return t[s[A]||v]||D(a(r),q[A]||v)};var u={},w=0,z=b._scopeName+"attrid",x={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(r,v,A){r=a(r);var I=arguments.length;if(I==2&&typeof v!="string"){for(var O in v)b.attr(r,O,v[O]);return r}var R=v.toLowerCase();O=s[R]||v;var Z=t[O];R=q[R]||v;if(I==3){if(O=="style"&&typeof A!="string")b.style(r,A);else if(O=="innerHTML")if(b.isIE&&r.tagName.toLowerCase()in x){b.empty(r);
r.appendChild(b._toDom(A,r.ownerDocument))}else r[O]=A;else if(b.isFunction(A)){I=b.attr(r,z);if(!I){I=w++;b.attr(r,z,I)}u[I]||(u[I]={});if(Z=u[I][O])b.disconnect(Z);else try{delete r[O]}catch(ga){}u[I][O]=b.connect(r,O,A)}else if(Z||typeof A=="boolean")r[O]=A;else r.setAttribute(R,A);return r}A=r[O];if(Z&&typeof A!="undefined")return A;if(O!="href"&&(typeof A=="boolean"||b.isFunction(A)))return A;return D(r,R)?r.getAttribute(R):null};b.removeAttr=function(r,v){a(r).removeAttribute(C(v))};b.getNodeProp=
function(r,v){r=a(r);var A=v.toLowerCase(),I=s[A]||v;if(I in r&&I!="href")return r[I];v=q[A]||v;return D(r,v)?r.getAttribute(v):null};b.create=function(r,v,A,I){var O=b.doc;if(A){A=a(A);O=A.ownerDocument}if(typeof r=="string")r=O.createElement(r);v&&b.attr(r,v);A&&b.place(r,A,I);return r};b.empty=b.isIE?function(r){r=a(r);for(var v;v=r.lastChild;)b.destroy(v)}:function(r){a(r).innerHTML=""};var E={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody",
"tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},F=/<\s*([\w\:]+)/,K={},J=0,L="__"+b._scopeName+"ToDomId";for(var M in E)if(E.hasOwnProperty(M)){var Q=E[M];Q.pre=M=="option"?'<select multiple="multiple">':"<"+Q.join("><")+">";Q.post="</"+Q.reverse().join("></")+">"}b._toDom=function(r,v){v=v||b.doc;var A=v[L];if(!A){v[L]=A=++J+"";K[A]=v.createElement("div")}r+="";var I=r.match(F),O=I?I[1].toLowerCase():"";A=K[A];if(I&&E[O]){I=
E[O];A.innerHTML=I.pre+r+I.post;for(r=I.length;r;--r)A=A.firstChild}else A.innerHTML=r;if(A.childNodes.length==1)return A.removeChild(A.firstChild);for(r=v.createDocumentFragment();v=A.firstChild;)r.appendChild(v);return r};var N="className";b.hasClass=function(r,v){return(" "+a(r)[N]+" ").indexOf(" "+v+" ")>=0};var S=/\s+/,X=[""],ca={},fa=function(r){if(typeof r=="string"||r instanceof String)if(r.indexOf(" ")<0){X[0]=r;return X}else return r.split(S);return r||""};b.addClass=function(r,v){r=a(r);
v=fa(v);var A=r[N],I;A=A?" "+A+" ":" ";I=A.length;for(var O=0,R=v.length,Z;O<R;++O)if((Z=v[O])&&A.indexOf(" "+Z+" ")<0)A+=Z+" ";if(I<A.length)r[N]=A.substr(1,A.length-2)};b.removeClass=function(r,v){r=a(r);var A;if(v!==undefined){v=fa(v);A=" "+r[N]+" ";for(var I=0,O=v.length;I<O;++I)A=A.replace(" "+v[I]+" "," ");A=b.trim(A)}else A="";if(r[N]!=A)r[N]=A};b.replaceClass=function(r,v,A){r=a(r);ca.className=r.className;b.removeClass(ca,A);b.addClass(ca,v);if(r.className!==ca.className)r.className=ca.className};
b.toggleClass=function(r,v,A){if(A===undefined)A=!b.hasClass(r,v);b[A?"addClass":"removeClass"](r,v)}})();return b});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(b){(function(){var d=Array.prototype,a=d.slice,c=d.concat,e=function(n,m,p){n.sort||(n=a.call(n,0));p=p||this._NodeListCtor||b._NodeListCtor;n.constructor=p;b._mixin(n,p.prototype);n._NodeListCtor=p;return m?n._stash(m):n},f=function(n,m,p){m=[0].concat(a.call(m,0));p=p||b.global;return function(s){m[0]=s;return n.apply(p,m)}},h=function(n,m){return function(){this.forEach(f(n,
arguments,m));return this}},k=function(n,m){return function(){return this.map(f(n,arguments,m))}},j=function(n,m,p){return function(){var s=arguments,q=f(n,s,p);if(m.call(p||b.global,s))return this.map(q);this.forEach(q);return this}},g=function(n){return n.length==1&&typeof n[0]=="string"},i=function(n){var m=n.parentNode;m&&m.removeChild(n)};b.NodeList=function(){return e(Array.apply(null,arguments))};var l=b._NodeListCtor=b.NodeList,o=l.prototype;l._wrap=o._wrap=e;l._adaptAsMap=k;l._adaptAsForEach=
h;l._adaptAsFilter=function(n,m){return function(){return this.filter(f(n,arguments,m))}};l._adaptWithCondition=j;b.forEach(["slice","splice"],function(n){var m=d[n];o[n]=function(){return this._wrap(m.apply(this,arguments),n=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(n){var m=b[n];o[n]=function(){return m.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(n){o[n]=j(b[n],g)});b.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(n){o[n]=h(b[n])});b.extend(b.NodeList,{_normalize:function(n,m){var p=n.parse===true?true:false;if(typeof n.template=="string"){var s=n.templateFunc||b.string&&b.string.substitute;n=s?s(n.template,n):n}s=typeof n;if(s=="string"||s=="number"){n=b._toDom(n,m&&m.ownerDocument);n=n.nodeType==11?b._toArray(n.childNodes):[n]}else if(b.isArrayLike(n))b.isArray(n)||(n=b._toArray(n));else n=[n];if(p)n._runParse=true;return n},_cloneNode:function(n){return n.cloneNode(true)},
_place:function(n,m,p,s){if(!(m.nodeType!=1&&p=="only")){m=m;for(var q,t=n.length,C=t-1;C>=0;C--){var D=s?this._cloneNode(n[C]):n[C];if(n._runParse&&b.parser&&b.parser.parse){q||(q=m.ownerDocument.createElement("div"));q.appendChild(D);b.parser.parse(q);for(D=q.firstChild;q.firstChild;)q.removeChild(q.firstChild)}C==t-1?b.place(D,m,p):m.parentNode.insertBefore(D,m);m=D}}},_stash:function(n){this._parent=n;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var n=
b.isArray(this)?this:a.call(this,0),m=b.map(arguments,function(p){return p&&!b.isArray(p)&&(typeof NodeList!="undefined"&&p.constructor===NodeList||p.constructor===this._NodeListCtor)?a.call(p,0):p});return this._wrap(c.apply(n,m),this)},map:function(n,m){return this._wrap(b.map(this,n,m),this)},forEach:function(n,m){b.forEach(this,n,m);return this},coords:k(b.coords),position:k(b.position),place:function(n,m){var p=b.query(n)[0];return this.forEach(function(s){b.place(s,p,m)})},orphan:function(n){return(n?
b._filterQueryResult(this,n):this).forEach(i)},adopt:function(n,m){return b.query(n).place(this[0],m)._stash(this)},query:function(n){if(!n)return this;var m=this.map(function(p){return b.query(n,p).filter(function(s){return s!==undefined})});return this._wrap(c.apply([],m),this)},filter:function(n){var m=arguments,p=this,s=0;if(typeof n=="string"){p=b._filterQueryResult(this,m[0]);if(m.length==1)return p._stash(this);s=1}return this._wrap(b.filter(p,m[s],m[s+1]),this)},addContent:function(n,m){n=
this._normalize(n,this[0]);for(var p=0,s;s=this[p];p++)this._place(n,s,m,p>0);return this},instantiate:function(n,m){var p=b.isFunction(n)?n:b.getObject(n);m=m||{};return this.forEach(function(s){new p(m,s)})},at:function(){var n=new this._NodeListCtor;b.forEach(arguments,function(m){if(m<0)m=this.length+m;this[m]&&n.push(this[m])},this);return n._stash(this)}});l.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];b.forEach(l.events,function(n){var m="on"+n;o[m]=function(p,s){return this.connect(m,p,s)}})})();return b.NodeList});
(function(){var b=function(a){var c=a.trim,e=a.forEach,f=a._NodeListCtor=a.NodeList,h=function(){return a.doc},k=(a.isWebKit||a.isMozilla)&&h().compatMode=="BackCompat",j=h().firstChild.children?"children":"childNodes",g=false,i=function(){return true},l=function(y){y+=">~+".indexOf(y.slice(-1))>=0?" * ":" ";for(var B=function(ma,na){return c(y.slice(ma,na))},G=[],H=-1,P=-1,U=-1,V=-1,T=-1,W=-1,aa=-1,da="",ba="",ia,$=0,oa=y.length,Y=null,ea=null,pa=function(){if(aa>=0){var ma=aa==$?null:B(aa,$);Y[">~+".indexOf(ma)<
0?"tag":"oper"]=ma;aa=-1}},qa=function(){if(W>=0){Y.id=B(W,$).replace(/\\/g,"");W=-1}},ra=function(){if(T>=0){Y.classes.push(B(T+1,$).replace(/\\/g,""));T=-1}},la=function(){qa();pa();ra()},sa=function(){la();V>=0&&Y.pseudos.push({name:B(V+1,$)});Y.loops=Y.pseudos.length||Y.attrs.length||Y.classes.length;Y.oquery=Y.query=B(ia,$);Y.otag=Y.tag=Y.oper?null:Y.tag||"*";if(Y.tag)Y.tag=Y.tag.toUpperCase();if(G.length&&G[G.length-1].oper){Y.infixOper=G.pop();Y.query=Y.infixOper.query+" "+Y.query}G.push(Y);
Y=null};da=ba,ba=y.charAt($),$<oa;$++)if(da!="\\"){if(!Y){ia=$;Y={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return g?this.otag:this.tag}};aa=$}if(H>=0)if(ba=="]"){if(ea.attr)ea.matchFor=B(U||H+1,$);else ea.attr=B(H+1,$);if(H=ea.matchFor)if(H.charAt(0)=='"'||H.charAt(0)=="'")ea.matchFor=H.slice(1,-1);Y.attrs.push(ea);ea=null;H=U=-1}else{if(ba=="="){U="|~^$*".indexOf(da)>=0?da:"";ea.type=U+ba;ea.attr=B(H+1,$-U.length);U=$+1}}else if(P>=0){if(ba==")"){if(V>=
0)ea.value=B(P+1,$);V=P=-1}}else if(ba=="#"){la();W=$+1}else if(ba=="."){la();T=$}else if(ba==":"){la();V=$}else if(ba=="["){la();H=$;ea={}}else if(ba=="("){if(V>=0){ea={name:B(V+1,$),value:null};Y.pseudos.push(ea)}P=$}else ba==" "&&da!=ba&&sa()}return G},o=function(y,B){if(!y)return B;if(!B)return y;return function(){return y.apply(window,arguments)&&B.apply(window,arguments)}},n=function(y,B){B=B||[];y&&B.push(y);return B},m=function(y){return 1==y.nodeType},p=function(y,B){if(!y)return"";if(B==
"class")return y.className||"";if(B=="for")return y.htmlFor||"";if(B=="style")return y.style.cssText||"";return(g?y.getAttribute(B):y.getAttribute(B,2))||""},s={"*=":function(y,B){return function(G){return p(G,y).indexOf(B)>=0}},"^=":function(y,B){return function(G){return p(G,y).indexOf(B)==0}},"$=":function(y,B){return function(G){G=" "+p(G,y);return G.lastIndexOf(B)==G.length-B.length}},"~=":function(y,B){var G=" "+B+" ";return function(H){return(" "+p(H,y)+" ").indexOf(G)>=0}},"|=":function(y,
B){var G=" "+B+"-";return function(H){H=" "+p(H,y);return H==B||H.indexOf(G)==0}},"=":function(y,B){return function(G){return p(G,y)==B}}},q=typeof h().firstChild.nextElementSibling=="undefined",t=!q?"nextElementSibling":"nextSibling",C=!q?"previousElementSibling":"previousSibling",D=q?m:i,u=function(y){for(;y=y[C];)if(D(y))return false;return true},w=function(y){for(;y=y[t];)if(D(y))return false;return true},z=function(y){var B=y.parentNode,G=0,H=B[j],P=y._i||-1,U=B._l||-1;if(!H)return-1;H=H.length;
if(U==H&&P>=0&&U>=0)return P;B._l=H;P=-1;for(B=B.firstElementChild||B.firstChild;B;B=B[t])if(D(B)){B._i=++G;if(y===B)P=G}return P},x=function(y){return!(z(y)%2)},E=function(y){return z(y)%2},F={checked:function(){return function(y){return!!("checked"in y?y.checked:y.selected)}},"first-child":function(){return u},"last-child":function(){return w},"only-child":function(){return function(y){if(!u(y))return false;if(!w(y))return false;return true}},empty:function(){return function(y){var B=y.childNodes;
for(y=y.childNodes.length-1;y>=0;y--){var G=B[y].nodeType;if(G===1||G==3)return false}return true}},contains:function(y,B){y=B.charAt(0);if(y=='"'||y=="'")B=B.slice(1,-1);return function(G){return G.innerHTML.indexOf(B)>=0}},not:function(y,B){y=l(B)[0];B={el:1};if(y.tag!="*")B.tag=1;if(!y.classes.length)B.classes=1;var G=J(y,B);return function(H){return!G(H)}},"nth-child":function(y,B){y=parseInt;if(B=="odd")return E;else if(B=="even")return x;if(B.indexOf("n")!=-1){B=B.split("n",2);var G=B[0]?B[0]==
"-"?-1:y(B[0]):1,H=B[1]?y(B[1]):0,P=0,U=-1;if(G>0)if(H<0)H=H%G&&G+H%G;else{if(H>0){if(H>=G)P=H-H%G;H%=G}}else if(G<0){G*=-1;if(H>0){U=H;H%=G}}if(G>0)return function(T){T=z(T);return T>=P&&(U<0||T<=U)&&T%G==H};else B=H}var V=y(B);return function(T){return z(T)==V}}},K=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(y){var B=y.toLowerCase();if(B=="class")y="className";return function(G){return g?G.getAttribute(y):G[y]||G[B]}}:function(y){return function(B){return B&&B.getAttribute&&B.hasAttribute(y)}},
J=function(y,B){if(!y)return i;B=B||{};var G=null;"el"in B||(G=o(G,m));if(!("tag"in B))if(y.tag!="*")G=o(G,function(H){return H&&H.tagName==y.getTag()});"classes"in B||e(y.classes,function(H,P){var U=new RegExp("(?:^|\\s)"+H+"(?:\\s|$)");G=o(G,function(V){return U.test(V.className)});G.count=P});"pseudos"in B||e(y.pseudos,function(H){var P=H.name;if(F[P])G=o(G,F[P](P,H.value))});"attrs"in B||e(y.attrs,function(H){var P,U=H.attr;if(H.type&&s[H.type])P=s[H.type](U,H.matchFor);else if(U.length)P=K(U);
if(P)G=o(G,P)});if(!("id"in B))if(y.id)G=o(G,function(H){return!!H&&H.id==y.id});G||"default"in B||(G=i);return G},L=function(y){return function(B,G,H){for(;B=B[t];)if(!(q&&!m(B))){if((!H||ja(B,H))&&y(B))G.push(B);break}return G}},M=function(y){return function(B,G,H){for(B=B[t];B;){if(D(B)){if(H&&!ja(B,H))break;y(B)&&G.push(B)}B=B[t]}return G}},Q=function(y){y=y||i;return function(B,G,H){for(var P=0,U=B[j];B=U[P++];)if(D(B)&&(!H||ja(B,H))&&y(B,P))G.push(B);return G}},N=function(y,B){for(y=y.parentNode;y;){if(y==
B)break;y=y.parentNode}return!!y},S={},X=function(y){var B=S[y.query];if(B)return B;var G=y.infixOper;G=G?G.oper:"";var H=J(y,{el:1}),P="*"==y.tag,U=h().getElementsByClassName;if(G){U={el:1};if(P)U.tag=1;H=J(y,U);if("+"==G)B=L(H);else if("~"==G)B=M(H);else if(">"==G)B=Q(H)}else if(y.id){H=!y.loops&&P?i:J(y,{el:1,id:1});B=function(T,W){var aa=a.byId(y.id,T.ownerDocument||T);if(aa&&H(aa))if(9==T.nodeType)return n(aa,W);else if(N(aa,T))return n(aa,W)}}else if(U&&/\{\s*\[native code\]\s*\}/.test(String(U))&&
y.classes.length&&!k){H=J(y,{el:1,classes:1,id:1});var V=y.classes.join(" ");B=function(T,W,aa){W=n(0,W);for(var da,ba=0,ia=T.getElementsByClassName(V);da=ia[ba++];)H(da,T)&&ja(da,aa)&&W.push(da);return W}}else if(!P&&!y.loops)B=function(T,W,aa){W=n(0,W);for(var da=0,ba=T.getElementsByTagName(y.getTag());T=ba[da++];)ja(T,aa)&&W.push(T);return W};else{H=J(y,{el:1,tag:1,id:1});B=function(T,W,aa){W=n(0,W);for(var da,ba=0,ia=T.getElementsByTagName(y.getTag());da=ia[ba++];)H(da,T)&&ja(da,aa)&&W.push(da);
return W}}return S[y.query]=B},ca=function(y,B){y=n(y);for(var G,H,P=B.length,U,V,T=0;T<P;T++){V=[];G=B[T];H=y.length-1;if(H>0){U={};V.nozip=true}H=X(G);for(var W=0;G=y[W];W++)H(G,V,U);if(!V.length)break;y=V}return V},fa={},r={},v=function(y){var B=l(c(y));if(B.length==1){var G=X(B[0]);return function(H){if(H=G(H,new f))H.nozip=true;return H}}return function(H){return ca(H,B)}},A=navigator.userAgent;A=a.isWebKit&&A.indexOf("WebKit/")>0&&parseFloat(A.split("WebKit/")[1])>528;var I=a.isIE?"commentStrip":
"nozip",O=!!h().querySelectorAll&&(!a.isSafari||a.isSafari>3.1||A),R=/n\+\d|([^ ])?([>~+])([^ =])?/g,Z=function(y,B,G,H){return G?(B?B+" ":"")+G+(H?" "+H:""):y},ga=function(y,B){y=y.replace(R,Z);if(O){var G=r[y];if(G&&!B)return G}if(G=fa[y])return G;G=y.charAt(0);var H=-1==y.indexOf(" ");if(y.indexOf("#")>=0&&H)B=true;if(O&&!B&&">~+".indexOf(G)==-1&&(!a.isIE||y.indexOf(":")==-1)&&!(k&&y.indexOf(".")>=0)&&y.indexOf(":contains")==-1&&y.indexOf(":checked")==-1&&y.indexOf("|=")==-1){var P=">~+".indexOf(y.charAt(y.length-
1))>=0?y+" *":y;return r[y]=function(V){try{if(!(9==V.nodeType||H))throw"";var T=V.querySelectorAll(P);T[I]=true;return T}catch(W){return ga(y,true)(V)}}}else{var U=y.split(/\s*,\s*/);return fa[y]=U.length<2?v(y):function(V){for(var T=0,W=[],aa;aa=U[T++];)W=W.concat(v(aa)(V));return W}}},ha=0,ta=a.isIE?function(y){return g?y.getAttribute("_uid")||y.setAttribute("_uid",++ha)||ha:y.uniqueID}:function(y){return y._uid||(y._uid=++ha)},ja=function(y,B){if(!B)return 1;y=ta(y);if(!B[y])return B[y]=1;return 0},
ka="_zipIdx",ua=function(y){if(y&&y.nozip)return f._wrap?f._wrap(y):y;var B=new f;if(!y||!y.length)return B;y[0]&&B.push(y[0]);if(y.length<2)return B;ha++;if(a.isIE&&g){var G=ha+"";y[0].setAttribute(ka,G);for(var H=1,P;P=y[H];H++){y[H].getAttribute(ka)!=G&&B.push(P);P.setAttribute(ka,G)}}else if(a.isIE&&y.commentStrip)try{for(H=1;P=y[H];H++)m(P)&&B.push(P)}catch(U){}else{if(y[0])y[0][ka]=ha;for(H=1;P=y[H];H++){y[H][ka]!=ha&&B.push(P);P[ka]=ha}}return B};a.query=function(y,B){f=a._NodeListCtor;if(!y)return new f;
if(y.constructor==f)return y;if(typeof y!="string")return new f(y);if(typeof B=="string"){B=a.byId(B);if(!B)return new f}B=B||h();var G=B.ownerDocument||B.documentElement;g=B.contentType&&B.contentType=="application/xml"||a.isOpera&&(B.doctype||G.toString()=="[object XMLDocument]")||!!G&&(a.isIE?G.xml:B.xmlVersion||G.xmlVersion);if((y=ga(y)(B))&&y.nozip&&!f._wrap)return y;return ua(y)};a.query.pseudos=F;a._filterQueryResult=function(y,B,G){var H=new a._NodeListCtor,P=l(B);P=P.length==1&&!/[^\w#\.]/.test(B)?
J(P[0]):function(T){return dojo.query(B,G).indexOf(T)!=-1};for(var U=0,V;V=y[U];U++)P(V)&&H.push(V);return H}},d=function(){acme={trim:function(f){f=f.replace(/^\s+/,"");for(var h=f.length-1;h>=0;h--)if(/\S/.test(f.charAt(h))){f=f.substring(0,h+1);break}return f},forEach:function(f,h,k){if(f&&f.length)for(var j=0,g=f.length;j<g;++j)h.call(k||window,f[j],j,f)},byId:function(f,h){return typeof f=="string"?(h||document).getElementById(f):f},doc:document,NodeList:Array};var a=navigator,c=a.userAgent;
a=a.appVersion;var e=parseFloat(a);acme.isOpera=c.indexOf("Opera")>=0?e:undefined;acme.isKhtml=a.indexOf("Konqueror")>=0?e:undefined;acme.isWebKit=parseFloat(c.split("WebKit/")[1])||undefined;acme.isChrome=parseFloat(c.split("Chrome/")[1])||undefined;if((c=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome){acme.isSafari=parseFloat(a.split("Version/")[1]);if(!acme.isSafari||parseFloat(a.substr(c+7))<=419.3)acme.isSafari=2}if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||
undefined;Array._wrap=function(f){return f};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel","dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){b(this.queryPortability||this.acme||a)});if(typeof define!="function")if(this.dojo){dojo.provide("dojo._base.query");dojo.require("dojo._base.NodeList");dojo.require("dojo._base.lang");b(this.queryPortability||this.acme||dojo)}else b(this.queryPortability||this.acme||d())})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(b){(function(){function d(q,t,C){if(C!==null){var D=q[t];if(typeof D=="string")q[t]=[D,C];else if(a.isArray(D))D.push(C);else q[t]=C}}var a=b,c=a.config;b.fieldToObject=function(q){var t=null;if(q=a.byId(q)){var C=q.name,D=(q.type||"").toLowerCase();if(C&&D&&!q.disabled)if(D=="radio"||D=="checkbox"){if(q.checked)t=q.value}else if(q.multiple){t=[];a.query("option",q).forEach(function(u){u.selected&&
t.push(u.value)})}else t=q.value}return t};b.formToObject=function(q){var t={};a.forEach(b.byId(q).elements,function(C){var D=C.name,u=(C.type||"").toLowerCase();if(D&&u&&"file|submit|image|reset|button|".indexOf(u)==-1&&!C.disabled){d(t,D,a.fieldToObject(C));if(u=="image")t[D+".x"]=t[D+".y"]=t[D].x=t[D].y=0}});return t};b.objectToQuery=function(q){var t=encodeURIComponent,C=[],D={};for(var u in q){var w=q[u];if(w!=D[u]){var z=t(u)+"=";if(a.isArray(w))for(var x=0;x<w.length;x++)C.push(z+t(w[x]));
else C.push(z+t(w))}}return C.join("&")};b.formToQuery=function(q){return a.objectToQuery(a.formToObject(q))};b.formToJson=function(q,t){return a.toJson(a.formToObject(q),t)};b.queryToObject=function(q){var t={};q=q.split("&");var C=decodeURIComponent;a.forEach(q,function(D){if(D.length){var u=D.split("=");D=C(u.shift());u=C(u.join("="));if(typeof t[D]=="string")t[D]=[t[D]];if(a.isArray(t[D]))t[D].push(u);else t[D]=u}});return t};b._blockAsync=false;var e=a._contentHandlers=b.contentHandlers={text:function(q){return q.responseText},
json:function(q){return a.fromJson(q.responseText||null)},"json-comment-filtered":function(q){b.config.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");q=q.responseText;var t=q.indexOf("/*"),C=q.lastIndexOf("*/");if(t==-1||C==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(q.substring(t+2,C))},javascript:function(q){return a.eval(q.responseText)},xml:function(q){var t=q.responseXML;if(a.isIE&&(!t||!t.documentElement)){var C=function(D){return"MSXML"+D+".DOMDocument"};C=["Microsoft.XMLDOM",C(6),C(4),C(3),C(2)];a.some(C,function(D){try{var u=new ActiveXObject(D);u.async=false;u.loadXML(q.responseText);t=u}catch(w){return false}return true})}return t},"json-comment-optional":function(q){return q.responseText&&/^[^{\[]*\/\*/.test(q.responseText)?e["json-comment-filtered"](q):
e.json(q)}};b._ioSetArgs=function(q,t,C,D){var u={args:q,url:q.url},w=null;if(q.form){w=a.byId(q.form);var z=w.getAttributeNode("action");u.url=u.url||(z?z.value:null);w=a.formToObject(w)}z=[{}];w&&z.push(w);q.content&&z.push(q.content);q.preventCache&&z.push({"dojo.preventCache":(new Date).valueOf()});u.query=a.objectToQuery(a.mixin.apply(null,z));u.handleAs=q.handleAs||"text";var x=new a.Deferred(t);x.addCallbacks(C,function(J){return D(J,x)});var E=q.load;E&&a.isFunction(E)&&x.addCallback(function(J){return E.call(q,
J,u)});var F=q.error;F&&a.isFunction(F)&&x.addErrback(function(J){return F.call(q,J,u)});var K=q.handle;K&&a.isFunction(K)&&x.addBoth(function(J){return K.call(q,J,u)});if(c.ioPublish&&a.publish&&u.args.ioPublish!==false){x.addCallbacks(function(J){a.publish("/dojo/io/load",[x,J]);return J},function(J){a.publish("/dojo/io/error",[x,J]);return J});x.addBoth(function(J){a.publish("/dojo/io/done",[x,J]);return J})}x.ioArgs=u;return x};var f=function(q){q.canceled=true;var t=q.ioArgs.xhr,C=typeof t.abort;
if(C=="function"||C=="object"||C=="unknown")t.abort();q=q.ioArgs.error;if(!q){q=new Error("xhr cancelled");q.dojoType="cancel"}return q},h=function(q){q=e[q.ioArgs.handleAs](q.ioArgs.xhr);return q===undefined?null:q},k=function(q,t){t.ioArgs.args.failOk||console.error(q);return q},j=null,g=[],i=0,l=function(q){if(i<=0){i=0;if(c.ioPublish&&a.publish&&(!q||q&&q.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},o=function(){var q=(new Date).getTime();if(!a._blockAsync)for(var t=0,C;t<g.length&&
(C=g[t]);t++){var D=C.dfd,u=function(){if(!D||D.canceled||!C.validCheck(D)){g.splice(t--,1);i-=1}else if(C.ioCheck(D)){g.splice(t--,1);C.resHandle(D);i-=1}else if(D.startTime)if(D.startTime+(D.ioArgs.args.timeout||0)<q){g.splice(t--,1);var z=new Error("timeout exceeded");z.dojoType="timeout";D.errback(z);D.cancel();i-=1}};if(b.config.debugAtAllCosts)u.call(this);else try{u.call(this)}catch(w){D.errback(w)}}l(D);if(!g.length){clearInterval(j);j=null}};b._ioCancelAll=function(){try{a.forEach(g,function(t){try{t.dfd.cancel()}catch(C){}})}catch(q){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(q){if(c.ioPublish&&a.publish&&q.ioArgs.args.ioPublish!==false){i||a.publish("/dojo/io/start");i+=1;a.publish("/dojo/io/send",[q])}};a._ioWatch=function(q,t,C,D){var u=q.ioArgs.args;if(u.timeout)q.startTime=(new Date).getTime();g.push({dfd:q,validCheck:t,ioCheck:C,resHandle:D});j||(j=setInterval(o,50));u.sync&&o()};var n="application/x-www-form-urlencoded",m=function(q){return q.ioArgs.xhr.readyState},p=function(q){return 4==q.ioArgs.xhr.readyState},
s=function(q){var t=q.ioArgs.xhr;if(a._isDocumentOk(t))q.callback(q);else{var C=new Error("Unable to load "+q.ioArgs.url+" status:"+t.status);C.status=t.status;C.responseText=t.responseText;q.errback(C)}};b._ioAddQueryToUrl=function(q){if(q.query.length){q.url+=(q.url.indexOf("?")==-1?"?":"&")+q.query;q.query=null}};b.xhr=function(q,t,C){var D=a._ioSetArgs(t,f,h,k),u=D.ioArgs,w=u.xhr=a._xhrObj(u.args);if(!w){D.cancel();return D}if("postData"in t)u.query=t.postData;else if("putData"in t)u.query=t.putData;
else if("rawBody"in t)u.query=t.rawBody;else if(arguments.length>2&&!C||"POST|PUT".indexOf(q.toUpperCase())==-1)a._ioAddQueryToUrl(u);w.open(q,u.url,t.sync!==true,t.user||undefined,t.password||undefined);if(t.headers)for(var z in t.headers)if(z.toLowerCase()==="content-type"&&!t.contentType)t.contentType=t.headers[z];else t.headers[z]&&w.setRequestHeader(z,t.headers[z]);w.setRequestHeader("Content-Type",t.contentType||n);if(!t.headers||!("X-Requested-With"in t.headers))w.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(D);if(b.config.debugAtAllCosts)w.send(u.query);else try{w.send(u.query)}catch(x){u.error=x;D.cancel()}a._ioWatch(D,m,p,s);return D};b.xhrGet=function(q){return a.xhr("GET",q)};b.rawXhrPost=b.xhrPost=function(q){return a.xhr("POST",q,true)};b.rawXhrPut=b.xhrPut=function(q){return a.xhr("PUT",q,true)};b.xhrDelete=function(q){return a.xhr("DELETE",q)}})();return b.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(b){(function(){var d=b._mixin;b._Line=function(k,j){this.start=k;this.end=j};b._Line.prototype.getValue=function(k){return(this.end-this.start)*k+this.start};b.Animation=function(k){d(this,k);if(b.isArray(this.curve))this.curve=new b._Line(this.curve[0],this.curve[1])};b._Animation=b.Animation;b.extend(b.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var k=this._percent,j=this.easing;return j?j(k):k},_fire:function(k,j){j=j||[];if(this[k])if(b.config.debugAtAllCosts)this[k].apply(this,j);else try{this[k].apply(this,j)}catch(g){console.error("exception in animation handler for:",k);console.error(g)}return this},play:function(k,j){var g=this;g._delayTimer&&g._clearTimer();if(j){g._stopTimer();g._active=g._paused=false;g._percent=0}else if(g._active&&!g._paused)return g;g._fire("beforeBegin",[g.node]);k=k||g.delay;var i=b.hitch(g,
"_play",j);if(k>0){g._delayTimer=setTimeout(i,k);return g}i();return g},_play:function(){var k=this;k._delayTimer&&k._clearTimer();k._startTime=(new Date).valueOf();if(k._paused)k._startTime-=k.duration*k._percent;k._active=true;k._paused=false;var j=k.curve.getValue(k._getStep());if(!k._percent){if(!k._startRepeatCount)k._startRepeatCount=k.repeat;k._fire("onBegin",[j])}k._fire("onPlay",[j]);k._cycle();return k},pause:function(){var k=this;k._delayTimer&&k._clearTimer();k._stopTimer();if(!k._active)return k;
k._paused=true;k._fire("onPause",[k.curve.getValue(k._getStep())]);return k},gotoPercent:function(k,j){var g=this;g._stopTimer();g._active=g._paused=true;g._percent=k;j&&g.play();return g},stop:function(k){var j=this;j._delayTimer&&j._clearTimer();if(!j._timer)return j;j._stopTimer();if(k)j._percent=1;j._fire("onStop",[j.curve.getValue(j._getStep())]);j._active=j._paused=false;return j},status:function(){if(this._active)return this._paused?"paused":"playing";return"stopped"},_cycle:function(){var k=
this;if(k._active){var j=((new Date).valueOf()-k._startTime)/k.duration;if(j>=1)j=1;k._percent=j;if(k.easing)j=k.easing(j);k._fire("onAnimate",[k.curve.getValue(j)]);if(k._percent<1)k._startTimer();else{k._active=false;if(k.repeat>0){k.repeat--;k.play(null,true)}else if(k.repeat==-1)k.play(null,true);else if(k._startRepeatCount){k.repeat=k._startRepeatCount;k._startRepeatCount=0}k._percent=0;k._fire("onEnd",[k.node]);!k.repeat&&k._stopTimer()}}return k},_clearTimer:function(){clearTimeout(this._delayTimer);
delete this._delayTimer}});var a=0,c=null,e={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer){this._timer=b.connect(e,"run",this,"_cycle");a++}c||(c=setInterval(b.hitch(e,"run"),this.rate))},_stopTimer:function(){if(this._timer){b.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(c);c=null;a=0}}});var f=b.isIE?function(k){var j=k.style;if(!j.width.length&&b.style(k,"width")=="auto")j.width="auto"}:function(){};b._fade=function(k){k.node=b.byId(k.node);
var j=d({properties:{}},k);k=j.properties.opacity={};k.start=!("start"in j)?function(){return+b.style(j.node,"opacity")||0}:j.start;k.end=j.end;k=b.animateProperty(j);b.connect(k,"beforeBegin",b.partial(f,j.node));return k};b.fadeIn=function(k){return b._fade(d({end:1},k))};b.fadeOut=function(k){return b._fade(d({end:0},k))};b._defaultEasing=function(k){return 0.5+Math.sin((k+1.5)*Math.PI)/2};var h=function(k){this._properties=k;for(var j in k){var g=k[j];if(g.start instanceof b.Color)g.tempColor=
new b.Color}};h.prototype.getValue=function(k){var j={};for(var g in this._properties){var i=this._properties[g],l=i.start;if(l instanceof b.Color)j[g]=b.blendColors(l,i.end,k,i.tempColor).toCss();else b.isArray(l)||(j[g]=(i.end-l)*k+l+(g!="opacity"?i.units||"px":0))}return j};b.animateProperty=function(k){var j=k.node=b.byId(k.node);if(!k.easing)k.easing=b._defaultEasing;k=new b.Animation(k);b.connect(k,"beforeBegin",k,function(){var g={};for(var i in this.properties){if(i=="width"||i=="height")this.node.display=
"block";var l=this.properties[i];if(b.isFunction(l))l=l(j);l=g[i]=d({},b.isObject(l)?l:{end:l});if(b.isFunction(l.start))l.start=l.start(j);if(b.isFunction(l.end))l.end=l.end(j);var o=i.toLowerCase().indexOf("color")>=0,n=function(m,p){var s={height:m.offsetHeight,width:m.offsetWidth}[p];if(s!==undefined)return s;s=b.style(m,p);return p=="opacity"?+s:o?s:parseFloat(s)};if("end"in l){if(!("start"in l))l.start=n(j,i)}else l.end=n(j,i);if(o){l.start=new b.Color(l.start);l.end=new b.Color(l.end)}else l.start=
i=="opacity"?+l.start:parseFloat(l.start)}this.curve=new h(g)});b.connect(k,"onAnimate",b.hitch(b,"style",k.node));return k};b.anim=function(k,j,g,i,l,o){return b.animateProperty({node:k,duration:g||b.Animation.prototype.duration,properties:j,easing:i,onEnd:l}).play(o||0)}})();return b.animateProperty});
define("dojo",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/Deferred","dojo/_base/json","dojo/_base/Color","dojo/_base/window","dojo/_base/event","dojo/_base/html","dojo/_base/NodeList","dojo/_base/query","dojo/_base/xhr","dojo/_base/fx"],function(b){return b});
define("orion/serviceregistry",["dojo"],function(b){function d(h,k,j){this.serviceId=h;this.name=k;this.properties=j}function a(h,k,j){this.serviceId=h;this.serviceReference=k;this.internalRegistry=j}function c(h,k,j){this.serviceId=h;this.implementation=k;this.internalRegistry=j;var g;for(g in k)if(typeof k[g]==="function")this[g]=function(i){return function(){if(j.isRegistered(h)){var l=new b.Deferred;try{var o=k[i].apply(k,Array.prototype.slice.call(arguments));b.when(o,b.hitch(l,l.resolve),b.hitch(l,
l.reject),b.hitch(l,l.progress))}catch(n){l.reject(n)}return l}throw new Error("Service was unregistered");}}(g)}function e(){this._namedlisteners={}}function f(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new e;var h=this;this.internalRegistry={isRegistered:function(k){return h._entries[k]?true:false},unregisterService:function(k){var j=h._entries[k];if(j){for(var g=j.reference,i=h._namedReferences[g.getName()],l=0;l<i.length;l++)if(i[l]===g){if(i.length===1)delete h._namedReferences[g.getName()];
else i.splice(l,1);break}h._entries[k]=null;h._serviceEventTarget.dispatchEvent("serviceRemoved",g,j.service)}},dispatchEvent:function(k,j){var g=h._entries[k];g&&g.eventTarget.dispatchEvent.apply(g.eventTarget,[j].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(k,j,g){(k=h._entries[k])&&k.eventTarget.addEventListener(j,g)},removeEventListener:function(k,j,g){(k=h._entries[k])&&k.eventTarget.removeEventListener(j,g)}}}d.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var h=[],k;for(k in this.properties)this.properties.hasOwnProperty(k)&&h.push(k);return h},getProperty:function(h){return this.properties[h]}};d.prototype.constructor=d;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(h){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,h].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;c.prototype={addEventListener:function(h,k){this.internalRegistry.addEventListener(this.serviceId,h,k)},removeEventListener:function(h,k){this.internalRegistry.removeEventListener(this.serviceId,h,k)}};c.prototype.constructor=c;e.prototype={dispatchEvent:function(h){var k=this._namedlisteners[h];if(k)for(var j=0;j<k.length;j++)try{var g=Array.prototype.slice.call(arguments,1);k[j].apply(null,g)}catch(i){console.log(i)}},addEventListener:function(h,k){this._namedlisteners[h]=
this._namedlisteners[h]||[];this._namedlisteners[h].push(k)},removeEventListener:function(h,k){var j=this._namedlisteners[h];if(j)for(var g=0;g<j.length;g++)if(j[g]===k){if(j.length===1)delete this._namedlisteners[h];else j.splice(g,1);break}}};e.prototype.constructor=e;f.prototype={getService:function(h,k){var j,g=new b.Deferred;if(typeof h==="string"){if(this._namedReferences[h])for(var i=0;i<this._namedReferences[h].length;i++)if(j=this._entries[this._namedReferences[h][i].getServiceId()].service)break}else j=
this._entries[h.getServiceId()].service;if(j)g.resolve(j);else if(k===0)g.reject(new Error("timeout: getService"));else{var l=this,o=function(n,m){if(h===n||h===n.getName()){g.resolve(m);l._serviceEventTarget.removeEventListener("serviceAdded",o)}};this._serviceEventTarget.addEventListener("serviceAdded",o)}return g.promise},getServiceReferences:function(h){if(h)return this._namedReferences[h]?this._namedReferences[h]:[];h=[];for(var k=0;k<this._entries.length;k++)this._entries[k]&&h.push(this._entries[k].reference);
return h},registerService:function(h,k,j){var g=this._entries.length;j=new d(g,h,j);k=new c(g,k,this.internalRegistry);this._namedReferences[h]=this._namedReferences[h]||[];this._namedReferences[h].push(j);this._entries.push({reference:j,service:k,eventTarget:new e});this._serviceEventTarget.dispatchEvent("serviceAdded",j,k);return new a(g,j,this.internalRegistry)},addEventListener:function(h,k){this._serviceEventTarget.addEventListener(h,k)},removeEventListener:function(h,k){this._serviceEventTarget.removeEventListener(h,
k)}};f.prototype.constructor=f;return{ServiceReference:d,ServiceRegistration:a,Service:c,EventTarget:e,ServiceRegistry:f}});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
define("dojo/hash",["dojo"],function(b){(function(){function d(l,o){o=l.indexOf(o);return o>=0?l.substring(o+1):""}function a(){return d(location.href,"#")}function c(){b.publish("/dojo/hashchange",[a()])}function e(){if(a()!==k){k=a();c()}}function f(l){if(j)if(j.isTransitioning())setTimeout(b.hitch(null,f,l),i);else{var o=j.iframe.location.href,n=o.indexOf("?");j.iframe.location.replace(o.substring(0,n)+"?"+l)}else{location.replace("#"+l);!g&&e()}}function h(){function l(){k=a();m=t?k:d(C.href,
"?");p=false;s=null}var o=document.createElement("iframe"),n=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html");b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: 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");o.id="dojo-hash-iframe";o.src=n+"?"+a();o.style.display="none";document.body.appendChild(o);this.iframe=b.global["dojo-hash-iframe"];
var m,p,s,q,t,C=this.iframe.location;this.isTransitioning=function(){return p};this.pollLocation=function(){if(!t)try{var D=d(C.href,"?");if(document.title!=q)q=this.iframe.document.title=document.title}catch(u){t=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var w=a();if(p&&k===w)if(t||D===s){l();c()}else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(k===w&&(t||m===D)))if(k!==w){k=w;p=true;s=w;o.src=n+"?"+s;t=false;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!t){location.href="#"+C.search.substring(1);l();c()}setTimeout(b.hitch(this,this.pollLocation),i)};l();setTimeout(b.hitch(this,this.pollLocation),i)}b.hash=function(l,o){if(!arguments.length)return a();if(l.charAt(0)=="#")l=l.substring(1);if(o)f(l);else location.href="#"+l;return l};var k,j,g,i=b.config.hashPollFrequency||100;b.addOnLoad(function(){if("onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat"))g=b.connect(b.global,"onhashchange",c);else if(document.addEventListener){k=
a();setInterval(e,i)}else if(document.attachEvent)j=new h})})();return b.hash});
(function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=[];define("text",["require","exports","module"],function(){var e,f,h;if(typeof window!=="undefined"&&window.navigator&&window.document)f=function(k,j){var g=e.createXhr();g.open("GET",k,true);g.onreadystatechange=function(){g.readyState===4&&j(g.responseText)};g.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){h=require.nodeRequire("fs");f=function(k,j){j(h.readFileSync(k,"utf8"))}}else if(typeof Packages!=="undefined")f=function(k,j){var g=new java.io.File(k);k=java.lang.System.getProperty("line.separator");g=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(g),"utf-8"));var i,l,o="";try{i=new java.lang.StringBuffer;if((l=g.readLine())&&l.length()&&l.charAt(0)===65279)l=l.substring(1);for(i.append(l);(l=g.readLine())!==null;){i.append(k);i.append(l)}o=
String(i.toString())}finally{g.close()}j(o)};return e={version:"0.24.0",strip:function(k){if(k){k=k.replace(d,"");var j=k.match(a);if(j)k=j[1]}else k="";return k},jsEscape:function(k){return k.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var k,j,g;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(j=0;j<3;j++){g=b[j];try{k=new ActiveXObject(g)}catch(i){}if(k){b=
[g];break}}if(!k)throw new Error("require.getXhr(): XMLHttpRequest not available");return k},get:f,load:function(k,j,g,i){var l=false,o=k.indexOf("."),n=k.substring(0,o),m=k.substring(o+1,k.length);o=m.indexOf("!");if(o!==-1){l=m.substring(o+1,m.length);l=l==="strip";m=m.substring(0,o)}j=j.nameToUrl(n,"."+m);e.get(j,function(p){p=l?e.strip(p):p;if(i.isBuild&&i.inlineText)c[k]=p;g(p)})},write:function(k,j,g){if(j in c){var i=e.jsEscape(c[j]);g("define('"+k+"!"+j+"', function () { return '"+i+"';});\n")}}}})})();
define("text!dijit/form/templates/ValidationTextBox.html",function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/i18n",["require","dojo"],function(b,d){d.getObject("i18n",true,d);d.i18n.getLocalization=d.i18n.getLocalization||function(a,c,e){e=d.i18n.normalizeLocale(e);var f=e.split("-"),h=[a,"nls",c].join(".");if(typeof d.global.require!=="undefined"){var k=b("i18n!"+[a.replace(/\./g,"/"),"nls",c].join("/"));(d._loadedModules[h]=d._loadedModules[h]||{})[f.join("_")]=k.root||k}if(h=d._loadedModules[h]){var j;for(k=f.length;k>0;k--){var g=f.slice(0,k).join("_");if(h[g]){j=h[g];break}}if(!j)j=h.ROOT;
if(j){a=function(){};a.prototype=j;return new a}}throw new Error("Bundle not found: "+c+" in "+a+" , locale="+e);};d.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():d.locale;if(a=="root")a="ROOT";return a};d.i18n._requireLocalization=function(a,c,e,f){e=d.i18n.normalizeLocale(e);var h=[a,"nls",c].join("."),k="";if(f){for(var j=f.split(","),g=0;g<j.length;g++)if(e.indexOf(j[g])==0)if(j[g].length>k.length)k=j[g];k||(k="ROOT")}j=f?k:e;var i=d._loadedModules[h];g=null;if(i){if(d.config.localizationComplete&&
i._built)return;g=j.replace(/-/g,"_");g=d._loadedModules[h+"."+g]}if(!g){i=d.provide(h);var l=d._getModuleSymbols(a).concat("nls").join("/"),o;d.i18n._searchLocalePath(j,f,function(n){var m=n.replace(/-/g,"_"),p=h+"."+m,s=false;if(d._loadedModules[p])s=true;else{d.provide(p);p=[l];n!="ROOT"&&p.push(n);p.push(c);n=p.join("/")+".js";s=d._loadPath(n,null,function(q){q=q.root||q;var t=function(){};t.prototype=o;i[m]=new t;for(var C in q)i[m][C]=q[C]})}if(s&&i[m])o=i[m];else i[m]=o;if(f)return true})}if(f&&
e!=k)i[e.replace(/-/g,"_")]=i[k.replace(/-/g,"_")]};(function(){var a=d.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var c=d.i18n._requireLocalization;d.i18n._requireLocalization=function(e,f,h,k){c(e,f,h,k);if(!h)for(h=0;h<a.length;h++)c(e,f,a[h],k)}}})();d.i18n._searchLocalePath=function(a,c,e){a=d.i18n.normalizeLocale(a);var f=a.split("-");a=[];for(var h=f.length;h>0;h--)a.push(f.slice(0,h).join("-"));a.push(false);c&&a.reverse();for(c=a.length-1;c>=0;c--)if(e(a[c]||"ROOT"))break};d.i18n._preloadLocalizations=
function(a,c){function e(k){k=d.i18n.normalizeLocale(k);d.i18n._searchLocalePath(k,true,function(j){for(var g=0;g<c.length;g++)if(c[g]==j){d.require(a+"_"+j);return true}return false})}e();for(var f=d.config.extraLocale||[],h=0;h<f.length;h++)e(f[h])};return d.i18n});define("text!dijit/form/templates/TextBox.html",function(){return'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/window",["dojo"],function(b){b.getObject("window",true,b);b.window.getBox=function(){var d=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:d.clientWidth,h:d.clientHeight,l:a.x,t:a.y}};b.window.get=function(d){if(b.isIE&&window!==document.parentWindow){d.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=d._parentWindow;d._parentWindow=null;return a}return d.parentWindow||d.defaultView};b.window.scrollIntoView=function(d,
a){try{d=b.byId(d);var c=d.ownerDocument||b.doc,e=c.body||b.body(),f=c.documentElement||e.parentNode,h=b.isIE,k=b.isWebKit;if((!(b.isMoz||h||k||b.isOpera)||d==e||d==f)&&typeof d.scrollIntoView!="undefined")d.scrollIntoView(false);else{var j=c.compatMode=="BackCompat",g=h>=9&&d.ownerDocument.parentWindow.frameElement?f.clientHeight>0&&f.clientWidth>0&&(e.clientHeight==0||e.clientWidth==0||e.clientHeight>f.clientHeight||e.clientWidth>f.clientWidth)?f:e:j?e:f;c=k?e:g;var i=g.clientWidth,l=g.clientHeight,
o=!b._isBodyLtr(),n=a||b.position(d),m=d.parentNode;a=function(F){return h<=6||h&&j?false:b.style(F,"position").toLowerCase()=="fixed"};if(!a(d))for(;m;){if(m==e)m=c;var p=b.position(m),s=a(m);if(m==c){p.w=i;p.h=l;if(c==f&&h&&o)p.x+=c.offsetWidth-p.w;if(p.x<0||!h)p.x=0;if(p.y<0||!h)p.y=0}else{var q=b._getPadBorderExtents(m);p.w-=q.w;p.h-=q.h;p.x+=q.l;p.y+=q.t;var t=m.clientWidth,C=p.w-t;if(t>0&&C>0){p.w=t;p.x+=o&&(h||m.clientLeft>q.l)?C:0}t=m.clientHeight;C=p.h-t;if(t>0&&C>0)p.h=t}if(s){if(p.y<0){p.h+=
p.y;p.y=0}if(p.x<0){p.w+=p.x;p.x=0}if(p.y+p.h>l)p.h=l-p.y;if(p.x+p.w>i)p.w=i-p.x}var D=n.x-p.x,u=n.y-Math.max(p.y,0),w=D+n.w-p.w,z=u+n.h-p.h;if(w*D>0){var x=Math[D<0?"max":"min"](D,w);if(o&&(h==8&&!j||h>=9))x=-x;n.x+=m.scrollLeft;m.scrollLeft+=x;n.x-=m.scrollLeft}if(z*u>0){n.y+=m.scrollTop;m.scrollTop+=Math[u<0?"max":"min"](u,z);n.y-=m.scrollTop}m=m!=c&&!s&&m.parentNode}}}catch(E){console.error("scrollIntoView: "+E);d.scrollIntoView(false)}};return b.window});
define("dijit/_base/manager",["dojo","dijit"],function(b,d){b.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw new Error("Tried to register widget with id=="+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){if(this._hash[a]){delete this._hash[a];this.length--}},forEach:function(a,c){c=c||b.global;var e=0,f;for(f in this._hash)a.call(c,this._hash[f],e++,this._hash);return this},
filter:function(a,c){c=c||b.global;var e=new d.WidgetSet,f=0,h;for(h in this._hash){var k=this._hash[h];a.call(c,k,f++,this._hash)&&e.add(k)}return e},byId:function(a){return this._hash[a]},byClass:function(a){var c=new d.WidgetSet,e,f;for(e in this._hash){f=this._hash[e];f.declaredClass==a&&c.add(f)}return c},toArray:function(){var a=[];for(var c in this._hash)a.push(this._hash[c]);return a},map:function(a,c){return b.map(this.toArray(),a,c)},every:function(a,c){c=c||b.global;var e=0,f;for(f in this._hash)if(!a.call(c,
this._hash[f],e++,this._hash))return false;return true},some:function(a,c){c=c||b.global;var e=0,f;for(f in this._hash)if(a.call(c,this._hash[f],e++,this._hash))return true;return false}});(function(){d.registry=new d.WidgetSet;var a=d.registry._hash,c=b.attr,e=b.hasAttr,f=b.style;d.byId=function(g){return typeof g=="string"?a[g]:g};var h={};d.getUniqueId=function(g){var i;do i=g+"_"+(g in h?++h[g]:(h[g]=0));while(a[i]);return d._scopeName=="dijit"?i:d._scopeName+"_"+i};d.findWidgets=function(g){function i(o){for(o=
o.firstChild;o;o=o.nextSibling)if(o.nodeType==1){var n=o.getAttribute("widgetId");if(n)(n=a[n])&&l.push(n);else i(o)}}var l=[];i(g);return l};d._destroyAll=function(){d._curFocus=null;d._prevFocus=null;d._activeStack=[];b.forEach(d.findWidgets(b.body()),function(g){if(!g._destroyed)if(g.destroyRecursive)g.destroyRecursive();else g.destroy&&g.destroy()})};b.isIE&&b.addOnWindowUnload(function(){d._destroyAll()});d.byNode=function(g){return a[g.getAttribute("widgetId")]};d.getEnclosingWidget=function(g){for(;g;){var i=
g.getAttribute&&g.getAttribute("widgetId");if(i)return a[i];g=g.parentNode}return null};var k=d._isElementShown=function(g){var i=f(g);return i.visibility!="hidden"&&i.visibility!="collapsed"&&i.display!="none"&&c(g,"type")!="hidden"};d.hasDefaultTabStop=function(g){switch(g.nodeName.toLowerCase()){case "a":return e(g,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var i;try{var l=g.contentDocument;if("designMode"in l&&l.designMode==
"on")return true;i=l.body}catch(o){try{i=g.contentWindow.document.body}catch(n){return false}}return i.contentEditable=="true"||i.firstChild&&i.firstChild.contentEditable=="true";default:return g.contentEditable=="true"}};var j=d.isTabNavigable=function(g){return c(g,"disabled")?false:e(g,"tabIndex")?c(g,"tabIndex")>=0:d.hasDefaultTabStop(g)};d._getTabNavigable=function(g){function i(D){return D&&D.tagName.toLowerCase()=="input"&&D.type&&D.type.toLowerCase()=="radio"&&D.name&&D.name.toLowerCase()}
function l(D){return t[i(D)]||D}var o,n,m,p,s,q,t={},C=function(D){b.query("> *",D).forEach(function(u){if(!(b.isIE&&u.scopeName!=="HTML"||!k(u))){if(j(u)){var w=c(u,"tabIndex");if(!e(u,"tabIndex")||w==0){o||(o=u);n=u}else if(w>0){if(!m||w<p){p=w;m=u}if(!s||w>=q){q=w;s=u}}w=i(u);if(b.attr(u,"checked")&&w)t[w]=u}u.nodeName.toUpperCase()!="SELECT"&&C(u)}})};k(g)&&C(g);return{first:l(o),last:l(n),lowest:l(m),highest:l(s)}};d.getFirstInTabbingOrder=function(g){g=d._getTabNavigable(b.byId(g));return g.lowest?
g.lowest:g.first};d.getLastInTabbingOrder=function(g){g=d._getTabNavigable(b.byId(g));return g.last?g.last:g.highest};d.defaultDuration=b.config.defaultDuration||200})();return d});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(d){d&&b.mixin(this,d)},get:function(d){return this[d]},set:function(d,a){if(typeof d==="object"){for(var c in d)this.set(c,d[c]);return this}c=this[d];this[d]=a;this._watchCallbacks&&this._watchCallbacks(d,c,a);return this},watch:function(d,a){var c=this._watchCallbacks;if(!c){var e=this;c=this._watchCallbacks=function(h,k,j,g){var i=function(l){if(l){l=l.slice();for(var o=0,n=l.length;o<n;o++)try{l[o].call(e,
h,k,j)}catch(m){console.error(m)}}};i(c["_"+h]);g||i(c["*"])}}if(!a&&typeof d==="function"){a=d;d="*"}else d="_"+d;var f=c[d];if(typeof f!=="object")f=c[d]=[];f.push(a);return{unwatch:function(){f.splice(b.indexOf(f,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,d){(function(){b.declare("dijit._WidgetBase",b.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,c){this.create(a,c)},create:function(a,c){this.srcNodeRef=
b.byId(c);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a){this.params=a;b._mixin(this,a)}this.postMixInProperties();if(!this.id)this.id=d.getUniqueId(this.declaredClass.replace(/\./g,"_"));d.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();(a=this.srcNodeRef)&&a.parentNode&&this.domNode!==a&&a.parentNode.replaceChild(this.domNode,a)}this.domNode&&this.domNode.setAttribute("widgetId",this.id);
this.postCreate();this.srcNodeRef&&!this.srcNodeRef.parentNode&&delete this.srcNodeRef;this._created=true},_applyAttributes:function(){var a=function(e,f){if(f.params&&e in f.params||f[e])f.set(e,f[e])};for(var c in this.attributeMap)a(c,this);b.forEach(this._getSetterAttributes(),function(e){e in this.attributeMap||a(e,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var c=a._setterAttrs=[],e,f=a.prototype;for(var h in f)if(b.isFunction(f[h])&&(e=h.match(/^_set([a-zA-Z]*)Attr$/))&&
e[1])c.push(e[1].charAt(0).toLowerCase()+e[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||b.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(b.map(a,function(c){return c+"Rtl"})));b.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(a){this._beingDestroyed=true;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=true;this.uninitialize();var c=b.forEach,e=b.unsubscribe;c(this._connects,function(f){c(f,b.disconnect)});c(this._subscribes,function(f){e(f)});c(this._supportingWidgets||[],function(f){if(f.destroyRecursive)f.destroyRecursive();else f.destroy&&f.destroy()});this.destroyRendering(a);d.registry.remove(this.id);this._destroyed=true},destroyRendering:function(a){if(this.bgIframe){this.bgIframe.destroy(a);delete this.bgIframe}if(this.domNode){a?b.removeAttr(this.domNode,
"widgetId"):b.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||b.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){b.forEach(this.getChildren(),function(c){c.destroyRecursive&&c.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){b.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var c=this[this.attributeMap.style||"domNode"];if(b.isObject(a))b.style(c,
a);else if(c.style.cssText)c.style.cssText+="; "+a;else c.style.cssText=a;this._set("style",a)},_attrToDom:function(a,c){var e=this.attributeMap[a];b.forEach(b.isArray(e)?e:[e],function(f){var h=this[f.node||f||"domNode"];switch(f.type||"attribute"){case "attribute":if(b.isFunction(c))c=b.hitch(this,c);f=f.attribute?f.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(h,f,c);break;case "innerText":h.innerHTML="";h.appendChild(b.doc.createTextNode(c));break;case "innerHTML":h.innerHTML=
c;break;case "class":b.replaceClass(h,c,this[a]);break}},this)},get:function(a){var c=this._getAttrNames(a);return this[c.g]?this[c.g]():this[a]},set:function(a,c){if(typeof a==="object"){for(var e in a)this.set(e,a[e]);return this}e=this._getAttrNames(a);if(this[e.s])var f=this[e.s].apply(this,Array.prototype.slice.call(arguments,1));else{a in this.attributeMap&&this._attrToDom(a,c);this._set(a,c)}return f||this},_attrPairNames:{},_getAttrNames:function(a){var c=this._attrPairNames;if(c[a])return c[a];
var e=a.charAt(0).toUpperCase()+a.substr(1);return c[a]={n:a+"Node",s:"_set"+e+"Attr",g:"_get"+e+"Attr"}},_set:function(a,c){var e=this[a];this[a]=c;this._watchCallbacks&&this._created&&c!==e&&this._watchCallbacks(a,e,c)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?b.query("[widgetId]",this.containerNode).map(d.byNode):[]},getChildren:function(){return this.containerNode?d.findWidgets(this.containerNode):
[]},connect:function(a,c,e){a=[b._connect(a,c,this,e)];this._connects.push(a);return a},disconnect:function(a){for(var c=0;c<this._connects.length;c++)if(this._connects[c]==a){b.forEach(a,b.disconnect);this._connects.splice(c,1);return}},subscribe:function(a,c){a=b.subscribe(a,this,c);this._subscribes.push(a);return a},unsubscribe:function(a){for(var c=0;c<this._subscribes.length;c++)if(this._subscribes[c]==a){b.unsubscribe(a);this._subscribes.splice(c,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":b._isBodyLtr()},placeAt:function(a,c){a.declaredClass&&a.addChild?a.addChild(this,c):b.place(this.domNode,a,c);return this}})})();return d._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,d){b.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){var a,c,e=b.doc.selection,f=d._curFocus;if(b.global.getSelection){if(e=b.global.getSelection())if(e.isCollapsed){if(a=f?f.tagName:""){a=a.toLowerCase();if(a=="textarea"||a=="input"&&(!f.type||f.type.toLowerCase()=="text")){e={start:f.selectionStart,end:f.selectionEnd,node:f,pRange:true};
return{isCollapsed:e.end<=e.start,mark:e}}}a={isCollapsed:true};if(e.rangeCount)a.mark=e.getRangeAt(0).cloneRange()}else{c=e.getRangeAt(0);a={isCollapsed:false,mark:c.cloneRange()}}}else if(e){a=f?f.tagName:"";a=a.toLowerCase();if(f&&a&&(a=="button"||a=="textarea"||a=="input"))if(e.type&&e.type.toLowerCase()=="none")return{isCollapsed:true,mark:null};else{c=e.createRange();return{isCollapsed:c.text&&c.text.length?false:true,mark:{range:c,pRange:true}}}a={};try{c=e.createRange();a.isCollapsed=!(e.type==
"Text"?c.htmlText.length:c.length)}catch(h){a.isCollapsed=true;return a}if(e.type.toUpperCase()=="CONTROL")if(c.length){a.mark=[];e=0;for(f=c.length;e<f;)a.mark.push(c.item(e++))}else{a.isCollapsed=true;a.mark=null}else a.mark=c.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var c=b.doc;if(a=a.mark)if(b.global.getSelection){var e=b.global.getSelection();if(e&&e.removeAllRanges)if(a.pRange){e=a.node;e.selectionStart=
a.start;e.selectionEnd=a.end}else{e.removeAllRanges();e.addRange(a)}else console.warn("No idea how to restore selection for this browser!")}else if(c.selection&&a){var f;if(a.pRange)f=a.range;else if(b.isArray(a)){f=c.body.createControlRange();b.forEach(a,function(h){f.addElement(h)})}else{f=c.body.createTextRange();f.moveToBookmark(a)}f.select()}},getFocus:function(a,c){a=!d._curFocus||a&&b.isDescendant(d._curFocus,a.domNode)?d._prevFocus:d._curFocus;return{node:a,bookmark:a==d._curFocus&&b.withGlobal(c||
b.global,d.getBookmark),openedForWindow:c}},focus:function(a){if(a){var c="node"in a?a.node:a,e=a.bookmark;a=a.openedForWindow;var f=e?e.isCollapsed:false;if(c){var h=c.tagName.toLowerCase()=="iframe"?c.contentWindow:c;if(h&&h.focus)try{h.focus()}catch(k){}d._onFocusNode(c)}if(e&&b.withGlobal(a||b.global,d.isCollapsed)&&!f){a&&a.focus();try{b.withGlobal(a||b.global,d.moveToBookmark,null,[e])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return d.registerWin(a.contentWindow,a)},unregisterIframe:function(a){d.unregisterWin(a)},
registerWin:function(a,c){var e=function(i){d._justMouseDowned=true;setTimeout(function(){d._justMouseDowned=false},0);b.isIE&&i&&i.srcElement&&i.srcElement.parentNode==null||d._onTouchNode(c||i.target||i.srcElement,"mouse")},f=b.isIE?a.document.documentElement:a.document;if(f)if(b.isIE){a.document.body.attachEvent("onmousedown",e);var h=function(i){i.srcElement.tagName.toLowerCase()!="#document"&&d.isTabNavigable(i.srcElement)?d._onFocusNode(c||i.srcElement):d._onTouchNode(c||i.srcElement)};f.attachEvent("onactivate",
h);var k=function(i){d._onBlurNode(c||i.srcElement)};f.attachEvent("ondeactivate",k);return function(){a.document.detachEvent("onmousedown",e);f.detachEvent("onactivate",h);f.detachEvent("ondeactivate",k);f=null}}else{f.body.addEventListener("mousedown",e,true);var j=function(i){d._onFocusNode(c||i.target)};f.addEventListener("focus",j,true);var g=function(i){d._onBlurNode(c||i.target)};f.addEventListener("blur",g,true);return function(){f.body.removeEventListener("mousedown",e,true);f.removeEventListener("focus",
j,true);f.removeEventListener("blur",g,true);f=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){d._prevFocus=d._curFocus;d._curFocus=null;if(!d._justMouseDowned){d._clearActiveWidgetsTimer&&clearTimeout(d._clearActiveWidgetsTimer);d._clearActiveWidgetsTimer=setTimeout(function(){delete d._clearActiveWidgetsTimer;d._setStack([]);d._prevFocus=null},100)}},_onTouchNode:function(a,c){if(d._clearActiveWidgetsTimer){clearTimeout(d._clearActiveWidgetsTimer);delete d._clearActiveWidgetsTimer}var e=
[];try{for(;a;){var f=b.attr(a,"dijitPopupParent");if(f)a=d.byId(f).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var h=a.getAttribute&&a.getAttribute("widgetId"),k=h&&d.byId(h);k&&!(c=="mouse"&&k.get("disabled"))&&e.unshift(h);a=a.parentNode}}}catch(j){}d._setStack(e,c)},_onFocusNode:function(a){if(a)if(a.nodeType!=9){d._onTouchNode(a);if(a!=d._curFocus){if(d._curFocus)d._prevFocus=d._curFocus;d._curFocus=a;b.publish("focusNode",
[a])}}},_setStack:function(a,c){var e=d._activeStack;d._activeStack=a;for(var f=0;f<Math.min(e.length,a.length);f++)if(e[f]!=a[f])break;for(var h,k=e.length-1;k>=f;k--)if(h=d.byId(e[k])){h._focused=false;h.set("focused",false);h._hasBeenBlurred=true;h._onBlur&&h._onBlur(c);b.publish("widgetBlur",[h,c])}for(k=f;k<a.length;k++)if(h=d.byId(a[k])){h._focused=true;h.set("focused",true);h._onFocus&&h._onFocus(c);b.publish("widgetFocus",[h,c])}}});b.addOnLoad(function(){var a=d.registerWin(window);b.isIE&&
b.addOnWindowUnload(function(){d.unregisterWin(a);a=null})});return d});
define("dojo/AdapterRegistry",["dojo"],function(b){b.AdapterRegistry=function(d){this.pairs=[];this.returnWrappers=d||false};b.extend(b.AdapterRegistry,{register:function(d,a,c,e,f){this.pairs[f?"unshift":"push"]([d,a,c,e])},match:function(){for(var d=0;d<this.pairs.length;d++){var a=this.pairs[d];if(a[1].apply(this,arguments))return a[3]||this.returnWrappers?a[2]:a[2].apply(this,arguments)}throw new Error("No match found");},unregister:function(d){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
d){this.pairs.splice(a,1);return true}return false}});return b.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(b,d){d.getViewport=function(){return b.window.getBox()};d.placeOnScreen=function(a,c,e,f){e=b.map(e,function(h){var k={corner:h,pos:{x:c.x,y:c.y}};if(f){k.pos.x+=h.charAt(1)=="L"?f.x:-f.x;k.pos.y+=h.charAt(0)=="T"?f.y:-f.y}return k});return d._place(a,e)};d._place=function(a,c,e,f){var h=b.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")b.body().appendChild(a);var k=null;
b.some(c,function(g){var i=g.corner,l=g.pos,o=0,n={w:i.charAt(1)=="L"?h.l+h.w-l.x:l.x-h.l,h:i.charAt(1)=="T"?h.t+h.h-l.y:l.y-h.t};if(e){o=e(a,g.aroundCorner,i,n,f);o=typeof o=="undefined"?0:o}var m=a.style,p=m.display,s=m.visibility;m.visibility="hidden";m.display="";var q=b.marginBox(a);m.display=p;m.visibility=s;m=Math.max(h.l,i.charAt(1)=="L"?l.x:l.x-q.w);p=Math.max(h.t,i.charAt(0)=="T"?l.y:l.y-q.h);s=Math.min(h.l+h.w,i.charAt(1)=="L"?m+q.w:l.x);l=Math.min(h.t+h.h,i.charAt(0)=="T"?p+q.h:l.y);s=
s-m;l=l-p;o+=q.w-s+(q.h-l);if(k==null||o<k.overflow)k={corner:i,aroundCorner:g.aroundCorner,x:m,y:p,w:s,h:l,overflow:o,spaceAvailable:n};return!o});k.overflow&&e&&e(a,k.aroundCorner,k.corner,k.spaceAvailable,f);c=b._isBodyLtr();var j=a.style;j.top=k.y+"px";j[c?"left":"right"]=(c?k.x:h.w-k.x-k.w)+"px";return k};d.placeOnScreenAroundNode=function(a,c,e,f){c=b.byId(c);c=b.position(c,true);return d._placeOnScreenAroundRect(a,c.x,c.y,c.w,c.h,e,f)};d.placeOnScreenAroundRectangle=function(a,c,e,f){return d._placeOnScreenAroundRect(a,
c.x,c.y,c.width,c.height,e,f)};d._placeOnScreenAroundRect=function(a,c,e,f,h,k,j){var g=[];for(var i in k)g.push({aroundCorner:i,corner:k[i],pos:{x:c+(i.charAt(1)=="L"?0:f),y:e+(i.charAt(0)=="T"?0:h)}});return d._place(a,g,j,{w:f,h:h})};d.placementRegistry=new b.AdapterRegistry;d.placementRegistry.register("node",function(a,c){return typeof c=="object"&&typeof c.offsetWidth!="undefined"&&typeof c.offsetHeight!="undefined"},d.placeOnScreenAroundNode);d.placementRegistry.register("rect",function(a,
c){return typeof c=="object"&&"x"in c&&"y"in c&&"width"in c&&"height"in c},d.placeOnScreenAroundRectangle);d.placeOnScreenAroundElement=function(){return d.placementRegistry.match.apply(d.placementRegistry,arguments)};d.getPopupAroundAlignment=function(a,c){var e={};b.forEach(a,function(f){switch(f){case "after":e[c?"BR":"BL"]=c?"BL":"BR";break;case "before":e[c?"BL":"BR"]=c?"BR":"BL";break;case "below-alt":c=!c;case "below":e[c?"BL":"BR"]=c?"TL":"TR";e[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=
!c;case "above":default:e[c?"TL":"TR"]=c?"BL":"BR";e[c?"TR":"TL"]=c?"BR":"BL";break}});return e};return d});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,d){d.getDocumentWindow=function(a){return b.window.get(a)};return d});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,d){d.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var c=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),e=a.domNode||a;if(!c){c=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body());c.appendChild(e);e=e.style;e.display="";e.visibility="";e.position="";e.top="0px";if(a.declaredClass){a._popupWrapper=
c;b.connect(a,"destroy",function(){b.destroy(c);delete a._popupWrapper})}}return c},moveOffScreen:function(a){a=this._createWrapper(a);b.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);b.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,c=a.length-1;c>0&&a[c].parent===a[c-1].widget;c--);return a[c]},open:function(a){for(var c=this._stack,e=a.popup,f=a.orient||((a.parent?a.parent.isLeftToRight():b._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),h=a.around,k=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;c.length&&(!a.parent||!b.isDescendant(a.parent.domNode,c[c.length-1].widget.domNode));)d.popup.close(c[c.length-1].widget);var j=this._createWrapper(e);b.attr(j,{id:k,style:{zIndex:this._beginZIndex+c.length},"class":"dijitPopup "+(e.baseClass||e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(b.isIE||b.isMoz)if(!e.bgIframe)e.bgIframe=
new d.BackgroundIframe(j);f=h?d.placeOnScreenAroundElement(j,h,f,e.orient?b.hitch(e,"orient"):null):d.placeOnScreen(j,a,f=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";e.domNode.style.visibility="visible";h=[];h.push(b.connect(j,"onkeypress",this,function(g){if(g.charOrCode==b.keys.ESCAPE&&a.onCancel){b.stopEvent(g);a.onCancel()}else if(g.charOrCode===b.keys.TAB){b.stopEvent(g);(g=this.getTopPopup())&&g.onCancel&&g.onCancel()}}));e.onCancel&&
h.push(b.connect(e,"onCancel",a.onCancel));h.push(b.connect(e,e.onExecute?"onExecute":"onChange",this,function(){var g=this.getTopPopup();g&&g.onExecute&&g.onExecute()}));c.push({widget:e,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:h});e.onOpen&&e.onOpen(f);return f},close:function(a){for(var c=this._stack;a&&b.some(c,function(k){return k.widget==a})||!a&&c.length;){var e=c.pop(),f=e.widget,h=e.onClose;f.onClose&&f.onClose();b.forEach(e.handlers,b.disconnect);
f&&f.domNode&&this.hide(f);h&&h()}}};d._frames=new (function(){var a=[];this.pop=function(){var c;if(a.length){c=a.pop();c.style.display=""}else{if(b.isIE<9){c="<iframe src='"+(b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";c=b.doc.createElement(c)}else{c=b.create("iframe");c.src='javascript:""';c.className="dijitBackgroundIframe";b.style(c,"opacity",0.1)}c.tabIndex=
-1;d.setWaiRole(c,"presentation")}return c};this.push=function(c){c.style.display="none";a.push(c)}});d.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(b.isIE||b.isMoz){var c=this.iframe=d._frames.pop();a.appendChild(c);if(b.isIE<7||b.isQuirks){this.resize(a);this._conn=b.connect(a,"onresize",this,function(){this.resize(a)})}else b.style(c,{width:"100%",height:"100%"})}};b.extend(d.BackgroundIframe,{resize:function(a){this.iframe&&b.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+
"px"})},destroy:function(){if(this._conn){b.disconnect(this._conn);this._conn=null}if(this.iframe){d._frames.push(this.iframe);delete this.iframe}}});return d.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,d){d.scrollIntoView=function(a,c){b.window.scrollIntoView(a,c)};return d.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var d=b.doc.documentElement,a=b.isIE,c=b.isOpera,e=Math.floor,f=b.isFF,h=b.boxModel.replace(/-/,"");a={dj_ie:a,dj_ie6:e(a)==6,dj_ie7:e(a)==7,dj_ie8:e(a)==8,dj_ie9:e(a)==9,dj_quirks:b.isQuirks,dj_iequirks:a&&b.isQuirks,dj_opera:c,dj_khtml:b.isKhtml,dj_webkit:b.isWebKit,dj_safari:b.isSafari,dj_chrome:b.isChrome,dj_gecko:b.isMozilla,dj_ff3:e(f)==3};a["dj_"+h]=true;var k="";for(var j in a)if(a[j])k+=j+" ";d.className=b.trim(d.className+" "+k);b._loaders.unshift(function(){if(!b._isBodyLtr()){var g=
"dj_rtl dijitRtl "+k.replace(/ /g,"-rtl ");d.className=b.trim(d.className+" "+g)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,d){return d});
define("dijit/_base/typematic",["dojo","dijit"],function(b,d){d.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(b.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,c,e,f,h,k,j,g){if(h!=this._obj){this.stop();
this._initialDelay=j||500;this._subsequentDelay=k||0.9;this._minDelay=g||10;this._obj=h;this._evt=a;this._node=e;this._count=this._currentTimeout=-1;this._callback=b.hitch(c,f);this._fireEventAndReload();this._evt=b.mixin({faux:true},a)}},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(a,c,e,f,h,k,j){if(c.keyCode){c.charOrCode=c.keyCode;b.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0")}else if(c.charCode){c.charOrCode=String.fromCharCode(c.charCode);b.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[b.connect(a,"onkeypress",this,function(g){if(g.charOrCode==c.charOrCode&&(c.ctrlKey===undefined||c.ctrlKey==g.ctrlKey)&&(c.altKey===undefined||c.altKey==g.altKey)&&(c.metaKey===undefined||c.metaKey==(g.metaKey||false))&&(c.shiftKey===undefined||c.shiftKey==g.shiftKey)){b.stopEvent(g);d.typematic.trigger(g,
e,a,f,c,h,k,j)}else d.typematic._obj==c&&d.typematic.stop()}),b.connect(a,"onkeyup",this,function(){d.typematic._obj==c&&d.typematic.stop()})]},addMouseListener:function(a,c,e,f,h,k){var j=b.connect;return[j(a,"mousedown",this,function(g){b.stopEvent(g);d.typematic.trigger(g,c,a,e,a,f,h,k)}),j(a,"mouseup",this,function(g){b.stopEvent(g);d.typematic.stop()}),j(a,"mouseout",this,function(g){b.stopEvent(g);d.typematic.stop()}),j(a,"mousemove",this,function(g){g.preventDefault()}),j(a,"dblclick",this,
function(g){b.stopEvent(g);if(b.isIE){d.typematic.trigger(g,c,a,e,a,f,h,k);setTimeout(b.hitch(this,d.typematic.stop),50)}})]},addListener:function(a,c,e,f,h,k,j,g){return this.addKeyListener(c,e,f,h,k,j,g).concat(this.addMouseListener(a,f,h,k,j,g))}};return d.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,d){d.wai={onload:function(){var a=b.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif"))+'");'}},b.body()),c=b.getComputedStyle(a);if(c){var e=c.backgroundImage;b[c.borderTopColor==c.borderRightColor||e!=null&&(e=="none"||e=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");if(b.isIE)a.outerHTML="";else b.body().removeChild(a)}}};if(b.isIE||b.isMoz)b._loaders.unshift(d.wai.onload);b.mixin(d,{hasWaiRole:function(a,c){a=this.getWaiRole(a);return c?a.indexOf(c)>-1:a.length>0},getWaiRole:function(a){return b.trim((b.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,c){b.attr(a,"role",c)},removeWaiRole:function(a,c){var e=b.attr(a,"role");if(e)if(c){c=b.trim((" "+e+" ").replace(" "+c+" "," "));b.attr(a,"role",c)}else a.removeAttribute("role")},
hasWaiState:function(a,c){return a.hasAttribute?a.hasAttribute("aria-"+c):!!a.getAttribute("aria-"+c)},getWaiState:function(a,c){return a.getAttribute("aria-"+c)||""},setWaiState:function(a,c,e){a.setAttribute("aria-"+c,e)},removeWaiState:function(a,c){a.removeAttribute("aria-"+c)}});return d});
define("dijit/_base",["dojo","dijit","dijit/_base/focus","dijit/_base/manager","dijit/_base/place","dijit/_base/popup","dijit/_base/scroll","dijit/_base/sniff","dijit/_base/typematic","dijit/_base/wai","dijit/_base/window"],function(b,d){return d._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,d){b.connect(b,"_connect",function(a,c){a&&b.isFunction(a._onConnect)&&a._onConnect(c)});d._connectOnUseEventHandler=function(){};d._lastKeyDownNode=null;b.isIE?function(){var a=function(c){d._lastKeyDownNode=c.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){d._lastKeyDownNode=a.target},true);(function(){b.declare("dijit._Widget",
d._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:d._connectOnUseEventHandler,onDblClick:d._connectOnUseEventHandler,onKeyDown:d._connectOnUseEventHandler,onKeyPress:d._connectOnUseEventHandler,onKeyUp:d._connectOnUseEventHandler,onMouseDown:d._connectOnUseEventHandler,onMouseMove:d._connectOnUseEventHandler,onMouseOut:d._connectOnUseEventHandler,
onMouseOver:d._connectOnUseEventHandler,onMouseLeave:d._connectOnUseEventHandler,onMouseEnter:d._connectOnUseEventHandler,onMouseUp:d._connectOnUseEventHandler,create:function(){this._deferredConnects=b.clone(this._deferredConnects);for(var a in this.attributeMap)delete this._deferredConnects[a];for(a in this._deferredConnects)this[a]!==d._connectOnUseEventHandler&&delete this._deferredConnects[a];this.inherited(arguments);if(this.domNode)for(a in this.params)this._onConnect(a)},_onConnect:function(a){if(a in
this._deferredConnects){this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a);delete this._deferredConnects[a]}},focused:false,isFocusable:function(){return this.focus&&b.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,c){b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,c)},attr:function(a){if(b.config.isDebug){var c=
arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();if(!c[e]){b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+e,"","2.0");c[e]=true}}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,c,e){var f=b._connect,h=this.inherited(arguments,[a,c=="ondijitclick"?"onclick":c,e]);if(c=="ondijitclick")if(b.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var k=b.hitch(this,e);h.push(f(a,"onkeydown",this,function(j){if((j.keyCode==b.keys.ENTER||j.keyCode==b.keys.SPACE)&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){d._lastKeyDownNode=j.target;"openDropDown"in this&&a==this._buttonNode||j.preventDefault()}}),f(a,"onkeyup",this,function(j){if((j.keyCode==b.keys.ENTER||j.keyCode==b.keys.SPACE)&&j.target==d._lastKeyDownNode&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){d._lastKeyDownNode=null;return k(j)}}))}return h},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return d._Widget});
define("dojo/string",["dojo"],function(b){b.getObject("string",true,b);b.string.rep=function(d,a){if(a<=0||!d)return"";for(var c=[];;){a&1&&c.push(d);if(!(a>>=1))break;d+=d}return c.join("")};b.string.pad=function(d,a,c,e){c||(c="0");d=String(d);a=b.string.rep(c,Math.ceil((a-d.length)/c.length));return e?d+a:a+d};b.string.substitute=function(d,a,c,e){e=e||b.global;c=c?b.hitch(e,c):function(f){return f};return d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(f,h,k){f=b.getObject(h,false,
a);if(k)f=b.getObject(k,false,e).call(e,f,h);return c(f,h).toString()})};b.string.trim=String.prototype.trim?b.trim:function(d){d=d.replace(/^\s+/,"");for(var a=d.length-1;a>=0;a--)if(/\S/.test(d.charAt(a))){d=d.substring(0,a+1);break}return d};return b.string});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",true,b);b.date.stamp.fromISOString=function(d,a){if(!b.date.stamp._isoRegExp)b.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var c=b.date.stamp._isoRegExp.exec(d);d=null;if(c){c.shift();c[1]&&c[1]--;if(c[6])c[6]*=1E3;if(a){a=new Date(a);b.forEach(b.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(h){return a["get"+
h]()}),function(h,k){c[k]=c[k]||h})}d=new Date(c[0]||1970,c[1]||0,c[2]||1,c[3]||0,c[4]||0,c[5]||0,c[6]||0);if(c[0]<100)d.setFullYear(c[0]||1970);var e=0,f=c[7]&&c[7].charAt(0);if(f!="Z"){e=(c[8]||0)*60+(Number(c[9])||0);if(f!="-")e*=-1}if(f)e-=d.getTimezoneOffset();e&&d.setTime(d.getTime()+e*6E4)}return d};b.date.stamp.toISOString=function(d,a){var c=function(k){return k<10?"0"+k:k};a=a||{};var e=[],f=a.zulu?"getUTC":"get",h="";if(a.selector!="time"){h=d[f+"FullYear"]();h=["0000".substr((h+"").length)+
h,c(d[f+"Month"]()+1),c(d[f+"Date"]())].join("-")}e.push(h);if(a.selector!="date"){h=[c(d[f+"Hours"]()),c(d[f+"Minutes"]()),c(d[f+"Seconds"]())].join(":");f=d[f+"Milliseconds"]();if(a.milliseconds)h+="."+(f<100?"0":"")+c(f);if(a.zulu)h+="Z";else if(a.selector!="time"){d=d.getTimezoneOffset();a=Math.abs(d);h+=(d>0?"-":"+")+c(Math.floor(a/60))+":"+c(a%60)}e.push(h)}return e.join("T")};return b.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new (function(){function d(j){if(f.isString(j))return"string";if(typeof j=="number")return"number";if(typeof j=="boolean")return"boolean";if(f.isFunction(j))return"function";if(f.isArray(j))return"array";if(j instanceof Date)return"date";if(j instanceof f._Url)return"url";return"object"}function a(j,g){switch(g){case "string":return j;case "number":return j.length?Number(j):NaN;case "boolean":return typeof j=="boolean"?j:j.toLowerCase()!=
"false";case "function":if(f.isFunction(j)){j=j.toString();j=f.trim(j.substring(j.indexOf("{")+1,j.length-1))}try{return j===""||j.search(/[^\w\.]+/i)!=-1?new Function(j):f.getObject(j,false)||new Function(j)}catch(i){return new Function}case "array":return j?j.split(/\s*,\s*/):[];case "date":switch(j){case "":return new Date("");case "now":return new Date;default:return f.date.stamp.fromISOString(j)}case "url":return f.baseUrl+j;default:return f.fromJson(j)}}function c(j,g){for(var i in j)if(i.charAt(0)!=
"_")i in h||(g[i]=d(j[i]));return g}function e(j,g){var i=k[j];if(i){if(!g&&!i.params)i.params=c(i.cls.prototype,{})}else{j=f.getObject(j);i=null;if(!j)return null;g||(i=c(j.prototype,{}));i={cls:j,params:i}}return i}var f=b,h={},k={};f.connect(f,"extend",function(){k={}});this._functionFromScript=function(j,g){var i="",l="";(g=j.getAttribute(g+"args")||j.getAttribute("args"))&&f.forEach(g.split(/\s*,\s*/),function(o,n){i+="var "+o+" = arguments["+n+"]; "});(g=j.getAttribute("with"))&&g.length&&f.forEach(g.split(/\s*,\s*/),
function(o){i+="with("+o+"){";l+="}"});return new Function(i+j.innerHTML+l)};this.instantiate=function(j,g,i){var l=[];g=g||{};i=i||{};var o=(i.scope||f._scopeName)+"Type",n="data-"+(i.scope||f._scopeName)+"-";f.forEach(j,function(m){if(m){var p,s,q,t,C,D;if(m.node){p=m.node;s=m.type;D=m.fastpath;t=(q=m.clsInfo||s&&e(s,D))&&q.cls;C=m.scripts}else{p=m;C=(t=(q=(s=o in g?g[o]:p.getAttribute(o))&&e(s))&&q.cls)&&(t._noScript||t.prototype._noScript)?[]:f.query("> script[type^='dojo/']",p)}if(!q)throw new Error("Could not load class '"+
s);var u={};i.defaults&&f._mixin(u,i.defaults);m.inherited&&f._mixin(u,m.inherited);if(D){if((q=p.getAttribute(n+"props"))&&q.length)try{q=f.fromJson.call(i.propsThis,"{"+q+"}");f._mixin(u,q)}catch(w){throw new Error(w.toString()+" in data-dojo-props='"+q+"'");}if(q=p.getAttribute(n+"attach-point"))u.dojoAttachPoint=q;if(q=p.getAttribute(n+"attach-event"))u.dojoAttachEvent=q;b.mixin(u,g)}else{m=p.attributes;for(var z in q.params){s=z in g?{value:g[z],specified:true}:m.getNamedItem(z);if(!(!s||!s.specified&&
(!b.isIE||z.toLowerCase()!="value"))){s=s.value;switch(z){case "class":s="className"in g?g.className:p.className;break;case "style":s="style"in g?g.style:p.style&&p.style.cssText}var x=q.params[z];u[z]=typeof s=="string"?a(s,x):s}}}var E=[],F=[];f.forEach(C,function(J){p.removeChild(J);var L=J.getAttribute(n+"event")||J.getAttribute("event"),M=J.getAttribute("type");J=f.parser._functionFromScript(J,n);if(L)if(M=="dojo/connect")E.push({event:L,func:J});else u[L]=J;else F.push(J)});var K=(C=t.markupFactory||
t.prototype&&t.prototype.markupFactory)?C(u,p,t):new t(u,p);l.push(K);(t=p.getAttribute(n+"id")||p.getAttribute("jsId"))&&f.setObject(t,K);f.forEach(E,function(J){f.connect(K,J.event,null,J.func)});f.forEach(F,function(J){J.call(K)})}});g._started||f.forEach(l,function(m){if(!i.noStart&&m&&b.isFunction(m.startup)&&!m._started&&(!m.getParent||!m.getParent()))m.startup()});return l};this.parse=function(j,g){function i(p,s){var q=b.clone(p.inherited);b.forEach(["dir","lang"],function(z){var x=p.node.getAttribute(z);
if(x)q[z]=x});for(var t=p.clsInfo&&!p.clsInfo.cls.prototype._noScript?p.scripts:null,C=!p.clsInfo||!p.clsInfo.cls.prototype.stopParser||g&&g.template,D=p.node.firstChild;D;D=D.nextSibling)if(D.nodeType==1){var u,w=C&&D.getAttribute(o+"type");u=w?w:C&&D.getAttribute(l);w=w==u;if(u){u={type:u,fastpath:w,clsInfo:e(u,w),node:D,scripts:[],inherited:q};s.push(u);i(u,s)}else if(t&&D.nodeName.toLowerCase()=="script")(u=D.getAttribute("type"))&&/^dojo\/\w/i.test(u)&&t.push(D);else C&&i({node:D,inherited:q},
s)}}if(!g&&j&&j.rootNode){g=j;j=g.rootNode}else j=j;j=j?b.byId(j):b.body();g=g||{};var l=(g.scope||f._scopeName)+"Type",o="data-"+(g.scope||f._scopeName)+"-",n={};if(g&&g.inherited)for(var m in g.inherited)if(g.inherited[m])n[m]=g.inherited[m];m=[];i({node:j,inherited:n},m);return this.instantiate(m,g&&g.template?{template:true}:null,g)}});(function(){var d=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,d):b._loaders.unshift(d)})();
return b.parser});
define("dojo/cache",["dojo"],function(b){var d={};b.cache=function(a,c,e){if(typeof a=="string")var f=b.moduleUrl(a,c);else{f=a;e=c}f=f.toString();var h=e;if(e!=undefined&&!b.isString(e))h="value"in e?e.value:undefined;e=e&&e.sanitize?true:false;if(typeof h=="string")h=d[f]=e?b.cache._sanitize(h):h;else if(h===null)delete d[f];else{if(!(f in d)){h=undefined;if(b.isFunction(require)&&b.isString(a))try{var k=(a?a.replace(/\./g,"/")+"/":"")+c;h=require("text!"+k)}catch(j){}if(typeof h==="undefined")h=
b._getText(f);d[f]=e?b.cache._sanitize(h):h}h=d[f]}return h};b.cache._sanitize=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(c)a=c[1]}else a="";return a};return b.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(b,d){b.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var c=this.declaredClass,e=this;return b.string.substitute(a,this,function(f,h){if(h.charAt(0)=="!")f=b.getObject(h.substr(1),false,e);if(typeof f==
"undefined")throw new Error(c+" template:"+h);if(f==null)return"";return h.charAt(0)=="!"?f:f.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=d._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),c;if(b.isString(a)){c=b._toDom(this._stringRepl(a));if(c.nodeType!=1)throw new Error("Invalid template: "+a);}else c=a.cloneNode(true);this.domNode=c;this.inherited(arguments);this._attachTemplateNodes(c);if(this.widgetsInTemplate){a=this._startupWidgets=
b.parser.parse(c,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=d.findWidgets(c);this._attachTemplateNodes(a,function(e,f){return e[f]})}this._fillContent(this.srcNodeRef)},_fillContent:function(a){var c=this.containerNode;if(a&&c)for(;a.hasChildNodes();)c.appendChild(a.firstChild)},_attachTemplateNodes:function(a,c){c=c||function(l,o){return l.getAttribute(o)};for(var e=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),
f=b.isArray(a)?0:-1;f<e.length;f++){var h=f==-1?a:e[f];if(!(this.widgetsInTemplate&&(c(h,"dojoType")||c(h,"data-dojo-type")))){var k=c(h,"dojoAttachPoint")||c(h,"data-dojo-attach-point");if(k)for(var j=k.split(/\s*,\s*/);k=j.shift();){if(b.isArray(this[k]))this[k].push(h);else this[k]=h;this._attachPoints.push(k)}if(k=c(h,"dojoAttachEvent")||c(h,"data-dojo-attach-event")){j=k.split(/\s*,\s*/);for(var g=b.trim;k=j.shift();)if(k){var i=null;if(k.indexOf(":")!=-1){i=k.split(":");k=g(i[0]);i=g(i[1])}else k=
g(k);i||(i=k);this._attachEvents.push(this.connect(h,k,i))}}(k=c(h,"waiRole"))&&d.setWaiRole(h,k);(k=c(h,"waiState"))&&b.forEach(k.split(/\s*,\s*/),function(l){if(l.indexOf("-")!=-1){l=l.split("-");d.setWaiState(h,l[0],l[1])}})}}},startup:function(){b.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){b.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];b.forEach(this._attachEvents,
this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});d._Templated._templateCache={};d._Templated.getCachedTemplate=function(a,c,e){var f=d._Templated._templateCache,h=c||a,k=f[h];if(k){try{if(!k.ownerDocument||k.ownerDocument==b.doc)return k}catch(j){}b.destroy(k)}c||(c=b.cache(a,{sanitize:true}));c=b.string.trim(c);if(e||c.match(/\$\{([^\}]+)\}/g))return f[h]=c;else{a=b._toDom(c);if(a.nodeType!=1)throw new Error("Invalid template: "+c);return f[h]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=
d._Templated._templateCache;for(var c in a){var e=a[c];typeof e=="object"&&b.destroy(e);delete a[c]}});b.extend(d._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return d._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(b,d){b.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);b.forEach(["onmouseenter","onmouseleave","onmousedown"],function(c){this.connect(this.domNode,c,"_cssMouseEvent")},this);b.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(c){this.watch(c,b.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.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 c=this.connect(b.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(c)});break}},_setStateClass:function(){function a(j){c=
c.concat(b.map(c,function(g){return g+j}),"dijit"+j)}var c=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");this.checked&&a("Checked");this.state&&a(this.state);this.selected&&a("Selected");if(this.disabled)a("Disabled");else if(this.readOnly)a("ReadOnly");else if(this.active)a("Active");else this.hovering&&a("Hover");this._focused&&a("Focused");var e=this.stateNode||this.domNode,f={};b.forEach(e.className.split(" "),function(j){f[j]=true});"_stateClasses"in this&&b.forEach(this._stateClasses,
function(j){delete f[j]});b.forEach(c,function(j){f[j]=true});var h=[];for(var k in f)h.push(k);e.className=h.join(" ");this._stateClasses=c},_trackMouseState:function(a,c){function e(){var i="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;b.toggleClass(a,c+"Hover",f&&!h&&!i);b.toggleClass(a,c+"Active",h&&!i);b.toggleClass(a,c+"Focused",k&&!i)}var f=false,h=false,k=false,j=this,g=b.hitch(this,"connect",a);g("onmouseenter",function(){f=true;e()});g("onmouseleave",function(){h=f=false;e()});
g("onmousedown",function(){h=true;e()});g("onmouseup",function(){h=false;e()});g("onfocus",function(){k=true;e()});g("onblur",function(){k=false;e()});this.watch("disabled",e);this.watch("readOnly",e)}});return d._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(b,d){b.declare("dijit.form._FormWidget",[d._Widget,d._Templated,d._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:b.delegate(d._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(a){this._set("disabled",a);b.attr(this.focusNode,"disabled",a);this.valueNode&&b.attr(this.valueNode,"disabled",a);d.setWaiState(this.focusNode,"disabled",a);if(a){this._set("hovering",false);this._set("active",false);a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode";
b.forEach(b.isArray(a)?a:[a],function(c){c=this[c];b.isWebKit||d.hasDefaultTabStop(c)?c.setAttribute("tabIndex","-1"):c.removeAttribute("tabIndex")},this)}else this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){b.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(){this.scrollOnFocus&&b.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&
this.focusNode&&b.style(this.domNode,"display")!="none"},focus:function(){this.disabled||d.focus(this.focusNode)},compare:function(a,c){return typeof a=="number"&&typeof c=="number"?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:false,_handleOnChange:function(a,c){if(this._lastValueReported==undefined&&(c===null||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||this.compare(a,
this._lastValueReported)!=0;if((this.intermediateChanges||c||c===undefined)&&this._pendingOnChange){this._lastValueReported=a;this._pendingOnChange=false;if(this._onChangeActive){this._onChangeHandle&&clearTimeout(this._onChangeHandle);this._onChangeHandle=setTimeout(b.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),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(a){b.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){b.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&b.mouseButtons.isLeft(a)&&this.isFocusable())var c=this.connect(b.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(c)})}});b.declare("dijit.form._FormValueWidget",
d.form._FormWidget,{readOnly:false,attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(b.isIE<9||b.isIE&&b.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,c){this._handleOnChange(a,c)},_handleOnChange:function(a){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,false)},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true)},_onKeyDown:function(a){if(a.keyCode==b.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var c;if(b.isIE){a.preventDefault();c=document.createEventObject();c.keyCode=b.keys.ESCAPE;c.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
c)}}},_layoutHackIE7:function(){if(b.isIE==7)for(var a=this.domNode,c=a.parentNode,e=a.firstChild||a,f=e.style.filter,h=this;c&&c.clientHeight==0;){(function(){var k=h.connect(c,"onscroll",function(){h.disconnect(k);e.style.filter=(new Date).getMilliseconds();setTimeout(function(){e.style.filter=f},0)})})();c=c.parentNode}}});return d.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,d){b.declare("dijit.form.TextBox",d.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:b.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:b.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:b.delegate(d.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||(a=="hidden"||a=="file")&&this.templateString==d.form.TextBox.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},_setPlaceHolderAttr:function(a){this._set("placeHolder",
a);if(!this._phspan){this._attachPoints.push("_phspan");this._phspan=b.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after")}this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));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(a,
c,e){var f;if(a!==undefined){f=this.filter(a);if(typeof e!="string")e=f!==null&&(typeof f!="number"||!isNaN(f))?this.filter(this.format(f,this.constraints)):""}if(e!=null&&e!=undefined&&(typeof e!="number"||!isNaN(e))&&this.textbox.value!=e){this.textbox.value=e;this._set("displayedValue",this.get("displayedValue"))}this._updatePlaceHolder();this.inherited(arguments,[f,c])},displayedValue:"",getDisplayedValue:function(){b.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(a){b.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){if(a===null||a===undefined)a="";else if(typeof a!="string")a=String(a);this.textbox.value=a;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",
this.get("displayedValue"))},format:function(a){return a==null||a==undefined?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode)switch(a.keyCode){case b.keys.SHIFT:case b.keys.ALT:case b.keys.CTRL:case b.keys.TAB:return}if(this.intermediateChanges){var c=this;setTimeout(function(){c._handleOnChange(c.get("value"),false)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},
postCreate:function(){b.isIE&&setTimeout(b.hitch(this,function(){var a=b.getComputedStyle(this.domNode);if(a)if(a=a.fontFamily){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(var e=0;e<c.length;e++)c[e].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(b.isMoz||b.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(a){if(a===null)return this._blankValue;if(typeof a!="string")return a;if(this.trim)a=b.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(c){return c.substring(0,1).toUpperCase()+c.substring(1)});return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),true)},_onBlur:function(){if(!this.disabled){this._setBlurValue();
this.inherited(arguments);this._selectOnClickHandle&&this.disconnect(this._selectOnClickHandle);if(this.selectOnClick&&b.isMoz)this.textbox.selectionStart=this.textbox.selectionEnd=undefined;this._updatePlaceHolder()}},_onFocus:function(a){if(!(this.disabled||this.readOnly)){if(this.selectOnClick&&a=="mouse")this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var c;if(b.isIE){c=b.doc.selection.createRange();c=c.parentElement()==this.textbox&&
c.text.length==0}else c=this.textbox.selectionStart==this.textbox.selectionEnd;c&&d.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});d.selectInputText=function(a,c,e){var f=b.global,h=b.doc;a=b.byId(a);if(isNaN(c))c=0;if(isNaN(e))e=a.value?a.value.length:0;d.focus(a);if(h.selection&&b.body().createTextRange){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveStart("character",
-99999);a.moveStart("character",c);a.moveEnd("character",e-c);a.select()}}else f.getSelection&&a.setSelectionRange&&a.setSelectionRange(c,e)};return d.form.TextBox});define("text!dijit/templates/Tooltip.html",function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(b,d){b.declare("dijit._MasterTooltip",[d._Widget,d._Templated],{duration:d.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new d.BackgroundIframe(this.domNode);this.fadeIn=b.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=b.fadeOut({node:this.domNode,
duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,c,e,f){if(!(this.aroundNode&&this.aroundNode===c)){this.domNode.width="auto";if(this.fadeOut.status()=="playing")this._onDeck=arguments;else{this.containerNode.innerHTML=a;d.placeOnScreenAroundElement(this.domNode,c,d.getPopupAroundAlignment(e&&e.length?e:d.Tooltip.defaultPosition,!f),b.hitch(this,"orient"));b.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=c}}},orient:function(a,c,e,
f,h){this.connectorNode.style.top="";var k=f.w-this.connectorNode.offsetWidth;a.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[c+"-"+e];this.domNode.style.width="auto";var j=b.contentBox(this.domNode),g=Math.min(Math.max(k,1),j.w),i=g<j.w;this.domNode.style.width=g+"px";if(i){this.containerNode.style.overflow=
"auto";i=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(i>g){i=i+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight");this.domNode.style.width=i+"px"}}if(e.charAt(0)=="B"&&c.charAt(0)=="B"){a=b.marginBox(a);c=this.connectorNode.offsetHeight;if(a.h>f.h){this.connectorNode.style.top=f.h-h.h/2-c/2+"px";this.connectorNode.style.bottom=""}else{this.connectorNode.style.bottom=Math.min(Math.max(h.h/2-c/2,0),a.h-c)+"px";this.connectorNode.style.top=""}}else{this.connectorNode.style.top=
"";this.connectorNode.style.bottom=""}return Math.max(0,j.w-k)},_onShow:function(){if(b.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play()}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null}}});d.showTooltip=function(a,c,e,f){if(!d._masterTT)d._masterTT=
new d._MasterTooltip;return d._masterTT.show(a,c,e,f)};d.hideTooltip=function(a){if(!d._masterTT)d._masterTT=new d._MasterTooltip;return d._masterTT.hide(a)};b.declare("dijit.Tooltip",d._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(e){b.forEach(e,b.hitch(this,"disconnect"))},this);var c=b.isArrayLike(a)?a:a?[a]:[];this._connections=b.map(c,function(e){return(e=b.byId(e))?[this.connect(e,"onmouseenter","_onTargetMouseEnter"),
this.connect(e,"onmouseleave","_onTargetMouseLeave"),this.connect(e,"onfocus","_onTargetFocus"),this.connect(e,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=c},addTarget:function(a){a=a.id||a;b.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);if(a>=0){this._connectIds.splice(a,1);this.set("connectId",this._connectIds)}},buildRendering:function(){this.inherited(arguments);
b.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(b.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=true;this._onHover(a)},_onTargetBlur:function(a){this._focus=false;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var c=a.target;this._showTimer=setTimeout(b.hitch(this,function(){this.open(c)}),
this.showDelay)}},_onUnHover:function(){if(!this._focus){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}this.close()}},open:function(a){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}d.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){if(this._connectNode){d.hideTooltip(this._connectNode);delete this._connectNode;this.onHide()}if(this._showTimer){clearTimeout(this._showTimer);
delete this._showTimer}},onShow:function(){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});d.Tooltip.defaultPosition=["after","before"];return d.Tooltip});
(function(){function b(c,e,f,h,k,j){if(e[c]){f.push(c);if(e[c]===true||e[c]===1)h.push(k+c+"/"+j)}}function d(c,e,f,h,k){e=h+e+"/"+k;require._fileExists(c.nameToUrl(e,null))&&f.push(e)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(c,e,f,h){h=h||{};var k=a.exec(c),j=k[1],g=k[4],i=k[5],l=g.split("-"),o=[],n={},m,p,s="";if(k[5]){j=k[1];c=j+i}else{c=c;i=k[4];g=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());l=g.split("-")}if(h.isBuild){o.push(c);d(e,"root",o,j,i);for(m=0;p=l[m];m++){s+=(s?"-":"")+p;d(e,s,o,j,i)}e(o);f()}else e([c],function(q){var t=[];b("root",q,t,o,j,i);for(m=0;p=l[m];m++){s+=(s?"-":"")+p;b(s,q,t,o,j,i)}e(o,function(){var C,D;for(C=t.length-1;C>-1&&(p=t[C]);C--){D=q[p];if(D===true||D===1)D=e(j+p+"/"+i);require.mixin(n,D)}f(n)})})}})})();
define("dijit/form/nls/validate",{root:{invalidMessage:"The value entered is not valid.",missingMessage:"This value is required.",rangeMessage:"This value is out of range."},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/form/ValidationTextBox",["dojo","dijit","text!dijit/form/templates/ValidationTextBox.html","dojo/i18n","dijit/form/TextBox","dijit/Tooltip","i18n!dijit/form/nls/validate"],function(b,d){b.declare("dijit.form.ValidationTextBox",d.form.TextBox,{templateString:b.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:false,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",
regExpGen:function(){return this.regExp},state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(a,c){return(new RegExp("^(?:"+this.regExpGen(c)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,c)!==undefined)},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0},isValid:function(){return this.validator(this.textbox.value,this.constraints)},
_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){return this.required&&this._isEmpty(this.textbox.value)?this.missingMessage:this.invalidMessage},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:true,validate:function(a){var c="",e=this.disabled||this.isValid(a);if(e)this._maskValidSubsetError=true;var f=this._isEmpty(this.textbox.value),h=!e&&a&&this._isValidSubset();this._set("state",e?"":((!this._hasBeenBlurred||a)&&f||h)&&this._maskValidSubsetError?
"Incomplete":"Error");d.setWaiState(this.focusNode,"invalid",e?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=a&&h;c=this.getErrorMessage(a)}else if(this.state=="Incomplete"){c=this.getPromptMessage(a);this._maskValidSubsetError=!this._hasBeenBlurred||a}else if(f)c=this.getPromptMessage(a);this.set("message",c);return e},displayMessage:function(a){d.hideTooltip(this.domNode);a&&this._focused&&d.showTooltip(a,this.domNode,this.tooltipPosition,!this.isLeftToRight())},_refreshState:function(){this.validate(this._focused);
this.inherited(arguments)},constructor:function(){this.constraints={}},_setConstraintsAttr:function(a){if(!a.locale&&this.lang)a.locale=this.lang;this._set("constraints",a);this._computePartialRE()},_computePartialRE:function(){var a=this.regExpGen(this.constraints);this.regExp=a;var c="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(f){switch(f.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=f;break;case ")":c+="|$)";break;
default:c+="(?:"+f+"|$)";break}});try{"".search(c)}catch(e){c=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+c+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=b.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(){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);d.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");
this.inherited(arguments)}});b.declare("dijit.form.MappedTextBox",d.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(a){return a.toString?a.toString():""},toString:function(){var a=this.filter(this.get("value"));return a!=null?typeof a=="string"?a:this.serialize(a,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);
this.valueNode=b.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});b.declare("dijit.form.RangeBoundTextBox",d.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,c){return("min"in c?this.compare(a,c.min)>=0:true)&&("max"in c?this.compare(a,c.max)<=0:true)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=
this.get("value"),c=false,e=false;if("min"in this.constraints){c=this.constraints.min;c=this.compare(a,typeof c=="number"&&c>=0&&a!=0?0:c);c=typeof c=="number"&&c<0}if("max"in this.constraints){e=this.constraints.max;e=this.compare(a,typeof e!="number"||e>0?e:0);e=typeof e=="number"&&e>0}return c||e},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(a){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||
this.isInRange(a))},getErrorMessage:function(a){var c=this.get("value");if(c!==null&&c!==""&&c!==undefined&&(typeof c!="number"||!isNaN(c))&&!this.isInRange(a))return this.rangeMessage;return this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},_setConstraintsAttr:function(){this.inherited(arguments);if(this.focusNode){this.constraints.min!==
undefined?d.setWaiState(this.focusNode,"valuemin",this.constraints.min):d.removeWaiState(this.focusNode,"valuemin");this.constraints.max!==undefined?d.setWaiState(this.focusNode,"valuemax",this.constraints.max):d.removeWaiState(this.focusNode,"valuemax")}},_setValueAttr:function(a){d.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return d.form.ValidationTextBox});
define("orion/util",["dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(b,d){function a(u){D=u}function c(){return D}function e(u){var w="",z=navigator.platform.indexOf("Mac")!==-1;if(u.mod1)w+=z?"Cmd+":"Ctrl+";if(u.mod2)w+="Shift+";if(u.mod3)w+="Alt+";if(u.alphaKey)return w+u.alphaKey;for(var x in b.keys)if(typeof(b.keys[x]==="number"))if(b.keys[x]===u.keyCode)return w+x;var E;switch(u.keyCode){case 59:E=u.mod2?":":";";break;case 61:E=u.mod2?"+":"=";break;case 188:E=u.mod2?"<":",";
break;case 190:E=u.mod2?">":".";break;case 191:E=u.mod2?"?":"/";break;case 192:E=u.mod2?"~":"`";break;case 219:E=u.mod2?"{":"[";break;case 220:E=u.mod2?"|":"\\";break;case 221:E=u.mod2?"}":"]";break;case 222:E=u.mod2?'"':"'";break}if(E)return w+E;return w+String.fromCharCode(u.keyCode)}function f(u,w){u.startup();if(typeof w==="string"){var z=b.byId(w);if(!z)if(z=d.byId(w))z=z.domNode;w=z?z:null}if(w){w=b.position(w);u._setStyleAttr("left:"+(w.x+16)+"px !important;");u._setStyleAttr("top:"+(w.y+16)+
"px !important;")}u.show()}function h(u,w,z,x,E,F,K,J,L){K=function(Q){return function(N){var S=d.byId(u),X=S.get("value");if(Q&&N.keyCode===b.keys.ESCAPE){z&&b.style(w,"display","inline");S.destroyRecursive();F&&F()}else if(!(Q&&N.keyCode!==b.keys.ENTER)){if(!S.isValid()||!L&&X===x)z&&b.style(w,"display","inline");else E(X);S.destroyRecursive();F&&F()}}};var M=new d.form.ValidationTextBox({id:u,required:true,value:x||""});b.place(M.domNode,w,"after");b.addClass(M.domNode,"userEditBoxPrompt");z&&
b.style(w,"display","none");b.connect(M,"onKeyDown",K(true));b.connect(M,"onBlur",K(false));window.setTimeout(function(){M.focus();if(x){var Q=b.byId(u),N=J?x.indexOf(J):-1;N>0?d.selectInputText(Q,0,N):Q.select()}},0)}function k(u){var w=window.navigator.platform.indexOf("Mac")!==-1;return w&&u.metaKey||!w&&u.ctrlKey}function j(u,w){if(w&&k(w))window.open(u);else window.location=u}function g(u){if(!u)return u;var w=window.location.href.split("#")[0];w=w.substring(0,w.length-window.location.pathname.length);
if(u.indexOf(w)===0)return u.substring(w.length);return u}function i(u){var w,z,x,E,F;u=u.split("#");var K=u[u.length-1].split(/\?(?=(?:line|char))/);u=g(K[0]);if(K.length>1){K=K[1].split(/\&(?=(?:line|char))/);for(var J=0;J<K.length;J++){var L=K[J].split("=");if(L.length>1)switch(L[0]){case "char":L=L[1].split(",");if(x===undefined){w=window.parseInt(L[0]);if(L.length>1)z=window.parseInt(L[1])}else{E=window.parseInt(L[0]);if(L.length>1)F=window.parseInt(L[1])}break;case "line":L=L[1].split(",");
x=window.parseInt(L[0]);break;default:break}}}return{filePath:u,start:w,end:z,line:x,offset:E,length:F}}function l(u,w,z,x,E,F){if(typeof w==="number"){u="#"+u+"?char="+w;if(typeof z==="number")u=u+","+z;else if(typeof F==="number")u=u+","+(w+F);return u}if(typeof x==="number"){u="#"+u+"?line="+x;if(typeof E==="number"){u=u+"&char="+E;if(typeof F==="number")u=u+","+(E+F)}return u}return"#"+u}function o(u){if(!u)return u;var w=window.location.href.split("#")[0];return w.substring(0,w.length-window.location.pathname.length)+
u}function n(u){return this.makeRelative(u).indexOf("/workspace")===0}function m(u,w){u.children=w;for(var z in w)w[z].parent=u;u.children.sort(function(x,E){var F=x.Directory;if(F!==E.Directory)return F?-1:1;x=x.Name&&x.Name.toLowerCase();E=E.Name&&E.Name.toLowerCase();if(x<E)return-1;if(x>E)return 1;return 0})}function p(u){u.children.sort(function(w,z){var x=w.type==="dir";if(x!==(z.type==="dir"))return x?-1:1;w=w.name&&w.name.toLowerCase();z=z.name&&z.name.toLowerCase();if(w<z)return-1;if(w>z)return 1;
return 0})}function s(u,w){u.Parents&&u.Parents.length===0&&w.getService("orion.core.preference").then(function(z){return z.getPreferences("/window/recent")}).then(function(z){var x=z.get("projects");if(typeof x==="string")x=JSON.parse(x);var E=[];if(x&&x.length&&x.length>0)for(var F=0;F<x.length;F++)x[F].location!==u.ChildrenLocation&&x[F].name!==u.Name&&E.push(x[F]);E.push({name:u.Name,location:u.ChildrenLocation});if(E.length>5)E=E.slice(-5,E.length);z.put("projects",E)})}function q(u){return typeof u.textContent!==
"undefined"?u.textContent:u.innerText}function t(u){return q(document.createTextNode(u))}function C(u,w){if(typeof u.textContent!=="undefined")u.textContent=w;else u.innerText=w}var D=null;return{setUserName:a,getUserName:c,getUserKeyString:e,openDialog:f,getUserText:h,openInNewWindow:k,followLink:j,getPositionInfo:i,hashFromPosition:l,makeRelative:g,makeFullPath:o,isAtRoot:n,processNavigatorParent:m,processSearchResultParent:p,rememberSuccessfulTraversal:s,getText:q,safeText:t,setText:C}});
define("text!dijit/templates/Menu.html",function(){return'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>\n</table>'});
define("dijit/_Container",["dojo","dijit"],function(b,d){b.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,c){var e=this.containerNode;if(c&&typeof c=="number"){var f=this.getChildren();if(f&&f.length>=c){e=f[c-1].domNode;c="after"}}b.place(a.domNode,e,c);this._started&&!a._started&&a.startup()},removeChild:function(a){if(typeof a=="number")a=this.getChildren()[a];if(a)(a=
a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},hasChildren:function(){return this.getChildren().length>0},destroyDescendants:function(a){b.forEach(this.getChildren(),function(c){c.destroyRecursive(a)})},_getSiblingOfChild:function(a,c){a=a.domNode;c=c>0?"nextSibling":"previousSibling";do a=a[c];while(a&&(a.nodeType!=1||!d.byNode(a)));return a&&d.byNode(a)},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){b.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return d._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,d){b.declare("dijit._KeyNavContainer",d._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,c){var e=this._keyNavCodes={},f=b.hitch(this,this.focusPrev),h=b.hitch(this,this.focusNext);b.forEach(a,function(k){e[k]=f});b.forEach(c,function(k){e[k]=h});e[b.keys.HOME]=b.hitch(this,"focusFirstChild");e[b.keys.END]=b.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){b.forEach(this.getChildren(),b.hitch(this,"_startupChild"))},addChild:function(a){d._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(a)},focus:function(){this.focusFirstChild()},focusFirstChild:function(){var a=this._getFirstFocusableChild();a&&this.focusChild(a)},focusLastChild:function(){var a=this._getLastFocusableChild();a&&this.focusChild(a)},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,
1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),true)},focusChild:function(a,c){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(c?"end":"start");this._set("focusedChild",a)},_startupChild:function(a){a.set("tabIndex","-1");this.connect(a,"_onFocus",function(){a.set("tabIndex",this.tabIndex)});this.connect(a,"_onBlur",function(){a.set("tabIndex","-1")})},_onContainerFocus:function(a){if(a.target===
this.domNode){this.focusFirstChild();b.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&b.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var c=this._keyNavCodes[a.charOrCode];if(c){c();b.stopEvent(a)}}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
c){if(a)a=this._getSiblingOfChild(a,c);for(var e=this.getChildren(),f=0;f<e.length;f++){a||(a=e[c>0?0:e.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,c)}return null}});return d._KeyNavContainer});define("text!dijit/templates/MenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitem" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div dojoAttachPoint="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>'});
define("dijit/_Contained",["dojo","dijit"],function(b,d){b.declare("dijit._Contained",null,{getParent:function(){var a=d.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var c=this.domNode;do c=c[a+"Sibling"];while(c&&c.nodeType!=1);return c&&d.byNode(c)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();if(!a||!a.getIndexOfChild)return-1;
return a.getIndexOfChild(this)}});return d._Contained});
define("dijit/MenuItem",["dojo","dijit","text!dijit/templates/MenuItem.html","dijit/_Widget","dijit/_Templated","dijit/_Contained","dijit/_CssStateMixin"],function(b,d){b.declare("dijit.MenuItem",[d._Widget,d._Templated,d._Contained,d._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.delegate(d._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:false,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";b.attr(this.containerNode,"id",a);if(this.accelKeyNode){b.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}d.setWaiState(this.domNode,"labelledby",a);b.setSelectable(this.domNode,false)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",false)},_onClick:function(a){this.getParent().onItemClick(this,a);b.stopEvent(a)},onClick:function(){},focus:function(){try{b.isIE==8&&this.containerNode.focus();d.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){b.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){b.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){b.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){d.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;b.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return d.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,d){b.declare("dijit.PopupMenuItem",d.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.query("*",this.srcNodeRef);d.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.popup=d.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.style(this.arrowWrapper,"visibility","");d.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){if(this.popup){this.popup._destroyed||this.popup.destroyRecursive();delete this.popup}this.inherited(arguments)}});return d.PopupMenuItem});define("text!dijit/templates/CheckedMenuItem.html",function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitemcheckbox" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&nbsp;</td>\n</tr>'});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(b,d){b.declare("dijit.CheckedMenuItem",d.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){b.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);d.setWaiState(this.domNode,"checked",a);this._set("checked",a)},onChange:function(){},_onClick:function(){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked)}this.inherited(arguments)}});
return d.CheckedMenuItem});define("text!dijit/templates/MenuSeparator.html",function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator",["dojo","dijit","text!dijit/templates/MenuSeparator.html","dijit/_Widget","dijit/_Templated","dijit/_Contained"],function(b,d){b.declare("dijit.MenuSeparator",[d._Widget,d._Templated,d._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.setSelectable(this.domNode,false)},isFocusable:function(){return false}});return d.MenuSeparator});
define("dijit/Menu",["dojo","dijit","text!dijit/templates/Menu.html","dojo/window","dijit/_Widget","dijit/_KeyNavContainer","dijit/_Templated","dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"],function(b,d){b.declare("dijit._MenuBase",[d._Widget,d._Templated,d._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){b.forEach(this.getChildren(),function(a){a.startup()});this.startupKeyNavChildren();this.inherited(arguments)}},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.focusedChild._onClick(a);else(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(false);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup)}},
onItemHover:function(a){if(this.isActive){this.focusChild(a);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer)this.hover_timer=setTimeout(b.hitch(this,"_openPopup"),this.popupDelay)}this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(false);var c=a.popup;if(c){this._stopPendingCloseTimer(c);c._pendingClose_timer=setTimeout(function(){c._pendingClose_timer=null;if(c.parentMenu)c.parentMenu.currentPopup=
null;d.popup.close(c)},this.popupDelay)}},onItemUnhover:function(a){this.isActive&&this._stopPopupTimer();if(this._hoveredChild==a)this._hoveredChild=null},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null}},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer){clearTimeout(a._pendingClose_timer);a._pendingClose_timer=null}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null}},_getTopMenu:function(){for(var a=
this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,c){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return false;if(a.popup)this._openPopup();else{this.onExecute();a.onClick(c)}},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var c=a.popup;if(!c.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);d.popup.close(this.currentPopup)}c.parentMenu=this;c.from_item=a;var e=this;d.popup.open({parent:this,
popup:c,around:a.domNode,orient:this._orient||(this.isLeftToRight()?{TR:"TL",TL:"TR",BR:"BL",BL:"BR"}:{TL:"TR",TR:"TL",BL:"BR",BR:"BL"}),onCancel:function(){e.focusChild(a);e._cleanUp();a._setSelected(true);e.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=c;c.connect(c.domNode,"onmouseenter",b.hitch(e,"_onPopupHover"));if(c.focus)c._focus_timer=setTimeout(b.hitch(c,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;b.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;b.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){d._curFocus&&b.isDescendant(d._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus();d.popup.close(this.currentPopup);
this.currentPopup=null}if(this.focusedChild){this.focusedChild._setSelected(false);this.focusedChild._onUnhover();this.focusedChild=null}},_onItemFocus:function(a){this._hoveredChild&&this._hoveredChild!=a&&this._hoveredChild._onUnhover()},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();typeof this.isShowingNow=="undefined"&&this._markInactive()}});b.declare("dijit.Menu",d._MenuBase,{constructor:function(){this._bindings=[]},templateString:b.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(b.body()):b.forEach(this.targetNodeIds,this.bindDomNode,this);var a=b.keys,c=this.isLeftToRight();this._openSubMenuKey=c?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=c?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!(a.ctrlKey||a.altKey))switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);
b.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else b.stopEvent(a);break}},_iframeContentWindow:function(a){return b.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&b.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&b.doc.frames[a.name]&&b.doc.frames[a.name].document||
null},bindDomNode:function(a){a=b.byId(a);var c;if(a.tagName.toLowerCase()=="iframe"){var e=a,f=this._iframeContentWindow(e);c=b.withGlobal(f,b.body)}else c=a==b.body()?b.doc.documentElement:a;var h={node:a,iframe:e};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(h));var k=b.hitch(this,function(j){return[b.connect(j,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(g){b.stopEvent(g);this._scheduleOpen(g.target,e,{x:g.pageX,y:g.pageY})}),b.connect(j,"onkeydown",this,function(g){if(g.shiftKey&&
g.keyCode==b.keys.F10){b.stopEvent(g);this._scheduleOpen(g.target,e)}})]});h.connects=c?k(c):[];if(e){h.onloadHandler=b.hitch(this,function(){var j=this._iframeContentWindow(e);c=b.withGlobal(j,b.body);h.connects=k(c)});e.addEventListener?e.addEventListener("load",h.onloadHandler,false):e.attachEvent("onload",h.onloadHandler)}},unBindDomNode:function(a){var c;try{c=b.byId(a)}catch(e){return}a="_dijitMenu"+this.id;if(c&&b.hasAttr(c,a)){var f=b.attr(c,a)-1,h=this._bindings[f];b.forEach(h.connects,b.disconnect);
var k=h.iframe;if(k)k.removeEventListener?k.removeEventListener("load",h.onloadHandler,false):k.detachEvent("onload",h.onloadHandler);b.removeAttr(c,a);delete this._bindings[f]}},_scheduleOpen:function(a,c,e){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:c,coords:e})}),1)},_openMyself:function(a){function c(){i.refocus&&d.focus(l);d.popup.close(i)}var e=a.target,f=a.iframe;if(a=a.coords){if(f){e=b.position(f,true);var h=
this._iframeContentWindow(f);h=b.withGlobal(h,"_docScroll",b);var k=b.getComputedStyle(f),j=b._toPixelValue,g=(b.isIE&&b.isQuirks?0:j(f,k.paddingLeft))+(b.isIE&&b.isQuirks?j(f,k.borderLeftWidth):0);f=(b.isIE&&b.isQuirks?0:j(f,k.paddingTop))+(b.isIE&&b.isQuirks?j(f,k.borderTopWidth):0);a.x+=e.x+g-h.x;a.y+=e.y+f-h.y}}else{a=b.position(e,true);a.x+=10;a.y+=10}var i=this,l=d.getFocus(this);d.popup.open({popup:this,x:a.x,y:a.y,onExecute:c,onCancel:c,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=
function(){this.inherited("_onBlur",arguments);d.popup.close(this)}},uninitialize:function(){b.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return d.Menu});define("text!dijit/form/templates/Button.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/DropDownButton.html",function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdojoAttachPoint="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdojoAttachPoint="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/ComboButton.html",function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tcellspacing=\'0\' cellpadding=\'0\' role="presentation"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonNode" dojoAttachPoint="buttonNode" dojoAttachEvent="ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress"\n\t\t><div id="${id}_button" class="dijitReset dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><div class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitInline dijitButtonText" id="${id}_label" dojoAttachPoint="containerNode" role="presentation"></div\n\t\t></div\n\t\t></td\n\t\t><td id="${id}_arrow" class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdojoAttachPoint="_popupStateNode,focusNode,_buttonNode"\n\t\t\tdojoAttachEvent="onkeypress:_onArrowKeyPress"\n\t\t\ttitle="${optionsTitle}"\n\t\t\trole="button" aria-haspopup="true"\n\t\t\t><div class="dijitReset dijitArrowButtonInner" role="presentation"></div\n\t\t\t><div class="dijitReset dijitArrowButtonChar" role="presentation">&#9660;</div\n\t\t></td\n\t\t><td style="display:none !important;"\n\t\t\t><input ${!nameAttrSetting} type="${type}" value="${value}" dojoAttachPoint="valueNode"\n\t\t/></td></tr></tbody\n></table>'});
define("dijit/_HasDropDown",["dojo","dijit","dijit/_Widget"],function(b,d){b.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(a){if(!(this.disabled||this.readOnly)){b.stopEvent(a);this._docHandler=this.connect(b.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown()}},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var c=this.dropDown,e=false;if(a&&this._opened){var f=b.position(this._buttonNode,true);if(!(a.pageX>=f.x&&a.pageX<=f.x+f.w)||!(a.pageY>=f.y&&a.pageY<=f.y+f.h)){for(f=a.target;f&&!e;)if(b.hasClass(f,"dijitPopup"))e=true;else f=f.parentNode;if(e){f=a.target;if(c.onItemClick){for(var h;f&&!(h=d.byNode(f));)f=f.parentNode;h&&h.onClick&&h.getParent&&h.getParent().onItemClick(h,a)}return}}}this._opened&&c.focus&&c.autoFocus!==false&&window.setTimeout(b.hitch(c,
"focus"),1)},_onDropDownClick:function(a){this._stopClickEvents&&b.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={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";b.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"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){this.dropDown._destroyed||this.dropDown.destroyRecursive();delete this.dropDown}this.inherited(arguments)},_onKey:function(a){if(!(this.disabled||
this.readOnly)){var c=this.dropDown,e=a.target;if(c&&this._opened&&c.handleKey)if(c.handleKey(a)===false){b.stopEvent(a);return}if(c&&this._opened&&a.charOrCode==b.keys.ESCAPE){this.closeDropDown();b.stopEvent(a)}else if(!this._opened&&(a.charOrCode==b.keys.DOWN_ARROW||(a.charOrCode==b.keys.ENTER||a.charOrCode==" ")&&((e.tagName||"").toLowerCase()!=="input"||e.type&&e.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;b.stopEvent(a)}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(d._curFocus&&this.dropDown&&b.isDescendant(d._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return true},loadDropDown:function(a){a()},toggleDropDown:function(){if(!(this.disabled||this.readOnly))if(this._opened)this.closeDropDown();else this.isLoaded()?this.openDropDown():this.loadDropDown(b.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,c=a.domNode,e=this._aroundNode||this.domNode,f=this;if(!this._preparedNode){this._preparedNode=true;if(c.style.width)this._explicitDDWidth=true;if(c.style.height)this._explicitDDHeight=true}if(this.maxHeight||this.forceWidth||this.autoWidth){var h={display:"",visibility:"hidden"};if(!this._explicitDDWidth)h.width="";if(!this._explicitDDHeight)h.height="";b.style(c,h);h=this.maxHeight;if(h==-1){h=b.window.getBox();var k=b.position(e,false);h=Math.floor(Math.max(k.y,h.h-(k.y+k.h)))}a.startup&&
!a._started&&a.startup();d.popup.moveOffScreen(a);k=b._getMarginSize(c);var j=h&&k.h>h;b.style(c,{overflowX:"hidden",overflowY:j?"auto":"hidden"});if(j){k.h=h;if("w"in k)k.w+=16}else delete k.h;if(this.forceWidth)k.w=e.offsetWidth;else if(this.autoWidth)k.w=Math.max(k.w,e.offsetWidth);else delete k.w;b.isFunction(a.resize)?a.resize(k):b.marginBox(c,k)}a=d.popup.open({parent:this,popup:a,around:e,orient:d.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){f.closeDropDown(true)},onCancel:function(){f.closeDropDown(true)},onClose:function(){b.attr(f._popupStateNode,"popupActive",false);b.removeClass(f._popupStateNode,"dijitHasDropDownOpen");f._opened=false}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(f._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return a},closeDropDown:function(a){if(this._opened){a&&this.focus();d.popup.close(this.dropDown);this._opened=false}}});
return d._HasDropDown});
define("dijit/form/Button",["dojo","dijit","text!dijit/form/templates/Button.html","text!dijit/form/templates/DropDownButton.html","text!dijit/form/templates/ComboButton.html","dijit/form/_FormWidget","dijit/_Container","dijit/_HasDropDown"],function(b,d){b.declare("dijit.form.Button",d.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,{value:"valueNode"}),
_onClick:function(a){if(this.disabled)return false;this._clicked();return this.onClick(a)},_onButtonClick:function(a){if(this._onClick(a)===false)a.preventDefault();else if(this.type=="submit"&&!(this.valueNode||this.focusNode).form)for(var c=this.domNode;c.parentNode;c=c.parentNode){var e=d.byNode(c);if(e&&typeof e._onSubmit=="function"){e._onSubmit(a);break}}else if(this.valueNode){this.valueNode.click();a.preventDefault()}},buildRendering:function(){this.inherited(arguments);b.setSelectable(this.focusNode,
false)},_fillContent:function(a){if(a&&(!this.params||!("label"in this.params)))this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&b.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return true},_clicked:function(){},setLabel:function(a){b.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==false&&!this.params.title)this.titleNode.title=b.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){b.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});b.declare("dijit.form.DropDownButton",[d.form.Button,d._Container,d._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.query("*",this.srcNodeRef);d.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=d.byNode(a);delete this.dropDownContainer}this.dropDown&&d.popup.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(){var a=this.dropDown;
if(a)if(this.isLoaded())this.openDropDown();else{var c=b.connect(a,"onLoad",this,function(){b.disconnect(c);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});b.declare("dijit.form.ComboButton",d.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.clone(d.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",
cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){d.focus(this._popupStateNode);b.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){d.focus(this.titleNode);b.stopEvent(a)}},focus:function(a){this.disabled||d.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",d.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:b.mixin(b.clone(d.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,c){this._set("checked",a);b.attr(this.focusNode||this.domNode,"checked",a);d.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,c)},setChecked:function(a){b.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false)}});return d.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(b,d){return d.form.DropDownButton});
define("orion/commands",["require","dojo","dijit","orion/util","dijit/Menu","dijit/form/DropDownButton","dijit/MenuItem","dijit/PopupMenuItem","dijit/MenuSeparator","dijit/Tooltip"],function(b,d,a,c){function e(g){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups={};this._activeBindings={};this._init(g)}function f(g){this._init(g)}function h(g,i,l,o,n){this.keyCode=typeof g==="string"?g.toUpperCase().charCodeAt(0):g;this.mod1=i!==undefined&&i!==null?i:false;this.mod2=l!==
undefined&&l!==null?l:false;this.mod3=o!==undefined&&o!==null?o:false;this.mod4=n!==undefined&&n!==null?n:false}var k=d.declare(a.MenuItem,{_onClick:function(){this.hrefCallback||this.inherited(arguments)}});e.prototype={_init:function(g){this._registry=g.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=g.selection;d.connect(window.document,"onkeydown",d.hitch(this,function(i){i=i||window.event;var l=i.target.nodeName.toLowerCase();
if(l==="input")switch(i.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(l==="textarea")return;this._processKey(i)}))},_processKey:function(g){function i(m){if(window.document.all)m.keyCode=0;else{m.preventDefault();m.stopPropagation()}}for(var l in this._activeBindings)if(this._activeBindings[l]&&this._activeBindings[l].keyBinding&&
this._activeBindings[l].command)if(this._activeBindings[l].keyBinding.match(g)){var o=this._activeBindings[l],n=o.command;if(n.hrefCallback){i(g);g=n.hrefCallback.call(o.handler||window,o.items,l,o.userData);g.then?g.then(function(m){window.open(m)}):window.open(g);return}else if(n.callback){i(g);window.setTimeout(function(){n.callback.call(o.handler||window,o.items,l,null,o.userData)},0);return}}},getSelectionService:function(){return this._selection},showKeyBindings:function(g){for(var i in this._activeBindings)this._activeBindings[i]&&
this._activeBindings[i].keyBinding&&this._activeBindings[i].command&&d.place("<span>"+c.getUserKeyString(this._activeBindings[i].keyBinding)+" = "+this._activeBindings[i].command.name+"<br></span>",g,"last")},addCommand:function(g,i){switch(i){case "dom":this._domScope[g.id]=g;break;case "object":this._objectScope[g.id]=g;break;case "global":this._globalScope[g.id]=g;break;default:throw"unrecognized command scope "+i;}},addCommandGroup:function(g,i,l,o,n){var m=this._namedGroups;if(o)m=this._createEntryForPath(o);
if(m[g]){if(l)m[g].title=l;if(i)m[g].position=i;if(n)m[g].scopeId=n}else{m[g]={title:l,position:i,children:{},scopeId:n};m.sortedCommands=null}},_createEntryForPath:function(g){var i=this._namedGroups;if(g){g=g.split("/");for(var l=0;l<g.length;l++)if(g[l].length>1){i[g[l]]||(i[g[l]]={position:0,children:{}});i=i[g[l]].children}}return i},registerCommandContribution:function(g,i,l,o,n,m){o=this._createEntryForPath(o);o[g]={scopeId:l,position:i};if(n)if(i=this._domScope[g]||this._globalScope[g])this._activeBindings[g]=
{command:i,keyBinding:n,keyOnly:m};o.sortedCommands=null},_isLastChildSeparator:function(g,i){if(i==="image")return g.childNodes.length>0&&d.hasClass(g.childNodes[g.childNodes.length-1],"commandSeparator");if(i==="menu"){g=g.getChildren();return g.length>0&&g[g.length-1]instanceof a.MenuSeparator}return false},renderCommands:function(g,i,l,o,n,m,p,s,q,t){if(typeof g==="string")g=d.byId(g);if(l){var C;if(i==="object")C=this._objectScope;else if(i==="dom")C=this._domScope;else if(i==="global")C=this._globalScope;
else throw"Unrecognized command scope "+i;this._render(this._namedGroups,g,i,l,o,n,m,p,C,s,q,t);if(n==="image")this._isLastChildSeparator(g,n)&&g.removeChild(g.childNodes[g.childNodes.length-1]);else if(n==="menu")if(this._isLastChildSeparator(g,n)){l=g.getChildren()[g.getChildren().length-1];g.removeChild(l);l.destroy()}}else{var D=this;this._selection&&this._selection.getSelections(function(u){D.renderCommands(g,i,u,o,n,m,p,s,q,t)})}},_render:function(g,i,l,o,n,m,p,s,q,t,C,D){var u=g.sortedCommands;
if(!u){u=[];for(var w in g){var z=g[w];if(z&&typeof z.position==="number"){z.id=w;u.push(z)}}u.sort(function(J,L){return J.position-L.position});g.sortedCommands=u}for(g=0;g<u.length;g++){var x;if(u[g].children){w=u[g];if(!(w.scopeId&&i.id!==w.scopeId)){var E;if(m==="image")if(w.title){z=new a.Menu({style:"display: none;"});z.eclipseScopeId=i.eclipseScopeId||i.id;this._render(u[g].children,z,l,o,n,"menu",p,s,q,t,C,D);E=z.getChildren();if(this._isLastChildSeparator(z,"menu")){x=E[E.length-1];z.removeChild(x);
x.destroy();E=z.getChildren()}if(E.length>0){x=E[0].eclipseCommand;if(E.length>1){x=new a.form.DropDownButton({label:w.title,dropDown:z});d.addClass(x.domNode,"commandLink");p&&d.addClass(x.domNode,p);d.place(x.domNode,i,"last")}else{z="image"+x.id+g;w=x._asImage(z,o,n,s,p,t,C,D);d.place(w,i,"last")}}}else{var F;if(i.childNodes.length>0&&!this._isLastChildSeparator(i,m))F=this.generateSeparatorImage(i);this._render(u[g].children,i,l,o,n,m,p,s,q,t,C,D);if(i.childNodes.length>0)if(i.childNodes[i.childNodes.length-
1]!==F)F=this.generateSeparatorImage(i)}else if(w.title){z=new a.Menu;this._render(u[g].children,z,l,o,n,m,p,s,q,t,C,D);z.getChildren().length>0&&i.addChild(new a.PopupMenuItem({label:w.title,popup:z}))}else{var K;if(i.getChildren().length>0&&!this._isLastChildSeparator(i,m)){K=new a.MenuSeparator;i.addChild(K)}this._render(u[g].children,i,l,o,n,m,p,s,q,t,C,D);w=i.getChildren();if(w[w.length-1]!==K){K=new a.MenuSeparator;i.addChild(K)}}}}else{z=(w=q[u[g].id])?true:false;if(w){if(l==="dom")z=m==="image"?
i.id===u[g].scopeId:m==="menu"?i.eclipseScopeId===u[g].scopeId:false;if(this._activeBindings[w.id]&&this._activeBindings[w.id].keyBinding){x=this._activeBindings[w.id];x.items=o;x.userData=s;x.handler=n;if(x.keyOnly)z=false}if(z&&w.visibleWhen)z=w.visibleWhen(o)}if(z)if(w.choiceCallback){z=new a.Menu({style:"display: none;"});if(m==="image"){x=new a.form.DropDownButton({label:w.name,dropDown:z});if(w.image){d.addClass(x.iconNode,"commandImage");p&&d.addClass(x.iconNode,p);x.iconNode.src=w.image}d.place(x.domNode,
i,"last");x.eclipseCommand=w;x.eclipseChoices=z;d.connect(x,"onClick",x,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,o,n,s)})}else if(m==="menu"){x=new a.PopupMenuItem({label:w.name,popup:z});i.addChild(x);x.eclipseCommand=w;x.eclipseChoices=z;d.connect(i,"_openPopup",x,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,o,n,s)})}}else if(m==="image"){z="image"+w.id+g;w=w._asImage(z,o,n,s,p,t,C,D);d.place(w,i,"last")}else m==="menu"&&w._addMenuItem(i,o,
n,s,p)}}},generateSeparatorImage:function(g){g=d.create("span",null,g,"last");d.addClass(g,"core-sprite-sep");d.addClass(g,"commandImage");d.addClass(g,"commandSprite");d.addClass(g,"commandSeparator");return g}};e.prototype.constructor=e;f.prototype={_init:function(g){this.id=g.id;this.name=g.name||"Empty Command";this.tooltip=g.tooltip||g.name;this.callback=g.callback;this.hrefCallback=g.hrefCallback;this.choiceCallback=g.choiceCallback;this.image=g.image||b.toUrl("images/none.png");this.imageClass=
g.imageClass;this.spriteClass=g.spriteClass||"commandSprite";this.visibleWhen=g.visibleWhen;this._deviceSupportsHover=false},_asImage:function(g,i,l,o,n,m,p,s){l=l||this;var q=d.create("a");q.id=this.name+"link";var t=null;if(this.tooltip)q.title=this.tooltip;if(m||!this.hasImage()){g=window.document.createTextNode(this.name);d.place(g,q,"last")}else{t=new Image;t.alt=this.name;t.title=this.tooltip||this.name;t.name=g;t.id=g}if(this.hrefCallback){g=this.hrefCallback.call(l,i,this.id,o);if(g.then)g.then(function(C){q.href=
C});else q.href=g}else if(this.callback)t?d.connect(t,"onclick",this,function(){this.callback.call(l,i,this.id,t.id,o)}):d.connect(q,"onclick",this,function(){this.callback.call(l,i,this.id,q.id,o)});if(t){if(this._deviceSupportsHover){t.src=b.toUrl("images/none.png");d.connect(t,"onmouseover",this,function(){t.src=this.image});d.connect(t,"onmouseout",this,function(){t.src=b.toUrl("images/none.png")})}else{t.src=this.image;d.connect(t,"onmouseover",this,function(){p?d.addClass(t,p):d.addClass(t,
"commandOver")});d.connect(t,"onmouseout",this,function(){t.src=this.image;p?d.removeClass(t,p):d.removeClass(t,"commandOver")})}d.addClass(t,"commandImage");n&&d.addClass(t,n);if(this.imageClass){d.addClass(t,this.spriteClass);d.addClass(t,this.imageClass)}d.place(t,q,"last")}s?d.addClass(q,s):d.addClass(q,"commandLink");n&&d.addClass(q,n);return q},_asLink:function(g,i,l){i=i||this;var o=window.document.createElement("a");if(this.tooltip)o.title=this.tooltip;d.place(window.document.createTextNode(this.name),
o,"only");o.href="";o.id=this.id+"link";if(this.callback)d.connect(o,"onclick",this,function(){this.callback.call(i,g,this.id,o.id)});else if(this.hrefCallback){var n=this.hrefCallback.call(i,g,this.id);if(n)if(n.then)n.then(function(m){o.href=m});else o.href=n}d.addClass(o,"commandLink");l&&d.addClass(o,l);return o},_addMenuItem:function(g,i,l,o,n){var m=new k({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:this.imageClass,hrefCallback:!!this.hrefCallback});this.tooltip&&new a.Tooltip({connectId:[m.domNode],
label:this.tooltip});if(this.hrefCallback){var p=this.hrefCallback.call(l,i,this.id,g.id,o);if(p)p.then?p.then(d.hitch(this,function(s){m.set("label","<a href='"+s+"'>"+this.name+"</a>")})):m.set("label","<a href='"+p+"'>"+this.name+"</a>")}else if(this.callback)m.onClick=d.hitch(this,function(){this.callback.call(l,i,this.id,null,o)});m.eclipseCommand=this;g.addChild(m);if(this.imageClass)d.addClass(m.iconNode,this.spriteClass);else if(this.image){d.addClass(m.iconNode,"commandImage");n&&d.addClass(m.iconNode,
n);m.iconNode.src=this.image}},populateChoicesMenu:function(g,i,l,o){g.focusedChild=null;d.forEach(g.getChildren(),function(p){g.removeChild(p);p.destroy()});l=this.getChoices(i,l,o);for(o=0;o<l.length;o++){var n=l[o],m;if(n.name){m=new a.MenuItem({label:n.name,iconClass:n.imageClass,onClick:this.makeChoiceCallback(n,i)});if(n.imageClass)d.addClass(m.iconNode,n.spriteClass||"commandSprite");else if(n.image){d.addClass(m.iconNode,"commandImage");m.iconNode.src=n.image}}else m=new a.MenuSeparator;g.addChild(m)}},
getChoices:function(g,i,l){if(this.choiceCallback)return this.choiceCallback.call(i,g,l);return null},makeChoiceCallback:function(g,i){return function(l){g.callback&&g.callback.call(g,i,l)}},hasImage:function(){return this.imageClass||this.image!==b.toUrl("images/none.png")}};f.prototype.constructor=f;var j=window.navigator.platform.indexOf("Mac")!==-1;h.prototype={match:function(g){if(this.keyCode===g.keyCode){if(this.mod1!==(j?g.metaKey:g.ctrlKey))return false;if(this.mod2!==g.shiftKey)return false;
if(this.mod3!==g.altKey)return false;if(j&&this.mod4!==g.ctrlKey)return false;return true}return false},equals:function(g){if(!g)return false;if(this.keyCode!==g.keyCode)return false;if(this.mod1!==g.mod1)return false;if(this.mod2!==g.mod2)return false;if(this.mod3!==g.mod3)return false;if(this.mod4!==g.mod4)return false;return true}};h.prototype.constructor=h;return{CommandService:e,CommandKeyBinding:h,Command:f,CommandMenuItem:k}});var orion=orion||{};orion.textview=orion.textview||{};
orion.textview.KeyBinding=function(){function b(a,c,e,f,h){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=c!==undefined&&c!==null?c:false;this.mod2=e!==undefined&&e!==null?e:false;this.mod3=f!==undefined&&f!==null?f:false;this.mod4=h!==undefined&&h!==null?h:false}var d=window.navigator.platform.indexOf("Mac")!==-1;b.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(d?a.metaKey:a.ctrlKey))return false;if(this.mod2!==a.shiftKey)return false;if(this.mod3!==
a.altKey)return false;if(d&&this.mod4!==a.ctrlKey)return false;return true}return false},equals:function(a){if(!a)return false;if(this.keyCode!==a.keyCode)return false;if(this.mod1!==a.mod1)return false;if(this.mod2!==a.mod2)return false;if(this.mod3!==a.mod3)return false;if(this.mod4!==a.mod4)return false;return true}};return b}();typeof window!=="undefined"&&typeof window.define!=="undefined"&&define("orion/textview/keyBinding",[],function(){return orion.textview});
define("text!dijit/templates/Dialog.html",function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(b){b.getObject("dnd",true,b);b.dnd.getCopyKeyState=b.isCopyKey;b.dnd._uniqueId=0;b.dnd.getUniqueId=function(){var d;do d=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(d));return d};b.dnd._empty={};b.dnd.isFormElement=function(d){d=d.target;if(d.nodeType==3)d=d.parentNode;return" button textarea input select option ".indexOf(" "+d.tagName.toLowerCase()+" ")>=0};return b.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(b){b.getObject("dnd",true,b);b.dnd.getViewport=b.window.getBox;b.dnd.V_TRIGGER_AUTOSCROLL=32;b.dnd.H_TRIGGER_AUTOSCROLL=32;b.dnd.V_AUTOSCROLL_VALUE=16;b.dnd.H_AUTOSCROLL_VALUE=16;b.dnd.autoScroll=function(d){var a=b.window.getBox(),c=0,e=0;if(d.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)c=-b.dnd.H_AUTOSCROLL_VALUE;else if(d.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)c=b.dnd.H_AUTOSCROLL_VALUE;if(d.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)e=-b.dnd.V_AUTOSCROLL_VALUE;
else if(d.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)e=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(c,e)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(d){for(var a=d.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in b.dnd._validNodes){var c=b.getComputedStyle(a);if(c.overflow.toLowerCase()in b.dnd._validOverflow){var e=b._getContentBox(a,c);c=b.position(a,true);var f=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,e.w/2),h=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
e.h/2),k=d.pageX-c.x,j=d.pageY-c.y,g=c=0;if(b.isWebKit||b.isOpera){k+=b.body().scrollLeft;j+=b.body().scrollTop}if(k>0&&k<e.w)if(k<f)c=-f;else if(k>e.w-f)c=f;if(j>0&&j<e.h)if(j<h)g=-h;else if(j>e.h-h)g=h;e=a.scrollLeft;f=a.scrollTop;a.scrollLeft+=c;a.scrollTop+=g;if(e!=a.scrollLeft||f!=a.scrollTop)return}}try{a=a.parentNode}catch(i){a=null}}b.dnd.autoScroll(d)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(d,a,c){this.node=b.byId(d);var e=a.touches?a.touches[0]:a;this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=a.button;a=this.host=c;d=d.ownerDocument;this.events=[b.connect(d,"onmousemove",this,"onFirstMove"),b.connect(d,"ontouchmove",this,"onFirstMove"),b.connect(d,"onmousemove",this,"onMouseMove"),b.connect(d,"ontouchmove",this,"onMouseMove"),b.connect(d,
"onmouseup",this,"onMouseUp"),b.connect(d,"ontouchend",this,"onMouseUp"),b.connect(d,"ondragstart",b.stopEvent),b.connect(d.body,"onselectstart",b.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(d){b.dnd.autoScroll(d);var a=this.marginBox,c=d.touches?d.touches[0]:d;this.host.onMove(this,{l:a.l+c.pageX,t:a.t+c.pageY},d);b.stopEvent(d)},onMouseUp:function(d){if(b.isWebKit&&b.isMac&&this.mouseButton==2?d.button==0:this.mouseButton==d.button)this.destroy();b.stopEvent(d)},onFirstMove:function(d){var a=
this.node.style,c,e=this.host;switch(a.position){case "relative":case "absolute":c=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=b.marginBox(this.node);c=b.doc.body;var f=b.getComputedStyle(c),h=b._getMarginBox(c,f);f=b._getContentBox(c,f);c=a.l-(f.l-h.l);a=a.t-(f.t-h.t);break}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;e&&e.onFirstMove&&e.onFirstMove(this,d);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var d=this.host;d&&d.onMoveStop&&d.onMoveStop(this);this.events=this.node=this.host=null}});return b.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(b){b.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.handle=a.handle?b.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:b.dnd.Mover;this.events=[b.connect(this.handle,"onmousedown",this,"onMouseDown"),b.connect(this.handle,"ontouchstart",this,"onMouseDown"),b.connect(this.handle,
"ondragstart",this,"onSelectStart"),b.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(d,a){return new b.dnd.Moveable(a,d)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(d){if(!(this.skip&&b.dnd.isFormElement(d))){if(this.delay){this.events.push(b.connect(this.handle,"onmousemove",this,"onMouseMove"),b.connect(this.handle,"ontouchmove",this,"onMouseMove"),b.connect(this.handle,"onmouseup",this,
"onMouseUp"),b.connect(this.handle,"ontouchend",this,"onMouseUp"));var a=d.touches?d.touches[0]:d;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(d);b.stopEvent(d)}},onMouseMove:function(d){var a=d.touches?d.touches[0]:d;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(d);this.onDragDetected(d)}b.stopEvent(d)},onMouseUp:function(d){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(d)},onSelectStart:function(d){if(!this.skip||
!b.dnd.isFormElement(d))b.stopEvent(d)},onDragDetected:function(d){new this.mover(this.node,d,this)},onMoveStart:function(d){b.publish("/dnd/move/start",[d]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(d){b.publish("/dnd/move/stop",[d]);b.removeClass(b.body(),"dojoMove");b.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(d,a){this.onMoving(d,a);var c=d.node.style;c.left=a.l+"px";c.top=a.t+"px";this.onMoved(d,a)},onMoving:function(){},
onMoved:function(){}});return b.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(b){b.declare("dojo.dnd.move.constrainedMoveable",b.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(d,a){return new b.dnd.move.constrainedMoveable(a,d)},constructor:function(d,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(d){var a=this.constraintBox=this.constraints.call(this,d);a.r=a.l+a.w;a.b=a.t+a.h;if(this.within){d=b._getMarginSize(d.node);a.r-=d.w;
a.b-=d.h}},onMove:function(d,a){var c=this.constraintBox,e=d.node.style;this.onMoving(d,a);a.l=a.l<c.l?c.l:c.r<a.l?c.r:a.l;a.t=a.t<c.t?c.t:c.b<a.t?c.b:a.t;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(d,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(d,a){return new b.dnd.move.boxConstrainedMoveable(a,d)},constructor:function(d,a){var c=a&&a.box;this.constraints=function(){return c}}});b.declare("dojo.dnd.move.parentConstrainedMoveable",
b.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(d,a){return new b.dnd.move.parentConstrainedMoveable(a,d)},constructor:function(d,a){var c=a&&a.area;this.constraints=function(){var e=this.node.parentNode,f=b.getComputedStyle(e),h=b._getMarginBox(e,f);if(c=="margin")return h;var k=b._getMarginExtents(e,f);h.l+=k.l;h.t+=k.t;h.w-=k.w;h.h-=k.h;if(c=="border")return h;k=b._getBorderExtents(e,f);h.l+=k.l;h.t+=k.t;h.w-=k.w;h.h-=k.h;if(c=="padding")return h;k=b._getPadExtents(e,f);h.l+=
k.l;h.t+=k.t;h.w-=k.w;h.h-=k.h;return h}}});b.dnd.constrainedMover=b.dnd.move.constrainedMover;b.dnd.boxConstrainedMover=b.dnd.move.boxConstrainedMover;b.dnd.parentConstrainedMover=b.dnd.move.parentConstrainedMover;return b.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(b){(function(){var d=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,c){c||(c={});if(c.timeout&&typeof c.timeout=="number"&&c.timeout>=0)this.timeout=c.timeout},markupFactory:function(a,c){return new b.dnd.TimedMoveable(c,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);d.call(this,a,a._leftTop)}b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,c){a._leftTop=c;if(!a._timer){var e=this;a._timer=setTimeout(function(){a._timer=null;d.call(e,a,a._leftTop)},this.timeout)}}})})();return b.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(b){b.declare("dojo.fx.Toggler",null,{node:null,showFunc:b.fadeIn,hideFunc:b.fadeOut,showDuration:200,hideDuration:200,constructor:function(d){var a=this;b.mixin(a,d);a.node=d.node;a._showArgs=b.mixin({},d);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=b.mixin({},d);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);b.connect(a.showAnim,"beforeBegin",b.hitch(a.hideAnim,
"stop",true));b.connect(a.hideAnim,"beforeBegin",b.hitch(a.showAnim,"stop",true))},show:function(d){return this.showAnim.play(d||0)},hide:function(d){return this.hideAnim.play(d||0)}});return b.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(b){(function(){var d={_fire:function(e,f){if(this[e])this[e].apply(this,f||[]);return this}},a=function(e){this._index=-1;this._animations=e||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;b.forEach(this._animations,function(f){this.duration+=f.duration;if(f.delay)this.duration+=f.delay},this)};b.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){b.disconnect(this._onAnimateCtx);b.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length)this._fire("onEnd");else{this._current=this._animations[++this._index];this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(e,f){if(!this._current)this._current=this._animations[this._index=0];if(!f&&this._current.status()=="playing")return this;var h=b.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),k=b.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),j=b.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);b.disconnect(h);b.disconnect(k);b.disconnect(j)});this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&b.disconnect(this._onEndCtx);this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,
arguments);return this},pause:function(){if(this._current){var e=b.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);b.disconnect(e)});this._current.pause()}return this},gotoPercent:function(e,f){this.pause();var h=this.duration*e;this._current=null;b.some(this._animations,function(k){if(k.duration<=h){this._current=k;return true}h-=k.duration;return false});this._current&&this._current.gotoPercent(h/this._current.duration,f);return this},stop:function(e){if(this._current){if(e){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(true);this._current=this._animations[this._index]}var f=b.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);b.disconnect(f)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onEndCtx&&b.disconnect(this._onEndCtx)}});b.extend(a,d);b.fx.chain=function(e){return new a(e)};
var c=function(e){this._animations=e||[];this._connects=[];this.duration=this._finished=0;b.forEach(e,function(h){var k=h.duration;if(h.delay)k+=h.delay;if(this.duration<k)this.duration=k;this._connects.push(b.connect(h,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new b.Animation({curve:[0,1],duration:this.duration});var f=this;b.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(h){f._connects.push(b.connect(f._pseudoAnimation,h,function(){f._fire(h,
arguments)}))})};b.extend(c,{_doAction:function(e,f){b.forEach(this._animations,function(h){h[e].apply(h,f)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(e,f){var h=this._pseudoAnimation;h[e].apply(h,f)},play:function(){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(e,f){var h=
this.duration*e;b.forEach(this._animations,function(k){k.gotoPercent(k.duration<h?1:h/k.duration,f)});this._call("gotoPercent",arguments);return this},stop:function(){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){b.forEach(this._connects,b.disconnect)}});b.extend(c,d);b.fx.combine=function(e){return new c(e)};b.fx.wipeIn=function(e){var f=e.node=b.byId(e.node),h=f.style,k;e=b.animateProperty(b.mixin({properties:{height:{start:function(){k=
h.overflow;h.overflow="hidden";if(h.visibility=="hidden"||h.display=="none"){h.height="1px";h.display="";h.visibility="";return 1}else{var j=b.style(f,"height");return Math.max(j,1)}},end:function(){return f.scrollHeight}}}},e));b.connect(e,"onEnd",function(){h.height="auto";h.overflow=k});return e};b.fx.wipeOut=function(e){var f=(e.node=b.byId(e.node)).style,h;e=b.animateProperty(b.mixin({properties:{height:{end:1}}},e));b.connect(e,"beforeBegin",function(){h=f.overflow;f.overflow="hidden";f.display=
""});b.connect(e,"onEnd",function(){f.overflow=h;f.height="auto";f.display="none"});return e};b.fx.slideTo=function(e){var f=null,h=null,k=function(j){return function(){var g=b.getComputedStyle(j),i=g.position;f=i=="absolute"?j.offsetTop:parseInt(g.top)||0;h=i=="absolute"?j.offsetLeft:parseInt(g.left)||0;if(i!="absolute"&&i!="relative"){g=b.position(j,true);f=g.y;h=g.x;j.style.position="absolute";j.style.top=f+"px";j.style.left=h+"px"}}}(e.node=b.byId(e.node));k();e=b.animateProperty(b.mixin({properties:{top:e.top||
0,left:e.left||0}},e));b.connect(e,"beforeBegin",e,k);return e}})();return b.fx});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,d){b.declare("dijit.form._FormMixin",null,{state:"",reset:function(){b.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return b.every(b.map(this.getDescendants(),function(c){c._hasBeenBlurred=true;var e=c.disabled||!c.validate||c.validate();if(!e&&!a){b.window.scrollIntoView(c.containerNode||c.domNode);c.focus();a=true}return e}),function(c){return c})},setValues:function(a){b.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var c={};b.forEach(this.getDescendants(),function(k){if(k.name)(c[k.name]||(c[k.name]=[])).push(k)});for(var e in c)if(c.hasOwnProperty(e)){var f=c[e],h=b.getObject(e,false,a);if(h!==undefined){b.isArray(h)||(h=[h]);if(typeof f[0].checked=="boolean")b.forEach(f,function(k){k.set("value",b.indexOf(h,k.value)!=-1)});else f[0].multiple?f[0].set("value",h):b.forEach(f,function(k,
j){k.set("value",h[j])})}}},getValues:function(){b.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this.getDescendants(),function(c){var e=c.name;if(!(!e||c.disabled)){var f=c.get("value");if(typeof c.checked=="boolean")if(/Radio/.test(c.declaredClass))if(f!==false)b.setObject(e,f,a);else{f=b.getObject(e,false,a);f===undefined&&b.setObject(e,null,a)}else{c=b.getObject(e,false,a);
if(!c){c=[];b.setObject(e,c,a)}f!==false&&c.push(f)}else{c=b.getObject(e,false,a);if(typeof c!="undefined")b.isArray(c)?c.push(f):b.setObject(e,[c,f],a);else b.setObject(e,f,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(c){return c.get("state")||""});return b.indexOf(a,"Error")>=0?"Error":b.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){b.forEach(this._childConnections||
[],b.hitch(this,"disconnect"));b.forEach(this._childWatches||[],function(a){a.unwatch()})},connectChildren:function(a){var c=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(k,j){c[k]=j}:b.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var e=this._childConnections=[],f=this._childWatches=[];b.forEach(b.filter(this._descendants,function(k){return k.validate}),function(k){b.forEach(["state","disabled"],function(j){f.push(k.watch(j,function(){c.set("state",
c._getState())}))})});var h=function(){c._onChangeDelayTimer&&clearTimeout(c._onChangeDelayTimer);c._onChangeDelayTimer=setTimeout(function(){delete c._onChangeDelayTimer;c._set("value",c.get("value"))},10)};b.forEach(b.filter(this._descendants,function(k){return k.onChange}),function(k){e.push(c.connect(k,"onChange",h));f.push(k.watch("disabled",h))})},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(a,c,e){this.onValidStateChange(e=="")})},destroy:function(){this.disconnectChildren();
this.inherited(arguments)}});return d.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,d){b.declare("dijit._DialogMixin",null,{attributeMap:d._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=d._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return d._DialogMixin});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,d){b.declare("dijit.DialogUnderlay",[d._Widget,d._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){b.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){b.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,c=this.domNode.style;c.display="none";var e=b.window.getBox();c.top=e.t+"px";c.left=e.l+"px";a.width=e.w+"px";a.height=e.h+"px";c.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new d.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return d.DialogUnderlay});
define("dijit/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,d){b.declare("dijit.layout._LayoutWidget",[d._Widget,d._Container,d._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!(a&&a.isLayoutContainer)){this.resize();this.connect(b.isIE?
this.domNode:b.global,"onresize",function(){this.resize()})}}},resize:function(a,c){var e=this.domNode;if(a){b.marginBox(e,a);if(a.t)e.style.top=a.t+"px";if(a.l)e.style.left=a.l+"px"}c=c||{};b.mixin(c,a||{});if(!("h"in c)||!("w"in c))c=b.mixin(b.marginBox(e),c);a=b.getComputedStyle(e);var f=b._getMarginExtents(e,a),h=b._getBorderExtents(e,a);c=this._borderBox={w:c.w-(f.w+h.w),h:c.h-(f.h+h.h)};f=b._getPadExtents(e,a);this._contentBox={l:b._toPixelValue(e,a.paddingLeft),t:b._toPixelValue(e,a.paddingTop),
w:c.w-f.w,h:c.h-f.h};this.layout()},layout:function(){},_setupChild:function(a){b.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){b.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});d.layout.marginBox2contentBox=function(a,c){var e=b.getComputedStyle(a),f=b._getMarginExtents(a,
e),h=b._getPadBorderExtents(a,e);return{l:b._toPixelValue(a,e.paddingLeft),t:b._toPixelValue(a,e.paddingTop),w:c.w-(f.w+h.w),h:c.h-(f.h+h.h)}};(function(){var a=function(e){return e.substring(0,1).toUpperCase()+e.substring(1)},c=function(e,f){var h=e.resize?e.resize(f):b.marginBox(e.domNode,f);if(h)b.mixin(e,h);else{b.mixin(e,b.marginBox(e.domNode));b.mixin(e,f)}};d.layout.layoutChildren=function(e,f,h,k,j){f=b.mixin({},f);b.addClass(e,"dijitLayoutContainer");h=b.filter(h,function(g){return g.region!=
"center"&&g.layoutAlign!="client"}).concat(b.filter(h,function(g){return g.region=="center"||g.layoutAlign=="client"}));b.forEach(h,function(g){var i=g.domNode,l=g.region||g.layoutAlign,o=i.style;o.left=f.l+"px";o.top=f.t+"px";o.position="absolute";b.addClass(i,"dijitAlign"+a(l));i={};if(k&&k==g.id)i[g.region=="top"||g.region=="bottom"?"h":"w"]=j;if(l=="top"||l=="bottom"){i.w=f.w;c(g,i);f.h-=g.h;if(l=="top")f.t+=g.h;else o.top=f.t+f.h+"px"}else if(l=="left"||l=="right"){i.h=f.h;c(g,i);f.w-=g.w;if(l==
"left")f.l+=g.w;else o.left=f.l+f.w+"px"}else if(l=="client"||l=="center")c(g,f)})}})();return d.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,d){b.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){b.forEach(this.getChildren(),function(a){a.startup();a._started=true})},startup:function(){if(!this._started){var a=d._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;
this.inherited(arguments);this._startChildren();this._isShown()&&this._onShow();this._childOfLayoutWidget||this.connect(b.isIE?this.domNode:b.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=b.query("> *",this.containerNode).filter(function(f){return f.tagName!=="SCRIPT"}),c=a.filter(function(f){return b.hasAttr(f,"data-dojo-type")||b.hasAttr(f,"dojoType")||b.hasAttr(f,"widgetId")}),e=b.filter(c.map(d.byNode),function(f){return f&&
f.domNode&&f.resize});if(a.length==c.length&&e.length==1)this._singleChild=e[0];else delete this._singleChild;b.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,c){!this._wasShown&&this.open!==false&&this._onShow();this._resizeCalled=true;this._scheduleLayout(a,c)},_scheduleLayout:function(a,c){if(this._isShown())this._layout(a,c);else{this._needLayout=true;this._changeSize=a;this._resultSize=c}},_layout:function(a,c){a&&b.marginBox(this.domNode,
a);var e=this.containerNode;if(e===this.domNode){c=c||{};b.mixin(c,a||{});if(!("h"in c)||!("w"in c))c=b.mixin(b.marginBox(e),c);this._contentBox=d.layout.marginBox2contentBox(e,c)}else this._contentBox=b.contentBox(e);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||b.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else b.forEach(this.getChildren(),
function(c){c.resize&&c.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 a=this.domNode,c=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!b.hasClass(a,"dijitHidden")&&c&&c.style&&c.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=
true}});return d.layout._ContentPaneResizeMixin});
define("dojo/html",["dojo","dojo/parser"],function(b){b.getObject("html",true,b);(function(){var d=0;b.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b.html._emptyNode=b.empty;b.html._setNodeContent=function(a,c){b.empty(a);if(c){if(typeof c=="string")c=b._toDom(c,a.ownerDocument);if(!c.nodeType&&b.isArrayLike(c))for(var e=c.length,f=0;f<c.length;f=e==c.length?f+1:0)b.place(c[f],a,"last");else b.place(c,a,"last")}return a};b.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:b._scopeName,startup:true,constructor:function(a,c){b.mixin(this,a||{});c=this.node=b.byId(this.node||c);if(!this.id)this.id=["Setter",c?c.id||c.tagName:"",d++].join("_")},set:function(a,c){if(undefined!==a)this.content=a;c&&this._mixin(c);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw new Error(this.declaredClass+": setContent given no node");
try{a=b.html._setNodeContent(a,this.content)}catch(c){var e=this.onContentError(c);try{a.innerHTML=e}catch(f){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+f.message,f)}}this.node=a},empty:function(){if(this.parseResults&&this.parseResults.length){b.forEach(this.parseResults,function(a){a.destroy&&a.destroy()});delete this.parseResults}b.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(b.isString(a)){if(this.cleanContent)a=b.html._secureForInnerHtml(a);
if(this.extractContent){var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(c)a=c[1]}}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var c={},e;for(e in a)e in c||(this[e]=a[e])},_parse:function(){var a=this.node;try{var c={};b.forEach(["dir","lang","textDir"],
function(f){if(this[f])c[f]=this[f]},this);this.parseResults=b.parser.parse({rootNode:a,noStart:!this.startup,inherited:c,scope:this.parserScope})}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,e){a=this["on"+a+"Error"].call(this,c);if(e)console.error(e,c);else a&&b.html._setNodeContent(this.node,a,true)}});b.html.set=function(a,c,e){if(undefined==c){console.warn("dojo.html.set: no cont argument provided, using empty string");c=""}return e?(new b.html._ContentSetter(b.mixin(e,
{content:c,node:a}))).set():b.html._setNodeContent(a,c,true)}})();return b.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/layout/ContentPane",["dojo","dijit","dijit/_Widget","dijit/layout/_ContentPaneResizeMixin","dojo/string","dojo/html","i18n!dijit/nls/loading"],function(b,d){b.declare("dijit.layout.ContentPane",[d._Widget,d.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:b._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:b.delegate(d._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(a,c){if((!a||!a.template)&&c&&!("href"in a)&&!("content"in a)){var e=b.doc.createDocumentFragment();for(c=b.byId(c);c.firstChild;)e.appendChild(c.firstChild);a=b.delegate(a,{content:e})}this.inherited(arguments,[a,c])},postMixInProperties:function(){this.inherited(arguments);var a=b.i18n.getLocalization("dijit",
"loading",this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,a);this.errorMessage=b.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";b.attr(this.domNode,"role")||d.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&b.isFunction(a.startup)){a.startup();
a._started=true}},this)},setHref:function(a){b.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._set("href",a);if(this.preload||this._created&&this._isShown())this._load();else this._hrefChanged=true;return this.onLoadDeferred},setContent:function(a){b.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=false;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&this._xhrDfd.fired==-1&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){this._beingDestroyed&&
this.cancel();this.inherited(arguments)},destroyRecursive:function(){this._beingDestroyed||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 b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
true);var a=this,c={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};b.isObject(this.ioArgs)&&b.mixin(c,this.ioArgs);var e=this._xhrDfd=(this.ioMethod||b.xhrGet)(c);e.addCallback(function(f){try{a._isDownloaded=true;a._setContent(f,false);a.onDownloadEnd()}catch(h){a._onError("Content",h)}delete a._xhrDfd;return f});e.addErrback(function(f){e.canceled||a._onError("Download",f);delete a._xhrDfd;return f});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
true);try{this.onLoadDeferred.callback(a)}catch(c){console.error("Error "+this.widgetId+" running custom onLoad code: "+c.message)}},_onUnloadHandler:function(){this._set("isLoaded",false);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(){this.isLoaded&&this._onUnloadHandler();var a=this._contentSetter;b.forEach(this.getChildren(),function(c){c.destroyRecursive&&c.destroyRecursive()});if(a){b.forEach(a.parseResults,
function(c){c.destroyRecursive&&c.domNode&&c.domNode.parentNode==b.body()&&c.destroyRecursive()});delete a.parseResults}b.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,c){this.destroyDescendants();var e=this._contentSetter;if(!(e&&e instanceof b.html._ContentSetter))e=this._contentSetter=new b.html._ContentSetter({node:this.containerNode,_onError:b.hitch(this,this._onError),onContentError:b.hitch(this,function(h){h=this.onContentError(h);try{this.containerNode.innerHTML=
h}catch(k){console.error("Fatal "+this.id+" could not change content due to "+k.message,k)}})});var f=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});e.set(b.isObject(a)&&a.domNode?a.domNode:a,f);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();if(!c){if(this._started){this._startChildren();this._scheduleLayout()}this._onLoadHandler(a)}},
_onError:function(a,c,e){this.onLoadDeferred.errback(c);a=this["on"+a+"Error"].call(this,c);if(e)console.error(e,c);else a&&this._setContent(a,true)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return d.layout.ContentPane});
define("dijit/nls/common",{root:{buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});define("text!dijit/templates/TooltipDialog.html",function(){return'<div role="presentation" tabIndex="-1">\n\t<div class="dijitTooltipContainer" role="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" role="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n</div>'});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(b,d){b.declare("dijit.TooltipDialog",[d.layout.ContentPane,d._Templated,d.form._FormMixin,d._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:b.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=
a;this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,c,e){a="dijitTooltipAB"+(e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(e.charAt(0)=="T"?"Below":"Above");b.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);d.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var c=a.target,e=b.keys;a.charOrCode===e.TAB&&this._getFocusItems(this.containerNode);var f=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==e.ESCAPE){setTimeout(b.hitch(this,"onCancel"),0);b.stopEvent(a)}else if(c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){f||d.focus(this._lastFocusItem);b.stopEvent(a)}else if(c==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){f||d.focus(this._firstFocusItem);b.stopEvent(a)}else a.charOrCode===
e.TAB&&a.stopPropagation()}});return d.TooltipDialog});
define("dijit/Dialog",["dojo","dijit","text!dijit/templates/Dialog.html","dojo/dnd/move","dojo/dnd/TimedMoveable","dojo/fx","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin","dijit/form/_FormMixin","dijit/_DialogMixin","dijit/DialogUnderlay","dijit/layout/ContentPane","i18n!dijit/nls/common","dijit/TooltipDialog"],function(b,d){b.declare("dijit._DialogBase",[d._Templated,d.form._FormMixin,d._DialogMixin,d._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.delegate(d._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:d.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"aria-describedby":"",postMixInProperties:function(){var a=b.i18n.getLocalization("dijit","common");b.mixin(this,a);this.inherited(arguments)},
postCreate:function(){b.style(this.domNode,{display:"none",position:"absolute"});b.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);d.focus(this._firstFocusItem)}this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=
b.position(a.node)},_setup:function(){var a=this.domNode;if(this.titleBar&&this.draggable){this._moveable=b.isIE==6?new b.dnd.TimedMoveable(a,{handle:this.titleBar}):new b.dnd.Moveable(a,{handle:this.titleBar,timeout:0});this._dndListener=b.subscribe("/dnd/move/stop",this,"_endDrag")}else b.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":b.map(this["class"].split(/\s/),function(c){return c+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else b.style(this.containerNode,{width:"auto",height:"auto"});var a=b._getMarginSize(this.domNode),c=b.window.getBox();if(a.w>=c.w||a.h>=c.h){var e=Math.min(a.w,Math.floor(c.w*0.75));a=Math.min(a.h,Math.floor(c.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:e,h:a})}else b.style(this.containerNode,{width:e+"px",height:a+"px",
overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!b.hasClass(b.body(),"dojoMove")){var a=this.domNode,c=b.window.getBox(),e=this._relativePosition,f=e?null:b._getBorderBox(a),h=Math.floor(c.l+(e?e.x:(c.w-f.w)/2));c=Math.floor(c.t+(e?e.y:(c.h-f.h)/2));b.style(a,{left:h+"px",top:c+"px"})}},_onKey:function(a){if(a.charOrCode){var c=b.keys,e=a.target;a.charOrCode===c.TAB&&this._getFocusItems(this.domNode);var f=
this._firstFocusItem==this._lastFocusItem;if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===c.TAB){f||d.focus(this._lastFocusItem);b.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===c.TAB&&!a.shiftKey){f||d.focus(this._firstFocusItem);b.stopEvent(a)}else{for(;e;){if(e==this.domNode||b.hasClass(e,"dijitPopup"))if(a.charOrCode==c.ESCAPE)this.onCancel();else return;e=e.parentNode}if(a.charOrCode!==c.TAB)b.stopEvent(a);else if(!b.isOpera)try{this._firstFocusItem.focus()}catch(h){}}}},
show:function(){if(!this.open){this._started||this.startup();if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true}this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._modalconnects.push(b.connect(window,"onscroll",this,"layout"));this._modalconnects.push(b.connect(window,"onresize",this,function(){var c=b.window.getBox();if(!this._oldViewport||c.h!=this._oldViewport.h||c.w!=this._oldViewport.w){this.layout();this._oldViewport=c}}));this._modalconnects.push(b.connect(this.domNode,
"onkeypress",this,"_onKey"));b.style(this.domNode,{opacity:0,display:""});this._set("open",true);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:b.hitch(this,function(){d._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.hitch(this,function(){if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);
d.focus(this._firstFocusItem)}this._fadeInDeferred.callback(true);delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized){this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=b.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,function(){this.domNode.style.display="none";d._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;b.forEach(this._modalconnects,b.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",false);return this._fadeOutDeferred}},layout:function(){if(this.domNode.style.display!="none"){d._underlay&&d._underlay.layout();this._position()}},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&
this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&b.unsubscribe(this._dndListener);b.forEach(this._modalconnects,b.disconnect);d._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[d.layout.ContentPane,d._DialogBase],{});d._DialogLevelManager={show:function(a,c){var e=d._dialogStack;e[e.length-1].focus=d.getFocus(a);var f=d._underlay;if(!f||f._destroyed)f=d._underlay=new d.DialogUnderlay(c);else f.set(a.underlayAttrs);var h=
e[e.length-1].dialog?e[e.length-1].zIndex+2:950;e.length==1&&f.show();b.style(d._underlay.domNode,"zIndex",h-1);b.style(a.domNode,"zIndex",h);e.push({dialog:a,underlayAttrs:c,zIndex:h})},hide:function(a){var c=d._dialogStack;if(c[c.length-1].dialog==a){c.pop();var e=c[c.length-1];if(c.length==1)d._underlay._destroyed||d._underlay.hide();else{b.style(d._underlay.domNode,"zIndex",e.zIndex-1);d._underlay.set(e.underlayAttrs)}if(a.refocus){c=e.focus;if(!c||e.dialog&&!b.isDescendant(c.node,e.dialog.domNode)){e.dialog._getFocusItems(e.dialog.domNode);
c=e.dialog._firstFocusItem}try{d.focus(c)}catch(f){}}}else{e=b.indexOf(b.map(c,function(h){return h.dialog}),a);e!=-1&&c.splice(e,1)}},isTop:function(a){var c=d._dialogStack;return c[c.length-1].dialog==a}};d._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return d.Dialog});
define("orion/widgets/_OrionDialogMixin",["dojo","dijit"],function(b,d){b.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Information Needed";this.buttonCancel="Cancel"},postCreate:function(){this.inherited(arguments);b.connect(this,"onKeyPress",b.hitch(this,function(a){a.keyCode===b.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(b.hitch(this,function(){if(b.isDescendant(d._curFocus,
this.domNode))d._curFocus=null;if(b.isDescendant(d._prevFocus,this.domNode))d._prevFocus=null;this.destroyRecursive()}),this.duration)}})});define("text!orion/widgets/templates/OpenResourceDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="resourceName" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="resourceName" \n\t\t\t\t\t\tplaceHolder="${searchPlaceHolder}"\n\t\t\t\t\t\tintermediateChanges="true" style="width:30em;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="statusbar" style="display:table-cell;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/OpenResourceDialog",["dojo","dijit","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/OpenResourceDialog.html"],function(b,d){return b.declare("orion.widgets.OpenResourceDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,searchLocation:null,searcher:null,constructor:function(){this.inherited(arguments);
this.timeoutId=null;this.time=0;this.searchLocation=(this.options=arguments[0])&&this.options.SearchLocation;this.searcher=this.options&&this.options.searcher;if(!this.searchLocation)throw new Error("Missing required argument: SearchLocation");if(!this.searcher)throw new Error("Missing required argument: searcher");},postMixInProperties:function(){this.options.title=this.options.title||"Find File Named";this.selectFile="Type the name of a file to open (? = any character, * = any string):";this.searchPlaceHolder=
"Search";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);b.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(b.hitch(this,this.checkSearch),0)});b.connect(this.resourceName,"onKeyPress",this,function(a){if(a.keyCode===b.keys.ENTER&&this.results){a=b.query("a",this.results);if(a.length>0){window.open(a[0].href);this.hide()}}});b.connect(this,"onMouseUp",function(a){a.target.focus()})},checkSearch:function(){clearTimeout(this.timeoutId);
var a=(new Date).getTime();if(a-this.time>this.SEARCH_DELAY){this.time=a;this.doSearch()}else this.timeoutId=setTimeout(b.hitch(this,"checkSearch"),50)},doSearch:function(){var a=this.resourceName&&this.resourceName.get("value");if(a){b.place("<div>Searching&#x2026;</div>",this.results,"only");var c=this;setTimeout(function(){var e=c.searcher.createSearchQuery(c.searchLocation,null,a);c.searcher.search(c.results,e,false,false,b.hitch(c,c.decorateResult),true,true)},0)}},decorateResult:function(a){var c=
this;b.query("a",a).forEach(function(e){b.connect(e,"onmouseup",function(f){!b.mouseButtons.isMiddle(f)&&!b.isCopyKey(f)&&c.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});define("text!orion/widgets/templates/LoginDialog.html",function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="width: 300px; padding-left: 0; padding-right: 0; padding-top: 0.5em; padding-bottom: 0.45em">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"\n\t\t\tdojoattachpoint="containerNode" style="padding: 0">\n\t\t\t<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">\n\t\t\t <tbody dojoAttachPoint="authenticatedList">\n\t\t\t</tbody>\n\t\t\t</span>\n\t\t\t\n\t\t\t<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">\n\t\t\t <tbody dojoAttachPoint="otherUnauthenticatedList">\n\t\t\t</tbody>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("orion/widgets/LoginDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog","text!orion/widgets/templates/LoginDialog.html"],function(b,d,a,c){d.declare("orion.widgets.LoginDialog",[a.TooltipDialog],{widgetsInTemplate:true,templateString:d.cache("orion","widgets/templates/LoginDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},setPendingAuthentication:function(e){for(var f in this.unauthenticatedServices)delete this.unauthenticatedServices[f].pending;
for(f in e)if(this.unauthenticatedServices[e[f].SignInKey])this.unauthenticatedServices[e[f].SignInKey].pending=true;else if(this.authenticatedServices[e[f].SignInKey]){this.unauthenticatedServices[e[f].SignInKey]=this.authenticatedServices[e[f].SignInKey];this.unauthenticatedServices[e[f].SignInKey].pending=true;delete this.authenticatedServices[e[f].SignInKey]}else this.unauthenticatedServices[e[f].SignInKey]={label:e[f].SignInKey,SignInLocation:e[f].SignInLocation,pending:true};this.renderUnauthenticatedServices();
this.renderAuthenticatedServices()},addUserItem:function(e,f,h,k){if(k){this.unauthenticatedServices[e]&&delete this.unauthenticatedServices[e];this.authenticatedServices[e]={authService:f,label:h,data:k}}else{this.authenticatedServices[e]&&delete this.authenticatedServices[e];this.unauthenticatedServices[e]=this.unauthenticatedServices[e]?{authService:f,label:h,pending:this.unauthenticatedServices[e].pending}:{authService:f,label:h}}d.hitch(this,this.renderAuthenticatedServices)();d.hitch(this,this.renderUnauthenticatedServices)();
if(a.byId("logins"))if(this.isSingleService()&&k){c.setUserName(k.login);e=k.Name&&k.Name.replace(/^\s+|\s+$/g,"")!==""?k.Name:k.login;if(e.length>40)e=e.substring(0,30)+"...";a.byId("logins").setLabel(e)}else a.byId("logins").setLabel("Security")},renderAuthenticatedServices:function(){d.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var e=this,f=true;for(var h in this.authenticatedServices){if(!f){var k=d.create("tr",null,this.authenticatedList);
d.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},k)}f=false;k=d.create("tr",{className:"navTableHeading"});var j=d.create("td",{innerHTML:"<h2>"+(this.authenticatedServices[h].label?this.authenticatedServices[h].label:h)+"</h2>"},k,"only");d.addClass(j,"LoginWindowLeft");j=d.create("td",{style:"text-align: right"},k,"last");d.addClass(j,"LoginWindowRight");var g=this.authenticatedServices[h].data,
i=this.authenticatedServices[h].authService;g.Location&&d.create("a",{href:b.toUrl("profile/user-profile.html")+"#"+g.Location,innerHTML:"Profile"},j,"last");d.place(document.createTextNode(" "),j,"last");if(i.logout){var l=d.create("a",{innerHTML:"Sign out"},j,"last");d.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});d.connect(l,"onmouseout",l,function(){l.style.cursor="default"});d.connect(l,"onclick",d.hitch(e,function(o,n){return function(){o.logout().then(d.hitch(e,function(){this.addUserItem(n,
o,this.authenticatedServices[n].label);this.isSingleService()&&a.popup.close(this);localStorage.removeItem(n)}))}})(i,h))}d.place(k,this.authenticatedList,"last");j="N/A";if(g&&g.lastlogintimestamp)j=d.date.locale.format(new Date(g.lastlogintimestamp),{formatLength:"short"});g=g.Name&&g.Name.replace(/^\s+|\s+$/g,"")!==""?g.Name:g.login;k=d.create("tr");j=g.length>40?d.create("td",{innerHTML:g.substring(0,30)+"... logged in since "+j,colspan:2,title:g+" logged in since "+j},k,"only"):d.create("td",
{innerHTML:g+" logged in since "+j,colspan:2},k,"only");d.addClass(j,"LoginWindowLeft");d.addClass(j,"LoginWindowRight");d.addClass(j,"LoginWindowComment");d.place(k,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){d.empty(this.otherUnauthenticatedList);var e=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?"none":"";var f=true;for(var h in this.unauthenticatedServices){if(!f||!this.isEmpty(this.authenticatedServices)){var k=d.create("tr",
null,this.otherUnauthenticatedList);d.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},k)}f=false;k=d.create("tr",{className:"navTableHeading"});var j=d.create("td",null,k,"only");d.addClass(j,"LoginWindowLeft");d.create("h2",{innerHTML:this.unauthenticatedServices[h].label?this.unauthenticatedServices[h].label:h},j,"only");j=d.create("td",{style:"text-align: right"},k,"last");
d.addClass(j,"LoginWindowRight");var g=this.unauthenticatedServices[h].authService;if(g)if(g.getAuthForm)d.hitch(e,function(o,n){g.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(m){m.indexOf("?")==-1?d.create("a",{target:"_blank",href:m+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+n,innerHTML:"Sign in"},o,"last"):d.create("a",{target:"_blank",href:m+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+n,innerHTML:"Sign in"},
o,"last")})})(j,h);else{if(g.login){var i=d.create("a",{innerHTML:"Sign in",style:"cursor: hand;"},j,"last");d.connect(i,"onmouseover",i,function(){i.style.cursor="pointer"});d.connect(i,"onmouseout",i,function(){i.style.cursor="default"});d.connect(i,"onclick",d.hitch(e,function(o){return function(){o.login(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(){e.isSingleService()&&a.popup.close(e)})}})(g))}}else{var l=this.unauthenticatedServices[h].SignInLocation;l.indexOf("?")==
-1?d.create("a",{target:"_blank",href:l+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h,innerHTML:"Sign in"},j,"last"):d.create("a",{target:"_blank",href:l+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+h,innerHTML:"Sign in"},j,"last")}d.place(k,this.otherUnauthenticatedList,"last");if(this.unauthenticatedServices[h].pending){k=d.create("tr");j=d.create("td",{innerHTML:"Authentication required!",style:"padding-left: 10px",colspan:2},k,"only");d.addClass(j,
"LoginWindowLeft");d.addClass(j,"LoginWindowRight");d.create("img",{src:b.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},j,"first");d.place(k,this.otherUnauthenticatedList,"last")}}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(e){for(var f in e)if(e.hasOwnProperty(f))return false;return true},length:function(e){var f=0;for(var h in e)e.hasOwnProperty(h)&&
f++;return f},getHostname:function(e){var f=document.createElement("img");f.src=e;e=f.src;f.src=null;return e.match(/^(?:f|ht)tp(?:s)?:\/\/([^\/]+)/im)[1].toString()}})});
define("orion/globalCommands",["require","dojo","dijit","orion/commands","orion/util","orion/textview/keyBinding","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton","orion/widgets/OpenResourceDialog","orion/widgets/LoginDialog"],function(b,d,a,c,e,f){function h(q){var t=document.createElement("a");t.href=q;return t.href}function k(q,t){if(q.getLabel)return q.getLabel();else{q=new d.Deferred;q.callback(t.properties.name);return q}}function j(q){var t=q.getServiceReferences("orion.core.auth"),
C=d.byId("userInfo");if(C){if(!a.byId("logins")){var D=new a.form.DropDownButton({id:"logins",label:"Security",dropDown:s,title:"Login statuses"});d.addClass(D.domNode,"commandImage");d.place(D.domNode,C,"only")}for(C=0;C<t.length;C++){var u=t[C];q.getService(u).then(function(w){k(w,u).then(function(z){w.getKey().then(function(x){w.getUser().then(function(E){s.addUserItem(x,w,z,E)},function(){s.addUserItem(x,w,z)});window.addEventListener("storage",function(){if(p[x]!==localStorage.getItem(x)){p[x]=
localStorage.getItem(x);w.getUser().then(function(E){s.addUserItem(x,w,z,E)},function(){s.addUserItem(x,w,z)})}},false)})})})}}}function g(q){s.setPendingAuthentication(q);var t;for(t in q)if(q.hasOwnProperty(t)){a.popup.open({popup:s,around:d.byId("logins")});return}a.popup.close(s)}function i(q,t,C,D){var u=d.byId("pageActions");if(C)u=d.byId(C);if(u){d.empty(u);q.renderCommands(u,"dom",t,t,"image",null,null,!D)}}function l(q,t,C,D,u,w,z,x){var E=b.toUrl("filesearch._");E=E.substring(0,E.length-
2)+"?q=";var F;D=d.byId(q);if(!D)throw"could not find banner parent, id was "+q;d.place(o,D,"only");d.place('<div id="keyAssist" class="keyAssistFloat"></div>',document.body,"last");var K=d.byId("primaryNav");if(K)for(var J=t.getServiceReferences("orion.page.link"),L=0;L<J.length;L++)t.getService(J[L]).then(function(){for(var S={},X=J[L].getPropertyNames(),ca=0;ca<X.length;ca++)S[X[ca]]=J[L].getProperty(X[ca]);if(S.href&&S.name){X=d.create("a",{href:S.href},K,"last");d.addClass(X,"commandLink");F=
document.createTextNode(S.name);d.place(F,X,"only")}});var M=d.byId("search");if(!M)throw"failed to generate HTML for banner";d.connect(M,"onkeypress",function(S){if(S.charOrCode===d.keys.ENTER)if(E){if(M.value.length>0){S=u.createSearchQuery("../filesearch?q=",M.value);window.location=b.toUrl("search/search.html")+"#"+S}}else window.alert("Can't search: SearchLocation not available")});if(q=d.byId("pageTitle")){F=document.createTextNode(document.title);d.place(F,q,"last")}var Q=function(S,X,ca){var fa=
new orion.widgets.OpenResourceDialog({SearchLocation:S,searcher:X});ca&&d.connect(fa,"onHide",function(){ca.getTextView().focus()});window.setTimeout(function(){fa.show()},0)};q=new c.Command({name:"Find File Named...",tooltip:"Choose a file by name and open an editor on it",id:"eclipse.openResource",callback:function(){Q(E,u,z)}});if(z){z.getTextView().setKeyBinding(new f.KeyBinding("r",true,true,false),"Find File Named...");z.getTextView().setAction("Find File Named...",function(){Q(E,u,z);return true})}C.addCommand(q,
"global");C.registerCommandContribution("eclipse.openResource",1,"globalActions",null,new c.CommandKeyBinding("t"),true);var N=d.byId("keyAssist");d.connect(document,"onkeypress",d.hitch(this,function(S){if(S.charOrCode===d.keys.ESCAPE)N.style.display="none"}));x&&x.addHandler({isActive:function(){return N.style.display==="block"},cancel:function(){if(this.isActive()){N.style.display="none";return true}return false}});x=new c.Command({name:"Show Keys",tooltip:"Show a list of all the keybindings on this page",
id:"eclipse.keyAssist",callback:function(){d.empty(N);if(z){d.place("<h2>Editor</h2>",N,"last");for(var S=z.getTextView().getActions(false),X=0;X<S.length;X++)for(var ca=S[X],fa=z.getTextView().getKeyBindings(ca),r=0;r<fa.length;r++)d.place("<span>"+e.getUserKeyString(fa[r])+" = "+ca+"<br></span>",N,"last")}d.place("<h2>Global</h2>",N,"last");C.showKeyBindings(N);N.style.display="block";return true}});C.addCommand(x,"global");C.registerCommandContribution("eclipse.keyAssist",1,"globalActions",null,
new c.CommandKeyBinding(191,false,true),true);if(z){z.getTextView().setKeyBinding(new c.CommandKeyBinding("L",true,true),"Show Keys");z.getTextView().setAction("Show Keys",x.callback)}if(x=d.byId("globalActions")){d.empty(x);C.renderCommands(x,"global",w||{},w,"image")}j(t);if(n)(t=d.byId("footer"))&&d.place(n,t,"only")}var o='<table style="border: 2px solid white; margin: 0; padding: 0; border-collapse: collapse; width: 100%;"><tr class="topRowBanner" id="bannerRow1"><td rowspan=3 style="padding-top: 12px; padding-bottom: 12px; padding-left: 8px; width: 148px"><a id="home" href="'+
b.toUrl("index.html")+'"><span class="imageSprite core-sprite-orion toolbarLabel" alt="Orion Logo" align="top"></a></td><td class="leftGlobalToolbar" style="padding-top: 16px"><span id="pageTitle" class="pageTitle"></span></td><td class="rightGlobalToolbar" style="padding-top: 16px"><span id="primaryNav" class="globalActions"></span><span id="globalActions" class="globalActions"></span><input type="search" id="search" class="searchbox"><span id="userInfo"></span><span id="help" class="help"><a id="help" href="'+
b.toUrl("help/index.jsp")+'">?</a></span></td></tr><tr class="topRowBanner" id="bannerRow2"><td colspan=2 style="text-wrap: normal"><span id="location" class="currentLocation" style="text-wrap: normal"></span></td></tr><tr class="topRowBanner" id="bannerRow3"><td colspan=2 style="height: 16px; text-align: left"><span id="statusPane" style="color: #5a5a5a;"></span><span id="notifications"></span></td></tr><tr class="pageToolbar"><td colspan=3 style="padding-left: 16px;" id="pageToolbar" class="pageToolbar"><span id="pageActions" class="pageActions"></span><span id="pageActionsRight" class="pageActions"></span></td></tr><tr class="optionalPageToolbar"><td colspan=3 style="border: 1px solid grey;padding-left: 16px;" id="optionalPageToolbar" class="optionalPageToolbar"><div id="optionalPageActions"  class="pageActions"></div></td></tr></table>',
n='<span class="imageSprite core-sprite-warning"></span> This is a Beta build of Orion.  You can use it, play with it and explore the capabilities but BEWARE your data may be lost. &nbsp;| <a href="http://wiki.eclipse.org/Orion/FAQ">FAQ</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.3">Report a Bug</a> | <a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a> | <a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a> | <a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a>',
m=h(b.toUrl("auth/NotifyAuthentication.html")),p={},s=new orion.widgets.LoginDialog;return{generateUserInfo:j,generateDomCommandsInBanner:i,generateBanner:l,notifyAuthenticationSite:m,setPendingAuthentication:g}});
define("dojo/date",["dojo"],function(b){b.getObject("date",true,b);b.date.getDaysInMonth=function(d){var a=d.getMonth();if(a==1&&b.date.isLeapYear(d))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};b.date.isLeapYear=function(d){d=d.getFullYear();return!(d%400)||!(d%4)&&!!(d%100)};b.date.getTimezoneName=function(d){var a=d.toString(),c="",e=a.indexOf("(");if(e>-1)c=a.substring(++e,a.indexOf(")"));else{e=/([A-Z\/]+) \d{4}$/;if(a=a.match(e))c=a[1];else{a=d.toLocaleString();e=/ ([A-Z\/]+)$/;
if(a=a.match(e))c=a[1]}}return c=="AM"||c=="PM"?"":c};b.date.compare=function(d,a,c){d=new Date(+d);a=new Date(+(a||new Date));if(c=="date"){d.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(c=="time"){d.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(d>a)return 1;if(d<a)return-1;return 0};b.date.add=function(d,a,c){var e=new Date(+d),f=false,h="Date";switch(a){case "day":break;case "weekday":var k;if(a=c%5){a=a;k=parseInt(c/5)}else{a=c>0?5:-5;k=c>0?(c-5)/5:(c+5)/5}var j=d.getDay(),g=0;if(j==6&&c>0)g=1;
else if(j==0&&c<0)g=-1;j=j+a;if(j==0||j==6)g=c>0?2:-2;c=7*k+a+g;break;case "year":h="FullYear";f=true;break;case "week":c*=7;break;case "quarter":c*=3;case "month":f=true;h="Month";break;default:h="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}h&&e["set"+h](e["get"+h]()+c);f&&e.getDate()<d.getDate()&&e.setDate(0);return e};b.date.difference=function(d,a,c){a=a||new Date;c=c||"day";var e=a.getFullYear()-d.getFullYear(),f=1;switch(c){case "quarter":d=d.getMonth();a=a.getMonth();d=Math.floor(d/3)+
1;a=Math.floor(a/3)+1;a+=e*4;f=a-d;break;case "weekday":e=Math.round(b.date.difference(d,a,"day"));c=parseInt(b.date.difference(d,a,"week"));f=e%7;if(f==0)e=c*5;else{var h=0,k=d.getDay();a=a.getDay();c=parseInt(e/7);f=e%7;d=new Date(d);d.setDate(d.getDate()+c*7);d=d.getDay();if(e>0)switch(true){case k==6:h=-1;break;case k==0:h=0;break;case a==6:h=-1;break;case a==0:h=-2;break;case d+f>5:h=-2}else if(e<0)switch(true){case k==6:h=0;break;case k==0:h=1;break;case a==6:h=2;break;case a==0:h=1;break;case d+
f<0:h=2}e+=h;e-=c*2}f=e;break;case "year":f=e;break;case "month":f=a.getMonth()-d.getMonth()+e*12;break;case "week":f=parseInt(b.date.difference(d,a,"day")/7);break;case "day":f/=24;case "hour":f/=60;case "minute":f/=60;case "second":f/=1E3;case "millisecond":f*=a.getTime()-d.getTime()}return Math.round(f)};return b.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(b){b.getObject("cldr.supplemental",true,b);b.cldr.supplemental.getFirstDayOfWeek=function(d){d={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}[b.cldr.supplemental._region(d)];return d===undefined?
1:d};b.cldr.supplemental._region=function(d){d=b.i18n.normalizeLocale(d);d=d.split("-");var a=d[1];if(a){if(a.length==4)a=d[2]}else a={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"}[d[0]];return a};b.cldr.supplemental.getWeekend=function(d){var a=b.cldr.supplemental._region(d);d={"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}[a];a={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}[a];if(d===undefined)d=6;if(a===undefined)a=0;return{start:d,end:a}};return b.cldr.supplemental});
define("dojo/regexp",["dojo"],function(b){b.getObject("regexp",true,b);b.regexp.escapeString=function(d,a){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){if(a&&a.indexOf(c)!=-1)return c;return"\\"+c})};b.regexp.buildGroupRE=function(d,a,c){if(!(d instanceof Array))return a(d);for(var e=[],f=0;f<d.length;f++)e.push(a(d[f]));return b.regexp.group(e.join("|"),c)};b.regexp.group=function(d,a){return"("+(a?"?:":"")+d+")"};return b.regexp});
define("dojo/cldr/nls/gregorian",{root:{"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d",eraNarrow:["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateTimeFormat-medium":"{1} {0}",
"dateFormatItem-EEEd":"d EEE","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q",
"dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","dateFormatItem-H":"HH","months-standAlone-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L",
"days-standAlone-wide":["1","2","3","4","5","6","7"],"timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":["1","2","3","4","5","6","7"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"Yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM",
"dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}","field-day":"Day","days-format-wide":["1","2","3","4","5","6","7"],"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":["1",
"2","3","4","5","6","7"],eraNames:["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"days-standAlone-narrow":["1","2","3","4","5","6","7"],"dateFormatItem-MMM":"LLL","field-month":"Month","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"Week","dateFormat-medium":"y MMM d","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a"},ar:true,ca:true,cs:true,da:true,de:true,el:true,en:true,"en-au":true,"en-ca":true,"en-gb":true,es:true,fi:true,fr:true,"fr-ch":true,he:true,hu:true,it:true,ja:true,ko:true,nb:true,nl:true,pl:true,pt:true,"pt-pt":true,ro:true,ru:true,sk:true,sl:true,sv:true,th:true,tr:true,zh:true,"zh-hant":true,"zh-hk":true,"zh-tw":true});
define("dojo/cldr/nls/en/gregorian",{"dateFormatItem-yM":"M/y","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q y","dayPeriods-format-wide-pm":"PM","field-minute":"Minute",eraNames:["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-day-relative+-1":"Yesterday","field-weekday":"Day of the Week","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dayPeriods-format-wide-am":"AM","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM y","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","days-standAlone-narrow":["S",
"M","T","W","T","F","S"],eraAbbr:["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"HH:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":["January",
"February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dayPeriods-format-wide-noon":"noon","timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormatItem-M":"L","days-format-narrow":["S",
"M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/y","months-format-wide":["January","February","March","April","May","June",
"July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eraNarrow:["B","A"]});
define("dojo/date/locale",["dojo","dojo/date","dojo/cldr/supplemental","dojo/regexp","dojo/string","dojo/i18n","i18n!dojo/cldr/nls/gregorian"],function(b){b.getObject("date.locale",true,b);(function(){function d(e,f,h,k){return k.replace(/([a-z])\1*/ig,function(j){var g,i,l=j.charAt(0);j=j.length;var o=["abbr","wide","narrow"];switch(l){case "G":g=f[j<4?"eraAbbr":"eraNames"][e.getFullYear()<0?0:1];break;case "y":g=e.getFullYear();switch(j){case 1:break;case 2:if(!h.fullYear){g=String(g);g=g.substr(g.length-
2);break}default:i=true}break;case "Q":case "q":g=Math.ceil((e.getMonth()+1)/3);i=true;break;case "M":g=e.getMonth();if(j<3){g=g+1;i=true}else{l=["months-format",o[j-3]].join("-");g=f[l][g]}break;case "w":g=b.date.locale._getWeekOfYear(e,0);i=true;break;case "d":g=e.getDate();i=true;break;case "D":g=b.date.locale._getDayOfYear(e);i=true;break;case "E":g=e.getDay();if(j<3){g=g+1;i=true}else{l=["days-format",o[j-3]].join("-");g=f[l][g]}break;case "a":g=e.getHours()<12?"am":"pm";g=h[g]||f["dayPeriods-format-wide-"+
g];break;case "h":case "H":case "K":case "k":i=e.getHours();switch(l){case "h":g=i%12||12;break;case "H":g=i;break;case "K":g=i%12;break;case "k":g=i||24;break}i=true;break;case "m":g=e.getMinutes();i=true;break;case "s":g=e.getSeconds();i=true;break;case "S":g=Math.round(e.getMilliseconds()*Math.pow(10,j-3));i=true;break;case "v":case "z":if(g=b.date.locale._getZone(e,true,h))break;j=4;case "Z":g=b.date.locale._getZone(e,false,h);g=[g<=0?"+":"-",b.string.pad(Math.floor(Math.abs(g)/60),2),b.string.pad(Math.abs(g)%
60,2)];if(j==4){g.splice(0,0,"GMT");g.splice(3,0,":")}g=g.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+k);}if(i)g=b.string.pad(g,j);return g})}function a(e,f,h,k){var j=function(l){return l};f=f||j;h=h||j;k=k||j;var g=e.match(/(''|[^'])+/g),i=e.charAt(0)=="'";b.forEach(g,function(l,o){if(l){g[o]=(i?h:f)(l.replace(/''/g,"'"));i=!i}else g[o]=""});return k(g.join(""))}function c(e,f,h,k){k=b.regexp.escapeString(k);h.strict||(k=k.replace(" a"," ?a"));return k.replace(/([a-z])\1*/ig,
function(j){var g;g=j.charAt(0);var i=j.length,l="",o="";if(h.strict){if(i>1)l="0{"+(i-1)+"}";if(i>2)o="0{"+(i-2)+"}"}else{l="0?";o="0{0,2}"}switch(g){case "y":g="\\d{2,4}";break;case "M":g=i>2?"\\S+?":"1[0-2]|"+l+"[1-9]";break;case "D":g="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+o+"[1-9][0-9]|"+l+"[1-9]";break;case "d":g="3[01]|[12]\\d|"+l+"[1-9]";break;case "w":g="[1-4][0-9]|5[0-3]|"+l+"[1-9]";break;case "E":g="\\S+";break;case "h":g="1[0-2]|"+l+"[1-9]";break;case "k":g="1[01]|"+l+"\\d";break;case "H":g=
"1\\d|2[0-3]|"+l+"\\d";break;case "K":g="1\\d|2[0-4]|"+l+"[1-9]";break;case "m":case "s":g="[0-5]\\d";break;case "S":g="\\d{"+i+"}";break;case "a":i=h.am||f["dayPeriods-format-wide-am"];l=h.pm||f["dayPeriods-format-wide-pm"];g=i+"|"+l;if(!h.strict){if(i!=i.toLowerCase())g+="|"+i.toLowerCase();if(l!=l.toLowerCase())g+="|"+l.toLowerCase();if(g.indexOf(".")!=-1)g+="|"+g.replace(/\./g,"")}g=g.replace(/\./g,"\\.");break;default:g=".*"}e&&e.push(j);return"("+g+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}b.date.locale._getZone=
function(e,f){return f?b.date.getTimezoneName(e):e.getTimezoneOffset()};b.date.locale.format=function(e,f){f=f||{};var h=b.i18n.normalizeLocale(f.locale),k=f.formatLength||"short";h=b.date.locale._getGregorianBundle(h);var j=[];e=b.hitch(this,d,e,h,f);if(f.selector=="year")return a(h["dateFormatItem-yyyy"]||"yyyy",e);var g;if(f.selector!="date")(g=f.timePattern||h["timeFormat-"+k])&&j.push(a(g,e));if(f.selector!="time")(g=f.datePattern||h["dateFormat-"+k])&&j.push(a(g,e));return j.length==1?j[0]:
h["dateTimeFormat-"+k].replace(/\{(\d+)\}/g,function(i,l){return j[l]})};b.date.locale.regexp=function(e){return b.date.locale._parseInfo(e).regexp};b.date.locale._parseInfo=function(e){e=e||{};var f=b.i18n.normalizeLocale(e.locale);f=b.date.locale._getGregorianBundle(f);var h=e.formatLength||"short",k=e.datePattern||f["dateFormat-"+h],j=e.timePattern||f["timeFormat-"+h];h=e.selector=="date"?k:e.selector=="time"?j:f["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(i,l){return[j,k][l]});var g=[];
return{regexp:a(h,b.hitch(this,c,g,f,e)),tokens:g,bundle:f}};b.date.locale.parse=function(e,f){var h=/[\u200E\u200F\u202A\u202E]/g,k=b.date.locale._parseInfo(f),j=k.tokens,g=k.bundle;e=(new RegExp("^"+k.regexp.replace(h,"")+"$",k.strict?"":"i")).exec(e&&e.replace(h,""));if(!e)return null;var i=["abbr","wide","narrow"],l=[1970,0,1,0,0,0,0],o="";e=b.every(e,function(m,p){if(!p)return true;p=j[p-1];var s=p.length;switch(p.charAt(0)){case "y":if(s!=2&&f.strict)l[0]=m;else if(m<100){m=Number(m);s=""+(new Date).getFullYear();
p=s.substring(0,2)*100;s=Math.min(Number(s.substring(2,4))+20,99);l[0]=m<s?p+m:p-100+m}else{if(f.strict)return false;l[0]=m}break;case "M":if(s>2){p=g["months-format-"+i[s-3]].concat();if(!f.strict){m=m.replace(".","").toLowerCase();p=b.map(p,function(t){return t.replace(".","").toLowerCase()})}m=b.indexOf(p,m);if(m==-1)return false}else m--;l[1]=m;break;case "E":case "e":p=g["days-format-"+i[s-3]].concat();if(!f.strict){m=m.toLowerCase();p=b.map(p,function(t){return t.toLowerCase()})}m=b.indexOf(p,
m);if(m==-1)return false;break;case "D":l[1]=0;case "d":l[2]=m;break;case "a":p=f.am||g["dayPeriods-format-wide-am"];s=f.pm||g["dayPeriods-format-wide-pm"];if(!f.strict){var q=/\./g;m=m.replace(q,"").toLowerCase();p=p.replace(q,"").toLowerCase();s=s.replace(q,"").toLowerCase()}if(f.strict&&m!=p&&m!=s)return false;o=m==s?"p":m==p?"a":"";break;case "K":if(m==24)m=0;case "h":case "H":case "k":if(m>23)return false;l[3]=m;break;case "m":l[4]=m;break;case "s":l[5]=m;break;case "S":l[6]=m}return true});
h=+l[3];if(o==="p"&&h<12)l[3]=h+12;else if(o==="a"&&h==12)l[3]=0;h=new Date(l[0],l[1],l[2],l[3],l[4],l[5],l[6]);f.strict&&h.setFullYear(l[0]);var n=j.join("");k=n.indexOf("d")!=-1;n=n.indexOf("M")!=-1;if(!e||n&&h.getMonth()>l[1]||k&&h.getDate()>l[2])return null;if(n&&h.getMonth()<l[1]||k&&h.getDate()<l[2])h=b.date.add(h,"hour",1);return h}})();(function(){var d=[];b.date.locale.addCustomFormats=function(a,c){d.push({pkg:a,name:c})};b.date.locale._getGregorianBundle=function(a){var c={};b.forEach(d,
function(e){e=b.i18n.getLocalization(e.pkg,e.name,a);c=b.mixin(c,e)},this);return c}})();b.date.locale.addCustomFormats("dojo.cldr","gregorian");b.date.locale.getNames=function(d,a,c,e){var f;e=b.date.locale._getGregorianBundle(e);d=[d,c,a];if(c=="standAlone"){c=d.join("-");f=e[c];if(f[0]==1)f=undefined}d[1]="format";return(f||e[d.join("-")]).concat()};b.date.locale.isWeekend=function(d,a){a=b.cldr.supplemental.getWeekend(a);d=(d||new Date).getDay();if(a.end<a.start){a.end+=7;if(d<a.start)d+=7}return d>=
a.start&&d<=a.end};b.date.locale._getDayOfYear=function(d){return b.date.difference(new Date(d.getFullYear(),0,1,d.getHours()),d)+1};b.date.locale._getWeekOfYear=function(d,a){if(arguments.length==1)a=0;var c=(new Date(d.getFullYear(),0,1)).getDay(),e=(c-a+7)%7;e=Math.floor((b.date.locale._getDayOfYear(d)+e-1)/7);c==a&&e++;return e};return b.date.locale});
define("orion/auth",["dojo","dijit","orion/globalCommands","dojo/date/locale","orion/widgets/LoginDialog"],function(b,d,a){function c(h,k){if(h.status===403){if(typeof e==="undefined")e=new d.Dialog({title:"Forbidden access"});var j=h.message;if(h.responseText)j=JSON.parse(h.responseText).Message||h.message;e.set("content",j);e.show()}if(h.status===401)try{var g=JSON.parse(h.responseText),i=localStorage.getItem(g.SignInKey),l=function(){var n=localStorage.getItem(g.SignInKey);if(i!==n){window.removeEventListener("storage",
l,false);delete f[g.SignInKey];a.setPendingAuthentication(f);k&&k()}};window.addEventListener("storage",l,false);if(g.SignInKey){f[g.SignInKey]=g;a.setPendingAuthentication(f)}}catch(o){}}var e,f={};b.addOnLoad(function(){window.dojo=b;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=a});return{handleAuthenticationError:c}});
define("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(d,a,c,e){var f=[];b.Deferred.call(this);var h=this;d.length===0&&!a&&this.resolve([0,[]]);var k=0;b.forEach(d,function(j,g){function i(l,o){f[g]=[l,o];k++;k===d.length&&h.resolve(f)}j.then(function(l){a?h.resolve([g,l]):i(true,l)},function(l){c?h.reject(l):i(false,l);if(e)return null;throw l;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(d){d=new b.DeferredList(d,false,true,false);
d.addCallback(function(a){var c=[];b.forEach(a,function(e){c.push(e[1])});return c});return d};return b.DeferredList});
define("orion/preferences",["require","dojo","orion/auth","dojo/DeferredList"],function(b,d,a){function c(g,i){this._name=g;this._providers=i;this._flushPending=false;this._cached=null;this._stores=[];this._dirty=[]}function e(g,i){return{get:function(l,o){if(i===0)return null;l=localStorage.getItem(g+l);if(l===null)return null;l=JSON.parse(l);if(o||i===-1||l._expires&&l._expires>(new Date).getTime()){delete l._expires;return l}return null},set:function(l,o){if(i!==0){if(i!==-1)o._expires=(new Date).getTime()+
1E3*i;if(Object.keys(o).length===0)localStorage.removeItem(g+l);else{var n=JSON.stringify(o);localStorage.setItem(g+l,n);delete o._expires}}},remove:function(l){localStorage.removeItem(g+l)}}}function f(g){this._currentPromises={};this._cache=new e("/orion/preferences/user",0);this._service=null;this.available=function(){var i=this;if(!this._service){var l=g.getServiceReferences("orion.core.preference.provider");l.length>0&&g.getService(l[0],0).then(function(o){i._service=o})}return!!this._service}}
function h(g){this._location=g;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function k(){this._cache=new e("/orion/preferences/local",-1)}function j(g,i){this._userProvider=new f(g);this._localProvider=new k;i=i||"defaults.pref";if(i.indexOf("://")===-1)i=b.toUrl(i);this._defaultsProvider=new h(i);this._serviceRegistration=g.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var g=[],i=0;i<this._stores.length;++i){var l=this._stores[i];
this._dirty.indexOf(l)!==-1&&g.push(this._providers[i].put(this._name,l))}this._dirty=[];return new d.DeferredList(g)},_scheduleFlush:function(g){this._dirty.indexOf(g)===-1&&this._dirty.push(g);if(!this._flushPending){this._flushPending=true;window.setTimeout(d.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},_getCached:function(){if(!this._cached){this._cached={};for(var g=0;g<this._stores.length;++g){var i=this._stores[g];for(var l in i)if(i.hasOwnProperty(l)&&
typeof this._cached[l]==="undefined")this._cached[l]=i[l]}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(g){return this._getCached()[g]},put:function(g,i){if(this._stores.length!==0){var l=this._stores[0];if(l[g]!==i){l[g]=i;this._cached=null;this._scheduleFlush(l)}}},remove:function(g){for(var i=0;i<this._stores.length;++i){var l=this._stores[i];if(l.hasOwnProperty(g)){delete l[g];this._cached=null;this._scheduleFlush(l);return true}}return false},clear:function(){for(var g=
0;g<this._stores.length;++g){this._stores[g]={};this._scheduleFlush(this._stores[g])}this._cached=null},sync:function(g){if(this._flushPending){this._flushPending=false;return this._flush()}for(var i=this,l=[],o=0;o<this._providers.length;++o)l.push(this._providers[o].get(this._name,g).then(function(n){return function(m){i._stores[n]=m}}(o)));return(new d.DeferredList(l)).then(function(){i._cached=null;i._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(g,i){if(this._currentPromises[g])return this._currentPromises[g];
var l=new d.Deferred,o=null;if(i)this._cache.remove(g);else o=this._cache.get(g);if(o!==null)l.resolve(o);else{this._currentPromises[g]=l;var n=this;this._service.get(g).then(function(m){n._cache.set(g,m);delete n._currentPromises[g];l.resolve(m)},function(m){if(m.status===401){delete n._currentPromises[g];l.resolve({});a.handleAuthenticationError(m,function(){n.get(g)})}else if(m.status===404){m={};n._cache.set(g,m);delete n._currentPromises[g];l.resolve(m)}else{delete n._currentPromises[g];l.resolve(n._cache.get(g,
true)||{})}})}return l},put:function(g,i){var l=new d.Deferred;this._cache.set(g,i);var o=this;this._service.put(g,i).then(function(){l.resolve()},function(n){n.status===401?a.handleAuthenticationError(n,function(){o._service.put(g,i).then(function(){l.resolve()},function(){l.resolve()})}):l.resolve()});return l}};h.prototype={get:function(g,i){if(this._currentPromise)return this._currentPromise;var l=new d.Deferred,o=null;if(i)this._cache.remove(g);else o=this._cache.get(g);if(o!==null)l.resolve(o);
else{this._currentPromise=l;var n=this;d.xhrGet({url:this._location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(m){n._cache.set(g,m[g]||{});n._currentPromise=null;l.resolve(m[g]||{})},error:function(m,p){if(p.xhr.status===401){n._currentPromise=null;l.resolve({});l=new d.Deferred;n._currentPromise=l;var s=this;a.handleAuthenticationError(p.xhr,function(){d.xhrGet(s)})}else if(p.xhr.status===404){n._cache.set(g,{});n._currentPromise=null;l.resolve({})}else{n._currentPromise=
null;m=n._cache.get(g,true);m!==null?l.resolve(m[g]||{}):l.resolve({})}}})}return l},put:function(){var g=new d.Deferred;g.resolve();return g}};k.prototype={get:function(g){var i=new d.Deferred;g=this._cache.get(g);g!==null?i.resolve(g):i.resolve({});return i},put:function(g,i){var l=new d.Deferred;this._cache.set(g,i);l.resolve();return l}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={getPreferences:function(g,i){if(!i||typeof i!=="number"||i>7||i<1)i=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var l=[];j.USER_SCOPE&i&&this._userProvider.available()&&l.push(this._userProvider);j.LOCAL_SCOPE&i&&l.push(this._localProvider);j.DEFAULT_SCOPE&i&&l.push(this._defaultsProvider);var o=new c(g,l);return o.sync().then(function(){return o})}};return{PreferencesService:j}});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(b,d){var a=a||{};a.Plugin=function(c,e,f){function h(q,t,C,D){if(!l)throw new Error("plugin not connected");var u=m++;p[String(u)]=D;f.postMessage({id:u,serviceId:q,method:t,params:C},l)}function k(q){var t={};if(q.methods)for(var C=0;C<q.methods.length;C++){var D=q.methods[C];t[D]=function(u){return function(){var w=Array.prototype.slice.call(arguments),z=new b.Deferred;i._load().then(function(){h(q.serviceId,
u,w,z)});return z.promise}}(D)}return t}function j(){var q=e.services;if(q)for(var t=0;t<q.length;t++){var C=q[t],D=k(C);s[C.serviceId]=f.registerService(C.type,D,C.properties)}}function g(q){try{if(q.method)if("plugin"===q.method){if(e){if(JSON.stringify(e)!==JSON.stringify(q.params[0])){for(var t in s)if(s.hasOwnProperty(t)){s[t].unregister();delete s[t]}e=q.params[0];j();f.updatePlugin(i)}}else{e=q.params[0];j()}if(!n){n=true;o.resolve(i)}}else if("dispatchEvent"===q.method){var C=s[q.serviceId];
C.dispatchEvent.apply(C,q.params)}else if("progress"===q.method){var D=p[String(q.requestId)];D.progress.apply(D,q.params)}else throw new Error("Bad response method: "+q.method);else{D=p[String(q.id)];delete p[String(q.id)];q.error?D.reject(q.error):D.resolve(q.result)}}catch(u){console.log(u)}}var i=this,l=null,o=new b.Deferred,n=false,m=0,p={},s={};this.getLocation=function(){return c};this.getData=function(){return e};this.uninstall=function(){for(var q in s)if(s.hasOwnProperty(q)){s[q].unregister();
delete s[q]}if(l){f.disconnect(l);l=null}f.uninstallPlugin(this)};this.getServiceReferences=function(){var q=[],t;for(t in s)s.hasOwnProperty(t)&&q.push(s[t].getServiceReference());return q};this._load=function(q){if(!l){l=f.connect(c,g);window.setTimeout(function(){if(!n){if(!q){e={};f.updatePlugin(i)}o.reject(new Error("Load timeout for plugin: "+c))}},15E3)}return o.promise};if(typeof c!=="string")throw new Error("invalid url:"+c);e&&j()};a.PluginRegistry=function(c,e){function f(m){if(m.indexOf("://")===
-1){var p=document.createElement("a");p.href=m;return p.href}return m}function h(m){delete g["plugin."+m.getLocation()]}function k(m){m=f(m);for(var p=0,s=i.length;p<s;p++){var q=i[p];if(m===q.getLocation())return q}return null}function j(m){g["plugin."+m.getLocation()]=JSON.stringify(m.getData())}var g=e||localStorage||{},i=[],l=[],o=new d.EventTarget;window.addEventListener("message",function(m){for(var p=0,s=m.source;p<l.length;p++)if(s===l[p].target){if(typeof l[p].useStructuredClone==="undefined")l[p].useStructuredClone=
typeof m.data!=="string";l[p].handler(l[p].useStructuredClone?m.data:JSON.parse(m.data));break}},false);var n={registerService:b.hitch(c,c.registerService),connect:function(m,p){var s=document.createElement("iframe");s.id=m;s.name=m;s.style.display="none";s.style.visibility="hidden";s.src=m;document.body.appendChild(s);m={iframe:s,target:s.contentWindow,handler:p,url:m};l.push(m);return m},disconnect:function(m){for(var p=0;p<l.length;p++)if(m===l[p]){l.splice(p,1);try{document.body.removeChild(m.iframe)}catch(s){}break}},
uninstallPlugin:function(m){h(m);for(var p=0;p<i.length;p++)if(m===i[p]){i.splice(p,1);o.dispatchEvent("pluginRemoved",m);break}},updatePlugin:function(m){g["plugin."+m.getLocation()]=JSON.stringify(m.getData());o.dispatchEvent("pluginUpdated",m)},postMessage:function(m,p){p.target.postMessage(p.useStructuredClone?m:JSON.stringify(m),p.url)}};this.startup=function(m){for(var p=[],s=0;s<m.length;++s){var q=m[s];q=f(q);var t="plugin."+q;if(g[t]){if(k(q)===null){t=JSON.parse(g[t]);q=new a.Plugin(q,t,
n);i.push(q)}}else{g[t]="{}";q=new a.Plugin(q,{},n);i.push(q);p.push(q._load(false))}}return new b.DeferredList(p)};this.shutdown=function(){for(var m=0;m<l.length;m++)try{document.body.removeChild(l[m].iframe)}catch(p){}};this.installPlugin=function(m,p){m=f(m);var s=new b.Deferred,q=k(m);if(q)if(q.getData())s.resolve(q);else{var t=function(C){if(C.getLocation()===m){s.resolve(C);o.removeEventListener("pluginAdded",t)}};o.addEventListener("pluginAdded",t)}else{q=new a.Plugin(m,p,n);i.push(q);if(q.getData()){j(q);
o.dispatchEvent("pluginAdded",q);s.resolve(q)}else q._load(true).then(function(){j(q);o.dispatchEvent("pluginAdded",q);s.resolve(q)},function(C){s.reject(C)})}return s.promise};this.getPlugins=function(){for(var m=[],p=0;p<i.length;p++)i[p].getData()&&m.push(i[p]);return m};this.getPlugin=function(m){if((m=k(m))&&m.getData())return m;return null};this.addEventListener=function(m,p){o.addEventListener(m,p)};this.removeEventListener=function(m,p){o.removeEventListener(m,p)}};return a});
define("orion/bootstrap",["require","dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(b,d,a,c,e){function f(){var h=new a.ServiceRegistry,k=new c.PreferencesService(h),j=new e.PluginRegistry(h);return k.getPreferences("/plugins").then(function(g){g=g.keys();for(var i=0;i<g.length;++i)if(g[i].indexOf("://")===-1)g[i]=b.toUrl(g[i]);return j.startup(g)}).then(function(){if(h.getServiceReferences("orion.core.preference.provider").length>0)return k.getPreferences("/plugins",
k.USER_SCOPE).then(function(g){g=g.keys();for(var i=0;i<g.length;++i)if(g[i].indexOf("://")===-1)g[i]=b.toUrl(g[i]);return j.startup(g)})}).then(function(){d.addOnWindowUnload(function(){j.shutdown()})}).then(function(){return{serviceRegistry:h,preferences:k,pluginRegistry:j}})}return{startup:f}});
define("orion/status",["require","dojo"],function(b,d){function a(c,e,f){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this.domId=e;this.progressDomId=f||e}a.prototype={setMessage:function(c,e){d.place(window.document.createTextNode(c),this.domId,"only");if(typeof e==="number"){var f=this;window.setTimeout(function(){var h=d.byId(f.domId);(typeof h.textContent==="string"?h.textContent:h.innerText)===c&&d.place(window.document.createTextNode(""),f.domId,
"only")},e)}},setErrorMessage:function(c){var e=c.responseText||c.message||c;try{e=JSON.parse(e)}catch(f){}c=e.Message||e;var h="red";if(e.Severity)switch(e.Severity){case "Warning":h="#FFCC00";break;case "Error":h="red";break;case "Info":case "Ok":h="green";break}e=d.create("span",{style:{color:h}});d.place(window.document.createTextNode(c),e);d.place(e,this.domId,"only")},setProgressMessage:function(c){d.place(window.document.createTextNode(c),this.progressDomId,"only")},setProgressResult:function(c){c=
c.responseText||c;try{c=JSON.parse(c)}catch(e){}var f=c.Message||c,h=b.toUrl("images/info.gif"),k="info";if(c.Severity)switch(c.Severity){case "Warning":h=b.toUrl("images/warning.gif");k="warning";break;case "Error":h=b.toUrl("images/error.gif");k="error";break}var j=new Image;j.alt=k;j.title="Press to clear message";j.name=k;j.src=h;d.style(j,"opacity","0.7");d.connect(j,"onmouseover",this,function(){d.style(j,"opacity","1")});d.connect(j,"onmouseout",this,function(){d.style(j,"opacity","0.7")});
d.connect(j,"onclick",this,function(){this.setProgressMessage("")});d.place(j,this.progressDomId,"only");c.HTML?d.place(f,this.progressDomId,"last"):d.place(window.document.createTextNode("   "+f),this.progressDomId,"last")},showWhile:function(c,e){var f=this;f.setProgressMessage(e);return c.then(function(h){if(h&&h.Location&&h.Message&&h.Running)return f._doProgressWhile(h);f.setProgressMessage("");h&&h.Result&&f.setProgressResult(h.Result);return h})},_doProgressWhile:function(c){var e=new d.Deferred;
window.setTimeout(function(){d.xhrGet({url:c.Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(f){e.callback(f)}})},2E3);return this.showWhile(e,c.Message)}};a.prototype.constructor=a;return{StatusReportingService:a}});
define("orion/fileClient",["dojo","orion/auth","dojo/DeferredList"],function(b,d){function a(f,h,k){var j=new b.Deferred;f[h].apply(f,k).then(function(g){j.callback(g)},function(g){g.status===401?d.handleAuthenticationError(g,function(){f[h].apply(f,k).then(function(i){j.callback(i)},function(i){j.errback(i)})}):j.errback(g)});return j}function c(f,h,k,j){if(!f.readBlob)throw"source file service does not support binary read";if(!k.writeBlob)throw"target file service does not support binary write";
if(h[h.length-1]!=="/")return a(f,"readBlob",[h]).then(function(l){return a(k,"writeBlob",[j,l])});var g=j.substring(0,j.length-1),i=decodeURIComponent(g.substring(g.lastIndexOf("/")+1));g=g.substring(0,g.lastIndexOf("/")+1);return a(k,"createFolder",[g,i]).then(function(){},function(){}).then(function(){if(h.indexOf("/")===0)h+="?depth=1";return a(f,"fetchChildren",[h]).then(function(l){for(var o=[],n=0;n<l.length;++n){var m=l[n].Location,p=m;if(l[n].Directory)p=m.substring(0,m.length-1);p=decodeURIComponent(p.substring(p.lastIndexOf("/")+
1));p=j+encodeURIComponent(p);if(l[n].Directory)p+="/";o[n]=c(f,m,k,p)}return new b.DeferredList(o)})})}function e(f,h){function k(s){var q=new b.Deferred;q.reject("No Matching FileService for location:"+s);return q}var j=f.getServiceReferences("orion.core.file"),g=j;if(h){g=[];for(var i=0;i<j.length;++i)h(j[i])&&g.push(j[i])}for(var l=[],o=[],n=[],m={fetchChildren:function(){var s=new b.Deferred;s.resolve(n);return s},createWorkspace:function(){var s=new b.Deferred;s.reject("no file service");return s},
loadWorkspaces:function(){var s=new b.Deferred;s.reject("no file service");return s},loadWorkspace:function(){var s=new b.Deferred;s.resolve({Directory:true,Length:0,LocalTimeStamp:0,Name:"",Location:"",Children:n});return s},createProject:k,createFolder:k,createFile:k,deleteFile:k,moveFile:k,copyFile:k,read:k,write:k},p=0;p<g.length;++p){n[p]={Directory:true,Length:0,LocalTimeStamp:0,Location:g[p].getProperty("top"),ChildrenLocation:g[p].getProperty("top"),Name:g[p].getProperty("Name")};h=g[p].getProperty("pattern")||
".*";if(h[0]!=="^")h="^"+h;l[p]=new RegExp(h);f.getService(g[p],0).then(function(s){o[p]=s})}if(o.length===1)m=o[0];this._getService=function(s){if(!s)return m;for(var q=0;q<l.length;++q)if(l[q].test(s))return o[q];throw"No Matching FileService for location:"+s;}}e.prototype={fetchChildren:function(f){return a(this._getService(f),"fetchChildren",arguments)},createWorkspace:function(){return a(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return a(this._getService(),"loadWorkspaces",
arguments)},loadWorkspace:function(f){return a(this._getService(f),"loadWorkspace",arguments)},createProject:function(f){return a(this._getService(f),"createProject",arguments)},createFolder:function(f){return a(this._getService(f),"createFolder",arguments)},createFile:function(f){return a(this._getService(f),"createFile",arguments)},deleteFile:function(f){return a(this._getService(f),"deleteFile",arguments)},moveFile:function(f,h,k){var j=this._getService(f),g=this._getService(h);if(j===g)return a(j,
"moveFile",arguments);var i=f[f.length-1]==="/",l=h;if(l[l.length-1]!=="/")l+="/";if(k)l+=encodeURIComponent(k);else{var o=f;if(i)o=o.substring(0,o.length-1);l+=o.substring(o.lastIndexOf("/")+1)}if(i&&l[l.length-1]!=="/")l+="/";return c(j,f,g,l).then(function(){return a(j,"deleteFile",[f])})},copyFile:function(f,h){var k=this._getService(f),j=this._getService(h);if(k===j)return a(k,"copyFile",arguments);var g=f[f.length-1]==="/",i=h;if(i[i.length-1]!=="/")i+="/";var l=f;if(g)l=l.substring(0,l.length-
1);i+=l.substring(l.lastIndexOf("/")+1);if(g&&i[i.length-1]!=="/")i+="/";return c(k,f,j,i)},read:function(f){return a(this._getService(f),"read",arguments)},write:function(f){return a(this._getService(f),"write",arguments)},remoteImport:function(f){return a(this._getService(f),"remoteImport",arguments)},remoteExport:function(f){return a(this._getService(f),"remoteExport",arguments)}};e.prototype.constructor=e;return{FileClient:e}});
define("orion/treetable",["dojo"],function(b){function d(a){this._init(a)}d.prototype={_init:function(a){var c=a.parent,e=this;if(typeof c==="string")c=b.byId(c);if(!c)throw"no parent";if(!a.model)throw"no tree model";if(!a.renderer)throw"no renderer";this._parent=c;this._treeModel=a.model;this._renderer=a.renderer;this._showRoot=a.showRoot===undefined?false:a.showRoot;this._indent=a.indent===undefined?16:a.indent;this._labelColumnIndex=a.labelColumnIndex===undefined?0:a.labelColumnIndex;this._id=
a.id===undefined?"treetable":a.id;this._root=this._treeModel.getRoot(function(f){if(this._showRoot){f._depth=0;this._generate([f],0)}else e._treeModel.getChildren(f,function(h){e._generate(h,0)})})},_generate:function(a,c){b.empty(this._parent);var e=document.createElement("table");e.id=this._id;this._renderer.initTable(e,this);var f=document.createElement("tbody");f.id=this._id+"tbody";this._generateChildren(a,c,f,"last");e.appendChild(f);this._parent.appendChild(e);this._rowsChanged()},_generateChildren:function(a,
c,e,f){for(var h in a){var k=document.createElement("tr");k.id=this._treeModel.getId(a[h]);k._depth=c;k._item=a[h];this._renderer.render(a[h],k);b.style(k.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*c+"px");b.place(k,e,f);if(f==="after")e=k}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(a,c,e,f,h,k){var j=this._treeModel.getId(a),g;if(j===this._id){this._removeChildRows(j);
this._generateChildren(c,0,b.byId(j+"tbody"),"last");this._rowsChanged()}else{var i=b.byId(j);if(i){i._item=a;if(i&&(e||i._expanded)){i._expanded=true;this._removeChildRows(j);if(c){this._generateChildren(c,i._depth+1,i,"after");this._rowsChanged();if(f&&h){a=b.byId(f);b.addClass(a,h);k&&b.removeClass(a,k)}}else{g=this;c=this._treeModel.getChildren(i._item,function(l){g._generateChildren(l,i._depth+1,i,"after");g._rowsChanged()})}}}else console.log("could not find table row "+j)}},refreshAndExpand:function(a,
c,e,f,h){this.refresh(a,c,true,e,f,h)},getItem:function(a){if(typeof a==="string"){var c=b.byId(a);if(c)return c._item}if(a._item)return a._item;return a},toggle:function(a,c,e,f){var h=b.byId(a);if(h)if(h._expanded){this.collapse(a);if(c){a=b.byId(c);b.addClass(a,f);b.removeClass(a,e)}}else{this.expand(a);if(c){a=b.byId(c);b.addClass(a,e);b.removeClass(a,f)}}},isExpanded:function(a){if(a=b.byId(a))return a._expanded;return false},expand:function(a,c,e){a=typeof a==="string"?a:this._treeModel.getId(a);
var f=b.byId(a);if(f)if(!f._expanded){f._expanded=true;var h=this;this._treeModel.getChildren(f._item,function(k){h._generateChildren(k,f._depth+1,f,"after");h._rowsChanged();c&&c.apply(this,e)})}},_removeChildRows:function(a){b.byId(this._id);var c=a===this._id,e=false,f=-1,h=[];b.query(".treeTableRow").forEach(function(g){if(!e)if(c)if(g._depth>f)h.push(g);else e=true;else if(g.id===a){c=true;f=g._depth}});for(var k in h){var j=h[k];j.parentNode.removeChild(j)}},collapse:function(a){a=typeof a===
"string"?a:this._treeModel.getId(a);var c=b.byId(a);if(c)if(c._expanded){c._expanded=false;this._removeChildRows(a);this._rowsChanged()}}};d.prototype.constructor=d;return{TableTree:d}});
define("orion/explorer",["require","dojo","orion/treetable"],function(b,d,a){var c={};c.Explorer=function(){function e(f,h,k){this.registry=f;this.renderer=k;this.selection=h;this.myTree=null}e.prototype={changedItem:function(f,h){d.hitch(this.myTree,this.myTree.refreshAndExpand)(f,h)},updateCommands:function(f){this.myTree&&d.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(f))},makeNewItemPlaceHolder:function(f,h,k){f=this.getRow(f);if(k){f=f.childNodes[k];d.place("<br><span id='"+
h+"placeHolderRow'></span>",f,"last");if(k=d.byId(h+"placeHolderRow"))return{tempNode:k,refNode:k}}if(f){d.place("<tr id='"+h+"placeHolderRow'><td id='"+h+"placeHolderCol'></td>",f,"after");k=d.byId(h+"placeHolderRow");f=d.byId(h+"placeHolderCol");if(k&&f)return{tempNode:k,refNode:f}}return null},getRow:function(f){if(f=this.model.getId(f))return d.byId(f)},createTree:function(f,h){var k=f+"innerTree",j=d.byId(k);j&&d.destroy(j);if(h)h.rootId=k;this.model=h;this.myTree=new a.TableTree({id:k,model:h,
showRoot:false,parent:f,labelColumnIndex:this.checkbox?1:0,renderer:this.renderer});this.renderer._initializeUIState()},getRootPath:function(){if(this.model&&this.model.root)return this.model.root.Location;return null},_lastHash:null,checkbox:this.checkbox||true};return e}();c.ExplorerModel=function(){function e(f,h){this.rootPath=f;this.fetchItems=h}e.prototype={destroy:function(){},getRoot:function(f){this.fetchItems(this.rootPath).then(d.hitch(this,function(h){this.root=h;f(h)}))},getChildren:function(f,
h){if(f.Children)h(f.Children);else f.ChildrenLocation?this.fetchItems(f.ChildrenLocation).then(d.hitch(this,function(k){f.Children=k;h(k)})):h([])},getId:function(f){if(f===this.root)f=this.rootId;else{f=f.Location;f=f.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}return f}};return e}();c.ExplorerFlatModel=function(){function e(f,h,k){this.rootPath=f;this.fetchItems=h;this.root=k}e.prototype=new c.ExplorerModel;e.prototype.getRoot=function(f){this.root?f(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,
function(h){this.root=h;f(h)}))};e.prototype.getChildren=function(f,h){f===this.root?h(this.root):h([])};return e}();c.ExplorerRenderer=function(){function e(f,h){this.explorer=h;this._init(f);this._expandImageClass="core-sprite-twistie_open";this._collapseImageClass="core-sprite-twistie_closed"}e.prototype={initTable:function(f,h){this.tableTree=h;d.empty(f);d.addClass(f,"treetable");this.renderTableHeader(f)},getActionsColumn:function(f,h){d.connect(h,"onmouseover",h,function(){var g=d.byId(this.id+
"actionswrapper");d.style(g,"visibility","visible")});d.connect(h,"onmouseout",h,function(){var g=d.byId(this.id+"actionswrapper");d.style(g,"visibility","hidden")});var k=document.createElement("td");k.id=h.id+"actions";var j=document.createElement("span");j.id=h.id+"actionswrapper";k.appendChild(j);d.style(j,"visibility","hidden");this.explorer.registry.getService("orion.page.command").then(function(g){g.renderCommands(j,"object",f,this.explorer,"image")});return k},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(f,h){if(this._useCheckboxSelection){f=document.createElement("td");d.addClass(f,"secondaryColumn");var k=document.createElement("input");d.style(k,"verticalAlign","middle");k.type="checkbox";k.id=h.id+"selectedState";d.addClass(k,"selectionCheckmark");k.itemId=h.id;f.appendChild(k);d.connect(k,"onclick",d.hitch(this,function(j){d.toggleClass(h,"checkedRow",!!j.target.checked);this._storeSelections();this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())}));
return f}},_storeSelections:function(){var f=this.getSelectedIds(),h=this._getUIStatePreferencePath();if(h&&window.sessionStorage)window.sessionStorage[h+"selection"]=JSON.stringify(f)},_restoreSelections:function(f){f=window.sessionStorage[f+"selection"];if(typeof f==="string")f=f.length>0?JSON.parse(f):null;var h;if(f)for(h=0;h<f.length;h++){var k=d.byId(f[h]);if(k){d.addClass(k,"checkedRow");if(k=d.byId(k.id+"selectedState"))k.checked=true}}f=this.getSelected();this.explorer.selection&&this.explorer.selection.setSelections(f)},
_storeExpansions:function(f){window.sessionStorage[f+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(f){var h=false,k=window.sessionStorage[f+"expanded"];if(typeof k==="string")k=k.length>0?JSON.parse(k):null;var j;if(k)for(j=0;j<k.length;j++)if(d.byId(k[j])){this._expanded.push(k[j]);this.tableTree.expand(k[j],d.hitch(this,function(){this._restoreSelections(f)}));h=true}return!h},_getUIStatePreferencePath:function(){if(this.explorer){var f=this.explorer.getRootPath();if(this._cachePrefix&&
f)return"/"+this._cachePrefix+"/"+f.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(f){return f+"__expand"},getExpandImage:function(f,h,k,j){var g=d.create("span",{id:this.expandCollapseImageId(f.id)},h,"last");d.addClass(g,"imageSprite");d.addClass(g,this._collapseImageClass);h=d.create("span",null,h,"last");d.addClass(h,j||"imageSprite");d.addClass(h,k||"core-sprite-folder");g.onclick=d.hitch(this,function(){this.tableTree.toggle(f.id,this.expandCollapseImageId(f.id),
this._expandImageClass,this._collapseImageClass);if(this.tableTree.isExpanded(f.id))this._expanded.push(f.id);else for(var i in this._expanded)if(this._expanded[i]===f.id){this._expanded.splice(i,1);break}(i=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(i)});return g},render:function(f,h){h.cellSpacing="8px";this.renderRow(f,h)},getSelected:function(){var f=[];d.query(".selectionCheckmark").forEach(d.hitch(this,function(h){h.checked&&f.push(this.tableTree.getItem(h.parentNode.parentNode))}));
return f},getSelectedIds:function(){var f=[];d.query(".selectionCheckmark").forEach(d.hitch(this,function(h){h.checked&&f.push(h.parentNode.parentNode.id)}));return f},rowsChanged:function(){d.query(".treeTableRow").forEach(function(f,h){if(h%2){d.addClass(f,"darkTreeTableRow");d.removeClass(f,"lightTreeTableRow")}else{d.addClass(f,"lightTreeTableRow");d.removeClass(f,"darkTreeTableRow")}});this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},updateCommands:function(){var f=
this.explorer.registry;d.query(".treeTableRow").forEach(function(h){var k=d.byId(h.id+"actionswrapper");d.empty(k);f.getService("orion.page.command").then(function(j){j.renderCommands(k,"object",h._item,this.explorer,"image")})})},_init:function(f){if(f){this._useCheckboxSelection=f.checkbox===undefined?false:f.checkbox;this._colums=f.colums||[];this._cachePrefix=f.cachePrefix}},_initializeUIState:function(){this._expanded=[];var f=this._getUIStatePreferencePath();f&&window.sessionStorage&&this._restoreExpansions(f)&&
this._restoreSelections(f)}};return e}();c.SelectionRenderer=function(){function e(f,h){this._init(f);this.explorer=h}e.prototype=new c.ExplorerRenderer;e.prototype.renderTableHeader=function(f){var h=document.createElement("thead"),k=document.createElement("tr");d.addClass(h,"navTableHeading");this._useCheckboxSelection&&k.appendChild(this.initCheckboxColumn(f));for(var j=0,g=this.getCellHeaderElement(j);g;){d.addClass(g,"navColumn");k.appendChild(g);g=this.getCellHeaderElement(++j)}h.appendChild(k);
f.appendChild(h)};e.prototype.renderRow=function(f,h){d.style(h,"verticalAlign","baseline");d.addClass(h,"treeTableRow");var k=this.getCheckboxColumn(f,h);k&&h.appendChild(k);k=0;for(var j=this.getCellElement(k,f,h);j;){h.appendChild(j);d.addClass(j,"secondaryColumn");j=this.getCellElement(++k,f,h)}};e.prototype.getCellHeaderElement=function(){};e.prototype.getCellElement=function(){};return e}();return c});
define("orion/searchExplorer",["require","dojo","dijit","orion/explorer","orion/util","orion/fileClient","orion/commands"],function(b,d,a,c,e,f,h){function k(i,l,o,n,m){this.registry=i;this.fileClient=l;this._resultLocation=o;this.searchStr=n.toLowerCase();this._treeRoot={isRoot:true,children:[]};this._listRoot={isRoot:true,children:[]};this.indexedFileItems=this.currentDetail=null;this.modelLocHash=[];this._lineDelimiter="\n";this.explorer=m}function j(i,l){this._init(i);this.explorer=l}function g(i,
l,o,n,m){this.parentNode=n;this.registry=i;this._commandService=l;this.fileClient=new f.FileClient(this.registry);this.checkbox=false;this.renderer=new j({checkbox:false},this);this.model=new k(i,this.fileClient,o,m,this)}k.prototype=new c.ExplorerModel;k.prototype.setCurrent=function(i,l){this.currentFileIndex=i;this.currentDetailIndex=l;this.storeStatus()};k.prototype.storeStatus=function(){window.sessionStorage[this.searchStr+"_search_result_useFlatList"]=JSON.stringify(this.useFlatList);window.sessionStorage[this.searchStr+
"_search_result_currentFileIndex"]=JSON.stringify(this.currentFileIndex);window.sessionStorage[this.searchStr+"_search_result_currentDetailIndex"]=JSON.stringify(this.currentDetailIndex)};k.prototype.restoreStatus=function(){this.useFlatList=false;var i=window.sessionStorage[this.searchStr+"_search_result_useFlatList"];if(typeof i==="string")if(i.length>0)this.useFlatList=JSON.parse(i);this.currentFileIndex=0;i=window.sessionStorage[this.searchStr+"_search_result_currentFileIndex"];if(typeof i===
"string")if(i.length>0)this.currentFileIndex=JSON.parse(i);if(this.currentFileIndex<0||this.currentFileIndex>=this.indexedFileItems.length)this.currentFileIndex=0;this.currentDetailIndex=0;i=window.sessionStorage[this.searchStr+"_search_result_currentDetailIndex"];if(typeof i==="string")if(i.length>0)this.currentDetailIndex=JSON.parse(i)};k.prototype.getRealRoot=function(){return this.useFlatList?this._listRoot:this._treeRoot};k.prototype.getRoot=function(i){i(this.getRealRoot())};k.prototype.markUpSharedParent=
function(i,l){if(this.sharedParentHash[i.Location]){var o=this.sharedParentHash[i.Location];if(typeof o==="string")if(o!==l)this.sharedParentHash[i.Location]=2}else this.sharedParentHash[i.Location]=l};k.prototype.preparecompressHash=function(){this.sharedParentHash=[];for(var i=0;i<this._resultLocation.length;i++){var l=this._resultLocation[i].metaData.Parents;if(l.length!==0)for(var o=this._resultLocation[i].location,n=0;n<l.length;n++){var m=l[n];this.markUpSharedParent(m,o);o=m.Location}}};k.prototype.compressParents=
function(i,l,o){if(i.length!==0)if(!(l>i.length-1)){var n=i[l].Name,m=i[l].Location,p=l+1,s=false;if(p<i.length)for(l=l+1;l<i.length;l++){p=l;if(this.sharedParentHash[i[l].Location]===2)break;else{n=i[l].Name+"/"+n;if(l===i.length-1)s=true}}o.push({Location:m,Name:n});s||this.compressParents(i,p,o)}};k.prototype.compressTree=function(){for(var i=0;i<this._resultLocation.length;i++)if(this._resultLocation[i].metaData){var l=this._resultLocation[i].metaData.Parents;if(l.length!==0){this.preparecompressHash();
var o=[];this.compressParents(l,0,o);this._resultLocation[i].metaData.compressedParents=o}}};k.prototype._findExistingParent=function(i,l){var o=this.modelLocHash[i[l].Location];if(o)return{parent:o,index:l};if(l===i.length-1)return null;return this._findExistingParent(i,l+1)};k.prototype.fullPathName=function(i,l){if(i&&i.parent)if(!i.parent.isRoot){l.name=i.parent.name+(l.name===""?"":"/")+l.name;i.parent&&this.fullPathName(i.parent,l)}};k.prototype.buildResultModelTree=function(i,l){l&&this.compressTree();
for(var o=0;o<this._resultLocation.length;o++)if(this._resultLocation[o].metaData){var n;n=l?this._resultLocation[o].metaData.compressedParents:this._resultLocation[o].metaData.Parents;var m=this._findExistingParent(n,0),p;if(m){p=m.parent;m=m.index}else{p=this._treeRoot;m=n.length}if(m>0)for(m=m-1;m>-1;m--){var s={parent:p,children:[],type:"dir",name:n[m].Name,location:n[m].Location};p.children.push(s);e.processSearchResultParent(p);p=this.modelLocHash[n[m].Location]=s}n={name:""};m={parent:p,type:"file",
name:this._resultLocation[o].name,linkLocation:this._resultLocation[o].linkLocation,location:this._resultLocation[o].location};this.fullPathName(m,n);m.fullPathName=n.name;this.modelLocHash[m.location]=m;p.children.push(m);e.processSearchResultParent(p)}this.prepareFileItems();this.restoreStatus();i()};k.prototype.loadOneFileMetaData=function(i,l){var o=this._resultLocation[i];this.fileClient.read(o.location,true).then(d.hitch(this,function(n){o.metaData=n;i===this._resultLocation.length-1?this.buildResultModelTree(l,
true):this.loadOneFileMetaData(i+1,l)}),d.hitch(this,function(n){console.error("Error loading file metadata: "+n.message);i===this._resultLocation.length-1?this.buildResultModelTree(l,true):this.loadOneFileMetaData(i+1,l)}))};k.prototype.prepareFileItems=function(){this.indexedFileItems=[];this.walkTreeNode(this._treeRoot);for(var i=0;i<this.indexedFileItems.length;i++)this._listRoot.children.push(this.indexedFileItems[i])};k.prototype.getFileItemIndex=function(i){for(var l=0;l<this.indexedFileItems.length;l++)if(i===
this.indexedFileItems[l])return l;return-1};k.prototype.getFileDetailItemIndex=function(i,l){if(i<0)return-1;i=this.indexedFileItems[i];if(i.children&&i.children.length>0)for(var o=0;o<i.children.length;o++)if(l===i.children[o])return o;return-1};k.prototype.walkTreeNode=function(i){if(i.children)for(var l=0;l<i.children.length;l++)this.walkTreeNode(i.children[l]);else i.type==="file"&&this.indexedFileItems.push(i)};k.prototype.getId=function(i){if(i===this.getRealRoot())i=this.rootId;else{i=i.location;
i=i.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}return i};k.prototype.searchOneline=function(i,l){var o;o=0;for(var n=false,m=[];;){o=i.indexOf(l,o);if(o<0)break;else{m.push({startIndex:o});n=true;o=o+l.length}}if(n)return m;return null};k.prototype.searchWithinFile=function(i,l,o){l=l.split(this._lineDelimiter);if(i){i.children=[];for(var n=0;n<l.length;n++){var m=l[n];if(m&&m.length>0)if(this.searchOneline(m.toLowerCase(),o)){var p=n+1;i.children.push({parent:i,type:"detail",name:p+" : "+m,linkLocation:i.linkLocation+
"?line="+p,location:i.location+"-"+p})}}i.name=i.name+" ("+i.children.length+" matches)"}};k.prototype._fileExpanded=function(i,l){i=this.indexedFileItems[i];if(i.children&&i.children.length>0){if(l<0)l=i.children.length-1;else if(l>=i.children.length)l=0;return{childrenNumber:i.children.length,childDiv:d.byId(this.getId(i.children[l]))}}return{childrenNumber:0,childDiv:null}};k.prototype.getChildren=function(i,l){if(i.children)l(i.children);else if(i.type==="detail")l([]);else i.type==="file"&&i.location?
this.fileClient.read(i.location).then(d.hitch(this,function(o){this.searchWithinFile(i,o,this.searchStr);o=this.getId(i);if(d.byId(o))(o=d.byId(o+"NameColumn"))&&d.place(document.createTextNode(i.name),o,"only");l(i.children);if(this.highlightSelectionLater)if(i===this.indexedFileItems[this.currentFileIndex]){if(this.currentDetailIndex<0)this.currentDetailIndex=i.children.length-1;else if(this.currentDetailIndex>=i.children.length)this.currentDetailIndex=0;o=this._fileExpanded(this.currentFileIndex,
this.currentDetailIndex);d.toggleClass(o.childDiv,"currentSearchMatch",true);this.explorer.visible(o.childDiv)||o.childDiv.scrollIntoView(!this.lastNavDirection);this.highlightSelectionLater=false}}),d.hitch(this,function(o){console.error("Error loading file content: "+o.message);l([])})):l([])};k.prototype.constructor=k;j.prototype=new c.SelectionRenderer;j.prototype.getCellHeaderElement=function(i){if(i===0)return d.create("th",{innerHTML:"<h2>Search Results</h2>"});else if(this.explorer.model.useFlatList&&
i===1)return d.create("th",{innerHTML:"<h2>Location</h2>"})};j.prototype.getCellElement=function(i,l,o){switch(i){case 0:var n;if(l.type==="dir"){i=document.createElement("td");n=d.create("span",null,i,"only");this.getExpandImage(o,n);o=d.create("span",{id:o.id+"NameColumn"},n,"last")}else{i=document.createElement("td");var m=l.linkLocation;n=d.create("span",null,i,"only");if(l.type==="file")this.getExpandImage(o,n,"core-sprite-file");else{var p=this;d.connect(o,"onclick",o,function(){var q=p.explorer.model.getFileItemIndex(l.parent);
if(q>-1){var t=p.explorer.model.getFileDetailItemIndex(q,l);if(t>-1)if(!(p.explorer.model.currentFileIndex===q&&p.explorer.model.currentDetailIndex===t)){var C=p.explorer.model._fileExpanded(p.explorer.model.currentFileIndex,p.explorer.model.currentDetailIndex);C.childDiv&&d.toggleClass(C.childDiv,"currentSearchMatch",false);p.explorer.model.setCurrent(q,t);C=p.explorer.model._fileExpanded(p.explorer.model.currentFileIndex,p.explorer.model.currentDetailIndex);d.toggleClass(C.childDiv,"currentSearchMatch",
true)}}});var s=d.create("span",null,n,"last");d.addClass(s,"imageSprite");d.addClass(s,"core-sprite-none");s=d.create("span",null,n,"last");d.addClass(s,"imageSprite");d.addClass(s,"core-sprite-rightarrow")}o=d.create("a",{className:"navlink",id:o.id+"NameColumn",href:m},n,"last")}d.place(document.createTextNode(l.name),o,"only");return i;case 1:if(this.explorer.model.useFlatList&&l.type==="file"){i=document.createElement("td");n=d.create("span",null,i,"only");d.place(document.createTextNode(l.fullPathName),
n,"only");return i}}};j.prototype.constructor=j;g.prototype=new c.Explorer;g.prototype.onchange=function(){};g.prototype.initCommands=function(){var i=this,l=new h.Command({name:"Next result",imageClass:"core-sprite-move_down",id:"orion.search.nextResult",groupId:"orion.searchGroup",callback:function(){i.gotoNext(true,true)}}),o=new h.Command({name:"Previous result",imageClass:"core-sprite-move_up",id:"orion.search.prevResult",groupId:"orion.searchGroup",callback:function(){i.gotoNext(false,true)}}),
n=new h.Command({name:"Expand all results",imageClass:"core-sprite-expandAll",id:"orion.search.expandAll",groupId:"orion.searchGroup",callback:function(){i.expandAll()}}),m=new h.Command({name:"Collapse all results",imageClass:"core-sprite-collapseAll",id:"orion.search.collapseAll",groupId:"orion.searchGroup",callback:function(){i.collapseAll()}});this._commandService.addCommand(l,"dom");this._commandService.addCommand(o,"dom");this._commandService.addCommand(n,"dom");this._commandService.addCommand(m,
"dom");this._commandService.registerCommandContribution("orion.search.nextResult",1,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.prevResult",2,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.expandAll",3,"pageActionsRight");this._commandService.registerCommandContribution("orion.search.collapseAll",4,"pageActionsRight");d.empty("pageActionsRight");this._commandService.renderCommands("pageActionsRight","dom",i,i,"image");(l=a.byId("globalSearchOptMenu"))&&
l.destroy();l=new a.Menu({style:"display: none;",id:"globalSearchOptMenu"});l.addChild(new a.CheckedMenuItem({label:"Show as List",checked:i.model.useFlatList,onChange:function(p){i.switchTo(p)}}));l=new a.form.DropDownButton({label:"Options",dropDown:l});d.addClass(l.domNode,"commandImage");d.place(l.domNode,"pageActionsRight","last")};g.prototype.startUp=function(){var i=this;this.model.loadOneFileMetaData(0,function(){i.initCommands();i.createTree(i.parentNode,i.model);i.gotoCurrent()})};g.prototype.switchTo=
function(i){this.model.useFlatList=i;this.model.storeStatus();this.createTree(this.parentNode,this.model);this.gotoCurrent()};g.prototype.expandAll=function(){var i=this.model.getRealRoot();if(i.isRoot)for(var l=0;l<i.children.length;l++)this.expandRecursively(i.children[l]);else this.expandRecursively(i);this.gotoCurrent()};g.prototype.collapseAll=function(){var i=this.model.getRealRoot();if(i.isRoot)for(var l=0;l<i.children.length;l++)this.myTree.collapse(i.children[l]);else this.myTree.collapse(i)};
g.prototype.expandRecursively=function(i){if(i.type!=="detail"){this.myTree.expand(i);i=i.children;if(!(i===undefined||i===null))for(var l=i.length,o=0;o<l;o++)this.expandRecursively(i[o])}};g.prototype.findUIParentChain=function(i,l){l.push(i);var o=this.model.getId(i);if(d.byId(o))return l;this.findUIParentChain(i.parent,l)};g.prototype._decideNext=function(i,l){if(!l)return{newFileIndex:this.model.currentFileIndex,newDetailIndex:this.model.currentDetailIndex};l=this.model.indexedFileItems[this.model.currentFileIndex];
if(l.children&&l.children.length>0){i=i?this.model.currentDetailIndex+1:this.model.currentDetailIndex-1;if(i<0){l=this.model.currentFileIndex-1;i=-1}else if(i>l.children.length-1){l=this.model.currentFileIndex+1;i=0}else l=this.model.currentFileIndex;if(l<0)l=this.model.indexedFileItems.length-1;else if(l>=this.model.indexedFileItems.length)l=0;return{newFileIndex:l,newDetailIndex:i}}return null};g.prototype.visible=function(i){if(i.offsetWidth===0||i.offsetHeight===0)return false;var l=d.byId("orion.innerSearchResults").getClientRects()[0];
i=i.getClientRects();for(var o=0,n=i.length;o<n;o++){var m=i[o];if(m.top>=l.top&&m.top<=l.bottom&&m.bottom>=l.top&&m.bottom<=l.bottom)return true}return false};g.prototype.gotoCurrent=function(){this.gotoNext(true,false)};g.prototype.gotoNext=function(i,l){var o=this.model._fileExpanded(this.model.currentFileIndex,this.model.currentDetailIndex);o.childDiv&&d.toggleClass(o.childDiv,"currentSearchMatch",false);l=this._decideNext(i,l);this.model.highlightSelectionLater=true;this.model.lastNavDirection=
i;if(l){o=this.model._fileExpanded(l.newFileIndex,l.newDetailIndex);this.model.setCurrent(l.newFileIndex,l.newDetailIndex);if(o.childrenNumber>0){this.model.highlightSelectionLater=false;if(l.newDetailIndex<0)this.model.setCurrent(l.newFileIndex,o.childrenNumber-1);else l.newDetailIndex>=o.childrenNumber&&this.model.setCurrent(l.newFileIndex,0)}if(o.childDiv){d.toggleClass(o.childDiv,"currentSearchMatch",true);this.visible(o.childDiv)||o.childDiv.scrollIntoView(!i);return}}l=[];this.findUIParentChain(this.model.indexedFileItems[this.model.currentFileIndex],
l);for(o=l.length-1;o>-1;o--)this.myTree.expand(l[o]);if(!this.model.highlightSelectionLater){l=this.model._fileExpanded(this.model.currentFileIndex,this.model.currentDetailIndex);d.toggleClass(l.childDiv,"currentSearchMatch",true);this.visible(l.childDiv)||l.childDiv.scrollIntoView(!i)}};g.prototype.constructor=g;return{SearchResultExplorer:g}});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(d,a,c){var e=document.cookie;if(arguments.length==1){var f=e.match(new RegExp("(?:^|; )"+b.regexp.escapeString(d)+"=([^;]*)"));return f?decodeURIComponent(f[1]):undefined}else{c=c||{};e=c.expires;if(typeof e=="number"){var h=new Date;h.setTime(h.getTime()+e*24*60*60*1E3);e=c.expires=h}if(e&&e.toUTCString)c.expires=e.toUTCString();a=encodeURIComponent(a);e=d+"="+a;for(f in c){e+="; "+f;h=c[f];if(h!==true)e+="="+h}document.cookie=
e}};b.cookie.isSupported=function(){if(!("cookieEnabled"in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1})}return navigator.cookieEnabled};return b.cookie});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,d){b.declare("dijit.layout.BorderContainer",d.layout._LayoutWidget,{design:"headline",gutters:true,liveSplitters:true,persist:false,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){if(!this._started){b.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var c=a.region;if(c){this.inherited(arguments);b.addClass(a.domNode,this.baseClass+"Pane");var e=this.isLeftToRight();if(c=="leading")c=e?"left":"right";if(c=="trailing")c=e?"right":"left";if(c!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget){var f=b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter");e=new f({id:a.id+"_splitter",container:this,child:a,region:c,live:this.liveSplitters});e.isSplitter=
true;a._splitterWidget=e;b.place(e.domNode,a.domNode,"after");e.startup()}a.region=c}},layout:function(){this._layoutChildren()},addChild:function(){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var c=a.region,e=a._splitterWidget;if(e){e.destroy();delete a._splitterWidget}this.inherited(arguments);this._started&&this._layoutChildren();b.removeClass(a.domNode,this.baseClass+"Pane");b.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});
b.style(a.domNode,c=="top"||c=="bottom"?"width":"height","auto")},getChildren:function(){return b.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return b.filter(this.getChildren(),function(c){return c.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=b.getComputedStyle(a);this.pe=b._getPadExtents(a,this.cs);this.pe.r=b._toPixelValue(a,this.cs.paddingRight);this.pe.b=b._toPixelValue(a,this.cs.paddingBottom);
b.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,c){if(this._borderBox&&this._borderBox.h){var e=b.map(this.getChildren(),function(h,k){return{pane:h,weight:[h.region=="center"?Infinity:0,h.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(h.region)?1:-1),k]}},this);e.sort(function(h,k){h=h.weight;k=k.weight;for(var j=0;j<h.length;j++)if(h[j]!=k[j])return h[j]-k[j];return 0});var f=[];b.forEach(e,function(h){h=h.pane;f.push(h);h._splitterWidget&&f.push(h._splitterWidget)});
d.layout.layoutChildren(this.domNode,{l:this.pe.l,t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},f,a,c)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var c=a._splitterWidget;c&&c.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(d._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});b.declare("dijit.layout._Splitter",[d._Widget,d._Templated],{live:true,templateString:'<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',
postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=b.cookie(this._cookieName);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",c=b.marginBox(this.child.domNode)[a],e=b.filter(this.container.getChildren(),function(f){return f.region=="center"})[0];a=b.marginBox(e.domNode)[a];return Math.min(this.child.maxSize,c+a)},_startDrag:function(a){if(!this.cover){this.cover=b.doc.createElement("div");b.addClass(this.cover,"dijitSplitterCover");b.place(this.cover,this.child.domNode,"after")}b.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");
b.addClass(this.domNode,"dijitSplitterShadow");b.place(this.fake,this.domNode,"after")}b.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake)b.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var c=this._factor,e=this.horizontal,f=e?"pageY":"pageX",h=a[f],k=this.domNode.style;e=e?"h":"w";var j=b.marginBox(this.child.domNode)[e],g=this._computeMaxSize(),i=this.child.minSize||20;e=this.region;var l=e==
"top"||e=="bottom"?"top":"left",o=parseInt(k[l],10),n=this._resize,m=b.hitch(this.container,"_layoutChildren",this.child.id);e=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(e,"onmousemove",this._drag=function(p,s){p=p[f]-h;var q=c*p+j,t=Math.max(Math.min(q,g),i);if(n||s)m(t);k[l]=p+o+c*(t-q)+"px"}),b.connect(e,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(e,"onmouseup",this,"_stopDrag")]);b.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||
a.type=="mouseenter";b.toggleClass(this.domNode,"dijitSplitterHover",a);b.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&b.removeClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);b.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow");this._drag(a);this._drag(a,true)}finally{this._cleanupHandlers();delete this._drag}if(this.container.persist)b.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){b.forEach(this._handlers,b.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=true;var c=this.horizontal,e=1,f=b.keys;switch(a.charOrCode){case c?f.UP_ARROW:f.LEFT_ARROW:e*=-1;case c?f.DOWN_ARROW:f.RIGHT_ARROW:break;default:return}c=b._getMarginSize(this.child.domNode)[c?"h":"w"]+this._factor*e;this.container._layoutChildren(this.child.id,Math.max(Math.min(c,this._computeMaxSize()),
this.child.minSize));b.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});b.declare("dijit.layout._Gutter",[d._Widget,d._Templated],{templateString:'<div class="dijitGutter" role="presentation"></div>',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return d.layout.BorderContainer});
define("orion/searchClient",["require","dojo","dijit","orion/auth","orion/util","orion/searchExplorer","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(b,d,a,c,e,f){function h(k){this.registry=k.serviceRegistry;this._commandService=k.commandService}h.prototype={search:function(k,j,g,i,l,o,n){d.xhrGet({url:j,handleAs:"json",headers:{Accept:"application/json","Orion-Version":"1"},sync:false,timeout:15E3,error:function(m,p){var s=this;c.handleAuthenticationError(p.xhr,
function(){d.xhrGet(s)})},load:d.hitch(this,function(m){this.showSearchResult(k,j,g,i,l,o,n,m)})})},handleError:function(k,j){console.error(k);var g=document.createTextNode(k);d.place(g,j,"only");return k},saveSearch:function(k,j){this.registry.getService("orion.core.favorite").then(function(g){g.addFavoriteSearch(k,j)})},createSearchQuery:function(k,j,g){if(g){j=/\*$/.test(g)?"":"*";return k+"Name:"+this._luceneEscape(g,true)+j}return k+this._luceneEscape(j)},_luceneEscape:function(k,j){var g="";
j='+-&|!(){}[]^"~:\\'+(!j?"*?":"");for(var i=0;i<k.length;i++){var l=k.charAt(i);if(j.indexOf(l)>=0)g+="\\";g+=l}return g},formatHighlight:function(k){k=k.split(/(##match|match##)/);for(var j=d.create("div"),g,i=0;i<k.length;i++){var l=k[i];if(l==="##match")g=d.create("b");else if(l==="match##"){d.place(g,j,"last");g=null}else d.place(document.createTextNode(l),g||j,"last")}return j},showSearchResult:function(k,j,g,i,l,o,n,m){n?this.showSearchResultInList(k,j,g,i,l,o,m):this.showSearchResultInTree(k,
j,g,i,l,o,m)},showSearchResultInTree:function(k,j,g,i,l,o,n){window.location.href.split("#");o=false;var m=[];d.empty(k);i=n.responseHeader.params.q;i=i.substring(i.indexOf("}")+1);if(n.response.numFound>0){for(var p=0;p<n.response.docs.length;p++){var s=n.response.docs[p];if(!s.Directory&&s.Location!==g){o||(o=true);var q;q=i&&s.LineNumber?e.hashFromPosition(s.Location,null,null,s.LineNumber,s.Offset,i.length):s.Location;m.push({linkLocation:b.toUrl("edit/edit.html")+"#"+q,location:q,name:s.Name})}}typeof l===
"function"&&l(k)}if(o)(new f.SearchResultExplorer(this.registry,this._commandService,m,k,j.split("q=")[1])).startUp();else{k=d.place("<div>No matches found for </div>",k,"only");k=d.create("b",null,k,"last");d.place(document.createTextNode(i),k,"only")}},showSearchResultInList:function(k,j,g,i,l,o,n){window.location.href.split("#");var m=false;d.empty(k);j=n.responseHeader.params.q;j=j.substring(j.indexOf("}")+1);if(n.response.numFound>0){for(var p=document.createElement("table"),s=0;s<n.response.docs.length;s++){var q=
n.response.docs[s];if(!q.Directory&&q.Location!==g){var t;if(!m){m=true;if(i){t=p.insertRow(0).insertCell(0);t.innerHTML="<h2>Search Results</h2>"}}t=p.insertRow(-1).insertCell(0);t.colspan=2;var C=document.createElement("a");d.place(document.createTextNode(q.Name),C);q.LineNumber&&d.place(document.createTextNode(" (Line "+q.LineNumber+")"),C);var D;D=j&&q.LineNumber?e.hashFromPosition(q.Location,null,null,q.LineNumber,q.Offset,j.length):q.Location;C.setAttribute("href",b.toUrl("edit/edit.html")+
"#"+D);t.appendChild(C);if(!o&&n.highlighting&&n.highlighting[q.Id]&&n.highlighting[q.Id].Text){q=n.highlighting[q.Id].Text[0];t=p.insertRow(-1).insertCell(0);t.colspan=2;d.place(this.formatHighlight(q),t,"only")}}}d.place(p,k,"last");typeof l==="function"&&l(k)}if(!m){k=d.place("<div>No matches found for </div>",k,"only");k=d.create("b",null,k,"last");d.place(document.createTextNode(j),k,"only")}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/dialogs",[],function(){function b(d){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.dialog",this)}b.prototype={confirm:function(d,a){a(window.confirm(d))},openFiles:function(){}};b.prototype.constructor=b;return{DialogService:b}});
define("orion/siteService",["require","dojo","orion/auth"],function(b,d,a){function c(e){this._serviceRegistration=e.registerService("org.eclipse.orion.sites.siteManagement",this);var f=this.getContext();e=e.getServiceReferences("orion.core.file");for(var h=0;h<e.length;h++){var k=e[h].getProperty("top");if(k&&this.toFullUrl(k).indexOf(f)===0){this.filePrefix=k;break}}}c.prototype={getSiteConfigurations:function(){return this._doServiceCall("getSiteConfigurations",arguments)},loadSiteConfiguration:function(){return this._doServiceCall("loadSiteConfiguration",
arguments)},createSiteConfiguration:function(){return this._doServiceCall("createSiteConfiguration",arguments)},updateSiteConfiguration:function(){return this._doServiceCall("updateSiteConfiguration",arguments)},deleteSiteConfiguration:function(){return this._doServiceCall("deleteSiteConfiguration",arguments)},_serviceImpl:{getSiteConfigurations:function(){var e=b.toUrl("site._");e=e.substring(0,e.length-2);return d.xhrGet({url:e,preventCache:true,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3}).then(function(f){return f.SiteConfigurations})},
loadSiteConfiguration:function(e){return d.xhrGet({url:e,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3})},createSiteConfiguration:function(e,f,h,k){function j(g){return g.replace(/ /g,"-").replace(/[^A-Za-z0-9-_]/g,"").toLowerCase()}e={Name:e,Workspace:f,HostHint:j(e)};if(h)e.Mappings=h;if(k)e.HostHint=k;h=b.toUrl("site._");h=h.substring(0,h.length-2);return d.xhrPost({url:h,postData:d.toJson(e),headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},handleAs:"json",
timeout:15E3})},updateSiteConfiguration:function(e,f){return d.xhrPut({url:e,putData:d.toJson(f),headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},handleAs:"json",timeout:15E3})},deleteSiteConfiguration:function(e){return d.xhrDelete({url:e,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3})}},_doServiceCall:function(e,f){var h=this._serviceImpl,k=this._serviceImpl[e],j=new d.Deferred;k.apply(h,f).then(function(g){j.callback(g)},function(g){g.status===401||g.status===
403?a.handleAuthenticationError(g,function(){k.apply(h,f).then(function(i){j.callback(i)},function(i){j.errback(i)})}):j.errback(g)});return j},_makeHostRelative:function(e){if(e.indexOf(":")!==-1)return e.substring(e.indexOf(window.location.host)+window.location.host.length);return e},getContext:function(){var e=this.toFullUrl(b.toUrl("._"));return e.substring(0,e.length-2)},toFullUrl:function(e){var f=document.createElement("a");f.href=e;return f.href},makeRelativeFilePath:function(e){var f=this._makeHostRelative(this.filePrefix);
e=this._makeHostRelative(e);var h;if(e.indexOf(f)===0)h=e.substring(f.length);if(h[h.length-1]==="/")h=h.substring(0,h.length-1);return h},makeFullFilePath:function(e){function f(k){return d.filter(k,function(j){return j!==""})}var h=b.toUrl(this.filePrefix+e+"._");h=h.substring(0,h.length-2);e=e.split("/");if(f(e).length===1)h+="/";return this.toFullUrl(h)}};c.prototype.constructor=c;return{SITE_SERVICE_NAME:"org.eclipse.orion.sites.siteManagement",SiteService:c}});
define("orion/siteUtils",["require","dojo","orion/commands","orion/util"],function(b,d,a,c){function e(g){return b.toUrl("sites/site.html")+"#"+c.makeRelative(g.Location)}function f(g){g=d.queryToObject(g);var i=d.mixin({},g);for(var l in g)if(g.hasOwnProperty(l))if(g[l]===""&&l!=="action"&&l!=="actionDetails"){i.site=l;delete i[l]}return i}function h(g,i,l){var o={};if(g)o[g]="";if(i)o.action=i;if(l)o.actionDetails=l;return d.objectToQuery(o)}function k(g,i,l,o,n,m,p,s){var q=new a.Command({name:"Edit",
tooltip:"Edit the site configuration",imageClass:"core-sprite-edit",id:"eclipse.site.edit",visibleWhen:function(t){return t.HostingStatus&&t.HostingStatus.Status==="stopped"},hrefCallback:e});g.addCommand(q,"object");q=new a.Command({name:"Start",tooltip:"Start the site",imageClass:"core-sprite-start",id:"eclipse.site.start",visibleWhen:function(t){return t.HostingStatus&&t.HostingStatus.Status==="stopped"},callback:function(t,C,D,u){C=u||{};C.HostingStatus={Status:"started"};t=i.updateSiteConfiguration(t.Location,
C);l.showWhile(t,"Starting...").then(n,s)}});g.addCommand(q,"object");q=new a.Command({name:"Stop",tooltip:"Stop the site",imageClass:"core-sprite-stop",id:"eclipse.site.stop",visibleWhen:function(t){return t.HostingStatus&&t.HostingStatus.Status==="started"},callback:function(t,C,D,u){C=u||{};C.HostingStatus={Status:"stopped"};C=i.updateSiteConfiguration(t.Location,C);l.showWhile(C,"Stopping "+t.Name+"...").then(m,s)}});g.addCommand(q,"object");q=new a.Command({name:"Delete",tooltip:"Delete the site configuration",
imageClass:"core-sprite-delete",id:"eclipse.site.delete",visibleWhen:function(t){return t.HostingStatus&&t.HostingStatus.Status==="stopped"},callback:function(t){o.confirm("Are you sure you want to delete the site configuration '"+t.Name+"'?",function(C){C&&i.deleteSiteConfiguration(t.Location).then(p,s)})}});g.addCommand(q,"object")}var j={};j.generateEditSiteHref=e;j.parseStateFromHash=f;j.stateToHash=h;j.createSiteCommands=k;return j});
define("orion/siteTree",["dojo","orion/siteUtils"],function(b,d){var a={};a.sites={};a.sites.SiteTreeModel=function(){function c(e,f){this._siteService=e;this._root={};this._id=f}c.prototype={getRoot:function(e){e(this._root)},getChildren:function(e,f){if(e.children)f(e.children);else if(e===this._root)this._siteService.getSiteConfigurations().then(function(h){e.children=h;f(h)});else return f([])},getId:function(e){return e===this._root||e===this._id?this._id:e.Id}};return c}();a.sites.SiteRenderer=
function(){function c(e){this._commandService=e}c.prototype={initTable:function(e,f){this.tableTree=f;b.addClass(e,"treetable");f=b.create("thead",null);b.create("th",{innerHTML:"Name"},f,"last");b.create("th",{innerHTML:"Status"},f,"last");b.create("th",{innerHTML:"Actions"},f,"last");e.appendChild(f)},render:function(e,f){b.style(f,"verticalAlign","baseline");b.addClass(f,"treeTableRow");var h=b.create("td",{id:f.id+"col1"}),k=b.create("td",{id:f.id+"col2"}),j=b.create("td",{id:f.id+"col3"}),g=
d.generateEditSiteHref(e);g=b.create("a",{href:g},h,"last");b.place(document.createTextNode(e.Name),g,"last");g=e.HostingStatus;if(typeof g==="object")if(g.Status==="started"){b.place(document.createTextNode("Started at "),k,"last");var i=b.create("a",null,k,"last");b.place(document.createTextNode(g.URL),i,"only");i.href=g.URL}else{g=g.Status.substring(0,1).toUpperCase()+g.Status.substring(1);b.place(document.createTextNode(g),k,"only")}else b.place(document.createTextNode("Unknown"),k,"only");var l=
b.create("span",{id:f.id+"actionswrapper",style:{visibility:"hidden"}},j,"only");b.connect(f,"onmouseover",f,function(){b.style(l,"visibility","visible")});b.connect(f,"onmouseout",f,function(){b.style(l,"visibility","hidden")});this._commandService.renderCommands(l,"object",e,{},"image");b.place(h,f,"last");b.place(k,f,"last");b.place(j,f,"last")},rowsChanged:function(){b.query(".treeTableRow").forEach(function(e,f){if(f%2){b.addClass(e,"darkTreeTableRow");b.removeClass(e,"lightTreeTableRow")}else{b.addClass(e,
"lightTreeTableRow");b.removeClass(e,"darkTreeTableRow")}})},labelColumnIndex:0};return c}();return a.sites});
define("orion/siteMappingsTable",["require","dojo","dijit","orion/util","orion/commands","orion/explorer"],function(b,d,a,c,e,f){function h(g,i){for(var l in i)if(i.hasOwnProperty(l))g[l]=i[l]}function k(g){return/^\//.test(g)}var j={};j.Model=function(){function g(i,l,o){this.rootPath=i;this.fetchItems=l;this.items=o}g.prototype=new f.ExplorerFlatModel;h(g.prototype,{getId:function(i){return i===this.root?this.rootId:"mapping_"+this.items.indexOf(i)}});return g}();j.Renderer=function(){function g(i,
l){this._init(i);this.options=i;this.explorer=l}g.prototype=new f.SelectionRenderer;h(g.prototype,{getCellHeaderElement:function(i){switch(i){case 0:i=d.create("th",{innerHTML:" "});d.addClass(i,"isValidColumn");return i;case 1:return d.create("th",{innerHTML:"Path"});case 2:return d.create("th",{innerHTML:"Mount at (server path)"});case 3:return d.create("th",{innerHTML:"Actions"})}},getCellElement:function(i,l,o){switch(i){case 0:return this.getIsValidCell(i,l,o);case 1:i=d.create("td");o=d.create("input");
d.addClass(o,"pathInput");o.value=l.FriendlyPath;o.onchange=d.hitch(this,function(n){this.options.onchange(l,"FriendlyPath",n.target.value,n)});d.place(o,i);return i;case 2:i=d.create("td");o=d.create("input");d.addClass(o,"serverPathInput");o.value=l.Source;o.onchange=d.hitch(this,function(n){this.options.onchange(l,"Source",n.target.value,n)});d.place(o,i);return i;case 3:return this.getActionsColumn(l,o)}},getIsValidCell:function(i,l){i=l.Target;var o=document.createElement("td"),n;if(k(i)){i=
this.options.siteService.makeFullFilePath(i);n=c.safeText(i);o.innerHTML='<span class="validating">&#8230;</span>';d.xhrGet({url:i,headers:{"Orion-Version":"1"},handleAs:"json"}).then(function(){o.innerHTML='<a href="'+n+'" target="_new"><span class="imageSprite core-sprite-folder" title="Workspace folder '+n+'"/></a>'},function(){o.innerHTML='<a href="'+n+'" target="_new"><span class="imageSprite core-sprite-error" title="Workspace folder not found: '+n+'"/></a>'})}else{n=c.safeText(i);o.innerHTML=
'<a href="'+n+'" target="_new"><span class="imageSprite core-sprite-link" title="External link to '+n+'"/></a>'}d.addClass(o,"isValidCell");return o}});return g}();j.MappingsTable=function(){function g(i,l,o,n,m,p){this.registry=i;i.getService("orion.page.command").then(d.hitch(this,function(s){this.commandService=s;this.registerCommands()}));this.siteService=l;this.parentId=n;this.selection=o;this.renderer=new j.Renderer({checkbox:false,onchange:d.hitch(this,this.fieldChanged),siteService:l},this);
this.myTree=null;this.siteConfiguration=m;this.projectsPromise=p;this.setDirty(false)}g.prototype=new f.Explorer;h(g.prototype,{startup:function(){var i=d.hitch(this,function(){var l=new d.Deferred;l.callback(this.siteConfiguration.Mappings);return l});d.when(this.projectsPromise,d.hitch(this,function(l){this.projects=l;this.siteConfiguration.Mappings=d.map(this.siteConfiguration.Mappings,d.hitch(this,function(o){return this.createMappingObject(o.Source,o.Target)}));this.createTree(this.parentId,
new j.Model(null,i,this.siteConfiguration.Mappings))}))},render:function(){this.changedItem(this.siteConfiguration.Mappings,this.siteConfiguration.Mappings)},registerCommands:function(){this.commandService.addCommand(new e.Command({name:"Delete",imageClass:"core-sprite-delete",id:"eclipse.site.mappings.remove",visibleWhen:function(i){return i.Source&&i.Target},callback:d.hitch(this,function(i){this.deleteMapping(i);this.render();this.setDirty(true)})}),"object");this.commandService.registerCommandContribution("eclipse.site.mappings.remove",
0);this.commandService.addCommand(new e.Command({name:"Move Up",imageClass:"core-sprite-move_up",id:"eclipse.site.mappings.moveUp",visibleWhen:d.hitch(this,function(i){return i.Source&&i.Target}),callback:d.hitch(this,function(i){var l=this.getItemIndex(i);if(l!==0){var o=this.siteConfiguration.Mappings[l-1];this.siteConfiguration.Mappings[l-1]=i;this.siteConfiguration.Mappings[l]=o;this.render();this.setDirty(true)}})}),"object");this.commandService.registerCommandContribution("eclipse.site.mappings.moveUp",
1);this.commandService.addCommand(new e.Command({name:"Move Down",imageClass:"core-sprite-move_down",id:"eclipse.site.mappings.moveDown",visibleWhen:d.hitch(this,function(i){return i.Source&&i.Target}),callback:d.hitch(this,function(i){var l=this.getItemIndex(i);if(l!==this.siteConfiguration.Mappings.length-1){var o=this.siteConfiguration.Mappings[l+1];this.siteConfiguration.Mappings[l+1]=i;this.siteConfiguration.Mappings[l]=o;this.render();this.setDirty(true)}})}),"object");this.commandService.registerCommandContribution("eclipse.site.mappings.moveDown",
2)},getItemIndex:function(i){return this.siteConfiguration.Mappings.indexOf(i)},_addMapping:function(i,l,o){i=this.safePath(typeof i==="string"?i:this.getNextMountPoint(o));l=this.safePath(typeof l==="string"?l:"/");this.mappingExists(i,l)||this.siteConfiguration.Mappings.push(this.createMappingObject(i,l))},addMapping:function(i,l,o){this._addMapping(i,l,o);this.render();this.setDirty(true)},addMappings:function(i){for(var l=0;l<i.length;l++)this._addMapping(i[l].Source,i[l].Target);this.render();
this.setDirty(true)},mappingExists:function(i,l){if(typeof i==="object"&&typeof l==="undefined"){l=i.Target;i=i.Source}for(var o=this.siteConfiguration.Mappings,n=0;n<o.length;n++)if(o[n].Source===i&&o[n].Target===l)return true;return false},getNextMountPoint:function(i){for(var l=this.siteConfiguration.Mappings,o=false,n=0;n<l.length;n++)if(l[n].Source==="/"){o=true;break}if(!o)return"/";if(!i)return"/web/somePath";i=i.split("/");for(n=i.length-1;n>=0;n--)if(!/\s+/.test(i[n]))return"/"+i[n];return"/web/somePath"},
createMappingObject:function(i,l){return{Source:i,Target:l,FriendlyPath:this.toFriendlyPath(l)}},deleteMapping:function(i){i=this.siteConfiguration.Mappings.indexOf(i);i!==-1&&this.siteConfiguration.Mappings.splice(i,1)},deleteAllMappings:function(){this.siteConfiguration.Mappings.splice(0,this.siteConfiguration.Mappings.length)},fieldChanged:function(i,l,o){o=this.safePath(o);if(i[l]!==o){i[l]=o;l==="FriendlyPath"&&this.propagate(o,i);this.render();this.setDirty(true)}},toFriendlyPath:function(i){var l;
if(k(i))for(var o=0;o<this.projects.length;o++){var n=this.projects[o],m="/"+n.Name;n=this.siteService.makeRelativeFilePath(n.Location);if(this.pathsMatch(i,n)){l=m+i.substring(n.length);break}}return l||i},propagate:function(i,l){if(k(i))for(var o=0;o<this.projects.length;o++){var n=this.projects[o],m="/"+n.Name;n=this.siteService.makeRelativeFilePath(n.Location);if(this.pathsMatch(i,m)){i=i.substring(m.length);l.Target=n+i;return}}l.Target=i},pathsMatch:function(i,l){return i===l||i.indexOf(l+"/")===
0},safePath:function(i){return i.replace(/[\r\n\t]/g,"")},setDirty:function(i){this._isDirty=i},isDirty:function(){return this._isDirty}});return g}();return j});define("text!dijit/templates/TreeNode.html",function(){return'<div class="dijitTreeNode" role="presentation"\n\t><div dojoAttachPoint="rowNode" class="dijitTreeRow" role="presentation" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick"\n\t\t><img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" role="presentation"\n\t\t/><span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" role="presentation"\n\t\t></span\n\t\t><span dojoAttachPoint="contentNode"\n\t\t\tclass="dijitTreeContent" role="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" role="presentation"\n\t\t\t/><span dojoAttachPoint="labelNode" class="dijitTreeLabel" role="treeitem" tabindex="-1" aria-selected="false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer" role="presentation" style="display: none;"></div>\n</div>'});
define("text!dijit/templates/Tree.html",function(){return'<div class="dijitTree dijitTreeContainer" role="tree"\n\tdojoAttachEvent="onkeypress:_onKeyPress">\n\t<div class="dijitInline dijitTreeIndent" style="position: absolute; top: -9999px" dojoAttachPoint="indentDetector"></div>\n</div>'});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(b,d){b.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(a){b.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw new Error("dijit.Tree: store must support dojo.data.Identity");if(a.getFeatures()["dojo.data.api.Notification"])this.connects=this.connects.concat([b.connect(a,
"onNew",this,"onNewItem"),b.connect(a,"onDelete",this,"onDeleteItem"),b.connect(a,"onSet",this,"onSetItem")])},destroy:function(){b.forEach(this.connects,b.disconnect)},getRoot:function(a,c){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:b.hitch(this,function(e){if(e.length!=1)throw new Error(this.declaredClass+": query "+b.toJson(this.query)+" returned "+e.length+" items, but must return exactly one item");this.root=e[0];a(this.root)}),onError:c})},mayHaveChildren:function(a){return b.some(this.childrenAttrs,
function(c){return this.store.hasAttribute(a,c)},this)},getChildren:function(a,c,e){var f=this.store;if(f.isItemLoaded(a)){for(var h=[],k=0;k<this.childrenAttrs.length;k++){var j=f.getValues(a,this.childrenAttrs[k]);h=h.concat(j)}var g=0;this.deferItemLoadingUntilExpand||b.forEach(h,function(l){f.isItemLoaded(l)||g++});g==0?c(h):b.forEach(h,function(l,o){f.isItemLoaded(l)||f.loadItem({item:l,onItem:function(n){h[o]=n;--g==0&&c(h)},onError:e})})}else{var i=b.hitch(this,arguments.callee);f.loadItem({item:a,
onItem:function(l){i(l,c,e)},onError:e})}},isItem:function(a){return this.store.isItem(a)},fetchItemByIdentity:function(a){this.store.fetchItemByIdentity(a)},getIdentity:function(a){return this.store.getIdentity(a)},getLabel:function(a){return this.labelAttr?this.store.getValue(a,this.labelAttr):this.store.getLabel(a)},newItem:function(a,c,e){var f={parent:c,attribute:this.childrenAttrs[0]},h;if(this.newItemIdAttr&&a[this.newItemIdAttr])this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(k){if(k)this.pasteItem(k,null,c,true,e);else(h=this.store.newItem(a,f))&&e!=undefined&&this.pasteItem(h,c,c,false,e)}});else(h=this.store.newItem(a,f))&&e!=undefined&&this.pasteItem(h,c,c,false,e)},pasteItem:function(a,c,e,f,h){var k=this.store,j=this.childrenAttrs[0];c&&b.forEach(this.childrenAttrs,function(i){if(k.containsValue(c,i,a)){if(!f){var l=b.filter(k.getValues(c,i),function(o){return o!=a});k.setValues(c,i,l)}j=i}});if(e)if(typeof h=="number"){var g=k.getValues(e,j).slice();
g.splice(h,0,a);k.setValues(e,j,g)}else k.setValues(e,j,k.getValues(e,j).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,c){c&&this.getChildren(c.item,b.hitch(this,function(e){this.onChildrenChange(c.item,e)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,c){b.indexOf(this.childrenAttrs,c)!=-1?this.getChildren(a,b.hitch(this,function(e){this.onChildrenChange(a,e)})):this.onChange(a)}});return d.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(b,d){b.declare("dijit.tree.ForestStoreModel",d.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:true,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===this.root||this.inherited(arguments)},getChildren:function(a,c,e){if(a===this.root)this.root.children?c(this.root.children):this.store.fetch({query:this.query,
onComplete:b.hitch(this,function(f){this.root.children=f;c(f)}),onError:e});else this.inherited(arguments)},isItem:function(a){return a===this.root?true:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var c=a.scope?a.scope:b.global;a.onItem&&a.onItem.call(c,this.root)}else this.inherited(arguments)},getIdentity:function(a){return a===this.root?this.root.id:this.inherited(arguments)},getLabel:function(a){return a===this.root?this.root.label:this.inherited(arguments)},
newItem:function(a,c){if(c===this.root){this.onNewRootItem(a);return this.store.newItem(a)}else return this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,c,e,f,h){if(c===this.root)f||this.onLeaveRoot(a);d.tree.TreeStoreModel.prototype.pasteItem.call(this,a,c===this.root?null:c,e===this.root?null:e,f,h);e===this.root&&this.onAddToRoot(a)},onAddToRoot:function(a){console.log(this,": item ",a," added to root")},onLeaveRoot:function(a){console.log(this,": item ",a," removed from root")},
_requeryTop:function(){var a=this.root.children||[];this.store.fetch({query:this.query,onComplete:b.hitch(this,function(c){this.root.children=c;if(a.length!=c.length||b.some(a,function(e,f){return c[f]!=e}))this.onChildrenChange(this.root,c)})})},onNewItem:function(){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){b.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(){this._requeryTop();this.inherited(arguments)}});return d.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(b){b.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&b.byId(a.dropParent);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");a&&a._skipStartup||this.startup();this.events=[b.connect(this.node,"onmouseover",this,"onMouseOver"),b.connect(this.node,
"onmouseout",this,"onMouseOut"),b.connect(this.node,"ondragstart",this,"onSelectStart"),b.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(d){return this.map[d]},setItem:function(d,a){this.map[d]=a},delItem:function(d){delete this.map[d]},forInItems:function(d,a){a=a||b.global;var c=this.map,e=b.dnd._empty;for(var f in c)f in e||d.call(a,c[f],f,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return b.query("> .dojoDndItem",this.parent)},
sync:function(){var d={};this.getAllNodes().forEach(function(a){if(a.id){var c=this.getItem(a.id);if(c){d[a.id]=c;return}}else a.id=b.dnd.getUniqueId();c=a.getAttribute("dndType");var e=a.getAttribute("dndData");d[a.id]={data:e||a.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=d;return this},insertNodes:function(d,a,c){if(this.parent.firstChild)if(a){if(!c)c=this.parent.firstChild}else{if(c)c=c.nextSibling}else c=null;if(c)for(a=0;a<d.length;++a){var e=this._normalizedCreator(d[a]);
this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.insertBefore(e.node,c)}else for(a=0;a<d.length;++a){e=this._normalizedCreator(d[a]);this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.appendChild(e.node)}return this},destroy:function(){b.forEach(this.events,b.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(d,a){d._skipStartup=true;return new b.dnd.Container(a,d)},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()==
"table"){var d=this.parent.getElementsByTagName("tbody");if(d&&d.length)this.parent=d[0]}}this.defaultCreator=b.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(d){for(var a=d.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(c){a=null}}if(!a){this._changeState("Container","Over");this.onOverEvent()}a=this._getChildByEvent(d);if(this.current!=a){this.current&&this._removeItemClass(this.current,"Over");a&&this._addItemClass(a,"Over");this.current=a}},onMouseOut:function(d){for(d=
d.relatedTarget;d;){if(d==this.node)return;try{d=d.parentNode}catch(a){d=null}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null}this._changeState("Container","");this.onOutEvent()},onSelectStart:function(d){if(!this.skipForm||!b.dnd.isFormElement(d))b.stopEvent(d)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(d,a){var c="dojoDnd"+d;d=d.toLowerCase()+"State";b.replaceClass(this.node,c+a,c+this[d]);this[d]=a},_addItemClass:function(d,a){b.addClass(d,
"dojoDndItem"+a)},_removeItemClass:function(d,a){b.removeClass(d,"dojoDndItem"+a)},_getChildByEvent:function(d){if(d=d.target)for(var a=d.parentNode;a;d=a,a=d.parentNode)if(a==this.parent&&b.hasClass(d,"dojoDndItem"))return d;return null},_normalizedCreator:function(d,a){d=(this.creator||this.defaultCreator).call(this,d,a);if(!b.isArray(d.type))d.type=["text"];if(!d.node.id)d.node.id=b.dnd.getUniqueId();b.addClass(d.node,"dojoDndItem");return d}});b.dnd._createNode=function(d){if(!d)return b.dnd._createSpan;
return function(a){return b.create(d,{innerHTML:a})}};b.dnd._createTrTd=function(d){var a=b.create("tr");b.create("td",{innerHTML:d},a);return a};b.dnd._createSpan=function(d){return b.create("span",{innerHTML:d})};b.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};b.dnd._defaultCreator=function(d){d=d.tagName.toLowerCase();var a=d=="tbody"||d=="thead"?b.dnd._createTrTd:b.dnd._createNode(b.dnd._defaultCreatorNodes[d]);return function(c,e){var f=c&&b.isObject(c),h;if(f&&c.tagName&&c.nodeType&&
c.getAttribute){h=c.getAttribute("dndData")||c.innerHTML;f=(f=c.getAttribute("dndType"))?f.split(/\s*,\s*/):["text"];c=c}else{h=f&&c.data?c.data:c;f=f&&c.type?c.type:["text"];c=(e=="avatar"?b.dnd._createSpan:a)(String(h))}if(!c.id)c.id=b.dnd.getUniqueId();return{node:c,data:h,type:f}}};return b.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(b,d){b.getObject("tree",true,b);d.tree._compareNodes=function(a,c){if(a===c)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-c.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(c)&2?1:-1;else if(document.createRange){var e=doc.createRange();e.setStartBefore(a);a=doc.createRange();a.setStartBefore(c);return e.compareBoundaryPoints(e.END_TO_END,
a)}else throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");};b.declare("dijit.tree._dndContainer",null,{constructor:function(a,c){this.tree=a;this.node=a.domNode;b.mixin(this,c);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");this.events=[b.connect(this.node,"onmouseenter",this,"onOverEvent"),b.connect(this.node,"onmouseleave",this,"onOutEvent"),b.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
b.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),b.connect(this.node,"ondragstart",b,"stopEvent"),b.connect(this.node,"onselectstart",b,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){b.forEach(this.events,b.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,c){var e="dojoDnd"+a;a=a.toLowerCase()+"State";b.replaceClass(this.node,e+c,e+this[a]);
this[a]=c},_addItemClass:function(a,c){b.addClass(a,"dojoDndItem"+c)},_removeItemClass:function(a,c){b.removeClass(a,"dojoDndItem"+c)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return d.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(b,d){b.declare("dijit.tree._dndSelector",d.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;d.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(b.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),b.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),b.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:false,
getSelectedTreeNodes:function(){var a=[],c=this.selection;for(var e in c)a.push(c[e]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,c){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(c)this.anchor=a;return a},removeTreeNode:function(a){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[a]));return a},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},
setSelection:function(a){var c=this.getSelectedTreeNodes();b.forEach(this._setDifference(c,a),b.hitch(this,function(e){e.setSelected(false);this.anchor==e&&delete this.anchor;delete this.selection[e.id]}));b.forEach(this._setDifference(a,c),b.hitch(this,function(e){e.setSelected(true);this.selection[e.id]=e}));this._updateSelectionProperties()},_setDifference:function(a,c){b.forEach(c,function(e){e.__exclude__=true});a=b.filter(a,function(e){return!e.__exclude__});b.forEach(c,function(e){delete e.__exclude__});
return a},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),c=[],e=[];b.forEach(a,function(f){e.push(f);c.push(f.getTreePath())});a=b.map(e,function(f){return f.item});this.tree._set("paths",c);this.tree._set("path",c[0]||[]);this.tree._set("selectedNodes",e);this.tree._set("selectedNode",e[0]||null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onMouseDown:function(a){if(!(!this.current||this.tree.isExpandoNode(a.target,this.current)))if(a.button!=
b.mouseButtons.RIGHT){b.stopEvent(a);var c=this.current,e=b.isCopyKey(a),f=c.id;if(!this.singular&&!a.shiftKey&&this.selection[f])this._doDeselect=true;else{this._doDeselect=false;this.userSelect(c,e,a.shiftKey)}}},onMouseUp:function(a){if(this._doDeselect){this._doDeselect=false;this.userSelect(this.current,b.isCopyKey(a),a.shiftKey)}},onMouseMove:function(){this._doDeselect=false},userSelect:function(a,c,e){if(this.singular)if(this.anchor==a&&c)this.selectNone();else{this.setSelection([a]);this.anchor=
a}else if(e&&this.anchor){e=this.anchor;if(d.tree._compareNodes(this.anchor.rowNode,a.rowNode)<0){c=e;a=a}else{c=a;a=e}for(nodes=[];c!=a;){nodes.push(c);c=this.tree._getNextNode(c)}nodes.push(a);this.setSelection(nodes)}else if(this.selection[a.id]&&c)this.removeTreeNode(a);else if(c)this.addTreeNode(a,true);else{this.setSelection([a]);this.anchor=a}},forInSelectedItems:function(a,c){c=c||b.global;for(var e in this.selection)a.call(c,this.getItem(e),e,this)}});return d.tree._dndSelector});
define("dijit/Tree",["dojo","dijit","text!dijit/templates/TreeNode.html","text!dijit/templates/Tree.html","dojo/fx","dojo/DeferredList","dijit/_Widget","dijit/_Templated","dijit/_Container","dijit/_Contained","dijit/_CssStateMixin","dojo/cookie","dijit/tree/TreeStoreModel","dijit/tree/ForestStoreModel","dijit/tree/_dndSelector"],function(b,d){b.declare("dijit._TreeNode",[d._Widget,d._Templated,d._Container,d._Contained,d._CssStateMixin],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,
state:"UNCHECKED",templateString:b.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:b.delegate(d._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&d.setWaiState(this.labelNode,"expanded",this.isExpanded);
this.setSelected(false)},_setIndentAttr:function(a){var c=Math.max(a,0)*this.tree._nodePixelIndent+"px";b.style(this.domNode,"backgroundPosition",c+" 0px");b.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);b.forEach(this.getChildren(),function(e){e.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="LOADING";this._setExpando(true)},unmarkProcessing:function(){this._setExpando(false)},_updateItemClasses:function(a){var c=this.tree,e=c.model;if(c._v10Compat&&
a===e.root)a=null;this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,c,e){var f="_"+c+"Class";c=c+"Node";var h=this[f];this[f]=this.tree["get"+e+"Class"](a,this.isExpanded);b.replaceClass(this[c],this[f]||"",h||"");b.style(this[c],this.tree["get"+e+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?b.addClass(this.domNode,"dijitTreeIsRoot"):
b.toggleClass(this.domNode,"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var c=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],e=["*","-","+","*"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;b.replaceClass(this.expandoNode,c[a],c);this.expandoNodeText.innerHTML=e[a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;d.setWaiState(this.labelNode,"expanded",
"true");if(this.tree.showRoot||this!==this.tree.rootNode)d.setWaiRole(this.containerNode,"group");b.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","true");var a,c=b.fx.wipeIn({node:this.containerNode,duration:d.defaultDuration,onEnd:function(){a.callback(true)}});a=this._expandDeferred=new b.Deferred(function(){c.stop()});c.play();return a},collapse:function(){if(this.isExpanded){if(this._expandDeferred){this._expandDeferred.cancel();
delete this._expandDeferred}this.isExpanded=false;d.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","false");b.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=b.fx.wipeOut({node:this.containerNode,duration:d.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var c=this.tree,e=c.model,f=[];b.forEach(this.getChildren(),
function(h){d._Container.prototype.removeChild.call(this,h)},this);this.state="LOADED";if(a&&a.length>0){this.isExpandable=true;b.forEach(a,function(h){var k=e.getIdentity(h),j=c._itemNodesMap[k],g;if(j)for(var i=0;i<j.length;i++)if(j[i]&&!j[i].getParent()){g=j[i];g.set("indent",this.indent+1);break}if(!g){g=this.tree._createTreeNode({item:h,tree:c,isExpandable:e.mayHaveChildren(h),label:c.getLabel(h),tooltip:c.getTooltip(h),dir:c.dir,lang:c.lang,indent:this.indent+1});if(j)j.push(g);else c._itemNodesMap[k]=
[g]}this.addChild(g);if(this.tree.autoExpand||this.tree._state(h))f.push(c._expandNode(g))},this);b.forEach(this.getChildren(),function(h){h._updateLayout()})}else this.isExpandable=false;this._setExpando&&this._setExpando(false);this._updateItemClasses(this.item);if(this==c.rootNode)if(a=this.tree.showRoot?this:this.getChildren()[0]){a.setFocusable(true);c.lastFocused=a}else c.domNode.setAttribute("tabIndex","0");return new b.DeferredList(f)},getTreePath:function(){for(var a=this,c=[];a&&a!==this.tree.rootNode;){c.unshift(a.item);
a=a.getParent()}c.unshift(this.tree.rootNode.item);return c},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(){this.inherited(arguments);var a=this.getChildren();if(a.length==0){this.isExpandable=false;this.collapse()}b.forEach(a,function(c){c._updateLayout()})},makeExpandable:function(){this.isExpandable=true;this._setExpando(false)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){d.setWaiState(this.labelNode,"selected",a);
b.toggleClass(this.rowNode,"dijitTreeRowSelected",a)},setFocusable:function(a){this.labelNode.setAttribute("tabIndex",a?"0":"-1")},_onClick:function(a){this.tree._onClick(this,a)},_onDblClick:function(a){this.tree._onDblClick(this,a)},_onMouseEnter:function(a){this.tree._onNodeMouseEnter(this,a)},_onMouseLeave:function(a){this.tree._onNodeMouseLeave(this,a)}});b.declare("dijit.Tree",[d._Widget,d._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],
path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:b.cache("dijit","templates/Tree.html"),persist:true,autoExpand:false,dndController:"dijit.tree._dndSelector",dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,
c){b.publish(this.id,[b.mixin({tree:this,event:a},c||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=false;this._itemNodesMap={};if(!this.cookieName)this.cookieName=this.id+"SaveStateCookie";this._loadDeferred=new b.Deferred;this.inherited(arguments)},postCreate:function(){this._initState();this.model||this._store2model();this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,
"onDelete","_onItemDelete");this._load();this.inherited(arguments);if(this.dndController){if(b.isString(this.dndController))this.dndController=b.getObject(this.dndController);for(var a={},c=0;c<this.dndParams.length;c++)if(this[this.dndParams[c]])a[this.dndParams[c]]=this[this.dndParams[c]];this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=true;b.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+
"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren)a.mayHaveChildren=b.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=b.hitch(this,function(c,e,f){this.getItemChildren(this._v10Compat&&c===this.model.root?null:c,e,f)});this.model=new d.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(b.hitch(this,function(a){var c=this.rootNode=this.tree._createTreeNode({item:a,
tree:this,isExpandable:true,label:this.label||this.getLabel(a),indent:this.showRoot?0:-1});if(!this.showRoot){c.rowNode.style.display="none";d.setWaiRole(this.domNode,"presentation");d.setWaiRole(c.labelNode,"presentation");d.setWaiRole(c.containerNode,"tree")}this.domNode.appendChild(c.domNode);a=this.model.getIdentity(a);if(this._itemNodesMap[a])this._itemNodesMap[a].push(c);else this._itemNodesMap[a]=[c];c._updateLayout();this._expandNode(c).addCallback(b.hitch(this,function(){this._loadDeferred.callback(true);
this.onLoad()}))}),function(a){console.error(this,": error loading root: ",a)})},getNodesByItem:function(a){if(!a)return[];return[].concat(this._itemNodesMap[b.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var c=this;this._loadDeferred.addCallback(b.hitch(this,function(){var e=b.map(a,function(h){return!h||b.isString(h)?h:c.model.getIdentity(h)}),f=[];b.forEach(e,function(h){f=f.concat(c._itemNodesMap[h]||
[])});this.set("selectedNodes",f)}))},_setPathAttr:function(a){return a.length?this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function c(h,k,j){var g=h.shift(),i=b.filter(k,function(l){return l.getIdentity()==g})[0];if(i)h.length?f._expandNode(i).addCallback(function(){c(h,i.getChildren(),j)}):j.callback(i);else j.errback("Could not expand path at "+g)}function e(h){f.set("selectedNodes",b.map(b.filter(h,function(k){return k[0]}),function(k){return k[1]}))}var f=this;return(new b.DeferredList(b.map(a,
function(h){var k=new b.Deferred;h=b.map(h,function(j){return b.isString(j)?j:f.model.getIdentity(j)});h.length?f._loadDeferred.addCallback(function(){c(h,[f.rootNode],k)}):k.errback("Empty path");return k}))).addCallback(e)},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(b.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},
getIconClass:function(a,c){return!a||this.model.mayHaveChildren(a)?c?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var c=b.keys,e=d.getEnclosingWidget(a.target);if(e){var f=a.charOrCode;if(typeof f=="string"&&f!=" "){if(!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey){this._onLetterKeyNav({node:e,
key:f.toLowerCase()});b.stopEvent(a)}}else{if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}var h=this._keyHandlerMap;if(!h){h={};h[c.ENTER]="_onEnterKey";h[c.SPACE]=h[" "]="_onEnterKey";h[this.isLeftToRight()?c.LEFT_ARROW:c.RIGHT_ARROW]="_onLeftArrow";h[this.isLeftToRight()?c.RIGHT_ARROW:c.LEFT_ARROW]="_onRightArrow";h[c.UP_ARROW]="_onUpArrow";h[c.DOWN_ARROW]="_onDownArrow";h[c.HOME]="_onHomeKey";h[c.END]="_onEndKey";this._keyHandlerMap=h}if(this._keyHandlerMap[f]){this[this._keyHandlerMap[f]]({node:e,
item:e.item,evt:a});b.stopEvent(a)}}}}},_onEnterKey:function(a){this._publish("execute",{item:a.item,node:a.node});this.dndController.userSelect(a.node,b.isCopyKey(a.evt),a.evt.shiftKey);this.onClick(a.item,a.node,a.evt)},_onDownArrow:function(a){(a=this._getNextNode(a.node))&&a.isTreeNode&&this.focusNode(a)},_onUpArrow:function(a){a=a.node;var c=a.getPreviousSibling();if(c)for(a=c;a.isExpandable&&a.isExpanded&&a.hasChildren();){a=a.getChildren();a=a[a.length-1]}else{c=a.getParent();!this.showRoot&&
c===this.rootNode||(a=c)}a&&a.isTreeNode&&this.focusNode(a)},_onRightArrow:function(a){a=a.node;if(a.isExpandable&&!a.isExpanded)this._expandNode(a);else if(a.hasChildren())(a=a.getChildren()[0])&&a.isTreeNode&&this.focusNode(a)},_onLeftArrow:function(a){a=a.node;if(a.isExpandable&&a.isExpanded)this._collapseNode(a);else(a=a.getParent())&&a.isTreeNode&&!(!this.showRoot&&a===this.rootNode)&&this.focusNode(a)},_onHomeKey:function(){var a=this._getRootOrFirstNode();a&&this.focusNode(a)},_onEndKey:function(){for(var a=
this.rootNode;a.isExpanded;){a=a.getChildren();a=a[a.length-1]}a&&a.isTreeNode&&this.focusNode(a)},multiCharSearchDuration:250,_onLetterKeyNav:function(a){var c=this._curSearch;if(c){c.pattern+=a.key;clearTimeout(c.timer)}else c=this._curSearch={pattern:a.key,startNode:a.node};var e=this;c.timer=setTimeout(function(){delete e._curSearch},this.multiCharSearchDuration);a=c.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==c.startNode&&a.label.toLowerCase().substr(0,c.pattern.length)!=
c.pattern);a&&a.isTreeNode&&a!==c.startNode&&this.focusNode(a)},isExpandoNode:function(a,c){return b.isDescendant(a,c.expandoNode)},_onClick:function(a,c){var e=this.isExpandoNode(c.target,a);if(this.openOnClick&&a.isExpandable||e)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:c});this.onClick(a.item,a,c);this.focusNode(a)}b.stopEvent(c)},_onDblClick:function(a,c){var e=c.target;e=e==a.expandoNode||e==a.expandoNodeText;if(this.openOnDblClick&&a.isExpandable||
e)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:c});this.onDblClick(a.item,a,c);this.focusNode(a)}b.stopEvent(c)},_onExpandoClick:function(a){a=a.node;this.focusNode(a);a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];else{for(;a&&a.isTreeNode;){var c=a.getNextSibling();
if(c)return c;a=a.getParent()}return null}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;if(a.isExpandable)if(a.state!="LOADING"){a.collapse();this.onClose(a.item,a);if(a.item){this._state(a.item,false);this._saveState()}}},_expandNode:function(a,c){if(a._expandNodeDeferred&&!c)return a._expandNodeDeferred;c=this.model;var e=a.item,f=this;switch(a.state){case "UNCHECKED":a.markProcessing();
var h=a._expandNodeDeferred=new b.Deferred;c.getChildren(e,function(k){a.unmarkProcessing();k=a.setChildItems(k);var j=f._expandNode(a,true);k.addCallback(function(){j.addCallback(function(){h.callback()})})},function(k){console.error(f,": error loading root children: ",k)});break;default:h=a._expandNodeDeferred=a.expand();this.onOpen(a.item,a);if(e){this._state(e,true);this._saveState()}}return h},focusNode:function(a){d.focus(a.labelNode)},_onNodeFocus:function(a){if(a&&a!=this.lastFocused){this.lastFocused&&
!this.lastFocused._destroyed&&this.lastFocused.setFocusable(false);a.setFocusable(true);this.lastFocused=a}},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(a){var c=this._itemNodesMap[this.model.getIdentity(a)];if(c){var e=this.getLabel(a),f=this.getTooltip(a);b.forEach(c,function(h){h.set({item:a,label:e,tooltip:f});h._updateItemClasses(a)})}},_onItemChildrenChange:function(a,c){(a=this._itemNodesMap[this.model.getIdentity(a)])&&b.forEach(a,function(e){e.setChildItems(c)})},
_onItemDelete:function(a){a=this.model.getIdentity(a);var c=this._itemNodesMap[a];if(c){b.forEach(c,function(e){this.dndController.removeTreeNode(e);var f=e.getParent();f&&f.removeChild(e);e.destroyRecursive()},this);delete this._itemNodesMap[a]}},_initState:function(){if(this.persist){var a=b.cookie(this.cookieName);this._openedItemIds={};a&&b.forEach(a.split(","),function(c){this._openedItemIds[c]=true},this)}},_state:function(a,c){if(!this.persist)return false;var e=this.model.getIdentity(a);if(arguments.length===
1)return this._openedItemIds[e];if(c)this._openedItemIds[e]=true;else delete this._openedItemIds[e]},_saveState:function(){if(this.persist){var a=[];for(var c in this._openedItemIds)a.push(c);b.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!b.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},
destroyRecursive:function(){this.destroy()},resize:function(a){a&&b.marginBox(this.domNode,a);this._nodePixelIndent=b._getMarginSize(this.tree.indentDetector).w;if(this.tree.rootNode)this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new d._TreeNode(a)}});return d.Tree});define("text!orion/widgets/templates/_ExplorerTreeNode.html",function(){return'<div class="dijitTreeNode" waiRole="presentation">\n\t<div dojoAttachPoint="rowNode" class="dijitTreeRow"\n\t\twaiRole="presentation"\n\t\tdojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick">\n\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" />\n\t\t<span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation"></span>\n\t\t<span dojoAttachPoint="contentNode" class="dijitTreeContent" waiRole="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" waiRole="presentation" />\n\t\t\t<!-- labelNode\'s innerText will be label string --\>\n\t\t\t<span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t\t<a href="" dojoAttachPoint="followLink"><img src="${_blankGif}" alt="" dojoAttachPoint="followNode" class="dijitIcon dijitTreeIcon follow" waiRole="link"></a>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer"\n\t\twaiRole="presentation" style="display: none;">\n\t</div>\n</div>'});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(b,d){b.declare("orion.widgets._ExplorerTreeNode",[d._TreeNode],{templateString:b.cache("orion","widgets/templates/_ExplorerTreeNode.html"),_updateItemClasses:function(a){this.inherited(arguments);this._applyClassAndStyle(a,"follow","Follow");typeof this.tree.updateFollowLink==="function"&&this.tree.updateFollowLink(a,this.followLink)}});b.declare("orion.widgets.ExplorerTree",
[d.Tree],{selectedNodes:{},postCreate:function(){b.connect(this,"onMouseDown",this._eatSelectionEvent);b.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(c,e){a.push(e.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(c,e){a.push(e)});
return a},_forEachSelectedNode:function(a){var c=this.selectedNodes;for(var e in c)c.hasOwnProperty(e)&&a(e,c[e])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){if(b.isCopyKey(a)||a.shiftKey)b.stopEvent(a)},_onClick:function(a,c){var e=c.target,f=e===a.expandoNode||e===a.expandoNodeText;e=e===a.followNode;if(b.isCopyKey(c)){this._toggleSelectNode(a);this.focusNode(a)}else if(c.shiftKey){if(this.selectedNode){this._selectRange(this.selectedNode,
a);this.focusNode(a)}}else{if(e)this.onFollowClick(a.item,a,c);else if(this.openOnClick&&a.isExpandable||f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:c});this.onClick(a.item,a,c);this.focusNode(a)}!f&&!e&&this._selectNode(a)}e||b.stopEvent(c)},_onItemDelete:function(a){var c=this._itemNodesMap[this.model.getIdentity(a)];if(c){var e=this;b.forEach(c,function(f){e._removeFromSelection(f)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var c=a.getParent();c&&!(c.isExpandable&&c.isExpanded);){a=c;c=c.getParent()}return a},_toggleSelectNode:function(a){if(this.selectedNodes[a.get("id")]){a.setSelected(false);this._removeFromSelection(a)}else{a.setSelected(true);this._addToSelection(a)}},_addToSelection:function(a){this.selectedNodes[a.get("id")]=a},_removeFromSelection:function(a){delete this.selectedNodes[a.get("id")]},_selectRange:function(a,c){function e(k,j){var g=[];k=k;do{g.push(k);k=f._getNextNode(k)}while(k&&k!==j);if(k===
j){g.push(j);return g}return null}a=this._getVisibleAncestor(a);c=this._getVisibleAncestor(c);if(a&&c)if(a===c)this._selectNode(a);else{var f=this,h=e(a,c);if(h)this._selectNodes(h.reverse(),true);else(h=e(c,a))?this._selectNodes(h,true):console.debug("Warning: couldn't select range from "+a.label+" to "+c.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(f,h){h._destroyed||h.setSelected(false)});this.selectedNodes={};if(a)for(var c=
0;c<a.length;c++){var e=a[c];e.setSelected(true);this._addToSelection(e);this.selectedNode=e}}})});define("text!orion/widgets/templates/DirectoryPrompterDialog.html",function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="messageCell">\n\t\t\t\t\t<div style="display: table-cell;"><div style="width: 25em; padding-bottom: 5px;">${message}</div></div>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseDirectoryExplorerTree" class="explorerTreeClass" id="${id}_browseDirectoryExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div> \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="directoryBrowserButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <!-- end table --\>\n\t</div> <!-- content pane --\>\n</div>'});
define("orion/widgets/DirectoryPrompterDialog",["dojo","dijit","orion/util","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/DirectoryPrompterDialog.html"],function(b,d,a){b.declare("orion.widgets.DirectoryPrompterDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Choose a Folder";this.buttonOk="OK";this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("");this.message||b.style(this.messageCell,{display:"none"})},loadFolderList:function(c){c=a.makeRelative(c);this.treeRoot.Path=c;this.options.fileClient.loadWorkspace(c).then(b.hitch(this,function(e){for(var f in e)this.treeRoot[f]=e[f];
a.processNavigatorParent(this.treeRoot,e.Children);this.createTree()}))},createTree:function(){var c=new orion.widgets.DirectoryTreeModel(this.options.serviceRegistry,this.treeRoot,this.options.fileClient);this.treeWidget=new orion.widgets.ExplorerTree({id:"treeWidget",style:"width:100%; height:100%",model:c,showRoot:false,persist:true,openOnClick:false,getLabel:function(e){return e.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();b.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
execute:function(){var c=this.treeWidget.getSelectedItems();this.onHide();this.options.func(c[0])}});orion.widgets.DirectoryTreeModel=function(){function c(e,f,h){this.registry=e;this.root=f;this.fileClient=h}c.prototype={destroy:function(){},getRoot:function(e){e(this.root)},mayHaveChildren:function(){return true},getChildren:function(e,f){if(e.children)f(e.children);else if(e.Directory!==undefined&&e.Directory===false)f([]);else e.Location?this.fileClient.fetchChildren(e.ChildrenLocation).then(b.hitch(this,
function(h){for(var k=[],j=0;j<h.length;j++)h[j].Directory&&k.push(h[j]);a.processNavigatorParent(e,k);f(k)})):f([])},getIdentity:function(e){return e.Name?e.Location:"ROOT"},getLabel:function(e){return e.Name},onChildrenChange:function(){}};return c}()});define("text!orion/widgets/templates/SiteEditor.html",function(){return'<div>\n\t<style type="text/css">\n\t\t.siteEditorTable td, .siteEditorTable th {\n\t\t\tpadding: 10px 10px 5px 10px;\n\t\t}\n\t\t/* Style leftmost column of siteEditorTable */\n\t\t.siteEditorTable>tbody>tr>td:first-child {\n\t\t\tvertical-align: top;\n\t\t\tmin-width: 10em;\n\t\t\t/*background-color: #fafafa;*/\n\t\t}\n\t\t.siteEditorTable>tbody>tr>td {\n\t\t\t/*border-bottom: 1px solid #ddd;*/\n\t\t\tpadding-bottom: 20px;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.navColumn {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.isValidColumn {\n\t\t\tmin-width: 32px;\n\t\t\twidth: 40px;\n\t\t}\n\t\t.isValidCell {\n\t\t\ttext-align: center;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.pathInput, .serverPathInput {\n\t\t\tmin-width: 20em;\n\t\t}\n\t\t.addMappingToolbar {\n\t\t\tpadding-top: 15px;\n\t\t}\n\t</style>\n\t<div dojoAttachPoint="containerNode">\n\t\t<div dojoType="dijit.form.Form" id="siteForm">\n\t\t\t<table class="siteEditorTable">\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label dojoAttachPoint="siteConfigNameLabel" for="${id}_name">${siteConfigNameLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="name" id="${id}_name"\n\t\t\t\t\t\t\trequired="true" value=""\n\t\t\t\t\t\t\tstyle="display: inline-block; width: 15em;">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label dojoAttachPoint="hostHintLabel" for="${id}_hostHint">${hostHintLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="hostHint" id="${id}_hostHint"\n\t\t\t\t\t\t\trequired="false" value=""\n\t\t\t\t\t\t\tstyle="display: inline-block; width: 12em;"><br />\n\t\t\t\t\t\t<em>Optional; used to determine the URL where a started site can be accessed.</em>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label dojoAttachPoint="hostingStatusLabel">${hostingStatusLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<span dojoAttachPoint="hostingStatus"></span>\n\t\t\t\t\t\t<span dojoAttachPoint="siteStartedWarning" style="display: none;"><br />\n\t\t\t\t\t\t<em>Changes you make here won\'t affect the running site.</em>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label dojoAttachPoint="mappingsLabel" for="${id}_mappings">${mappingsLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="padding: 10px 25px 10px 5px; width:100%;">\n\t\t\t\t\t\t<div dojoAttachPoint="mappingsPlaceholder" class="mappingsGridTable" id="${id}_mappingsPlaceholder"></div>\n\t\t\t\t\t\t<div dojoAttachPoint="addMappingToolbar" id="${id}_addMappingToolbar" class="addMappingToolbar"></div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<div dojoAttachPoint="convertToolbar" id="${id}_convertToolbar"></div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t</table>\n\t\t</div>\n\t</div>\n</div>'});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(b,d){b.declare("dijit.form.Form",[d._Widget,d._Templated,d.form._FormMixin,d.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:b.delegate(d._Widget.prototype.attributeMap,
{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?"name='"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){this.encType=a;b.attr(this.domNode,"encType",a);if(b.isIE)this.domNode.encoding=a},postCreate:function(){if(b.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var c={returnValue:true,preventDefault:function(){this.returnValue=false},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(c)!==false&&c.returnValue&&this.inherited(arguments,[])},onReset:function(){return true},_onReset:function(a){this.reset(a);b.stopEvent(a);return false},_onSubmit:function(a){var c=d.form.Form.prototype;if(this.execute!=c.execute||this.onExecute!=
c.onExecute){b.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&b.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return d.form.Form});
define("orion/widgets/SiteEditor",["require","dojo","dijit","orion/util","orion/commands","orion/siteMappingsTable","orion/widgets/DirectoryPrompterDialog","text!orion/widgets/templates/SiteEditor.html","dojo/DeferredList","dijit/layout/ContentPane","dijit/Tooltip","dijit/_Templated","dijit/form/Form","dijit/form/TextBox","dijit/form/ValidationTextBox"],function(b,d,a,c,e,f){d.declare("orion.widgets.SiteEditor",[a.layout.ContentPane,a._Templated],{widgetsInTemplate:true,templateString:d.cache("orion",
"widgets/templates/SiteEditor.html"),_workspaces:null,_projects:null,_fetched:false,_siteConfiguration:null,_modelListeners:null,mappings:null,_isDirty:false,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.checkOptions(this.options,["serviceRegistry","fileClient","siteService","commandService","statusService"]);this._fileClient=this.options.fileClient;this._siteService=this.options.siteService;this._commandService=this.options.commandService;this._statusService=
this.options.statusService;this._commandsContainer=this.options.commandsContainer;this.options.location&&this.load(this.options.location);this._workspaces=this._fileClient.loadWorkspaces();this._projects=new d.Deferred},postMixInProperties:function(){this.inherited(arguments);this.siteConfigNameLabelText="Name:";this.mappingsLabelText="Mappings:";this.hostHintLabelText="Hostname hint:";this.hostingStatusLabelText="Status:"},postCreate:function(){this.inherited(arguments);this.refocus=false;this.name.set("invalidMessage",
"Not a valid name");this.name.set("isValid",d.hitch(this,function(h){return h||d.trim(this.name.get("value"))!==""}));this.hostHint.set("invalidMessage","Not a valid hostname");this.hostHint.set("isValid",d.hitch(this,function(h){var k=/^(?:\s*|[A-Za-z0-9-_]+)$/;return h||k.test(this.hostHint.get("value"))}));a.byId("siteForm").onSubmit=d.hitch(this,this.onSubmit);d.when(this._projects,d.hitch(this,function(h){this._commandService.addCommand(new e.Command({name:"Add",tooltip:"Add a directory mapping to the site configuration",
imageClass:"core-sprite-add",id:"eclipse.site.mappings.add",visibleWhen:function(){return true},choiceCallback:d.hitch(this,this._makeAddMenuChoices,h)}),"dom");this._commandService.registerCommandContribution("eclipse.site.mappings.add",1,this.addMappingToolbar.id);this._commandService.renderCommands(this.addMappingToolbar,"dom",this.mappings,this,"image");this._commandService.addCommand(new e.Command({name:"Convert to Self-Hosting",tooltip:"Enable the site configuration to launch an Orion server running your local client code",
imageClass:"core-sprite-add",id:"eclipse.site.convert",visibleWhen:d.hitch(this,function(k){return!!k.Location&&!this.isSelfHosting(h)}),callback:d.hitch(this,this.convertToSelfHostedSite,this._projects)}),"object");this._commandService.registerCommandContribution("eclipse.site.convert",2);this._refreshFields()}));this._commandService.addCommand(new e.Command({name:"Save",tooltip:"Save the site configuration",imageClass:"core-sprite-save",id:"eclipse.site.save",visibleWhen:function(h){return!!h.Location},
callback:d.hitch(this,this.onSubmit)}),"object");this._commandService.registerCommandContribution("eclipse.site.save",0)},checkOptions:function(h,k){for(var j=0;j<k.length;j++)if(typeof h[k[j]]==="undefined")throw new Error("options."+k[j]+" is required");},_makeAddMenuChoices:function(h,k){k=d.isArray(k)?k[0]:k;this.getSiteConfiguration();h=h.sort(function(i,l){return i.Name.toLowerCase().localeCompare(l.Name.toLowerCase())});var j=this,g=function(){j.mappings.addMapping(null,this.path,this.name)};
k=d.map(h,function(i){return{name:"/"+i.Name,imageClass:"core-sprite-folder",path:j._siteService.makeRelativeFilePath(i.Location),callback:g}});h.length>0&&k.push({});k.push({name:"Choose folder&#8230;",imageClass:"core-sprite-folder",callback:d.hitch(this,function(){var i=new orion.widgets.DirectoryPrompterDialog({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:d.hitch(this,function(l){l&&this.mappings.addMapping(null,j._siteService.makeRelativeFilePath(l.Location),l.Name)})});
i.startup();i.show()})});k.push({name:"URL",imageClass:"core-sprite-link",callback:function(){j.mappings.addMapping("/web/somePath","http://")}});return k},convertToSelfHostedSite:function(){var h=new orion.widgets.DirectoryPrompterDialog({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:d.hitch(this,function(k){if(k){k=this._siteService.makeRelativeFilePath(k.Location);this.mappings.deleteAllMappings();this.mappings.addMappings(this.getSelfHostingMappings(k));this.onSubmit()}}),
title:"Choose Orion Source Folder",message:"Select the folder where you checked out the <b>org.eclipse.orion.client</b> repository:"});h.startup();h.show()},isSelfHosting:function(h){for(var k=0;k<h.length;k++){for(var j=this.getSelfHostingMappings(this._siteService.makeRelativeFilePath(h[k].Location)),g=true,i=0;i<j.length;i++)this.mappings.mappingExists(j[i])||(g=false);if(g)return true}return false},getSelfHostingMappings:function(h){var k=this._siteService.getContext();k=this._siteService._makeHostRelative(k);
k="http://localhost:8080"+k;return[{Source:"/",Target:h+"/bundles/org.eclipse.orion.client.core/web"},{Source:"/",Target:h+"/bundles/org.eclipse.orion.client.editor/web"},{Source:"/file",Target:k+"file"},{Source:"/prefs",Target:k+"prefs"},{Source:"/workspace",Target:k+"workspace"},{Source:"/org.dojotoolkit",Target:k+"org.dojotoolkit"},{Source:"/users",Target:k+"users"},{Source:"/authenticationPlugin.html",Target:k+"authenticationPlugin.html"},{Source:"/login",Target:k+"login"},{Source:"/loginstatic",
Target:k+"loginstatic"},{Source:"/site",Target:k+"site"},{Source:"/",Target:h+"/bundles/org.eclipse.orion.client.git/web"},{Source:"/gitapi",Target:k+"gitapi"},{Source:"/",Target:h+"/bundles/org.eclipse.orion.client.users.ui/web"},{Source:"/xfer",Target:k+"xfer"},{Source:"/filesearch",Target:k+"filesearch"},{Source:"/index.jsp",Target:k+"index.jsp"},{Source:"/plugins/git",Target:k+"plugins/git"},{Source:"/plugins/user",Target:k+"plugins/user"},{Source:"/logout",Target:k+"logout"},{Source:"/mixloginstatic",
Target:k+"mixloginstatic"},{Source:"/mixlogin/manageopenids",Target:k+"mixlogin/manageopenids"},{Source:"/openids",Target:k+"openids"},{Source:"/task",Target:k+"task"}]},load:function(h){var k=new d.Deferred;this._busyWhile(k,"Loading...");this._siteService.loadSiteConfiguration(h).then(d.hitch(this,function(j){this._setSiteConfiguration(j);k.callback(j)}),function(j){k.errback(j)});return k},_fetchProjects:function(h){this._fetched||d.when(this._workspaces,d.hitch(this,function(k){for(var j,g=0;g<
k.length;g++)if(k[g].Id===h.Workspace){j=k[g];break}j&&this._fileClient.fetchChildren(j.Location).then(d.hitch(this,function(i){this._fetched=true;this._projects.callback(i)}),d.hitch(this,this._onError))}))},_setSiteConfiguration:function(h){this._detachListeners(this._siteConfiguration);this._siteConfiguration=h;this._fetchProjects(h);this._refreshFields();setTimeout(d.hitch(this,function(){this._attachListeners(this._siteConfiguration)}),0)},setDirty:function(h){(this._isDirty=h)||this.mappings.setDirty(false)},
isDirty:function(){return this._isDirty||this.mappings.isDirty()},_refreshFields:function(){this.name.set("value",this._siteConfiguration.Name);this.hostHint.set("value",this._siteConfiguration.HostHint);this.mappings=new f.MappingsTable(this.serviceRegistry,this._siteService,null,this.mappingsPlaceholder.id,this._siteConfiguration,this._projects);this.mappings.startup();var h=this._siteConfiguration.HostingStatus;if(h&&h.Status==="started"){d.style(this.siteStartedWarning,{display:"block"});this.hostingStatus.innerHTML=
c.safeText(h.Status[0].toLocaleUpperCase()+h.Status.substr(1)+" at ");d.create("a",{href:h.URL,innerHTML:c.safeText(h.URL),target:"_new"},this.hostingStatus,"last")}else{d.style(this.siteStartedWarning,{display:"none"});c.setText(this.hostingStatus,h.Status[0].toLocaleUpperCase()+h.Status.substr(1))}d.empty(this._commandsContainer);this._commandService.renderCommands(this._commandsContainer,"object",this._siteConfiguration,{},"image",null,this._siteConfiguration,true)},_attachListeners:function(h){function k(g,
i){var l=d.connect(g,"onChange",j,function(){var o=g.get("value");h[i]=o;this.setDirty(true)});j._modelListeners.push(l)}this._modelListeners=[];var j=this;k(this.name,"Name");k(this.hostHint,"HostHint");this._modelListeners.push(d.connect(this.mappings,"setDirty",this,function(g){g&&this.setDirty(true)}))},_detachListeners:function(){if(this._modelListeners)for(var h=0;h<this._modelListeners.length;h++)d.disconnect(this._modelListeners[h])},getSiteConfiguration:function(){return this._siteConfiguration},
onSubmit:function(){if(a.byId("siteForm").isValid()){var h=this,k=h._siteConfiguration;delete k.HostingStatus;this._busyWhile(this._siteService.updateSiteConfiguration(k.Location,k).then(function(j){h._setSiteConfiguration(j);h.setDirty(false);return{Result:'Saved "'+j.Name+'".'}}),"Saving...");return true}else return false},_busyWhile:function(h,k){d.forEach(this.getDescendants(),function(j){j.set("disabled",true)});h.then(d.hitch(this,this._onSuccess),d.hitch(this,this._onError));this._statusService.showWhile(h,
k)},_onSuccess:function(h){d.forEach(this.getDescendants(),function(k){k.set("disabled",false)});this.onSuccess(h)},_onError:function(h){this._statusService.setErrorMessage(h);this.onError(h)},onSuccess:function(){},onError:function(){}})});
define("site",["dojo","orion/bootstrap","orion/status","orion/commands","orion/fileClient","orion/searchClient","orion/dialogs","orion/globalCommands","orion/siteService","orion/siteUtils","orion/siteTree","orion/treetable","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/SiteEditor"],function(b,d,a,c,e,f,h,k,j,g){b.addOnLoad(function(){d.startup().then(function(i){var l=i.serviceRegistry,o=i.preferences;document.body.style.visibility="visible";b.parser.parse();
i=new h.DialogService(l);var n=new a.StatusReportingService(l,"statusPane","notifications"),m=new c.CommandService({serviceRegistry:l}),p=new e.FileClient(l,function(u){return(u=u.getProperty("pattern"))&&u.indexOf("/")===0}),s=new j.SiteService(l),q=new f.Searcher({serviceRegistry:l,commandService:m});k.generateBanner("toolbar",l,m,o,q);var t=function(){var u=dijit.byId("site-editor"),w=u&&u.getSiteConfiguration();if(u&&w){var z=b.byId("location");b.place(document.createTextNode(w.Name),z,"only");
document.title=w.Name+(u.isDirty()?"* ":"")+" - Edit Site"}},C=function(){var u=b.hash();u=g.parseStateFromHash(u);var w=dijit.byId("site-editor");u.site&&w.load(u.site).then(function(){t()})};b.subscribe("/dojo/hashchange",null,C);var D;(function(){D=new orion.widgets.SiteEditor({serviceRegistry:l,fileClient:p,siteService:s,commandService:m,statusService:n,commandsContainer:b.byId("pageActions"),id:"site-editor"});b.place(D.domNode,b.byId("site"),"only");D.startup();b.connect(D,"onSuccess",t);b.connect(D,
"setDirty",t);C()})();window.onbeforeunload=function(){if(D.isDirty())return"There are unsaved changes."};o=b.hitch(D,D._setSiteConfiguration);q=b.hitch(n,n.setProgressResult);g.createSiteCommands(m,s,n,i,o,o,null,q);m.registerCommandContribution("eclipse.site.start",1);m.registerCommandContribution("eclipse.site.stop",2)})})});