@angular/animations 6.0.3 → 6.0.7
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.
- package/browser/browser.metadata.json +1 -1
- package/browser/src/dsl/animation_transition_factory.d.ts +1 -1
- package/browser/src/render/animation_engine_next.d.ts +2 -1
- package/browser/src/render/shared.d.ts +2 -0
- package/browser/src/render/timeline_animation_engine.d.ts +2 -1
- package/browser/src/render/transition_animation_engine.d.ts +3 -3
- package/browser/testing.d.ts +0 -5
- package/browser/testing.metadata.json +1 -1
- package/browser.d.ts +0 -5
- package/browser.metadata.json +1 -1
- package/bundles/animations-browser-testing.umd.js +28 -10
- package/bundles/animations-browser-testing.umd.js.map +1 -1
- package/bundles/animations-browser-testing.umd.min.js +16 -2
- package/bundles/animations-browser-testing.umd.min.js.map +1 -1
- package/bundles/animations-browser.umd.js +200 -83
- package/bundles/animations-browser.umd.js.map +1 -1
- package/bundles/animations-browser.umd.min.js +55 -6
- package/bundles/animations-browser.umd.min.js.map +1 -1
- package/bundles/animations.umd.js +470 -577
- package/bundles/animations.umd.js.map +1 -1
- package/bundles/animations.umd.min.js +9 -2
- package/bundles/animations.umd.min.js.map +1 -1
- package/esm2015/animations.externs.js +1 -1
- package/esm2015/browser/browser.externs.js +3 -3
- package/esm2015/browser/src/dsl/animation_transition_factory.js +4 -3
- package/esm2015/browser/src/render/animation_driver.js +1 -12
- package/esm2015/browser/src/render/animation_engine_next.js +8 -4
- package/esm2015/browser/src/render/shared.js +18 -3
- package/esm2015/browser/src/render/timeline_animation_engine.js +6 -2
- package/esm2015/browser/src/render/transition_animation_engine.js +23 -19
- package/esm2015/browser/src/render/web_animations/web_animations_driver.js +3 -3
- package/esm2015/browser/src/util.js +57 -1
- package/esm2015/src/animation_metadata.js +626 -659
- package/esm2015/src/version.js +1 -1
- package/esm5/browser/index.js +5 -1
- package/esm5/browser/public_api.js +6 -1
- package/esm5/browser/src/browser.js +6 -1
- package/esm5/browser/src/dsl/animation.js +1 -1
- package/esm5/browser/src/dsl/animation_ast_builder.js +11 -4
- package/esm5/browser/src/dsl/animation_timeline_builder.js +27 -21
- package/esm5/browser/src/dsl/animation_timeline_instruction.js +1 -1
- package/esm5/browser/src/dsl/animation_transition_expr.js +1 -1
- package/esm5/browser/src/dsl/animation_transition_factory.js +3 -3
- package/esm5/browser/src/dsl/animation_transition_instruction.js +1 -1
- package/esm5/browser/src/dsl/animation_trigger.js +2 -8
- package/esm5/browser/src/dsl/element_instruction_map.js +1 -1
- package/esm5/browser/src/dsl/style_normalization/animation_style_normalizer.js +3 -15
- package/esm5/browser/src/dsl/style_normalization/web_animations_style_normalizer.js +8 -1
- package/esm5/browser/src/private_export.js +8 -1
- package/esm5/browser/src/render/animation_driver.js +8 -3
- package/esm5/browser/src/render/animation_engine_next.js +5 -4
- package/esm5/browser/src/render/css_keyframes/css_keyframes_driver.js +1 -1
- package/esm5/browser/src/render/css_keyframes/css_keyframes_player.js +2 -4
- package/esm5/browser/src/render/css_keyframes/direct_style_player.js +8 -1
- package/esm5/browser/src/render/css_keyframes/element_animation_style_handler.js +1 -1
- package/esm5/browser/src/render/shared.js +19 -3
- package/esm5/browser/src/render/timeline_animation_engine.js +10 -2
- package/esm5/browser/src/render/transition_animation_engine.js +36 -39
- package/esm5/browser/src/render/web_animations/dom_animation.js +1 -1
- package/esm5/browser/src/render/web_animations/web_animations_driver.js +3 -3
- package/esm5/browser/src/render/web_animations/web_animations_player.js +3 -7
- package/esm5/browser/src/util.js +51 -3
- package/esm5/browser/testing/index.js +5 -1
- package/esm5/browser/testing/public_api.js +6 -1
- package/esm5/browser/testing/src/mock_animation_driver.js +12 -17
- package/esm5/browser/testing/src/testing.js +8 -1
- package/esm5/index.js +5 -1
- package/esm5/public_api.js +6 -1
- package/esm5/src/animation_builder.js +3 -93
- package/esm5/src/animation_event.js +1 -1
- package/esm5/src/animation_metadata.js +439 -568
- package/esm5/src/animations.js +6 -1
- package/esm5/src/players/animation_group_player.js +2 -4
- package/esm5/src/players/animation_player.js +11 -14
- package/esm5/src/private_export.js +8 -1
- package/esm5/src/util.js +1 -1
- package/esm5/src/version.js +3 -23
- package/fesm2015/animations.js +446 -631
- package/fesm2015/animations.js.map +1 -1
- package/fesm2015/browser/testing.js +1 -1
- package/fesm2015/browser/testing.js.map +1 -1
- package/fesm2015/browser.js +104 -29
- package/fesm2015/browser.js.map +1 -1
- package/fesm5/animations.js +470 -577
- package/fesm5/animations.js.map +1 -1
- package/fesm5/browser/testing.js +28 -10
- package/fesm5/browser/testing.js.map +1 -1
- package/fesm5/browser.js +200 -83
- package/fesm5/browser.js.map +1 -1
- package/package.json +3 -3
- package/src/animation_metadata.d.ts +673 -650
|
@@ -1,30 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v6.0.
|
|
2
|
+
* @license Angular v6.0.7
|
|
3
3
|
* (c) 2010-2018 Google, Inc. 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.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=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])};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=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};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}
|
|
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.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=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])};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=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};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}
|
|
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 V="*",Z=new Set(["true","1"]),J=new Set(["false","0"]);function X(e,t){var n=Z.has(e)||J.has(e),r=Z.has(t)||J.has(t);return function(i,o){var s=e==V||e==i,a=t==V||t==o;return!s&&n&&"boolean"==typeof i&&(s=i?Z.has(e):J.has(e)),!a&&r&&"boolean"==typeof o&&(a=o?Z.has(t):J.has(t)),s&&a}}var ee=new RegExp("s*:selfs*,?","g");function te(e,t,n){return new ne(e).build(t,n)}var ne=function(){function e(e){this._driver=e}return e.prototype.build=function(e,t){var n=new re(t);return this._resetContextStyleTimingState(n),$(this,K(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(ie(e)){var t=e;Object.keys(t).forEach(function(e){B(t[e]).forEach(function(e){o.hasOwnProperty(e)||i.add(e)})})}}),i.size){var s=z(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=$(this,K(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(X(s,u)),"<"!=a[0]||s==V&&u==V||t.push(X(u,s))}(e,n,t)}):n.push(e),n}(e.expr,t.errors),animation:n,queryCount:t.queryCount,depCount:t.depCount,options:oe(e.options)}},e.prototype.visitSequence=function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return $(n,e,t)}),options:oe(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=$(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:oe(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 se(L(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=se(0,0,"");return i.dynamic=!0,i.strValue=r,i}return se((n=n||L(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(ie(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=B(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(ie(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(ie(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:$(this,K(e.animation),t),options:oe(e.options)}},e.prototype.visitAnimateChild=function(e,t){return t.depCount++,{type:9,options:oe(e.options)}},e.prototype.visitAnimateRef=function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:oe(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(ee,"")),[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,f(t.collectedStyles,t.currentQuerySelector,{});var l=$(this,K(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:oe(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"}:L(e.timings,t.errors,!0);return{type:12,animation:$(this,K(e.animation),t),timings:n,options:null}},e}(),re=function re(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 ie(e){return!Array.isArray(e)&&"object"==typeof e}function oe(e){return e?(e=I(e)).params&&(e.params=function t(e){return e?I(e):null}(e.params)):e={},e}function se(e,t,n){return{duration:e,delay:t,easing:n}}function ae(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 ue=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}(),le=new RegExp(":enter","g"),ce=new RegExp(":leave","g");function he(e,t,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new pe).buildKeyframes(e,t,n,r,i,o,s,a,u,l)}var pe=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 ue;var c=new ye(e,t,u,r,i,l,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),$(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()}):[ae(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?C(n.duration):null,o=null!=n.delay?C(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),$(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=fe);var s=C(o.delay);i.delayNextStep(s)}e.steps.length&&(e.steps.forEach(function(e){return $(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?C(e.options.delay):0;e.steps.forEach(function(s){var a=t.createSubContext(e.options);o&&a.delayNextStep(o),$(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 L(t.params?M(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?C(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=fe);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),$(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;$(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},e}(),fe={},ye=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=fe,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new me(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=C(r.duration)),null!=r.delay&&(i.delay=C(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]=M(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=fe,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 de(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(le,"."+this._enterClassName)).replace(ce,"."+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}(),me=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}):j(e,!1,i)}),i}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var n=M(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=j(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?z(n.values()):[],a=r.size?z(r.values()):[];if(i){var u=o[0],l=I(u);u.offset=0,l.offset=1,o=[u,l]}return ae(this.element,o,s,a,this.duration,this.startTime,this.easing,!1)},e}(),de=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=j(e[0],!1);u.offset=0,o.push(u);var l=j(e[0],!1);l.offset=ve(a),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var p=j(e[h],!1);p.offset=ve((n+p.offset*r)/s),o.push(p)}r=s,n=0,i="",e=o}return ae(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)},t}(me);function ve(e,t){void 0===t&&(t=3);var n=Math.pow(10,t-1);return Math.round(e*n)/n}var ge=function(){function e(e,t){this._driver=e;var n=[],r=te(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)?x(t):t,s=Array.isArray(n)?x(n):n,a=[];i=i||new ue;var u=he(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}(),_e=function _e(){},Ee=function(){function e(){}return e.prototype.normalizePropertyName=function(e,t){return e},e.prototype.normalizeStyleValue=function(e,t,n,r){return n},e}(),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.normalizePropertyName=function(e,t){return W(e)},t.prototype.normalizeStyleValue=function(e,t,n,r){var i="",o=n.toString().trim();if(be[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}(_e),be=function Te(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
|
+
*/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}
|
|
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 we(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 Pe={},ke=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){var c=[],h=this.ast.options&&this.ast.options.params||Pe,p=this.buildStyles(n,a&&a.params||Pe,c),y=u&&u.params||Pe,m=this.buildStyles(r,y,c),d=new Set,v=new Map,g=new Map,_="void"===r,E={params:o({},h,y)},S=he(e,t,this.ast.animation,i,s,p,m,E,l,c),b=0;if(S.forEach(function(e){b=Math.max(e.duration+e.delay,b)}),c.length)return we(t,this._triggerName,n,r,_,p,m,[],[],v,g,b,c);S.forEach(function(e){var n=e.element,r=f(v,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=f(g,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&d.add(n)});var T=z(d.values());return we(t,this._triggerName,n,r,_,p,m,S,T,v,g,b)},e}(),Ae=function(){function e(e,t){this.styles=e,this.defaultParams=t}return e.prototype.buildStyles=function(e,t){var n={},r=I(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=M(o,r,t)),n[e]=o})}}),n},e}(),Ne=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 Ae(e.style,e.options&&e.options.params||{})}),Oe(this.states,"true","1"),Oe(this.states,"false","0"),t.transitions.forEach(function(t){n.transitionFactories.push(new ke(e,t,n.states))}),this.fallbackTransition=function r(e,t){return new ke(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 Oe(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var Fe=new ue,Ce=function(){function e(e,t){this._driver=e,this._normalizer=t,this._animations={},this._playersById={},this.players=[]}return e.prototype.register=function(e,t){var n=[],r=te(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=l(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],l=new Map;if(a?(o=he(this._driver,n,a,"ng-enter","ng-leave",{},{},r,Fe,s)).forEach(function(e){var t=f(l,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"));l.forEach(function(e,n){Object.keys(e).forEach(function(r){e[r]=i._driver.computeStyle(n,r,t.AUTO_STYLE)})});var c=u(o.map(function(e){var t=l.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=p(t,"","","");return c(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}(),De=[],Le={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ie={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},xe="__ng_removed",je=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=I(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 je("void"),Re=new je("DELETED"),Ke=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,Ye(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=f(this._elementListeners,e,[]),a={name:t,phase:n,callback:r};s.push(a);var u=f(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(Ye(e,"ng-trigger"),Ye(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 Be(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Ye(e,"ng-trigger"),Ye(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,a={}));var u=a[t],l=new je(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[t]=l,u){if(u===Re)return s}else u=qe;if("void"===l.value||u.value!==l.value){var c=f(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||(Ye(e,"ng-animate-queued"),s.onStart(function(){$e(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 y(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(){R(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[xe]){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&&u(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 je("void"),u=new Be(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){Ye(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=p(o,r.triggerName,r.fromState.value,r.toState.value);n._data=e,c(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}(),Qe=function(){function e(e,t){this.driver=e,this._normalizer=t,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 Ke(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(Me(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(Me(t)){var i=t[xe];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),Ye(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),$e(e,"ng-animate-disabled"))},e.prototype.removeNode=function(e,t,n){if(Me(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[xe]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},e.prototype.listen=function(e,t,n,r,i){return Me(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}},e.prototype._buildInstruction=function(e,t,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t)},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()});var n=this.statesByElement.get(e);n&&Object.keys(n).forEach(function(e){return n[e]=Re})},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 u(e.players).onDone(function(){return t()});t()})},e.prototype.processLeaveNode=function(e){var t=this,n=e[xe];if(n&&n.setForRemoval){if(e[xe]=Le,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(n){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++)Ye(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?u(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 ue,s=[],l=new Map,c=[],h=new Map,p=new Map,y=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=T(),v=Array.from(this.statesByElement.keys()),g=We(v,this.collectedEnterElements),_=new Map,E=0;g.forEach(function(e,t){var n="ng-enter"+E++;_.set(t,n),e.forEach(function(e){return Ye(e,n)})});for(var S=[],b=new Set,w=new Set,P=0;P<this.collectedLeaveElements.length;P++)(U=(z=this.collectedLeaveElements[P])[xe])&&U.setForRemoval&&(S.push(z),b.add(z),U.hasAnimation?this.driver.query(z,".ng-star-inserted",!0).forEach(function(e){return b.add(e)}):w.add(z));var k=new Map,A=We(v,Array.from(b));A.forEach(function(e,t){var n="ng-leave"+E++;k.set(t,n),e.forEach(function(e){return Ye(e,n)})}),e.push(function(){g.forEach(function(e,t){var n=_.get(t);e.forEach(function(e){return $e(e,n)})}),A.forEach(function(e,t){var n=k.get(t);e.forEach(function(e){return $e(e,n)})}),S.forEach(function(e){r.processLeaveNode(e)})});for(var N=[],O=[],F=this._namespaceList.length-1;F>=0;F--)this._namespaceList[F].drainQueuedTransitions(n).forEach(function(e){var t=e.player,n=e.element;if(N.push(t),r.collectedEnterElements.length){var o=n[xe];if(o&&o.setForMove)return void t.destroy()}if(d&&r.driver.containsElement(d,n)){var a=k.get(n),u=_.get(n),l=r._buildInstruction(e,i,u,a);if(l.errors&&l.errors.length)O.push(l);else{if(e.isFallbackTransition)return t.onStart(function(){return R(n,l.fromStyles)}),t.onDestroy(function(){return q(n,l.toStyles)}),void s.push(t);l.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),i.append(n,l.timelines),c.push({instruction:l,player:t,element:n}),l.queriedElements.forEach(function(e){return f(h,e,[]).push(t)}),l.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)})}}),l.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=y.get(t);r||y.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}}else t.destroy()});if(O.length){var C=[];O.forEach(function(e){C.push("@"+e.triggerName+" has failed due to:\n"),e.errors.forEach(function(e){return C.push("- "+e+"\n")})}),N.forEach(function(e){return e.destroy()}),this.reportError(C)}var D=new Map,L=new Map;c.forEach(function(e){var t=e.element;i.has(t)&&(L.set(t,t),r._beforeAnimationBuild(e.player.namespaceId,e.instruction,D))}),s.forEach(function(e){var t=e.element;r._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){f(D,t,[]).push(e),e.destroy()})});var I=S.filter(function(e){return Ve(e,p,y)}),x=new Map;Ue(x,this.driver,w,y,t.AUTO_STYLE).forEach(function(e){Ve(e,p,y)&&I.push(e)});var j=new Map;g.forEach(function(e,n){Ue(j,r.driver,new Set(e),p,t.ɵPRE_STYLE)}),I.forEach(function(e){var t=x.get(e),n=j.get(e);x.set(e,o({},t,n))});var K=[],Q=[],B={};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=B;if(L.size>1){for(var c=t,h=[];c=c.parentNode;){var p=L.get(c);if(p){a=p;break}h.push(c)}h.forEach(function(e){return L.set(e,a)})}var f=r._buildAnimation(n.namespaceId,o,D,l,j,x);if(n.setRealPlayer(f),a===B)K.push(n);else{var y=r.playersByElement.get(a);y&&y.length&&(n.parentPlayer=u(y)),s.push(n)}}else R(t,o.fromStyles),n.onDestroy(function(){return q(t,o.toStyles)}),Q.push(n),m.has(t)&&s.push(n)}),Q.forEach(function(e){var t=l.get(e.element);if(t&&t.length){var n=u(t);e.setRealPlayer(n)}}),s.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var M=0;M<S.length;M++){var z,U=(z=S[M])[xe];if($e(z,"ng-leave"),!U||!U.hasAnimation){var W=[];if(h.size){var H=h.get(z);H&&H.length&&W.push.apply(W,a(H));for(var Y=this.driver.query(z,".ng-animating",!0),$=0;$<Y.length;$++){var G=h.get(Y[$]);G&&G.length&&W.push.apply(W,a(G))}}var V=W.filter(function(e){return!e.destroyed});V.length?Ge(this,z,V):this.processLeaveNode(z)}}return S.length=0,K.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()}),K},e.prototype.elementContainsData=function(e,t){var n=!1,r=t[xe];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=f(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}}R(o,t.fromStyles)},e.prototype._buildAnimation=function(e,n,r,i,o,s){var a=this,c=n.triggerName,h=n.element,p=[],y=new Set,m=new Set,d=n.timelines.map(function(n){var u=n.element;y.add(u);var f=u[xe];if(f&&f.removedBeforeQueried)return new t.NoopAnimationPlayer(n.duration,n.delay);var d=u!==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(u)||De).map(function(e){return e.getRealPlayer()})).filter(function(e){return!!e.element&&e.element===u}),_=o.get(u),E=s.get(u),S=l(0,a._normalizer,0,n.keyframes,_,E),b=a._buildPlayer(n,S,v);if(n.subTimeline&&i&&m.add(u),d){var T=new Be(e,c,u);T.setRealPlayer(b),p.push(T)}return b});p.forEach(function(e){f(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)})}),y.forEach(function(e){return Ye(e,"ng-animating")});var v=u(d);return v.onDestroy(function(){y.forEach(function(e){return $e(e,"ng-animating")}),q(h,n.toStyles)}),m.forEach(function(e){f(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}(),Be=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 c(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){f(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 Me(e){return e&&1===e.nodeType}function ze(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function Ue(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(ze(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[xe]=Ie,s.push(r))}),e.set(r,o)});var a=0;return n.forEach(function(e){return ze(e,o[a++])}),s}function We(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 He="$$classes";function Ye(e,t){if(e.classList)e.classList.add(t);else{var n=e[He];n||(n=e[He]={}),n[t]=!0}}function $e(e,t){if(e.classList)e.classList.remove(t);else{var n=e[He];n&&delete n[t]}}function Ge(e,t,n){u(n).onDone(function(){return e.processLeaveNode(t)})}function Ve(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 Ze=function(){function e(e,t){var n=this;this._driver=e,this._triggerCache={},this.onRemovalComplete=function(e,t){},this._transitionEngine=new Qe(e,t),this._timelineEngine=new Ce(e,t),this._transitionEngine.onRemovalComplete=function(e,t){return n.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=te(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 Ne(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(y(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(y(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}(),Je="animation",Xe="animationend",et=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=st(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),ot(t,"",n)}(this._element,this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name),it(this._element,this._eventFn,!1),this._startTime=Date.now()},e.prototype.pause=function(){tt(this._element,this._name,"paused")},e.prototype.resume=function(){tt(this._element,this._name,"running")},e.prototype.setPosition=function(e){var t=nt(this._element,this._name);this._position=e*this._duration,ot(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(),it(this._element,this._eventFn,!0))},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.finish(),function e(t,n){var r=st(t,"").split(","),i=rt(r,n);i>=0&&(r.splice(i,1),ot(t,"",r.join(",")))}(this._element,this._name))},e}();
|
|
20
|
+
*/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)},e.decorators=[{type:n.Injectable}],e}(),F=function(){function e(){}return e.NOOP=new O,e}(),C=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*C;default:return e}}function I(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(Math.floor(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 x(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 j(e,!1,t)}):j(e,!1,t),t}function j(e,t,n){if(void 0===n&&(n={}),t)for(var r in e)n[r]=e[r];else x(e,n);return n}function R(e,t,n){return n?t+":"+n+";":""}function K(e){for(var t="",n=0;n<e.style.length;n++)t+=R(0,r=e.style.item(n),e.style.getPropertyValue(r));for(var r in e.style)e.style.hasOwnProperty(r)&&!r.startsWith("_")&&(t+=R(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 M(e,t){e.style&&(Object.keys(t).forEach(function(t){var n=$(t);e.style[n]=""}),u()&&K(e))}function B(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 H(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t}var Y=/-+([a-z0-9])/g;function $(e){return e.replace(Y,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 Z(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 G(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]}
|
|
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
|
-
*/
|
|
27
|
+
*/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}}
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
31
|
+
*
|
|
32
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
33
|
+
* found in the LICENSE file at https://angular.io/license
|
|
34
|
+
*/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),G(this,B(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=H(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=G(this,B(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 G(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=G(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(I(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||I(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:G(this,B(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=G(this,B(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"}:I(e.timings,t.errors,!0);return{type:12,animation:G(this,B(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=x(e)).params&&(e.params=function t(e){return e?x(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");
|
|
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
|
+
*/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),G(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),G(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 G(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),G(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 I(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),G(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;G(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}):j(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=j(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?H(n.values()):[],a=r.size?H(r.values()):[];if(i){var u=o[0],l=x(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=j(e[0],!1);u.offset=0,o.push(u);var l=j(e[0],!1);l.offset=Se(a),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var p=j(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(","));
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
45
|
+
*
|
|
46
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
47
|
+
* found in the LICENSE file at https://angular.io/license
|
|
48
|
+
*/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=H(v.values());return Ae(t,this._triggerName,n,r,S,f,d,b,w,g,_,T)},e}(),Fe=function(){function e(e,t){this.styles=e,this.defaultParams=t}return e.prototype.buildStyles=function(e,t){var n={},r=x(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}(),Ce=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 Fe(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])}
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
52
|
+
*
|
|
53
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
54
|
+
* found in the LICENSE file at https://angular.io/license
|
|
55
|
+
*/var Le=new he,Ie=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}(),xe=[],qe={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},je={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Re="__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=x(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"),Me=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(){Ze(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(){M(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[Re]){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}(),Be=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 Me(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[Re];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),Ze(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[Re]={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[Re];if(n&&n.setForRemoval){if(e[Re]=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(n){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=Ye(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=(B=this.collectedLeaveElements[w])[Re])&&z.setForRemoval&&(E.push(B),b.add(B),z.hasAnimation?this.driver.query(B,".ng-star-inserted",!0).forEach(function(e){return b.add(e)}):T.add(B));var P=new Map,k=Ye(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 Ze(e,n)})}),k.forEach(function(e,t){var n=P.get(t);e.forEach(function(e){return Ze(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[Re];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 M(n,m.fromStyles)}),t.onDestroy(function(){return Q(n,m.toStyles)}),void s.push(t);if(e.isFallbackTransition)return t.onStart(function(){return M(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 F=[];N.forEach(function(e){F.push("@"+e.triggerName+" has failed due to:\n"),e.errors.forEach(function(e){return F.push("- "+e+"\n")})}),A.forEach(function(e){return e.destroy()}),this.reportError(F)}var C=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,C))}),s.forEach(function(e){var t=e.element;r._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){y(C,t,[]).push(e),e.destroy()})});var L=E.filter(function(e){return Je(e,p,f)}),I=new Map;He(I,this.driver,T,f,t.AUTO_STYLE).forEach(function(e){Je(e,p,f)&&L.push(e)});var x=new Map;g.forEach(function(e,n){He(x,r.driver,new Set(e),p,t.ɵPRE_STYLE)}),L.forEach(function(e){var t=I.get(e),n=x.get(e);I.set(e,o({},t,n))});var q=[],j=[],R={};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=R;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,C,u,x,I);if(n.setRealPlayer(f),a===R)q.push(n);else{var y=r.playersByElement.get(a);y&&y.length&&(n.parentPlayer=l(y)),s.push(n)}}else M(t,o.fromStyles),n.onDestroy(function(){return Q(t,o.toStyles)}),j.push(n),m.has(t)&&s.push(n)}),j.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 B,z=(B=E[K])[Re];if(Ze(B,"ng-leave"),!z||!z.hasAnimation){var U=[];if(h.size){var W=h.get(B);W&&W.length&&U.push.apply(U,a(W));for(var H=this.driver.query(B,".ng-animating",!0),Y=0;Y<H.length;Y++){var $=h.get(H[Y]);$&&$.length&&U.push.apply(U,a($))}}var V=U.filter(function(e){return!e.destroyed});V.length?Ge(this,B,V):this.processLeaveNode(B)}}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[Re];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}}M(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[Re];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)||xe).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 Ze(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 He(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[Re]=je,s.push(r))}),e.set(r,o)});var a=0;return n.forEach(function(e){return We(e,o[a++])}),s}function Ye(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 Ze(e,t){if(e.classList)e.classList.remove(t);else{var n=e[$e];n&&delete n[t]}}function Ge(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 Be(e,t,n),this._timelineEngine=new Ie(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 Ce(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}();
|
|
56
|
+
/**
|
|
57
|
+
* @license
|
|
58
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
59
|
+
*
|
|
60
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
61
|
+
* found in the LICENSE file at https://angular.io/license
|
|
62
|
+
*/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,ct="linear";!function(e){e[e.INITIALIZED=1]="INITIALIZED",e[e.STARTED=2]="STARTED",e[e.FINISHED=3]="FINISHED",e[e.DESTROYED=4]="DESTROYED"}(lt||(lt={}));var ht=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||ct,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>=lt.DESTROYED||(this.state=lt.DESTROYED,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>=lt.FINISHED||(this.state=lt.FINISHED,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>=lt.STARTED},e.prototype.init=function(){this.state>=lt.INITIALIZED||(this.state=lt.INITIALIZED,this._styler.apply(),this._delay&&this._styler.pause())},e.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this.state=lt.STARTED),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>=lt.FINISHED;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:J(e.element,r))})}this.currentSnapshot=t},e}(),pt=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),ft=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 ht}),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=Z(e,t,u));if(0==n)return new pt(e,l);var h="gen_css_kf_"+this._count++,p=this.buildKeyframeElement(e,h,t);document.querySelector("head").appendChild(p);var f=new ht(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}(),yt=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}(),mt=function(){function e(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(dt().toString()),this._cssKeyframesDriver=new ft}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 yt});return V(n,r)&&l.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})}),t=Z(e,t=t.map(function(e){return j(e,!1)}),u),new yt(e,t,a)},e}();
|
|
63
|
+
/**
|
|
64
|
+
* @license
|
|
65
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
66
|
+
*
|
|
67
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
68
|
+
* found in the LICENSE file at https://angular.io/license
|
|
69
|
+
*/function dt(){return function e(){return"undefined"!=typeof window&&void 0!==window.document}()&&Element.prototype.animate||{}}
|
|
70
|
+
/**
|
|
71
|
+
* @license
|
|
72
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
73
|
+
*
|
|
74
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
75
|
+
* found in the LICENSE file at https://angular.io/license
|
|
76
|
+
*/
|
|
28
77
|
/**
|
|
29
78
|
* @license
|
|
30
79
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -45,4 +94,4 @@
|
|
|
45
94
|
*
|
|
46
95
|
* Use of this source code is governed by an MIT-style license that can be
|
|
47
96
|
* found in the LICENSE file at https://angular.io/license
|
|
48
|
-
*/e.AnimationDriver=
|
|
97
|
+
*/e.AnimationDriver=F,e.ɵAnimation=Ee,e.ɵAnimationStyleNormalizer=be,e.ɵNoopAnimationStyleNormalizer=Te,e.ɵWebAnimationsStyleNormalizer=we,e.ɵAnimationDriver=F,e.ɵNoopAnimationDriver=O,e.ɵAnimationEngine=Xe,e.ɵCssKeyframesDriver=ft,e.ɵCssKeyframesPlayer=ht,e.ɵcontainsElement=k,e.ɵinvokeQuery=A,e.ɵmatchesElement=P,e.ɵvalidateStyleProperty=w,e.ɵWebAnimationsDriver=mt,e.ɵsupportsWebAnimations=function vt(){return"function"==typeof dt()},e.ɵWebAnimationsPlayer=yt,e.ɵallowPreviousPlayerStylesMerge=V,Object.defineProperty(e,"__esModule",{value:!0})});
|