text: !function(d,c){"object"==typeof module&&module.exports?module.exports=c():"function"==typeof define&&define.amd?define(c):d.Spinner=c()}(this,function(){function D(f,e){var h,g=document.createElement(f||"div");for(h in e){g[h]=e[h]}return g}function C(e){for(var d=1,f=arguments.length;f>d;d++){e.appendChild(arguments[d])}return e}function B(G,F,E,o){var n=["opacity",F,~~(100*G),E,o].join("-"),m=0.01+E/o*100,l=Math.max(1-(1-G)/F*(100-m),G),k=u.substring(0,u.indexOf("Animation")).toLowerCase(),j=k&&"-"+k+"-"||"";return r[n]||(t.insertRule("@"+j+"keyframes "+n+"{0%{opacity:"+l+"}"+m+"%{opacity:"+G+"}"+(m+0.01)+"%{opacity:1}"+(m+F)%100+"%{opacity:"+G+"}100%{opacity:"+l+"}}",t.cssRules.length),r[n]=1),n}function A(g,f){var j,i,h=g.style;if(f=f.charAt(0).toUpperCase()+f.slice(1),void 0!==h[f]){return f}for(i=0;i<s.length;i++){if(j=s[i]+f,void 0!==h[j]){return j}}}function z(e,d){for(var f in d){e.style[A(e,f)||f]=d[f]}return e}function y(f){for(var e=1;e<arguments.length;e++){var h=arguments[e];for(var g in h){void 0===f[g]&&(f[g]=h[g])}}return f}function x(d,c){return"string"==typeof d?d:d[c%d.length]}function w(b){this.opts=y(b||{},w.defaults,q)}function v(){function a(d,e){return D("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}t.addRule(".spin-vml","behavior:url(#default#VML)"),w.prototype.lines=function(G,F){function E(){return z(a("group",{coordsize:e+" "+e,coordorigin:-g+" "+-g}),{width:e,height:e})}function o(d,j,f){C(b,C(z(E(),{rotation:360/F.lines*d+"deg",left:~~j}),C(z(a("roundrect",{arcsize:F.corners}),{width:g,height:F.scale*F.width,left:F.scale*F.radius,top:-F.scale*F.width>>1,filter:f}),a("fill",{color:x(F.color,d),opacity:F.opacity}),a("stroke",{opacity:0}))))}var n,g=F.scale*(F.length+F.width),e=2*F.scale*g,c=-(F.width+F.length)*F.scale*2+"px",b=z(E(),{position:"absolute",top:c,left:c});if(F.shadow){for(n=1;n<=F.lines;n++){o(n,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)")}}for(n=1;n<=F.lines;n++){o(n)}return C(G,b)},w.prototype.opacity=function(g,f,j,i){var h=g.firstChild;i=i.shadow&&i.lines||0,h&&f+i<h.childNodes.length&&(h=h.childNodes[f+i],h=h&&h.firstChild,h=h&&h.firstChild,h&&(h.opacity=j))}}var u,t,s=["webkit","Moz","ms","O"],r={},q={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:0.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(w.defaults={},y(w.prototype,{spin:function(M){this.stop();var L=this,K=L.opts,J=L.el=D(null,{className:K.className});if(z(J,{position:K.position,width:0,zIndex:K.zIndex,left:K.left,top:K.top}),M&&M.insertBefore(J,M.firstChild||null),J.setAttribute("role","progressbar"),L.lines(J,L.opts),!u){var I,H=0,G=(K.lines-1)*(1-K.direction)/2,F=K.fps,E=F/K.speed,j=(1-K.opacity)/(E*K.trail/100),e=E/K.lines;!function a(){H++;for(var b=0;b<K.lines;b++){I=Math.max(1-(H+(K.lines-b)*e)%E*j,K.opacity),L.opacity(J,b*K.direction+G,I,K)}L.timeout=L.el&&setTimeout(a,~~(1000/F))}()}return L},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(j,g){function e(d,f){return z(D(),{position:"absolute",width:g.scale*(g.length+g.width)+"px",height:g.scale*g.width+"px",background:d,boxShadow:f,transformOrigin:"left",transform:"rotate("+~~(360/g.lines*b+g.rotate)+"deg) translate("+g.scale*g.radius+"px,0)",borderRadius:(g.corners*g.scale*g.width>>1)+"px"})}for(var c,b=0,a=(g.lines-1)*(1-g.direction)/2;b<g.lines;b++){c=z(D(),{position:"absolute",top:1+~(g.scale*g.width/2)+"px",transform:g.hwaccel?"translate3d(0,0,0)":"",opacity:g.opacity,animation:u&&B(g.opacity,g.trail,a+b*g.direction,g.lines)+" "+1/g.speed+"s linear infinite"}),g.shadow&&C(c,z(e("#000","0 0 4px #000"),{top:"2px"})),C(j,C(c,e(x(g.color,b),"0 0 1px rgba(0,0,0,.1)")))}return j},opacity:function(e,d,f){d<e.childNodes.length&&(e.childNodes[d].style.opacity=f)}}),"undefined"!=typeof document){t=function(){var a=D("style",{type:"text/css"});return C(document.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}();var p=z(D("group"),{behavior:"url(#default#VML)"});!A(p,"transform")&&p.adj?v():u=A(p,"animation")}return w});(function(){var a={lines:6,length:28,width:14,radius:42,scale:0.45,corners:1,color:"#ca3321",opacity:0.1,rotate:0,direction:1,speed:1,trail:60,fps:20,zIndex:2000000000,className:"spinner",top:"50vh",left:"50%",shadow:false,hwaccel:false,position:"absolute"};var b=document.getElementById("loading-spinner");var c=new Spinner(a).spin(b)})();