"use strict";!function(a,b){function c(c){if(void 0===c)throw new Error('Pathformer [constructor]: "element" parameter is required');if(c.constructor===String&&!(c=b.getElementById(c)))throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID');if(!(c.constructor instanceof a.SVGElement||/^svg$/i.test(c.nodeName)))throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');this.el=c,this.scan(c)}function d(a,b,c){this.isReady=!1,this.setElement(a,b),this.setOptions(b),this.setCallback(c),this.isReady&&this.init()}c.prototype.TYPES=["line","ellipse","circle","polygon","polyline","rect"],c.prototype.ATTR_WATCH=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],c.prototype.scan=function(a){for(var b,c,d,e,f=a.querySelectorAll(this.TYPES.join(",")),g=0;g=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")},d.prototype.setCallback=function(a){if(a&&a.constructor!==Function)throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=a||function(){}},d.prototype.mapping=function(){var b,c,d,e,f,h,i,j;for(j=h=i=0,c=this.el.querySelectorAll("path"),b=0;b1?c.length-1:1),this.reverseStack&&this.map.reverse(),b=0;b=this.frameLength))return this.trace(),void(this.handle=e(function(){a.drawer()}));this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy()}this.callback(this),this.instanceCallback&&(this.instanceCallback(this),this.instanceCallback=null)},d.prototype.trace=function(){var a,b,c,d;for(d=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength,a=0;a=c},d.prototype.docElem=a.document.documentElement,d.prototype.getViewportH=function(){var b=this.docElem.clientHeight,c=a.innerHeight;return b=0?c:b},"function"==typeof define&&define.amd?define([],function(){return d}):"object"==typeof exports?module.exports=d:a.Vivus=d}(window,document);