/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
import"../../polymer/polymer-legacy.js";import{Polymer as i}from"../../polymer/lib/legacy/polymer-fn.js";import{NeonAnimationBehavior as n}from"../neon-animation-behavior.js";i({is:"cascaded-animation",behaviors:[n],configure:function(i){this._animations=[];var n=i.nodes,e=[],o=i.nodeDelay||50;i.timing=i.timing||{},i.timing.delay=i.timing.delay||0;for(var t,a,m=i.timing.delay,r=0;a=n[r];r++){i.timing.delay+=o,i.node=a;var s=document.createElement(i.animation);if(!s.isNeonAnimation){console.warn(this.is+":",i.animation,"not found!"),t=!0;break}var f=s.configure(i);this._animations.push(s),e.push(f)}if(i.timing.delay=m,i.node=null,!t)return this._effect=new GroupEffect(e),this._effect},complete:function(){for(var i,n=0;i=this._animations[n];n++)i.complete(i.config)}});