@angular/animations 7.2.7 → 7.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/browser/browser.d.ts +1 -0
  2. package/browser/browser.metadata.json +1 -1
  3. package/browser/src/render/css_keyframes/css_keyframes_player.d.ts +3 -1
  4. package/browser/src/render/special_cased_styles.d.ts +42 -0
  5. package/browser/src/render/web_animations/web_animations_player.d.ts +3 -1
  6. package/browser/src/util.d.ts +3 -1
  7. package/browser/testing.d.ts +1 -1
  8. package/browser.d.ts +1 -1
  9. package/bundles/animations-browser-testing.umd.js +1 -1
  10. package/bundles/animations-browser-testing.umd.js.map +1 -1
  11. package/bundles/animations-browser-testing.umd.min.js +1 -1
  12. package/bundles/animations-browser-testing.umd.min.js.map +1 -1
  13. package/bundles/animations-browser.umd.js +140 -7
  14. package/bundles/animations-browser.umd.js.map +1 -1
  15. package/bundles/animations-browser.umd.min.js +14 -7
  16. package/bundles/animations-browser.umd.min.js.map +1 -1
  17. package/bundles/animations.umd.js +1 -1
  18. package/bundles/animations.umd.min.js +1 -1
  19. package/bundles/animations.umd.min.js.map +1 -1
  20. package/esm2015/browser/browser.js +2 -1
  21. package/esm2015/browser/src/render/css_keyframes/css_keyframes_driver.js +6 -3
  22. package/esm2015/browser/src/render/css_keyframes/css_keyframes_player.js +18 -4
  23. package/esm2015/browser/src/render/special_cased_styles.js +177 -0
  24. package/esm2015/browser/src/render/web_animations/web_animations_driver.js +5 -2
  25. package/esm2015/browser/src/render/web_animations/web_animations_player.js +18 -2
  26. package/esm2015/browser/src/util.js +6 -2
  27. package/esm2015/src/version.js +1 -1
  28. package/esm5/browser/browser.js +2 -1
  29. package/esm5/browser/src/render/css_keyframes/css_keyframes_driver.js +5 -3
  30. package/esm5/browser/src/render/css_keyframes/css_keyframes_player.js +12 -3
  31. package/esm5/browser/src/render/special_cased_styles.js +109 -0
  32. package/esm5/browser/src/render/web_animations/web_animations_driver.js +4 -2
  33. package/esm5/browser/src/render/web_animations/web_animations_player.js +12 -2
  34. package/esm5/browser/src/util.js +5 -2
  35. package/esm5/src/version.js +1 -1
  36. package/fesm2015/animations.js +1 -1
  37. package/fesm2015/browser/testing.js +1 -1
  38. package/fesm2015/browser.js +171 -8
  39. package/fesm2015/browser.js.map +1 -1
  40. package/fesm5/animations.js +1 -1
  41. package/fesm5/browser/testing.js +1 -1
  42. package/fesm5/browser.js +140 -8
  43. package/fesm5/browser.js.map +1 -1
  44. package/package.json +2 -2
@@ -1,37 +1,44 @@
1
1
  /**
2
- * @license Angular v7.2.7
2
+ * @license Angular v7.2.11
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/animations/browser",["exports","@angular/animations","@angular/core"],t):t(((e=e||self).ng=e.ng||{},e.ng.animations=e.ng.animations||{},e.ng.animations.browser={}),e.ng.animations,e.ng.core)}(this,function(e,t,n){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function e(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}function u(){return"undefined"!=typeof process}function l(e){switch(e.length){case 0:return new t.NoopAnimationPlayer;case 1:return e[0];default:return new t.ɵAnimationGroupPlayer(e)}}function c(e,n,r,i,o,s){void 0===o&&(o={}),void 0===s&&(s={});var a=[],u=[],l=-1,c=null;if(i.forEach(function(e){var r=e.offset,i=r==l,h=i&&c||{};Object.keys(e).forEach(function(r){var i=r,u=e[r];if("offset"!==r)switch(i=n.normalizePropertyName(i,a),u){case t.ɵPRE_STYLE:u=o[r];break;case t.AUTO_STYLE:u=s[r];break;default:u=n.normalizeStyleValue(r,i,u,a)}h[i]=u}),i||u.push(h),c=h,l=r}),a.length)throw new Error("Unable to animate due to the following errors:\n - "+a.join("\n - "));return u}function h(e,t,n,r){switch(t){case"start":e.onStart(function(){return r(n&&p(n,"start",e))});break;case"done":e.onDone(function(){return r(n&&p(n,"done",e))});break;case"destroy":e.onDestroy(function(){return r(n&&p(n,"destroy",e))})}}function p(e,t,n){var r=n.totalTime,i=f(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,void 0==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(i._data=o),i}function f(e,t,n,r,i,o,s){return void 0===i&&(i=""),void 0===o&&(o=0),{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function y(e,t,n){var r;return e instanceof Map?(r=e.get(t))||e.set(t,r=n):(r=e[t])||(r=e[t]=n),r}function m(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var d=function(e,t){return!1},v=function(e,t){return!1},g=function(e,t,n){return[]},_=u();if(_||"undefined"!=typeof Element){if(d=function(e,t){return e.contains(t)},_||Element.prototype.matches)v=function(e,t){return e.matches(t)};else{var S=Element.prototype,E=S.matchesSelector||S.mozMatchesSelector||S.msMatchesSelector||S.oMatchesSelector||S.webkitMatchesSelector;E&&(v=function(e,t){return E.apply(e,[t])})}g=function(e,t,n){var r=[];if(n)r.push.apply(r,a(e.querySelectorAll(t)));else{var i=e.querySelector(t);i&&r.push(i)}return r}}var b=null,T=!1;function w(e){b||(b=function t(){return"undefined"!=typeof document?document.body:null}()||{},T=!!b.style&&"WebkitAppearance"in b.style);var n=!0;return b.style&&!function r(e){return"ebkit"==e.substring(1,6)}(e)&&!(n=e in b.style)&&T&&(n="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in b.style),n}var P=v,k=d,A=g;function N(e){var t={};return Object.keys(e).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}var O=function(){function e(){}return e.prototype.validateStyleProperty=function(e){return w(e)},e.prototype.matchesElement=function(e,t){return P(e,t)},e.prototype.containsElement=function(e,t){return k(e,t)},e.prototype.query=function(e,t,n){return A(e,t,n)},e.prototype.computeStyle=function(e,t,n){return n||""},e.prototype.animate=function(e,n,r,i,o,s,a){return void 0===s&&(s=[]),new t.NoopAnimationPlayer(r,i)},function r(e,t,n,i){var o,s=arguments.length,a=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(s<3?o(a):s>3?o(t,n,a):o(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a}([n.Injectable()],e)}(),C=function(){function e(){}return e.NOOP=new O,e}(),F=1e3;function D(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:L(parseFloat(t[1]),t[2])}function L(e,t){switch(t){case"s":return e*F;default:return e}}function x(e,t,n){return e.hasOwnProperty("duration")?e:function r(e,t,n){var r,i=0,o="";if("string"==typeof e){var s=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return t.push('The provided timing value "'+e+'" is invalid.'),{duration:0,delay:0,easing:""};r=L(parseFloat(s[1]),s[2]);var a=s[3];null!=a&&(i=L(parseFloat(a),s[4]));var u=s[5];u&&(o=u)}else r=e;if(!n){var l=!1,c=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(t.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&t.splice(c,0,'The provided timing value "'+e+'" is invalid.')}return{duration:r,delay:i,easing:o}}(e,t,n)}function j(e,t){return void 0===t&&(t={}),Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function q(e){var t={};return Array.isArray(e)?e.forEach(function(e){return R(e,!1,t)}):R(e,!1,t),t}function R(e,t,n){if(void 0===n&&(n={}),t)for(var r in e)n[r]=e[r];else j(e,n);return n}function I(e,t,n){return n?t+":"+n+";":""}function K(e){for(var t="",n=0;n<e.style.length;n++)t+=I(0,r=e.style.item(n),e.style.getPropertyValue(r));for(var r in e.style)e.style.hasOwnProperty(r)&&!r.startsWith("_")&&(t+=I(0,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[r]));e.setAttribute("style",t)}function Q(e,t){e.style&&(Object.keys(t).forEach(function(n){var r=$(n);e.style[r]=t[n]}),u()&&K(e))}function B(e,t){e.style&&(Object.keys(t).forEach(function(t){var n=$(t);e.style[n]=""}),u()&&K(e))}function M(e){return Array.isArray(e)?1==e.length?e[0]:t.sequence(e):e}var z=new RegExp("{{\\s*(.+?)\\s*}}","g");function U(e){var t=[];if("string"==typeof e){for(var n=e.toString(),r=void 0;r=z.exec(n);)t.push(r[1]);z.lastIndex=0}return t}function W(e,t,n){var r=e.toString(),i=r.replace(z,function(e,r){var i=t[r];return t.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),i=""),i.toString()});return i==r?e:i}function Y(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t}var H=/-+([a-z0-9])/g;function $(e){return e.replace(H,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[1].toUpperCase()})}function V(e,t){return 0===e||0===t}function G(e,t,n){var r=Object.keys(n);if(r.length&&t.length){var i=t[0],o=[];if(r.forEach(function(e){i.hasOwnProperty(e)||o.push(e),i[e]=n[e]}),o.length)for(var s=function(){var n=t[a];o.forEach(function(t){n[t]=J(e,t)})},a=1;a<t.length;a++)s()}return t}function Z(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function J(e,t){return window.getComputedStyle(e)[t]}
6
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/animations/browser",["exports","@angular/animations","@angular/core"],e):e(((t=t||self).ng=t.ng||{},t.ng.animations=t.ng.animations||{},t.ng.animations.browser={}),t.ng.animations,t.ng.core)}(this,function(t,e,n){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function t(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function a(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}function u(){return"undefined"!=typeof process}function l(t){switch(t.length){case 0:return new e.NoopAnimationPlayer;case 1:return t[0];default:return new e.ɵAnimationGroupPlayer(t)}}function h(t,n,r,i,o,s){void 0===o&&(o={}),void 0===s&&(s={});var a=[],u=[],l=-1,h=null;if(i.forEach(function(t){var r=t.offset,i=r==l,c=i&&h||{};Object.keys(t).forEach(function(r){var i=r,u=t[r];if("offset"!==r)switch(i=n.normalizePropertyName(i,a),u){case e.ɵPRE_STYLE:u=o[r];break;case e.AUTO_STYLE:u=s[r];break;default:u=n.normalizeStyleValue(r,i,u,a)}c[i]=u}),i||u.push(c),h=c,l=r}),a.length)throw new Error("Unable to animate due to the following errors:\n - "+a.join("\n - "));return u}function c(t,e,n,r){switch(e){case"start":t.onStart(function(){return r(n&&p(n,"start",t))});break;case"done":t.onDone(function(){return r(n&&p(n,"done",t))});break;case"destroy":t.onDestroy(function(){return r(n&&p(n,"destroy",t))})}}function p(t,e,n){var r=n.totalTime,i=f(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,void 0==r?t.totalTime:r,!!n.disabled),o=t._data;return null!=o&&(i._data=o),i}function f(t,e,n,r,i,o,s){return void 0===i&&(i=""),void 0===o&&(o=0),{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function y(t,e,n){var r;return t instanceof Map?(r=t.get(e))||t.set(e,r=n):(r=t[e])||(r=t[e]=n),r}function m(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var d=function(t,e){return!1},v=function(t,e){return!1},g=function(t,e,n){return[]},_=u();if(_||"undefined"!=typeof Element){if(d=function(t,e){return t.contains(e)},_||Element.prototype.matches)v=function(t,e){return t.matches(e)};else{var S=Element.prototype,E=S.matchesSelector||S.mozMatchesSelector||S.msMatchesSelector||S.oMatchesSelector||S.webkitMatchesSelector;E&&(v=function(t,e){return E.apply(t,[e])})}g=function(t,e,n){var r=[];if(n)r.push.apply(r,a(t.querySelectorAll(e)));else{var i=t.querySelector(e);i&&r.push(i)}return r}}var b=null,T=!1;function w(t){b||(b=function e(){return"undefined"!=typeof document?document.body:null}()||{},T=!!b.style&&"WebkitAppearance"in b.style);var n=!0;return b.style&&!function r(t){return"ebkit"==t.substring(1,6)}(t)&&!(n=t in b.style)&&T&&(n="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in b.style),n}var P=v,k=d,A=g;function N(t){var e={};return Object.keys(t).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}var O=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return w(t)},t.prototype.matchesElement=function(t,e){return P(t,e)},t.prototype.containsElement=function(t,e){return k(t,e)},t.prototype.query=function(t,e,n){return A(t,e,n)},t.prototype.computeStyle=function(t,e,n){return n||""},t.prototype.animate=function(t,n,r,i,o,s,a){return void 0===s&&(s=[]),new e.NoopAnimationPlayer(r,i)},function r(t,e,n,i){var o,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(s<3?o(a):s>3?o(e,n,a):o(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a}([n.Injectable()],t)}(),C=function(){function t(){}return t.NOOP=new O,t}(),F=1e3;function D(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:L(parseFloat(e[1]),e[2])}function L(t,e){switch(e){case"s":return t*F;default:return t}}function j(t,e,n){return t.hasOwnProperty("duration")?t:function r(t,e,n){var r,i=0,o="";if("string"==typeof t){var s=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return e.push('The provided timing value "'+t+'" is invalid.'),{duration:0,delay:0,easing:""};r=L(parseFloat(s[1]),s[2]);var a=s[3];null!=a&&(i=L(parseFloat(a),s[4]));var u=s[5];u&&(o=u)}else r=t;if(!n){var l=!1,h=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&e.splice(h,0,'The provided timing value "'+t+'" is invalid.')}return{duration:r,delay:i,easing:o}}(t,e,n)}function x(t,e){return void 0===e&&(e={}),Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function q(t){var e={};return Array.isArray(t)?t.forEach(function(t){return R(t,!1,e)}):R(t,!1,e),e}function R(t,e,n){if(void 0===n&&(n={}),e)for(var r in t)n[r]=t[r];else x(t,n);return n}function I(t,e,n){return n?e+":"+n+";":""}function K(t){for(var e="",n=0;n<t.style.length;n++)e+=I(0,r=t.style.item(n),t.style.getPropertyValue(r));for(var r in t.style)t.style.hasOwnProperty(r)&&!r.startsWith("_")&&(e+=I(0,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[r]));t.setAttribute("style",e)}function Q(t,e,n){t.style&&(Object.keys(e).forEach(function(r){var i=$(r);n&&!n.hasOwnProperty(r)&&(n[r]=t.style[i]),t.style[i]=e[r]}),u()&&K(t))}function B(t,e){t.style&&(Object.keys(e).forEach(function(e){var n=$(e);t.style[n]=""}),u()&&K(t))}function M(t){return Array.isArray(t)?1==t.length?t[0]:e.sequence(t):t}var z=new RegExp("{{\\s*(.+?)\\s*}}","g");function U(t){var e=[];if("string"==typeof t){for(var n=t.toString(),r=void 0;r=z.exec(n);)e.push(r[1]);z.lastIndex=0}return e}function W(t,e,n){var r=t.toString(),i=r.replace(z,function(t,r){var i=e[r];return e.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),i=""),i.toString()});return i==r?t:i}function Y(t){for(var e=[],n=t.next();!n.done;)e.push(n.value),n=t.next();return e}var H=/-+([a-z0-9])/g;function $(t){return t.replace(H,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t[1].toUpperCase()})}function V(t,e){return 0===t||0===e}function G(t,e,n){var r=Object.keys(n);if(r.length&&e.length){var i=e[0],o=[];if(r.forEach(function(t){i.hasOwnProperty(t)||o.push(t),i[t]=n[t]}),o.length)for(var s=function(){var n=e[a];o.forEach(function(e){n[e]=J(t,e)})},a=1;a<e.length;a++)s()}return e}function Z(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function J(t,e){return window.getComputedStyle(t)[e]}
7
7
  /**
8
8
  * @license
9
9
  * Copyright Google Inc. All Rights Reserved.
10
10
  *
11
11
  * Use of this source code is governed by an MIT-style license that can be
12
12
  * found in the LICENSE file at https://angular.io/license
13
- */var X="*",ee=new Set(["true","1"]),te=new Set(["false","0"]);function ne(e,t){var n=ee.has(e)||te.has(e),r=ee.has(t)||te.has(t);return function(i,o){var s=e==X||e==i,a=t==X||t==o;return!s&&n&&"boolean"==typeof i&&(s=i?ee.has(e):te.has(e)),!a&&r&&"boolean"==typeof o&&(a=o?ee.has(t):te.has(t)),s&&a}}var re=new RegExp("s*:selfs*,?","g");function ie(e,t,n){return new oe(e).build(t,n)}var oe=function(){function e(e){this._driver=e}return e.prototype.build=function(e,t){var n=new se(t);return this._resetContextStyleTimingState(n),Z(this,M(e),n)},e.prototype._resetContextStyleTimingState=function(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0},e.prototype.visitTrigger=function(e,t){var n=this,r=t.queryCount=0,i=t.depCount=0,o=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(function(e){if(n._resetContextStyleTimingState(t),0==e.type){var a=e,u=a.name;u.toString().split(/\s*,\s*/).forEach(function(e){a.name=e,o.push(n.visitState(a,t))}),a.name=u}else if(1==e.type){var l=n.visitTransition(e,t);r+=l.queryCount,i+=l.depCount,s.push(l)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:o,transitions:s,queryCount:r,depCount:i,options:null}},e.prototype.visitState=function(e,t){var n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){var i=new Set,o=r||{};if(n.styles.forEach(function(e){if(ae(e)){var t=e;Object.keys(t).forEach(function(e){U(t[e]).forEach(function(e){o.hasOwnProperty(e)||i.add(e)})})}}),i.size){var s=Y(i.values());t.errors.push('state("'+e.name+'", ...) must define default values for all the following style substitutions: '+s.join(", "))}}return{type:0,name:e.name,style:n,options:r?{params:r}:null}},e.prototype.visitTransition=function(e,t){t.queryCount=0,t.depCount=0;var n=Z(this,M(e.animation),t);return{type:1,matchers:function r(e,t){var n=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(function(e){return function r(e,t,n){if(":"==e[0]){var r=function i(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t)<parseFloat(e)};default:return t.push('The transition alias value "'+e+'" is not supported'),"* => *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var o=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==o||o.length<4)return n.push('The provided transition expression "'+e+'" is not supported'),t;var s=o[1],a=o[2],u=o[3];t.push(ne(s,u)),"<"!=a[0]||s==X&&u==X||t.push(ne(u,s))}(e,n,t)}):n.push(e),n}(e.expr,t.errors),animation:n,queryCount:t.queryCount,depCount:t.depCount,options:ue(e.options)}},e.prototype.visitSequence=function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return Z(n,e,t)}),options:ue(e.options)}},e.prototype.visitGroup=function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=Z(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:ue(e.options)}},e.prototype.visitAnimate=function(e,n){var r,i=function o(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return le(x(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=le(0,0,"");return i.dynamic=!0,i.strValue=r,i}return le((n=n||x(r,t)).duration,n.delay,n.easing)}(e.timings,n.errors);n.currentAnimateTimings=i;var s=e.styles?e.styles:t.style({});if(5==s.type)r=this.visitKeyframes(s,n);else{var a=e.styles,u=!1;if(!a){u=!0;var l={};i.easing&&(l.easing=i.easing),a=t.style(l)}n.currentTime+=i.duration+i.delay;var c=this.visitStyle(a,n);c.isEmptyStep=u,r=c}return n.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}},e.prototype.visitStyle=function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n},e.prototype._makeStyleAst=function(e,n){var r=[];Array.isArray(e.styles)?e.styles.forEach(function(e){"string"==typeof e?e==t.AUTO_STYLE?r.push(e):n.errors.push("The provided style string value "+e+" is not allowed."):r.push(e)}):r.push(e.styles);var i=!1,o=null;return r.forEach(function(e){if(ae(e)){var t=e,n=t.easing;if(n&&(o=n,delete t.easing),!i)for(var r in t)if(t[r].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:r,easing:o,offset:e.offset,containsDynamicStyles:i,options:null}},e.prototype._validateStyleAst=function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var s=t.collectedStyles[t.currentQuerySelector],a=s[r],u=!0;a&&(o!=i&&o>=a.startTime&&i<=a.endTime&&(t.errors.push('The CSS property "'+r+'" that exists between the times of "'+a.startTime+'ms" and "'+a.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),u=!1),o=a.startTime),u&&(s[r]={startTime:o,endTime:i}),t.options&&function l(e,t,n){var r=t.params||{},i=U(e);i.length&&i.forEach(function(e){r.hasOwnProperty(e)||n.push("Unable to resolve the local animation param "+e+" in the given list of values")})}(e[r],t.options,t.errors)}else t.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},e.prototype.visitKeyframes=function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],s=!1,a=!1,u=0,l=e.steps.map(function(e){var r=n._makeStyleAst(e,t),l=null!=r.offset?r.offset:function c(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(ae(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(ae(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),h=0;return null!=l&&(i++,h=r.offset=l),a=a||h<0||h>1,s=s||h<u,u=h,o.push(h),r});a&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&t.errors.push("Please ensure that all keyframe offsets are in order");var c=e.steps.length,h=0;i>0&&i<c?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(h=1/(c-1));var p=c-1,f=t.currentTime,y=t.currentAnimateTimings,m=y.duration;return l.forEach(function(e,i){var s=h>0?i==p?1:h*i:o[i],a=s*m;t.currentTime=f+y.delay+a,y.duration=a,n._validateStyleAst(e,t),e.offset=s,r.styles.push(e)}),r},e.prototype.visitReference=function(e,t){return{type:8,animation:Z(this,M(e.animation),t),options:ue(e.options)}},e.prototype.visitAnimateChild=function(e,t){return t.depCount++,{type:9,options:ue(e.options)}},e.prototype.visitAnimateRef=function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:ue(e.options)}},e.prototype.visitQuery=function(e,t){var n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;var i=s(function o(e){var t=!!e.split(/\s*,\s*/).find(function(e){return":self"==e});return t&&(e=e.replace(re,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),a=i[0],u=i[1];t.currentQuerySelector=n.length?n+" "+a:a,y(t.collectedStyles,t.currentQuerySelector,{});var l=Z(this,M(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:a,limit:r.limit||0,optional:!!r.optional,includeSelf:u,animation:l,originalSelector:e.selector,options:ue(e.options)}},e.prototype.visitStagger=function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:x(e.timings,t.errors,!0);return{type:12,animation:Z(this,M(e.animation),t),timings:n,options:null}},e}(),se=function se(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function ae(e){return!Array.isArray(e)&&"object"==typeof e}function ue(e){return e?(e=j(e)).params&&(e.params=function t(e){return e?j(e):null}(e.params)):e={},e}function le(e,t,n){return{duration:e,delay:t,easing:n}}function ce(e,t,n,r,i,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var he=function(){function e(){this._map=new Map}return e.prototype.consume=function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t},e.prototype.append=function(e,t){var n=this._map.get(e);n||this._map.set(e,n=[]),n.push.apply(n,a(t))},e.prototype.has=function(e){return this._map.has(e)},e.prototype.clear=function(){this._map.clear()},e}(),pe=new RegExp(":enter","g"),fe=new RegExp(":leave","g");function ye(e,t,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new me).buildKeyframes(e,t,n,r,i,o,s,a,u,l)}var me=function(){function e(){}return e.prototype.buildKeyframes=function(e,t,n,r,i,o,s,a,u,l){void 0===l&&(l=[]),u=u||new he;var c=new ve(e,t,u,r,i,l,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),Z(this,n,c);var h=c.timelines.filter(function(e){return e.containsAnimation()});if(h.length&&Object.keys(s).length){var p=h[h.length-1];p.allowOnlyTimelineStyles()||p.setStyles([s],null,c.errors,a)}return h.length?h.map(function(e){return e.buildKeyframes()}):[ce(t,[],[],[],0,0,"",!1)]},e.prototype.visitTrigger=function(e,t){},e.prototype.visitState=function(e,t){},e.prototype.visitTransition=function(e,t){},e.prototype.visitAnimateChild=function(e,t){var n=t.subInstructions.consume(t.element);if(n){var r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e},e.prototype.visitAnimateRef=function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e},e.prototype._visitSubInstructions=function(e,t,n){var r=t.currentTimeline.currentTime,i=null!=n.duration?D(n.duration):null,o=null!=n.delay?D(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r},e.prototype.visitReference=function(e,t){t.updateOptions(e.options,!0),Z(this,e.animation,t),t.previousNode=e},e.prototype.visitSequence=function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=de);var s=D(o.delay);i.delayNextStep(s)}e.steps.length&&(e.steps.forEach(function(e){return Z(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e},e.prototype.visitGroup=function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?D(e.options.delay):0;e.steps.forEach(function(s){var a=t.createSubContext(e.options);o&&a.delayNextStep(o),Z(n,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e},e.prototype._visitTiming=function(e,t){if(e.dynamic){var n=e.strValue;return x(t.params?W(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}},e.prototype.visitAnimate=function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e},e.prototype.visitStyle=function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e},e.prototype.visitKeyframes=function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e},e.prototype.visitQuery=function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?D(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=de);var s=r,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;var u=null;a.forEach(function(r,i){t.currentQueryIndex=i;var a=t.createSubContext(e.options,r);o&&a.delayNextStep(o),r===t.element&&(u=a.currentTimeline),Z(n,e.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),u&&(t.currentTimeline.mergeTimelineCollectedStyles(u),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e},e.prototype.visitStagger=function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),s=o*(t.currentQueryTotal-1),a=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var u=t.currentTimeline;a&&u.delayNextStep(a);var l=u.currentTime;Z(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},e}(),de={},ve=function(){function e(e,t,n,r,i,o,s,a){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=de,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new ge(this._driver,t,0),s.push(this.currentTimeline)}return Object.defineProperty(e.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),e.prototype.updateOptions=function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=D(r.duration)),null!=r.delay&&(i.delay=D(r.delay));var o=r.params;if(o){var s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(e){t&&s.hasOwnProperty(e)||(s[e]=W(o[e],s,n.errors))})}}},e.prototype._copyOptions=function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach(function(e){n[e]=t[e]})}}return e},e.prototype.createSubContext=function(t,n,r){void 0===t&&(t=null);var i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},e.prototype.transformIntoNewTimeline=function(e){return this.previousNode=de,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline},e.prototype.appendInstructionToTimeline=function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new _e(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r},e.prototype.incrementTime=function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)},e.prototype.delayNextStep=function(e){e>0&&this.currentTimeline.delayNextStep(e)},e.prototype.invokeQuery=function(e,t,n,r,i,o){var s=[];if(r&&s.push(this.element),e.length>0){e=(e=e.replace(pe,"."+this._enterClassName)).replace(fe,"."+this._leaveClassName);var u=this._driver.query(this.element,e,1!=n);0!==n&&(u=n<0?u.slice(u.length+n,u.length):u.slice(0,n)),s.push.apply(s,a(u))}return i||0!=s.length||o.push('`query("'+t+'")` returned zero elements. (Use `query("'+t+'", { optional: true })` if you wish to allow this.)'),s},e}(),ge=function(){function e(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}return e.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},e.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),e.prototype.delayNextStep=function(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e},e.prototype.fork=function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)},e.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},e.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},e.prototype.forwardTime=function(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()},e.prototype._updateStyle=function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}},e.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},e.prototype.applyEmptyStep=function(e){var n=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(function(e){n._backFill[e]=n._globalTimelineStyles[e]||t.AUTO_STYLE,n._currentKeyframe[e]=t.AUTO_STYLE}),this._currentEmptyStepKeyframe=this._currentKeyframe},e.prototype.setStyles=function(e,n,r,i){var o=this;n&&(this._previousKeyframe.easing=n);var s=i&&i.params||{},a=function u(e,n){var r,i={};return e.forEach(function(e){"*"===e?(r=r||Object.keys(n)).forEach(function(e){i[e]=t.AUTO_STYLE}):R(e,!1,i)}),i}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var n=W(a[e],s,r);o._pendingStyles[e]=n,o._localTimelineStyles.hasOwnProperty(e)||(o._backFill[e]=o._globalTimelineStyles.hasOwnProperty(e)?o._globalTimelineStyles[e]:t.AUTO_STYLE),o._updateStyle(e,n)})},e.prototype.applyStylesToKeyframe=function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){e._currentKeyframe[n]=t[n]}),Object.keys(this._localTimelineStyles).forEach(function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])}))},e.prototype.snapshotCurrentStyles=function(){var e=this;Object.keys(this._localTimelineStyles).forEach(function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)})},e.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(e.prototype,"properties",{get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e},enumerable:!0,configurable:!0}),e.prototype.mergeTimelineCollectedStyles=function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})},e.prototype.buildKeyframes=function(){var e=this;this.applyStylesToKeyframe();var n=new Set,r=new Set,i=1===this._keyframes.size&&0===this.duration,o=[];this._keyframes.forEach(function(s,a){var u=R(s,!0);Object.keys(u).forEach(function(e){var i=u[e];i==t.ɵPRE_STYLE?n.add(e):i==t.AUTO_STYLE&&r.add(e)}),i||(u.offset=a/e.duration),o.push(u)});var s=n.size?Y(n.values()):[],a=r.size?Y(r.values()):[];if(i){var u=o[0],l=j(u);u.offset=0,l.offset=1,o=[u,l]}return ce(this.element,o,s,a,this.duration,this.startTime,this.easing,!1)},e}(),_e=function(e){function t(t,n,r,i,o,s,a){void 0===a&&(a=!1);var u=e.call(this,t,n,s.delay)||this;return u.element=n,u.keyframes=r,u.preStyleProps=i,u.postStyleProps=o,u._stretchStartingKeyframe=a,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return i(t,e),t.prototype.containsAnimation=function(){return this.keyframes.length>1},t.prototype.buildKeyframes=function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=r+n,a=n/s,u=R(e[0],!1);u.offset=0,o.push(u);var l=R(e[0],!1);l.offset=Se(a),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var p=R(e[h],!1);p.offset=Se((n+p.offset*r)/s),o.push(p)}r=s,n=0,i="",e=o}return ce(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)},t}(ge);function Se(e,t){void 0===t&&(t=3);var n=Math.pow(10,t-1);return Math.round(e*n)/n}var Ee=function(){function e(e,t){this._driver=e;var n=[],r=ie(e,t,n);if(n.length){var i="animation validation failed:\n"+n.join("\n");throw new Error(i)}this._animationAst=r}return e.prototype.buildTimelines=function(e,t,n,r,i){var o=Array.isArray(t)?q(t):t,s=Array.isArray(n)?q(n):n,a=[];i=i||new he;var u=ye(this._driver,e,this._animationAst,"ng-enter","ng-leave",o,s,r,i,a);if(a.length){var l="animation building failed:\n"+a.join("\n");throw new Error(l)}return u},e}(),be=function be(){},Te=function(){function e(){}return e.prototype.normalizePropertyName=function(e,t){return e},e.prototype.normalizeStyleValue=function(e,t,n,r){return n},e}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.normalizePropertyName=function(e,t){return $(e)},t.prototype.normalizeStyleValue=function(e,t,n,r){var i="",o=n.toString().trim();if(Pe[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push("Please provide a CSS unit value for "+e+":"+n)}return o+i},t}(be),Pe=function ke(e){var t={};return e.forEach(function(e){return t[e]=!0}),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));
13
+ */var X="*",tt=new Set(["true","1"]),et=new Set(["false","0"]);function nt(t,e){var n=tt.has(t)||et.has(t),r=tt.has(e)||et.has(e);return function(i,o){var s=t==X||t==i,a=e==X||e==o;return!s&&n&&"boolean"==typeof i&&(s=i?tt.has(t):et.has(t)),!a&&r&&"boolean"==typeof o&&(a=o?tt.has(e):et.has(e)),s&&a}}var rt=new RegExp("s*:selfs*,?","g");function it(t,e,n){return new ot(t).build(e,n)}var ot=function(){function t(t){this._driver=t}return t.prototype.build=function(t,e){var n=new st(e);return this._resetContextStyleTimingState(n),Z(this,M(t),n)},t.prototype._resetContextStyleTimingState=function(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0},t.prototype.visitTrigger=function(t,e){var n=this,r=e.queryCount=0,i=e.depCount=0,o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(function(t){if(n._resetContextStyleTimingState(e),0==t.type){var a=t,u=a.name;u.toString().split(/\s*,\s*/).forEach(function(t){a.name=t,o.push(n.visitState(a,e))}),a.name=u}else if(1==t.type){var l=n.visitTransition(t,e);r+=l.queryCount,i+=l.depCount,s.push(l)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:o,transitions:s,queryCount:r,depCount:i,options:null}},t.prototype.visitState=function(t,e){var n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){var i=new Set,o=r||{};if(n.styles.forEach(function(t){if(at(t)){var e=t;Object.keys(e).forEach(function(t){U(e[t]).forEach(function(t){o.hasOwnProperty(t)||i.add(t)})})}}),i.size){var s=Y(i.values());e.errors.push('state("'+t.name+'", ...) must define default values for all the following style substitutions: '+s.join(", "))}}return{type:0,name:t.name,style:n,options:r?{params:r}:null}},t.prototype.visitTransition=function(t,e){e.queryCount=0,e.depCount=0;var n=Z(this,M(t.animation),e);return{type:1,matchers:function r(t,e){var n=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(function(t){return function r(t,e,n){if(":"==t[0]){var r=function i(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e)<parseFloat(t)};default:return e.push('The transition alias value "'+t+'" is not supported'),"* => *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}var o=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==o||o.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var s=o[1],a=o[2],u=o[3];e.push(nt(s,u)),"<"!=a[0]||s==X&&u==X||e.push(nt(u,s))}(t,n,e)}):n.push(t),n}(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:ut(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return Z(n,t,e)}),options:ut(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,r=e.currentTime,i=0,o=t.steps.map(function(t){e.currentTime=r;var o=Z(n,t,e);return i=Math.max(i,e.currentTime),o});return e.currentTime=i,{type:3,steps:o,options:ut(t.options)}},t.prototype.visitAnimate=function(t,n){var r,i=function o(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return lt(j(t,e).duration,0,"");var r=t;if(r.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var i=lt(0,0,"");return i.dynamic=!0,i.strValue=r,i}return lt((n=n||j(r,e)).duration,n.delay,n.easing)}(t.timings,n.errors);n.currentAnimateTimings=i;var s=t.styles?t.styles:e.style({});if(5==s.type)r=this.visitKeyframes(s,n);else{var a=t.styles,u=!1;if(!a){u=!0;var l={};i.easing&&(l.easing=i.easing),a=e.style(l)}n.currentTime+=i.duration+i.delay;var h=this.visitStyle(a,n);h.isEmptyStep=u,r=h}return n.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,n){var r=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==e.AUTO_STYLE?r.push(t):n.errors.push("The provided style string value "+t+" is not allowed."):r.push(t)}):r.push(t.styles);var i=!1,o=null;return r.forEach(function(t){if(at(t)){var e=t,n=e.easing;if(n&&(o=n,delete e.easing),!i)for(var r in e)if(e[r].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:r,easing:o,offset:t.offset,containsDynamicStyles:i,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,r=e.currentAnimateTimings,i=e.currentTime,o=e.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(r){if(n._driver.validateStyleProperty(r)){var s=e.collectedStyles[e.currentQuerySelector],a=s[r],u=!0;a&&(o!=i&&o>=a.startTime&&i<=a.endTime&&(e.errors.push('The CSS property "'+r+'" that exists between the times of "'+a.startTime+'ms" and "'+a.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),u=!1),o=a.startTime),u&&(s[r]={startTime:o,endTime:i}),e.options&&function l(t,e,n){var r=e.params||{},i=U(t);i.length&&i.forEach(function(t){r.hasOwnProperty(t)||n.push("Unable to resolve the local animation param "+t+" in the given list of values")})}(t[r],e.options,e.errors)}else e.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],s=!1,a=!1,u=0,l=t.steps.map(function(t){var r=n._makeStyleAst(t,e),l=null!=r.offset?r.offset:function h(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(at(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(at(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),a=a||c<0||c>1,s=s||c<u,u=c,o.push(c),r});a&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");var h=t.steps.length,c=0;i>0&&i<h?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(c=1/(h-1));var p=h-1,f=e.currentTime,y=e.currentAnimateTimings,m=y.duration;return l.forEach(function(t,i){var s=c>0?i==p?1:c*i:o[i],a=s*m;e.currentTime=f+y.delay+a,y.duration=a,n._validateStyleAst(t,e),t.offset=s,r.styles.push(t)}),r},t.prototype.visitReference=function(t,e){return{type:8,animation:Z(this,M(t.animation),e),options:ut(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:ut(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ut(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;var i=s(function o(t){var e=!!t.split(/\s*,\s*/).find(function(t){return":self"==t});return e&&(t=t.replace(rt,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),a=i[0],u=i[1];e.currentQuerySelector=n.length?n+" "+a:a,y(e.collectedStyles,e.currentQuerySelector,{});var l=Z(this,M(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:a,limit:r.limit||0,optional:!!r.optional,includeSelf:u,animation:l,originalSelector:t.selector,options:ut(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:j(t.timings,e.errors,!0);return{type:12,animation:Z(this,M(t.animation),e),timings:n,options:null}},t}(),st=function st(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function at(t){return!Array.isArray(t)&&"object"==typeof t}function ut(t){return t?(t=x(t)).params&&(t.params=function e(t){return t?x(t):null}(t.params)):t={},t}function lt(t,e,n){return{duration:t,delay:e,easing:n}}function ht(t,e,n,r,i,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var ct=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,a(e))},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),pt=new RegExp(":enter","g"),ft=new RegExp(":leave","g");function yt(t,e,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new mt).buildKeyframes(t,e,n,r,i,o,s,a,u,l)}var mt=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,r,i,o,s,a,u,l){void 0===l&&(l=[]),u=u||new ct;var h=new vt(t,e,u,r,i,l,[]);h.options=a,h.currentTimeline.setStyles([o],null,h.errors,a),Z(this,n,h);var c=h.timelines.filter(function(t){return t.containsAnimation()});if(c.length&&Object.keys(s).length){var p=c[c.length-1];p.allowOnlyTimelineStyles()||p.setStyles([s],null,h.errors,a)}return c.length?c.map(function(t){return t.buildKeyframes()}):[ht(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var r=e.createSubContext(t.options),i=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var r=e.currentTimeline.currentTime,i=null!=n.duration?D(n.duration):null,o=null!=n.delay?D(n.delay):null;return 0!==i&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,i,o);r=Math.max(r,n.duration+n.delay)}),r},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),Z(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,r=e.subContextCount,i=e,o=t.options;if(o&&(o.params||o.delay)&&((i=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=dt);var s=D(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(function(t){return Z(n,t,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,r=[],i=e.currentTimeline.currentTime,o=t.options&&t.options.delay?D(t.options.delay):0;t.steps.forEach(function(s){var a=e.createSubContext(t.options);o&&a.delayNextStep(o),Z(n,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(i),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return j(e.params?W(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());var i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,r=e.currentTimeline.duration,i=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*i),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(r+i),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,r=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?D(i.delay):0;o&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dt);var s=r,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=a.length;var u=null;a.forEach(function(r,i){e.currentQueryIndex=i;var a=e.createSubContext(t.options,r);o&&a.delayNextStep(o),r===e.element&&(u=a.currentTimeline),Z(n,t.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),u&&(e.currentTimeline.mergeTimelineCollectedStyles(u),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,r=e.currentTimeline,i=t.timings,o=Math.abs(i.duration),s=o*(e.currentQueryTotal-1),a=o*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var u=e.currentTimeline;a&&u.delayNextStep(a);var l=u.currentTime;Z(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},t}(),dt={},vt=function(){function t(t,e,n,r,i,o,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=dt,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new gt(this._driver,e,0),s.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var r=t,i=this.options;null!=r.duration&&(i.duration=D(r.duration)),null!=r.delay&&(i.delay=D(r.delay));var o=r.params;if(o){var s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(t){e&&s.hasOwnProperty(t)||(s[t]=W(o[t],s,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,r){void 0===e&&(e=null);var i=n||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=dt,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new _t(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(i),r},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,r,i,o){var s=[];if(r&&s.push(this.element),t.length>0){t=(t=t.replace(pt,"."+this._enterClassName)).replace(ft,"."+this._leaveClassName);var u=this._driver.query(this.element,t,1!=n);0!==n&&(u=n<0?u.slice(u.length+n,u.length):u.slice(0,n)),s.push.apply(s,a(u))}return i||0!=s.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),s},t}(),gt=function(){function t(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var n=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){n._backFill[t]=n._globalTimelineStyles[t]||e.AUTO_STYLE,n._currentKeyframe[t]=e.AUTO_STYLE}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,n,r,i){var o=this;n&&(this._previousKeyframe.easing=n);var s=i&&i.params||{},a=function u(t,n){var r,i={};return t.forEach(function(t){"*"===t?(r=r||Object.keys(n)).forEach(function(t){i[t]=e.AUTO_STYLE}):R(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(a).forEach(function(t){var n=W(a[t],s,r);o._pendingStyles[t]=n,o._localTimelineStyles.hasOwnProperty(t)||(o._backFill[t]=o._globalTimelineStyles.hasOwnProperty(t)?o._globalTimelineStyles[t]:e.AUTO_STYLE),o._updateStyle(t,n)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var r=e._styleSummary[n],i=t._styleSummary[n];(!r||i.time>r.time)&&e._updateStyle(n,i.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var n=new Set,r=new Set,i=1===this._keyframes.size&&0===this.duration,o=[];this._keyframes.forEach(function(s,a){var u=R(s,!0);Object.keys(u).forEach(function(t){var i=u[t];i==e.ɵPRE_STYLE?n.add(t):i==e.AUTO_STYLE&&r.add(t)}),i||(u.offset=a/t.duration),o.push(u)});var s=n.size?Y(n.values()):[],a=r.size?Y(r.values()):[];if(i){var u=o[0],l=x(u);u.offset=0,l.offset=1,o=[u,l]}return ht(this.element,o,s,a,this.duration,this.startTime,this.easing,!1)},t}(),_t=function(t){function e(e,n,r,i,o,s,a){void 0===a&&(a=!1);var u=t.call(this,e,n,s.delay)||this;return u.element=n,u.keyframes=r,u.preStyleProps=i,u.postStyleProps=o,u._stretchStartingKeyframe=a,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return i(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,r=e.duration,i=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=r+n,a=n/s,u=R(t[0],!1);u.offset=0,o.push(u);var l=R(t[0],!1);l.offset=St(a),o.push(l);for(var h=t.length-1,c=1;c<=h;c++){var p=R(t[c],!1);p.offset=St((n+p.offset*r)/s),o.push(p)}r=s,n=0,i="",t=o}return ht(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)},e}(gt);function St(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var Et=function(){function t(t,e){this._driver=t;var n=[],r=it(t,e,n);if(n.length){var i="animation validation failed:\n"+n.join("\n");throw new Error(i)}this._animationAst=r}return t.prototype.buildTimelines=function(t,e,n,r,i){var o=Array.isArray(e)?q(e):e,s=Array.isArray(n)?q(n):n,a=[];i=i||new ct;var u=yt(this._driver,t,this._animationAst,"ng-enter","ng-leave",o,s,r,i,a);if(a.length){var l="animation building failed:\n"+a.join("\n");throw new Error(l)}return u},t}(),bt=function bt(){},Tt=function(){function t(){}return t.prototype.normalizePropertyName=function(t,e){return t},t.prototype.normalizeStyleValue=function(t,e,n,r){return n},t}(),wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.normalizePropertyName=function(t,e){return $(t)},e.prototype.normalizeStyleValue=function(t,e,n,r){var i="",o=n.toString().trim();if(Pt[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push("Please provide a CSS unit value for "+t+":"+n)}return o+i},e}(bt),Pt=function kt(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));
14
14
  /**
15
15
  * @license
16
16
  * Copyright Google Inc. All Rights Reserved.
17
17
  *
18
18
  * Use of this source code is governed by an MIT-style license that can be
19
19
  * found in the LICENSE file at https://angular.io/license
20
- */function Ae(e,t,n,r,i,o,s,a,u,l,c,h,p){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:p}}var Ne={},Oe=function(){function e(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}return e.prototype.match=function(e,t,n,r){return function i(e,t,n,r,o){return e.some(function(e){return e(t,n,r,o)})}(this.ast.matchers,e,t,n,r)},e.prototype.buildStyles=function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o},e.prototype.build=function(e,t,n,r,i,s,a,u,l,c){var h=[],p=this.ast.options&&this.ast.options.params||Ne,f=this.buildStyles(n,a&&a.params||Ne,h),m=u&&u.params||Ne,d=this.buildStyles(r,m,h),v=new Set,g=new Map,_=new Map,S="void"===r,E={params:o({},p,m)},b=c?[]:ye(e,t,this.ast.animation,i,s,f,d,E,l,h),T=0;if(b.forEach(function(e){T=Math.max(e.duration+e.delay,T)}),h.length)return Ae(t,this._triggerName,n,r,S,f,d,[],[],g,_,T,h);b.forEach(function(e){var n=e.element,r=y(g,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=y(_,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&v.add(n)});var w=Y(v.values());return Ae(t,this._triggerName,n,r,S,f,d,b,w,g,_,T)},e}(),Ce=function(){function e(e,t){this.styles=e,this.defaultParams=t}return e.prototype.buildStyles=function(e,t){var n={},r=j(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=W(o,r,t)),n[e]=o})}}),n},e}(),Fe=function(){function e(e,t){var n=this;this.name=e,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(function(e){n.states[e.name]=new Ce(e.style,e.options&&e.options.params||{})}),De(this.states,"true","1"),De(this.states,"false","0"),t.transitions.forEach(function(t){n.transitionFactories.push(new Oe(e,t,n.states))}),this.fallbackTransition=function r(e,t){return new Oe(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},t)}(e,this.states)}return Object.defineProperty(e.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),e.prototype.matchTransition=function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null},e.prototype.matchStyles=function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)},e}();function De(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}
20
+ */function At(t,e,n,r,i,o,s,a,u,l,h,c,p){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:u,preStyleProps:l,postStyleProps:h,totalTime:c,errors:p}}var Nt={},Ot=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e,n,r){return function i(t,e,n,r,o){return t.some(function(t){return t(e,n,r,o)})}(this.ast.matchers,t,e,n,r)},t.prototype.buildStyles=function(t,e,n){var r=this._stateStyles["*"],i=this._stateStyles[t],o=r?r.buildStyles(e,n):{};return i?i.buildStyles(e,n):o},t.prototype.build=function(t,e,n,r,i,s,a,u,l,h){var c=[],p=this.ast.options&&this.ast.options.params||Nt,f=this.buildStyles(n,a&&a.params||Nt,c),m=u&&u.params||Nt,d=this.buildStyles(r,m,c),v=new Set,g=new Map,_=new Map,S="void"===r,E={params:o({},p,m)},b=h?[]:yt(t,e,this.ast.animation,i,s,f,d,E,l,c),T=0;if(b.forEach(function(t){T=Math.max(t.duration+t.delay,T)}),c.length)return At(e,this._triggerName,n,r,S,f,d,[],[],g,_,T,c);b.forEach(function(t){var n=t.element,r=y(g,n,{});t.preStyleProps.forEach(function(t){return r[t]=!0});var i=y(_,n,{});t.postStyleProps.forEach(function(t){return i[t]=!0}),n!==e&&v.add(n)});var w=Y(v.values());return At(e,this._triggerName,n,r,S,f,d,b,w,g,_,T)},t}(),Ct=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},r=x(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var i=t;Object.keys(i).forEach(function(t){var o=i[t];o.length>1&&(o=W(o,r,e)),n[t]=o})}}),n},t}(),Ft=function(){function t(t,e){var n=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){n.states[t.name]=new Ct(t.style,t.options&&t.options.params||{})}),Dt(this.states,"true","1"),Dt(this.states,"false","0"),e.transitions.forEach(function(e){n.transitionFactories.push(new Ot(t,e,n.states))}),this.fallbackTransition=function r(t,e){return new Ot(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},e)}(t,this.states)}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e,n,r){return this.transitionFactories.find(function(i){return i.match(t,e,n,r)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function Dt(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}
21
21
  /**
22
22
  * @license
23
23
  * Copyright Google Inc. All Rights Reserved.
24
24
  *
25
25
  * Use of this source code is governed by an MIT-style license that can be
26
26
  * found in the LICENSE file at https://angular.io/license
27
- */var Le=new he,xe=function(){function e(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return e.prototype.register=function(e,t){var n=[],r=ie(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r},e.prototype._buildPlayer=function(e,t,n){var r=e.element,i=c(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)},e.prototype.create=function(e,n,r){var i=this;void 0===r&&(r={});var o,s=[],a=this._animations[e],u=new Map;if(a?(o=ye(this._driver,n,a,"ng-enter","ng-leave",{},{},r,Le,s)).forEach(function(e){var t=y(u,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(s.push("The requested animation doesn't exist or has already been destroyed"),o=[]),s.length)throw new Error("Unable to create the animation due to the following errors: "+s.join("\n"));u.forEach(function(e,n){Object.keys(e).forEach(function(r){e[r]=i._driver.computeStyle(n,r,t.AUTO_STYLE)})});var c=l(o.map(function(e){var t=u.get(e.element);return i._buildPlayer(e,{},t)}));return this._playersById[e]=c,c.onDestroy(function(){return i.destroy(e)}),this.players.push(c),c},e.prototype.destroy=function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)},e.prototype._getPlayer=function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t},e.prototype.listen=function(e,t,n,r){var i=f(t,"","","");return h(this._getPlayer(e),n,i,r),function(){}},e.prototype.command=function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])},e}(),je=[],qe={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Re={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ie="__ng_removed",Ke=function(){function e(e,t){void 0===t&&(t=""),this.namespaceId=t;var n=e&&e.hasOwnProperty("value");if(this.value=function r(e){return null!=e?e:null}(n?e.value:e),n){var i=j(e);delete i.value,this.options=i}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(e.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),e.prototype.absorbOptions=function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach(function(e){null==n[e]&&(n[e]=t[e])})}},e}(),Qe=new Ke("void"),Be=function(){function e(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Ve(t,this._hostClassName)}return e.prototype.listen=function(e,t,n,r){var i=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+t+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+t+'" because the provided event is undefined!');if(!function o(e){return"start"==e||"done"==e}(n))throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+t+'" is not supported!');var s=y(this._elementListeners,e,[]),a={name:t,phase:n,callback:r};s.push(a);var u=y(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(Ve(e,"ng-trigger"),Ve(e,"ng-trigger-"+t),u[t]=Qe),function(){i._engine.afterFlush(function(){var e=s.indexOf(a);e>=0&&s.splice(e,1),i._triggers[t]||delete u[t]})}},e.prototype.register=function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)},e.prototype._getTrigger=function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'+e+'" has not been registered!');return t},e.prototype.trigger=function(e,t,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(t),s=new ze(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Ve(e,"ng-trigger"),Ve(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,a={}));var u=a[t],l=new Ke(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[t]=l,u||(u=Qe),"void"===l.value||u.value!==l.value){var c=y(this._engine.playersByElement,e,[]);c.forEach(function(e){e.namespaceId==i.id&&e.triggerName==t&&e.queued&&e.destroy()});var h=o.matchTransition(u.value,l.value,e,l.params),p=!1;if(!h){if(!r)return;h=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:u,toState:l,player:s,isFallbackTransition:p}),p||(Ve(e,"ng-animate-queued"),s.onStart(function(){Ge(e,"ng-animate-queued")})),s.onDone(function(){var t=i.players.indexOf(s);t>=0&&i.players.splice(t,1);var n=i._engine.playersByElement.get(e);if(n){var r=n.indexOf(s);r>=0&&n.splice(r,1)}}),this.players.push(s),c.push(s),s}if(!function f(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}(u.params,l.params)){var m=[],d=o.matchStyles(u.value,u.params,m),v=o.matchStyles(l.value,l.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(function(){B(e,d),Q(e,v)})}},e.prototype.deregister=function(e){var t=this;delete this._triggers[e],this._engine.statesByElement.forEach(function(t,n){delete t[e]}),this._elementListeners.forEach(function(n,r){t._elementListeners.set(r,n.filter(function(t){return t.name!=e}))})},e.prototype.clearElementCache=function(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);var t=this._engine.playersByElement.get(e);t&&(t.forEach(function(e){return e.destroy()}),this._engine.playersByElement.delete(e))},e.prototype._signalRemovalForInnerTriggers=function(e,t,n){var r=this;void 0===n&&(n=!1),this._engine.driver.query(e,".ng-trigger",!0).forEach(function(e){if(!e[Ie]){var n=r._engine.fetchNamespacesByElement(e);n.size?n.forEach(function(n){return n.triggerLeaveAnimation(e,t,!1,!0)}):r.clearElementCache(e)}})},e.prototype.triggerLeaveAnimation=function(e,t,n,r){var i=this,o=this._engine.statesByElement.get(e);if(o){var s=[];if(Object.keys(o).forEach(function(t){if(i._triggers[t]){var n=i.trigger(e,t,"void",r);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&l(s).onDone(function(){return i._engine.processLeaveNode(e)}),!0}return!1},e.prototype.prepareLeaveAnimationListeners=function(e){var t=this,n=this._elementListeners.get(e);if(n){var r=new Set;n.forEach(function(n){var i=n.name;if(!r.has(i)){r.add(i);var o=t._triggers[i].fallbackTransition,s=t._engine.statesByElement.get(e)[i]||Qe,a=new Ke("void"),u=new ze(t.id,i,e);t._engine.totalQueuedPlayers++,t._queue.push({element:e,triggerName:i,transition:o,fromState:s,toState:a,player:u,isFallbackTransition:!0})}})}},e.prototype.removeNode=function(e,t){var n=this,r=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t,!0),!this.triggerLeaveAnimation(e,t,!0)){var i=!1;if(r.totalAnimations){var o=r.players.length?r.playersByQueriedElement.get(e):[];if(o&&o.length)i=!0;else for(var s=e;s=s.parentNode;)if(r.statesByElement.get(s)){i=!0;break}}this.prepareLeaveAnimationListeners(e),i?r.markElementAsRemoved(this.id,e,!1,t):(r.afterFlush(function(){return n.clearElementCache(e)}),r.destroyInnerAnimations(e),r._onRemovalComplete(e,t))}},e.prototype.insertNode=function(e,t){Ve(e,this._hostClassName)},e.prototype.drainQueuedTransitions=function(e){var t=this,n=[];return this._queue.forEach(function(r){var i=r.player;if(!i.destroyed){var o=r.element,s=t._elementListeners.get(o);s&&s.forEach(function(t){if(t.name==r.triggerName){var n=f(o,r.triggerName,r.fromState.value,r.toState.value);n._data=e,h(r.player,t.phase,n,t.callback)}}),i.markedForDestroy?t._engine.afterFlush(function(){i.destroy()}):n.push(r)}}),this._queue=[],n.sort(function(e,n){var r=e.transition.ast.depCount,i=n.transition.ast.depCount;return 0==r||0==i?r-i:t._engine.driver.containsElement(e.element,n.element)?1:-1})},e.prototype.destroy=function(e){this.players.forEach(function(e){return e.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,e)},e.prototype.elementContainsData=function(e){var t=!1;return this._elementListeners.has(e)&&(t=!0),!!this._queue.find(function(t){return t.element===e})||t},e}(),Me=function(){function e(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(e,t){}}return e.prototype._onRemovalComplete=function(e,t){this.onRemovalComplete(e,t)},Object.defineProperty(e.prototype,"queuedPlayers",{get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e},enumerable:!0,configurable:!0}),e.prototype.createNamespace=function(e,t){var n=new Be(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n},e.prototype._balanceNamespaceList=function(e,t){var n=this._namespaceList.length-1;if(n>=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e},e.prototype.register=function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n},e.prototype.registerTrigger=function(e,t,n){var r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++},e.prototype.destroy=function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}},e.prototype._fetchNamespace=function(e){return this._namespaceLookup[e]},e.prototype.fetchNamespacesByElement=function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=n[r[i]].namespaceId;if(o){var s=this._fetchNamespace(o);s&&t.add(s)}}return t},e.prototype.trigger=function(e,t,n,r){if(Ue(t)){var i=this._fetchNamespace(e);if(i)return i.trigger(t,n,r),!0}return!1},e.prototype.insertNode=function(e,t,n,r){if(Ue(t)){var i=t[Ie];if(i&&i.setForRemoval){i.setForRemoval=!1,i.setForMove=!0;var o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){var s=this._fetchNamespace(e);s&&s.insertNode(t,n)}r&&this.collectEnterElement(t)}},e.prototype.collectEnterElement=function(e){this.collectedEnterElements.push(e)},e.prototype.markElementAsDisabled=function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Ve(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Ge(e,"ng-animate-disabled"))},e.prototype.removeNode=function(e,t,n){if(Ue(t)){var r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n)}else this._onRemovalComplete(t,n)},e.prototype.markElementAsRemoved=function(e,t,n,r){this.collectedLeaveElements.push(t),t[Ie]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},e.prototype.listen=function(e,t,n,r,i){return Ue(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}},e.prototype._buildInstruction=function(e,t,n,r,i){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,i)},e.prototype.destroyInnerAnimations=function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach(function(e){return t.finishActiveQueriedAnimationOnElement(e)})},e.prototype.destroyActiveAnimationsForElement=function(e){var t=this.playersByElement.get(e);t&&t.forEach(function(e){e.queued?e.markedForDestroy=!0:e.destroy()})},e.prototype.finishActiveQueriedAnimationOnElement=function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach(function(e){return e.finish()})},e.prototype.whenRenderingDone=function(){var e=this;return new Promise(function(t){if(e.players.length)return l(e.players).onDone(function(){return t()});t()})},e.prototype.processLeaveNode=function(e){var t=this,n=e[Ie];if(n&&n.setForRemoval){if(e[Ie]=qe,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(function(e){t.markElementAsDisabled(e,!1)})},e.prototype.flush=function(e){var t=this;void 0===e&&(e=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(e,n){return t._balanceNamespaceList(e,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r<this.collectedEnterElements.length;r++)Ve(this.collectedEnterElements[r],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var i=[];try{n=this._flushAnimations(i,e)}finally{for(r=0;r<i.length;r++)i[r]()}}else for(r=0;r<this.collectedLeaveElements.length;r++)this.processLeaveNode(this.collectedLeaveElements[r]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(e){return e()}),this._flushFns=[],this._whenQuietFns.length){var o=this._whenQuietFns;this._whenQuietFns=[],n.length?l(n).onDone(function(){o.forEach(function(e){return e()})}):o.forEach(function(e){return e()})}},e.prototype.reportError=function(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))},e.prototype._flushAnimations=function(e,n){var r=this,i=new he,s=[],u=new Map,c=[],h=new Map,p=new Map,f=new Map,m=new Set;this.disabledNodes.forEach(function(e){m.add(e);for(var t=r.driver.query(e,".ng-animate-queued",!0),n=0;n<t.length;n++)m.add(t[n])});var d=this.bodyNode,v=Array.from(this.statesByElement.keys()),g=He(v,this.collectedEnterElements),_=new Map,S=0;g.forEach(function(e,t){var n="ng-enter"+S++;_.set(t,n),e.forEach(function(e){return Ve(e,n)})});for(var E=[],b=new Set,T=new Set,w=0;w<this.collectedLeaveElements.length;w++)(z=(M=this.collectedLeaveElements[w])[Ie])&&z.setForRemoval&&(E.push(M),b.add(M),z.hasAnimation?this.driver.query(M,".ng-star-inserted",!0).forEach(function(e){return b.add(e)}):T.add(M));var P=new Map,k=He(v,Array.from(b));k.forEach(function(e,t){var n="ng-leave"+S++;P.set(t,n),e.forEach(function(e){return Ve(e,n)})}),e.push(function(){g.forEach(function(e,t){var n=_.get(t);e.forEach(function(e){return Ge(e,n)})}),k.forEach(function(e,t){var n=P.get(t);e.forEach(function(e){return Ge(e,n)})}),E.forEach(function(e){r.processLeaveNode(e)})});for(var A=[],N=[],O=this._namespaceList.length-1;O>=0;O--)this._namespaceList[O].drainQueuedTransitions(n).forEach(function(e){var t=e.player,n=e.element;if(A.push(t),r.collectedEnterElements.length){var o=n[Ie];if(o&&o.setForMove)return void t.destroy()}var a=!d||!r.driver.containsElement(d,n),u=P.get(n),l=_.get(n),m=r._buildInstruction(e,i,l,u,a);if(m.errors&&m.errors.length)N.push(m);else{if(a)return t.onStart(function(){return B(n,m.fromStyles)}),t.onDestroy(function(){return Q(n,m.toStyles)}),void s.push(t);if(e.isFallbackTransition)return t.onStart(function(){return B(n,m.fromStyles)}),t.onDestroy(function(){return Q(n,m.toStyles)}),void s.push(t);m.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),i.append(n,m.timelines),c.push({instruction:m,player:t,element:n}),m.queriedElements.forEach(function(e){return y(h,e,[]).push(t)}),m.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=p.get(t);r||p.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),m.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=f.get(t);r||f.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}});if(N.length){var C=[];N.forEach(function(e){C.push("@"+e.triggerName+" has failed due to:\n"),e.errors.forEach(function(e){return C.push("- "+e+"\n")})}),A.forEach(function(e){return e.destroy()}),this.reportError(C)}var F=new Map,D=new Map;c.forEach(function(e){var t=e.element;i.has(t)&&(D.set(t,t),r._beforeAnimationBuild(e.player.namespaceId,e.instruction,F))}),s.forEach(function(e){var t=e.element;r._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){y(F,t,[]).push(e),e.destroy()})});var L=E.filter(function(e){return Je(e,p,f)}),x=new Map;Ye(x,this.driver,T,f,t.AUTO_STYLE).forEach(function(e){Je(e,p,f)&&L.push(e)});var j=new Map;g.forEach(function(e,n){Ye(j,r.driver,new Set(e),p,t.ɵPRE_STYLE)}),L.forEach(function(e){var t=x.get(e),n=j.get(e);x.set(e,o({},t,n))});var q=[],R=[],I={};c.forEach(function(e){var t=e.element,n=e.player,o=e.instruction;if(i.has(t)){if(m.has(t))return n.onDestroy(function(){return Q(t,o.toStyles)}),n.disabled=!0,n.overrideTotalTime(o.totalTime),void s.push(n);var a=I;if(D.size>1){for(var c=t,h=[];c=c.parentNode;){var p=D.get(c);if(p){a=p;break}h.push(c)}h.forEach(function(e){return D.set(e,a)})}var f=r._buildAnimation(n.namespaceId,o,F,u,j,x);if(n.setRealPlayer(f),a===I)q.push(n);else{var y=r.playersByElement.get(a);y&&y.length&&(n.parentPlayer=l(y)),s.push(n)}}else B(t,o.fromStyles),n.onDestroy(function(){return Q(t,o.toStyles)}),R.push(n),m.has(t)&&s.push(n)}),R.forEach(function(e){var t=u.get(e.element);if(t&&t.length){var n=l(t);e.setRealPlayer(n)}}),s.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var K=0;K<E.length;K++){var M,z=(M=E[K])[Ie];if(Ge(M,"ng-leave"),!z||!z.hasAnimation){var U=[];if(h.size){var W=h.get(M);W&&W.length&&U.push.apply(U,a(W));for(var Y=this.driver.query(M,".ng-animating",!0),H=0;H<Y.length;H++){var $=h.get(Y[H]);$&&$.length&&U.push.apply(U,a($))}}var V=U.filter(function(e){return!e.destroyed});V.length?Ze(this,M,V):this.processLeaveNode(M)}}return E.length=0,q.forEach(function(e){r.players.push(e),e.onDone(function(){e.destroy();var t=r.players.indexOf(e);r.players.splice(t,1)}),e.play()}),q},e.prototype.elementContainsData=function(e,t){var n=!1,r=t[Ie];return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n},e.prototype.afterFlush=function(e){this._flushFns.push(e)},e.prototype.afterFlushAnimationsDone=function(e){this._whenQuietFns.push(e)},e.prototype._getPreviousPlayers=function(e,t,n,r,i){var o=[];if(t){var s=this.playersByQueriedElement.get(e);s&&(o=s)}else{var a=this.playersByElement.get(e);if(a){var u=!i||"void"==i;a.forEach(function(e){e.queued||(u||e.triggerName==r)&&o.push(e)})}}return(n||r)&&(o=o.filter(function(e){return!(n&&n!=e.namespaceId||r&&r!=e.triggerName)})),o},e.prototype._beforeAnimationBuild=function(e,t,n){var r,i,o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:t.triggerName,u=function(e){var r=e.element,i=r!==o,u=y(n,r,[]);l._getPreviousPlayers(r,i,s,a,t.toState).forEach(function(e){var t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),u.push(e)})},l=this;try{for(var c=function h(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(t.timelines),p=c.next();!p.done;p=c.next())u(p.value)}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}B(o,t.fromStyles)},e.prototype._buildAnimation=function(e,n,r,i,o,s){var a=this,u=n.triggerName,h=n.element,p=[],f=new Set,m=new Set,d=n.timelines.map(function(n){var l=n.element;f.add(l);var y=l[Ie];if(y&&y.removedBeforeQueried)return new t.NoopAnimationPlayer(n.duration,n.delay);var d=l!==h,v=function g(e){var n=[];return function e(n,r){for(var i=0;i<n.length;i++){var o=n[i];o instanceof t.ɵAnimationGroupPlayer?e(o.players,r):r.push(o)}}(e,n),n}((r.get(l)||je).map(function(e){return e.getRealPlayer()})).filter(function(e){return!!e.element&&e.element===l}),_=o.get(l),S=s.get(l),E=c(0,a._normalizer,0,n.keyframes,_,S),b=a._buildPlayer(n,E,v);if(n.subTimeline&&i&&m.add(l),d){var T=new ze(e,u,l);T.setRealPlayer(b),p.push(T)}return b});p.forEach(function(e){y(a.playersByQueriedElement,e.element,[]).push(e),e.onDone(function(){return function t(e,n,r){var i;if(e instanceof Map){if(i=e.get(n)){if(i.length){var o=i.indexOf(r);i.splice(o,1)}0==i.length&&e.delete(n)}}else(i=e[n])&&(i.length&&(o=i.indexOf(r),i.splice(o,1)),0==i.length&&delete e[n]);return i}(a.playersByQueriedElement,e.element,e)})}),f.forEach(function(e){return Ve(e,"ng-animating")});var v=l(d);return v.onDestroy(function(){f.forEach(function(e){return Ge(e,"ng-animating")}),Q(h,n.toStyles)}),m.forEach(function(e){y(i,e,[]).push(v)}),v},e.prototype._buildPlayer=function(e,n,r){return n.length>0?this.driver.animate(e.element,n,e.duration,e.delay,e.easing,r):new t.NoopAnimationPlayer(e.duration,e.delay)},e}(),ze=function(){function e(e,n,r){this.namespaceId=e,this.triggerName=n,this.element=r,this._player=new t.NoopAnimationPlayer,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return e.prototype.setRealPlayer=function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(function(n){t._queuedCallbacks[n].forEach(function(t){return h(e,n,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)},e.prototype.getRealPlayer=function(){return this._player},e.prototype.overrideTotalTime=function(e){this.totalTime=e},e.prototype.syncPlayerEvents=function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart(function(){return n.triggerCallback("start")}),e.onDone(function(){return t.finish()}),e.onDestroy(function(){return t.destroy()})},e.prototype._queueEvent=function(e,t){y(this._queuedCallbacks,e,[]).push(t)},e.prototype.onDone=function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)},e.prototype.onStart=function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)},e.prototype.onDestroy=function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)},e.prototype.init=function(){this._player.init()},e.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},e.prototype.play=function(){!this.queued&&this._player.play()},e.prototype.pause=function(){!this.queued&&this._player.pause()},e.prototype.restart=function(){!this.queued&&this._player.restart()},e.prototype.finish=function(){this._player.finish()},e.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},e.prototype.reset=function(){!this.queued&&this._player.reset()},e.prototype.setPosition=function(e){this.queued||this._player.setPosition(e)},e.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},e.prototype.triggerCallback=function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)},e}();function Ue(e){return e&&1===e.nodeType}function We(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function Ye(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(We(e))});var s=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r[Ie]=Re,s.push(r))}),e.set(r,o)});var a=0;return n.forEach(function(e){return We(e,o[a++])}),s}function He(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;return t.forEach(function(e){var t=function e(t){if(!t)return 1;var o=i.get(t);if(o)return o;var s=t.parentNode;return o=n.has(s)?s:r.has(s)?1:e(s),i.set(t,o),o}(e);1!==t&&n.get(t).push(e)}),n}var $e="$$classes";function Ve(e,t){if(e.classList)e.classList.add(t);else{var n=e[$e];n||(n=e[$e]={}),n[t]=!0}}function Ge(e,t){if(e.classList)e.classList.remove(t);else{var n=e[$e];n&&delete n[t]}}function Ze(e,t,n){l(n).onDone(function(){return e.processLeaveNode(t)})}function Je(e,t,n){var r=n.get(e);if(!r)return!1;var i=t.get(e);return i?r.forEach(function(e){return i.add(e)}):t.set(e,r),n.delete(e),!0}var Xe=function(){function e(e,t,n){var r=this;this.bodyNode=e,this._driver=t,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new Me(e,t,n),this._timelineEngine=new xe(e,t,n),this._transitionEngine.onRemovalComplete=function(e,t){return r.onRemovalComplete(e,t)}}return e.prototype.registerTrigger=function(e,t,n,r,i){var o=e+"-"+r,s=this._triggerCache[o];if(!s){var a=[],u=ie(this._driver,i,a);if(a.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function l(e,t){return new Fe(e,t)}(r,u),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(t,r,s)},e.prototype.register=function(e,t){this._transitionEngine.register(e,t)},e.prototype.destroy=function(e,t){this._transitionEngine.destroy(e,t)},e.prototype.onInsert=function(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)},e.prototype.onRemove=function(e,t,n){this._transitionEngine.removeNode(e,t,n)},e.prototype.disableAnimations=function(e,t){this._transitionEngine.markElementAsDisabled(e,t)},e.prototype.process=function(e,t,n,r){if("@"==n.charAt(0)){var i=s(m(n),2);this._timelineEngine.command(i[0],t,i[1],r)}else this._transitionEngine.trigger(e,t,n,r)},e.prototype.listen=function(e,t,n,r,i){if("@"==n.charAt(0)){var o=s(m(n),2);return this._timelineEngine.listen(o[0],t,o[1],i)}return this._transitionEngine.listen(e,t,n,r,i)},e.prototype.flush=function(e){void 0===e&&(e=-1),this._transitionEngine.flush(e)},Object.defineProperty(e.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),e.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},e}(),et="animation",tt="animationend",nt=function(){function e(e,t,n,r,i,o,s){var a=this;this._element=e,this._name=t,this._duration=n,this._delay=r,this._easing=i,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(e){return a._handleCallback(e)}}return e.prototype.apply=function(){!function e(t,n){var r=ut(t,"").trim();r.length&&(function i(e,t){for(var n=0,r=0;r<e.length;r++)e.charAt(r)===t&&n++;return n}(r,",")+1,n=r+", "+n),at(t,"",n)}(this._element,this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name),st(this._element,this._eventFn,!1),this._startTime=Date.now()},e.prototype.pause=function(){rt(this._element,this._name,"paused")},e.prototype.resume=function(){rt(this._element,this._name,"running")},e.prototype.setPosition=function(e){var t=it(this._element,this._name);this._position=e*this._duration,at(this._element,"Delay","-"+this._position+"ms",t)},e.prototype.getPosition=function(){return this._position},e.prototype._handleCallback=function(e){var t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()},e.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),st(this._element,this._eventFn,!0))},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.finish(),function e(t,n){var r=ut(t,"").split(","),i=ot(r,n);i>=0&&(r.splice(i,1),at(t,"",r.join(",")))}(this._element,this._name))},e}();
27
+ */var Lt=new ct,jt=function(){function t(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],r=it(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r},t.prototype._buildPlayer=function(t,e,n){var r=t.element,i=h(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,i,t.duration,t.delay,t.easing,[],!0)},t.prototype.create=function(t,n,r){var i=this;void 0===r&&(r={});var o,s=[],a=this._animations[t],u=new Map;if(a?(o=yt(this._driver,n,a,"ng-enter","ng-leave",{},{},r,Lt,s)).forEach(function(t){var e=y(u,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(s.push("The requested animation doesn't exist or has already been destroyed"),o=[]),s.length)throw new Error("Unable to create the animation due to the following errors: "+s.join("\n"));u.forEach(function(t,n){Object.keys(t).forEach(function(r){t[r]=i._driver.computeStyle(n,r,e.AUTO_STYLE)})});var h=l(o.map(function(t){var e=u.get(t.element);return i._buildPlayer(t,{},e)}));return this._playersById[t]=h,h.onDestroy(function(){return i.destroy(t)}),this.players.push(h),h},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,r){var i=f(e,"","","");return c(this._getPlayer(t),n,i,r),function(){}},t.prototype.command=function(t,e,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,r[0]||{});else this.register(t,r[0])},t}(),xt=[],qt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Rt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},It="__ng_removed",Kt=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n=t&&t.hasOwnProperty("value");if(this.value=function r(t){return null!=t?t:null}(n?t.value:t),n){var i=x(t);delete i.value,this.options=i}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),Qt=new Kt("void"),Bt=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Vt(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,r){var i=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if(!function o(t){return"start"==t||"done"==t}(n))throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var s=y(this._elementListeners,t,[]),a={name:e,phase:n,callback:r};s.push(a);var u=y(this._engine.statesByElement,t,{});return u.hasOwnProperty(e)||(Vt(t,"ng-trigger"),Vt(t,"ng-trigger-"+e),u[e]=Qt),function(){i._engine.afterFlush(function(){var t=s.indexOf(a);t>=0&&s.splice(t,1),i._triggers[e]||delete u[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(e),s=new zt(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Vt(t,"ng-trigger"),Vt(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,a={}));var u=a[e],l=new Kt(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[e]=l,u||(u=Qt),"void"===l.value||u.value!==l.value){var h=y(this._engine.playersByElement,t,[]);h.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var c=o.matchTransition(u.value,l.value,t,l.params),p=!1;if(!c){if(!r)return;c=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:c,fromState:u,toState:l,player:s,isFallbackTransition:p}),p||(Vt(t,"ng-animate-queued"),s.onStart(function(){Gt(t,"ng-animate-queued")})),s.onDone(function(){var e=i.players.indexOf(s);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(s);r>=0&&n.splice(r,1)}}),this.players.push(s),h.push(s),s}if(!function f(t,e){var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!e.hasOwnProperty(o)||t[o]!==e[o])return!1}return!0}(u.params,l.params)){var m=[],d=o.matchStyles(u.value,u.params,m),v=o.matchStyles(l.value,l.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(function(){B(t,d),Q(t,v)})}},t.prototype.deregister=function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,r){e._elementListeners.set(r,n.filter(function(e){return e.name!=t}))})},t.prototype.clearElementCache=function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))},t.prototype._signalRemovalForInnerTriggers=function(t,e,n){var r=this;void 0===n&&(n=!1),this._engine.driver.query(t,".ng-trigger",!0).forEach(function(t){if(!t[It]){var n=r._engine.fetchNamespacesByElement(t);n.size?n.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):r.clearElementCache(t)}})},t.prototype.triggerLeaveAnimation=function(t,e,n,r){var i=this,o=this._engine.statesByElement.get(t);if(o){var s=[];if(Object.keys(o).forEach(function(e){if(i._triggers[e]){var n=i.trigger(t,e,"void",r);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&l(s).onDone(function(){return i._engine.processLeaveNode(t)}),!0}return!1},t.prototype.prepareLeaveAnimationListeners=function(t){var e=this,n=this._elementListeners.get(t);if(n){var r=new Set;n.forEach(function(n){var i=n.name;if(!r.has(i)){r.add(i);var o=e._triggers[i].fallbackTransition,s=e._engine.statesByElement.get(t)[i]||Qt,a=new Kt("void"),u=new zt(e.id,i,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:i,transition:o,fromState:s,toState:a,player:u,isFallbackTransition:!0})}})}},t.prototype.removeNode=function(t,e){var n=this,r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e,!0),!this.triggerLeaveAnimation(t,e,!0)){var i=!1;if(r.totalAnimations){var o=r.players.length?r.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else for(var s=t;s=s.parentNode;)if(r.statesByElement.get(s)){i=!0;break}}this.prepareLeaveAnimationListeners(t),i?r.markElementAsRemoved(this.id,t,!1,e):(r.afterFlush(function(){return n.clearElementCache(t)}),r.destroyInnerAnimations(t),r._onRemovalComplete(t,e))}},t.prototype.insertNode=function(t,e){Vt(t,this._hostClassName)},t.prototype.drainQueuedTransitions=function(t){var e=this,n=[];return this._queue.forEach(function(r){var i=r.player;if(!i.destroyed){var o=r.element,s=e._elementListeners.get(o);s&&s.forEach(function(e){if(e.name==r.triggerName){var n=f(o,r.triggerName,r.fromState.value,r.toState.value);n._data=t,c(r.player,e.phase,n,e.callback)}}),i.markedForDestroy?e._engine.afterFlush(function(){i.destroy()}):n.push(r)}}),this._queue=[],n.sort(function(t,n){var r=t.transition.ast.depCount,i=n.transition.ast.depCount;return 0==r||0==i?r-i:e._engine.driver.containsElement(t.element,n.element)?1:-1})},t.prototype.destroy=function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)},t.prototype.elementContainsData=function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(function(e){return e.element===t})||e},t}(),Mt=function(){function t(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return t.prototype._onRemovalComplete=function(t,e){this.onRemovalComplete(t,e)},Object.defineProperty(t.prototype,"queuedPlayers",{get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t},enumerable:!0,configurable:!0}),t.prototype.createNamespace=function(t,e){var n=new Bt(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n},t.prototype._balanceNamespaceList=function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,e)){this._namespaceList.splice(i+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var r=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(r);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=n[r[i]].namespaceId;if(o){var s=this._fetchNamespace(o);s&&e.add(s)}}return e},t.prototype.trigger=function(t,e,n,r){if(Ut(e)){var i=this._fetchNamespace(t);if(i)return i.trigger(e,n,r),!0}return!1},t.prototype.insertNode=function(t,e,n,r){if(Ut(e)){var i=e[It];if(i&&i.setForRemoval){i.setForRemoval=!1,i.setForMove=!0;var o=this.collectedLeaveElements.indexOf(e);o>=0&&this.collectedLeaveElements.splice(o,1)}if(t){var s=this._fetchNamespace(t);s&&s.insertNode(e,n)}r&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Vt(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Gt(t,"ng-animate-disabled"))},t.prototype.removeNode=function(t,e,n){if(Ut(e)){var r=t?this._fetchNamespace(t):null;r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,r){this.collectedLeaveElements.push(e),e[It]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,r,i){return Ut(e)?this._fetchNamespace(t).listen(e,n,r,i):function(){}},t.prototype._buildInstruction=function(t,e,n,r,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,i)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return l(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[It];if(n&&n.setForRemoval){if(t[It]=qt,n.namespaceId){this.destroyInnerAnimations(t);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(function(t){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r<this.collectedEnterElements.length;r++)Vt(this.collectedEnterElements[r],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var i=[];try{n=this._flushAnimations(i,t)}finally{for(r=0;r<i.length;r++)i[r]()}}else for(r=0;r<this.collectedLeaveElements.length;r++)this.processLeaveNode(this.collectedLeaveElements[r]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(function(t){return t()}),this._flushFns=[],this._whenQuietFns.length){var o=this._whenQuietFns;this._whenQuietFns=[],n.length?l(n).onDone(function(){o.forEach(function(t){return t()})}):o.forEach(function(t){return t()})}},t.prototype.reportError=function(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))},t.prototype._flushAnimations=function(t,n){var r=this,i=new ct,s=[],u=new Map,h=[],c=new Map,p=new Map,f=new Map,m=new Set;this.disabledNodes.forEach(function(t){m.add(t);for(var e=r.driver.query(t,".ng-animate-queued",!0),n=0;n<e.length;n++)m.add(e[n])});var d=this.bodyNode,v=Array.from(this.statesByElement.keys()),g=Ht(v,this.collectedEnterElements),_=new Map,S=0;g.forEach(function(t,e){var n="ng-enter"+S++;_.set(e,n),t.forEach(function(t){return Vt(t,n)})});for(var E=[],b=new Set,T=new Set,w=0;w<this.collectedLeaveElements.length;w++)(z=(M=this.collectedLeaveElements[w])[It])&&z.setForRemoval&&(E.push(M),b.add(M),z.hasAnimation?this.driver.query(M,".ng-star-inserted",!0).forEach(function(t){return b.add(t)}):T.add(M));var P=new Map,k=Ht(v,Array.from(b));k.forEach(function(t,e){var n="ng-leave"+S++;P.set(e,n),t.forEach(function(t){return Vt(t,n)})}),t.push(function(){g.forEach(function(t,e){var n=_.get(e);t.forEach(function(t){return Gt(t,n)})}),k.forEach(function(t,e){var n=P.get(e);t.forEach(function(t){return Gt(t,n)})}),E.forEach(function(t){r.processLeaveNode(t)})});for(var A=[],N=[],O=this._namespaceList.length-1;O>=0;O--)this._namespaceList[O].drainQueuedTransitions(n).forEach(function(t){var e=t.player,n=t.element;if(A.push(e),r.collectedEnterElements.length){var o=n[It];if(o&&o.setForMove)return void e.destroy()}var a=!d||!r.driver.containsElement(d,n),u=P.get(n),l=_.get(n),m=r._buildInstruction(t,i,l,u,a);if(m.errors&&m.errors.length)N.push(m);else{if(a)return e.onStart(function(){return B(n,m.fromStyles)}),e.onDestroy(function(){return Q(n,m.toStyles)}),void s.push(e);if(t.isFallbackTransition)return e.onStart(function(){return B(n,m.fromStyles)}),e.onDestroy(function(){return Q(n,m.toStyles)}),void s.push(e);m.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(n,m.timelines),h.push({instruction:m,player:e,element:n}),m.queriedElements.forEach(function(t){return y(c,t,[]).push(e)}),m.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var r=p.get(e);r||p.set(e,r=new Set),n.forEach(function(t){return r.add(t)})}}),m.postStyleProps.forEach(function(t,e){var n=Object.keys(t),r=f.get(e);r||f.set(e,r=new Set),n.forEach(function(t){return r.add(t)})})}});if(N.length){var C=[];N.forEach(function(t){C.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return C.push("- "+t+"\n")})}),A.forEach(function(t){return t.destroy()}),this.reportError(C)}var F=new Map,D=new Map;h.forEach(function(t){var e=t.element;i.has(e)&&(D.set(e,e),r._beforeAnimationBuild(t.player.namespaceId,t.instruction,F))}),s.forEach(function(t){var e=t.element;r._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){y(F,e,[]).push(t),t.destroy()})});var L=E.filter(function(t){return Jt(t,p,f)}),j=new Map;Yt(j,this.driver,T,f,e.AUTO_STYLE).forEach(function(t){Jt(t,p,f)&&L.push(t)});var x=new Map;g.forEach(function(t,n){Yt(x,r.driver,new Set(t),p,e.ɵPRE_STYLE)}),L.forEach(function(t){var e=j.get(t),n=x.get(t);j.set(t,o({},e,n))});var q=[],R=[],I={};h.forEach(function(t){var e=t.element,n=t.player,o=t.instruction;if(i.has(e)){if(m.has(e))return n.onDestroy(function(){return Q(e,o.toStyles)}),n.disabled=!0,n.overrideTotalTime(o.totalTime),void s.push(n);var a=I;if(D.size>1){for(var h=e,c=[];h=h.parentNode;){var p=D.get(h);if(p){a=p;break}c.push(h)}c.forEach(function(t){return D.set(t,a)})}var f=r._buildAnimation(n.namespaceId,o,F,u,x,j);if(n.setRealPlayer(f),a===I)q.push(n);else{var y=r.playersByElement.get(a);y&&y.length&&(n.parentPlayer=l(y)),s.push(n)}}else B(e,o.fromStyles),n.onDestroy(function(){return Q(e,o.toStyles)}),R.push(n),m.has(e)&&s.push(n)}),R.forEach(function(t){var e=u.get(t.element);if(e&&e.length){var n=l(e);t.setRealPlayer(n)}}),s.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var K=0;K<E.length;K++){var M,z=(M=E[K])[It];if(Gt(M,"ng-leave"),!z||!z.hasAnimation){var U=[];if(c.size){var W=c.get(M);W&&W.length&&U.push.apply(U,a(W));for(var Y=this.driver.query(M,".ng-animating",!0),H=0;H<Y.length;H++){var $=c.get(Y[H]);$&&$.length&&U.push.apply(U,a($))}}var V=U.filter(function(t){return!t.destroyed});V.length?Zt(this,M,V):this.processLeaveNode(M)}}return E.length=0,q.forEach(function(t){r.players.push(t),t.onDone(function(){t.destroy();var e=r.players.indexOf(t);r.players.splice(e,1)}),t.play()}),q},t.prototype.elementContainsData=function(t,e){var n=!1,r=e[It];return r&&r.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n},t.prototype.afterFlush=function(t){this._flushFns.push(t)},t.prototype.afterFlushAnimationsDone=function(t){this._whenQuietFns.push(t)},t.prototype._getPreviousPlayers=function(t,e,n,r,i){var o=[];if(e){var s=this.playersByQueriedElement.get(t);s&&(o=s)}else{var a=this.playersByElement.get(t);if(a){var u=!i||"void"==i;a.forEach(function(t){t.queued||(u||t.triggerName==r)&&o.push(t)})}}return(n||r)&&(o=o.filter(function(t){return!(n&&n!=t.namespaceId||r&&r!=t.triggerName)})),o},t.prototype._beforeAnimationBuild=function(t,e,n){var r,i,o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName,u=function(t){var r=t.element,i=r!==o,u=y(n,r,[]);l._getPreviousPlayers(r,i,s,a,e.toState).forEach(function(t){var e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),u.push(t)})},l=this;try{for(var h=function c(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}(e.timelines),p=h.next();!p.done;p=h.next())u(p.value)}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}B(o,e.fromStyles)},t.prototype._buildAnimation=function(t,n,r,i,o,s){var a=this,u=n.triggerName,c=n.element,p=[],f=new Set,m=new Set,d=n.timelines.map(function(n){var l=n.element;f.add(l);var y=l[It];if(y&&y.removedBeforeQueried)return new e.NoopAnimationPlayer(n.duration,n.delay);var d=l!==c,v=function g(t){var n=[];return function t(n,r){for(var i=0;i<n.length;i++){var o=n[i];o instanceof e.ɵAnimationGroupPlayer?t(o.players,r):r.push(o)}}(t,n),n}((r.get(l)||xt).map(function(t){return t.getRealPlayer()})).filter(function(t){return!!t.element&&t.element===l}),_=o.get(l),S=s.get(l),E=h(0,a._normalizer,0,n.keyframes,_,S),b=a._buildPlayer(n,E,v);if(n.subTimeline&&i&&m.add(l),d){var T=new zt(t,u,l);T.setRealPlayer(b),p.push(T)}return b});p.forEach(function(t){y(a.playersByQueriedElement,t.element,[]).push(t),t.onDone(function(){return function e(t,n,r){var i;if(t instanceof Map){if(i=t.get(n)){if(i.length){var o=i.indexOf(r);i.splice(o,1)}0==i.length&&t.delete(n)}}else(i=t[n])&&(i.length&&(o=i.indexOf(r),i.splice(o,1)),0==i.length&&delete t[n]);return i}(a.playersByQueriedElement,t.element,t)})}),f.forEach(function(t){return Vt(t,"ng-animating")});var v=l(d);return v.onDestroy(function(){f.forEach(function(t){return Gt(t,"ng-animating")}),Q(c,n.toStyles)}),m.forEach(function(t){y(i,t,[]).push(v)}),v},t.prototype._buildPlayer=function(t,n,r){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,r):new e.NoopAnimationPlayer(t.duration,t.delay)},t}(),zt=function(){function t(t,n,r){this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new e.NoopAnimationPlayer,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return c(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.overrideTotalTime=function(t){this.totalTime=t},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){y(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function Ut(t){return t&&1===t.nodeType}function Wt(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Yt(t,e,n,r,i){var o=[];n.forEach(function(t){return o.push(Wt(t))});var s=[];r.forEach(function(n,r){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(r,t,i);n&&0!=n.length||(r[It]=Rt,s.push(r))}),t.set(r,o)});var a=0;return n.forEach(function(t){return Wt(t,o[a++])}),s}function Ht(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var r=new Set(e),i=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return 1;var o=i.get(e);if(o)return o;var s=e.parentNode;return o=n.has(s)?s:r.has(s)?1:t(s),i.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}var $t="$$classes";function Vt(t,e){if(t.classList)t.classList.add(e);else{var n=t[$t];n||(n=t[$t]={}),n[e]=!0}}function Gt(t,e){if(t.classList)t.classList.remove(e);else{var n=t[$t];n&&delete n[e]}}function Zt(t,e,n){l(n).onDone(function(){return t.processLeaveNode(e)})}function Jt(t,e,n){var r=n.get(t);if(!r)return!1;var i=e.get(t);return i?r.forEach(function(t){return i.add(t)}):e.set(t,r),n.delete(t),!0}var Xt=function(){function t(t,e,n){var r=this;this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new Mt(t,e,n),this._timelineEngine=new jt(t,e,n),this._transitionEngine.onRemovalComplete=function(t,e){return r.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,r,i){var o=t+"-"+r,s=this._triggerCache[o];if(!s){var a=[],u=it(this._driver,i,a);if(a.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function l(t,e){return new Ft(t,e)}(r,u),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(e,r,s)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,r){if("@"==n.charAt(0)){var i=s(m(n),2);this._timelineEngine.command(i[0],e,i[1],r)}else this._transitionEngine.trigger(t,e,n,r)},t.prototype.listen=function(t,e,n,r,i){if("@"==n.charAt(0)){var o=s(m(n),2);return this._timelineEngine.listen(o[0],e,o[1],i)}return this._transitionEngine.listen(t,e,n,r,i)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}();
28
28
  /**
29
29
  * @license
30
30
  * Copyright Google Inc. All Rights Reserved.
31
31
  *
32
32
  * Use of this source code is governed by an MIT-style license that can be
33
33
  * found in the LICENSE file at https://angular.io/license
34
- */function rt(e,t,n){at(e,"PlayState",n,it(e,t))}function it(e,t){var n=ut(e,"");return n.indexOf(",")>0?ot(n.split(","),t):ot([n],t)}function ot(e,t){for(var n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function st(e,t,n){n?e.removeEventListener(tt,t):e.addEventListener(tt,t)}function at(e,t,n,r){var i=et+t;if(null!=r){var o=e.style[i];if(o.length){var s=o.split(",");s[r]=n,n=s.join(",")}}e.style[i]=n}function ut(e,t){return e.style[et+t]}var lt="linear",ct=function(){function e(e,t,n,r,i,o,s){this.element=e,this.keyframes=t,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||lt,this.totalTime=r+i,this._buildStyler()}return e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]},e.prototype._flushStartFns=function(){this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[]},e.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},e.prototype.setPosition=function(e){this._styler.setPosition(e)},e.prototype.getPosition=function(){return this._styler.getPosition()},e.prototype.hasStarted=function(){return this._state>=2},e.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},e.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2),this._styler.resume()},e.prototype.pause=function(){this.init(),this._styler.pause()},e.prototype.restart=function(){this.reset(),this.play()},e.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},e.prototype._buildStyler=function(){var e=this;this._styler=new nt(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return e.finish()})},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e.prototype.beforeDestroy=function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:J(e.element,r))})}this.currentSnapshot=t},e}(),ht=function(e){function t(t,n){var r=e.call(this)||this;return r.element=t,r._startingStyles={},r.__initialized=!1,r._styles=N(n),r}return i(t,e),t.prototype.init=function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(e){t._startingStyles[e]=t.element.style[e]}),e.prototype.init.call(this))},t.prototype.play=function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(e){return t.element.style.setProperty(e,t._styles[e])}),e.prototype.play.call(this))},t.prototype.destroy=function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)}),this._startingStyles=null,e.prototype.destroy.call(this))},t}(t.NoopAnimationPlayer),pt=function(){function e(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return e.prototype.validateStyleProperty=function(e){return w(e)},e.prototype.matchesElement=function(e,t){return P(e,t)},e.prototype.containsElement=function(e,t){return k(e,t)},e.prototype.query=function(e,t,n){return A(e,t,n)},e.prototype.computeStyle=function(e,t,n){return window.getComputedStyle(e)[t]},e.prototype.buildKeyframeElement=function(e,t,n){var r="@keyframes "+t+" {\n",i="";(n=n.map(function(e){return N(e)})).forEach(function(e){i=" ";var t=parseFloat(e.offset);r+=""+i+100*t+"% {\n",i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+=i+"animation-timing-function: "+n+";\n"));default:return void(r+=""+i+t+": "+n+";\n")}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.innerHTML=r,o},e.prototype.animate=function(e,t,n,r,i,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(e){return e instanceof ct}),u={};V(n,r)&&a.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var l=function c(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach(function(e){Object.keys(e).forEach(function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=G(e,t,u));if(0==n)return new ht(e,l);var h="gen_css_kf_"+this._count++,p=this.buildKeyframeElement(e,h,t);document.querySelector("head").appendChild(p);var f=new ct(e,t,h,n,r,i,l);return f.onDestroy(function(){return function e(t){t.parentNode.removeChild(t)}(p)}),f},e.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},e}(),ft=function(){function e(e,t,n){this.element=e,this.keyframes=t,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return e.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])},e.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},e.prototype._buildPlayer=function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",function(){return e._onFinish()})}},e.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},e.prototype._triggerWebAnimation=function(e,t,n){return e.animate(t,n)},e.prototype.onStart=function(e){this._onStartFns.push(e)},e.prototype.onDone=function(e){this._onDoneFns.push(e)},e.prototype.onDestroy=function(e){this._onDestroyFns.push(e)},e.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},e.prototype.pause=function(){this.init(),this.domPlayer.pause()},e.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},e.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},e.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},e.prototype.restart=function(){this.reset(),this.play()},e.prototype.hasStarted=function(){return this._started},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])},e.prototype.setPosition=function(e){this.domPlayer.currentTime=e*this.time},e.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(e.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),e.prototype.beforeDestroy=function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:J(e.element,n))}),this.currentSnapshot=t},e.prototype.triggerCallback=function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0},e}(),yt=function(){function e(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(mt().toString()),this._cssKeyframesDriver=new pt}return e.prototype.validateStyleProperty=function(e){return w(e)},e.prototype.matchesElement=function(e,t){return P(e,t)},e.prototype.containsElement=function(e,t){return k(e,t)},e.prototype.query=function(e,t,n){return A(e,t,n)},e.prototype.computeStyle=function(e,t,n){return window.getComputedStyle(e)[t]},e.prototype.overrideWebAnimationsSupport=function(e){this._isNativeImpl=e},e.prototype.animate=function(e,t,n,r,i,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,r,i,o);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var u={},l=o.filter(function(e){return e instanceof ft});return V(n,r)&&l.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})}),t=G(e,t=t.map(function(e){return R(e,!1)}),u),new ft(e,t,a)},e}();function mt(){return function e(){return"undefined"!=typeof window&&void 0!==window.document}()&&Element.prototype.animate||{}}
34
+ */function te(t,e){var n=null,r=null;return Array.isArray(e)&&e.length?(n=ne(e[0]),e.length>1&&(r=ne(e[e.length-1]))):e&&(n=ne(e)),n||r?new ee(t,n,r):null}var ee=function(){function t(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;var i=t.initialStylesByElement.get(e);i||t.initialStylesByElement.set(e,i={}),this._initialStyles=i}return t.prototype.start=function(){this._state<1&&(this._startStyles&&Q(this._element,this._startStyles,this._initialStyles),this._state=1)},t.prototype.finish=function(){this.start(),this._state<2&&(Q(this._element,this._initialStyles),this._endStyles&&(Q(this._element,this._endStyles),this._endStyles=null),this._state=1)},t.prototype.destroy=function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(B(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(B(this._element,this._endStyles),this._endStyles=null),Q(this._element,this._initialStyles),this._state=3)},t.initialStylesByElement=new WeakMap,t}();function ne(t){for(var e=null,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];re(i)&&((e=e||{})[i]=t[i])}return e}function re(t){return"display"===t||"position"===t}
35
+ /**
36
+ * @license
37
+ * Copyright Google Inc. All Rights Reserved.
38
+ *
39
+ * Use of this source code is governed by an MIT-style license that can be
40
+ * found in the LICENSE file at https://angular.io/license
41
+ */var ie="animation",oe="animationend",se=function(){function t(t,e,n,r,i,o,s){var a=this;this._element=t,this._name=e,this._duration=n,this._delay=r,this._easing=i,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return a._handleCallback(t)}}return t.prototype.apply=function(){!function t(e,n){var r=pe(e,"").trim();r.length&&(function i(t,e){for(var n=0,r=0;r<t.length;r++)t.charAt(r)===e&&n++;return n}(r,",")+1,n=r+", "+n),ce(e,"",n)}(this._element,this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name),he(this._element,this._eventFn,!1),this._startTime=Date.now()},t.prototype.pause=function(){ae(this._element,this._name,"paused")},t.prototype.resume=function(){ae(this._element,this._name,"running")},t.prototype.setPosition=function(t){var e=ue(this._element,this._name);this._position=t*this._duration,ce(this._element,"Delay","-"+this._position+"ms",e)},t.prototype.getPosition=function(){return this._position},t.prototype._handleCallback=function(t){var e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()},t.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),he(this._element,this._eventFn,!0))},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.finish(),function t(e,n){var r=pe(e,"").split(","),i=le(r,n);i>=0&&(r.splice(i,1),ce(e,"",r.join(",")))}(this._element,this._name))},t}();function ae(t,e,n){ce(t,"PlayState",n,ue(t,e))}function ue(t,e){var n=pe(t,"");return n.indexOf(",")>0?le(n.split(","),e):le([n],e)}function le(t,e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function he(t,e,n){n?t.removeEventListener(oe,e):t.addEventListener(oe,e)}function ce(t,e,n,r){var i=ie+e;if(null!=r){var o=t.style[i];if(o.length){var s=o.split(",");s[r]=n,n=s.join(",")}}t.style[i]=n}function pe(t,e){return t.style[ie+e]}var fe="linear",ye=function(){function t(t,e,n,r,i,o,s,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=s,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||fe,this.totalTime=r+i,this._buildStyler()}return t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]},t.prototype._flushStartFns=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())},t.prototype.setPosition=function(t){this._styler.setPosition(t)},t.prototype.getPosition=function(){return this._styler.getPosition()},t.prototype.hasStarted=function(){return this._state>=2},t.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},t.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()},t.prototype.pause=function(){this.init(),this._styler.pause()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},t.prototype._buildStyler=function(){var t=this;this._styler=new se(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t.prototype.beforeDestroy=function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(e[r]=n?t._finalStyles[r]:J(t.element,r))})}this.currentSnapshot=e},t}(),me=function(t){function e(e,n){var r=t.call(this)||this;return r.element=e,r._startingStyles={},r.__initialized=!1,r._styles=N(n),r}return i(e,t),e.prototype.init=function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),t.prototype.init.call(this))},e.prototype.play=function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),t.prototype.play.call(this))},e.prototype.destroy=function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,t.prototype.destroy.call(this))},e}(e.NoopAnimationPlayer),de=function(){function t(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return t.prototype.validateStyleProperty=function(t){return w(t)},t.prototype.matchesElement=function(t,e){return P(t,e)},t.prototype.containsElement=function(t,e){return k(t,e)},t.prototype.query=function(t,e,n){return A(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.buildKeyframeElement=function(t,e,n){var r="@keyframes "+e+" {\n",i="";(n=n.map(function(t){return N(t)})).forEach(function(t){i=" ";var e=parseFloat(t.offset);r+=""+i+100*e+"% {\n",i+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=i+"animation-timing-function: "+n+";\n"));default:return void(r+=""+i+e+": "+n+";\n")}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.innerHTML=r,o},t.prototype.animate=function(t,e,n,r,i,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(t){return t instanceof ye}),u={};V(n,r)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})});var l=function h(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=G(t,e,u));if(0==n)return new me(t,l);var c="gen_css_kf_"+this._count++,p=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(p);var f=te(t,e),y=new ye(t,e,c,n,r,i,l,f);return y.onDestroy(function(){return function t(e){e.parentNode.removeChild(e)}(p)}),y},t.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},t}(),ve=function(){function t(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:J(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),ge=function(){function t(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(_e().toString()),this._cssKeyframesDriver=new de}return t.prototype.validateStyleProperty=function(t){return w(t)},t.prototype.matchesElement=function(t,e){return P(t,e)},t.prototype.containsElement=function(t,e){return k(t,e)},t.prototype.query=function(t,e,n){return A(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.overrideWebAnimationsSupport=function(t){this._isNativeImpl=t},t.prototype.animate=function(t,e,n,r,i,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,i,o);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var u={},l=o.filter(function(t){return t instanceof ve});V(n,r)&&l.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})});var h=te(t,e=G(t,e=e.map(function(t){return R(t,!1)}),u));return new ve(t,e,a,h)},t}();function _e(){return function t(){return"undefined"!=typeof window&&void 0!==window.document}()&&Element.prototype.animate||{}}
35
42
  /**
36
43
  * @license
37
44
  * Copyright Google Inc. All Rights Reserved.
@@ -59,4 +66,4 @@
59
66
  *
60
67
  * Use of this source code is governed by an MIT-style license that can be
61
68
  * found in the LICENSE file at https://angular.io/license
62
- */e.AnimationDriver=C,e.ɵAnimationDriver=C,e.ɵAnimation=Ee,e.ɵAnimationStyleNormalizer=be,e.ɵNoopAnimationStyleNormalizer=Te,e.ɵWebAnimationsStyleNormalizer=we,e.ɵNoopAnimationDriver=O,e.ɵAnimationEngine=Xe,e.ɵCssKeyframesDriver=pt,e.ɵCssKeyframesPlayer=ct,e.ɵcontainsElement=k,e.ɵinvokeQuery=A,e.ɵmatchesElement=P,e.ɵvalidateStyleProperty=w,e.ɵWebAnimationsDriver=yt,e.ɵsupportsWebAnimations=function dt(){return"function"==typeof mt()},e.ɵWebAnimationsPlayer=ft,e.ɵallowPreviousPlayerStylesMerge=V,Object.defineProperty(e,"__esModule",{value:!0})});
69
+ */t.ɵangular_packages_animations_browser_browser_a=ee,t.AnimationDriver=C,t.ɵAnimationDriver=C,t.ɵAnimation=Et,t.ɵAnimationStyleNormalizer=bt,t.ɵNoopAnimationStyleNormalizer=Tt,t.ɵWebAnimationsStyleNormalizer=wt,t.ɵNoopAnimationDriver=O,t.ɵAnimationEngine=Xt,t.ɵCssKeyframesDriver=de,t.ɵCssKeyframesPlayer=ye,t.ɵcontainsElement=k,t.ɵinvokeQuery=A,t.ɵmatchesElement=P,t.ɵvalidateStyleProperty=w,t.ɵWebAnimationsDriver=ge,t.ɵsupportsWebAnimations=function Se(){return"function"==typeof _e()},t.ɵWebAnimationsPlayer=ve,t.ɵallowPreviousPlayerStylesMerge=V,Object.defineProperty(t,"__esModule",{value:!0})});