//>>built
define("dojox/help/_base",["dojo","dijit","dojox","dojo/require!dojox/rpc/Service,dojo/io/script"],function(c,n,a){c.provide("dojox.help._base");c.require("dojox.rpc.Service");c.require("dojo.io.script");c.experimental("dojox.help");a.help={locate:function(h,b,i){var i=i||20,e=[],g={},f;if(b){c.isArray(b)||(b=[b]);for(var d=0,j;j=b[d];d++){f=j;if(c.isString(j)){if(j=c.getObject(j),!j)continue}else if(c.isObject(j))f=j.__name__;else continue;e.push(j);f&&(f=f.split(".")[0],!g[f]&&-1==c.indexOf(a.help._namespaces,
f)&&a.help.refresh(f),g[f]=!0)}}e.length||(e.push({__name__:"window"}),c.forEach(a.help._namespaces,function(a){g[a]=!0}));h=h.toLowerCase();b=[];d=0;a:for(;j=e[d];d++){var l=j.__name__||"";f=c.some(e,function(a){a=a.__name__||"";return 0==l.indexOf(a+".")});if(l&&!f){f=l.split(".")[0];j=[];if("window"==l)for(f in a.help._names)c.isArray(a.help._names[f])&&(j=j.concat(a.help._names[f]));else j=a.help._names[f];f=0;for(var k;k=j[f];f++)if(("window"==l||0==k.indexOf(l+"."))&&-1!=k.toLowerCase().indexOf(h)&&
".prototype"!=k.slice(-10)){var m=c.getObject(k);if(m&&(b.push([k,m]),b.length==i))break a}}}a.help._displayLocated(b);if(!c.isMoz)return""},refresh:function(h,b){2>arguments.length&&(b=!0);a.help._recurse(h,b)},noConflict:function(h){if(arguments.length)return a.help._noConflict(h);for(;a.help._overrides.length;){var b=a.help._overrides.pop(),c=b[0],b=b[1];c[b]=a.help._noConflict(c[b])}},init:function(h){h&&a.help._namespaces.concat(h);c.addOnLoad(function(){c.require=function(b){return function(){a.help.noConflict();
b.apply(c,arguments);a.help._timer&&clearTimeout(a.help._timer);a.help._timer=setTimeout(function(){c.addOnLoad(function(){a.help.refresh();a.help._timer=!1})},500)}}(c.require);a.help._recurse()})},_noConflict:function(a){if(a instanceof String)return a.toString();if(a instanceof Number)return+a;if(a instanceof Boolean)return!0==a;c.isObject(a)&&(delete a.__name__,delete a.help);return a},_namespaces:["dojo","dojox","dijit","djConfig"],_rpc:new a.rpc.Service(c.moduleUrl("dojox.rpc.SMDLibrary","dojo-api.smd")),
_attributes:["summary","type","returns","parameters"],_clean:function(h){for(var b={},c=0,e;e=a.help._attributes[c];c++){var g=h["__"+e+"__"];g&&(b[e]=g)}return b},_displayLocated:function(){throw Error("_displayLocated should be overridden in one of the dojox.help packages");},_displayHelp:function(){throw Error("_displayHelp should be overridden in one of the dojox.help packages");},_addVersion:function(a){if(a.name){a.version=[c.version.major,c.version.minor,c.version.patch].join(".");var b=a.name.split(".");
if("dojo"==b[0]||"dijit"==b[0]||"dojox"==b[0])a.project=b[0]}return a},_stripPrototype:function(a){var b=a.replace(/\.prototype(\.|$)/g,"."),c=b;"."==b.slice(-1)?c=b=b.slice(0,-1):b=a;return[c,b]},_help:function(){for(var h=a.help._stripPrototype(this.__name__)[0],b=[],i=0,e;e=a.help._attributes[i];i++)this["__"+e+"__"]||b.push(e);a.help._displayHelp(!0,{name:this.__name__});!b.length||this.__searched__?a.help._displayHelp(!1,a.help._clean(this)):(this.__searched__=!0,a.help._rpc.get(a.help._addVersion({name:h,
exact:!0,attributes:b})).addCallback(this,function(b){this.toString===a.help._toString&&this.toString(b);if(b&&b.length){for(var b=b[0],c=0,d;d=a.help._attributes[c];c++)b[d]&&(this["__"+d+"__"]=b[d]);a.help._displayHelp(!1,a.help._clean(this))}else a.help._displayHelp(!1,!1)}));if(!c.isMoz)return""},_parse:function(c){delete this.__searching__;if(c&&c.length){if(c=c[0].parameters){var b=["function ",this.__name__,"("];this.__parameters__=c;for(var i=0,e;e=c[i];i++){i&&b.push(", ");b.push(e.name);
if(e.types){for(var g=[],f=0,d;d=e.types[f];f++)g.push(d.title);g.length&&(b.push(": "),b.push(g.join("|")))}e.repeating&&b.push("...");e.optional&&b.push("?")}b.push(")");this.__source__=this.__source__.replace(/function[^\(]*\([^\)]*\)/,b.join(""))}this.__output__&&delete this.__output__}else a.help._displayHelp(!1,!1)},_toStrings:{},_toString:function(h){if(!this.__source__)return this.__name__;var b=!this.__parameters__;this.__parameters__=[];if(h)a.help._parse.call(this,h);else if(b)this.__searching__=
!0,a.help._toStrings[a.help._stripPrototype(this.__name__)[0]]=this,a.help._toStringTimer&&clearTimeout(a.help._toStringTimer),a.help._toStringTimer=setTimeout(function(){a.help.__toString()},50);if(!b||!this.__searching__)return this.__source__;var i="function Loading info for "+this.__name__+"... (watch console for result) {}";return!c.isMoz?(this.__output__=!0,i):{toString:c.hitch(this,function(){this.__output__=!0;return i})}},__toString:function(){a.help._toStringTimer&&clearTimeout(a.help._toStringTimer);
var c=[];a.help.noConflict(a.help._toStrings);for(var b in a.help._toStrings)c.push(b);for(;c.length;)a.help._rpc.batch(a.help._addVersion({names:c.splice(-50,50),exact:!0,attributes:["parameters"]})).addCallback(this,function(b){for(var c=0,g;g=b[c];c++){var f=a.help._toStrings[g.name];f&&(a.help._parse.call(f,[g]),delete a.help._toStrings[g.name])}})},_overrides:[],_recursions:[],_names:{},_recurse:function(h,b){2>arguments.length&&(b=!0);var i=[];if(h&&c.isString(h))a.help.__recurse(c.getObject(h),
h,h,i,b);else for(var e=0,g;g=a.help._namespaces[e];e++)if(window[g]&&(a.help._recursions.push([window[g],g,g]),window[g].__name__=g,!window[g].help))window[g].help=a.help._help;for(;a.help._recursions.length;)e=a.help._recursions.shift(),a.help.__recurse(e[0],e[1],e[2],i,b);for(e=0;g=i[e];e++)delete g.__seen__},__recurse:function(h,b,i,e,g){for(var f in h)if(!f.match(/([^\w_.$]|__[\w_.$]+__)/)){var d=h[f];if(!("undefined"==typeof d||d===document||d===window||d===a.help._toString||d===a.help._help||
null===d||+c.isIE&&d.tagName||d.__seen__)){var j=c.isFunction(d),l=c.isObject(d)&&!c.isArray(d)&&!d.nodeType,k=i?i+"."+f:f;if("dojo._blockAsync"!=k){if(!d.__name__){var m=null;c.isString(d)?m=String:"number"==typeof d?m=Number:"boolean"==typeof d&&(m=Boolean);m&&(d=h[f]=new m(d))}d.__seen__=!0;d.__name__=k;(a.help._names[b]=a.help._names[b]||[]).push(k);e.push(d);j||a.help._overrides.push([h,f]);(j||l)&&g&&a.help._recursions.push([d,b,k]);if(j){if(!d.__source__)d.__source__=d.toString().replace(/^function\b ?/,
"function "+k);if(d.toString===Function.prototype.toString)d.toString=a.help._toString}if(!d.help)d.help=a.help._help}}}}}});