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

//>>built
define("dojo/hash","./_base/kernel require ./_base/config ./aspect ./_base/lang ./topic ./domReady ./sniff".split(" "),function(g,C,u,D,h,E,F,v){function r(a,b){var e=a.indexOf(b);return 0<=e?a.substring(e+1):""}function d(){return r(location.href,"#")}function m(){E.publish("/dojo/hashchange",d())}function w(){d()!==c&&(c=d(),m())}function x(a){if(k)if(k.isTransitioning())setTimeout(h.hitch(null,x,a),n);else{var b=k.iframe.location.href,e=b.indexOf("?");k.iframe.location.replace(b.substring(0,e)+
"?"+a)}else b=location.href.replace(/#.*/,""),location.replace(b+"#"+a),!y&&w()}function G(){function a(){c=d();z=f?c:r(t.href,"?");p=!1;q=null}var b=document.createElement("iframe"),e=u.dojoBlankHtmlUrl||C.toUrl("./resources/blank.html");b.id="dojo-hash-iframe";b.src=e+"?"+d();b.style.display="none";document.body.appendChild(b);this.iframe=g.global["dojo-hash-iframe"];var z,p,q,A,f,t=this.iframe.location;this.isTransitioning=function(){return p};this.pollLocation=function(){if(!f)try{var B=r(t.href,
"?");document.title!=A&&(A=this.iframe.document.title=document.title)}catch(H){f=!0}var l=d();if(p&&c===l)if(f||B===q)a(),m();else{setTimeout(h.hitch(this,this.pollLocation),0);return}else if(c!==l||!f&&z!==B){if(c!==l){c=l;p=!0;q=l;b.src=e+"?"+q;f=!1;setTimeout(h.hitch(this,this.pollLocation),0);return}f||(location.href="#"+t.search.substring(1),a(),m())}setTimeout(h.hitch(this,this.pollLocation),n)};a();setTimeout(h.hitch(this,this.pollLocation),n)}g.hash=function(a,b){if(!arguments.length)return d();
"#"==a.charAt(0)&&(a=a.substring(1));b?x(a):location.hash="#"+a;return a};var c,k,y,n=u.hashPollFrequency||100;F(function(){"onhashchange"in g.global&&(!v("ie")||8<=v("ie")&&"BackCompat"!=document.compatMode)?y=D.after(g.global,"onhashchange",m,!0):document.addEventListener?(c=d(),setInterval(w,n)):document.attachEvent&&(k=new G)});return g.hash});