🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

angular-ui-router

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-ui-router - npm Package Compare versions

Comparing version
1.0.26
to
1.0.27
+17
jest.config.js
const NG = process.env.NG || '1.7';
console.log(`Testing with AngularJS ${NG}`);
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['src', 'test'],
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)', '**/?*Spec.[jt]s'],
setupFilesAfterEnv: ['./test/jest.init.ts'],
moduleNameMapper: {
'^angular$': '<rootDir>/test/angular/jest-angular.js',
'^jest-angular-import$': `<rootDir>/test/angular/${NG}/angular.js`,
'^angular-animate$': `<rootDir>/test/angular/${NG}/angular-animate.js`,
'^angular-mocks$': `<rootDir>/test/angular/${NG}/angular-mocks.js`,
},
};
{
"name": "@uirouter/angularjs",
"readme": "README.md",
"out": "_doc",
"stripInternal": true,
"excludeNotExported": true,
"excludePrivate": true
}
+21
-6
{
"sample-app-angularjs": "https://github.com/ui-router/sample-app-angularjs.git",
"typescript2.2": "./test/typescript2.2",
"typescript2.3": "./test/typescript2.3",
"typescript2.4": "./test/typescript2.4",
"typescript2.5": "./test/typescript2.5",
"typescript2.6": "./test/typescript2.6"
"typescript": {
"typescript2.2": "./test/typescript/2.2",
"typescript2.3": "./test/typescript/2.3",
"typescript2.4": "./test/typescript/2.4",
"typescript2.5": "./test/typescript/2.5",
"typescript2.6": "./test/typescript/2.6",
"typescript2.8": "./test/typescript/2.8",
"typescript2.7": "./test/typescript/2.7",
"typescript2.9": "./test/typescript/2.9",
"typescript3.0": "./test/typescript/3.0",
"typescript3.1": "./test/typescript/3.1",
"typescript3.2": "./test/typescript/3.2",
"typescript3.3": "./test/typescript/3.3",
"typescript3.4": "./test/typescript/3.4",
"typescript3.5": "./test/typescript/3.5",
"typescript3.6": "./test/typescript/3.6",
"typescript3.7": "./test/typescript/3.7",
"typescript3.8": "./test/typescript/3.8",
"typescript3.9": "./test/typescript/3.9"
},
"sample-app-angularjs": "https://github.com/ui-router/sample-app-angularjs.git"
}

@@ -604,5 +604,3 @@ /**

};
var allClasses = getClasses(states)
.concat(splitClasses(activeEqClass))
.reduce(uniqR, []);
var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);
var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));

@@ -609,0 +607,0 @@ var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA;;;;;;;GAOG,CAAC,MAAM;AACV,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAEL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,UAAU,GAOX,MAAM,gBAAgB,CAAC;AAMxB,cAAc;AACd,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,MAAM,CAAC;IACX,IAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAClD,IAAI,UAAU;QAAE,GAAG,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAEhD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACzE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;IACvF,OAAO,EAAE,KAAK,EAAE,MAA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n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function(e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function() {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function() {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSrefDirective: ng1_directive;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(\n ref.paramExpr,\n function(val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n },\n true\n );\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiStateDirective: ng1_directive;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n const watchDeregFns = inputAttrs.reduce((acc, attr) => ((acc[attr] = noop), acc), {});\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach(field => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, expr => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(\n expr,\n newval => {\n rawDef[field] = newval;\n update();\n },\n true\n );\n });\n });\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActiveDirective: ng1_directive;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective(\n $state: StateService,\n $stateParams: Obj,\n $interpolate: IInterpolateService,\n $uiRouter: UIRouter\n ) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [];\n let activeEqClass: string;\n let uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function(newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n const deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function setupEventListeners() {\n const deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n const deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n const deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n\n function setStatesFromDefinitionObject(statesDefinition: object) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function(stateOrName: StateOrName | Array<StateOrName>, activeClass: string) {\n // Helper function to abstract adding state.\n const addStateForClass = function(stateOrName: string, activeClass: string) {\n const ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName as string, activeClass);\n } else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function(stateOrName: string) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n const state = $state.get(stateName, stateContext($element));\n\n const stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n\n // Update route state\n function update() {\n const splitClasses = str => str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList\n .map(x => x.activeClass)\n .map(splitClasses)\n .reduce(unnestR, []);\n\n const allClasses = getClasses(states)\n .concat(splitClasses(activeEqClass))\n .reduce(uniqR, []);\n const fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n const exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n const exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n const removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n },\n ],\n };\n },\n];\n\n/** @hidden */\ninterface Def {\n uiState: string;\n href: string;\n uiStateParams: Obj;\n uiStateOpts: any;\n}\n/** @hidden */\ninterface StateData {\n state: StateDeclaration;\n params: RawParams;\n activeClass: string;\n}\n\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n"
"/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function (e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function () {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSrefDirective: ng1_directive;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(\n ref.paramExpr,\n function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n },\n true\n );\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiStateDirective: ng1_directive;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n const watchDeregFns = inputAttrs.reduce((acc, attr) => ((acc[attr] = noop), acc), {});\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(\n expr,\n (newval) => {\n rawDef[field] = newval;\n update();\n },\n true\n );\n });\n });\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActiveDirective: ng1_directive;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective(\n $state: StateService,\n $stateParams: Obj,\n $interpolate: IInterpolateService,\n $uiRouter: UIRouter\n ) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [];\n let activeEqClass: string;\n let uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n const deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function setupEventListeners() {\n const deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n const deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n const deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n\n function setStatesFromDefinitionObject(statesDefinition: object) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName: StateOrName | Array<StateOrName>, activeClass: string) {\n // Helper function to abstract adding state.\n const addStateForClass = function (stateOrName: string, activeClass: string) {\n const ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName as string, activeClass);\n } else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName: string) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n const state = $state.get(stateName, stateContext($element));\n\n const stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n\n // Update route state\n function update() {\n const splitClasses = (str) => str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList\n .map((x) => x.activeClass)\n .map(splitClasses)\n .reduce(unnestR, []);\n\n const allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n const fuzzyClasses = getClasses(states.filter((x) => $state.includes(x.state.name, x.params)));\n const exactlyMatchesAny = !!states.filter((x) => $state.is(x.state.name, x.params)).length;\n const exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n const removeClasses = allClasses.filter((cls) => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach((className) => $element.addClass(className));\n removeClasses.forEach((className) => $element.removeClass(className));\n });\n }\n\n update();\n },\n ],\n };\n },\n];\n\n/** @hidden */\ninterface Def {\n uiState: string;\n href: string;\n uiStateParams: Obj;\n uiStateOpts: any;\n}\n/** @hidden */\ninterface StateData {\n state: StateDeclaration;\n params: RawParams;\n activeClass: string;\n}\n\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n"
]
}

@@ -361,3 +361,4 @@ /** @publicapi @module directives */ /** */

// Call $onInit() ASAP
if (isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
if (isFunction(controllerInstance.$onInit) &&
!((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
controllerInstance.$onInit();

@@ -380,10 +381,4 @@ }

var getNodeSchema = function (node) { return node.paramSchema; };
var toSchema = $transition$
.treeChanges('to')
.map(getNodeSchema)
.reduce(unnestR, []);
var fromSchema = $transition$
.treeChanges('from')
.map(getNodeSchema)
.reduce(unnestR, []);
var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);
var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);
// Find the to params that have different values than the from params

@@ -390,0 +385,0 @@ var changedToParams = toSchema.filter(function (param) {

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,oCAAoC,CAAC,MAAM;AAC3C,OAAO,EAGL,MAAM,EACN,MAAM,EAEN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,WAAW,EACX,IAAI,EAGJ,KAAK,EAEL,cAAc,EAEd,IAAI,EACJ,KAAK,EAIL,OAAO,GAER,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgBvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4HG;AACH,MAAM,CAAC,IAAI,MAAq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AAE,CAAC,KAAK,IAAI,CAAC,IAAI,kBAAgB,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC;QAA5G,CAA4G,CAAC;QAE/G,kHAAkH;QAClH,IAAM,WAAW,GAAG,UAAC,KAAiB;YACpC,IAAI,OAAO,CAAC;YACZ,IAAM,GAAG,GAAG,CAAC,KAAK,CAAC,WAAS,CAAC,GAAG,KAAK,CAAC,WAAS,CAAC,IAAI,EAAE,CAAC,CAAC;YAExD,IAAI,CAAC,kBAAgB,CAAC,KAAK,CAAC,EAAE;gBAC5B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC,GAAG,CAAC,IAAE,CAAC,GAAG,GAAG,KAAK,KAAK,CAAC,EAAzB,CAAyB,CAAC,CAAC;aAClD;YACD,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;QAEF,IAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,UAAU,EAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;KACxF;AACH,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAO,MAAM,CAAC,CAAC;AACnE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAO,kBAAkB,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n const rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n\n const directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function(tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n return function(scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n const onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let previousEl: JQuery,\n currentEl: JQuery,\n currentScope: IScope,\n viewConfig: Ng1ViewConfig,\n unregister: Function;\n\n const activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (<div ui-view=\"name\"></div>\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n const fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n const fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n\n trace.traceUIViewEvent('Linking', activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function() {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n const _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n const newScope = scope.$new();\n const animEnter = $q.defer(),\n animLeave = $q.defer();\n\n const $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n const $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n const cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n\n return directive;\n },\n];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n\n/** @hidden */\nfunction $ViewDirectiveFill(\n $compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService\n) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function(tElement: JQuery) {\n const initial = tElement.html();\n tElement.empty();\n\n return function(scope: IScope, $element: JQuery) {\n const data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents() as any)(scope);\n return;\n }\n\n const cfg: Ng1ViewConfig = data.$cfg || <any>{ viewDecl: {}, getTemplate: noop };\n const resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n const link = $compile($element.contents() as any);\n const controller = cfg.controller as angular.IControllerService;\n const controllerAs: string = getControllerAs(cfg);\n const resolveAs: string = getResolveAs(cfg);\n const locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n const controllerInstance = <Ng1Controller>(\n $controller(controller, extend({}, locals, { $scope: scope, $element: $element }))\n );\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n const kebobName = kebobString(cfg.component);\n const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');\n\n const getComponentController = () => {\n const directiveEl = [].slice\n .call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));\n\n return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);\n };\n\n const deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n },\n };\n}\n\n/** @hidden */\nconst hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks(\n $q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig\n) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n const viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n const hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n const resolveContext: ResolveContext = new ResolveContext(cfg.path);\n const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\n return;\n\n const toParams = $transition$.params('to') as TypedMap<any>;\n const fromParams = $transition$.params<TypedMap<any>>('from') as TypedMap<any>;\n const getNodeSchema = (node: PathNode) => node.paramSchema;\n const toSchema: Param[] = $transition$\n .treeChanges('to')\n .map(getNodeSchema)\n .reduce(unnestR, []);\n const fromSchema: Param[] = $transition$\n .treeChanges('from')\n .map(getNodeSchema)\n .reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n const changedToParams = toSchema.filter((param: Param) => {\n const idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n const changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', <any>$transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n const id = _uiCanExitId++;\n const cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && ((trans[cacheProp] && trans[cacheProp][id] === true) || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise;\n const ids = (trans[cacheProp] = trans[cacheProp] || {});\n\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => (ids[id] = val !== false));\n }\n return promise;\n };\n\n const criteria = { exiting: viewState.name };\n $scope.$on('$destroy', <any>$transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', <any>uiView);\nangular.module('ui.router.state').directive('uiView', <any>$ViewDirectiveFill);\n"
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function (element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n const rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n\n const directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n const onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let previousEl: JQuery,\n currentEl: JQuery,\n currentScope: IScope,\n viewConfig: Ng1ViewConfig,\n unregister: Function;\n\n const activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (<div ui-view=\"name\"></div>\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n const fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n const fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n\n trace.traceUIViewEvent('Linking', activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n const _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData);\n renderer.leave(currentEl, function () {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n const newScope = scope.$new();\n const animEnter = $q.defer(),\n animLeave = $q.defer();\n\n const $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n const $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n const cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n\n return directive;\n },\n];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n\n/** @hidden */\nfunction $ViewDirectiveFill(\n $compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService\n) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n const initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n const data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents() as any)(scope);\n return;\n }\n\n const cfg: Ng1ViewConfig = data.$cfg || <any>{ viewDecl: {}, getTemplate: noop };\n const resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n const link = $compile($element.contents() as any);\n const controller = cfg.controller as angular.IControllerService;\n const controllerAs: string = getControllerAs(cfg);\n const resolveAs: string = getResolveAs(cfg);\n const locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n const controllerInstance = <Ng1Controller>(\n $controller(controller, extend({}, locals, { $scope: scope, $element: $element }))\n );\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n const kebobName = kebobString(cfg.component);\n const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');\n\n const getComponentController = () => {\n const directiveEl = [].slice\n .call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));\n\n return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);\n };\n\n const deregisterWatch = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n },\n };\n}\n\n/** @hidden */\nconst hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks(\n $q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig\n) {\n // Call $onInit() ASAP\n if (\n isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)\n ) {\n controllerInstance.$onInit();\n }\n\n const viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n const hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n const resolveContext: ResolveContext = new ResolveContext(cfg.path);\n const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\n return;\n\n const toParams = $transition$.params('to') as TypedMap<any>;\n const fromParams = $transition$.params<TypedMap<any>>('from') as TypedMap<any>;\n const getNodeSchema = (node: PathNode) => node.paramSchema;\n const toSchema: Param[] = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n const fromSchema: Param[] = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n const changedToParams = toSchema.filter((param: Param) => {\n const idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n const changedKeys: string[] = changedToParams.map((x) => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', <any>$transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n const id = _uiCanExitId++;\n const cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && ((trans[cacheProp] && trans[cacheProp][id] === true) || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise;\n const ids = (trans[cacheProp] = trans[cacheProp] || {});\n\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then((val) => (ids[id] = val !== false));\n }\n return promise;\n };\n\n const criteria = { exiting: viewState.name };\n $scope.$on('$destroy', <any>$transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', <any>uiView);\nangular.module('ui.router.state').directive('uiView', <any>$ViewDirectiveFill);\n"
]
}

@@ -0,1 +1,6 @@

/**
* Main entry point for angular 1.x build
* @publicapi @module ng1
*/ /** */
export * from './interface';
export * from './services';

@@ -2,0 +7,0 @@ export * from './statebuilders/views';

@@ -9,3 +9,3 @@ {

"names": [],
"mappings": "AAKA,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,8BAA8B,CAAC;AACtC,OAAO,gBAAgB,CAAC;AACxB,OAAO,4BAA4B,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,eAAe,WAAW,CAAC;AAE3B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,cAAc,gBAAgB,CAAC",
"mappings": "AAAA;;;GAGG,CAAC,MAAM;AACV,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,eAAe,CAAC;AACvB,OAAO,8BAA8B,CAAC;AACtC,OAAO,gBAAgB,CAAC;AACxB,OAAO,4BAA4B,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,eAAe,WAAW,CAAC;AAE3B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,cAAc,gBAAgB,CAAC",
"sourcesContent": [

@@ -12,0 +12,0 @@ "/**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\nexport * from './interface';\nexport * from './services';\nexport * from './statebuilders/views';\nexport * from './stateProvider';\nexport * from './urlRouterProvider';\n\nimport './injectables';\nimport './directives/stateDirectives';\nimport './stateFilters';\nimport './directives/viewDirective';\nimport './viewScroll';\n\nexport default 'ui.router';\n\nimport * as core from '@uirouter/core';\nexport { core };\nexport * from '@uirouter/core';\n"

@@ -725,4 +725,6 @@ /** @publicapi @module ng1 */ /** */

interface StateRegistry {
register(state: Ng1StateDeclaration): any;
register(state: Ng1StateDeclaration | {
new (): Ng1StateDeclaration;
}): any;
}
}

@@ -11,4 +11,4 @@ {

"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from '@uirouter/core';\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]): HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n // tslint:disable-line:class-name\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"<ul><li ng-repeat='folder in allfolders'>{{folder.name}}</li></ul>\",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController', // invalid because views: exists\n * views: {\n * header: {\n * template: '<h1>header</h1>'\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `<ui-view>` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `<ui-view>` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `<div ui-view='foo'></div>` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `<div ui-view='foo'></div>` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `<div ui-view='nested'></div>`\n * ... which was created in the unnamed/$default root `<ui-view></ui-view>`\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created inside the\n * `<div ui-view='foo'></div>`\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created in `<div ui-view='foo'></div>`\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with\n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared\n * on the component, any resolve with the same name is set on the component's controller instance. The binding\n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"&lt;\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the <my-profile></my-profile> component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <message-list></message-list> component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <contact-list></contact-list> component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: IInjectable | string;\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"<h1>inline template definition</h1><div ui-view></div>\"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"<h1>generated template</h1>\";\n * }\n * ```\n */\n template?: Function | string;\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: string | Function;\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n *\n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n *\n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '<input ng-model=\"$ctrl.data\" type=\"text\">',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * <a href=\"https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates\">\n * Impact on loading templates</a> for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module '@uirouter/core/lib/state/stateRegistry' {\n interface StateRegistry {\n register(state: Ng1StateDeclaration);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult, StateRegistry } from '@uirouter/core';\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]): HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n // tslint:disable-line:class-name\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"<ul><li ng-repeat='folder in allfolders'>{{folder.name}}</li></ul>\",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController', // invalid because views: exists\n * views: {\n * header: {\n * template: '<h1>header</h1>'\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `<ui-view>` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `<ui-view>` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `<div ui-view='foo'></div>` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `<div ui-view='foo'></div>` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `<div ui-view='nested'></div>`\n * ... which was created in the unnamed/$default root `<ui-view></ui-view>`\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created inside the\n * `<div ui-view='foo'></div>`\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created in `<div ui-view='foo'></div>`\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with\n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared\n * on the component, any resolve with the same name is set on the component's controller instance. The binding\n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"&lt;\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the <my-profile></my-profile> component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <message-list></message-list> component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <contact-list></contact-list> component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: IInjectable | string;\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"<h1>inline template definition</h1><div ui-view></div>\"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"<h1>generated template</h1>\";\n * }\n * ```\n */\n template?: Function | string;\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: string | Function;\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n *\n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n *\n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '<input ng-model=\"$ctrl.data\" type=\"text\">',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * <a href=\"https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates\">\n * Impact on loading templates</a> for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module '@uirouter/core/lib/state/stateRegistry' {\n interface StateRegistry {\n register(state: Ng1StateDeclaration | { new (): Ng1StateDeclaration });\n }\n}\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,6BAA6B,CAAC,MAAM;AACpC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAO,MAAM,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC;;GAEG;AACH,IAAM,QAAQ,GAAG;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,EAAE,UAAC,UAAuC,EAAE,MAAW,EAAE,MAAqB;QAAlC,uBAAA,EAAA,WAAW;QAC5D,IAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAM,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACvF,IAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAM,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACjF,IAAM,OAAO,GAAG,IAAI,cAAc,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;QAEvD,OAAO,CAAC,cAAc,CAAC,kBAAkB,CAAM,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAErF,IAAM,WAAW,GAAG,UAAC,YAAiB;YACpC,IAAM,MAAM,GAAG,UAAC,OAAY,IAAK,OAAA,kBAAkB,CAAM,EAAE,OAAO,EAAE,MAAM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OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,EAA/B,CAA+B,CAAC,CAAC;QAClF,CAAC,CAAC;QAEF,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC;AAEF,cAAc;AACd,MAAM,CAAC,IAAM,cAAc,GAAG,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC;AAE7C,2BAA2B;AAC3B,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAO,cAAc,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, (local) => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then((results) => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA;;;;;;;;;;;;;;;;;;;GAmBG,CAAC,MAAM;AACV,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC;AAc3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,IAAI,iBAAgC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OAAO,GAAG,IAAI,CAAC;YAEf,IAAI,kBAAkB,CAAC,gBAAgB,CAAC;gBAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;YACzF,IAAI,kBAAkB,CAAC,iBAAiB;gBAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,uBAAuB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAEjH,OAAO;gBACL,QAAQ,EAAE,oBAAoB,CAAC,SAAS,CAAC,QAAQ;aAClD,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;SACJ,MAAM,CAAC,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,CAAC;SACrD,QAAQ,CAAC,cAAc,EAAG,oBAAuD,CAAC;SAClF,GAAG,CAAC;QACH,cAAc;QACd,UAAU,YAAiB;YACzB,oBAAoB;QACtB,CAAC;KACF,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC",
"sourcesContent": [
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function() {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function() {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function(error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function () {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function () {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map((e) => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function ($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,6BAA6B,CAAC,MAAM;AACpC,OA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AAE,IAAI,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;QAC9E,mDAAmD;QACnD,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACvE,CAAC;IACH,0BAAC;AAAD,CAAC,AAvFD,IAuFC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\nimport { ILocationService, ILocationProvider, IWindowService } from 'angular';\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer: any;\n private $browser: any;\n private $window: IWindowService;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n\n private _baseHref: string;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n const pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (x: any) =>\n x != null ? x.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : x;\n\n pathType.decode = (x: string) =>\n x != null ? x.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : x;\n }\n\n dispose() {}\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n const _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n baseHref() {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (isDefined(newUrl)) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser, $window: IWindowService) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', evt => this._urlListeners.forEach(fn => fn(evt)));\n const _loc = val($location);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\nimport { ILocationService, ILocationProvider, IWindowService } from 'angular';\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer: any;\n private $browser: any;\n private $window: IWindowService;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n\n private _baseHref: string;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n const pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (x: any) =>\n x != null ? x.toString().replace(/(~|\\/)/g, (m) => ({ '~': '~~', '/': '~2F' }[m])) : x;\n\n pathType.decode = (x: string) =>\n x != null ? x.toString().replace(/(~~|~2F)/g, (m) => ({ '~~': '~', '~2F': '/' }[m])) : x;\n }\n\n dispose() {}\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n const _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n baseHref() {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (isDefined(newUrl)) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser, $window: IWindowService) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', (evt) => this._urlListeners.forEach((fn) => fn(evt)));\n const _loc = val($location);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n }\n}\n"
]
}

@@ -39,2 +39,4 @@ /**

router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());
// Disable decoding of params by UrlMatcherFactory because $location already handles this
router.urlService.config._decodeParams = false;
var ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider));

@@ -41,0 +43,0 @@ Ng1LocationServices.monkeyPatchPathParameterType(router);

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA;;;;;;;;;GASG,CAAC,MAAM;AACV,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAS1C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EAKR,OAAO,GAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACzC,IAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,IAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACtE,IAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACvE,IAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,CA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AG,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEhD,IAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG;QAC5B,IAAM,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACnD,OAAO,CAAC,GAAG,EAAE,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC",
"sourcesContent": [
"/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n // tslint:disable-line:no-shadowed-variable\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = serviceName => [\n '$uiRouterProvider',\n $urp => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!$injector.hasOwnProperty('strictDi')) {\n try {\n $injector.invoke(function(checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === 'deferred')\n .forEach(resolvable => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) => (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter));\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () => extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() {\n trace.approximateDigests++;\n });\n}\n\nmod_init.provider('$uiRouter', <any>$uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util.provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main.factory('$view', () => router.viewService);\nmod_main.service('$trace', () => trace);\n\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function($urlMatcherFactory: UrlMatcherFactory) {}]);\nmod_state.run(['$state', function($state: StateService) {}]);\nmod_rtr.run(['$urlRouter', function($urlRouter: UrlRouter) {}]);\nmod_init.run(runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap<any> => {\n const tokens = ctx.getTokens().filter(isString);\n\n const tuples = tokens.map(key => {\n const resolvable = ctx.getResolvable(key);\n const waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n"
"/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n // tslint:disable-line:no-shadowed-variable\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [\n '$uiRouterProvider',\n ($urp) => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!$injector.hasOwnProperty('strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map((x) => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter((x) => x.deps === 'deferred')\n .forEach((resolvable) => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) => (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter));\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () => extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n}\n\nmod_init.provider('$uiRouter', <any>$uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util.provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main.factory('$view', () => router.viewService);\nmod_main.service('$trace', () => trace);\n\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) {}]);\nmod_state.run(['$state', function ($state: StateService) {}]);\nmod_rtr.run(['$urlRouter', function ($urlRouter: UrlRouter) {}]);\nmod_init.run(runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap<any> => {\n const tokens = ctx.getTokens().filter(isString);\n\n const tuples = tokens.map((key) => {\n const resolvable = ctx.getResolvable(key);\n const waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n"
]
}

@@ -12,2 +12,2 @@ /** @publicapi @module ng1 */ /** */

*/
export declare const getStateHookBuilder: (hookName: "onEnter" | "onExit" | "onRetain") => (stateObject: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn;
export declare const getStateHookBuilder: (hookName: 'onEnter' | 'onExit' | 'onRetain') => (stateObject: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn;

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAEA,OAAO,EAEL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,MAAM,EACN,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,KAAK,EAEL,WAAW,EAGX,cAAc,EACd,UAAU,GAEX,MAAM,gBAAgB,CAAC;AAKxB,mBAAmB;AACnB,MAAM,UAAU,uBAAuB;IACrC,IAAI,eAAe,GAAoB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ular';\nimport {\n StateObject,\n pick,\n forEach,\n tail,\n extend,\n isArray,\n isInjectable,\n isDefined,\n isString,\n services,\n trace,\n ViewConfig,\n ViewService,\n ViewConfigFactory,\n PathNode,\n ResolveContext,\n Resolvable,\n IInjectable,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration } from '../interface';\nimport { TemplateFactory } from '../templateFactory';\nimport IInjectorService = angular.auto.IInjectorService;\n\n/** @internalapi */\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\n/** @internalapi */\nconst hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n const tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\n `State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(', ')}`\n );\n }\n\n const views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { $default: pick(state, allViewKeys) };\n\n forEach(viewsObject, function(config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: <string>config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\n `Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`\n );\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n\n const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\n/** @hidden */\nlet id = 0;\n\n/** @internalapi */\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {}\n\n load() {\n const $q = services.$q;\n const context = new ResolveContext(this.path);\n const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n const promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n\n return $q.all(promises).then(results => {\n trace.traceViewServiceEvent('Loaded', this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component\n ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings)\n : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): IInjectable | string | Promise<IInjectable | string> {\n const provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any>provider) : provider;\n const resolvable = new Resolvable('', <any>providerFn, deps);\n return resolvable.get(context);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from '../angular';\nimport {\n StateObject,\n pick,\n forEach,\n tail,\n extend,\n isArray,\n isInjectable,\n isDefined,\n isString,\n services,\n trace,\n ViewConfig,\n ViewService,\n ViewConfigFactory,\n PathNode,\n ResolveContext,\n Resolvable,\n IInjectable,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration } from '../interface';\nimport { TemplateFactory } from '../templateFactory';\nimport IInjectorService = angular.auto.IInjectorService;\n\n/** @internalapi */\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\n/** @internalapi */\nconst hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n const tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\n `State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter((key) => isDefined(state[key])).join(', ')}`\n );\n }\n\n const views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { $default: pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: <string>config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\n `Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`\n );\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n\n const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\n/** @hidden */\nlet id = 0;\n\n/** @internalapi */\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {}\n\n load() {\n const $q = services.$q;\n const context = new ResolveContext(this.path);\n const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n const promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent('Loaded', this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component\n ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings)\n : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): IInjectable | string | Promise<IInjectable | string> {\n const provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any>provider) : provider;\n const resolvable = new Resolvable('', <any>providerFn, deps);\n return resolvable.get(context);\n }\n}\n"
]
}

@@ -39,7 +39,4 @@ /** @publicapi @module ng1 */ /** */

}
angular
.module('ui.router.state')
.filter('isState', $IsStateFilter)
.filter('includedByState', $IncludedByStateFilter);
angular.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);
export { $IsStateFilter, $IncludedByStateFilter };
//# sourceMappingURL=stateFilters.js.map

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,6BAA6B,CAAC,MAAM;AAEpC,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C;;;;;;;;;GASG;AACH,cAAc,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,SAAS,cAAc,CAAC,MAAoB;IAC1C,IAAM,QAAQ,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAoC;QAClG,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,QAAQ,CAA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AAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;AAEtH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular\n .module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n"
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function (state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function (state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n"
]
}

@@ -113,3 +113,3 @@ /** @publicapi @module ng1 */ /** */

*/
decorator(name: string, func: BuilderFunction): Function | this | BuilderFunction[];
decorator(name: string, func: BuilderFunction): Function | this;
/**

@@ -116,0 +116,0 @@ * Registers a state

@@ -168,5 +168,3 @@ /** @publicapi @module view */ /** */

};
var attrs = getComponentBindings(component)
.map(attributeTpl)
.join(' ');
var attrs = getComponentBindings(component).map(attributeTpl).join(' ');
var kebobName = kebob(component);

@@ -173,0 +171,0 @@ return "<" + kebobName + " " + attrs + "></" + kebobName + ">";

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,8BAA8B,CAAC,MAAM;AACrC,OAAO,EAAE,EAAE,IAAI,OAAO,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,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC/E,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC,CAAC;AAOF,yDAAyD;AACzD,gGAAgG;AAChG,IAAM,aAAa,GAAG,UAAC,WAAgB;IACrC,OAAA,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5B,sCAAsC;SACrC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAjD,CAAiD,CAAC;QAChE,wBAAwB;SACvB,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC,CAAC;QACzD,0CAA0C;SACzC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAmB,CAAA,EAAtE,CAAsE,CAAC;AANzF,CAMyF,CAAC",
"sourcesContent": [
"/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { IAugmentedJQuery } from 'angular';\nimport {\n isArray,\n isDefined,\n isFunction,\n isObject,\n services,\n Obj,\n IInjectable,\n tail,\n kebobString,\n unnestR,\n ResolveContext,\n Resolvable,\n RawParams,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from './interface';\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = [\n '$http',\n '$templateCache',\n '$injector',\n ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n },\n ];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n }\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(\n config: Ng1ViewDeclaration,\n params: any,\n context: ResolveContext\n ): Promise<{ template?: string; component?: string }> {\n const defaultTemplate = '<ui-view></ui-view>';\n\n const asTemplate = result => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = result => services.$q.when(result).then(str => ({ component: str }));\n\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n }\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: string | Function, params?: RawParams) {\n return isFunction(template) ? (<any>template)(params) : template;\n }\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: string | Function, params: any) {\n if (isFunction(url)) url = (<any>url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function(response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n }\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n const attributeTpl = (input: BindingTuple) => {\n const { name, type } = input;\n const attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name]) return `${attrName}='${uiView.attr(attrName)}'`;\n\n const resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@') return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n const res = context.getResolvable(resolveName);\n const fn = res && res.data;\n const args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n const arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(',')})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n const attrs = getComponentBindings(component)\n .map(attributeTpl)\n .join(' ');\n const kebobName = kebob(component);\n return `<${kebobName} ${attrs}></${kebobName}>`;\n }\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n const cmpDefs = <any[]>services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) =>\n Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n"
"/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { IAugmentedJQuery } from 'angular';\nimport {\n isArray,\n isDefined,\n isFunction,\n isObject,\n services,\n Obj,\n IInjectable,\n tail,\n kebobString,\n unnestR,\n ResolveContext,\n Resolvable,\n RawParams,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from './interface';\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = [\n '$http',\n '$templateCache',\n '$injector',\n ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n },\n ];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n }\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(\n config: Ng1ViewDeclaration,\n params: any,\n context: ResolveContext\n ): Promise<{ template?: string; component?: string }> {\n const defaultTemplate = '<ui-view></ui-view>';\n\n const asTemplate = (result) => services.$q.when(result).then((str) => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then((str) => ({ component: str }));\n\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n }\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: string | Function, params?: RawParams) {\n return isFunction(template) ? (<any>template)(params) : template;\n }\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: string | Function, params: any) {\n if (isFunction(url)) url = (<any>url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n }\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n const attributeTpl = (input: BindingTuple) => {\n const { name, type } = input;\n const attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name]) return `${attrName}='${uiView.attr(attrName)}'`;\n\n const resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@') return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n const res = context.getResolvable(resolveName);\n const fn = res && res.data;\n const args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n const arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(',')})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n const attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n const kebobName = kebob(component);\n return `<${kebobName} ${attrs}></${kebobName}>`;\n }\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n const cmpDefs = <any[]>services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) =>\n Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map((key) => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter((tuple) => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map((tuple) => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings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Ae;QAC5B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACH,wBAAC;AAAD,CAAC,AAhLD,IAgLC",
"sourcesContent": [
"/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: RegExp | UrlMatcher | string, handler: string | IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n\n this.router.urlService.rules.when(what, handler as any);\n return this;\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this.router.urlService.deferIntercept(defer);\n }\n}\n"
"/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return (match) => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: RegExp | UrlMatcher | string, handler: string | IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n\n this.router.urlService.rules.when(what, handler as any);\n return this;\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this.router.urlService.deferIntercept(defer);\n }\n}\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": "AAAA,6BAA6B,CAAC,MAAM;AACpC,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAe1C,cAAc;AACd,SAAS,mBAAmB;IAC1B,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG;QACV,eAAe;QACf,UAAU;QACV,UAAS,aAAmC,EAAE,QAAyB;YACrE,IAAI,eAAe,EAAE;gBACnB,OAAO,aAAa,CAAC;aACtB;YAED,OAAO,UAAS,QAAgB;gBAC9B,OAAO,QAAQ,CACb;oBACE,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EACD,CAAC,EACD,KAAK,CACN,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA2B,mBAAmB,CAAC,CAAC",
"mappings": "AAAA,6BAA6B,CAAC,MAAM;AACpC,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAe1C,cAAc;AACd,SAAS,mBAAmB;IAC1B,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG;QACV,eAAe;QACf,UAAU;QACV,UAAU,aAAmC,EAAE,QAAyB;YACtE,IAAI,eAAe,EAAE;gBACnB,OAAO,aAAa,CAAC;aACtB;YAED,OAAO,UAAU,QAAgB;gBAC/B,OAAO,QAAQ,CACb;oBACE,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EACD,CAAC,EACD,KAAK,CACN,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA2B,mBAAmB,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function() {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function($element: JQuery) {\n return $timeout(\n function() {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n"
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(\n function () {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ng = void 0;
/** @publicapi @module ng1 */ /** */

@@ -4,0 +5,0 @@ var ng_from_import = require("angular");

@@ -9,3 +9,3 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,wCAA0C;AAE1C,cAAc,CAAC,IAAM,cAAc,GAAG,OAAO,CAAC;AAC9C,cAAc,CAAc,QAAA,EAAE,GAAG,cAAc,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC",
"mappings": ";;;AAAA,6BAA6B,CAAC,MAAM;AACpC,wCAA0C;AAE1C,cAAc,CAAC,IAAM,cAAc,GAAG,OAAO,CAAC;AAC9C,cAAc,CAAc,QAAA,EAAE,GAAG,cAAc,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC",
"sourcesContent": [

@@ -12,0 +12,0 @@ "/** @publicapi @module ng1 */ /** */\nimport * as ng_from_import from 'angular';\n/** @hidden */ declare var angular;\n/** @hidden */ const ng_from_global = angular;\n/** @hidden */ export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;\n"

@@ -606,5 +606,3 @@ "use strict";

};
var allClasses = getClasses(states)
.concat(splitClasses(activeEqClass))
.reduce(core_1.uniqR, []);
var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(core_1.uniqR, []);
var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));

@@ -611,0 +609,0 @@ var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA;;;;;;;GAOG,CAAC,MAAM;AACV,sCAA2C;AAG3C,uCAqBwB;AAMxB,cAAc;AACd,SAAS,aAAa,CAAC,GAAW;IAChC,IAAI,MAAM,CAAC;IACX,IAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAClD,IAAI,UAAU;QAAE,GAAG,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAEhD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACzE,IAAI,CAAC,MAAM,IAAI,MAAM,C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MAAM,CAAC,UAAC,CAAC,IAAK,OAAA,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAjC,CAAiC,CAAC,CAAC,MAAM,CAAC;wBAC3F,IAAM,YAAY,GAAG,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;wBAE1E,IAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,YAAK,EAAE,EAAE,CAAC,CAAC;wBACvE,IAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC,cAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAzB,CAAyB,CAAC,CAAC;wBAE5E,MAAM,CAAC,UAAU,CAAC;4BAChB,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EAA5B,CAA4B,CAAC,CAAC;4BAChE,aAAa,CAAC,OAAO,CAAC,UAAC,SAAS,IAAK,OAAA,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,EAA/B,CAA+B,CAAC,CAAC;wBACxE,CAAC,CAAC,CAAC;oBACL,CAAC;oBAED,MAAM,EAAE,CAAC;gBACX,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAgBF,YAAO;KACJ,MAAM,CAAC,iBAAiB,CAAC;KACzB,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAC;KACpC,SAAS,CAAC,cAAc,EAAE,qBAAqB,CAAC;KAChD,SAAS,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;KAClD,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC",
"sourcesContent": [
"/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function(e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function() {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function() {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function() {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSrefDirective: ng1_directive;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(\n ref.paramExpr,\n function(val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n },\n true\n );\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiStateDirective: ng1_directive;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function(scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n const watchDeregFns = inputAttrs.reduce((acc, attr) => ((acc[attr] = noop), acc), {});\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach(field => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, expr => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(\n expr,\n newval => {\n rawDef[field] = newval;\n update();\n },\n true\n );\n });\n });\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActiveDirective: ng1_directive;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective(\n $state: StateService,\n $stateParams: Obj,\n $interpolate: IInterpolateService,\n $uiRouter: UIRouter\n ) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [];\n let activeEqClass: string;\n let uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function(newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n const deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function setupEventListeners() {\n const deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n const deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n const deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n\n function setStatesFromDefinitionObject(statesDefinition: object) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function(stateOrName: StateOrName | Array<StateOrName>, activeClass: string) {\n // Helper function to abstract adding state.\n const addStateForClass = function(stateOrName: string, activeClass: string) {\n const ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName as string, activeClass);\n } else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function(stateOrName: string) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n const state = $state.get(stateName, stateContext($element));\n\n const stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n\n // Update route state\n function update() {\n const splitClasses = str => str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList\n .map(x => x.activeClass)\n .map(splitClasses)\n .reduce(unnestR, []);\n\n const allClasses = getClasses(states)\n .concat(splitClasses(activeEqClass))\n .reduce(uniqR, []);\n const fuzzyClasses = getClasses(states.filter(x => $state.includes(x.state.name, x.params)));\n const exactlyMatchesAny = !!states.filter(x => $state.is(x.state.name, x.params)).length;\n const exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n const removeClasses = allClasses.filter(cls => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach(className => $element.addClass(className));\n removeClasses.forEach(className => $element.removeClass(className));\n });\n }\n\n update();\n },\n ],\n };\n },\n];\n\n/** @hidden */\ninterface Def {\n uiState: string;\n href: string;\n uiStateParams: Obj;\n uiStateOpts: any;\n}\n/** @hidden */\ninterface StateData {\n state: StateDeclaration;\n params: RawParams;\n activeClass: string;\n}\n\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n"
"/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {} // tslint:disable-line:class-name\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n let parsed;\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function (e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function () {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSrefDirective: ng1_directive;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(\n ref.paramExpr,\n function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n },\n true\n );\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiStateDirective: ng1_directive;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n const watchDeregFns = inputAttrs.reduce((acc, attr) => ((acc[attr] = noop), acc), {});\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(\n expr,\n (newval) => {\n rawDef[field] = newval;\n update();\n },\n true\n );\n });\n });\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActiveDirective: ng1_directive;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective(\n $state: StateService,\n $stateParams: Obj,\n $interpolate: IInterpolateService,\n $uiRouter: UIRouter\n ) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [];\n let activeEqClass: string;\n let uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n const deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function setupEventListeners() {\n const deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n const deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n const deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n\n function setStatesFromDefinitionObject(statesDefinition: object) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName: StateOrName | Array<StateOrName>, activeClass: string) {\n // Helper function to abstract adding state.\n const addStateForClass = function (stateOrName: string, activeClass: string) {\n const ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName as string, activeClass);\n } else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName: string) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n const state = $state.get(stateName, stateContext($element));\n\n const stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n\n // Update route state\n function update() {\n const splitClasses = (str) => str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList\n .map((x) => x.activeClass)\n .map(splitClasses)\n .reduce(unnestR, []);\n\n const allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n const fuzzyClasses = getClasses(states.filter((x) => $state.includes(x.state.name, x.params)));\n const exactlyMatchesAny = !!states.filter((x) => $state.is(x.state.name, x.params)).length;\n const exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n const removeClasses = allClasses.filter((cls) => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach((className) => $element.addClass(className));\n removeClasses.forEach((className) => $element.removeClass(className));\n });\n }\n\n update();\n },\n ],\n };\n },\n];\n\n/** @hidden */\ninterface Def {\n uiState: string;\n href: string;\n uiStateParams: Obj;\n uiStateOpts: any;\n}\n/** @hidden */\ninterface StateData {\n state: StateDeclaration;\n params: RawParams;\n activeClass: string;\n}\n\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uiView = void 0;
/** @publicapi @module directives */ /** */

@@ -237,3 +238,4 @@ var core_1 = require("@uirouter/core");

// Call $onInit() ASAP
if (core_1.isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
if (core_1.isFunction(controllerInstance.$onInit) &&
!((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {
controllerInstance.$onInit();

@@ -256,10 +258,4 @@ }

var getNodeSchema = function (node) { return node.paramSchema; };
var toSchema = $transition$
.treeChanges('to')
.map(getNodeSchema)
.reduce(core_1.unnestR, []);
var fromSchema = $transition$
.treeChanges('from')
.map(getNodeSchema)
.reduce(core_1.unnestR, []);
var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(core_1.unnestR, []);
var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(core_1.unnestR, []);
// Find the to params that have different values than the from params

@@ -266,0 +262,0 @@ var changedToParams = toSchema.filter(function (param) {

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA,oCAAoC,CAAC,MAAM;AAC3C,uCAwBwB;AAExB,sCAA2C;AAE3C,wCAAwC;AACxC,gDAAuD;AA8IvD,cAAM,GAAG;IACP,OAAO;IACP,UAAU;IACV,eAAe;IACf,cAAc;IACd,IAAI;IACJ,SAAS,cAAc,CACrB,KAAkB,EAClB,QAAa,EACb,aAAkB,EAClB,YAAiC,EACjC,EAAU;QAEV,SAAS,WAAW,CAAC,KAAU,EAAE,KAAa;YAC5C,OAAO;gBACL,KAAK,EAAE,UAAS,OAAe,EAAE,MAAW,EAAE,EAAY;oBACxD,IAAI,YAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE;wBAC7B,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;qBAChD;yBAAM;w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AAO,cAAM,CAAC,CAAC;AACnE,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAO,kBAAkB,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function(element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function(element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n const rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n\n const directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function(tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n return function(scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n const onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let previousEl: JQuery,\n currentEl: JQuery,\n currentScope: IScope,\n viewConfig: Ng1ViewConfig,\n unregister: Function;\n\n const activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (<div ui-view=\"name\"></div>\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n const fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n const fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n\n trace.traceUIViewEvent('Linking', activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function() {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n const _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData);\n renderer.leave(currentEl, function() {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n const newScope = scope.$new();\n const animEnter = $q.defer(),\n animLeave = $q.defer();\n\n const $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n const $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n const cloned = $transclude(newScope, function(clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n\n return directive;\n },\n];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n\n/** @hidden */\nfunction $ViewDirectiveFill(\n $compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService\n) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function(tElement: JQuery) {\n const initial = tElement.html();\n tElement.empty();\n\n return function(scope: IScope, $element: JQuery) {\n const data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents() as any)(scope);\n return;\n }\n\n const cfg: Ng1ViewConfig = data.$cfg || <any>{ viewDecl: {}, getTemplate: noop };\n const resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n const link = $compile($element.contents() as any);\n const controller = cfg.controller as angular.IControllerService;\n const controllerAs: string = getControllerAs(cfg);\n const resolveAs: string = getResolveAs(cfg);\n const locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n const controllerInstance = <Ng1Controller>(\n $controller(controller, extend({}, locals, { $scope: scope, $element: $element }))\n );\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n const kebobName = kebobString(cfg.component);\n const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');\n\n const getComponentController = () => {\n const directiveEl = [].slice\n .call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));\n\n return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);\n };\n\n const deregisterWatch = scope.$watch(getComponentController, function(ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n },\n };\n}\n\n/** @hidden */\nconst hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks(\n $q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig\n) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) && !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n\n const viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n const hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n const resolveContext: ResolveContext = new ResolveContext(cfg.path);\n const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\n return;\n\n const toParams = $transition$.params('to') as TypedMap<any>;\n const fromParams = $transition$.params<TypedMap<any>>('from') as TypedMap<any>;\n const getNodeSchema = (node: PathNode) => node.paramSchema;\n const toSchema: Param[] = $transition$\n .treeChanges('to')\n .map(getNodeSchema)\n .reduce(unnestR, []);\n const fromSchema: Param[] = $transition$\n .treeChanges('from')\n .map(getNodeSchema)\n .reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n const changedToParams = toSchema.filter((param: Param) => {\n const idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n const changedKeys: string[] = changedToParams.map(x => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', <any>$transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n const id = _uiCanExitId++;\n const cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && ((trans[cacheProp] && trans[cacheProp][id] === true) || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise;\n const ids = (trans[cacheProp] = trans[cacheProp] || {});\n\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(val => (ids[id] = val !== false));\n }\n return promise;\n };\n\n const criteria = { exiting: viewState.name };\n $scope.$on('$destroy', <any>$transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', <any>uiView);\nangular.module('ui.router.state').directive('uiView', <any>$ViewDirectiveFill);\n"
"/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITimeoutService, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenderer(attrs: Obj, scope: IScope) {\n return {\n enter: function (element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n const rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n\n const directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n const onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(attrs, scope),\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let previousEl: JQuery,\n currentEl: JQuery,\n currentScope: IScope,\n viewConfig: Ng1ViewConfig,\n unregister: Function;\n\n const activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (<div ui-view=\"name\"></div>\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n const fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n const fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n\n trace.traceUIViewEvent('Linking', activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n const _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData);\n renderer.leave(currentEl, function () {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n const newScope = scope.$new();\n const animEnter = $q.defer(),\n animLeave = $q.defer();\n\n const $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n const $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n const cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n\n return directive;\n },\n];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q', '$timeout'];\n\n/** @hidden */\nfunction $ViewDirectiveFill(\n $compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService,\n $timeout: ITimeoutService\n) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n const initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n const data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents() as any)(scope);\n return;\n }\n\n const cfg: Ng1ViewConfig = data.$cfg || <any>{ viewDecl: {}, getTemplate: noop };\n const resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n const link = $compile($element.contents() as any);\n const controller = cfg.controller as angular.IControllerService;\n const controllerAs: string = getControllerAs(cfg);\n const resolveAs: string = getResolveAs(cfg);\n const locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n const controllerInstance = <Ng1Controller>(\n $controller(controller, extend({}, locals, { $scope: scope, $element: $element }))\n );\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n const kebobName = kebobString(cfg.component);\n const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');\n\n const getComponentController = () => {\n const directiveEl = [].slice\n .call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));\n\n return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);\n };\n\n const deregisterWatch = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n },\n };\n}\n\n/** @hidden */\nconst hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks(\n $q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig\n) {\n // Call $onInit() ASAP\n if (\n isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)\n ) {\n controllerInstance.$onInit();\n }\n\n const viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n const hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n const resolveContext: ResolveContext = new ResolveContext(cfg.path);\n const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\n return;\n\n const toParams = $transition$.params('to') as TypedMap<any>;\n const fromParams = $transition$.params<TypedMap<any>>('from') as TypedMap<any>;\n const getNodeSchema = (node: PathNode) => node.paramSchema;\n const toSchema: Param[] = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n const fromSchema: Param[] = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n const changedToParams = toSchema.filter((param: Param) => {\n const idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n const changedKeys: string[] = changedToParams.map((x) => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', <any>$transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n const id = _uiCanExitId++;\n const cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && ((trans[cacheProp] && trans[cacheProp][id] === true) || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise;\n const ids = (trans[cacheProp] = trans[cacheProp] || {});\n\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then((val) => (ids[id] = val !== false));\n }\n return promise;\n };\n\n const criteria = { exiting: viewState.name };\n $scope.$on('$destroy', <any>$transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', <any>uiView);\nangular.module('ui.router.state').directive('uiView', <any>$ViewDirectiveFill);\n"
]
}
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./services"));
__export(require("./statebuilders/views"));
__export(require("./stateProvider"));
__export(require("./urlRouterProvider"));
exports.core = void 0;
/**
* Main entry point for angular 1.x build
* @publicapi @module ng1
*/ /** */
__exportStar(require("./interface"), exports);
__exportStar(require("./services"), exports);
__exportStar(require("./statebuilders/views"), exports);
__exportStar(require("./stateProvider"), exports);
__exportStar(require("./urlRouterProvider"), exports);
require("./injectables");

@@ -18,3 +31,3 @@ require("./directives/stateDirectives");

exports.core = core;
__export(require("@uirouter/core"));
__exportStar(require("@uirouter/core"), exports);
//# sourceMappingURL=index.js.map

@@ -9,3 +9,3 @@ {

"names": [],
"mappings": ";;;;;AAKA,gCAA2B;AAC3B,2CAAsC;AACtC,qCAAgC;AAChC,yCAAoC;AAEpC,yBAAuB;AACvB,wCAAsC;AACtC,0BAAwB;AACxB,sCAAoC;AACpC,wBAAsB;AAEtB,kBAAe,WAAW,CAAC;AAE3B,qCAAuC;AAC9B,oBAAI;AACb,oCAA+B",
"mappings": ";;;;;;;;;;;;;AAAA;;;GAGG,CAAC,MAAM;AACV,8CAA4B;AAC5B,6CAA2B;AAC3B,wDAAsC;AACtC,kDAAgC;AAChC,sDAAoC;AAEpC,yBAAuB;AACvB,wCAAsC;AACtC,0BAAwB;AACxB,sCAAoC;AACpC,wBAAsB;AAEtB,kBAAe,WAAW,CAAC;AAE3B,qCAAuC;AAC9B,oBAAI;AACb,iDAA+B",
"sourcesContent": [

@@ -12,0 +12,0 @@ "/**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\nexport * from './interface';\nexport * from './services';\nexport * from './statebuilders/views';\nexport * from './stateProvider';\nexport * from './urlRouterProvider';\n\nimport './injectables';\nimport './directives/stateDirectives';\nimport './stateFilters';\nimport './directives/viewDirective';\nimport './viewScroll';\n\nexport default 'ui.router';\n\nimport * as core from '@uirouter/core';\nexport { core };\nexport * from '@uirouter/core';\n"

@@ -725,4 +725,6 @@ /** @publicapi @module ng1 */ /** */

interface StateRegistry {
register(state: Ng1StateDeclaration): any;
register(state: Ng1StateDeclaration | {
new (): Ng1StateDeclaration;
}): any;
}
}

@@ -11,4 +11,4 @@ {

"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from '@uirouter/core';\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]): HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n // tslint:disable-line:class-name\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"<ul><li ng-repeat='folder in allfolders'>{{folder.name}}</li></ul>\",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController', // invalid because views: exists\n * views: {\n * header: {\n * template: '<h1>header</h1>'\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `<ui-view>` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `<ui-view>` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `<div ui-view='foo'></div>` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `<div ui-view='foo'></div>` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `<div ui-view='nested'></div>`\n * ... which was created in the unnamed/$default root `<ui-view></ui-view>`\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created inside the\n * `<div ui-view='foo'></div>`\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created in `<div ui-view='foo'></div>`\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with\n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared\n * on the component, any resolve with the same name is set on the component's controller instance. The binding\n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"&lt;\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the <my-profile></my-profile> component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <message-list></message-list> component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <contact-list></contact-list> component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: IInjectable | string;\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"<h1>inline template definition</h1><div ui-view></div>\"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"<h1>generated template</h1>\";\n * }\n * ```\n */\n template?: Function | string;\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: string | Function;\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n *\n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n *\n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '<input ng-model=\"$ctrl.data\" type=\"text\">',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * <a href=\"https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates\">\n * Impact on loading templates</a> for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module '@uirouter/core/lib/state/stateRegistry' {\n interface StateRegistry {\n register(state: Ng1StateDeclaration);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult, StateRegistry } from '@uirouter/core';\n\n/**\n * The signature for Angular 1 State Transition Hooks.\n *\n * State hooks are registered as onEnter/onRetain/onExit in state declarations.\n * State hooks can additionally be injected with $transition$ and $state$ for\n * the current [[Transition]] and [[StateObject]] in the transition.\n *\n * Transition State Hooks are callback functions that hook into the lifecycle events of specific states during a transition.\n * As a transition runs, it may exit some states, retain (keep) states, and enter states.\n * As each lifecycle event occurs, the hooks which are registered for the event and that state are called (in priority order).\n *\n * #### See also:\n *\n * - [[IHookRegistry.onExit]]\n * - [[IHookRegistry.onRetain]]\n * - [[IHookRegistry.onEnter]]\n *\n * #### Example:\n * ```js\n * onEnter: function() { console.log('Entering'); }\n * ```\n *\n * Not minification-safe\n * ```js\n * onRetain: function($state$) { console.log('Retained ' + $state$.name); }\n * ```\n *\n * Annotated for minification-safety\n * ```js\n * onExit: [ '$transition$', '$state', function($transition$, $state) {\n * // always redirect to 'foo' state when being exited\n * if ($transition$.to().name !== 'foo') {\n * return $state.target('foo');\n * }\n * } ]\n * ```\n *\n * @returns an optional [[HookResult]] which may alter the transition\n */\nexport interface Ng1StateTransitionHook {\n (...injectables: any[]): HookResult;\n}\n\n/**\n * @internalapi\n * an intermediate interface.\n *\n * Used to reset [[StateDeclaration]] typings to `any` so the [[Ng1StateDeclaration]] interface can then narrow them */\nexport interface _Ng1StateDeclaration extends StateDeclaration {\n // tslint:disable-line:class-name\n onExit?: any;\n onRetain?: any;\n onEnter?: any;\n views?: any;\n}\n\n/**\n * The StateDeclaration object is used to define a state or nested state.\n * It should be registered with the [[StateRegistry]].\n *\n * #### Example:\n * ```js\n * // StateDeclaration object\n * var foldersState = {\n * name: 'folders',\n * url: '/folders',\n * resolve: {\n * allfolders: function(FolderService) {\n * return FolderService.list();\n * }\n * },\n * template: \"<ul><li ng-repeat='folder in allfolders'>{{folder.name}}</li></ul>\",\n * controller: function(allfolders, $scope) {\n * $scope.allfolders = allfolders;\n * }\n * }\n * ```\n *\n * Since this interface extends [[Ng1ViewDeclaration]], any view declaration properties can be set directly\n * on the state declaration and they will be applied to the view with the name `$default`. For example:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * ```\n *\n * is simply syntactic sugar for:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * views: {\n * $default: {\n * template: '<h1>foo</h1>',\n * controller: 'FooController'\n * }\n * }\n * }\n * ```\n *\n * If a state definition contains a `views:` object, any view properties set directly on the state are ignored.\n * Thus, this is an invalid state defintion:\n *\n * ```js\n * var state = {\n * name: 'foo',\n * url: '/foo',\n * controller: 'FooController', // invalid because views: exists\n * views: {\n * header: {\n * template: '<h1>header</h1>'\n * }\n * }\n * }\n * ```\n */\nexport interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclaration {\n /**\n * An optional object which defines multiple named views.\n *\n * Each key is the name of a view, and each value is a [[Ng1ViewDeclaration]].\n * Unnamed views are internally renamed to `$default`.\n *\n * A view's name is used to match an active `<ui-view>` directive in the DOM. When the state\n * is entered, the state's views are activated and matched with active `<ui-view>` directives:\n *\n * - The view's name is processed into a ui-view target:\n * - ui-view address: an address to a ui-view\n * - state anchor: the state to anchor the address to\n *\n * Examples:\n *\n * Targets three named ui-views in the parent state's template\n *\n * #### Example:\n * ```js\n * views: {\n * header: {\n * controller: \"headerCtrl\",\n * templateUrl: \"header.html\"\n * },\n * body: {\n * controller: \"bodyCtrl\",\n * templateUrl: \"body.html\"\n * },\n * footer: \"footerComponent\"\n * }\n * ```\n *\n * #### Example:\n * ```js\n * // Targets named ui-view=\"header\" in the template of the ancestor state 'top'\n * // and the named `ui-view=\"body\" from the parent state's template.\n * views: {\n * 'header@top': {\n * controller: \"msgHeaderCtrl\",\n * templateUrl: \"msgHeader.html\"\n * },\n * 'body': {\n * controller: \"messagesCtrl\",\n * templateUrl: \"messages.html\"\n * }\n * }\n * ```\n *\n * ## View targeting details\n *\n * There are a few styles of view addressing/targeting.\n * The most common is a simple `ui-view` name\n *\n * #### Simple ui-view name\n *\n * Addresses without an `@` are anchored to the parent state.\n *\n * #### Example:\n * ```js\n * // target the `<div ui-view='foo'></div>` created in the parent state's view\n * views: {\n * foo: {...}\n * }\n * ```\n *\n * #### View name anchored to a state\n *\n * You can anchor the `ui-view` name to a specific state by including an `@`\n *\n * #### Example:\n * targets the `<div ui-view='foo'></div>` which was created in a view owned by the state `bar.baz`\n * ```js\n * views: {\n * 'foo@bar.baz': {...}\n * }\n * ```\n *\n * #### Absolute addressing\n *\n * You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`.\n * Dotted addresses traverse the hierarchy of `ui-view`s active in the DOM:\n *\n * #### Example:\n * absolutely targets the `<div ui-view='nested'></div>`\n * ... which was created in the unnamed/$default root `<ui-view></ui-view>`\n * ```js\n * views: {\n * '!$default.nested': {...}\n * }\n * ```\n *\n * #### Relative addressing\n *\n * Absolute addressing is actually relative addressing, anchored to the unnamed root state (`\"\"`).\n * You can also use relative addressing anchored to *any state*, in order to target a target deeply nested `ui-views`:\n * The `ui-view` is targeted relative to the anchored state by traversing the nested `ui-view` names.\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created inside the\n * `<div ui-view='foo'></div>`\n * ... which was created inside the parent state's template.\n * ```js\n * views: {\n * 'foo.bar': {...}\n * }\n * ```\n *\n * #### Example:\n * targets the `<div ui-view='bar'></div>`\n * ... which was created in `<div ui-view='foo'></div>`\n * ... which was created in a template from the state `baz.qux`\n * ```js\n * views: {\n * 'foo.bar@baz.qux': {...}\n * }\n * ```\n *\n * #### Example:\n * a view can relatively target a named `ui-view` defined on an ancestor using `^` (meaning \"parent\")\n * ```js\n * views: {\n * 'foo@^': {...}, // foo@(parent state) (same as simply 'foo')\n * 'bar@^.^': {...}, // bar@(grandparent state)\n * 'baz@^.^.^': {...}, // baz@(great-grandparent state)\n * }\n * ```\n *\n * For additional in-depth details about how `ui-view` addressing works, see the internal api [[ViewService.match]].\n *\n * ---\n *\n * ## State template+controller and `views:` incompatiblity\n *\n * If a state has a `views` object, any state-level view properties ([[Ng1ViewDeclaration]]) are ignored. Therefore,\n * if _any view_ for a state is declared in the `views` object, then _all of the state's views_ must be defined in\n * the `views` object. The state declaration must not have any of the following fields:\n * - component\n * - bindings\n * - resolveAs\n * - template\n * - templateUrl\n * - templateProvider\n * - controller\n * - controllerAs\n * - controllerProvider\n */\n views?: { [key: string]: string | Ng1ViewDeclaration };\n\n /**\n * A state hook invoked when a state is being entered.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onEnter: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onEnter?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being exited.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * ### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onExit: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onExit?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * A state hook invoked when a state is being retained.\n *\n * The hook can inject global services.\n * It can also inject `$transition$` or `$state$` (from the current transition).\n *\n * #### Example:\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: (MyService, $transition$, $state$) => {\n * return MyService.doSomething($state$.name, $transition$.params());\n * }\n * });\n * ```\n *\n * #### Example:`\n * ```js\n * $stateProvider.state({\n * name: 'mystate',\n * onRetain: [ 'MyService', '$transition$', '$state$', function (MyService, $transition$, $state$) {\n * return MyService.doSomething($state$.name, $transition$.params());\n * } ]\n * });\n * ```\n */\n onRetain?: Ng1StateTransitionHook | IInjectable;\n\n /**\n * Makes all search/query parameters `dynamic`\n *\n * ### Deprecation warning: use [[ParamDeclaration.dynamic]] instead\n *\n * @deprecated\n */\n reloadOnSearch?: boolean;\n}\n\nexport interface Ng1ViewDeclaration extends _ViewDeclaration {\n /**\n * The name of the component to use for this view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The name of an [angular 1.5+ `.component()`](https://docs.angularjs.org/guide/component) (or directive with\n * bindToController and/or scope declaration) which will be used for this view.\n *\n * Resolve data can be provided to the component via the component's `bindings` object (for 1.3+ directives, the\n * `bindToController` is used; for other directives, the `scope` declaration is used). For each binding declared\n * on the component, any resolve with the same name is set on the component's controller instance. The binding\n * is provided to the component as a one-time-binding. In general, components should likewise declare their\n * input bindings as [one-way (\"&lt;\")](https://docs.angularjs.org/api/ng/service/$compile#-scope-).\n *\n * Note: inside a \"views:\" block, a bare string `\"foo\"` is shorthand for `{ component: \"foo\" }`\n *\n * Note: Mapping from resolve names to component inputs may be specified using [[bindings]].\n *\n * #### Example:\n * ```js\n * .state('profile', {\n * // Use the <my-profile></my-profile> component for the Unnamed view\n * component: 'MyProfile',\n * }\n *\n * .state('messages', {\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <message-list></message-list> component for the view named 'content'\n * views: {\n * header: { component: 'NavBar' },\n * content: { component: 'MessageList' }\n * }\n * }\n *\n * .state('contacts', {\n * // Inside a \"views:\" block, a bare string \"NavBar\" is shorthand for { component: \"NavBar\" }\n * // use the <nav-bar></nav-bar> component for the view named 'header'\n * // use the <contact-list></contact-list> component for the view named 'content'\n * views: {\n * header: 'NavBar',\n * content: 'ContactList'\n * }\n * }\n * ```\n *\n *\n * Note: When using `component` to define a view, you may _not_ use any of: `template`, `templateUrl`,\n * `templateProvider`, `controller`, `controllerProvider`, `controllerAs`.\n *\n *\n * See also: Todd Motto's angular 1.3 and 1.4 [backport of .component()](https://github.com/toddmotto/angular-component)\n */\n component?: string;\n\n /**\n * An object which maps `resolve`s to [[component]] `bindings`.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When using a [[component]] declaration (`component: 'myComponent'`), each input binding for the component is supplied\n * data from a resolve of the same name, by default. You may supply data from a different resolve name by mapping it here.\n *\n * Each key in this object is the name of one of the component's input bindings.\n * Each value is the name of the resolve that should be provided to that binding.\n *\n * Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the\n * same name.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('foo', {\n * resolve: {\n * foo: function(FooService) { return FooService.get(); },\n * bar: function(BarService) { return BarService.get(); }\n * },\n * component: 'Baz',\n * // The component's `baz` binding gets data from the `bar` resolve\n * // The component's `foo` binding gets data from the `foo` resolve (default behavior)\n * bindings: {\n * baz: 'bar'\n * }\n * });\n *\n * app.component('Baz', {\n * templateUrl: 'baz.html',\n * controller: 'BazController',\n * bindings: {\n * foo: '<', // foo binding\n * baz: '<' // baz binding\n * }\n * });\n * ```\n *\n */\n bindings?: { [key: string]: string };\n\n /**\n * Dynamic component provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the name of the component to use.\n * The provider will invoked during a Transition in which the view's state is entered.\n * The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * componentProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"fooComponent\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"barComponent\";\n * }\n * }\n * ```\n */\n componentProvider?: IInjectable;\n\n /**\n * The view's controller function or name\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * The controller function, or the name of a registered controller. The controller function will be used\n * to control the contents of the [[directives.uiView]] directive.\n *\n * If specified as a string, controllerAs can be declared here, i.e., \"FooController as foo\" instead of in\n * a separate [[controllerAs]] property.\n *\n * See: [[Ng1Controller]] for information about component-level router hooks.\n */\n controller?: IInjectable | string;\n\n /**\n * A controller alias name.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * If present, the controller will be published to scope under the `controllerAs` name.\n * See: https://docs.angularjs.org/api/ng/directive/ngController\n */\n controllerAs?: string;\n\n /**\n * Dynamic controller provider function.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * This is an injectable provider function which returns the actual controller function, or the name\n * of a registered controller. The provider will invoked during a Transition in which the view's state is\n * entered. The provider is called after the resolve data is fetched.\n *\n * #### Example:\n * ```js\n * controllerProvider: function(MyResolveData, $transition$) {\n * if (MyResolveData.foo) {\n * return \"FooCtrl\"\n * } else if ($transition$.to().name === 'bar') {\n * return \"BarCtrl\";\n * } else {\n * return function($scope) {\n * $scope.baz = \"Qux\";\n * }\n * }\n * }\n * ```\n */\n controllerProvider?: IInjectable;\n\n /**\n * The scope variable name to use for resolve data.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * When a view is activated, the resolved data for the state which the view belongs to is put on the scope.\n * This property sets the name of the scope variable to use for the resolved data.\n *\n * Defaults to `$resolve`.\n */\n resolveAs?: string;\n\n /**\n * The HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * HTML template as a string, or a function which returns an html template as a string.\n * This template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * This property takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * template: \"<h1>inline template definition</h1><div ui-view></div>\"\n * ```\n *\n * #### Example:\n * ```js\n * template: function(params) {\n * return \"<h1>generated template</h1>\";\n * }\n * ```\n */\n template?: Function | string;\n\n /**\n * The URL for the HTML template for the view.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * A path or a function that returns a path to an html template.\n * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.\n *\n * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.\n *\n * #### Example:\n * ```js\n * templateUrl: \"/templates/home.html\"\n * ```\n *\n * #### Example:\n * ```js\n * templateUrl: function(params) {\n * return myTemplates[params.pageId];\n * }\n * ```\n */\n templateUrl?: string | Function;\n\n /**\n * Injected function which returns the HTML template.\n *\n * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:\n *\n * Injected function which returns the HTML template.\n * The template will be used to render the corresponding [[directives.uiView]] directive.\n *\n * #### Example:\n * ```js\n * templateProvider: function(MyTemplateService, $transition$) {\n * return MyTemplateService.getTemplate($transition$.params().pageId);\n * }\n * ```\n */\n templateProvider?: IInjectable;\n}\n\n/**\n * The shape of a controller for a view (and/or component), defining the controller callbacks.\n *\n * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a\n * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).\n *\n * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,\n * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks\n * ([[IHookRegistry]]), but are only called if the view is currently active.\n *\n * This interface defines the UI-Router component callbacks.\n *\n */\nexport interface Ng1Controller {\n /** @hidden */\n $onInit(): void;\n /**\n * This callback is called when parameter values have changed.\n *\n * This callback can be used to respond to changing parameter values in the current state, or in parent/child states.\n * This callback is especially handy when using dynamic parameters ([[ParamDeclaration.dynamic]])\n *\n * Called when:\n * - The view is still active\n * - A new transition has completed successfully\n * - The state for the view (controller) was not reloaded\n * - At least one parameter value was changed\n *\n * Called with:\n * @param newValues an object containing the changed parameter values\n * @param $transition$ the new Transition which triggered this callback\n *\n * #### Example:\n * ```js\n * angular.module('foo').controller('FancyCtrl', function() {\n * this.uiOnParamsChanged = function(newParams) {\n * console.log(\"new params: \", newParams);\n * }\n * });\n * ```\n */\n uiOnParamsChanged(newValues: any, $transition$: Transition): void;\n\n /**\n * This callback is called when the view's state is about to be exited.\n *\n * This callback is used to inform a view that it is about to be exited, due to a new [[Transition]].\n * The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should\n * return a value, or a promise for a value. If a promise is returned, the new Transition waits until the\n * promise settles.\n *\n *\n * Called when:\n * - The view is still active\n * - A new Transition is about to run\n * - The new Transition will exit the view's state\n *\n * Called with:\n * - The new Transition\n *\n * Relevant return Values:\n * - `false`: The transition is cancelled.\n * - A rejected promise: The transition is cancelled.\n * - [[TargetState]]: The transition is redirected to the new target state.\n * - Anything else: the transition will continue normally (the state and view will be deactivated)\n *\n * #### Example:\n * ```js\n * app.component('myComponent', {\n * template: '<input ng-model=\"$ctrl.data\" type=\"text\">',\n * bindings: { 'data': '<' },\n * controller: function() {\n *\n * this.originalData = angular.copy(this.data);\n *\n * this.uiCanExit = function() {\n * if (!angular.equals(this.data, this.originalData)) {\n * // Note: This could also return a Promise and request async\n * // confirmation using something like ui-bootstrap $modal\n * return window.confirm(\"Data has changed. Exit anyway and lose changes?\");\n * }\n * }\n * }\n * }\n * ```\n *\n * @param transition the new Transition that is about to exit the component's state\n * @return a HookResult, or a promise for a HookResult\n */\n uiCanExit(transition: Transition): HookResult;\n}\n\n/**\n * Manages which template-loading mechanism to use.\n *\n * Defaults to `$templateRequest` on Angular versions starting from 1.3, `$http` otherwise.\n */\nexport interface TemplateFactoryProvider {\n /**\n * Forces $templateFactory to use $http instead of $templateRequest.\n *\n * UI-Router uses `$templateRequest` by default on angular 1.3+.\n * Use this method to choose to use `$http` instead.\n *\n * ---\n *\n * ## Security warning\n *\n * This might cause XSS, as $http doesn't enforce the regular security checks for\n * templates that have been introduced in Angular 1.3.\n *\n * See the $sce documentation, section\n * <a href=\"https://docs.angularjs.org/api/ng/service/$sce#impact-on-loading-templates\">\n * Impact on loading templates</a> for more details about this mechanism.\n *\n * *Note: forcing this to `false` on Angular 1.2.x will crash, because `$templateRequest` is not implemented.*\n *\n * @param useUnsafeHttpService `true` to use `$http` to fetch templates\n */\n useHttpService(useUnsafeHttpService: boolean);\n}\n\ndeclare module '@uirouter/core/lib/state/stateRegistry' {\n interface StateRegistry {\n register(state: Ng1StateDeclaration | { new (): Ng1StateDeclaration });\n }\n}\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveFactory = void 0;
/** @publicapi @module ng1 */ /** */

@@ -4,0 +5,0 @@ var core_1 = require("@uirouter/core");

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCAAwG;AACxG,iCAAmC;AAEnC;;GAEG;AACH,IAAM,QAAQ,GAAG;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,EAAE,UAAC,UAAuC,EAAE,MAAW,EAAE,MAAqB;QAAlC,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AAA,cAAM,OAAA,KAAK,EAAL,CAAK,EAAX,CAAW,CAAC,EAAE,CAAC,EAA7E,CAA6E,CAAC;YAC/G,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;YAC/D,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YAEnD,IAAM,WAAW,GAAG,UAAC,GAAQ,EAAE,KAAiC;gBAC9D,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;gBAC/B,OAAO,GAAG,CAAC;YACb,CAAC,CAAC;YACF,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,EAA/B,CAA+B,CAAC,CAAC;QAClF,CAAC,CAAC;QAEF,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC;AAEF,cAAc;AACD,QAAA,cAAc,GAAG,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC;AAE7C,2BAA2B;AAC3B,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAO,sBAAc,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, (local) => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then((results) => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.$stateNotFound = exports.$stateChangeError = exports.$stateChangeSuccess = exports.$stateChangeCancel = exports.$stateChangeStart = void 0;
/**

@@ -4,0 +5,0 @@ * # Legacy state events

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA;;;;;;;;;;;;;;;;;;;GAmBG,CAAC,MAAM;AACV,sCAA2C;AA6I3C,CAAC;IACS,IAAA,oCAAU,EAAE,gCAAQ,CAAa;IAEzC,SAAS,UAAU,CAAC,IAAS,EAAE,WAAkB;QAC/C,IAAI,GAAW,EAAE,KAAU,CAAC;QAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YAAG,oBAAG,EAAE,sBAAK,CAAgB;QAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACxE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,uBAAuB,CAAC,YAAwB;QACvD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,YAAY,CAAC,OAAO,EAAE;YAAE,OAAO;QAE9F,IAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC1C,IAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACnD,IAAM,UAAU,GAAG,SAAS,CA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,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;YAEjH,OAAO;gBACL,QAAQ,EAAE,oBAAoB,CAAC,SAAS,CAAC,QAAQ;aAClD,CAAC;QACJ,CAAC;IACH,CAAC;IAED,YAAO;SACJ,MAAM,CAAC,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,CAAC;SACrD,QAAQ,CAAC,cAAc,EAAG,oBAAuD,CAAC;SAClF,GAAG,CAAC;QACH,cAAc;QACd,UAAU,YAAiB;YACzB,oBAAoB;QACtB,CAAC;KACF,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC",
"sourcesContent": [
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function() {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function() {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function(error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function () {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function () {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map((e) => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function ($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ng1LocationServices = void 0;
/** @publicapi @module ng1 */ /** */

@@ -4,0 +5,0 @@ var core_1 = require("@uirouter/core");

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCAAkG;AAClG,uCAAiF;AAGjF;;;GAGG;AACH;IA4CE,6BAAY,iBAAoC;QA3BhD,uBAAuB;QACf,kBAAa,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esContent": [
"/** @publicapi @module ng1 */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\nimport { ILocationService, ILocationProvider, IWindowService } from 'angular';\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer: any;\n private $browser: any;\n private $window: IWindowService;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n\n private _baseHref: string;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n const pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (x: any) =>\n x != null ? x.toString().replace(/(~|\\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : x;\n\n pathType.decode = (x: string) =>\n x != null ? x.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : x;\n }\n\n dispose() {}\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n const _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n baseHref() {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (isDefined(newUrl)) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser, $window: IWindowService) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', evt => this._urlListeners.forEach(fn => fn(evt)));\n const _loc = val($location);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\nimport { ILocationService, ILocationProvider, IWindowService } from 'angular';\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer: any;\n private $browser: any;\n private $window: IWindowService;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n\n private _baseHref: string;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n const pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (x: any) =>\n x != null ? x.toString().replace(/(~|\\/)/g, (m) => ({ '~': '~~', '/': '~2F' }[m])) : x;\n\n pathType.decode = (x: string) =>\n x != null ? x.toString().replace(/(~~|~2F)/g, (m) => ({ '~~': '~', '~2F': '/' }[m])) : x;\n }\n\n dispose() {}\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n const _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n baseHref() {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (isDefined(newUrl)) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser, $window: IWindowService) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', (evt) => this._urlListeners.forEach((fn) => fn(evt)));\n const _loc = val($location);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n }\n}\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLocals = exports.watchDigests = void 0;
/**

@@ -41,2 +42,4 @@ * # Angular 1 types

router.viewService._pluginapi._viewConfigFactory('ng1', views_1.getNg1ViewConfigFactory());
// Disable decoding of params by UrlMatcherFactory because $location already handles this
router.urlService.config._decodeParams = false;
var ng1LocationService = (router.locationService = router.locationConfig = new locationServices_1.Ng1LocationServices($locationProvider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Q,EAAE,UAAU,MAAoB,IAAG,CAAC,CAAC,CAAC,CAAC;AAC9D,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,UAAU,UAAqB,IAAG,CAAC,CAAC,CAAC,CAAC;AACjE,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAEvB,8CAA8C;AACjC,QAAA,SAAS,GAAG,UAAC,GAAmB;IAC3C,IAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,eAAQ,CAAC,CAAC;IAEhD,IAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG;QAC5B,IAAM,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACnD,OAAO,CAAC,GAAG,EAAE,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAU,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC,CAAC",
"sourcesContent": [
"/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n // tslint:disable-line:no-shadowed-variable\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = serviceName => [\n '$uiRouterProvider',\n $urp => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!$injector.hasOwnProperty('strictDi')) {\n try {\n $injector.invoke(function(checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(x => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter(x => x.deps === 'deferred')\n .forEach(resolvable => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) => (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter));\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () => extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function() {\n trace.approximateDigests++;\n });\n}\n\nmod_init.provider('$uiRouter', <any>$uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util.provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main.factory('$view', () => router.viewService);\nmod_main.service('$trace', () => trace);\n\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function($urlMatcherFactory: UrlMatcherFactory) {}]);\nmod_state.run(['$state', function($state: StateService) {}]);\nmod_rtr.run(['$urlRouter', function($urlRouter: UrlRouter) {}]);\nmod_init.run(runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap<any> => {\n const tokens = ctx.getTokens().filter(isString);\n\n const tuples = tokens.map(key => {\n const resolvable = ctx.getResolvable(key);\n const waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n"
"/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService; // tslint:disable-line\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']); // tslint:disable-line\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n // tslint:disable-line:no-shadowed-variable\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [\n '$uiRouterProvider',\n ($urp) => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!$injector.hasOwnProperty('strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map((x) => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter((x) => x.deps === 'deferred')\n .forEach((resolvable) => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) => (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter));\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () => extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n}\n\nmod_init.provider('$uiRouter', <any>$uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util.provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main.factory('$view', () => router.viewService);\nmod_main.service('$trace', () => trace);\n\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) {}]);\nmod_state.run(['$state', function ($state: StateService) {}]);\nmod_rtr.run(['$urlRouter', function ($urlRouter: UrlRouter) {}]);\nmod_init.run(runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap<any> => {\n const tokens = ctx.getTokens().filter(isString);\n\n const tuples = tokens.map((key) => {\n const resolvable = ctx.getResolvable(key);\n const waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n"
]
}

@@ -12,2 +12,2 @@ /** @publicapi @module ng1 */ /** */

*/
export declare const getStateHookBuilder: (hookName: "onEnter" | "onExit" | "onRetain") => (stateObject: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn;
export declare const getStateHookBuilder: (hookName: 'onEnter' | 'onExit' | 'onRetain') => (stateObject: StateObject, parentFn: BuilderFunction) => TransitionStateHookFn;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStateHookBuilder = void 0;
/** @publicapi @module ng1 */ /** */

@@ -4,0 +5,0 @@ var core_1 = require("@uirouter/core");

@@ -9,3 +9,3 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCASwB;AACxB,wCAAwC;AAGxC;;;;;;;;GAQG;AACU,QAAA,mBAAmB,GAAG,UAAC,QAA2C;IAC7E,OAAA,SAAS,gBAAgB,CAAC,WAAwB,EAAE,QAAyB;QAC3E,IAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAEvD,SAAS,gBAAgB,CAAC,KAAiB,EAAE,KAA0B;YACrE,IAAM,cAAc,GAAG,IAAI,qBAAc,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;YACvE,IAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC9D,IAAM,MAAM,GAAG,aAAM,CAAC,oBAAS,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACtF,OAAO,eAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;AAZD,CAYC,CAAC",
"mappings": ";;;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCASwB;AACxB,wCAAwC;AAGxC;;;;;;;;GAQG;AACU,QAAA,mBAAmB,GAAG,UAAC,QAA2C;IAC7E,OAAA,SAAS,gBAAgB,CAAC,WAAwB,EAAE,QAAyB;QAC3E,IAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAEvD,SAAS,gBAAgB,CAAC,KAAiB,EAAE,KAA0B;YACrE,IAAM,cAAc,GAAG,IAAI,qBAAc,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;YACvE,IAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC9D,IAAM,MAAM,GAAG,aAAM,CAAC,oBAAS,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACtF,OAAO,eAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;AAZD,CAYC,CAAC",
"sourcesContent": [

@@ -12,0 +12,0 @@ "/** @publicapi @module ng1 */ /** */\nimport {\n StateObject,\n TransitionStateHookFn,\n HookResult,\n Transition,\n services,\n ResolveContext,\n extend,\n BuilderFunction,\n} from '@uirouter/core';\nimport { getLocals } from '../services';\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n *\n * @internalapi\n */\nexport const getStateHookBuilder = (hookName: 'onEnter' | 'onExit' | 'onRetain') =>\n function stateHookBuilder(stateObject: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {\n const hook = stateObject[hookName];\n const pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n const resolveContext = new ResolveContext(trans.treeChanges(pathname));\n const subContext = resolveContext.subContext(state.$$state());\n const locals = extend(getLocals(subContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n };\n"

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ng1ViewConfig = exports.ng1ViewsBuilder = exports.getNg1ViewConfigFactory = void 0;
var core_1 = require("@uirouter/core");

@@ -4,0 +5,0 @@ /** @internalapi */

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAEA,uCAmBwB;AAKxB,mBAAmB;AACnB,SAAgB,uBAAuB;IACrC,IAAI,eAAe,GAAoB,IAAI,CAAC;IAC5C,OAAO,UAAC,IAAI,EAAE,IAAI;QAChB,eAAe,GAAG,eAAe,IAAI,eAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,0DAMC;AAED,mBAAmB;AACnB,IAAM,SAAS,GAAG,UAAC,IAAI,EAAE,GAAG,IAAK,OAAA,IAAI,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,GAAG,IAAI,gBAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAA1B,CAA0B,EAAE,KAAK,CAAC,EAA5D,CAA4D,CAAC;AAE9F;;;;;;;;;;GAUG;AACH,SAAgB,eAAe,CAAC,KAAkB;IAChD,4BAA4B;IAC5B,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAE7B,IAAM,OAAO,GAAG,CAAC,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,QA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,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAM,UAAU,GAAG,cAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAI,CAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QACtE,IAAM,UAAU,GAAG,IAAI,iBAAU,CAAC,EAAE,EAAO,UAAU,EAAE,IAAI,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACH,oBAAC;AAAD,CAAC,AA9CD,IA8CC;AA9CY,sCAAa",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from '../angular';\nimport {\n StateObject,\n pick,\n forEach,\n tail,\n extend,\n isArray,\n isInjectable,\n isDefined,\n isString,\n services,\n trace,\n ViewConfig,\n ViewService,\n ViewConfigFactory,\n PathNode,\n ResolveContext,\n Resolvable,\n IInjectable,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration } from '../interface';\nimport { TemplateFactory } from '../templateFactory';\nimport IInjectorService = angular.auto.IInjectorService;\n\n/** @internalapi */\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\n/** @internalapi */\nconst hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n const tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\n `State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter(key => isDefined(state[key])).join(', ')}`\n );\n }\n\n const views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { $default: pick(state, allViewKeys) };\n\n forEach(viewsObject, function(config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: <string>config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\n `Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`\n );\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n\n const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\n/** @hidden */\nlet id = 0;\n\n/** @internalapi */\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {}\n\n load() {\n const $q = services.$q;\n const context = new ResolveContext(this.path);\n const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n const promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n\n return $q.all(promises).then(results => {\n trace.traceViewServiceEvent('Loaded', this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component\n ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings)\n : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): IInjectable | string | Promise<IInjectable | string> {\n const provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any>provider) : provider;\n const resolvable = new Resolvable('', <any>providerFn, deps);\n return resolvable.get(context);\n }\n}\n"
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from '../angular';\nimport {\n StateObject,\n pick,\n forEach,\n tail,\n extend,\n isArray,\n isInjectable,\n isDefined,\n isString,\n services,\n trace,\n ViewConfig,\n ViewService,\n ViewConfigFactory,\n PathNode,\n ResolveContext,\n Resolvable,\n IInjectable,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration } from '../interface';\nimport { TemplateFactory } from '../templateFactory';\nimport IInjectorService = angular.auto.IInjectorService;\n\n/** @internalapi */\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\n/** @internalapi */\nconst hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n const tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\n `State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter((key) => isDefined(state[key])).join(', ')}`\n );\n }\n\n const views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { $default: pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: <string>config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\n `Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`\n );\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n\n const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\n/** @hidden */\nlet id = 0;\n\n/** @internalapi */\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {}\n\n load() {\n const $q = services.$q;\n const context = new ResolveContext(this.path);\n const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n const promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent('Loaded', this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component\n ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings)\n : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): IInjectable | string | Promise<IInjectable | string> {\n const provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any>provider) : provider;\n const resolvable = new Resolvable('', <any>providerFn, deps);\n return resolvable.get(context);\n }\n}\n"
]
}
"use strict";
/** @publicapi @module ng1 */ /** */
Object.defineProperty(exports, "__esModule", { value: true });
exports.$IncludedByStateFilter = exports.$IsStateFilter = void 0;
var angular_1 = require("./angular");

@@ -43,6 +44,3 @@ /**

exports.$IncludedByStateFilter = $IncludedByStateFilter;
angular_1.ng
.module('ui.router.state')
.filter('isState', $IsStateFilter)
.filter('includedByState', $IncludedByStateFilter);
angular_1.ng.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);
//# sourceMappingURL=stateFilters.js.map

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";AAAA,6BAA6B,CAAC,MAAM;;AAEpC,qCAA0C;AAG1C;;;;;;;;;GASG;AACH,cAAc,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,SAAS,cAAc,CAAC,MAAoB;IAC1C,IAAM,QAAQ,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAoC;QAClG,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,OAAO,QAAQ,CAAC;AAClB,CAAC;AA0BQ,wCAAc;AAxBvB;;;;;;;;;GASG;AACH,sBAAsB,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC5C,SAAS,sBAAsB,CAAC,MAAoB;IAClD,IAAM,cAAc,GAAQ,UAAS,KAAkB,EAAE,MAAW,EAAE,OAAmC;QACvG,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,OAAO,cAAc,CAAC;AACxB,CAAC;AAOwB,wDAAsB;AAL/C,YAAO;KACJ,MAAM,CAAC,iBAAiB,CAAC;KACzB,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC;KACjC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC",
"mappings": ";AAAA,6BAA6B,CAAC,MAAM;;;AAEpC,qCAA0C;AAG1C;;;;;;;;;GASG;AACH,cAAc,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,SAAS,cAAc,CAAC,MAAoB;IAC1C,IAAM,QAAQ,GAAQ,UAAU,KAAkB,EAAE,MAAW,EAAE,OAAoC;QACnG,OAAO,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;IACF,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAuBQ,wCAAc;AArBvB;;;;;;;;;GASG;AACH,sBAAsB,CAAC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC5C,SAAS,sBAAsB,CAAC,MAAoB;IAClD,IAAM,cAAc,GAAQ,UAAU,KAAkB,EAAE,MAAW,EAAE,OAAmC;QACxG,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC;IACF,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,OAAO,cAAc,CAAC;AACxB,CAAC;AAIwB,wDAAsB;AAF/C,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function(state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function(state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular\n .module('ui.router.state')\n .filter('isState', $IsStateFilter)\n .filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n"
"/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function (state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function (state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n"
]
}

@@ -113,3 +113,3 @@ /** @publicapi @module ng1 */ /** */

*/
decorator(name: string, func: BuilderFunction): Function | this | BuilderFunction[];
decorator(name: string, func: BuilderFunction): Function | this;
/**

@@ -116,0 +116,0 @@ * Registers a state

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StateProvider = void 0;
/** @publicapi @module ng1 */ /** */

@@ -4,0 +5,0 @@ var core_1 = require("@uirouter/core");

@@ -9,3 +9,3 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCAQwB;AAGxB;;;;;;;;;;;;;;;GAeG;AACH;IACE,uBAAoB,aAA4B,EAAU,YAA0B;QAAhE,kBAAa,GAAb,aAAa,CAAe;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAClF,2BAAoB,CAAC,UAAG,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwFG;IACH,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC1D,CAAC;IAwID,6BAAK,GAAL,UAAM,IAAS,EAAE,UAAgB;QAC/B,IAAI,eAAQ,CAAC,IAAI,CAAC,EAAE;YAClB,UAAU,GAAG,IAAI,CAAC;SACnB;aAAM;YACL,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;SACxB;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IAEH,iCAAS,GAAT,UAAU,QAA2B;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACH,oBAAC;AAAD,CAAC,AA3PD,IA2PC;AA3PY,sCAAa",
"mappings": ";;;AAAA,6BAA6B,CAAC,MAAM;AACpC,uCAQwB;AAGxB;;;;;;;;;;;;;;;GAeG;AACH;IACE,uBAAoB,aAA4B,EAAU,YAA0B;QAAhE,kBAAa,GAAb,aAAa,CAAe;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAClF,2BAAoB,CAAC,UAAG,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwFG;IACH,iCAAS,GAAT,UAAU,IAAY,EAAE,IAAqB;QAC3C,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC1D,CAAC;IAwID,6BAAK,GAAL,UAAM,IAAS,EAAE,UAAgB;QAC/B,IAAI,eAAQ,CAAC,IAAI,CAAC,EAAE;YAClB,UAAU,GAAG,IAAI,CAAC;SACnB;aAAM;YACL,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC;SACxB;QACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IAEH,iCAAS,GAAT,UAAU,QAA2B;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACH,oBAAC;AAAD,CAAC,AA3PD,IA2PC;AA3PY,sCAAa",
"sourcesContent": [

@@ -12,0 +12,0 @@ "/** @publicapi @module ng1 */ /** */\nimport {\n val,\n isObject,\n createProxyFunctions,\n BuilderFunction,\n StateRegistry,\n StateService,\n OnInvalidCallback,\n} from '@uirouter/core';\nimport { Ng1StateDeclaration } from './interface';\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n * <a id='template'></a>\n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * <a id='templateUrl'></a>\n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * <a id='templateProvider'></a>\n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * <a id='controller'></a>\n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * <a id='controllerProvider'></a>\n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * <a id='controllerAs'></a>\n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * <a id='resolve'></a>\n *\n * - **`resolve`** - {object.&lt;string, function&gt;=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * <a id='url'></a>\n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * <a id='params'></a>\n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * <a id='views'></a>\n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * <a id='abstract'></a>\n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * <a id='onEnter'></a>\n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * <a id='onExit'></a>\n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * <a id='reloadOnSearch'></a>\n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * <a id='data'></a>\n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n"

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TemplateFactory = void 0;
/** @publicapi @module view */ /** */

@@ -170,5 +171,3 @@ var angular_1 = require("./angular");

};
var attrs = getComponentBindings(component)
.map(attributeTpl)
.join(' ');
var attrs = getComponentBindings(component).map(attributeTpl).join(' ');
var kebobName = kebob(component);

@@ -175,0 +174,0 @@ return "<" + kebobName + " " + attrs + "></" + kebobName + ">";

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA,8BAA8B,CAAC,MAAM;AACrC,qCAA0C;AAE1C,uCAcwB;AAGxB;;GAEG;AACH;IAAA;QAAA,iBAyLC;QAxLC,cAAc,CAAS,aAAQ,GAAG,YAAO,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;QAK5D,cAAc,CAAC,SAAI,GAAG;YACpB,OAAO;YACP,gBAAgB;YAChB,WAAW;YACX,UAAC,KAAK,EAAE,cAAc,EAAE,SAAS;gBAC/B,KAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;gBAChH,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnB,KAAI,CAAC,cAAc,GAAG,cAAc,CAAC;gBACrC,OAAO,KAAI,CAAC;YACd,CAAC;SACF,CAAC;IAyKJ,CAAC;IAvKC,cAAc;IACd,wCAAc,GAAd,UAAe,KAAc;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,oCAAU,GAAV,UACE,MAA0B,EAC1B,MAAW,EACX,OAAuB;QAEvB,IAAM,eAAe,GAAG,qBAAqB,CAAC;QAE9C,IAAM,UAAU,GAAG,UAAA,MAAM,IAAI,OAAA,eAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAnB,CAAmB,CAAC,EAAzD,CAAyD,CAA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GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC/E,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC,CAAC;AAOF,yDAAyD;AACzD,gGAAgG;AAChG,IAAM,aAAa,GAAG,UAAC,WAAgB;IACrC,OAAA,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5B,sCAAsC;SACrC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAjD,CAAiD,CAAC;QAChE,wBAAwB;SACvB,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,gBAAS,CAAC,KAAK,CAAC,IAAI,cAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC,CAAC;QACzD,0CAA0C;SACzC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAmB,CAAA,EAAtE,CAAsE,CAAC;AANzF,CAMyF,CAAC",
"sourcesContent": [
"/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { IAugmentedJQuery } from 'angular';\nimport {\n isArray,\n isDefined,\n isFunction,\n isObject,\n services,\n Obj,\n IInjectable,\n tail,\n kebobString,\n unnestR,\n ResolveContext,\n Resolvable,\n RawParams,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from './interface';\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = [\n '$http',\n '$templateCache',\n '$injector',\n ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n },\n ];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n }\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(\n config: Ng1ViewDeclaration,\n params: any,\n context: ResolveContext\n ): Promise<{ template?: string; component?: string }> {\n const defaultTemplate = '<ui-view></ui-view>';\n\n const asTemplate = result => services.$q.when(result).then(str => ({ template: str }));\n const asComponent = result => services.$q.when(result).then(str => ({ component: str }));\n\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n }\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: string | Function, params?: RawParams) {\n return isFunction(template) ? (<any>template)(params) : template;\n }\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: string | Function, params: any) {\n if (isFunction(url)) url = (<any>url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function(response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n }\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n const attributeTpl = (input: BindingTuple) => {\n const { name, type } = input;\n const attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name]) return `${attrName}='${uiView.attr(attrName)}'`;\n\n const resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@') return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n const res = context.getResolvable(resolveName);\n const fn = res && res.data;\n const args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n const arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(',')})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n const attrs = getComponentBindings(component)\n .map(attributeTpl)\n .join(' ');\n const kebobName = kebob(component);\n return `<${kebobName} ${attrs}></${kebobName}>`;\n }\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n const cmpDefs = <any[]>services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) =>\n Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(key => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter(tuple => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n"
"/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { IAugmentedJQuery } from 'angular';\nimport {\n isArray,\n isDefined,\n isFunction,\n isObject,\n services,\n Obj,\n IInjectable,\n tail,\n kebobString,\n unnestR,\n ResolveContext,\n Resolvable,\n RawParams,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from './interface';\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = [\n '$http',\n '$templateCache',\n '$injector',\n ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n },\n ];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n }\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(\n config: Ng1ViewDeclaration,\n params: any,\n context: ResolveContext\n ): Promise<{ template?: string; component?: string }> {\n const defaultTemplate = '<ui-view></ui-view>';\n\n const asTemplate = (result) => services.$q.when(result).then((str) => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then((str) => ({ component: str }));\n\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n }\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: string | Function, params?: RawParams) {\n return isFunction(template) ? (<any>template)(params) : template;\n }\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: string | Function, params: any) {\n if (isFunction(url)) url = (<any>url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n }\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n const attributeTpl = (input: BindingTuple) => {\n const { name, type } = input;\n const attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name]) return `${attrName}='${uiView.attr(attrName)}'`;\n\n const resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@') return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n const res = context.getResolvable(resolveName);\n const fn = res && res.data;\n const args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n const arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(',')})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n const attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n const kebobName = kebob(component);\n return `<${kebobName} ${attrs}></${kebobName}>`;\n }\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n const cmpDefs = <any[]>services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) =>\n Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map((key) => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter((tuple) => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map((tuple) => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n"
]
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UrlRou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hLD,IAgLC;AAhLY,8CAAiB",
"sourcesContent": [
"/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return match => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: RegExp | UrlMatcher | string, handler: string | IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n\n this.router.urlService.rules.when(what, handler as any);\n return this;\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this.router.urlService.deferIntercept(defer);\n }\n}\n"
"/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler): UrlRuleHandlerFn {\n return (match) => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: RegExp | UrlMatcher | string, handler: string | IInjectable) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n\n this.router.urlService.rules.when(what, handler as any);\n return this;\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean) {\n this.router.urlService.deferIntercept(defer);\n }\n}\n"
]
}

@@ -9,6 +9,6 @@ {

"names": [],
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,qCAA0C;AAe1C,cAAc;AACd,SAAS,mBAAmB;IAC1B,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG;QACV,eAAe;QACf,UAAU;QACV,UAAS,aAAmC,EAAE,QAAyB;YACrE,IAAI,eAAe,EAAE;gBACnB,OAAO,aAAa,CAAC;aACtB;YAED,OAAO,UAAS,QAAgB;gBAC9B,OAAO,QAAQ,CACb;oBACE,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EACD,CAAC,EACD,KAAK,CACN,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA2B,mBAAmB,CAAC,CAAC",
"mappings": ";;AAAA,6BAA6B,CAAC,MAAM;AACpC,qCAA0C;AAe1C,cAAc;AACd,SAAS,mBAAmB;IAC1B,IAAI,eAAe,GAAG,KAAK,CAAC;IAE5B,IAAI,CAAC,eAAe,GAAG;QACrB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC,CAAC;IAEF,IAAI,CAAC,IAAI,GAAG;QACV,eAAe;QACf,UAAU;QACV,UAAU,aAAmC,EAAE,QAAyB;YACtE,IAAI,eAAe,EAAE;gBACnB,OAAO,aAAa,CAAC;aACtB;YAED,OAAO,UAAU,QAAgB;gBAC/B,OAAO,QAAQ,CACb;oBACE,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBAC/B,CAAC,EACD,CAAC,EACD,KAAK,CACN,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,YAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,eAAe,EAA2B,mBAAmB,CAAC,CAAC",
"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function() {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function($element: JQuery) {\n return $timeout(\n function() {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n"
"/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(\n function () {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n"
]
}
{
"name": "angular-ui-router",
"description": "State-based routing for AngularJS 1.x",
"version": "1.0.26",
"version": "1.0.27",
"scripts": {

@@ -18,11 +18,13 @@ "clean": "shx rm -rf lib lib-esm _doc build release *.log",

"bundle_resolve": "rollup -c --environment RESOLVE && rollup -c --environment RESOLVE,MINIFY",
"test": "tsc && npm run test:ng16 && npm run test:ng15 && npm run test:ng14 && npm run test:ng13 && npm run test:ng12",
"test:ng12": "karma start --ngversion 1.2",
"test:ng13": "karma start --ngversion 1.3",
"test:ng14": "karma start --ngversion 1.4",
"test:ng15": "karma start --ngversion 1.5",
"test:ng16": "karma start --ngversion 1.6",
"test": "tsc && NG=1.7 jest && NG=1.6 jest && NG=1.5 jest && NG=1.4 jest && NG=1.3 jest && NG=1.2 jest",
"test:debug": "node --inspect ./node_modules/.bin/jest --runInBand --watch",
"test:ng12": "NG=1.2 jest",
"test:ng13": "NG=1.3 jest",
"test:ng14": "NG=1.4 jest",
"test:ng15": "NG=1.5 jest",
"test:ng16": "NG=1.6 jest",
"test:ng17": "NG=1.7 jest",
"test:downstream": "test_downstream_projects",
"watch": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1",
"debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome",
"watch": "jest --watch",
"debug": "npm run test:debug",
"docs": "generate_docs",

@@ -76,3 +78,3 @@ "docs:publish": "generate_docs && publish_docs",

"dependencies": {
"@uirouter/core": "6.0.5"
"@uirouter/core": "6.0.6"
},

@@ -86,27 +88,22 @@ "peerDependencies": {

"@types/angular-mocks": "^1.7.0",
"@types/jasmine": "^3.5.10",
"@uirouter/publish-scripts": "^2.3.45",
"dts-downlevel": "^0.3.0",
"fork-ts-checker-webpack-plugin": "^4.1.3",
"@types/jest": "^26.0.5",
"@uirouter/publish-scripts": "2.5.3",
"angular": "1.8.0",
"bufferutil": "4.0.1",
"canvas": "2.6.1",
"dts-downlevel": "^0.4.0",
"husky": "^4.2.5",
"jasmine-core": "^3.5.0",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-super-dots-reporter": "^0.2.0",
"karma-webpack": "^4.0.2",
"lodash": "^4.17.15",
"jest": "^26.0.1",
"lodash": "^4.17.19",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"rollup": "^1.27.14",
"rollup": "^2.22.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-uglify": "^6.0.4",
"ts-loader": "^7.0.1",
"tslint": "^6.1.2",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^6.1.0",
"ts-jest": "^26.0.0",
"tslint": "5.20.1",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.6.4",
"webpack": "^4.43.0"
"typescript": "^3.9.7",
"utf-8-validate": "5.0.2"
},

@@ -117,3 +114,38 @@ "husky": {

}
},
"docgen": {
"publishDir": "_ng1_docs",
"navigation": {
"": [
"UIRouter"
],
"Services": [
"StateService",
"StateRegistry",
"TransitionService",
"UrlService",
"UrlConfig",
"UrlRules"
],
"Interfaces": [
"Ng1StateDeclaration"
],
"Components": [
"uiView",
"UISref",
"UISrefActive"
],
"Other": [
"Transition",
"Trace"
]
},
"include": [
{
"pkg": "@uirouter/core",
"repo": "https://github.com/ui-router/core",
"branch": "master"
}
]
}
}
/**
* State-based routing for AngularJS 1.x
* @version v1.0.26
* @version v1.0.27
* @link https://ui-router.github.io

@@ -5,0 +5,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -8,3 +8,3 @@ {

"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, (local) => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then((results) => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
],

@@ -19,3 +19,3 @@ "names": [

],
"mappings": ";;;;;;;;;;;;IAAA;AACA,IAGA;;;IAGA,IAAM,QAAQ,GAAG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AM,OAAA,KAAK,GAAA,GAAA,CAAC,EAAE,CAAC,GAAA,CAAC;gBAC/G,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC/D,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEnD,IAAM,WAAW,GAAG,UAAC,GAAQ,EAAE,KAAiC;oBAC9D,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;oBAC/B,OAAO,GAAG,CAAC;iBACZ,CAAC;gBACF,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,GAAA,CAAC,CAAC;aACjF,CAAC;YAEF,OAAO,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;SAC5D;KACF,CAAC;IAEF;QACa,cAAc,GAAG,cAAM,OAAA,QAAQ,IAAC;IAE7C;AACAC,kBAAc,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAO,cAAc,CAAC;;;;;;;;;;;;"
}
/**
* State-based routing for AngularJS 1.x
* @version v1.0.26
* @version v1.0.27
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@uirouter/core"),require("angular")):"function"==typeof define&&define.amd?define(["exports","@uirouter/core","angular"],r):r((e=e||self)["@uirouter/angularjs-resolve-service"]={},e["@uirouter/core"],e.angular)}(this,function(e,s,r){"use strict";function t(){return o}var o={resolve:function(e,o,r){void 0===o&&(o={});var n=new s.PathNode(new s.StateObject({params:{},resolvables:[]})),u=new s.PathNode(new s.StateObject({params:{},resolvables:[]})),a=new s.ResolveContext([n,u]);a.addResolvables(s.resolvablesBuilder({resolve:e}),u.state);function t(e){function r(e){return s.resolvablesBuilder({resolve:s.mapObj(e,function(e){return function(){return e}})})}function t(e,r){return e[r.token]=r.value,e}return a.addResolvables(r(e),n.state),a.addResolvables(r(o),u.state),a.resolvePath().then(function(e){return e.reduce(t,{})})}return r?r.then(t):t({})}};r.module("ui.router").factory("$resolve",t),e.resolveFactory=t,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@uirouter/core"),require("angular")):"function"==typeof define&&define.amd?define(["exports","@uirouter/core","angular"],r):r((e=e||self)["@uirouter/angularjs-resolve-service"]={},e["@uirouter/core"],e.angular)}(this,(function(e,r,t){"use strict";var o={resolve:function(e,t,o){void 0===t&&(t={});var n=new r.PathNode(new r.StateObject({params:{},resolvables:[]})),u=new r.PathNode(new r.StateObject({params:{},resolvables:[]})),a=new r.ResolveContext([n,u]);a.addResolvables(r.resolvablesBuilder({resolve:e}),u.state);var s=function(e){var o=function(e){return r.resolvablesBuilder({resolve:r.mapObj(e,(function(e){return function(){return e}}))})};a.addResolvables(o(e),n.state),a.addResolvables(o(t),u.state);var s=function(e,r){return e[r.token]=r.value,e};return a.resolvePath().then((function(e){return e.reduce(s,{})}))};return o?o.then(s):s({})}},n=function(){return o};t.module("ui.router").factory("$resolve",n),e.resolveFactory=n,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=resolveService.min.js.map

@@ -8,6 +8,5 @@ {

"sourcesContent": [
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, local => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then(results => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
"/** @publicapi @module ng1 */ /** */\nimport { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';\nimport * as angular from 'angular';\n\n/**\n * Implementation of the legacy `$resolve` service for angular 1.\n */\nconst $resolve = {\n /**\n * Asynchronously injects a resolve block.\n *\n * This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.\n *\n * ### Not bundled by default\n *\n * This API is no longer not part of the standard `@uirouter/angularjs` bundle.\n * For users of the prebuilt bundles, add the `release/resolveService.min.js` UMD bundle.\n * For bundlers (webpack, browserify, etc), add `@uirouter/angularjs/lib/legacy/resolveService`.\n *\n * ---\n *\n * Given an object `invocables`, where keys are strings and values are injectable functions,\n * injects each function, and waits for the resulting promise to resolve.\n * When all resulting promises are resolved, returns the results as an object.\n *\n * #### Example:\n * ```js\n * let invocables = {\n * foo: [ '$http', ($http) =>\n * $http.get('/api/foo').then(resp => resp.data) ],\n * bar: [ 'foo', '$http', (foo, $http) =>\n * $http.get('/api/bar/' + foo.barId).then(resp => resp.data) ]\n * }\n * $resolve.resolve(invocables)\n * .then(results => console.log(results.foo, results.bar))\n * // Logs foo and bar:\n * // { id: 123, barId: 456, fooData: 'foo data' }\n * // { id: 456, barData: 'bar data' }\n * ```\n *\n * @param invocables an object which looks like an [[StateDeclaration.resolve]] object; keys are resolve names and values are injectable functions\n * @param locals key/value pre-resolved data (locals)\n * @param parent a promise for a \"parent resolve\"\n */\n resolve: (invocables: { [key: string]: Function }, locals = {}, parent?: Promise<any>) => {\n const parentNode = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const node = new PathNode(new StateObject(<any>{ params: {}, resolvables: [] }));\n const context = new ResolveContext([parentNode, node]);\n\n context.addResolvables(resolvablesBuilder(<any>{ resolve: invocables }), node.state);\n\n const resolveData = (parentLocals: Obj) => {\n const rewrap = (_locals: Obj) => resolvablesBuilder(<any>{ resolve: mapObj(_locals, (local) => () => local) });\n context.addResolvables(rewrap(parentLocals), parentNode.state);\n context.addResolvables(rewrap(locals), node.state);\n\n const tuples2ObjR = (acc: Obj, tuple: { token: any; value: any }) => {\n acc[tuple.token] = tuple.value;\n return acc;\n };\n return context.resolvePath().then((results) => results.reduce(tuples2ObjR, {}));\n };\n\n return parent ? parent.then(resolveData) : resolveData({});\n },\n};\n\n/** @hidden */\nexport const resolveFactory = () => $resolve;\n\n// The old $resolve service\nangular.module('ui.router').factory('$resolve', <any>resolveFactory);\n"
],
"names": [
"resolveFactory",
"$resolve",

@@ -44,5 +43,6 @@ "resolve",

"reduce",
"resolveFactory",
"factory"
],
"mappings": ";;;;;;6UAoE8B,SAAjBA,IAAuB,OAAAC,EA7DpC,IAAMA,EAAW,CAqCfC,QAAS,SAACC,EAAyCC,EAAaC,gBAAbD,MACjD,IAAME,EAAa,IAAIC,WAAS,IAAIC,cAAiB,CAAEC,OAAQ,GAAIC,YAAa,MAC1EC,EAAO,IAAIJ,WAAS,IAAIC,cAAiB,CAAEC,OAAQ,GAAIC,YAAa,MACpEE,EAAU,IAAIC,iBAAe,CAACP,EAAYK,IAEhDC,EAAQE,eAAeC,qBAAwB,CAAEb,QAASC,IAAeQ,EAAKK,OAE1D,SAAdC,EAAeC,GACJ,SAATC,EAAUC,GAAiB,OAAAL,qBAAwB,CAAEb,QAASmB,SAAOD,EAAS,SAAAE,GAAS,OAAA,WAAM,OAAAA,OAI/E,SAAdC,EAAeC,EAAUC,GAE7B,OADAD,EAAIC,EAAMC,OAASD,EAAME,MAClBH,EAET,OAPAZ,EAAQE,eAAeK,EAAOD,GAAeZ,EAAWU,OACxDJ,EAAQE,eAAeK,EAAOf,GAASO,EAAKK,OAMrCJ,EAAQgB,cAAcC,KAAK,SAAAC,GAAW,OAAAA,EAAQC,OAAOR,EAAa,MAG3E,OAAOlB,EAASA,EAAOwB,KAAKZ,GAAeA,EAAY,eAQ5C,aAAae,QAAQ,WAAiBhC"
"mappings": ";;;;;;8UAOA,IAAMA,EAAW,CAqCfC,QAAS,SAACC,EAAyCC,EAAaC,gBAAbD,MACjD,IAAME,EAAa,IAAIC,WAAS,IAAIC,cAAiB,CAAEC,OAAQ,GAAIC,YAAa,MAC1EC,EAAO,IAAIJ,WAAS,IAAIC,cAAiB,CAAEC,OAAQ,GAAIC,YAAa,MACpEE,EAAU,IAAIC,iBAAe,CAACP,EAAYK,IAEhDC,EAAQE,eAAeC,qBAAwB,CAAEb,QAASC,IAAeQ,EAAKK,OAE9E,IAAMC,EAAc,SAACC,GACnB,IAAMC,EAAS,SAACC,GAAiB,OAAAL,qBAAwB,CAAEb,QAASmB,SAAOD,GAAS,SAACE,GAAU,OAAA,WAAM,OAAAA,SACrGV,EAAQE,eAAeK,EAAOD,GAAeZ,EAAWU,OACxDJ,EAAQE,eAAeK,EAAOf,GAASO,EAAKK,OAE5C,IAAMO,EAAc,SAACC,EAAUC,GAE7B,OADAD,EAAIC,EAAMC,OAASD,EAAME,MAClBH,GAET,OAAOZ,EAAQgB,cAAcC,MAAK,SAACC,GAAY,OAAAA,EAAQC,OAAOR,EAAa,QAG7E,OAAOlB,EAASA,EAAOwB,KAAKZ,GAAeA,EAAY,MAK9Ce,EAAiB,WAAM,OAAA/B,YAGrB,aAAagC,QAAQ,WAAiBD"
}
/**
* State-based routing for AngularJS 1.x
* @version v1.0.26
* @version v1.0.27
* @link https://ui-router.github.io

@@ -5,0 +5,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -10,3 +10,3 @@ {

"/** @publicapi @module ng1 */ /** */\nimport * as ng_from_import from 'angular';\n/** @hidden */ declare var angular;\n/** @hidden */ const ng_from_global = angular;\n/** @hidden */ export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;\n",
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function() {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function() {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function(error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function () {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function () {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map((e) => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function ($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
],

@@ -17,3 +17,3 @@ "names": [

],
"mappings": ";;;;;;;;;;;;IAAA;AACA,IAEA,eAAe,IAAM,cAAc,GAAG,OAAO,CAAC;IAC9C,eAAe,AAAO,IAAM,EAAE,GAAG,cAAc,IAAIA,qBAAqB,GAAG,cAAc,GAAG,cAAc,CAAC;;ICJ3G;;;;;;;;;;;;;;;;;;;;AAoBA,IAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,QAAW,iBAAgC,CAAC;IAE5C;;;;;;;;;;;;;;;;AAgBA,QAAW,kBAAiC,CAAC;IAE7C;;;;;;;;;;;;;;;;AAgBA,QAAW,mBAAkC,CAAC;IAE9C;;;;;;;;;;;;;;;;;;;;;;AAsBA,QAAW,iBAAgC,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,QAAW,cAA6B,CAAC;IAEzC,CAAC;QACS,IAAA,0BAAU,EAAE,sBAAQ,CAAa;QAEzC,SAAS,UAAU,CAAC,IAAS,EAAE,WAAkB;YAC/C,IAAI,GAAW,EAAE,KAAU,CAAC;YAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;gBAAG,oBAAG,EAAE,sBAAK,CAAgB;YAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;YACxE,IAAI,CAAC,GAAG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OAAO,GAAG,cAAM,OAAA,kBAAkB,GAAA,CAAC;YAExC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,CAAC,cAAc,CAAC,CAAC;YAChC,SAAS,IAAI,CAAC,YAA+B;gBAC3C,OAAO,GAAG,IAAI,CAAC;gBAEf,IAAI,kBAAkB,CAAC,gBAAgB,CAAC;oBAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;gBACzF,IAAI,kBAAkB,CAAC,iBAAiB;oBAAE,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,uBAAuB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;gBAEjH,OAAO;oBACL,QAAQ,EAAE,oBAAoB,CAAC,SAAS,CAAC,QAAQ;iBAClD,CAAC;aACH;SACF;QAEDA,EAAO;aACJ,MAAM,CAAC,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,CAAC;aACrD,QAAQ,CAAC,cAAc,EAAG,oBAAuD,CAAC;aAClF,GAAG,CAAC;YACH,cAAc;YACd,UAAU,YAAiB;;aAE1B;SACF,CAAC,CAAC;IACP,CAAC,GAAG;;;;;;;;;;;;;;;;"
}
/**
* State-based routing for AngularJS 1.x
* @version v1.0.26
* @version v1.0.27
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e((t=t||self)["@uirouter/angularjs-state-events"]={},t.angular)}(this,function(t,e){"use strict";var c,o,r=angular,n=e&&e.module?e:r;function s(t,e){var r,n;if(Array.isArray(e)&&(r=e[0],n=e[1]),!o(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function i(e){if(e.options().notify&&e.valid()&&!e.ignored()){var t=e.injector(),r=t.get("$stateEvents"),n=t.get("$rootScope"),o=t.get("$state"),a=t.get("$urlRouter"),s=r.provider.enabled(),i=e.params("to"),u=e.params("from");if(s.$stateChangeSuccess){if(n.$broadcast("$stateChangeStart",e.to(),i,e.from(),u,e.options(),e).defaultPrevented)return s.$stateChangeCancel&&n.$broadcast("$stateChangeCancel",e.to(),i,e.from(),u,e.options(),e),null==o.transition&&a.update(),!1;e.onSuccess({},function(){n.$broadcast("$stateChangeSuccess",e.to(),i,e.from(),u,e.options(),e)},{priority:9999})}s.$stateChangeError&&e.promise.catch(function(t){t&&(2===t.type||3===t.type)||(n.$broadcast("$stateChangeError",e.to(),i,e.from(),u,t,e.options(),e).defaultPrevented||a.update())})}}function u(t,e,r){var n=r.get("$state"),o=r.get("$rootScope"),a=r.get("$urlRouter"),s={to:t.identifier(),toParams:t.params(),options:t.options()},i=o.$broadcast("$stateNotFound",s,e.state(),e.params());function u(){return n.target(s.to,s.toParams,s.options)}return(i.defaultPrevented||i.retry)&&a.update(),!i.defaultPrevented&&(i.retry||n.get(s.to)?i.retry&&c(i.retry.then)?i.retry.then(u):u():void 0)}function d(e){d.prototype.instance=this;var r=!1,n=["$stateChangeStart","$stateNotFound","$stateChangeSuccess","$stateChangeError"],o=n.map(function(t){return[t,!0]}).reduce(s,{});function a(){if(r)throw new Error("Cannot enable events at runtime (use $stateEventsProvider")}function t(t){return r=!0,o.$stateNotFound&&e.onInvalid(u),o.$stateChangeStart&&t.onBefore({},i,{priority:1e3}),{provider:d.prototype.instance}}this.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a(),t&&t.length||(t=n),t.forEach(function(t){return o[t]=!0})},this.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a(),t&&t.length||(t=n),t.forEach(function(t){return delete o[t]})},this.enabled=function(){return o},(this.$get=t).$inject=["$transitions"]}c=n.isFunction,o=n.isString,u.$inject=["$to$","$from$","$state","$rootScope","$urlRouter"],d.$inject=["$stateProvider"],n.module("ui.router.state.events",["ui.router.state"]).provider("$stateEvents",d).run(["$stateEvents",function(t){}]),t.$stateChangeCancel=void 0,t.$stateChangeError=void 0,t.$stateChangeStart=void 0,t.$stateChangeSuccess=void 0,t.$stateNotFound=void 0,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e((t=t||self)["@uirouter/angularjs-state-events"]={},t.angular)}(this,(function(t,e){"use strict";var r=angular,n=e&&e.module?e:r;!function(){var t=n.isFunction,e=n.isString;function r(t,r){var n,o;if(Array.isArray(r)&&(n=r[0],o=r[1]),!e(n))throw new Error("invalid parameters to applyPairs");return t[n]=o,t}function o(t){if(t.options().notify&&t.valid()&&!t.ignored()){var e=t.injector(),r=e.get("$stateEvents"),n=e.get("$rootScope"),o=e.get("$state"),a=e.get("$urlRouter"),s=r.provider.enabled(),i=t.params("to"),u=t.params("from");if(s.$stateChangeSuccess){if(n.$broadcast("$stateChangeStart",t.to(),i,t.from(),u,t.options(),t).defaultPrevented)return s.$stateChangeCancel&&n.$broadcast("$stateChangeCancel",t.to(),i,t.from(),u,t.options(),t),null==o.transition&&a.update(),!1;t.onSuccess({},(function(){n.$broadcast("$stateChangeSuccess",t.to(),i,t.from(),u,t.options(),t)}),{priority:9999})}s.$stateChangeError&&t.promise.catch((function(e){(!e||2!==e.type&&3!==e.type)&&(n.$broadcast("$stateChangeError",t.to(),i,t.from(),u,e,t.options(),t).defaultPrevented||a.update())}))}}function a(e,r,n){var o=n.get("$state"),a=n.get("$rootScope"),s=n.get("$urlRouter"),i={to:e.identifier(),toParams:e.params(),options:e.options()},u=a.$broadcast("$stateNotFound",i,r.state(),r.params());function c(){return o.target(i.to,i.toParams,i.options)}return(u.defaultPrevented||u.retry)&&s.update(),!u.defaultPrevented&&(u.retry||o.get(i.to)?u.retry&&t(u.retry.then)?u.retry.then(c):c():void 0)}function s(t){s.prototype.instance=this;var e=!1,n=["$stateChangeStart","$stateNotFound","$stateChangeSuccess","$stateChangeError"],i=n.map((function(t){return[t,!0]})).reduce(r,{});function u(){if(e)throw new Error("Cannot enable events at runtime (use $stateEventsProvider")}function c(r){return e=!0,i.$stateNotFound&&t.onInvalid(a),i.$stateChangeStart&&r.onBefore({},o,{priority:1e3}),{provider:s.prototype.instance}}this.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];u(),t&&t.length||(t=n),t.forEach((function(t){return i[t]=!0}))},this.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];u(),t&&t.length||(t=n),t.forEach((function(t){return delete i[t]}))},this.enabled=function(){return i},this.$get=c,c.$inject=["$transitions"]}a.$inject=["$to$","$from$","$state","$rootScope","$urlRouter"],s.$inject=["$stateProvider"],n.module("ui.router.state.events",["ui.router.state"]).provider("$stateEvents",s).run(["$stateEvents",function(t){}])}(),t.$stateChangeCancel=void 0,t.$stateChangeError=void 0,t.$stateChangeStart=void 0,t.$stateChangeSuccess=void 0,t.$stateNotFound=void 0,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=stateEvents.min.js.map

@@ -10,7 +10,5 @@ {

"/** @publicapi @module ng1 */ /** */\nimport * as ng_from_import from 'angular';\n/** @hidden */ declare var angular;\n/** @hidden */ const ng_from_global = angular;\n/** @hidden */ export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;\n",
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function() {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function() {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function(error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map(e => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function(...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach(event => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
"/**\n * # Legacy state events\n *\n * Polyfill implementation of the UI-Router 0.2.x state events.\n *\n * The 0.2.x state events are deprecated. We recommend moving to Transition Hooks instead, as they\n * provide much more flexibility, support async, and provide the context (the Transition, etc) necessary\n * to implement meaningful application behaviors.\n *\n * To enable these state events, include the `stateEvents.js` file in your project, e.g.,\n * ```\n * <script src=\"stateEvents.js\"></script>\n * ```\n * and also make sure you depend on the `ui.router.state.events` angular module, e.g.,\n * ```\n * angular.module(\"myApplication\", ['ui.router', 'ui.router.state.events']\n * ```\n *\n * @publicapi @module ng1_state_events\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';\nimport {\n Obj,\n TargetState,\n StateService,\n Transition,\n TransitionService,\n UrlRouter,\n HookResult,\n UIInjector,\n} from '@uirouter/core';\nimport { StateProvider } from '../stateProvider';\n\n/**\n * An event broadcast on `$rootScope` when the state transition **begins**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * You can use `event.preventDefault()`\n * to prevent the transition from happening and then the transition promise will be\n * rejected with a `'transition prevented'` value.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]]\n *\n * #### Example:\n * ```js\n * $rootScope.$on('$stateChangeStart', function(event, transition) {\n * event.preventDefault();\n * // transitionTo() promise will be rejected with\n * // a 'transition prevented' error\n * })\n * ```\n *\n * @event $stateChangeStart\n * @deprecated\n */\nexport let $stateChangeStart: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` if a transition is **cancelled**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] instead\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that was cancelled\n *\n * @event $stateChangeCancel\n * @deprecated\n */\nexport let $stateChangeCancel: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` once the state transition is **complete**.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onSuccess]]\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that just succeeded\n *\n * @event $stateChangeSuccess\n * @deprecated\n */\nexport let $stateChangeSuccess: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when an **error occurs** during transition.\n *\n * ### Deprecation warning: use [[TransitionService.onStart]] and [[Transition.promise]], or [[Transition.onError]]\n *\n * It's important to note that if you\n * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n * they will not throw traditionally. You must listen for this $stateChangeError event to\n * catch **ALL** errors.\n *\n * Additional arguments to the event handler are provided:\n * - `toState`: the Transition Target state\n * - `toParams`: the Transition Target Params\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `error`: The reason the transition errored.\n * - `options`: any Transition Options\n * - `$transition$`: the [[Transition]] that errored\n *\n * @event $stateChangeError\n * @deprecated\n */\nexport let $stateChangeError: IAngularEvent;\n\n/**\n * An event broadcast on `$rootScope` when a requested state **cannot be found** using the provided state name.\n *\n * ### Deprecation warning: use [[StateService.onInvalid]] instead\n *\n * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n * lazy-loading the unfound state). A `TargetState` object is passed to the listener handler,\n * you can see its properties in the example. You can use `event.preventDefault()` to abort the\n * transition and the promise returned from `transitionTo()` will be rejected with a\n * `'transition aborted'` error.\n *\n * Additional arguments to the event handler are provided:\n * - `unfoundState` Unfound State information. Contains: `to, toParams, options` properties.\n * - `fromState`: the state the transition is coming from\n * - `fromParams`: the parameters from the state the transition is coming from\n * - `options`: any Transition Options\n *\n * #### Example:\n * ```js\n * // somewhere, assume lazy.state has not been defined\n * $state.go(\"lazy.state\", { a: 1, b: 2 }, { inherit: false });\n *\n * // somewhere else\n * $scope.$on('$stateNotFound', function(event, transition) {\n * function(event, unfoundState, fromState, fromParams){\n * console.log(unfoundState.to); // \"lazy.state\"\n * console.log(unfoundState.toParams); // {a:1, b:2}\n * console.log(unfoundState.options); // {inherit:false} + default options\n * });\n * ```\n *\n * @event $stateNotFound\n * @deprecated\n */\nexport let $stateNotFound: IAngularEvent;\n\n(function () {\n const { isFunction, isString } = angular;\n\n function applyPairs(memo: Obj, keyValTuple: any[]) {\n let key: string, value: any;\n if (Array.isArray(keyValTuple)) [key, value] = keyValTuple;\n if (!isString(key)) throw new Error('invalid parameters to applyPairs');\n memo[key] = value;\n return memo;\n }\n\n function stateChangeStartHandler($transition$: Transition) {\n if (!$transition$.options().notify || !$transition$.valid() || $transition$.ignored()) return;\n\n const $injector = $transition$.injector();\n const $stateEvents = $injector.get('$stateEvents');\n const $rootScope = $injector.get('$rootScope');\n const $state = $injector.get('$state');\n const $urlRouter = $injector.get('$urlRouter');\n\n const enabledEvents = $stateEvents.provider.enabled();\n\n const toParams = $transition$.params('to');\n const fromParams = $transition$.params('from');\n\n if (enabledEvents.$stateChangeSuccess) {\n const startEvent = $rootScope.$broadcast(\n '$stateChangeStart',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n\n if (startEvent.defaultPrevented) {\n if (enabledEvents.$stateChangeCancel) {\n $rootScope.$broadcast(\n '$stateChangeCancel',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n }\n // Don't update and resync url if there's been a new transition started. see issue #2238, #600\n if ($state.transition == null) $urlRouter.update();\n return false;\n }\n\n // right after global state is updated\n const successOpts = { priority: 9999 };\n $transition$.onSuccess(\n {},\n function () {\n $rootScope.$broadcast(\n '$stateChangeSuccess',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n $transition$.options(),\n $transition$\n );\n },\n successOpts\n );\n }\n\n if (enabledEvents.$stateChangeError) {\n $transition$.promise['catch'](function (error) {\n if (error && (error.type === 2 /* RejectType.SUPERSEDED */ || error.type === 3) /* RejectType.ABORTED */)\n return;\n\n const evt = $rootScope.$broadcast(\n '$stateChangeError',\n $transition$.to(),\n toParams,\n $transition$.from(),\n fromParams,\n error,\n $transition$.options(),\n $transition$\n );\n\n if (!evt.defaultPrevented) {\n $urlRouter.update();\n }\n });\n }\n }\n\n stateNotFoundHandler.$inject = ['$to$', '$from$', '$state', '$rootScope', '$urlRouter'];\n function stateNotFoundHandler($to$: TargetState, $from$: TargetState, injector: UIInjector): HookResult {\n const $state: StateService = injector.get('$state');\n const $rootScope: IScope = injector.get('$rootScope');\n const $urlRouter: UrlRouter = injector.get('$urlRouter');\n\n interface StateNotFoundEvent extends IAngularEvent {\n retry: Promise<any>;\n }\n\n const redirect = { to: $to$.identifier(), toParams: $to$.params(), options: $to$.options() };\n const e = <StateNotFoundEvent>$rootScope.$broadcast('$stateNotFound', redirect, $from$.state(), $from$.params());\n\n if (e.defaultPrevented || e.retry) $urlRouter.update();\n\n function redirectFn(): TargetState {\n return $state.target(redirect.to, redirect.toParams, redirect.options);\n }\n\n if (e.defaultPrevented) {\n return false;\n } else if (e.retry || !!$state.get(redirect.to)) {\n return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();\n }\n }\n\n $StateEventsProvider.$inject = ['$stateProvider'];\n function $StateEventsProvider($stateProvider: StateProvider) {\n $StateEventsProvider.prototype.instance = this;\n\n interface IEventsToggle {\n [key: string]: boolean;\n $stateChangeStart: boolean;\n $stateNotFound: boolean;\n $stateChangeSuccess: boolean;\n $stateChangeError: boolean;\n }\n\n let runtime = false;\n const allEvents = ['$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError'];\n const enabledStateEvents = <IEventsToggle>allEvents.map((e) => [e, true]).reduce(applyPairs, {});\n\n function assertNotRuntime() {\n if (runtime) throw new Error('Cannot enable events at runtime (use $stateEventsProvider');\n }\n\n /**\n * Enables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.enable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => (enabledStateEvents[event] = true));\n };\n\n /**\n * Disables the deprecated UI-Router 0.2.x State Events\n * [ '$stateChangeStart', '$stateNotFound', '$stateChangeSuccess', '$stateChangeError' ]\n */\n this.disable = function (...events: string[]) {\n assertNotRuntime();\n if (!events || !events.length) events = allEvents;\n events.forEach((event) => delete enabledStateEvents[event]);\n };\n\n this.enabled = () => enabledStateEvents;\n\n this.$get = $get;\n $get.$inject = ['$transitions'];\n function $get($transitions: TransitionService) {\n runtime = true;\n\n if (enabledStateEvents['$stateNotFound']) $stateProvider.onInvalid(stateNotFoundHandler);\n if (enabledStateEvents.$stateChangeStart) $transitions.onBefore({}, stateChangeStartHandler, { priority: 1000 });\n\n return {\n provider: $StateEventsProvider.prototype.instance,\n };\n }\n }\n\n angular\n .module('ui.router.state.events', ['ui.router.state'])\n .provider('$stateEvents', ($StateEventsProvider as any) as IServiceProviderFactory)\n .run([\n '$stateEvents',\n function ($stateEvents: any) {\n /* Invokes $get() */\n },\n ]);\n})();\n"
],
"names": [
"isFunction",
"isString",
"ng_from_global",

@@ -21,2 +19,4 @@ "angular",

"ng_from_import.module",
"isFunction",
"isString",
"applyPairs",

@@ -99,5 +99,6 @@ "memo",

"module",
"run"
"run",
"$stateNotFound"
],
"mappings": ";;;;;;yQAGe,IC+JLA,EAAYC,ED/JDC,EAAiBC,QACVC,EAAKC,GAAkBC,SAAwBD,EAAiBH,ECgK1F,SAASK,EAAWC,EAAWC,GAC7B,IAAIC,EAAaC,EAEjB,GADIC,MAAMC,QAAQJ,KAAeC,OAAKC,SACjCV,EAASS,GAAM,MAAM,IAAII,MAAM,oCAEpC,OADAN,EAAKE,GAAOC,EACLH,EAGT,SAASO,EAAwBC,GAC/B,GAAKA,EAAaC,UAAUC,QAAWF,EAAaG,UAAWH,EAAaI,UAA5E,CAEA,IAAMC,EAAYL,EAAaM,WACzBC,EAAeF,EAAUG,IAAI,gBAC7BC,EAAaJ,EAAUG,IAAI,cAC3BE,EAASL,EAAUG,IAAI,UACvBG,EAAaN,EAAUG,IAAI,cAE3BI,EAAgBL,EAAaM,SAASC,UAEtCC,EAAWf,EAAagB,OAAO,MAC/BC,EAAajB,EAAagB,OAAO,QAEvC,GAAIJ,EAAcM,oBAAqB,CAWrC,GAVmBT,EAAWU,WAC5B,oBACAnB,EAAaoB,KACbL,EACAf,EAAaqB,OACbJ,EACAjB,EAAaC,UACbD,GAGasB,iBAcb,OAbIV,EAAcW,oBAChBd,EAAWU,WACT,qBACAnB,EAAaoB,KACbL,EACAf,EAAaqB,OACbJ,EACAjB,EAAaC,UACbD,GAIqB,MAArBU,EAAOc,YAAoBb,EAAWc,UACnC,EAKTzB,EAAa0B,UACX,GACA,WACEjB,EAAWU,WACT,sBACAnB,EAAaoB,KACbL,EACAf,EAAaqB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AMT,SAASI,EAAqBC,GAC5BD,EAAqBE,UAAUC,SAAWC,KAU1C,IAAIC,GAAU,EACRC,EAAY,CAAC,oBAAqB,iBAAkB,sBAAuB,qBAC3EC,EAAoCD,EAAUE,KAAI,SAACd,GAAM,MAAA,CAACA,GAAG,MAAOe,OAAO7D,EAAY,IAE7F,SAAS8D,IACP,GAAIL,EAAS,MAAM,IAAIlD,MAAM,6DA2B/B,SAASwD,EAAKC,GAMZ,OALAP,GAAU,EAENE,EAAmC,gBAAGN,EAAeY,UAAUxB,GAC/DkB,EAAmBO,mBAAmBF,EAAaG,SAAS,GAAI3D,EAAyB,CAAE4B,SAAU,MAElG,CACLd,SAAU8B,EAAqBE,UAAUC,UA3B7CC,KAAKY,OAAS,eAAU,aAAAC,mBAAAA,IAAAC,kBACtBR,IACKQ,GAAWA,EAAOC,SAAQD,EAASZ,GACxCY,EAAOE,SAAQ,SAACC,GAAU,OAACd,EAAmBc,IAAS,MAOzDjB,KAAKkB,QAAU,eAAU,aAAAL,mBAAAA,IAAAC,kBACvBR,IACKQ,GAAWA,EAAOC,SAAQD,EAASZ,GACxCY,EAAOE,SAAQ,SAACC,GAAU,cAAOd,EAAmBc,OAGtDjB,KAAKjC,QAAU,WAAM,OAAAoC,GAErBH,KAAKO,KAAOA,EACZA,EAAKY,QAAU,CAAC,gBArElBlC,EAAqBkC,QAAU,CAAC,OAAQ,SAAU,SAAU,aAAc,cA0B1EvB,EAAqBuB,QAAU,CAAC,kBAwDhCjF,EACGkF,OAAO,yBAA0B,CAAC,oBAClCtD,SAAS,eAAiB8B,GAC1ByB,IAAI,CACH,eACA,SAAU7D,OAtLhB,6BAhFWgB,2BA0CAK,2BA5DA6B,6BAoCAvC,wBA4DAmD"
}
/**
* State-based routing for AngularJS 1.x
* This bundle requires the ui-router-core.js bundle from the @uirouter/core package.
* @version v1.0.26
* @version v1.0.27
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(t,e,x){"use strict";var r=angular,C=e&&e.module?e:r;function n(){var r=null;return function(e,t){return r=r||x.services.$injector.get("$templateFactory"),[new R(e,t,r)]}}var u=function(e,r){return e.reduce(function(e,t){return e||x.isDefined(r[t])},!1)};function i(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(x.isDefined(n.views)&&u(e,n))throw new Error("State '"+n.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+e.filter(function(e){return x.isDefined(n[e])}).join(", "));var a={},t=n.views||{$default:x.pick(n,e)};return x.forEach(t,function(e,t){if(t=t||"$default",x.isString(e)&&(e={component:e}),e=x.extend({},e),u(i,e)&&u(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+n.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=n,e.$name=t;var r=x.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=r.uiViewName,e.$uiViewContextAnchor=r.uiViewContextAnchor,a[t]=e}),a}var o=0,R=(a.prototype.load=function(){var t=this,e=x.services.$q,r=new x.ResolveContext(this.path),n=this.path.reduce(function(e,t){return x.extend(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return x.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,x.extend(t,e.template),t})},a.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!x.isInjectable(t))return this.viewDecl.controller;var r=x.services.$injector.annotate(t),n=x.isArray(t)?x.tail(t):t;return new x.Resolvable("",n,r).get(e)},a);function a(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=o++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}var c=(s.prototype.useHttpService=function(e){this._useHttp=e},s.prototype.fromConfig=function(e,t,r){function n(e){return x.services.$q.when(e).then(function(e){return{template:e}})}function i(e){return x.services.$q.when(e).then(function(e){return{component:e}})}return x.isDefined(e.template)?n(this.fromString(e.template,t)):x.isDefined(e.templateUrl)?n(this.fromUrl(e.templateUrl,t)):x.isDefined(e.templateProvider)?n(this.fromProvider(e.templateProvider,t,r)):x.isDefined(e.component)?i(e.component):x.isDefined(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,r)):n("<ui-view></ui-view>")},s.prototype.fromString=function(e,t){return x.isFunction(e)?e(t):e},s.prototype.fromUrl=function(e,t){return x.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},s.prototype.fromProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.fromComponentProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.makeComponentTemplate=function(c,s,e,l){function f(e){var t=x.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t}l=l||{};var v=3<=C.version.minor?"::":"",t=function(e){var t=x.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(p).reduce(x.unnestR,[])}(e).map(function(e){var t=e.name,r=e.type,n=f(t);if(c.attr(n)&&!l[t])return n+"='"+c.attr(n)+"'";var i=l[t]||t;if("@"===r)return n+"='{{"+v+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+v+"$resolve."+i+"'";var o=s.getResolvable(i),a=o&&o.data,u=a&&x.services.$injector.annotate(a)||[];return n+"='$resolve."+i+(x.isArray(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=f(e);return"<"+r+" "+t+"></"+r+">"},s);function s(){var n=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=e,n.$templateCache=t,n}]}var p=function(e){return x.isObject(e.bindToController)?l(e.bindToController):l(e.scope)},l=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return x.isDefined(e)&&x.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},f=(v.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},v.prototype.state=function(e,t){return x.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},v.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},v);function v(e,t){this.stateRegistry=e,this.stateService=t,x.createProxyFunctions(x.val(v.prototype),this,x.val(this))}function $(r){return function(e,t){var i=e[r],o="onExit"===r?"from":"to";return i?function(e,t){var r=new x.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),n=x.extend(U(r),{$state$:t,$transition$:e});return x.services.$injector.invoke(i,this,n)}:void 0}}var d=(h.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},h.prototype.dispose=function(){},h.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return x.removeFrom(t._urlListeners)(e)}},h.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=x.isObject(e)?e.enabled:e)&&this.$sniffer.history},h.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},h.prototype.url=function(e,t,r){return void 0===t&&(t=!1),x.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},h.prototype._runtimeServices=function(e,t,r,n,i){var o=this;this.$location=t,this.$sniffer=r,this.$browser=n,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=x.val(t);x.createProxyFunctions(a,this,a,["replace","path","search","hash"]),x.createProxyFunctions(a,this,a,["port","protocol","host"])},h);function h(e){this._urlListeners=[],this.$locationProvider=e;var t=x.val(e);x.createProxyFunctions(t,this,t,["hashPrefix"])}var m=(g.injectableHandler=function(t,r){return function(e){return x.services.$injector.invoke(r,null,{$match:e,$stateParams:t.globals.params})}},g.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},g.prototype.rule=function(e){var t=this;if(!x.isFunction(e))throw new Error("'rule' must be a function");var r=new x.BaseUrlRule(function(){return e(x.services.$injector,t.router.locationService)},x.identity);return this.router.urlService.rules.rule(r),this},g.prototype.otherwise=function(e){var t=this,r=this.router.urlService.rules;if(x.isString(e))r.otherwise(e);else{if(!x.isFunction(e))throw new Error("'rule' must be a string or function");r.otherwise(function(){return e(x.services.$injector,t.router.locationService)})}return this},g.prototype.when=function(e,t){return(x.isArray(t)||x.isFunction(t))&&(t=g.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},g.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},g);function g(e){this.router=e}C.module("ui.router.angular1",[]);var w=C.module("ui.router.init",["ng"]),y=C.module("ui.router.util",["ui.router.init"]),S=C.module("ui.router.router",["ui.router.util"]),b=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),P=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),j=(C.module("ui.router.compat",["ui.router"]),null);function A(e){(j=this.router=new x.UIRouter).stateProvider=new f(j.stateRegistry,j.stateService),j.stateRegistry.decorator("views",i),j.stateRegistry.decorator("onExit",$("onExit")),j.stateRegistry.decorator("onRetain",$("onRetain")),j.stateRegistry.decorator("onEnter",$("onEnter")),j.viewService._pluginapi._viewConfigFactory("ng1",n());var u=j.locationService=j.locationConfig=new d(e);function t(e,t,r,n,i,o,a){return u._runtimeServices(i,e,n,t,r),delete j.router,delete j.$get,j}return d.monkeyPatchPathParameterType(j),((j.router=j).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],j}A.$inject=["$locationProvider"];function E(r){return["$uiRouterProvider",function(e){var t=e.router[r];return t.$get=function(){return t},t}]}function V(t,e,r){if(x.services.$injector=t,x.services.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}r.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(x.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}V.$inject=["$injector","$q","$uiRouter"];function D(e){e.$watch(function(){x.trace.approximateDigests++})}D.$inject=["$rootScope"],w.provider("$uiRouter",A),S.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new m(e)}]),y.provider("$urlService",E("urlService")),y.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return j.urlMatcherFactory}]),y.provider("$templateFactory",function(){return new c}),b.provider("$stateRegistry",E("stateRegistry")),b.provider("$uiRouterGlobals",E("globals")),b.provider("$transitions",E("transitionService")),b.provider("$state",["$uiRouterProvider",function(){return x.extend(j.stateProvider,{$get:function(){return j.stateService}})}]),b.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),P.factory("$view",function(){return j.viewService}),P.service("$trace",function(){return x.trace}),P.run(D),y.run(["$urlMatcherFactory",function(e){}]),b.run(["$state",function(e){}]),S.run(["$urlRouter",function(e){}]),w.run(V);var F,O,q,I,U=function(r){return r.getTokens().filter(x.isString).map(function(e){var t=r.getResolvable(e);return[e,"NOWAIT"===r.getPolicy(t).async?t.promise:t.data]}).reduce(x.applyPairs,{})};function k(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function _(e){var t=e.parent().inheritedData("$uiView"),r=x.parse("$cfg.path")(t);return r?x.tail(r).state.name:void 0}function L(e,t,r){var n=r.uiState||e.current.name,i=x.extend(function(e,t){return{relative:_(e)||t.$current,inherit:!0,source:"sref"}}(t,e),r.uiStateOpts||{}),o=e.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function T(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function H(o,a,u,c,s){return function(e){var t=e.which||e.button,r=s();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||o.attr("target"))){var n=u(function(){o.attr("disabled")||a.go(r.uiState,r.uiStateParams,r.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!r.href?1:0;e.preventDefault=function(){i--<=0&&u.cancel(n)}}}}function M(i,e,o,t){var a;t&&(a=t.events),x.isArray(a)||(a=["click"]);for(var r=i.on?"on":"bind",n=0,u=a;n<u.length;n++){var c=u[n];i[r](c,o)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,r=a;t<r.length;t++){var n=r[t];i[e](n,o)}})}function N(n){function e(e,t,r){return n.is(e,t,r)}return e.$stateful=!0,e}function B(n){function e(e,t,r){return n.includes(e,t,r)}return e.$stateful=!0,e}function K(d,h,m,e,g,t){var w=x.parse("viewDecl.controllerAs"),y=x.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var $=e.html();return e.empty(),function(t,r){var e=r.data("$uiView");if(!e)return r.html($),void d(r.contents())(t);var n=e.$cfg||{viewDecl:{},getTemplate:x.noop},i=n.path&&new x.ResolveContext(n.path);r.html(n.getTemplate(r,i)||$),x.trace.traceUIViewFill(e.$uiView,r.html());var o=d(r.contents()),a=n.controller,u=w(n),c=y(n),s=i&&U(i);if(t[c]=s,a){var l=h(a,x.extend({},s,{$scope:t,$element:r}));u&&(t[u]=l,t[u][c]=s),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l),W(g,m,l,t,n)}if(x.isString(n.component))var f=x.kebobString(n.component),v=new RegExp("^(x-|data-)?"+f+"$","i"),p=t.$watch(function(){var e=[].slice.call(r[0].children).filter(function(e){return e&&e.tagName&&v.exec(e.tagName)});return e&&C.element(e).data("$"+n.component+"Controller")},function(e){e&&(W(g,m,e,t,n),p())});o(t)}}}}F=["$uiRouter","$timeout",function(v,p){var $=v.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,r,n){function i(){return L($,t,s)}var o,a=T(t),u=n[1]||n[0],c=null,s={},l=k(r.uiSref);function f(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(a.attr,e.href)}s.uiState=l.state,s.uiStateOpts=r.uiSrefOpts?e.$eval(r.uiSrefOpts):{},l.paramExpr&&(e.$watch(l.paramExpr,function(e){s.uiStateParams=x.extend({},e),f()},!0),s.uiStateParams=x.extend({},e.$eval(l.paramExpr))),f(),e.$on("$destroy",v.stateRegistry.onStatesChanged(f)),e.$on("$destroy",v.transitionService.onSuccess({},f)),a.clickable&&(o=H(t,$,p,a,i),M(t,e,o,s.uiStateOpts))}}}],O=["$uiRouter","$timeout",function(p,$){var d=p.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,e,n,t){function i(){return L(d,e,s)}var o,a=T(e),u=t[1]||t[0],c=null,s={},l=["uiState","uiStateParams","uiStateOpts"],f=l.reduce(function(e,t){return e[t]=x.noop,e},{});function v(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(a.attr,e.href)}l.forEach(function(t){s[t]=n[t]?r.$eval(n[t]):null,n.$observe(t,function(e){f[t](),f[t]=r.$watch(e,function(e){s[t]=e,v()},!0)})}),v(),r.$on("$destroy",p.stateRegistry.onStatesChanged(v)),r.$on("$destroy",p.transitionService.onSuccess({},v)),a.clickable&&(o=H(e,d,$,a,i),M(e,r,o,s.uiStateOpts))}}}],q=["$state","$stateParams","$interpolate","$uiRouter",function($,e,d,h){return{restrict:"A",controller:["$scope","$element","$attrs",function(u,c,e){var s,n,t,r,i,l=[];s=d(e.uiSrefActiveEq||"",!1)(u);try{n=u.$eval(e.uiSrefActive)}catch(e){}function o(e){e.promise.then(p,x.noop)}function a(){f(n)}function f(e){x.isObject(e)&&(l=[],x.forEach(e,function(e,t){function r(e,t){var r=k(e);v(r.state,u.$eval(r.paramExpr),t)}x.isString(e)?r(e,t):x.isArray(e)&&x.forEach(e,function(e){r(e,t)})}))}function v(e,t,r){var n={state:$.get(e,_(c))||{name:e},params:t,activeClass:r};return l.push(n),function(){x.removeFrom(l)(n)}}function p(){function t(e){return e.split(/\s/).filter(x.identity)}function e(e){return e.map(function(e){return e.activeClass}).map(t).reduce(x.unnestR,[])}var r=e(l).concat(t(s)).reduce(x.uniqR,[]),n=e(l.filter(function(e){return $.includes(e.state.name,e.params)})),i=!!l.filter(function(e){return $.is(e.state.name,e.params)}).length?t(s):[],o=n.concat(i).reduce(x.uniqR,[]),a=r.filter(function(e){return!x.inArray(o,e)});u.$evalAsync(function(){o.forEach(function(e){return c.addClass(e)}),a.forEach(function(e){return c.removeClass(e)})})}f(n=n||d(e.uiSrefActive||"",!1)(u)),this.$$addStateInfo=function(e,t){if(!(x.isObject(n)&&0<l.length)){var r=v(e,t,n);return p(),r}},u.$on("$destroy",(t=h.stateRegistry.onStatesChanged(a),r=h.transitionService.onStart({},o),i=u.$on("$stateChangeSuccess",p),function(){t(),r(),i()})),h.globals.transition&&o(h.globals.transition),p()}]}}],C.module("ui.router.state").directive("uiSref",F).directive("uiSrefActive",q).directive("uiSrefActiveEq",q).directive("uiState",O),N.$inject=["$state"],B.$inject=["$state"],C.module("ui.router.state").filter("isState",N).filter("includedByState",B),I=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,o,g,w,y){var S={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},b={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,m){return function(a,u,e){var c,s,l,f,t,v=e.onload||"",p=e.autoscroll,$={enter:function(e,t,r){2<C.version.minor?o.enter(e,null,t).then(r):o.enter(e,null,t,r)},leave:function(e,t){2<C.version.minor?o.leave(e).then(t):o.leave(e,t)}},r=u.inheritedData("$uiView")||S,d=w(e.uiView||e.name||"")(a)||"$default",h={$type:"ng1",id:b.count++,name:d,fqn:r.$uiView.fqn?r.$uiView.fqn+"."+d:d,config:null,configUpdated:function(e){if(e&&!(e instanceof R))return;if(function(e,t){return e===t}(f,e))return;x.trace.traceUIViewConfigUpdated(h,e&&e.viewDecl&&e.viewDecl.$context),n(f=e)},get creationContext(){var e=x.parse("$cfg.viewDecl.$context")(r),t=x.parse("$uiView.creationContext")(r);return e||t}};function n(e){var t=a.$new(),r=y.defer(),n=y.defer(),i={$cfg:e,$uiView:h},o={$animEnter:r.promise,$animLeave:n.promise,$$animLeave:n};t.$emit("$viewContentLoading",d),s=m(t,function(e){e.data("$uiViewAnim",o),e.data("$uiView",i),$.enter(e,u,function(){r.resolve(),l&&l.$emit("$viewContentAnimationEnded"),(x.isDefined(p)&&!p||a.$eval(p))&&g(e)}),function(){if(c&&(x.trace.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),l&&(x.trace.traceUIViewEvent("Destroying scope",h),l.$destroy(),l=null),s){var e=s.data("$uiViewAnim");x.trace.traceUIViewEvent("Animate out",e),$.leave(s,function(){e.$$animLeave.resolve(),c=null}),c=s,s=null}}()}),(l=t).$emit("$viewContentLoaded",e||f),l.$eval(v)}x.trace.traceUIViewEvent("Linking",h),u.data("$uiView",{$uiView:h}),n(),t=i.registerUIView(h),a.$on("$destroy",function(){x.trace.traceUIViewEvent("Destroying/Unregistering",h),t()})}}};return b}],K.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var G="function"==typeof C.module("ui.router").component,z=0;function W(n,e,s,t,r){!x.isFunction(s.$onInit)||(r.viewDecl.component||r.viewDecl.componentProvider)&&G||s.$onInit();var l=x.tail(r.path).state.self,i={bind:s};if(x.isFunction(s.uiOnParamsChanged)){var f=new x.ResolveContext(r.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(l)){var r=e.params("to"),n=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(x.unnestR,[]),o=e.treeChanges("from").map(t).reduce(x.unnestR,[]),a=i.filter(function(e){var t=o.indexOf(e);return-1===t||!o[t].type.equals(r[e.id],n[e.id])});if(a.length){var u=a.map(function(e){return e.id}),c=x.filter(r,function(e,t){return-1!==u.indexOf(t)});s.uiOnParamsChanged(c,e)}}},i))}if(x.isFunction(s.uiCanExit)){var o=z++,a="_uiCanExitIds",u=function(e){return!!e&&(e[a]&&!0===e[a][o]||u(e.redirectedFrom()))},c={exiting:l.name};t.$on("$destroy",e.onBefore(c,function(e){var t,r=e[a]=e[a]||{};return u(e)||(t=n.when(s.uiCanExit(e))).then(function(e){return r[o]=!1!==e}),t},i))}}C.module("ui.router.state").directive("uiView",I),C.module("ui.router.state").directive("uiView",K),C.module("ui.router.state").provider("$uiViewScroll",function(){var r=!1;this.useAnchorScroll=function(){r=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return r?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});Object.keys(x).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}})}),t.core=x,t.Ng1ViewConfig=R,t.StateProvider=f,t.UrlRouterProvider=m,t.default="ui.router",t.getLocals=U,t.getNg1ViewConfigFactory=n,t.ng1ViewsBuilder=i,t.watchDigests=D,Object.defineProperty(t,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,(function(e,t,r){"use strict";var n=angular,i=t&&t.module?t:n;function o(){var e=null;return function(t,n){return e=e||r.services.$injector.get("$templateFactory"),[new s(t,n,e)]}}var a=function(e,t){return e.reduce((function(e,n){return e||r.isDefined(t[n])}),!1)};function u(e){if(!e.parent)return{};var t=["component","bindings","componentProvider"],n=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),i=t.concat(n);if(r.isDefined(e.views)&&a(i,e))throw new Error("State '"+e.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+i.filter((function(t){return r.isDefined(e[t])})).join(", "));var o={},u=e.views||{$default:r.pick(e,i)};return r.forEach(u,(function(i,u){if(u=u||"$default",r.isString(i)&&(i={component:i}),i=r.extend({},i),a(t,i)&&a(n,i))throw new Error("Cannot combine: "+t.join("|")+" with: "+n.join("|")+" in stateview: '"+u+"@"+e.name+"'");i.resolveAs=i.resolveAs||"$resolve",i.$type="ng1",i.$context=e,i.$name=u;var c=r.ViewService.normalizeUIViewTarget(i.$context,i.$name);i.$uiViewName=c.uiViewName,i.$uiViewContextAnchor=c.uiViewContextAnchor,o[u]=i})),o}var c=0,s=function(){function e(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=c++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}return e.prototype.load=function(){var e=this,t=r.services.$q,n=new r.ResolveContext(this.path),i=this.path.reduce((function(e,t){return r.extend(e,t.paramValues)}),{}),o={template:t.when(this.factory.fromConfig(this.viewDecl,i,n)),controller:t.when(this.getController(n))};return t.all(o).then((function(t){return r.trace.traceViewServiceEvent("Loaded",e),e.controller=t.controller,r.extend(e,t.template),e}))},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!r.isInjectable(t))return this.viewDecl.controller;var n=r.services.$injector.annotate(t),i=r.isArray(t)?r.tail(t):t;return new r.Resolvable("",i,n).get(e)},e}(),l=function(){function e(){var e=this;this._useHttp=i.version.minor<3,this.$get=["$http","$templateCache","$injector",function(t,r,n){return e.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),e.$http=t,e.$templateCache=r,e}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,n){var i=function(e){return r.services.$q.when(e).then((function(e){return{template:e}}))},o=function(e){return r.services.$q.when(e).then((function(e){return{component:e}}))};return r.isDefined(e.template)?i(this.fromString(e.template,t)):r.isDefined(e.templateUrl)?i(this.fromUrl(e.templateUrl,t)):r.isDefined(e.templateProvider)?i(this.fromProvider(e.templateProvider,t,n)):r.isDefined(e.component)?o(e.component):r.isDefined(e.componentProvider)?o(this.fromComponentProvider(e.componentProvider,t,n)):i("<ui-view></ui-view>")},e.prototype.fromString=function(e,t){return r.isFunction(e)?e(t):e},e.prototype.fromUrl=function(e,t){return r.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then((function(e){return e.data})):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var i=r.services.$injector.annotate(e),o=r.isArray(e)?r.tail(e):e;return new r.Resolvable("",o,i).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var i=r.services.$injector.annotate(e),o=r.isArray(e)?r.tail(e):e;return new r.Resolvable("",o,i).get(n)},e.prototype.makeComponentTemplate=function(e,t,n,o){o=o||{};var a=i.version.minor>=3?"::":"",u=function(e){var t=r.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t},c=function(e){var t=r.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(f).reduce(r.unnestR,[])}(n).map((function(n){var i=n.name,c=n.type,s=u(i);if(e.attr(s)&&!o[i])return s+"='"+e.attr(s)+"'";var l=o[i]||i;if("@"===c)return s+"='{{"+a+"$resolve."+l+"}}'";if("&"===c){var f=t.getResolvable(l),v=f&&f.data,p=v&&r.services.$injector.annotate(v)||[];return s+"='$resolve."+l+(r.isArray(v)?"["+(v.length-1)+"]":"")+"("+p.join(",")+")'"}return s+"='"+a+"$resolve."+l+"'"})).join(" "),s=u(n);return"<"+s+" "+c+"></"+s+">"},e}();var f=function(e){return r.isObject(e.bindToController)?v(e.bindToController):v(e.scope)},v=function(e){return Object.keys(e||{}).map((function(t){return[t,/^([=<@&])[?]?(.*)/.exec(e[t])]})).filter((function(e){return r.isDefined(e)&&r.isArray(e[1])})).map((function(e){return{name:e[1][2]||e[0],type:e[1][1]}}))},p=function(){function e(t,n){this.stateRegistry=t,this.stateService=n,r.createProxyFunctions(r.val(e.prototype),this,r.val(this))}return e.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},e.prototype.state=function(e,t){return r.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},e.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},e}(),d=function(e){return function(t,n){var i=t[e],o="onExit"===e?"from":"to";return i?function(e,t){var n=new r.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),a=r.extend(D(n),{$state$:t,$transition$:e});return r.services.$injector.invoke(i,this,a)}:void 0}},$=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=r.val(e);r.createProxyFunctions(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,(function(e){return{"~":"~~","/":"~2F"}[e]})):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,(function(e){return{"~~":"~","~2F":"/"}[e]})):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return r.removeFrom(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=r.isObject(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,n){return void 0===t&&(t=!1),r.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,i,o){var a=this;this.$location=t,this.$sniffer=n,this.$browser=i,this.$window=o,e.$on("$locationChangeSuccess",(function(e){return a._urlListeners.forEach((function(t){return t(e)}))}));var u=r.val(t);r.createProxyFunctions(u,this,u,["replace","path","search","hash"]),r.createProxyFunctions(u,this,u,["port","protocol","host"])},e}(),h=function(){function e(e){this.router=e}return e.injectableHandler=function(e,t){return function(n){return r.services.$injector.invoke(t,null,{$match:n,$stateParams:e.globals.params})}},e.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},e.prototype.rule=function(e){var t=this;if(!r.isFunction(e))throw new Error("'rule' must be a function");var n=new r.BaseUrlRule((function(){return e(r.services.$injector,t.router.locationService)}),r.identity);return this.router.urlService.rules.rule(n),this},e.prototype.otherwise=function(e){var t=this,n=this.router.urlService.rules;if(r.isString(e))n.otherwise(e);else{if(!r.isFunction(e))throw new Error("'rule' must be a string or function");n.otherwise((function(){return e(r.services.$injector,t.router.locationService)}))}return this},e.prototype.when=function(t,n){return(r.isArray(n)||r.isFunction(n))&&(n=e.injectableHandler(this.router,n)),this.router.urlService.rules.when(t,n),this},e.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},e}();i.module("ui.router.angular1",[]);var m=i.module("ui.router.init",["ng"]),g=i.module("ui.router.util",["ui.router.init"]),w=i.module("ui.router.router",["ui.router.util"]),y=i.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),S=i.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),x=(i.module("ui.router.compat",["ui.router"]),null);function C(e){(x=this.router=new r.UIRouter).stateProvider=new p(x.stateRegistry,x.stateService),x.stateRegistry.decorator("views",u),x.stateRegistry.decorator("onExit",d("onExit")),x.stateRegistry.decorator("onRetain",d("onRetain")),x.stateRegistry.decorator("onEnter",d("onEnter")),x.viewService._pluginapi._viewConfigFactory("ng1",o()),x.urlService.config._decodeParams=!1;var t=x.locationService=x.locationConfig=new $(e);function n(e,r,n,i,o,a,u){return t._runtimeServices(o,e,i,r,n),delete x.router,delete x.$get,x}return $.monkeyPatchPathParameterType(x),x.router=x,x.$get=n,n.$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],x}C.$inject=["$locationProvider"];var b=function(e){return["$uiRouterProvider",function(t){var r=t.router[e];return r.$get=function(){return r},r}]};function R(e,t,n){if(r.services.$injector=e,r.services.$q=t,!e.hasOwnProperty("strictDi"))try{e.invoke((function(e){}))}catch(t){e.strictDi=!!/strict mode/.exec(t&&t.toString())}n.stateRegistry.get().map((function(e){return e.$$state().resolvables})).reduce(r.unnestR,[]).filter((function(e){return"deferred"===e.deps})).forEach((function(t){return t.deps=e.annotate(t.resolveFn,e.strictDi)}))}R.$inject=["$injector","$q","$uiRouter"];function P(e){e.$watch((function(){r.trace.approximateDigests++}))}P.$inject=["$rootScope"],m.provider("$uiRouter",C),w.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new h(e)}]),g.provider("$urlService",b("urlService")),g.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return x.urlMatcherFactory}]),g.provider("$templateFactory",(function(){return new l})),y.provider("$stateRegistry",b("stateRegistry")),y.provider("$uiRouterGlobals",b("globals")),y.provider("$transitions",b("transitionService")),y.provider("$state",["$uiRouterProvider",function(){return r.extend(x.stateProvider,{$get:function(){return x.stateService}})}]),y.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),S.factory("$view",(function(){return x.viewService})),S.service("$trace",(function(){return r.trace})),S.run(P),g.run(["$urlMatcherFactory",function(e){}]),y.run(["$state",function(e){}]),w.run(["$urlRouter",function(e){}]),m.run(R);var E,j,A,V,D=function(e){return e.getTokens().filter(r.isString).map((function(t){var r=e.getResolvable(t);return[t,"NOWAIT"===e.getPolicy(r).async?r.promise:r.data]})).reduce(r.applyPairs,{})};function F(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function I(e){var t=e.parent().inheritedData("$uiView"),n=r.parse("$cfg.path")(t);return n?r.tail(n).state.name:void 0}function O(e,t,n){var i=n.uiState||e.current.name,o=r.extend(function(e,t){return{relative:I(e)||t.$current,inherit:!0,source:"sref"}}(t,e),n.uiStateOpts||{}),a=e.href(i,n.uiStateParams,o);return{uiState:i,uiStateParams:n.uiStateParams,uiStateOpts:o,href:a}}function q(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function U(e,t,r,n,i){return function(o){var a=o.which||o.button,u=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||e.attr("target"))){var c=r((function(){e.attr("disabled")||t.go(u.uiState,u.uiStateParams,u.uiStateOpts)}));o.preventDefault();var s=n.isAnchor&&!u.href?1:0;o.preventDefault=function(){s--<=0&&r.cancel(c)}}}}function _(e,t,n,i){var o;i&&(o=i.events),r.isArray(o)||(o=["click"]);for(var a=e.on?"on":"bind",u=0,c=o;u<c.length;u++){var s=c[u];e[a](s,n)}t.$on("$destroy",(function(){for(var t=e.off?"off":"unbind",r=0,i=o;r<i.length;r++){var a=i[r];e[t](a,n)}}))}function k(e){var t=function(t,r,n){return e.is(t,r,n)};return t.$stateful=!0,t}function L(e){var t=function(t,r,n){return e.includes(t,r,n)};return t.$stateful=!0,t}function T(e,t,n,o,a,u){var c=r.parse("viewDecl.controllerAs"),s=r.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(o){var u=o.html();return o.empty(),function(o,l){var f=l.data("$uiView");if(!f)return l.html(u),void e(l.contents())(o);var v=f.$cfg||{viewDecl:{},getTemplate:r.noop},p=v.path&&new r.ResolveContext(v.path);l.html(v.getTemplate(l,p)||u),r.trace.traceUIViewFill(f.$uiView,l.html());var d=e(l.contents()),$=v.controller,h=c(v),m=s(v),g=p&&D(p);if(o[m]=g,$){var w=t($,r.extend({},g,{$scope:o,$element:l}));h&&(o[h]=w,o[h][m]=g),l.data("$ngControllerController",w),l.children().data("$ngControllerController",w),N(a,n,w,o,v)}if(r.isString(v.component))var y=r.kebobString(v.component),S=new RegExp("^(x-|data-)?"+y+"$","i"),x=o.$watch((function(){var e=[].slice.call(l[0].children).filter((function(e){return e&&e.tagName&&S.exec(e.tagName)}));return e&&i.element(e).data("$"+v.component+"Controller")}),(function(e){e&&(N(a,n,e,o,v),x())}));d(o)}}}}E=["$uiRouter","$timeout",function(e,t){var n=e.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){var c,s=q(o),l=u[1]||u[0],f=null,v={},p=function(){return O(n,o,v)},d=F(a.uiSref);function $(){var e=p();f&&f(),l&&(f=l.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&a.$set(s.attr,e.href)}v.uiState=d.state,v.uiStateOpts=a.uiSrefOpts?i.$eval(a.uiSrefOpts):{},d.paramExpr&&(i.$watch(d.paramExpr,(function(e){v.uiStateParams=r.extend({},e),$()}),!0),v.uiStateParams=r.extend({},i.$eval(d.paramExpr))),$(),i.$on("$destroy",e.stateRegistry.onStatesChanged($)),i.$on("$destroy",e.transitionService.onSuccess({},$)),s.clickable&&(c=U(o,n,t,s,p),_(o,i,c,v.uiStateOpts))}}}],j=["$uiRouter","$timeout",function(e,t){var n=e.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){var c,s=q(o),l=u[1]||u[0],f=null,v={},p=function(){return O(n,o,v)},d=["uiState","uiStateParams","uiStateOpts"],$=d.reduce((function(e,t){return e[t]=r.noop,e}),{});function h(){var e=p();f&&f(),l&&(f=l.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&a.$set(s.attr,e.href)}d.forEach((function(e){v[e]=a[e]?i.$eval(a[e]):null,a.$observe(e,(function(t){$[e](),$[e]=i.$watch(t,(function(t){v[e]=t,h()}),!0)}))})),h(),i.$on("$destroy",e.stateRegistry.onStatesChanged(h)),i.$on("$destroy",e.transitionService.onSuccess({},h)),s.clickable&&(c=U(o,n,t,s,p),_(o,i,c,v.uiStateOpts))}}}],A=["$state","$stateParams","$interpolate","$uiRouter",function(e,t,n,i){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,o,a){var u,c,s,l,f,v=[];u=n(a.uiSrefActiveEq||"",!1)(t);try{c=t.$eval(a.uiSrefActive)}catch(e){}function p(e){e.promise.then(m,r.noop)}function d(){$(c)}function $(e){r.isObject(e)&&(v=[],r.forEach(e,(function(e,n){var i=function(e,r){var n=F(e);h(n.state,t.$eval(n.paramExpr),r)};r.isString(e)?i(e,n):r.isArray(e)&&r.forEach(e,(function(e){i(e,n)}))})))}function h(t,n,i){var a={state:e.get(t,I(o))||{name:t},params:n,activeClass:i};return v.push(a),function(){r.removeFrom(v)(a)}}function m(){var n=function(e){return e.split(/\s/).filter(r.identity)},i=function(e){return e.map((function(e){return e.activeClass})).map(n).reduce(r.unnestR,[])},a=i(v).concat(n(u)).reduce(r.uniqR,[]),c=i(v.filter((function(t){return e.includes(t.state.name,t.params)}))),s=!!v.filter((function(t){return e.is(t.state.name,t.params)})).length?n(u):[],l=c.concat(s).reduce(r.uniqR,[]),f=a.filter((function(e){return!r.inArray(l,e)}));t.$evalAsync((function(){l.forEach((function(e){return o.addClass(e)})),f.forEach((function(e){return o.removeClass(e)}))}))}$(c=c||n(a.uiSrefActive||"",!1)(t)),this.$$addStateInfo=function(e,t){if(!(r.isObject(c)&&v.length>0)){var n=h(e,t,c);return m(),n}},t.$on("$destroy",(s=i.stateRegistry.onStatesChanged(d),l=i.transitionService.onStart({},p),f=t.$on("$stateChangeSuccess",m),function(){s(),l(),f()})),i.globals.transition&&p(i.globals.transition),m()}]}}],i.module("ui.router.state").directive("uiSref",E).directive("uiSrefActive",A).directive("uiSrefActiveEq",A).directive("uiState",j),k.$inject=["$state"],L.$inject=["$state"],i.module("ui.router.state").filter("isState",k).filter("includedByState",L),V=["$view","$animate","$uiViewScroll","$interpolate","$q",function(e,t,n,o,a){var u={$cfg:{viewDecl:{$context:e._pluginapi._rootViewContext()}},$uiView:{}},c={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(l,f,v){return function(l,f,p){var d,$,h,m,g,w=p.onload||"",y=p.autoscroll,S={enter:function(e,r,n){i.version.minor>2?t.enter(e,null,r).then(n):t.enter(e,null,r,n)},leave:function(e,r){i.version.minor>2?t.leave(e).then(r):t.leave(e,r)}},x=f.inheritedData("$uiView")||u,C=o(p.uiView||p.name||"")(l)||"$default",b={$type:"ng1",id:c.count++,name:C,fqn:x.$uiView.fqn?x.$uiView.fqn+"."+C:C,config:null,configUpdated:function(e){if(e&&!(e instanceof s))return;if(t=m,n=e,t===n)return;var t,n;r.trace.traceUIViewConfigUpdated(b,e&&e.viewDecl&&e.viewDecl.$context),m=e,R(e)},get creationContext(){var e=r.parse("$cfg.viewDecl.$context")(x),t=r.parse("$uiView.creationContext")(x);return e||t}};function R(e){var t=l.$new(),i=a.defer(),o=a.defer(),u={$cfg:e,$uiView:b},c={$animEnter:i.promise,$animLeave:o.promise,$$animLeave:o};t.$emit("$viewContentLoading",C);var s=v(t,(function(e){e.data("$uiViewAnim",c),e.data("$uiView",u),S.enter(e,f,(function(){i.resolve(),h&&h.$emit("$viewContentAnimationEnded"),(r.isDefined(y)&&!y||l.$eval(y))&&n(e)})),function(){if(d&&(r.trace.traceUIViewEvent("Removing (previous) el",d.data("$uiView")),d.remove(),d=null),h&&(r.trace.traceUIViewEvent("Destroying scope",b),h.$destroy(),h=null),$){var e=$.data("$uiViewAnim");r.trace.traceUIViewEvent("Animate out",e),S.leave($,(function(){e.$$animLeave.resolve(),d=null})),d=$,$=null}}()}));$=s,(h=t).$emit("$viewContentLoaded",e||m),h.$eval(w)}r.trace.traceUIViewEvent("Linking",b),f.data("$uiView",{$uiView:b}),R(),g=e.registerUIView(b),l.$on("$destroy",(function(){r.trace.traceUIViewEvent("Destroying/Unregistering",b),g()}))}}};return c}],T.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var H="function"==typeof i.module("ui.router").component,M=0;function N(e,t,n,i,o){!r.isFunction(n.$onInit)||(o.viewDecl.component||o.viewDecl.componentProvider)&&H||n.$onInit();var a=r.tail(o.path).state.self,u={bind:n};if(r.isFunction(n.uiOnParamsChanged)){var c=new r.ResolveContext(o.path).getResolvable("$transition$").data;i.$on("$destroy",t.onSuccess({},(function(e){if(e!==c&&-1===e.exiting().indexOf(a)){var t=e.params("to"),i=e.params("from"),o=function(e){return e.paramSchema},u=e.treeChanges("to").map(o).reduce(r.unnestR,[]),s=e.treeChanges("from").map(o).reduce(r.unnestR,[]),l=u.filter((function(e){var r=s.indexOf(e);return-1===r||!s[r].type.equals(t[e.id],i[e.id])}));if(l.length){var f=l.map((function(e){return e.id})),v=r.filter(t,(function(e,t){return-1!==f.indexOf(t)}));n.uiOnParamsChanged(v,e)}}}),u))}if(r.isFunction(n.uiCanExit)){var s=M++,l=function(e){return!!e&&(e._uiCanExitIds&&!0===e._uiCanExitIds[s]||l(e.redirectedFrom()))},f={exiting:a.name};i.$on("$destroy",t.onBefore(f,(function(t){var r,i=t._uiCanExitIds=t._uiCanExitIds||{};return l(t)||(r=e.when(n.uiCanExit(t))).then((function(e){return i[s]=!1!==e})),r}),u))}}i.module("ui.router.state").directive("uiView",V),i.module("ui.router.state").directive("uiView",T),i.module("ui.router.state").provider("$uiViewScroll",(function(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,r){return e?t:function(e){return r((function(){e[0].scrollIntoView()}),0,!1)}}]}));Object.keys(r).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),e.core=r,e.Ng1ViewConfig=s,e.StateProvider=p,e.UrlRouterProvider=h,e.default="ui.router",e.getLocals=D,e.getNg1ViewConfigFactory=o,e.ng1ViewsBuilder=u,e.watchDigests=P,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ui-router-angularjs.min.js.map
import nodeResolve from 'rollup-plugin-node-resolve';
import { uglify } from 'rollup-plugin-uglify';
import { terser } from 'rollup-plugin-terser';
import sourcemaps from 'rollup-plugin-sourcemaps';

@@ -30,10 +30,10 @@

const uglifyOpts = { output: {} };
const terserOpts = { output: {} };
// retain multiline comment with @license
uglifyOpts.output.comments = (node, comment) => comment.type === 'comment2' && /@license/i.test(comment.value);
terserOpts.output.comments = (node, comment) => comment.type === 'comment2' && /@license/i.test(comment.value);
const onwarn = warning => {
const onwarn = (warning) => {
// Suppress this error message... https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
const ignores = ['THIS_IS_UNDEFINED'];
if (!ignores.some(code => code === warning.code)) {
if (!ignores.some((code) => code === warning.code)) {
console.error(warning.message);

@@ -45,3 +45,3 @@ }

if (MINIFY) plugins.push(uglify(uglifyOpts));
if (MINIFY) plugins.push(terser(terserOpts));

@@ -48,0 +48,0 @@ const extension = MINIFY ? '.min.js' : '.js';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display