/** * @license dotJEM Angular Routing * (c) 2012-2013 dotJEM (Jens Melgaard) * License: MIT * * @module angular-routing */ var dotjem;(function(e,t,r,n){"use strict";function a(e,t){return C(new(C(function(){},{prototype:e})),t)}function o(e){return g(e)?e:e.$fullname||e.fullname}function i(e){if(v(e))return function(t,r){return t.invoke(e,e,r)};if(b(e)){var t=e[e.length-1];return function(r,n){return r.invoke(e,t,n)}}return null}function u(e,t,r){var n=y(e||{});return n.$all=y(e||{}),n.$path=y(t||{}),n.$search=y(r||{}),n}function c(e,t){var r=[];return w(e,function(e,t){r.push(s(t,!0)+(e===!0?"":"="+s(e,!0)))}),r.length?t+r.join("&"):""}function s(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function l(e){return e.replace(T,"\\$&")}function f(){function e(e){var t={handler:{}};return d(e.to)&&(t.to=e.to),d(e.from)&&(t.from=e.from),d(e.handler)&&(t.handler=e.handler),d(e.before)&&m(t.handler.before)&&(t.handler.before=e.before),d(e.between)&&m(t.handler.between)&&(t.handler.between=e.between),d(e.after)&&m(t.handler.after)&&(t.handler.after=e.after),t}function t(e,t){var r=H.validateTarget(e),n=H.validateTarget(t);if(!r||!n){if(r)throw Error("Invalid transition - to: '"+t+"'.");if(n)throw Error("Invalid transition - from: '"+e+"'.");throw Error("Invalid transition - from: '"+e+"', to: '"+t+"'.")}}function r(e){for(var t=n,r=e.split("."),a=r[0]===_?1:0;r.length>a;a++)r[a]in t.children||(t.children[r[a]]={children:{},targets:{}}),t=t.children[r[a]];return t}var n={children:{},targets:{}};this.onEnter=function(t,r){if($(r)){var n=e(r);this.transition(n.from||"*",t,n.handler)}else(v(r)||b(r))&&this.transition("*",t,r)},this.onExit=function(t,r){if($(r)){var n=e(r);this.transition(t,n.to||"*",n.handler)}else(v(r)||b(r))&&this.transition(t,"*",r)},this.transition=function(e,n,a){var u,c=this;if(b(e))w(e,function(e){c.transition(e,n,a)});else if(b(n))w(n,function(t){c.transition(e,t,a)});else{if(e=o(e),n=o(n),n===e&&-1===n.indexOf("*"))return this;t(e,n),i(a)&&(a={between:a}),u=r(e),n in u.targets||(u.targets[n]=[]),a.name=e+" -> "+n,u.targets[n].push(a)}return this},this.$get=["$q","$injector",function(e,t){function r(e,r){function n(n,a,o){var c;w(u,function(u){d(c=n(u))&&i(c)(t,{$to:r,$from:e,$transition:a,$view:o})})}var a=s(o(e)),u=c(a,o(r));return{before:function(e,t){n(function(e){return e.before},e,t)},between:function(e,t){n(function(e){return e.between},e,t)},after:function(e,t){n(function(e){return e.after},e,t)}}}function a(e){return e[0]===_&&e.splice(0,1),e}function u(e,t){for(var r,n,o=a(e.split(".")).reverse(),i=a(t.split(".")).reverse();;){if(r=o.pop(),n=i.pop(),"*"===n||"*"===r)return!0;if(r!==n)return!1;if(!d(r)||!d(n))return!0}return!0}function c(e,t){var r=[];return w(e,function(e){w(e.targets,function(e,n){u(n,t)&&w(e,function(e){r.push(e)})})}),r}function s(e){var t=n,r=e.split("."),a=[],o=r[0]===_?1:0;do{if("*"in t.children&&a.push(t.children["*"]),!(r[o]in t.children))break;t=t.children[r[o]],a.push(t)}while(o++0))throw Error(O.regexConverterNotValid);t=e}return r=RegExp(t,n),{parse:function(e){var t=r.test(e);return{accept:t,value:t?r.exec(e):null}},format:function(e){var t=""+e,n=r.test(t);if(!n)throw Error(O.valueCouldNotBeMatchedByRegex);return t}}}),this.convert("",function(){return function(){return!0}}),this.$get=["$rootScope","$location","$q","$injector","$routeParams","$browser",function(t,r,i,u,s,l){function f(e,t,r){var n=a(e,{self:a(e.self,{params:C({},r,t),searchParams:r,pathParams:t})});return n}function h(e){var t,n;return w(p,function(a){!n&&(t=a.match(e))&&(n=f(a,t,r.search()))}),n||p[null]&&f(p[null],{},{})}function m(){var e=h(r.path()),a=g.current,o=e?e.self:n;if(!v&&o&&a&&angular.equals(o.pathParams,a.pathParams)&&!o.reloadOnSearch)a.params=o.params,a.searchParams=o.searchParams,a.pathParams=o.pathParams,y(o.params,s),t.$broadcast(R.ROUTE_UPDATE,a);else if(e||a){v=!1;var c=t.$broadcast(R.ROUTE_CHANGE_START,o,a);if(!c.defaultPrevented){g.current=o,e&&e.redirect(r,o);var l=i.when(o);o&&w(b,function(e){l=l.then(function(){var t=u.invoke(e,o,{$next:o});return i.when(t)})}),l.then(function(){o===g.current&&(e&&angular.copy(o.params,s),t.$broadcast(R.ROUTE_CHANGE_SUCCESS,o,a))},function(e){o===g.current&&t.$broadcast(R.ROUTE_CHANGE_ERROR,o,a,e)})}}}var v=!1,g={routes:p,html5Mode:function(){return e.html5Mode()},hashPrefix:function(){return e.hashPrefix()},reload:function(){v=!0,t.$evalAsync(m)},change:function(e){var t=e.params||{},n=o(e.route,t),a=r.path(n).search(t||{});e.replace&&a.replace()},format:function(t,r,n){var r=r||{},n=d(n)?n:!0,a=o(t,r)+c(r,"?");return e.html5Mode()&&n&&(a=(l.baseHref()+a).replace(/\/\//g,"/")),a}};return t.$on(R.LOCATION_CHANGE,m),g}]}];angular.module("dotjem.routing").provider("$route",A).value("$routeParams",{}),angular.module("dotjem.routing").provider("$stateTransition",f);var P=["$routeProvider","$stateTransitionProvider",function(e,t){var r=new V(e,t),a=r.createState(_,{}),i=new k(a);new I,this.state=function(e,t){H.validateName(e);var n=i.lookup(e,1);return n.add(r.createState(e,t,n)),this},this.$get=["$rootScope","$q","$injector","$route","$view","$stateTransition","$location","$scroll","$resolve",function(e,t,r,c,s,l,f,p,h){function m(t){d(t)?g(t)||$(t)?(y=o(t),0!==y.indexOf(_)&&(y=_+"."+y)):t&&(y=a.fullname):y=x.fullname,e.$evalAsync(function(){v({state:x,params:S.params,fource:y})})}function v(n){var a,u,f=!1,d={};O.ended||O.abort(),a=O=T.next(function(e){T=e}),a=a.execute(B.initializeContext(o(n.state),n.params,i)).execute(function(e){e.promise=t.when("")}).execute(B.createEmitter(l)).execute(B.buildChanges(y)).execute(B.createTransition(v)).execute(function(){y=null}).execute(B.raiseUpdate(e)).execute(B.updateRoute(c,n.updateroute)).execute(B.beginTransaction(s,r)).execute(B.before()).execute(function(t){e.$broadcast(R.STATE_CHANGE_START,t.toState,S.current).defaultPrevented&&t.abort()}),a.ended||(w(a.changed.array,function(e){a.promise=a.promise.then(function(){return(f=f||e.isChanged)&&h.clear(e.state.resolve),h.all(e.state.resolve,d,{$to:a.toState,$from:S.current})}).then(function(t){a.completePrep(e.state.fullname,d=C({},d,t)),u=e.state.scrollTo})}),a.promise.then(function(){a.execute(B.between(e)).execute(function(t){x=t.to;var r=S.current;S.params=t.params,S.current=t.toState,t.transaction.commit(),e.$broadcast(R.STATE_CHANGE_SUCCESS,t.toState,r)}).execute(B.after(p,u)).complete()},function(t){a.execute(function(r){e.$broadcast(R.STATE_CHANGE_ERROR,r.toState,S.current,t),r.abort()})}))}var b=new G(c),y=null,x=a,S={root:a,current:C(a.self,{$params:u()}),params:u(),"goto":function(e,t){v({state:e,params:u(t),updateroute:!0})},lookup:function(e){return i.resolve(x,e,!0)},reload:m,url:function(e,t,r){var a=x;return 0===arguments.length?b.buildUrl(S.current,a,n,n):1===arguments.length?E(e)?b.buildUrl(S.current,a,n,e):(a=i.resolve(x,o(e),!1),b.buildUrl(S.current,a,n,n)):(d(e)&&(a=i.resolve(x,o(e),!1)),E(t)?b.buildUrl(S.current,a,n,t):b.buildUrl(S.current,a,t,r))},is:function(e){return x.is(o(e))},isActive:function(e){return x.isActive(o(e))}};e.$on(R.ROUTE_CHANGE_SUCCESS,function(){var e=c.current;e?e.state&&v({state:e.state,params:u(e.params,e.pathParams,e.searchParams)}):v({state:a,params:u()})}),e.$on(R.ROUTE_UPDATE,function(){var t=c.current,r=u(t.params,t.pathParams,t.searchParams);S.params=r,S.current.$params=r,e.$broadcast(R.STATE_UPDATE,S.current)});var T=new q(S,function(){},a).complete(),O=T;return S}]}];angular.module("dotjem.routing").provider("$state",P);var U=[function(){this.$get=["$q","$injector",function(e,t){var r={},n={};return r.push=function(e,t){n[e]=t},r.clear=function(e){m(e)&&(n={}),g(e)?delete n[e]:$(e)?angular.forEach(e,function(e,t){r.clear(t)}):b(e)&&angular.forEach(e,function(e){r.clear(e)})},r.all=function(r,a,o){var u=[],c=[],s=e.defer();return angular.forEach(r,function(e,r){var l;c.push(r);try{r in n||(g(e)?n[r]=angular.isString(e):null!=(l=i(e))&&(n[r]=l(t,C({},a,o)))),u.push(n[r])}catch(f){s.reject("Could not resolve "+r)}}),e.all(u).then(function(e){var t={};angular.forEach(e,function(e,r){t[c[r]]=e}),s.resolve(t)},function(e){s.reject(e)}),s.promise},r}]}];angular.module("dotjem.routing").provider("$resolve",U),angular.module("dotjem.routing").provider("$template",p),angular.module("dotjem.routing").provider("$view",h);var j=[function(){this.$get=["$window","$rootScope","$anchorScroll","$injector",function(e,t,r,a){function o(r){return u.$current=r,"top"===r?(e.scrollTo(0,0),n):(t.$broadcast("$scrollPositionChanged",r),n)}var u=function(e){var t;m(e)?r():g(e)?o(e):null!==(t=i(e))&&o(t(a))};return u.$current="top",u}]}];angular.module("dotjem.routing").provider("$scroll",j);var N=function(){function e(e,t,r,n){this._name=e,this._fullname=t,this._parent=n,this._children={},this._self=r,this._self.$fullname=t,this._reloadOnOptional=!d(r.reloadOnSearch)||r.reloadOnSearch,this._scrollTo="top",n&&d(n.scrollTo)&&(this._scrollTo=n.scrollTo),d(this._self.scrollTo)&&(this._scrollTo=this._self.scrollTo)}return Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullname",{get:function(){return this._fullname},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reloadOnOptional",{get:function(){return this._reloadOnOptional},set:function(e){this._reloadOnOptional=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"self",{get:function(){return y(this._self)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"route",{get:function(){return this._route},set:function(e){if(m(e))throw Error(O.routeCannotBeUndefined);this._route=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return null===this.parent?this:this._parent.root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTo",{get:function(){return this._scrollTo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"views",{get:function(){return this.self.views},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolve",{get:function(){return this.self.resolve},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this._children[e.name]=e,this},e.prototype.resolveRoute=function(){return d(this.route)?this.route.route:d(this.parent)?this.parent.resolveRoute():""},e.prototype.is=function(e){return this.fullname===e||this.fullname===_+"."+e},e.prototype.isActive=function(e){return this.is(e)?!0:this.parent&&this.parent.isActive(e)||!1},e}(),k=function(){function e(e){this.root=e,this.nameRegex=RegExp("^("+l(_)+"\\.)?\\w+(\\.\\w+)*$"),this.siblingRegex=RegExp("^\\$node\\(([-+]?\\d+)\\)$"),this.indexRegex=RegExp("^\\[(-?\\d+)\\]$")}return e.prototype.lookup=function(e,t){for(var r=this.root,n=e.split("."),a=n[0]===_?1:0,t=d(t)?t:0;n.length-t>a;a++){if(!(n[a]in r.children))throw Error("Could not locate '"+n[a]+"' under '"+r.fullname+"'.");r=r.children[n[a]]}return r},e.prototype.resolve=function(e,t,r){var n,a=this,o=this.siblingRegex.exec(t),i=e;if(o?i=this.selectSibling(Number(o[1]),i):this.nameRegex.test(t)?i=this.lookup(t):(n=t.split("/"),w(n,function(t){i=a.select(e,t,i)})),i===this.root)throw Error(O.expressionOutOfBounds);return i&&r?y(i.self):i},e.prototype.selectSibling=function(e,t){var r=[],n=0;for(w(t.parent.children,function(e){r.push(e),t.fullname===e.fullname&&(n=r.length-1)});0>e;)e+=r.length;return e=(n+e)%r.length,r[e]},e.prototype.select=function(e,t,r){if("."===t){if(e!==r)throw Error(O.invalidBrowserPathExpression);return r}if(".."===t){if(m(r.parent))throw Error(O.expressionOutOfBounds);return r.parent}if(""===t){if(e!==r)throw Error(O.invalidBrowserPathExpression);return this.root}var n=this.indexRegex.exec(t);if(n){var a=Number(n[1]),o=[];if(w(r.children,function(e){o.push(e)}),Math.abs(a)>=o.length)throw Error(O.expressionOutOfBounds);return 0>a?o[o.length+a]:o[a]}if(t in r.children)return r.children[t];throw Error(O.couldNotFindStateForPath+": "+t)},e}(),I=function(){function e(){}return e.prototype.buildStateArray=function(e,t){function r(){var e={};return a.route&&w(a.route.params,function(r,n){e[n]=t[n]}),e}var n=[],a=e;do n.push({state:a,params:r()});while(a=a.parent);return n},e.prototype.compare=function(e,t,r,n,a){for(var o,i,u=this.buildStateArray(e,r||{}),c=this.buildStateArray(t,n),s=Math.max(u.length,c.length),l=!1,f=!x(r,n),p=0;s>p;p++)o=u[u.length-p-1],i=c[c.length-p-1],m(i)?c[0].isChanged=l=!0:i.isChanged=m(o)||a===i.state.fullname||i.state.fullname!==o.state.fullname||!x(i.params,o.params)?l=!0:!1;return l=l||c[0].state.reloadOnOptional&&f,{array:c.reverse(),stateChanges:l,paramChanges:f}},e}(),V=function(){function e(e,t){this.routes=e,this.transitions=t}return e.prototype.createRoute=function(e,t,r,n){var a=t||"";return""!==a&&"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),"/"!==e[0]&&""!==e&&(a+="/"),a+=e,this.routes.when(a,{state:r,reloadOnSearch:n})},e.prototype.createState=function(e,t,r){var n=this,a=e.split(".").pop();d(r)&&(e=r.fullname+"."+a);var o=new N(a,e,t,r);return o.reloadOnOptional=!d(t.reloadOnSearch)||t.reloadOnSearch,d(t.route)&&(o.route=this.createRoute(t.route,r.resolveRoute(),o.fullname,o.reloadOnOptional).$route),d(t.onEnter)&&this.transitions.onEnter(o.fullname,t.onEnter),d(t.onExit)&&this.transitions.onExit(o.fullname,t.onExit),d(t.children)&&w(t.children,function(e,t){o.add(n.createState(o.fullname+"."+t,e,o))}),o},e}(),H=function(){function e(){}return e.nameValidation=/^\w+(\.\w+)*?$/,e.targetValidation=/^\$?\w+(\.\w+)*(\.[*])?$/,e.validateName=function(t){if(!e.nameValidation.test(t)||t===_)throw Error("Invalid name: '"+t+"'.")},e.validateTarget=function(t){return"*"===t||e.targetValidation.test(t)?!0:!1},e}(),G=function(){function e(e){this.route=e}return e.prototype.buildUrl=function(e,t,r,n){var a=e;if(!t.route)throw Error("Can't build url for a state that doesn't have a url defined.");var o={},i=a&&a.$params.$all||{};return w(t.route.params,function(e,t){t in i&&(o[t]=i[t])}),this.route.format(t.route.route,C(o,r||{}),n)},e}(),B={initializeContext:function(e,t,r){return function(n){var a=r.resolve(n.from,e,!1);n.to=a,n.params=t,n.toState=C({},a.self,{$params:t})}},createEmitter:function(e){return function(t){t.emit=e.find(t.$state.current,t.toState)}},buildChanges:function(e){return function(t){t.changed=(new I).compare(t.from,t.to,t.$state.params,t.params,e)}},createTransition:function(e){return function(t){var r={canceled:!1,cancel:function(){r.canceled=!0},"goto":function(t,n){r.canceled=!0,e({state:t,params:{all:n},updateroute:!0})}};t.transition=r}},raiseUpdate:function(e){return function(t){var r=t.changed,n=t.$state;r.stateChanges||(r.paramChanges&&(n.params=t.params,n.current.$params=t.params,e.$broadcast("$stateUpdate",n.current)),t.abort())}},updateRoute:function(e,t){return function(r){var n=r.to.route;if(t&&n){var a={},o=r.$state.params.$all;w(n.params,function(e,t){t in o&&(a[t]=o[t])});var i=C(a,r.params.$all);e.change(C({},n,{params:i})),r.abort()}}},before:function(){return function(e){e.emit.before(e.transition,e.transaction),e.transition.canceled&&e.abort()}},between:function(e){return function(t){t.emit.between(t.transition,t.transaction),t.transition.canceled&&(e.$broadcast("$stateChangeAborted",t.toState,t.$state.current),t.abort())}},after:function(e,t){return function(r){r.transition.canceled||(r.transition.cancel=function(){throw Error("Can't cancel transition in after handler")},r.emit.after(r.transition,r.transaction),e(t))}},beginTransaction:function(e,t){return function(r){r.transaction=e.beginUpdate(),r.transaction.clear();var n=!1;w(r.changed.array,function(e){n=n||e.isChanged,w(e.state.views,function(a,o){var u;d(a.sticky)&&((u=i(a.sticky))?a.sticky=u(t,{$to:r.toState,$from:r.$state.current}):g(a.sticky)||(a.sticky=e.state.fullname)),n||a.force||d(a.sticky)?r.prepUpdate(e.state.fullname,o,a):r.prepCreate(e.state.fullname,o,a)})})}}},q=function(){function e(e,t,r){this.aborted=!1,this.completed=!1,this._prep={},this._$state=e,this.to=r,this.onComplete=t}return Object.defineProperty(e.prototype,"$state",{get:function(){return this._$state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this.aborted||this.completed},enumerable:!0,configurable:!0}),e.prototype.next=function(t){this.ended||this.abort();var r=new e(this.$state,t);return r.previous=this,r.from=this.to,this.previous=null,r},e.prototype.execute=function(e){return!this.ended&&(e(this),this.aborted)?this.previous:this},e.prototype.complete=function(){return this.ended||(this.onComplete(this),this.completed=!0),this},e.prototype.abort=function(){return this.ended||(this.aborted=!0,this.transaction&&!this.transaction.completed&&this.transaction.cancel()),this},e.prototype.prepUpdate=function(e,t,r){var n=this._prep[e]=this._prep[e]||{};n[t]=this.transaction.prepUpdate(t,r)},e.prototype.prepCreate=function(e,t,r){var n=this._prep[e]=this._prep[e]||{};n[t]=this.transaction.prepCreate(t,r)},e.prototype.completePrep=function(e,t){w(this._prep[e],function(e){e(t)})},e}(),D=["$state","$compile","$controller","$view","$animate","$template",function(e,t,r,a,o,i){return{restrict:"ECA",terminal:!0,priority:1e3,transclude:"element",compile:function(e,u,c){return function(e,u,s){function l(){d($)&&($.remove(),$=n,u.contents().show())}function f(){null!==y&&y.then(function(e){u.contents().hide(),u.append($=angular.element(e))})}function p(e){m&&(m.$destroy(),m=null),g&&(e?o.leave(g):g.remove(),g=null)}function h(n){var i,s=a.get(b);if(s&&s.template){if(s.version===w)return;w=s.version,i=s.controller,s.template.then(function(a){var l=e.$new();c(l,function(e){p(n),e.html(a),n?o.enter(e,null,u):u.after(e);var c,f=t(e.contents());m=l,g=e,i&&(c=C({},s.locals),c.$scope=m,i=r(i,c),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)),f(m),m.$emit("$viewContentLoaded"),m.$eval(E)})})}else w=-1,p(n)}var m,g,$,b=s.jemView||s.name,E=s.onload||"",w=-1,y=s.loader&&i.get(s.loader)||null;e.$on(R.VIEW_UPDATE,function(e,t){t===b&&h(!0)}),e.$on(R.VIEW_REFRESH,function(e,t,r){t===b&&(v(m.refresh)?m.refresh(r):m.$broadcast("$refresh",t,r))}),e.$on("$viewPrep",function(e,t,r){t===b&&"update"===r.type?f():"cancel"===r.type&&l()}),h(!1)}}}}];angular.module("dotjem.routing").directive("jemView",D);var F=["$scroll","$timeout",function(e,t){return{restrict:"AC",terminal:!1,link:function(r,n,a){function o(e){e===i&&t(function(){n[0].scrollIntoView()},u)}var i=a.jemAnchor||a.id,u=d(a.delay)?Number(a.delay):1;r.$on("$scrollPositionChanged",function(e,t){o(t)}),o(e.$current)}}}];angular.module("dotjem.routing").directive("jemAnchor",F),angular.module("dotjem.routing").directive("id",F);var M=["$state","$route",function(e,t){return{restrict:"AC",link:function(r,n,a){function o(){var t=r.$eval(a.sref),o=r.$eval(a.params),i=e.url(t,o);s||(i="#"+l+i),n.attr(f[c],i)}function i(){var t=r.$eval(a.sref);e.isActive(t)?n.addClass(a.activeClass):n.removeClass(a.activeClass)}function u(){r.$apply(function(){var t=r.$eval(a.sref),n=r.$eval(a.params);e.goto(t,n)})}var c=n[0].tagName.toLowerCase(),s=t.html5Mode(),l=t.hashPrefix(),f={a:"href",form:"action"},p=S;d(a.activeClass)&&(p=i);var h=r.$on(R.STATE_CHANGE_SUCCESS,p);p(),c in f?(d(a.params)&&r.$watch(a.params,o,!0),a.$observe("sref",o)):n.bind("click",u),r.$on("$destroy",function(){n.unbind("click",u),h()})}}}];angular.module("dotjem.routing").directive("sref",M),r.State=N,r.StateBrowser=k,r.StateComparer=I,r.StateFactory=V,r.StateRules=H,r.StateUrlBuilder=G,r.RootName=_})(window,document,dotjem||(dotjem={}));