we need to be able to easily kick off calling setState teardown whatever is there turn on a particular binding called when the route is ready
338912
function() {
                    if (!can.route.currentBinding) {
                        can.route._call("bind");
                        can.route.bind("change", onRouteDataChange);
                        can.route.currentBinding = can.route.defaultBinding;
                    }
                }
1085547
function handlerEnteredOrUpdated(currentHandlerInfos, handlerInfo, enter, transition) {

    var handler = handlerInfo.handler,
        context = handlerInfo.context;

    if (enter) {
      _routerUtils.callHook(handler, 'enter', transition);
    }
    if (transition && transition.isAborted) {
      throw new _routerTransition.TransitionAborted();
    }

    handler.context = context;
    _routerUtils.callHook(handler, 'contextDidChange');

    _routerUtils.callHook(handler, 'setup', context, transition);
    if (transition && transition.isAborted) {
      throw new _routerTransition.TransitionAborted();
    }

    currentHandlerInfos.push(handlerInfo);

    return true;
  }
731499
function RouterStateSnapshot(url, root) {
        _super.call(this, root);
        this.url = url;
        setRouterStateSnapshot(this, root);
    }
898240
protected void onNext()
	{
		stateMachine.next();
		updateButtonState();
		final String name = getStateMachine().getCurrentState().getName();
		final CardLayout cardLayout = getWizardContentPanel().getCardLayout();
		cardLayout.show(getWizardContentPanel(), name);
	}
837941
function () {
            this.$BindableWidget.initWidget.call(this);

            var bindings = this._cfg.bind;
            var isBound = false;

            if (bindings.visible) {
                var visible = this._transform(bindings.visible.transform, bindings.visible.inside[bindings.visible.to], "toWidget");
                if (visible === true) {
                    this.show();
                }
                isBound = true;
            }
            if (!isBound) {
                this.$logWarn(this.BINDING_NEEDED, [this.$class, "visible"]);
            }
        }
312389
function () {
			BaseController.prototype.onInit.call(this);

			// manually call the handler once at startup as device API won't do this for us
			this._onOrientationChange({
				landscape: Device.orientation.landscape
			});

			this.getRouter().getRoute("tools").attachPatternMatched(this._onMatched, this);
		}
759708
function (entering, params, onEnter, updateParams) {
          var inactivatedState = getInactivatedState(entering);
          if (inactivatedState && (updateParams || !getInactivatedState(entering, params))) {
            var savedLocals = entering.locals;
            this.stateExiting(inactivatedState);
            entering.locals = savedLocals;
          }
          entering.self.status = 'entered';

          if (onEnter)
            $injector.invoke(onEnter, entering.self, entering.locals.globals);
        }
268122
function () {
            if (!this.props.entry.get("rename")) {
                if (this.state.clickTimer !== null) {
                    this.clearTimer();
                }
                this.props.actions.selectInWorkingSet(this.myPath());
            }
        }
792948
function setRoutesInState(routes) {
    const routesByName = {};
    routes.forEach(route => {
        routesByName[route.name] = route.route;
    });
    return routesByName;
}
557391
function waitForReadyState(element, readyState, interval, done) {
  var timer = setInterval(function() {
    if (element.readyState >= readyState) {
      clearInterval(timer);
      done(null, true);
    }
  }, interval);
}
889412
async function main() {
  event.$emit('before-client-render')

  if (globalState.initialData) {
    dataStore.replaceState(globalState.initialData)
  }

  await routerReady(router)

  if (router.getMatchedComponents().length === 0) {
    throw new ReamError(pageNotFound(router.currentRoute.path))
  }
}
1135027
function() {
		if (!ready) {
			ready = true;
			//Call the stack of onload functions in given context or window object
			for (var i=0, len=stack.length; i < len; i++) {
				stack[i][0].call(stack[i][1]);	
			}
			//Clean up after the DOM is ready
			if (document.removeEventListener) {
				document.removeEventListener("DOMContentLoaded", onStateChange, false);
			}
			//Clear the interval	
			clearInterval(timer);
			//Null the timer and event handlers to release memory
			document.onreadystatechange = window.onload = timer = null;
		}
	}
980834
function resetUriRouteHandlers() {
  /**
   * URIs can point to many different things, and this list will probably grow.
   * @type {[{when: RegExp, html: function, json: function}]}
   */
  uriRoutes = [
    // assume published
    {
      when: /\/_pages\//,
      default: assumePublishedUnlessEditing(renderPage),
      json: assumePublishedUnlessEditing(getDBObject)
    },
    // assume published
    {
      when: /\/_components\//,
      default: assumePublishedUnlessEditing(renderComponent),
      json: assumePublishedUnlessEditing(components.get)
    },
    // uris are not published, they only exist
    {
      when: /\/_uris\//,
      isUri: true,
      html: renderUri,
      json: db.get
    }];
}
694007
private void bind() {
    distanceRemainingText = findViewById(R.id.distanceRemainingText);
    timeRemainingText = findViewById(R.id.timeRemainingText);
    arrivalTimeText = findViewById(R.id.arrivalTimeText);
    rerouteProgressBar = findViewById(R.id.rerouteProgressBar);
    updateRouteOverviewImage();
  }
680129
@Override
    public void onReloadRequired(Map<String, ServerState> states) {
        ReloadState reloadState = MODULES.getReloadState();
        reloadState.updateFrom(states);
        reloadState.propagateChanges();
    }
1107948
function _readyStateChange(state) {
            this.readyState = state;

            if (typeof this.onreadystatechange == "function") {
                this.onreadystatechange();
            }

            this.dispatchEvent(new HttpRequestEvent("readystatechange"));

            if (this.readyState == IsotropyXMLHttpRequest.DONE) {
                this.dispatchEvent(new HttpRequestEvent("load", false, false, this));
                this.dispatchEvent(new HttpRequestEvent("loadend", false, false, this));
            }
        }
586461
function onActivate(event) {
  // Delete old caches to save space.
  const dropOldCaches = async () => {
    const cacheNames = await caches.keys();

    // Return true on all the caches we want to clean up.
    // Note that caches are shared across the origin, so only remove
    // caches we are sure we created.
    const cleanTheseUp = cacheNames.filter((cacheName) =>
        cacheName.startsWith(CACHE_NAME_PREFIX) && cacheName != CACHE_NAME);

    const cleanUpPromises =
        cleanTheseUp.map((cacheName) => caches.delete(cacheName));

    await Promise.all(cleanUpPromises);
  };

  event.waitUntil(dropOldCaches());
}