Function to handle URL hash changes. This is not used until the initialization of the configurator is completed.
Also, this will simply get the latest URL params, pass them to the transpiler, and set the styles in the iframe manager.
766561
function handleHashChange_() {
  cssTranspiler.getCssWithVars(getUrlCssVars()).then(updatedStyles => {
    iframeManager.setStyle(updatedStyles);
  }).catch(error => {
    // Don't set the styles, log the error
    console.error(error);
  });
}
843443
function(url) {
      if (!isSupportHistoryAPI && ('' + url).indexOf('#') === 0) {
        changeState(null, url, true);
      } else {
        windowLocation.replace(url);
      }
    }
207122
function(options={}, callback=function(){}) {

    // Let all of our components always have referance to our router
    Component.prototype.router = this;

    // Save our config referance
    this.config = options;
    this.config.handlers = [];
    this.config.containers = [];

    // Normalize our url configs
    this.config.root = normalizeUrl(this.config.root);
    this.config.assetRoot = this.config.assetRoot ? normalizeUrl(this.config.assetRoot) : this.config.root;
    this.config.jsPath = normalizeUrl(this.config.assetRoot, this.config.jsPath);
    this.config.cssPath = normalizeUrl(this.config.assetRoot, this.config.cssPath);

    // Get a unique instance id for this router
    this.uid = $.uniqueId('router');

    // Allow user to override error route
    this.config.errorRoute && (ERROR_ROUTE_NAME = this.config.errorRoute);

    // Convert our routeMappings to regexps and push to our handlers
    _.each(this.config.routeMapping, function(value, route){
      var regex = this._routeToRegExp(route);
      this.config.handlers.unshift({ route: route, regex: regex, app: value });
    }, this);

    // Use the user provided container, or default to the closest `<main>` tag
    this.config.container = $((this.config.container || 'main'))[0];
    this.config.containers.push(this.config.container);
    SERVICES.page = new ServiceLoader('page');

    // Install our global components
    _.each(this.config.services, function(selector, route){
      var container = $(selector)[0] || document.createElement('span');
      this.config.containers.push(container);
      SERVICES[route] = new ServiceLoader(route);
      this._fetchResource(route, container).catch(function(){});
    }, this);

    // Watch click events on links in all out containers
    this._watchLinks(this.config.containers);

    // Start the history and call the provided callback
    Backbone.history.start({
      pushState: (this.config.pushState === undefined) ? true : this.config.pushState,
      root: (this.config.root || '')
    }).then(callback);

    return this;
  }
1152414
function () {
            if (!this._isIE7OrLess) {
                this._hashChangeCallbackAdded = true;
                ariaUtilsAriaWindow.attachWindow();
                ariaUtilsEvent.addListener(Aria.$window, 'hashchange', {
                    fn : this._internalCallback,
                    scope : this
                }, true);
            }

        }
193257
function( url, data, noEvents ) {
            var state, href, hash, popstateEvent,
                isPopStateEvent = $.event.special.navigate.isPushStateEnabled();

            // Get the url as it would look squashed on to the current resolution url
            href = path.squash( url );

            // sort out what the hash sould be from the url
            hash = this.hash( url, href );

            // Here we prevent the next hash change or popstate event from doing any
            // history management. In the case of hashchange we don't swallow it
            // if there will be no hashchange fired (since that won't reset the value)
            // and will swallow the following hashchange
            if ( noEvents && hash !== path.stripHash(path.parseLocation().hash) ) {
                this.preventNextHashChange = noEvents;
            }

            // IMPORTANT in the case where popstate is supported the event will be triggered
            //      directly, stopping further execution - ie, interupting the flow of this
            //      method call to fire bindings at this expression. Below the navigate method
            //      there is a binding to catch this event and stop its propagation.
            //
            //      We then trigger a new popstate event on the window with a null state
            //      so that the navigate events can conclude their work properly
            //
            // if the url is a path we want to preserve the query params that are available on
            // the current url.
            this.preventHashAssignPopState = true;
            window.location.hash = hash;

            // If popstate is enabled and the browser triggers `popstate` events when the hash
            // is set (this often happens immediately in browsers like Chrome), then the
            // this flag will be set to false already. If it's a browser that does not trigger
            // a `popstate` on hash assignement or `replaceState` then we need avoid the branch
            // that swallows the event created by the popstate generated by the hash assignment
            // At the time of this writing this happens with Opera 12 and some version of IE
            this.preventHashAssignPopState = false;

            state = $.extend({
                url: href,
                hash: hash,
                title: document.title
            }, data);

            if ( isPopStateEvent ) {
                popstateEvent = new $.Event( "popstate" );
                popstateEvent.originalEvent = {
                    type: "popstate",
                    state: null
                };

                this.squash( url, state );

                // Trigger a new faux popstate event to replace the one that we
                // caught that was triggered by the hash setting above.
                if ( !noEvents ) {
                    this.ignorePopState = true;
                    $.mobile.window.trigger( popstateEvent );
                }
            }

            // record the history entry so that the information can be included
            // in hashchange event driven navigate events in a similar fashion to
            // the state that's provided by popstate
            this.history.add( state.url, state );
        }
234245
def _update_url_map(self):
        '''
        
        '''
        if HAS_WEBSOCKETS:
            self.url_map.update({
                'ws': WebsocketEndpoint,
            })

        # Allow the Webhook URL to be overridden from the conf.
        self.url_map.update({
            self.apiopts.get('webhook_url', 'hook').lstrip('/'): Webhook,
        })

        # Enable the single-page JS app URL.
        self.url_map.update({
            self.apiopts.get('app_path', 'app').lstrip('/'): App,
        })
1330434
def process_url_params url, headers
      url_params = {}
      headers.delete_if do |key, value|
        if 'params' == key.to_s.downcase && value.is_a?(Hash)
          url_params.merge! value
          true
        else
          false
        end
      end
      unless url_params.empty?
        query_string = url_params.collect { |k, v| "#{k.to_s}=#{CGI::escape(v.to_s)}" }.join('&')
        url + "?#{query_string}"
      else
        url
      end
    end
1368177
function changeState(state, url, replace, lastURLValue) {
    if (!isSupportHistoryAPI) {
      // if not used implementation history.location
      if (isUsedHistoryLocationFlag === 0) isUsedHistoryLocationFlag = 2;
      // normalization url
      var urlObject = parseURL(url, isUsedHistoryLocationFlag === 2 && ('' + url).indexOf("#") !== -1);
      // if current url not equal new url
      if (urlObject._relative !== parseURL()._relative) {
        // if empty lastURLValue to skip hash change event
        lastURL = lastURLValue;
        if (replace) {
          // only replace hash, not store to history
          windowLocation.replace("#" + urlObject._special);
        } else {
          // change hash and add new record to history
          windowLocation.hash = urlObject._special;
        }
      }
    } else {
      lastURL = windowLocation.href;
    }
    if (!isSupportStateObjectInHistory && state) {
      stateStorage[windowLocation.href] = state;
    }
    isFireInitialState = false;
  }
987129
function hasHTMLExtension(url, callback) {
    var extension = path.extname(url);
    if (extension === "" || extension === ".html" /* || extension === ".htm" */) {
        return callback(true, extension);
    } else {
        return callback(false);
    }
}
49876
function (e) {

		var patternName;
		var state = e.state;

		if (state === null) {
			this.skipBack = false;
			return;
		} else if (state !== null) {
			patternName = state.pattern;
		}

		var iFramePath = "";
		iFramePath = this.getFileName(patternName);
		if (iFramePath === "") {
			iFramePath = "styleguide/html/styleguide.html";
		}

		var obj = JSON.stringify({
			"event": "patternLab.updatePath",
			"path": iFramePath
		});
		document.querySelector('.pl-js-iframe').contentWindow.postMessage(obj, urlHandler.targetOrigin);
		document.getElementById("title").innerHTML = "Pattern Lab - " + patternName;
		document.querySelector('.pl-js-open-new-window').setAttribute("href", urlHandler.getFileName(patternName));
	}
241825
private boolean hasHashChanged(Hasher hasher, RegData regDatum) {
        String urlExternalForm = regDatum.getURLExternalForm();
        Boolean modified = mUrlExternalForm2Modified.get(urlExternalForm);
        if (modified != null) {
            return modified;
        }
        // Check hash
        String newHash = hasher.hashURL(urlExternalForm);
        modified = !newHash.equals(regDatum.getHash());
        mUrlExternalForm2Modified.put(urlExternalForm, modified);
        return modified;
    }
847716
function (_changeLocale) {
        // If the saved locale is equal to the default locale make sure that the URL format is correct.
        if (to.meta.localized && !config.defaultLocaleInRoutes) {
          var _next = defineNext(to.meta.seedRoute.name);

          if (_changeLocale) {
            router.go(_next);
          } else {
            next(_next);
          }
        } else if (!to.meta.localized && config.defaultLocaleInRoutes) {
          var _next$1 = defineNext('__locale:' + to.meta.i18nId);

          if (_changeLocale) {
            router.go(_next$1);
          } else {
            next(_next$1);
          }
        } else if (_changeLocale) {
          router.go(defineNext());
        }
      }
153170
def update_url(self, url=None, regex=None):
        

        if not url and not regex:
            raise ValueError("Neither a url or regex was provided to update_url.")

        headers = {
            'X-Prerender-Token': self.token,
            'Content-Type': 'application/json',
        }
        data = {
            'prerenderToken': settings.PRERENDER_TOKEN,
        }
        if url:
            data["url"] = url
        if regex:
            data["regex"] = regex

        r = self.session.post(self.RECACHE_URL, headers=headers, data=data)
        return r.status_code < 500
105214
function parseUrlHash_(hash) {
    const parameters = hash.split('&');

    let tabHash = parameters[0];
    if (tabHash === '' || tabHash === '#') {
      tabHash = undefined;
    }

    // Split each string except the first around the '='.
    let paramDict = null;
    for (let i = 1; i < parameters.length; i++) {
      const paramStrings = parameters[i].split('=');
      if (paramStrings.length !== 2) {
        continue;
      }
      if (paramDict === null) {
        paramDict = {};
      }
      const key = decodeURIComponent(paramStrings[0]);
      const value = decodeURIComponent(paramStrings[1]);
      paramDict[key] = value;
    }

    return {tabHash, parameters: paramDict};
  }
951487
function styleForURL(url) {
        var styleSheetId, styles = {};
        url = _canonicalize(url);
        for (styleSheetId in _styleSheetDetails) {
            if (_styleSheetDetails[styleSheetId].canonicalizedURL === url) {
                styles[styleSheetId] = _styleSheetDetails[styleSheetId];
            }
        }
        return styles;
    }
1235790
function (param, options, callback) {
              embedProcessor.log(param.worker + ' started with parameters = ', param);
              param.status = true;
              param.duration = false;
              param.duration_formatted = false;
              param.thumbnail_url = false;
              param.favicon_url = '';
              param.service_name = '';
              param.provider_url = '';
              param.html = false;
              param.views = false;
              if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                param = embedProcessor._sources[param.source].prepareEmbedCode(param);
              }
              param = embedProcessor._paramEmbedCodeNormalizer(param);
              embedProcessor.log(param.worker + ' receive parameters = ', param);
              callback(param);
            }
577257
function goTo(hash,changehash){
		win.unbind('hashchange', hashchange);
		hash = hash.replace(/!\//,'');
		win.stop().scrollTo(hash,duration,{
			easing:easing,
			axis:'y'			
		});
		if(changehash !== false){
			var l = location;
			location.href = (l.protocol+'//'+l.host+l.pathname+'#!/'+hash.substr(1));
		}
		win.bind('hashchange', hashchange);
	}