/*! leopard - v0.2.6 - 2015-04-24 by Terence Z., Q.Y.B. */!function(a,b,c){function d(a,b,c){Object.defineProperty(a,b,c)}function e(a,b){return a&&b?a.startTime-b.startTime||a._arrival-b._arrival:-1}function f(a,b){return a&&b?b.startTime-a.startTime||b._arrival-a._arrival:-1}function g(a,b){var c={};if("string"==typeof a&&(a=a.split(" ")),null==b&&(b=!0),"function"==typeof b)for(var d=-1,e=a.length;++d<e;)c[a[d]]=b(a[d],d,a);else for(var d=-1,e=a.length;++d<e;)c[a[d]]=b;return c}function h(a,b,c,d,e){var f=b.split(" "),h=f.length-(c?1:0)-(d?1:0),i=d?g(d):null;nd[3][a]={_default:b,normalize:function(a,d,e){(null==d||""===d||"auto"===d||"none"===d)&&(d=b);var g;return g=c?Zc((d+"").replace(/\s*,\s*/g,","),","):(d+"").split(/\s*,\s*/),k(a,g.map(function(a){for(var b=a.split(" "),c=f.concat(),d=i?c.length-2:c.length-1,e=0,g=h,j=-1,k=Math.min(c.length,b.length);++j<k;){var l=b[j];i&&l in i?c[c.length-1]=l:isFinite(parseInt(l,10))?g>e&&(c[e++]=l):c[d]=l}return c}),e,3)},getInterpolater:function(a,b){var c=n(a,b);return function(a){for(var b=c.call(this,a,!0),d=[],e=-1,f=b.length;++e<f;)d[e]=b[e].join(" ");return d+""}}},e&&gc(nd[3][a],e)}function i(a,b,d,e,f){var g,h,i,o,p=0,q=0,r=c,s=k,t=nd[f],w=null;t&&(w=t[b],w&&(w.normalize&&(s=w.normalize),w.get&&(e=w.get))),Array.isArray(d)||(g=d.from,h=d.to,p=d.operator||0,q=d.constant||0,o=d.template);var x=e(a,b),y=0;if(h===r&&g===r)return null;h===r?(h=x,y=2):g===r&&(g=x,y=1);var z=0;"string"==typeof g&&(i=g.substr(0,2),i in od&&(g=g.substr(2),z=od[i]));var A=0;"string"==typeof h&&(i=h.substr(0,2),i in od&&(h=h.substr(2),A=od[i]));var B=s(a,g,b,f),C=s(a,h,b,f),D=1===y?B:2===y?C:s(a,x,b,f),E=B[2],F=B[1];B=B[0];var G=C[2],H=C[1];C=C[0];var I=D[2],J=D[1];D=D[0],(E!==I||E!==G||3!==f&&(J!==F||F!==H))&&(E=G=I=1,F=H=J=null,z=A=0,B=g,C=h,D=x);var K=l;z&&(5===E&&B.length!==D.length&&j(a,b,D,B,f),B=K(a,b,z,D,B,E,J,F,f)),A&&(5===G&&D.length!==C.length&&j(a,b,D,C,f),C=K(a,b,A,D,C,G,J,H,f)),3===f&&F!==H&&(B=ic(a,b,B,F,H),F=H),5===G&&B.length!==C.length&&j(a,b,B,C,f),i=m(p,B,C,G),2===G&&(d.round||d.round!==!1&&"px"===H?G=3:d.floor&&(G=30));var L=w&&w.getInterpolater&&w.getInterpolater(G,i)||n(G,i),M={n:b,f:i.f,t:i.t,b:i.b,u:H,i:L,s:d.sign,fn:d.final===c?d.freeze?c:x:d.final,r:null};return!q||1===G&&1===q||(M.i=u(M.i,q)),null!=o&&(M.i=v(M.i,o,G)),M}function j(a,b,c,d,e){var f=nd[e],g=f?f[b]:null,h=g&&g.normalize||k;if(g){for(var i=g._default,j=d.length-1,l=c.length;++j<l;)d.push(h(a,i,b,e)[0][0]);for(j=c.length-1,l=d.length;++j<l;)c.push(h(a,i,b,e)[0][0])}else{for(var i=c[c.length-1],j=d.length-1,l=c.length;++j<l;)d.push(h(a,Kc(i,!0),b,e));for(i=d[d.length-1],j=c.length-1,l=d.length;++j<l;)c.push(h(a,Kc(i,!0),b,e))}}function k(a,b,c,d){var e=typeof b,f=3===d;if("number"===e)return[b,f&&!Zh[c]?"px":null,2];if("string"===e){var g=parseFloat(b);if(0===g||g){var h=b.substr((g+"").length);if(!~h.search(qd))return[g,h||(f&&!Zh[c]?"px":null),2]}if(b=b.trim(),cf.table[b]||pd.test(b)){var i=b.indexOf(")");if(0>i||i===b.length-1&&b.indexOf(")",i+1)<0)return[cf.parse(b),null,4]}return!f||b&&"auto"!==b?[f&&"@"===b?"":b,null,1]:[0,Zh[c]?null:"px",2]}if(b instanceof cf)return[cf.parse(b),null,4];if(Array.isArray(b)){for(var j=[],l=-1,m=b.length;++l<m;)j[l]=k(a,b[l],c+l,d);return[j,null,5]}return[b,null,1]}function l(a,b,c,d,e,f,g,h,i){if(3===i&&f>1&&g!==h&&(d=ic(a,b,d,g,h)),2===f){if(1===c)return d+e;if(2===c)return d-e}if(4===f){if(1===c)return[d[0]+e[0],d[1]+e[1],d[2]+e[2],d[3]+e[3]];if(2===c)return[d[0]-e[0],d[1]-e[1],d[2]-e[2],d[3]-e[3]]}return e}function m(a,b,c,d){var e=null;if(2===d)0===a?e=c-b:1===a?(e=c,c=b+e):2===a&&(e=-c,c=b+e);else if(4===d)0===a?e=[c[0]-b[0],c[1]-b[1],c[2]-b[2],c[3]-b[3]]:1===a?(e=c,c=[e[0]+b[0],e[1]+b[1],e[2]+b[2],e[3]+b[3]]):2===a&&(e=c,c=[(e[0]*=-1)+b[0],(e[1]*=-1)+b[1],(e[2]*=-1)+b[2],(e[3]*=-1)+b[3]]);else if(5===d){for(var f=[],g=-1,h=c.length;++g<h;)f[g]=m(a,b[g][0],c[g][0],c[g][2]);return{f:b,t:c,b:f}}return{f:b,t:c,b:e}}function n(a,b){if(2===a)return o;if(3===a)return p;if(1===a)return r;if(4===a)return s;if(5===a){for(var c=b.b,d=b.t,e=-1,f=d.length;++e<f;){var g=c[e];g.u=d[e][1],g.i=n(d[e][2],g)}return b.t=b.f=null,t}return 30===a?q:void 0}function o(a){var b=Xc(this.f+this.b*a);return null==this.u?b:b+this.u}function p(a){var b=~~(this.f+this.b*a+.5);return null==this.u?b:b+this.u}function q(a){var b=~~(this.f+this.b*a);return null==this.u?b:b+this.u}function r(a){var b=a>0?this.t:this.f;return b}function s(a){var b=this.f,c=this.b;return"rgba("+Math.max(0,Math.min(255,~~(b[0]+a*c[0])))+","+Math.max(0,Math.min(255,~~(b[1]+a*c[1])))+","+Math.max(0,Math.min(255,~~(b[2]+a*c[2])))+","+Math.max(0,Math.min(1,b[3]+a*c[3]))+")"}function t(a){for(var b=[],c=this.b,d=-1,e=c.length;++d<e;)b[d]=c[d].i(a);return b}function u(a,b){return 1===b?function(b){return 0>=b?a.call(this,0):a.call(this,1)}:function(b){return 1>b?a.call(this,0):a.call(this,1)}}function v(a,b,c){var d=rd;d.lastIndex=0;for(var e,f=[],g=[],h=0;e=d.exec(b);)h!==e.index&&(f.push(b.substring(h,e.index)),g.push([f.push(null)-1,+e[1]])),h=d.lastIndex;return h<b.length&&f.push(b.substr(h)),5===c?function(b){for(var c=a.call(this,b),d=-1,e=g.length;++d<e;)f[g[d][0]]=c[g[d][1]];return f+""}:function(b){var c=a.call(this,b);return f[g[0][0]]=c,f.join("")}}function w(){return++Jd}function x(a,b){var c=i(a,b.name,b,B,1);return c&&(c.r=y),c}function y(a,b,c){a[c]=b}function z(a,b,c){a.setAttribute(c,b)}function A(a,b,c){ai(a,c,b)}function B(a,b){return a[b]}function C(a,b){return a.getAttribute(b)}function D(a,b){if(!Md[b]&&!ch.KEYWORDS[b]){var c;if((c=a.style[b])&&"initial"!==c&&"inherit"!==c)return c}return Yh(a,b)}function E(a,b){a.r=1===b?Nd.dom1:2===b?function(a){return function(b,c){a.call(b._dom,c)}}(a.r):Nd.dom0}function F(a,b){return(Pd[a]||(Pd[a]=++Od<<4))+b}function G(a){Qb(["Right","Left","Bottom","Top"],a)}function H(a,b,c,d,e){var f,g;"string"==typeof c?(f=c+"In"+(d?"From"+d:""),g=c+"Out"+(d?"To"+d:"")):(f=c(!1),g=c(!0)),fd.registerAnimationFactory(a+"In"+(b?"From"+b:""),R(f,!1,e)),fd.registerAnimationFactory(a+"Out"+(b?"To"+b:""),R(g,!0,e))}function I(a,c,d){Qb(["In","Out"],function(e){var f="Out"===e;fd.registerAnimationFactory(a+e+(c||""),function(a,c,g){var h=a;a=h instanceof gf?h.dom:h;var i,j=a.querySelectorAll("img,canvas")[0];if(!j||!(i=J(a,f)))return fd.getAnimation(h,"Fade"+e,c,g);var k,l=hd.create(g);return l.addEventListener("init",function(){k=ld.create(h,c);var e={};h instanceof gf?e.visible={to:!f,constant:f?2:0}:e.display={to:f?"none":"",constant:f?2:0},k.apply(e),l.add(k),k=ld.create(i,c),k.apply({display:{to:"",freeze:!1}}),l.add(k);var m=a.childNodes;m.length&&Dd(m).forEach(function(d){if(!Gi(d).hasClass("leo-animation-container")){var e;"#text"===d.nodeName.toLowerCase()&&""!==d.wholeText.replace(/\s+/g,"")&&(e=b.createElement("div"),bi(e,"display","inline-block"),a.insertBefore(e,d),e.appendChild(d),d=e);var f=ld.create(d,c);f.apply({opacity:{to:0,freeze:!1,constant:1}}),l.add(f)}});var n=a.nodeName.toLowerCase();"img"===n||"canvas"===n?(bi(i,{transform:bi(a,"transform"),left:a.offsetLeft,top:a.offsetTop}),a.parentNode.appendChild(i)):a.appendChild(i),k=d(j,i,c,f,g.params),l.add(k),l.addEventListener("destroy",function(){i.parentNode&&i.parentNode.removeChild(i)},null)},null),l})})}function J(a){var b=kh("canvas"),c=b.getContext("2d");if(c){var d=Rd(a),e=Ud(a);return b.className="leo-animation-canvas",b.width=d,b.height=e,bi(b,{width:d,height:e,zIndex:bi(a,"zIndex")}),b}return null}function K(a,c,d){var e=Rd(a),f=Ud(a),g=a.getElementsByTagName("img")[0],h=b.createElement("canvas");if(h.getContext("2d")){h.className="leo-animation-canvas",bi(h,{width:e,height:f}),h.width=e,h.height=f,a.appendChild(h),c.onDestroy=function(){a.removeChild(h)};var i=Math.round(e*(d.strength||.35)),j=h.cloneNode(!0).getContext("2d"),k=h.cloneNode(!0).getContext("2d"),l=j.createLinearGradient(0,0,i,0),m=cf.parse(d.color||"#fffff5");[.5,.1,0].forEach(function(a,b){m[3]=.7/Math.pow(10,b);var c=cf.stringify(m);l.addColorStop(a,c),a!==1-a&&l.addColorStop(1-a,c)}),j.save(),j.fillStyle=l,j.rotate(15*Math.PI/180),j.translate(Math.atan(15*Math.PI/180)*f,0),j.fillRect(0,-i,i,f+2*i),j.restore();var n=h.getContext("2d");if(c.onRender=function(a){n.clearRect(0,0,e,f),n.globalCompositeOperation="source-over",n.drawImage(j.canvas,-e+2*e*a,0),n.globalCompositeOperation="destination-in",n.drawImage(k.canvas,0,0)},g&&a.childNodes[0]===g&&g.naturalWidth>0&&g.naturalHeight>0)try{return void k.drawImage(g,0,0,g.naturalWidth||1,g.naturalHeight||1,0,0,e,f)}catch(o){throw o}k.rect(0,0,e,f),k.fill()}}function L(a){function b(b,d){var e=0;"number"==typeof d&&(e=d);var f=b["offset"+a];switch(e){case 0:f-=Yh(b,"padding"+c[0],!0)+Yh(b,"padding"+c[1],!0);case 1:f-=Yh(b,"border"+c[0]+"Width",!0)+Yh(b,"border"+c[1]+"Width",!0);case 2:return f;case 3:return f+Yh(b,"margin"+c[0],!0)+Yh(b,"margin"+c[1],!0)}return f}var c=(a.toLowerCase(),"Width"===a?["Left","Right"]:["Top","Bottom"]);return function(a,c){var d=[];M(a,d);for(var e,f,g,h=b(a,c),i=0;e=d[i];++i){a=e.el,g=a.style;for(f in e)"string"==typeof e[f]&&(g[f]=e[f])}return h}}function M(a,b){if(a.offsetWidth<=0){if(Yd.test(Vh(a,null).display)){var c={el:a},d=a.style;for(var e in Xd)c[e]=d[e],d[e]=Xd[e];b.push(c)}var f=a.parentNode;f&&1===f.nodeType&&M(f,b)}}function N(a,b){a=a||{};var c=Object.keys(a);return function(d,e,f){var g=d instanceof gf,h=b?"to":"from",i={opacity:b?{to:0,freeze:!1}:{from:0}};return g?(i.visible={to:!b},b&&(i.visible.constant=2)):(i.display={to:b?"none":""},b&&(i.display.constant=2)),O(ld.create(d,e,f),function(){for(var e=-1,f=c.length;++e<f;){var j=c[e],k=a[j],l=j;g&&(l=ef.get(d.componentType,j)||"dom."+j);var m=i[l]={};if("object"==typeof k){for(var n in k)m[n]=k[n];null!=m.value&&(m[h]=m.value,m.value=null)}else m[h]="function"==typeof k?k(d,g,j):k,m.freeze=!b}return i})}}function O(a,b){function c(){a.removeEventListener("init",c,null),a.apply(b()),b=null}return a.addEventListener("init",c,null),a}function P(a,b,c){fd.registerAnimationFactory(a+"In"+(b?"From"+b:""),N(c,!1)),fd.registerAnimationFactory(a+"Out"+(b?"To"+b:""),N(c,!0))}function Q(a){var c,d,e=a.toLowerCase();b.getElementById("#leo-"+e)||(c=b.createElement("style"),c.id="leo-"+e,d="blur"===e?".leo-"+e+'{-webkit-filter:blur(10px);-moz-filter:blur(10px);-o-filter:blur(10px);-ms-filter:blur(10px);filter:blur(10px);filter:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="blur"><feGaussianBlur stdDeviation="10"/></filter></svg>#blur\');filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius=\'10\')progid:DXImageTransform.Microsoft.BasicImage(opacity=1);}':".leo-"+e+"{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:grayscale(100%);filter:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscale\");filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);}",c.styleSheet?c.styleSheet.cssText=d:c.appendChild(b.createTextNode(d)),b.getElementsByTagName("head")[0].appendChild(c)),H(a,null,function(a){return function(b,c){var d=b.div,f=Gi(d).select(".leo-"+e)[0],g=d.childNodes[0];f||(f=g.cloneNode(!0),Gi(f).addClass("leo-"+e),d.insertBefore(f,g));var h,i=hd.create();h=ld.create(d,c);var j={};return j.display={to:a?"none":""},a&&(j.display.constant=2),h.apply(j),i.add(h),h=ld.create(g,c/2),h.apply({opacity:a?{to:0}:{from:0}}),i.add(h,a?0:c/2),a||(h=ld.create(g,c/2),h.apply({opacity:{to:0,constant:1,freeze:!1}}),i.add(h)),h=ld.create(f,c/2),h.apply({opacity:a?{to:0}:{from:0}}),i.add(h,a?c/2:0),i}},null,{sequence:"together",row:1,col:1})}function R(a,c,d){return function(e,f,g){void 0===g&&(g={});var h=gc("function"==typeof d?d(c):d,g.params);h.easing=g.easing;var i=hd.create(g);return i.addEventListener("init",function(){var d,g=e instanceof gf,j={opacity:{to:0,freeze:!1,constant:1}};g?j.visible={to:!c,constant:c?2:0}:j.display={to:c?"none":"",constant:c?2:0},d=ld.create(e,f),d.apply(j),i.add(d,0),e=e instanceof gf?e.dom:e,c||Xb(e);for(var k=T(e,h,c),l=k.length,m=1===l?0:(h&&h.interval||.6)*f/(l-1),n=f-(l-1)*m,o="string"==typeof a,p=b.createDocumentFragment();l-->0;){var q=k[l];if(q)for(var r=q.length;r-->0;){var s=q[r];p.appendChild(s.div),d=o?fd.getAnimation(s.div,a,n,h):S(s,a,n,h,c),i.add(d,m*l)}}var t=b.createElement("div");t.className="leo-animation-container leo-animation-unnecessary",bi(t,{left:e.offsetLeft,top:e.offsetTop,width:Td(e),height:Wd(e),transform:bi(e,"transform"),zIndex:bi(e,"zIndex"),overflow:h.overflow||"visible"}),c||Yb(e),t.appendChild(p),e.parentNode&&e.parentNode.insertBefore(t,e),d=ld.create(t,f),d.apply({display:{to:"",constant:1,freeze:!1}}),i.add(d,0),Yb(t),i.addEventListener("destroy",function(){t.parentNode&&t.parentNode.removeChild(t)},null)},null),i}}function S(a,b,c,d,e){function f(){j.removeEventListener("init",f,null),j.apply(h)}var g=e?"to":"from",h={};h.display={to:e?"none":""},e&&(h.display.constant=2);var i=b;"function"==typeof b&&(i=b(a,c));var j;if("string"==typeof i)j=fd.getAnimation(a.div,i,c,d);else if(i instanceof ld||i instanceof fd||i instanceof hd)j=i;else{for(var k in i){var l=i[k],m=h[k]={};if("object"==typeof l)for(var n in l)m[n]=l[n];else m[g]=l,m.freeze=!e}j=ld.create(a.div,c,d),j.addEventListener("init",f,null)}return j}function T(a,c,d){void 0===c&&(c={});var e=Td(a),f=Wd(a),g=c.row||5,h=c.col||5;0>g&&(g=5),0>h&&(h=5);var i=Math.floor(e/h),j=h-e%h,k=Math.floor(f/g),l=g-f%g,m=b.createElement("div");m.className="leo-animation-block",bi(m,{display:d?"block":"none",width:i,height:k});var n=a.cloneNode(!0);Gi(n).addClass("leo-animation-clone").select("iframe,video,audio,canvas,.leo-animation-unnecessary").remove(),bi(n,{width:Sd(a),height:Vd(a)}),m.appendChild(n);var o,p,q,r,s=0,t=i,u=k,v=de.getSequenceTable(c.sequence,g,h,c.originX&&"right"===c.originX.toLowerCase(),c.originY&&"bottom"===c.originY.toLowerCase(),c.log),w=new Array(v.pop());do{r=0,k=u,bi(m,"height",u),s===j&&(i+=1,bi(m,"width",i));do m.id="_"+s+"_"+r+"_",o=s*t+Math.max(s-j,0),p=r*u+Math.max(r-l,0),r===l&&(k+=1,bi(m,"height",k)),bi(m,{left:o,top:p}),bi(m.childNodes[0],{left:-o,top:-p}),q=v[r*h+s],w[q]||(w[q]=[]),w[q].push({ClientRect:{width:i,height:k,left:o,top:p},div:m,index:{i:s,j:r}});while((m=m.cloneNode(!0))&&++r<g)}while(++s<h);return w}function U(a,b,c){if(c){var d=ef.get(a.componentType,b);return d?a.getProperty(d):Yh(a.dom,b)}return Yh(a,b,!0)}function V(a,b,d,e){void 0===d&&(d={}),["In","Out"].forEach(function(f,g){fd.registerAnimationFactory("TA"+a+f,function(a,h,i){void 0===i&&(i={});var j=1===g,k=a instanceof gf,l=k?a.dom:a,m=bc(l,!0);if(null===m)return fd.getAnimation(a,"Fade"+f,h,i);var n=m.el;n.className+=" leo-splitText-el leo-animation-unnecessary",Yb(n),l.parentNode.insertBefore(n,l);var o=Dd(l.childNodes);o.forEach(function(a){1===a.nodeType&&bi(a,"transformStyle","preserve-3d")});var p=m.chars,q=m.chars.length,r=de.getSequenceTable("random",1,q),s=(i.random!==c?i.random:d.random)?r.pop():!1,t=0,u=d.interval,v=fe(h*(1-(null==i.interval?null==u?.5:u:i.interval))),w=(h-v)/(s?s:q-1),x=Kc(b),y=hd.create(i);if(j)var z=x.pop();else z=x.shift();var A=x.length;e||(e=[]),x.forEach(function(a,b){j&&(b=A-b-1,a=x[b]);var c=e[b],f=fe(v*(c||1/A))||1,g=i.easing||d.easing||"linear";p.forEach(function(b,c){var d,e={};for(var h in a)d=a[h],e[h]="function"==typeof d?{to:d(b,c)}:{to:d};var i=ld.create(b,f,{delay:ge(w*(s?r[c]:c)+t),easing:g});i.addEventListener("init",function(){i.apply(e),bi(b,"visibility","visible")},null),i.addEventListener("end",function(){j&&bi(b,"visibility","hidden")},null),y.add(i)}),t+=f});var B=d.transformOrigin,C="function"==typeof B,D="string"==typeof B,E=C||D;return p.forEach(function(a,b){E&&bi(a,"transformOrigin",C?B(a,b):B),j||bi(a,"visibility","hidden");for(var c in z){var d=z[c];"function"==typeof d?bi(a,c,d(a,b)):bi(a,c,d)}}),y.addEventListener("update",function(){1===y._ratio?(j||(k?a.visible=!0:Xb(l)),Yb(n)):(k?a.visible=!1:Yb(l),Xb(n))},null),y.addEventListener("destroy",function(){l.parentNode.removeChild(n),m=null,l=null},null),y})})}function W(a){return function(b){return 1-a(1-b)}}function X(a){return function(b){return.5*(.5>b?a(2*b):2-a(2-2*b))}}function Y(a,b,c){fd.registerTransitionFactory(a,function(a,d,e,f){var g=hd.create(f),h={easing:g.easing};return d instanceof gf?d.visible=!1:_h(d,"display","none"),g.add(fd.getAnimation(d,b,e,h)),g.add(fd.getAnimation(a,c,e,h)),g})}function Z(a,b,c){return function(d,e){b&&(d.options={duration:c||+d.params.duration||0});var f=d.params,g={};for(var h in a)f.hasOwnProperty(h)&&(g[h]=f[h]);return d.params=Hb(g,e.type),Vc(d.params)?void 0:b?wb:ub}}function _(a){this.embedCode=a.params.content}function ab(a){this.src=a.params.content,this.natualWidth=a.params.swfWidth,this.natualHeigth=a.params.swfHeight}function bb(){var a=this.stage.context;this.zIndex=a.getVariable("maxZIndex")}function cb(a){var b=a.params,c=parseInt(b.direction,10);c===c&&(c=90===c?"top":0===c?"right":270===c?"bottom":"left",this.direction=c);var d=parseInt(b.speed,10);d===d&&(this.speed=d)}function db(a){var b=a.params,c=parseInt(b.direction,10);c===c&&(this.direction=c);var d=parseInt(b.spin,10);d===d&&(this.spin=d);var e=parseInt(b.speed,10);e===e&&(this.speed=e);var f=b.mode;f&&(this.mode=f.toLowerCase())}function eb(a){te.showHide(this,!!a.params.visible,a.params.duration)}function fb(a){Ee||(Ee=b.createElement("a"),Ee.style.display="none",Ee.style.visibility="hidden",b.body.appendChild(Ee)),Ee.setAttribute("href","mailto:"+a.content),Ee.textContent="mailto:"+a.content,Ee.click()}function gb(a){var b=this.stage.context.getInnerVariable("__app__").options;b.apis&&b.apis.gotoPageFun&&b.apis.gotoPageFun(a.content)}function hb(a){Ge.getInstance(a).show(Fe.getInstance().config(a))}function ib(a){this.URLString!==a.params.content&&(this.url=this.__url=a.params.content)}function jb(a){Ge.getInstance(a).show(Ke.getInstance().config(a))}function kb(a,b){Le||(Le=new Oe),Le.config(a,b),Le.show()}function lb(a){var b=this.stage.context.getInnerVariable("__app__").options;b.apis&&b.apis.focusOnFunc&&b.apis.focusOnFunc(a.params)}function mb(b){var c=b.content;(""!==c||"http://"!==c)&&a.open(c,b.params.target,"")}function nb(a){Ge.getInstance(a).show(Me.getInstance().config(a))}function ob(a,b){Ne||(Ne=new Pe),Ne.config(a,b),Ne.show()}function pb(a,b){new Qe(a,b.target)}function qb(a){var b=Ge.getInstance(),c=Re.getInstance(b.plugin_container);bf.isMobile&&Yb(Ge.getInstance().close_button[0]),b.show(c,function(){c.config(a)})}function rb(a){a.params.customSize=!0,a.params.width=1e4,a.params.height=1e4,Ge.getInstance().show(Se.getInstance().config(a))}function sb(a){Ge.getInstance().show(Se.getInstance().config(a))}function tb(a){var b=this.stage.context.getInnerVariable("__app__").options;b.apis&&b.apis.resetFocusFunc&&b.apis.resetFocusFunc(a.params.duration)}function ub(a){var b=a.params,c=b;this.setProperty(c),(this instanceof kf||this instanceof jf&&c.src===this.src)&&this.audio.replay()}function vb(a){fd.destroyAnimationsOfTarget(this),ub.call(this,a)}function wb(a){var b=a.params,c=b;te.tween(this,c,a.options)}function xb(a,b){Ye.actionsCandicates.push([a,b])}function yb(a,b){var c=a.target?b.stage.context.components.queryByName(a.target):b;return c||Ui.warning("event target missed","cannot find the event target '"+a.target+"' in current context '"+b.stage.name+"'"),c}function zb(a,b){for(var c=-1,d=a.length;++c<d;){var e=a[c],f=e[0],g=e[1],h=b[f],i=g.action,j=h.events=[],k=Ue,l=Ae;if(!Array.isArray(i)){var m=i.advancedEvents;i=[i],m&&m.length>0&&(i=i.concat(m),delete i[0].advancedEvents)}for(var n=null,o=0,p=-1,q=i.length;++p<q;){var r=i[p],s=(r.when||"click").toLowerCase(),t=r.action||r.type,u=r.target;if("none"!==t&&(!u||b[u])){"o"===s[0]&&"n"===s[1]&&(s=s.substr(2));var v={trigger:Ve[s]||s,target:u||f,params:r.params};for(var w in r)k[w]||(v[w]=r[w]);v.action=l[t]&&l[t](v,u&&b[u]||h,r,h),v.action&&(n=v.hint||t,j.push(v),"timer"===v.trigger&&++o)}}j.length?j.length>o&&(h["node.addClass"]="leo-action-trigger hi-action",n&&1===j.length&&(h["dom.title"]=Yc(n,50))):h.events=null}}function Ab(a,b){if(a&&(a.animation||a.name)){var c=Kc(a);a.animation&&(c.name=a.animation,delete c.animation),null!=a.start&&(c.delay=(c.delay||0)+a.start,delete c.start),c.repeat&&-1!==c.repeat&&--c.repeat;var d=c.name.toLowerCase();if("sound"===b&&("fadein"===d?c.name="SoundFadeIn":"fadeout"===d&&(c.name="SoundFadeOut")),We[d])We[d](c,b);else if(+c.userDefined&&"sprite"===b){var e=c.params;c.params={action:c.name,sound:e.sound,text:e.text},delete e.sound,delete e.text,c.params.motion=Hb(gc({scaleX:1,scaleY:1},e),b),c.name="SpriteMotion"}return c}return null}function Bb(a,b,c){if(b&&b.length){var d,e=Ab,f=[],g=0,h=!1;a.animations=null;for(var i=-1,j=b.length;++i<j;){var k=b[i],l=(k.animation||k.name||"").toLowerCase(),m=(k.showType||"").toLowerCase();if(l)if("alwaysdisplay"!==l){if("none"===l)if("in"===m)k.animation="sound"===c.toLowerCase()?"SoundShow":"Show";else{if("out"!==m)continue;k.animation="sound"===c.toLowerCase()?"SoundHide":"Hide"}var n=e(k,c);n&&(f.push(n),delete n.showType,"in"===m?a.enter=Kc(n):"out"===m?a.leave=Kc(n):d=n,"none"!==l&&(h=!0),g=Math.max(n.delay,g))}else"out"===m&&(g=Math.max(k.start,g))}d&&d.delay+d.duration>=g&&!a.leave&&(d.repeat=-1),a.enter||a.manual||(a.defaultProps.visible=!0),f.length&&(a.animations=f.sort(function(a,b){return a.delay-b.delay}),h&&(a["transform.accelerate"]=!0))}else a.manual||(a.defaultProps.visible=!0)}function Cb(a){var b=a.template.type.toLowerCase(),c={type:b,reset:!0,name:a.template.name,manual:!a.template.visible,defaultProps:Hb(a.style,b,Kc(Xe)),events:null};Ye.components[c.name]=c,Bb(c,a.animations,b);var d=ff.getClass(b),e=d&&d.textType;return e&&(c.textContent=a.template.content),_e[b]&&_e[b](c,a),e&&c.textContent&&(c.textContent=c.defaultProps.textContent=Ib(c.textContent,e)),a.action&&xb(c.name,a),a.elements&&a.elements.length>0&&(c.children=Eb(a.elements)),c}function Db(a){if(a)for(var b=-1,c=a.length;++b<c;){var d=a[b],e=(d.showType||"").toLowerCase();if("out"===e){var f=(d.animation||"").toLowerCase();return f&&"alwaysdisplay"!==f?+d.duration:-1}}return-1}function Eb(a){for(var b,c=[],d=Cb,e=Te,f=-1;++f<a.length;){var g=a[f];if(b=e[g.template.type.toLowerCase()])b(g,a,c);else{var h=d(g);h&&c.push(h)}}return c}function Fb(a){var b=Ye;Ye=Gb(a);var c=Ye.components[a.info.name]={name:a.info.name,type:(a.info.type||"scene").toLowerCase(),reset:!0,manual:!1,transition:null,defaultProps:{width:a.info.width,height:a.info.height},events:null};return c.transition=Ab(a.transition,c.type)||{name:"None"},Ye.scene=c,c.children=Eb(a.elements),a.action&&xb(c.name,a),zb(Ye.actionsCandicates,Ye.components),Ye=b,c}function Gb(a){return{scene:null,option:a,actionsCandicates:[],components:{}}}function Hb(a,b,c){var d=ef,e=Ze;c=c||{};for(var f in a){var g=a[f];if("string"==typeof g&&("color"===f||f.indexOf("Color")>=0)&&g.indexOf(";")<0&&(g=cf.parseToString(g)),e[f])e[f](g,b,c,d);else{var h=d.get(b,f);h&&"!"!==h&&(c[h]=g)}}return c}function Ib(a,b){if(a){if(1===b)return Pc(a).replace(/\/\^r\$\//g,"<br>");var c=Ph(a,!0);return Jb(c)}return""}function Jb(a){if(1!==a.nodeType&&11!==a.nodeType)return a.textContent||"";for(var b="",c=a.childNodes,d=Kb,e=-1,f=c.length;++e<f;){var g=c[e];b+=1===g.nodeType?d(g):g.textContent||""}return b}function Kb(a){function b(a,b){var f=c(a),g=d(a),h=e(a),i=$e[f];return"function"==typeof i?i(g,b):(i[0]+1)*g+(i[1]||0)+(b&&i[2]||0)+h}function c(a){if(!a||!a.getAttribute)return"arial";var b=a.getAttribute("face");return b?b.toLowerCase():c(a.parentNode)}function d(a){if(!a||!a.getAttribute)return 50;var b=a.getAttribute("size");return b?+b:d(a.parentNode)}function e(a){if(!a||!a.getAttribute)return 0;var b=a.getAttribute("leading");return b?+b:e(a.parentNode)}function f(){var c=a.getElementsByTagName("font")[0],d="";if(c){var e=+c.getAttribute("size");e&&(d+="font-size:"+e+"px;");var f=c.getAttribute("face")||"";f&&(d+="font-family:"+f+";"),d+="line-height:"+b(c,!1)+"px;"}return d?'<br style="'+d+'"/>':"<br/>"}var g,h=a.nodeName.toLocaleLowerCase(),i=a.parentNode,j="",k="span";switch(h){case"textformat":return Jb(a);case"p":if(!a.textContent&&a.getAttribute)return f();(g=a.getAttribute("align"))&&(j="text-align:"+g.toLowerCase()+";"),i&&"textformat"===i.nodeName.toLowerCase()&&((g=i.getAttribute("leftmargin"))&&(j+="padding-left:"+g+"px;"),(g=i.getAttribute("leading"))&&a.setAttribute("leading",g)),k="p";break;case"font":(g=a.getAttribute("face"))&&(j+="font-family:"+g+";"),(g=a.getAttribute("size"))&&(j+="font-size:"+g+"px;"),j+="line-height:"+b(a,!1)+"px;",(g=a.getAttribute("color"))&&(j+="color:"+g+";"),(g=a.getAttribute("letterspacing"))&&(j+="letter-spacing:"+g+"px;");break;case"i":j="font-style:italic;";break;case"b":j="line-height:"+b(a,!0)+"px;",k="b";break;default:k=h}return"<"+k+(j?' style="'+j+'"':"")+">"+Jb(a)+"</"+k+">"}function Lb(a,b,c){return a=0>a?a+1:a>1?a-1:a,~~(255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5)}function Mb(a){return a.textContent="",a}function Nb(a,b){var c=a[0]||1,d=a[1]||0,e=a[2]||0,f=a[3]||1,g=[c,d],h=[e,f];b._tx=a[4]||0,b._ty=a[5]||0;var i=b._scaleX=Math.sqrt(g[0]*g[0]+g[1]*g[1]);g[0]/=i,g[1]/=i;var j=g[0]*h[0]+g[1]*h[1];h[0]-=j*g[0],h[1]-=j*g[1],i=b._scaleY=Math.sqrt(h[0]*h[0]+h[1]*h[1]),h[0]/=i,h[1]/=i,b._skewX=j/i;var k=c*f-d*e;0>k&&(f>c?b._scaleX*=-1:b._scaleY*=-1),(c||d)&&(b._rotation=Math.atan2(d,c)*pe),b._skewX=Math.atan2(b._skewX,1)*pe}function Ob(a,b){if(0!==a[15]){if(1!==a[15]){for(var c=-1;++c<4;)for(var d=-1;++d<4;)a[4*c+d]/=a[15];a[15]=1}if(0!==a[3]||0!==a[7]||0!==a[11]){var e=[a[3],a[7],a[11],1];a[3]=a[7]=a[11]=0;var f=nc(a),g=oc(e,f);b._p=-1/g[2];var h=g[3];if(1!==h)for(c=-1;++c<4;)for(d=-1;++d<4;)a[4*c+d]/=h}else b._p=0;b._tx=a[12],b._ty=a[13],b._tz=a[14];var i=[],j=[],k=[];for(c=-1;++c<3;)i[c]=a[c],j[c]=a[4+c],k[c]=a[8+c];rc(i,b._scaleX=pc(i)),j=sc(j,i,1,-(b._skewX=qc(i,j))),rc(j,b._scaleY=pc(j)),b.skewX/=b.scaleY,k=sc(k,i,1,-qc(i,k)),k=sc(k,j,1,-qc(i,j)),rc(k,b._scaleZ=pc(k));var l=tc(j,k);if(qc(i,l)<0)for(b._scaleX*=-1,b._scaleY*=-1,b._scaleZ*=-1,c=-1;++c<3;)i[c]*=-1,j[c]*=-1,k[c]*=-1;b._rotationX=Math.atan2(j[2],k[2]),b._rotation=Math.atan2(i[1],i[0])*pe,b._rotationY=Math.atan2(-i[2],k[2]/Math.cos(b._rotationX))*pe,b._rotationX*=pe,b._skewX=Math.atan2(b._skewX,1)*pe}}function Pb(a){var b=a.cloneNode(!0);if(a[dh]){var c=new ch(this._dom);c.clone(a[dh])}return b}function Qb(a,b){if(a)if(Array.isArray(a))a.forEach(b);else for(var c in a)a.hasOwnProperty(c)&&b(a[c],c,a)}function Rb(a){return a[th]||(a[th]=sh++)}function Sb(a,b){var c=b._originalEvent;if(c.touches&&c.touches.length){var d=c.touches;b.pageX=d[0].pageX,b.pageY=d[0].pageY}return b}function Tb(a,b,c,d){nh(a,b,vh[c]=function(b){b.preventDefault(),d.call(a,Sb(a,b))},!0)}function Ub(a,b,c){vh[c]&&(qh(a,b,vh[c],!0),delete vh[c])}function Vb(a){return"none"===Yh(a,"display")||!gh(a.ownerDocument,a)}function Wb(a){a.parentNode&&a.parentNode.removeChild(a)}function Xb(a){return Zb(a,!0)}function Yb(a){return Zb(a,!1)}function Zb(a,b){var c,d,e,f="data-old-display",g=a.style;g&&(e=a.getAttribute(f),c=g.display,b?(e||"none"!==c||(g.display=""),""===g.display&&Vb(a)&&(e=ac(a.nodeName),a.setAttribute(f,e))):e||(d=Vb(a),(c&&"none"!==c||!d)&&a.setAttribute(f,d?c:Yh(a,"display"))),b&&"none"!==g.display&&""!==g.display||(g.display=b?e||"":"none"))}function $b(a,b){var c=b.createElement(a);b.body.appendChild(c);var d=Yh(c,"display");return b.body.removeChild(c),d}function _b(){Oh||(Oh=vd(function(){sd.removeChild(Nh),Nh=null,Oh=null},6e4))}function ac(a){var c=b,d=Rh[a];return d||(d=$b(a,c),"none"!==d&&d||(Nh||(Nh=c.createElement("iframe"),Nh.setAttribute("frameborder","0"),Nh.setAttribute("width","0"),Nh.setAttribute("height","0"),Nh.style.cssText="display:block !important"),sd.appendChild(Nh),c=(Nh.contentWindow||Nh.contentDocument).document,c.write("<!doctype html><html><body>"),c.close(),d=$b(a,c),_b()),Rh[a]=d),d}function bc(a,b){if(a){var c="SPAN",d="<SPAN>";1===a.nodeType&&(c=a.tagName,d=dc(a));var e=ec(a);if(e){var f=Ph(d+e+"</"+c+">",!0).firstChild;return{el:f,chars:Dd(cc(f,b))}}}return null}function cc(a,c){var d=a.style.position;a.style.position="relative",Gi(a).addClass("leo-temp-show");var e=Dd(a.querySelectorAll(".leo-char"));if(!c)return a.style.position=d,Gi(a).removeClass("leo-temp-show"),e;b.body.appendChild(a);var f=[];return e.forEach(function(a){var b=Qh(a);b.lineHeight=Ud(a)+"px",b.position="absolute",f.push(b)}),f.forEach(function(a,b){var c=e[b];bi(c,a)}),b.body.removeChild(a),a.style.position=d,Gi(a).removeClass("leo-temp-show"),e}function dc(a){for(var b="<"+a.tagName,c=a.attributes,d=-1,e=c.length;++d<e;){var f=c[d];f&&(b+=" "+f.name+'="'+f.value.replace(/"/g,'\\"')+'"')}return b+">"}function ec(a){var b=a.nodeType,c="";if(3===b)for(var d=a.textContent,e=Uh,f=-1,g=d.length;++f<g;){var h=d[f];c+=e.test(h)?h:"<SPAN class='leo-char'>"+Qc(h)+"</SPAN>"}else if(1===b)for(var i=a.childNodes,f=-1,g=i.length;++f<g;){var j=i[f];if(1===j.nodeType){var k=j.tagName,l=k.toLowerCase();if(!Sh[l]){if(Th[l]){c+="<"+k+"/>";continue}var m=dc(j),n=ec(j);c+=m+n+"</"+k+">"}}else c+=ec(j)}return c}function fc(a,b){var c,d=Vh(a,null);return d&&(c=d[b],(null==c||""===c)&&(c=a.style[b]||"")),c}function gc(){var a=arguments[0],b=!1,c=0,d=arguments.length;for("boolean"==typeof a&&(b=a,a=arguments[1],c=1),1===d&&(a=this,c--),a=a||{};++c<d;){var e=arguments[c];if(null!=e&&e!==a)for(var f in e)(b||!a.hasOwnProperty(a,f))&&(a[f]=e[f])}return a}function hc(a,b,c,d){var e,f,g={},h=a.style;for(f in b)g[f]=h[f],h[f]=b[f];e=c.apply(a,d||[]);for(f in b)h[f]=g[f];return e}function ic(a,b,c,d,e){var f,g,h=20,i=a.style,j=1,k=Xf(b),l=!1;return k in i?g=Yh(a,b,!1):(g=i.left,b=k="left"),l=Vb(a),l&&Zb(a,!0),_h(a,b,c+d),f=Yh(a,b,!0),0===f?0:(hc(a,Xd,function(){do c/=j,_h(a,b,c+e);while(j!==(j=Yh(a,b,!0)/f)&&1!==j&&--h)}),i[k]=g,l&&Zb(a,!1),c)}function jc(a,b){for(var c=b.nodeType?b:Ph(b),d=c;d.firstChild&&1===d.firstChild.nodeType;)d=d.firstChild;return a.parentNode&&a.parentNode.insertBefore(c,a),d.appendChild(a),a}function kc(a,b,c,d){var e=0,f=0;if(a)if(b){var g=b/a;e=c*d/Math.sqrt(d*d+g*g*c*c)||0,0>a&&(e*=-1),f=g*e}else e=0>a?-c:c;else f=0>b?-d:d;return[e,f]}function lc(a){for(var b=[],c=-1;++c<16;)b[c]=a[c];for(c=-1;++c<3;)for(var d=c;++d<4;){var e=4*d+c,f=b[e]/=b[4*c+c];for(e=c;++e<4;)b[4*d+e]-=f*b[4*c+e]}return b}function mc(a,b){for(var c=[b[0]],d=[],e=0;++e<4;){for(var f=0,g=-1;++g<e;)f+=a[4*e+g]*c[g];c[e]=b[e]-f}for(d[3]=c[3]/a[15],e=15;--e>=0;){for(f=0,g=4;--g>e;)f+=a[4*e+g]*d[g];d[e]=(c[e]-f)/a[4*e+e]}return d}function nc(a){for(var b=[],c=-1;++c<4;)b[c]=0;var d=[],e=d.push;for(c=-1;++c<4;)b[c]=1,e.apply(d,mc(lc(a),b)),b[c]=0;return d}function oc(a,b){return[a[0]*b[0]+a[1]*b[4]+a[2]*b[8]+a[3]*b[12],a[0]*b[1]+a[1]*b[5]+a[2]*b[9]+a[3]*b[13],a[0]*b[2]+a[1]*b[6]+a[2]*b[10]+a[3]*b[14],a[0]*b[3]+a[1]*b[7]+a[2]*b[11]+a[3]*b[15]]}function pc(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function qc(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function rc(a,b){a[0]/=b,a[1]/=b,a[2]/=b}function sc(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function tc(a,b){return[a[1]*b[2]-b[1]*a[2],a[2]*b[0]-b[2]*a[0],a[0]*b[1]-b[0]*a[1]]}function uc(a,b){var c,d=jh(a),e=!!d.space;return c=null==b?e?function(){this.removeAttributeNS(d.space,d.local)}:function(){this.removeAttribute(a)}:"function"==typeof b?e?function(a){var c=b.call(this,a);null==c?this.removeAttributeNS(d.space,d.local):this.setAttributeNS(d.space,d.local,c)}:function(c){var d=b.call(this,c);null==d?this.removeAttribute(a):this.setAttribute(a,d)}:e?function(){this.setAttributeNS(d.space,d.local,b)}:function(){this.setAttribute(a,b)}}function vc(a,b){var c=(""+a).split(/\s+/).map(wc),d=c.length;return"function"==typeof b?function(a){var e=b.call(this,a);for(a=-1;++a<d;)c[a](this,+e)}:function(){for(var a=-1;++a<d;)c[a](this,+b)}}function wc(a){var b=" "+a+" ";return function(c,d){var e=c.classList;
if(e)!d||2===d&&e.contains(a)?e.remove(a):e.add(a);else{var f=" "+c.className+" ";!d||2===d&&f.indexOf(b)>=0?c.className=f.replace(b," ").trim():f.indexOf(b)<0&&(c.className=(f+a).trim())}}}function xc(a){return"function"==typeof a?a:function(){return kh(a,this.namespaceURI)}}function yc(a,b){return"function"==typeof b?function(c){this[a]=b.call(this,c)}:function(){this[a]=b}}function zc(a,b){var c,d=!!Zh[a],e=$h[a];return e&&e.set?c=e.set:(a=Xf(a),c=function(b,c){null==c?b.style[a]="":ai(b,a,c)}),null==b?function(){c(this,null)}:"function"==typeof b?function(a){var e=b.call(this,a)+"";isFinite(+e)&&!d&&(e+="px"),c(this,e)}:(isFinite(+b)&&!d&&(b+="px"),function(){c(this,b)})}function Ac(a){Gd.log.apply(Gd,a)}function Bc(a){Gd.warn.apply(Gd,a)}function Cc(a){Gd.error.apply(Gd,a)}function Dc(a){return function(b){return b[0]="["+(new Date).toLocaleString()+"]"+b[0],a(b)}}function Ec(a,b){return function(c){return c[0]="["+b+"]"+c[0],a(c)}}function Fc(a){return function(b,c,d){return d.unshift(b?b+": "+(c||""):c),a(d)}}function Gc(a){return function(b,c){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];return a(b,c,d)}}function Hc(a,b,c){return function(d){return c()?a(d):b(d)}}function Ic(){return Ui.timeStampEnabled}function Jc(a,b,c){return b>a&&(a=b),a>c&&(a=c),a}function Kc(a,b){var c=Array.isArray(a)?[]:{};for(var d in a)a.hasOwnProperty(d)&&(c[d]=b?Kc(a[d],!0):a[d]);return c}function Lc(a,b){return"linear-gradient("+(/deg$/.test(a)?a:"to "+a)+","+b.join(",")+")"}function Mc(a,b){return a=a.split(" ").map(function(a){return"left"===a?"right":"right"===a?"left":"top"===a?"bottom":"bottom"===a?"top":a}).join(" "),gg+"linear-gradient("+a+","+b.join(",")+")"}function Nc(a,b){return eg?Lc(a,b):fg?Mc(a,b):"transparent"}function Oc(a,b,c,d,e,f){var g=a+"px "+b+"px ";return null!=c&&(g+=c+"px "),e&&(g+=e+"px "),d&&(g+=d),f?"inset "+g:g}function Pc(a){return Ji||(Ji=kh("div")),Ji.textContent=a,Ji.innerHTML}function Qc(a){return Wi[a]?"&"+Wi[a]+";":a}function Rc(a,b,c){var d=c;return b.replace(Yi,function(a,b,c,e,f){if(b=b||e,d){var g;b in d&&(g=d[b]),d=f&&"object"==typeof g?g():g}}),(null==d||d==c?a:d)+""}function Sc(a,b){return a.replace(Xi,function(a,c){return Rc(a,c,b)})}function Tc(a,b){b||(b=Uc);for(var c=0,d=a.length;++c<d;){for(var e=a[c],f=a[c-1],g=c;--g>=0&&b(e,f)<0;)a[g+1]=a[g],f=a[g-1];a[g+1]=e}}function Uc(a,b){return a-b}function Vc(a){for(var b in a)return!1;return!0}function Wc(a,b,c){arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0));for(var d=[],e=1;c*e%1;)e*=10;var f,g=-1;if(a*=e,b*=e,c*=e,0>c)for(;(f=a+c*++g)>b;)d.push(f/e);else for(;(f=a+c*++g)<b;)d.push(f/e);return d}function Xc(a){return a>-1e-7&&1e-7>a?0:a}function Yc(a,b){if(a.length>b){var c=(b>>1)-2,d=(b>>1)-1;return a.substr(0,c)+"..."+a.substr(a.length-d,d)}return a}function Zc(a,b,c){for(var d="",e=[],f=0,g=-1,h=a.length;++g<h;){var i=a[g],j=!1;"("===i?(f++,d+=i):")"===i?(f--,d+=i,0===f&&c&&(j=!0)):i===b&&0===f?j=!0:d+=i,j&&(d.trim(),d&&e.push(d),d="")}return i!==b&&d&&e.push(d.trim()),0!==f&&(e=[a]),e}function $c(a){var b=_c(a);return b&&(b.scenes[0].children.length||b.scenes[0].events)?new $i(b):new bd}function _c(b){var c="__leo_parsedData__",d=b.slide[c];return b&&b.slide?(d||(d=Fb(b.slide),b.slide[c]=d),{initialWidth:b.initialWidth||0,initialHeight:b.initialHeight||0,stageWidth:b.slide.info.width,stageHeight:b.slide.info.height,scenes:[d],preloadType:1,container:b.container,plugins:[{name:"progressBar"}],apis:{focusOnFunc:b.focusOnFunc,resetFocusFunc:b.resetFocusFunc,gotoPageFun:b.gotoPageFun||a.gotoPageFun}}):null}var ad=a.leopard={version:"0.2.6",author:"Terence Z., Q.Y.B.",buildDate:"Fri Apr 24 2015 15:45:58"},bd=function(){function a(){}var b=a.prototype;return b.play=b.pause=b.reset=b.replay=b.destroy=b.resize=function(){return this},a}();if(function(){function a(a){return arguments.length?void(b._test=a):b._test}try{var b={};return d(b,"test",{get:a,set:a}),b.test=2,b.test<<2!==8}catch(c){return!0}}())return void(a.hiSliderFactory=function(){return new bd});var cd=function(){function a(){this._hashCode=a.hashCount++}return d(a.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0}),a.hashCount=1,a}(),dd=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},ed=function(a){function b(b){a.call(this),this._eventsMap=null,this._eventTarget=b?b:this}return dd(b,a),b.prototype.addEventListener=function(a,b,c,d){void 0===d&&(d=0);var e=this._eventsMap;e||(e=this._eventsMap={});var f=e[a];f||(f=e[a]=[]),this._insertEventBin(f,b,c,d)},b.prototype._insertEventBin=function(a,b,c,d){for(var e=-1,f=-1,g=a.length;++f<g;){var h=a[f];if(h.fn===b&&h.ctx===c)return!1;-1===e&&h.pr<d&&(e=f)}var h={fn:b,ctx:c,pr:d};return-1!==e?a.splice(e,0,h):a.push(h),!0},b.prototype.removeEventListener=function(a,b,c){var d=this._eventsMap;if(d){var e=d[a];e&&(this._removeEventBin(e,b,c),0===e.length&&delete d[a])}},b.prototype._removeEventBin=function(a,b,c){for(var d=-1,e=a.length;++d<e;){var f=a[d];if(f.fn===b&&f.ctx===c)return a.splice(d,1),!0}return!1},b.prototype.removeAllEventListeners=function(a){this._eventsMap&&(a?delete this._eventsMap[a]:this._eventsMap=null)},b.prototype.destroy=function(){this.removeAllEventListeners(),this._eventTarget=null},b.prototype.hasEventListener=function(a){return!(!this._eventsMap||!this._eventsMap[a])},b.prototype.dispatchEvent=function(a){return a._setCurrentTarget(a._target=this._eventTarget),this._notifyListener(a)},b.prototype._notifyListener=function(a){var b=this._eventsMap;if(!b)return!0;var c=b[a._type];if(!c)return!0;c=c.concat();for(var d=-1,e=c.length;++d<e;){var f=c[d];if(f.ctx?f.fn.call(f.ctx,a):f.fn(a),a._isImmediatePropagationStopped)break}return!a._defaultPrevented},b.prototype.dispatchEventWith=function(a,b,c){void 0===b&&(b=!1),(b||this.hasEventListener(a))&&ci.dispatchEvent(this,a,b,c)},b.prototype.dispatchSimpleEvent=function(a,b){if(this.hasEventListener(a)){var c=ci.getEventInstance(ci,a,!1,!1,b);c._setCurrentTarget(c._target=this),this._notifyListener(c),ci.recycle(c)}},b}(cd),fd=function(a){function b(c){a.call(this),this.__leo_guid__=w(),this.startTime=0,this._duration=1e3,this._currentTime=0,this._totalDurationDirty=!1,this._totalDuration=1e3,this._currentTotalTime=0,this._delay=0,this._timeScale=1,this._repeat=0,this._repeatDelay=0,this._isEnd=!1,this._yoyo=!1,this._reverse=!1,this._timeline=null,this._target=null,this._paused=!1,this._initialized=!1,this._ratio=0,this._cycle=0,this._rawTotalTime=0,this._arrival=0,this._prevTime=0,this._forced=!1,c&&b.addTargetAnimation(c,this),this._target=c,this.setEasing("easeInOutQuad")}return dd(b,a),d(b.prototype,"duration",{get:function(){return this._duration},set:function(a){if(this._duration!==a){var b=this._duration;this._duration=a,this._setTotalDurationDirty(),this.notifyPropertyChange("duration",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"currentTime",{get:function(){return this._currentTime},set:function(a){this._currentTime===a&&this.duration||(this.currentTotalTime=a+this._cycle*(this.duration+this._repeatDelay))},enumerable:!0,configurable:!0}),d(b.prototype,"totalDuration",{get:function(){if(this._totalDurationDirty){this._totalDurationDirty=!1;var a=this._totalDuration,b=this._totalDuration=this.duration;1/0!==b&&(this._totalDuration=b+this._repeat*(b+this._repeatDelay)),this._rawTotalTime>=a&&(this._totalDuration>a&&(this._isEnd=!1),this._rawTotalTime=Math.min(this._rawTotalTime,this._totalDuration,a))}return this._totalDuration},enumerable:!0,configurable:!0}),b.prototype._setTotalDurationDirty=function(){this._totalDurationDirty||(this._totalDurationDirty=!0,this._timeline&&this._timeline._setChildDirty(this,this.startTime,!1))},d(b.prototype,"currentTotalTime",{get:function(){return this._currentTotalTime},set:function(a){if(this._currentTotalTime!==a||!this.duration){this._isEnd=!1;var b=this.startTime;this.update(this._reverse?this.totalDuration-a:a,!0),this._timeline&&(this.startTime=this._timeline._currentTime-(this._rawTotalTime?this._rawTotalTime/this._timeScale:0),this._timeline._setChildDirty(this,this.startTime,this.startTime!==b))}},enumerable:!0,configurable:!0}),d(b.prototype,"delay",{get:function(){return this._delay},set:function(a){if(this._delay!==a){var b=this._delay;if(this._delay=a,this._timeline){var c=this._timeline._currentTime,d=this.startTime;this.startTime+=a-b,c>d&&this.startTime>c&&this.update(0),this._timeline._setChildDirty(this,this.startTime,!0)}this.notifyPropertyChange("delay",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"timeScale",{get:function(){return this._timeScale},set:function(a){if(this._timeScale!==a){var b=this._timeScale;this._timeScale=a,this._timeline&&this._timeline._setChildDirty(this,this.startTime,!1),this.notifyPropertyChange("timeScale",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"repeat",{get:function(){return this._repeat},set:function(a){if(-1===a&&(a=this._foreverRepeat),this._repeat!==a){var b=this._repeat;this._repeat=a,this._setTotalDurationDirty(),this.notifyPropertyChange("repeat",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"_foreverRepeat",{get:function(){var a=this.duration+this._repeatDelay;return a?(6048e5-this._duration)/a:1e6},enumerable:!0,configurable:!0}),d(b.prototype,"repeatDelay",{get:function(){return this._repeatDelay},set:function(a){if(this._repeatDelay!==a){var b=this._repeatDelay;this._repeatDelay=a,this._setTotalDurationDirty(),this.notifyPropertyChange("repeatDelay",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"easing",{get:function(){return this._easing},set:function(a){if(this._easing!==a){var b=this._easing;this._easing=a,this.notifyPropertyChange("easing",b)}},enumerable:!0,configurable:!0}),b.prototype.setEasing=function(a){var b=typeof a;"string"===b?this.easing=re.get(a):"function"===b&&(this.easing=a)},d(b.prototype,"isEnd",{get:function(){return this._totalDurationDirty&&this.totalDuration,this._isEnd},enumerable:!0,configurable:!0}),d(b.prototype,"yoyo",{get:function(){return this._yoyo},set:function(a){this._yoyo!==a&&(this._yoyo=a,this.notifyPropertyChange("yoyo",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"reverse",{get:function(){return this._reverse},set:function(a){if(this._reverse!==a){if(this._reverse=a,this.isEnd&&(this._isEnd=!1),this._timeline){var b=this._rawTotalTime,c=this._timeline.currentTime,d=this.totalDuration,e=d-b;c<this.startTime?(this.startTime-=this.startTime-c+d,this._rawTotalTime=d):(this._rawTotalTime=d-b,this.startTime=c-b,e!==b&&this._timeline._setChildDirty(this,this.startTime+=(b-e)/this._timeScale,!0))}this.notifyPropertyChange("reverse",!a)}},enumerable:!0,configurable:!0}),d(b.prototype,"timeline",{get:function(){return this._timeline},enumerable:!0,configurable:!0}),d(b.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),d(b.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),d(b.prototype,"available",{get:function(){if(!this._timeline)return!1;for(var a,b=this._timeline,c=!this._paused;b&&c;)c=!b._paused,a=b,b=b._timeline;return c&&a===kd.getInstance()},enumerable:!0,configurable:!0}),b.prototype._play=function(a,b){return this.reverse=a,null!=b&&(this.currentTotalTime=b),this.resume(),this},b.prototype.play=function(a){return this._play(!1,a)},b.prototype.playReverse=function(a){return this._play(!0,a)},b.prototype.pause=function(){return this._paused||(this._paused=!0,this.dispatchSimpleEvent("pause")),this},b.prototype.resume=function(){if(this._paused){if(this._paused=!1,this._timeline){var a=this._rawTotalTime?this._rawTotalTime/this._timeScale:0,b=this.startTime;this.startTime=this._timeline._currentTime-a,this._timeline._setChildDirty(this,this.startTime,!!(a||this.startTime-b))}this.dispatchSimpleEvent("resume")}return this},b.prototype.stop=function(a,b){return this.pause(),a&&!this.isEnd&&(this.currentTotalTime=this.totalDuration),b&&this.destroy(),this},b.prototype.restart=function(){return this.currentTotalTime=this._reverse?this.totalDuration:0,this.resume()},b.prototype.destroy=function(){this.dispatchSimpleEvent("destroy"),this._timeline&&this._timeline.remove(this),this._target&&b.removeTargetAnimation(this._target,this),this._paused=!0,this._target=null,a.prototype.destroy.call(this)},b.prototype.init=function(){this._initialized=!0,this.dispatchSimpleEvent("init")},d(b.prototype,"cycle",{get:function(){return this._cycle},enumerable:!0,configurable:!0}),d(b.prototype,"ratio",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),d(b.prototype,"rawRatio",{get:function(){var a=this.duration;return a?this._currentTime/a:this.isEnd?1:0},enumerable:!0,configurable:!0}),b.prototype.update=function(a,b){var c=this._currentTime,d=this._currentTotalTime,e=this._cycle,f=this.totalDuration,g=this._duration,h=a;1e-5>a?a=0:a>=f-1e-5&&(a=f),this._rawTotalTime=a,this._reverse&&(a=f-a);var i=!1,j=a,k=a;if(0!==this._repeat){var l=g+this._repeatDelay;this._cycle=l?~~(k/l):0,0!==this._cycle&&this._cycle===k/l&&--this._cycle,j=k-this._cycle*l,i=this._yoyo&&0!==(1&this._cycle),i&&(j=g-j),k===f&&(this._cycle=this._repeat),j>g?j=g:0>j&&(j=0)}return this._ratio=g?j/g:i?0:1,this._easing&&(this._ratio=this._easing(this._ratio)),(0===g&&(0>h||0===f)||!this._initialized)&&(b=!0),c!==j||b||e!==this._cycle?(this._prevTime=c,this._initialized||this.init(),this._currentTime=j,this._currentTotalTime=k,this._forced=!!b,this.render(this._currentTime,c)?void this.destroy():(this._forced=!1,(d!==this._currentTotalTime||b)&&this.dispatchSimpleEvent("update"),e!==this._cycle&&0!==this._repeat&&this.dispatchSimpleEvent("repeat",e),this._isEnd=!1,void(this._rawTotalTime>=this.totalDuration&&(this._isEnd=!0,this._rawTotalTime>=this.totalDuration&&(this._rawTotalTime=this._totalDuration),this.dispatchSimpleEvent("end"),this.end(),this.totalDuration)))):void(d!==k&&(this._currentTime=j,this._currentTotalTime=k,this.dispatchSimpleEvent("update")))},b.prototype.end=function(){},b.prototype.render=function(){return!1},b.config=function(a,c,d){if(null!=c&&(a.duration=+c||0),d){var e=b.KEYWORDS;d.delay&&(a._delay=d.delay);for(var f in d)f in e&&(a[f]=d[f]);d.hasOwnProperty("autoDestroy")&&a.addEventListener("end",a.destroy,a,-1/0),d.hasOwnProperty("easing")&&a.setEasing(d.easing)}return a},b.prototype.notifyPropertyChange=function(a,b){if(this.hasEventListener(a+="Change")){var c=ji.getInstance(a,b);c._setCurrentTarget(c._target=this),this._notifyListener(c),ji.recycle(c)}},b.registerAnimationFactory=function(a,c){b._animationFactories[a]=c},b.getAnimation=function(a,c,d,e){return b._animationFactories[c](a,d,e)},b.animate=function(a,c,d,e,f){var g=b._animationFactories[c](a,d,e);return g.addEventListener("end",g.destroy,g,-1/0),f||(f=kd.getInstance()),f.add(g),g},b.registerTransitionFactory=function(a,c){b._transitionFactories[a]=c},b.getTransition=function(a,c,d,e,f){return b._transitionFactories[d](a,c,e,f)},b.transition=function(a,c,d,e,f,g){var h=b._transitionFactories[d](a,c,e,f);return h.addEventListener("end",h.destroy,h,-1/0),g||(g=kd.getInstance()),g.add(h),h},b.addTargetAnimation=function(a,c){if(a){a.__leo_guid__=a.__leo_guid__||w();var d=b._cache[a.__leo_guid__];d||(d=b._cache[a.__leo_guid__]=[]),d.push(c)}},b.removeTargetAnimation=function(a,c){if(a){var d=b._cache[a.__leo_guid__];if(d){var e=d.indexOf(c);e>=0&&d.splice(e,1),d.length||delete b._cache[a.__leo_guid__]}}},b.destroyAnimationsOfTarget=function(a){if(a){var c=b._cache[a.__leo_guid__];delete b._cache[a.__leo_guid__],c&&c.forEach(function(a){a.destroy()})}},b.KEYWORDS=g(["delay","timeScale","reverse","repeat","repeatDelay","yoyo"]),b._animationFactories={},b._transitionFactories={},b._cache={},b}(ed),gd=function(a){function b(b,c){a.call(this,b),this.data=null,c=this.config=c||{},this.onInit=c.onInit,this.onRender=c.onRender,this.onDestroy=c.onDestroy,this.onEnd=c.onEnd,this.data=c.data}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.onInit&&this.onInit()},b.prototype.end=function(){a.prototype.end.call(this),this.onEnd&&this.onEnd()},b.prototype.render=function(a,b){return this.onRender(this._ratio,a,b),!1},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.onDestroy&&this.onDestroy(),this.onInit=this.onDestroy=this.onRender=this.config=this.data=null},b.create=function(a,c,d,e){return fd.config(new b(a,d),c,e)},b}(fd),hd=(function(a){function b(b,c,d){a.call(this,null),this.targetOut=b,this.targetIn=c,d=this.config=d||{},this.onInit=d.onInit,this.onRender=d.onRender,this.onDestroy=d.onDestroy}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.onInit&&this.onInit()},b.prototype.render=function(){return this.onRender(this._ratio),!1},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.onDestroy&&this.onDestroy(),this.targetOut=this.targetIn=this.onInit=this.onDestroy=this.onRender=this.config=null},b.create=function(a,c,d,e,f){return b.config(new b(a,c,e),d,f)},b}(fd),function(a){function b(){a.call(this,null),this._animations=[],this.tweenOverwritten=-1,this._durationDirty=!1,this._duration=0,this._hasSetDuration=!1,this._dirtyStart=0,this._childrenDirty=!1,this._reorder=!1,this._forwardOrder=!0,this._firing=!1,this._labels=null,this.easing=null}return dd(b,a),d(b.prototype,"animations",{get:function(){return this._reorder&&(this._reorder=!1,Tc(this._animations,this._forwardOrder?e:f)),this._animations},enumerable:!0,configurable:!0}),d(b.prototype,"duration",{get:function(){if(this._durationDirty){if(this._durationDirty=!1,this._hasSetDuration)return this._duration;var a=this._animations,b=0;if(a)for(var c=-1,d=a.length;++c<d;){var e=a[c];if(e){var f=e.totalDuration,g=e.startTime+(f?f/e._timeScale:0);g>b&&(b=g)}}this._setDuration(b,!0)}return this._duration},set:function(a){this._setDuration(a,0===a)},enumerable:!0,configurable:!0}),b.prototype._setDuration=function(a,b){if((b&&!this._hasSetDuration||!b)&&(this._hasSetDuration=this._hasSetDuration||!b,this._duration!==a)){var c=this._duration;this._duration=a,this._setTotalDurationDirty(),this.dispatchSimpleEvent("durationChange",c)}},b.prototype._setChildDirty=function(a,b,c){this._childrenDirty?this._dirtyStart>b&&(this._dirtyStart=b):this._dirtyStart=b,c&&(this._reorder=c),this._childrenDirty=!0,this._setDurationDirty()},b.prototype._setDurationDirty=function(){this._durationDirty||(this._durationDirty=!0,this._setTotalDurationDirty())},b.prototype.stopAnimationsAt=function(a,c){var d="number"!=typeof a?this._parseTime(a):a,e=this.at(d);c=!!c;for(var f=-1,g=e.length;++f<g;){var h=e[f];if(c&&h instanceof b){h.stopAnimationsAt(d);var i=h._animations;i&&!i.length&&h.destroy()}else h.stop(!0,!0)}},b.prototype.add=function(a,c){if(a!==this){var d=this._currentTime;if(null!=c&&(d=isFinite(+c)?+c:this._parseTime(c)),a._delay&&(d+=a._delay),a.currentTotalTime&&(d-=a.currentTotalTime),a._timeline){if(a._timeline===this)return void(a.startTime!==d&&this._setChildDirty(a,a.startTime=d,!0));a._timeline.remove(a)}return a._timeline=this,a._arrival=b.ARRIVAL_COUNTER++,a.startTime=d,this._animations.push(a),this._reorder=!0,this._setDurationDirty(),this}},b.prototype.append=function(a){return this.add(a,this.duration)},b.prototype.remove=function(a){if(a!==this){a._timeline!==this&&Ui.fatal("leo_Timeline.remove()","animation is not the child of the current timeline");var b=this._animations.indexOf(a);b>=0&&this._removeAtIndex(b),a._timeline=null}},b.prototype._removeAtIndex=function(a){var b=this._animations[a];this._firing?this._animations[a]=null:this._animations.splice(a,1),b._timeline=null,b.totalDuration>=b._timeScale*(this.duration-b.startTime)&&this._setDurationDirty()},b.prototype.at=function(a,b){var c="number"!=typeof a?this._parseTime(a):a,d=[];return this._iterate(this._forwardOrder,function(a){return a.startTime<=c?(a.startTime+a.totalDuration>=c&&(!b||a.target===b)&&d.push(a),0):1}),d},b.prototype._iterate=function(a,b){var c=this.animations;if(a)for(var d=-1,e=c.length;++d<e;){var f=c[d];if(f){var g=b.call(this,f,d);if(1===g)return;2===g&&(--d,--e)}}else for(var d=c.length;--d>=0;){var f=c[d];if(f&&1===b.call(this,f,d))return}},b.prototype.render=function(a,b){var c=a,d=b,e=c>=d;this._forwardOrder!==e&&(this._forwardOrder=e,this._reorder=!0);var f=this._childrenDirty,g=this._dirtyStart;if(f&&(this._childrenDirty=!1,this._dirtyStart=0,e?d>g&&(d=g):a>g&&this.render(g,d)),d>c){var h=c;c=d,d=h}var i=this.animations;this._firing=!0;for(var j=-1,k=i.length;++j<k;){var l=i[j];if(!this._forced&&this._paused)break;if(l){var m=l.startTime,n=c>=m;if(e&&!n)break;if(!l.paused&&n){var o=l._timeScale;l.totalDuration>=(d-m)*o&&l.update((a-m)*o)}}else{if(!i.length)break;i.splice(j--,1),--k}}return this._firing=!1,!1},d(b.prototype,"labels",{get:function(){return this._labels?this._labels:this._labels={}},enumerable:!0,configurable:!0}),b.prototype.addLabel=function(a,b){this.labels[a]="number"!=typeof b?this._parseTime(b):b},b.prototype.removeLabel=function(a){this.hasLabel(a)&&this.labels[a]},b.prototype.hasLabel=function(a){return null!=this._labels&&this._labels.hasOwnProperty(a)},b.prototype.getLabelValue=function(a){return this._labels&&this._labels[a]},b.prototype.destroy=function(){this._animations&&(a.prototype.destroy.call(this),this._iterate(this._forwardOrder,function(a,b){return this._removeAtIndex(b),a.destroy(),2}),this._animations=null)},b.prototype._parseTime=function(a){var b="__labels__",c=this._currentTime,d=this.labels;jd.lastIndex=0,id.test(a)&&(d.end=this.duration);var e=Function(b,"return "+a.replace(/^([+\-*\\])=/g,function(a,b){return c+b}).replace(jd,function(a,d){var e=b+'["'+d+'"]';return"("+e+"!=null?"+e+":("+e+"="+c+"))"})+";");return e(d)},b.create=function(a){return fd.config(new b,null,a)},b.ARRIVAL_COUNTER=0,b}(fd)),id=/(?:^|\b)end(?:\b|$)/,jd=/(?:^|\b)([a-zA-Z_$][\w$_]*)\b/g,kd=function(a){function b(){a.call(this),this._ticker=bh.getInstance(),this._inTicker=!1,this._justAdded=!1,this._hungFrame=0}return dd(b,a),b.prototype.resume=function(){return!this._inTicker&&this._animations.length&&this._addToTicker(),a.prototype.resume.call(this)},b.prototype.pause=function(){return this._inTicker&&this._removeFromTicker(),a.prototype.pause.call(this)},d(b.prototype,"available",{get:function(){return!this._paused},enumerable:!0,configurable:!0}),b.prototype._addToTicker=function(){this._ticker.add(this),this._inTicker=!0,this._justAdded=this._justAdded||this._hungFrame!==this._ticker.frames},b.prototype._removeFromTicker=function(){this._ticker.remove(this),this._inTicker=!1,this._hungFrame=this._ticker.frames},b.prototype.add=function(b){return a.prototype.add.call(this,b),this._inTicker||this._paused||!this._animations.length||this._addToTicker(),this},b.prototype._removeAtIndex=function(a){var b=this._animations[a];this._firing?this._animations[a]=null:(this._animations.splice(a,1),!this._animations.length&&this._inTicker&&this._removeFromTicker()),b._timeline=null},b.prototype._detach=function(a){this._animations[a];this._animations.splice(a,1),!this._animations.length&&this._inTicker&&this._removeFromTicker()},b.prototype._setChildDirty=function(a,b,c){a.isEnd||(this._animations.indexOf(a)<0&&(this._animations.push(a),this._inTicker||this._paused||this._addToTicker()),c&&(this._reorder=c))},b.prototype.update=function(a){if(!this._paused){this._justAdded&&(this._justAdded=!1,this.startTime=this._ticker.currentTime);var b=this.animations,c=this.startTime;this.startTime=a,a=this._currentTime=this._currentTotalTime+=a-c,this._firing=!0;for(var d=-1,e=b.length;++d<e;){var f=b[d];f?(c=f.startTime,!f.paused&&a>=c&&f.update((a-c)*f._timeScale),(f.paused||f.isEnd)&&(this._detach(d--),--e)):(b.splice(d--,1),--e)}b.length||this._inTicker&&this._removeFromTicker(),this._firing=!1}},b.getInstance=function(){return this.instance||(this.instance=new b,this.instance.init()),this.instance},b.instance=null,b}(hd),ld=function(a){function b(b){a.call(this,b),this._plugin=null,this._descriptors=[],this._keyframes=[],this._signTable={},this._restored=!1,this.restoreOnDestroy=!1,this._freeze=!0,this.overwritten=1,this.overwrittenEnabled=!0;for(var c=Ld,d=-1,e=c.length;++d<e;)if(c[d].conform(b)){this._plugin=c[d];break}this.addEventListener("end",this._restorePropValue,this,1/0)}return dd(b,a),b.prototype.to=function(a,b){if(null==b){for(var c in a)this.to(c,a[c]);return this}return md[typeof b]?this.apply(a,{to:b}):(b.to=b.value,this.apply(a,b))},b.prototype.from=function(a,b){if(null==b){for(var c in a)this.from(c,a[c]);return this}return md[typeof b]?this.apply(a,{from:b}):(b.from=b.value,this.apply(a,b))},b.prototype.by=function(a,b){if(null==b){for(var c in a)this.by(c,a[c]);return this}return md[typeof b]?this.apply(a,{operator:2,to:b}):(b.operator=2,b.to=b.value,this.apply(a,b))},b.prototype.fromTo=function(a,b){return this.apply(a,b)},b.prototype.fromBy=function(a,b){return this.apply(a,b)},b.prototype.apply=function(a,c){if(null==c){for(var d in a)this.apply(d,a[d]);return this}if(md[typeof c])return this.apply(a,{to:c});c.name=a,null==c.freeze&&(c.freeze=this._freeze),this._plugin.sign(a,c);var e=c.immediate;if(c.hasOwnProperty("from")&&e!==!1&&(e=!0),this._initialized||e){b._checkCollision(this,[c]);var f=this._plugin.parse(this._target,c);f&&(this._keyframes.push(this._signTable[f.s]=f),e&&f.r(this._target,f.i(this._ratio),f.n))}else this._descriptors.push(c)},b.prototype._remove=function(a,b){var c=this._signTable[a];c&&(this._keyframes.splice(this._keyframes.indexOf(c),1),delete this._signTable[a],b&&c.r(this._target,c.i(1===b?1:0),c.n))},d(b.prototype,"freeze",{get:function(){return this._freeze},set:function(a){if(this._freeze=a,!this._initialized)for(var b=this._descriptors,c=-1,d=b.length;++c<d;)b[c].freeze=a},enumerable:!0,configurable:!0}),b.prototype._restorePropValue=function(){for(var a=this._target,b=this._keyframes,d=-1,e=b.length;++d<e;){var f=b[d];f.fn!==c&&f.r(a,f.fn,f.n)}this._restored=!0},b.prototype.registerKeyframe=function(a){this._signTable[a.s]&&this._remove(a.s),this._keyframes.push(this._signTable[a.s]=a)},b.prototype.init=function(){var c=this._descriptors,d=this._keyframes,e=this._signTable,f=this._plugin,g=this._target;c.length&&b._checkCollision(this,c);for(var h=-1,i=c.length;++h<i;){var j=c[h],k=f.parse(g,j);k&&d.push(e[k.s]=k)}this._descriptors=null,b._register(this),a.prototype.init.call(this)},b.prototype.destroy=function(){this._keyframes&&(this.restoreOnDestroy&&!this._restored&&this._restorePropValue(),this._initialized&&b._unregister(this),this._keyframes.length=0,this._descriptors=null,this._keyframes=null,this._signTable=null,a.prototype.destroy.call(this))},d(b.prototype,"globalStartTime",{get:function(){var a=this.startTime,b=this._timeline;if(b&&!b._timeline)return a+b.startTime;for(;b;)a+=b.startTime,b=b._timeline;return a},enumerable:!0,configurable:!0}),b.prototype.render=function(){this._restored=!1;var a=this._keyframes,b=this._target;if(!b||!a||!a.length)return!0;this._plugin.beginRender(b);for(var c=this._ratio,d=-1,e=a.length;++d<e;){var f=a[d];a[d].r(b,f.i(c),f.n)}return this._plugin.endRender(b),!1},b.create=function(a,c,d){var e=b.config(new b(a),c,d);if(d){if(null!=d.overwritten){var f=d.overwritten;f=f===!0?2:+f,(0===f||f)&&(e.overwritten=f)}null!=d.freeze&&(e.freeze=!!d.freeze)}return e},b.to=function(a,c,d,e){var f=b.create(a,c,e);return b._tween(f,d,"to")},b.from=function(a,c,d,e){var f=b.create(a,c,e);return b._tween(f,d,"from")},b.by=function(a,c,d,e){var f=b.create(a,c,e);return b._tween(f,d,"by")},b.fromTo=function(a,c,d,e){var f=b.create(a,c,e);return b._tween(f,d,"fromTo")},b.motion=function(a,c,d,e){var f=b.create(a,c,e);return b._tween(f,d,"apply")},b.staggerTo=function(a,c,d,e,f){return b._stagger(a,c,d,e,f,"to")},b.staggerFrom=function(a,c,d,e,f){return b._stagger(a,c,d,e,f,"from")},b.staggerBy=function(a,c,d,e,f){return b._stagger(a,c,d,e,f,"by")},b.staggerFromTo=function(a,c,d,e,f){return b._stagger(a,c,d,e,f,"fromTo")},b.staggerMotion=function(a,c,d,e,f){return b._stagger(a,c,d,e,f,"motion")},b._stagger=function(a,c,d,e,f,g){if(a.length<2)return b[g](a[0],c,d,e);var h=hd.create();h.duration=(a.length-1)*f+c,h.addEventListener("end",h.destroy,h,-1/0),kd.getInstance().add(h);for(var i=0,j=-1,k=a.length;++j<k;){var l=b.create(a[j],c,e);h.add(l,i),l[g](d),i+=f}return h},b._tween=function(a,b,c){return a.addEventListener("end",a.destroy,a,-1/0),kd.getInstance().add(a),a[c](b),a},b._register=function(a){var c=a.target;if(c){var d=c[Id];d||(d=c[Id]=w());var e=b._tweens[d]||(b._tweens[d]=[]);e.push(a)}},b._unregister=function(a){var c=a.target;if(c){var d,e;if(!(d=c[Id])||!(e=b._tweens[d]))return;var f=e.indexOf(a);f>=0&&e.splice(f,1),e.length||delete b._tweens[d]}},b._getTweens=function(a){var c;return a&&(c=a[Id])?b._tweens[c]:void 0},b.stopTweensOf=function(a,c){var d=b._getTweens(a);if(d){d=d.concat();for(var e=-1,f=d.length;++e<f;)d[e].stop(c,!0)}},b._checkCollision=function(a,c){var d=b._getTweens(a.target);if(d&&!(d.length<=1&&d[0]===a)&&a.overwritten&&(2===a.overwritten||a.available)){var e=a.globalStartTime,f=e+a.totalDuration/a._timeScale,g=a.overwritten,h=(12&g)>>2,i=a._timeline===kd.getInstance();g&=3;for(var j=d.length;--j>=0;){var k=d[j],l=g,m=h;if(k!==a&&k.overwrittenEnabled){var n,o=e,p=!1;if(k._timeline===a._timeline){if(o=a.startTime,n=k.startTime,!(l=k._timeline.tweenOverwritten))continue;-1===l?l=g:(m=(12&l)>>2,l&=3),p=!i}else n=k.globalStartTime;if(2===l||k._initialized&&k.available&&(p&&n>=o||!p&&o>=n)&&n+k.totalDuration/k._timeScale<=f)for(var q=-1,r=c.length;++q<r;){var s,t=c[q];if((s=k._signTable[t.sign])&&t.sign===s.s&&(k._remove(s.s,m),!k._signTable))break}}}}},b._tweens={},b}(fd),md=g(["string","number","boolean"]),nd={1:{},2:{},3:{display:{normalize:function(a,b,c){if(!b){var d=a.style,e=b=d.display;"none"===e&&(d.display=b=""),""===d.display&&Vb(a)&&(b=ac(a.nodeName)),d.display=e}return k(a,b,c,1)}},transformOrigin:{normalize:function(a,b,c){(null==b||""===b||"auto"===b||"none"===b)&&(b="50% 50%");for(var d=(""+b).split(" "),e=["50%","50%"],f=-1,g=Math.min(2,b.length);++f<g;){var h=d[f];if("%"!==h.substr(h.length-1)){var i=0===f?Rd(a):Ud(a);e[f]=i?100*parseFloat(h)/i+"%":e[f]}else e[f]=h}return k(a,e,c,1)},getInterpolater:function(a,b){var c=n(a,b);return function(a){var b=c.call(this,a,!0);return b.join(" ")}}},clip:{normalize:function(a,b,c){var d=null,e=null;null==b||""===b||"auto"===b||"none"===b?b="rect(0px,"+(d=Td(a))+"px,"+(e=Wd(a))+"px,0px)":b.indexOf("%")>=0&&(d=Td(a),e=Wd(a));for(var f=(""+b).match(/[-\d\.]+[%a-z]+/g),g=new Array(4),h=-1;++h<4;){var i=f[h];g[h]="%"===i[i.length-1]?h%2?d?parseFloat(i)*d/100:0:e?parseFloat(i)*e/100:0:parseFloat(i)+"px"}return k(a,g,c,3)},getInterpolater:function(a,b){var c=n(a,b);return function(a){var b=c.call(this,a,!0);return"rect("+b.join(" ")+")"}}}},4:{}};Qb({boxShadow:{containsColor:!0,constList:["@","inset"],_default:"0 0 0 0 black @"},textShadow:{containsColor:!0,_default:"0 0 0 black"},backgroundPosition:{_default:"0 0"}},function(a,b){return h(b,a._default,a.containsColor,a.constList)}),nd[4].shadow=nd[4].dropShadow=nd[3].textShadow,function(){function a(a){return function(b){for(var c=[],d=-1,e=a.length;++d<e;)c[d]=D(b,a[d]);return c}}function b(a,b,c,d){return Array.isArray(b)||(b=Zc(b+""," ")),1===b.length?b.push(b[0],b[0],b[0]):2===b.length?b.push(b[0],b[1]):3===b.length&&b.push(b[1]),k(a,b,c,d)}function c(a,b){var c=n(a,b);return function(a){var b=c.call(this,a,!0);return b.join(" ")}}var d=["Top","Right","Bottom","Left"];"color width style".replace(/\w+/g,function(e){var f=e[0].toUpperCase()+e.substr(1);nd[3]["border"+f]={get:a(d.map(function(a){return"border"+a+f})),normalize:b,getInterpolater:c}}),"margin padding".replace(/\w+/g,function(e){nd[3][e]={get:a(d.map(function(a){return e+a})),normalize:b,getInterpolater:c}}),nd[3].borderRadius={get:a(["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(a){return"border"+a+"Radius"
})),normalize:b,getInterpolater:c}}();var od={"+=":1,"-=":2},pd=/^(?:rgba?\(|hsla?\(|#[\da-f])/i,qd=/ |,/,rd=/\$(\d+)/g,sd=b.documentElement,td="webkit o O ms moz Moz".split(" "),ud="-webkit- -o- -ms- -moz-".split(" "),vd=a.setTimeout,wd=a.clearTimeout,xd=a.setInterval,yd=a.clearInterval,zd="function"==typeof a.setImmediate?a.setImmediate:function(a){return vd(a,0)},Ad="function"==typeof a.clearImmediate&&zd===a.setImmediate?a.clearImmediate:wd,Bd="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",Cd=Array.prototype.slice,Dd=(Object.prototype.toString,Object.prototype.hasOwnProperty,function(a){return Cd.call(a)}),Ed=function(){},Fd=function(a){return a},Gd=a.console||{log:function(){},warn:function(){},error:function(){throw new Error}},Hd="__leo_expando__",Id="__leo_guid__",Jd=0,Kd=null,Ld=[{conform:function(a){return a instanceof gf},beginRender:function(a){a._transform.deferred=!0,a instanceof Mf&&(a.deferredRender=!0)},endRender:function(a){a._transform.deferred=!1,"_filter"in a&&a._filter&&(a.filter.deferred=!1),a instanceof Mf&&(a.deferredRender=!1)},sign:function(a,b){var c=a.indexOf("."),d=c>=0?a.substr(0,c):"";return c>=0&&"dom"===d?void(b.sign=Ld[1].sign(a.substr(c+1),b)):(ch.KEYWORDS[a]&&(a="transform."+a),b.type=1,void(b.sign=F(a,b.type)))},parse:function(a,b){var c=b.name,d=c.indexOf("."),e=d>=0?c.substr(0,d):"";if(d>=0){if("dom"===e){b.name=c.substr(d+1);var f=Kd;Kd=E;var g=Ld[1].parse(a._dom,b);return Kd=f,g}a=a[e],c=c.substr(d+1)}else ch.KEYWORDS[c]&&(a=a._transform,d=0,b.round=!1);var g=i(a,c,b,B,4);return g&&(g.r=d>=0?Nd[e]?Nd[e]:function(b,c,d){a[d]=c}:y),g}},{conform:function(a){return 1===a.nodeType||9===a.nodeType},beginRender:function(a){a[dh]&&(a[dh].deferred=!0)},endRender:function(a){a[dh]&&(a[dh].deferred=!1)},sign:function(a,b){b.sign=F(a,b.type=b.type||3)},parse:function(a,b){var c,d=b.name;if(1===b.type)c=x(a,b);else if(2===b.type){var e=jh(b.name);c=i(a,e.local,b,e.space?function(a){return a.getAttributeNS(e.space,e.local)}:C,2),c&&(c.r=e.space?function(a,b){a.setAttributeNS(e.space,e.local,b)}:z)}else{var d=b.name;"zIndex"===d?b.round=!0:ch.KEYWORDS[d]&&(b.round=!1),c=i(a,d,b,D,3),c&&(c.n=ch.KEYWORDS[d]?d:Xf(d),c.r=A)}return c&&Kd&&Kd(c,b.type),c}},{conform:function(){return!0},beginRender:Ed,endRender:Ed,sign:function(a,b){F(a,b.type=1)},parse:x}],Md=g("transform"),Nd={transform:function(a,b,c){a._transform[c]=b},filter:function(a,b,c){a._filter[c]=b},font:function(a,b,c){a._font[c]=b},dom1:function(a,b,c){a._dom[c]=b},dom0:function(a,b,c){ai(a._dom,c,b)}},Od=0,Pd={};G(function(a){H("Blind",a,"Extend",a,function(b){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:b?"Top"===a?"Bottom":"Top":a}:{row:1,col:-1,originX:b?"Left"===a?"Right":"Left":a}})}),G(function(a){H("BlindFade",a,"Fade",null,function(){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:a}:{row:1,col:-1,originX:a}})}),H("BlockFade",null,"Fade"),H("BlockZoom",null,"Zoom"),Q("Blur"),I("Circle",null,function(a,b,c,d,e){void 0===e&&(e={});var f,g=b.getContext("2d"),h=b.cloneNode(!1),i=h.getContext("2d"),j=Rd(a),k=Ud(a),l=j/2,m=k/2,n=Math.ceil(Math.sqrt(j*j+k*k)),o=e.num||10,p=Math.floor(n/o),q=0,r=.5,s=(1-r)/(o-1),t=n%o,u=2*Math.PI,v=gd.create(a,c,e);return v.onRender=function(b){b=d?1-b:b;var c=0;for(g.clearRect(0,0,j,k);o>c;)f=c*s,n=f+r,q=b>=f?b>n?1:(b-f)/r:0,i.clearRect(0,0,j,k),i.save(),i.globalAlpha=q,i.beginPath(),i.arc(l,m,(p*(c+1)+Math.max(0,c-t+1))/2,0,u,!1),i.closePath(),i.clip(),i.drawImage(a,0,0,j,k),g.drawImage(i.canvas,0,0),i.restore(),c++},v}),fd.registerAnimationFactory("Flicker",function(a,b,c){void 0===c&&(c={}),c.yoyo=!0,c.repeat=2*(c.repeat||0)+1;var d=ld.create(a,b/2,c);return d.overwritten=9,d.apply({opacity:{to:c.alpha||0,freeze:!1}}),d}),fd.registerAnimationFactory("Glowing",function(a,b,c){void 0===c&&(c={}),a=a instanceof gf?a.dom:a,c.easing="linear";var d=gd.create(a,b,{onInit:function(){K(a,this,c)}},c);return d}),fd.registerAnimationFactory("Jump",function(a,b,c){void 0===c&&(c={});var d=hd.create(c);d.tweenOverwritten=0;var e=c.range||10,f=ld.create(a,.4*b,{easing:"linear"});return f.overwritten=9,f.apply({ty:{to:"-="+e}}),d.add(f),f=ld.create(a,.2*b,{easing:"linear"}),f.overwritten=9,f.apply({ty:{to:"+="+e}}),d.append(f),f=ld.create(a,.2*b,{yoyo:!0,repeat:1,easeing:"linear"}),f.overwritten=9,f.apply({ty:{to:"-="+.4*e}}),d.append(f),d}),fd.registerAnimationFactory("Motion",function(a,b,c){void 0===c&&(c={});var d=ld.create(a,b,c),e={},f=c.params;for(var g in c.params)f.hasOwnProperty(g)&&(e[g]=f[g]);return e.spriteScaleX&&(e.spriteScaleX={constant:1,to:e.spriteScaleX}),e.spriteScaleY&&(e.spriteScaleY={constant:1,to:e.spriteScaleY}),d.apply(e),d}),fd.registerAnimationFactory("Rotate",function(a,b,c){var d=ld.create(a,b,c);return d.overwritten=9,d.apply({rotation:{to:"+=360",freeze:!1}}),d}),fd.registerAnimationFactory("Shake",function(a,b,c){void 0===c&&(c={});var d=hd.create(c);d.tweenOverwritten=0;for(var e=c.range||10,f={yoyo:!0,repeat:1,easing:"linear"},g=0;4>g;g++){var h=ld.create(a,b/8,f);h.overwritten=9,h.apply({rotation:{to:(g%2===0?"+":"-")+"="+(2>g?.4*e:e)}}),d.append(h)}return d}),fd.registerAnimationFactory("Shine",function(a,b,c){void 0===c&&(c={}),a=a instanceof gf?a.dom:a;var d=(c.offsetX||0)+"px "+(c.offsetY||0)+"px "+(c.blur||20)+"px "+(c.strength||10)+"px "+cf.parseToString(c.color||"#000");c.yoyo=!0,c.repeat=2*(c.repeat||0)+1;var e=bi(a,"boxShadow");e="none"===e?"0 0 0 0 rgba(255,255,255,0)":e,bi(a,"boxShadow",e);var f=ld.create(a,b/2,c);f.overwritten=9;var g={boxShadow:{to:d,freeze:!1}};return f.apply(g),f}),fd.registerAnimationFactory("ShineInside",function(a,c,d){void 0===d&&(d={}),a=a instanceof gf?a.dom:a;var e=Gi(a).select("#shineInsideDiv"+a.id)[0];e?ld.stopTweensOf(e):(e=b.createElement("div"),e.id="shineInsideDiv"+a.id),bi(e,{position:"absolute",width:"100%",height:"100%",left:0,top:0,boxShadow:"inset 0 0 0 "+cf.parseToString(d.color||"#fff")}),a.appendChild(e),d.yoyo=!0,d.repeat=2*(d.repeat||0)+1,d.easing="linear";var f=ld.create(e,c/2,d);return f.apply({boxShadow:{to:"inset "+(d.offsetX||0)+"px "+(d.offsetY||0)+"px "+(d.blur||20)+"px "+(d.strength||10)+"px "+(d.color||"#fff")}}),f.addEventListener("destroy",function(){e&&e.parentNode&&(e.parentNode.removeChild(e),e=null)},null),f}),fd.registerAnimationFactory("ShowStage",function(a,b,c){void 0===c&&(c={});var d=hd.create(c),e=ld.create(a,b),f=a.actualWidth/2,g=a.actualHeight/2,h=a.getMaxRadius(f,g,a.actualWidth,a.actualHeight);e.apply({spotX:f-h,spotY:g-h,spotWidth:2*h,spotHeight:2*h}),d.add(e,0);var i=fd.getAnimation(a,"FadeOut",b);return d.add(i,0),d.duration=b,d}),fd.registerAnimationFactory("SpotLight(Move to)",function(a,b,c){void 0===c&&(c={});var d=ld.create(a,b,c);return d.setEasing("easeOutQuad"),d.apply(c.params),d.addEventListener("init",function e(){d.removeEventListener("init",e,null),a.visible||d.apply({visible:!0,opacity:{from:0,to:a.opacity}})},null),d});var Qd=this;fd.registerAnimationFactory("SpriteMotion",function(a,b,c){void 0===c&&(c={});var d=c.params,e=hd.create(c);e.duration=b;var f=0;if(d.motion&&(e.add(fd.getAnimation(a,"Motion",b,{easing:c.easing,params:d.motion,overwritten:c.overwritten}),0),++f),d.action&&a.sprite.containsAction(d.action)){var g=a.sprite.getNumFramesOfAction(d.action);if(g){var h=a.actionConfigs&&a.actionConfigs[d.action],i=h&&h.frameRate||8,j=h&&h.repeat||0,k=ld.create(a,1e3*g/i,{easing:se(g+1,g/(g+1)),repeat:j,overwritten:c.overwritten});e.add(k,0),k.restoreOnDestroy=!0,k.apply({currentActionName:{immediate:!1,from:d.action,to:d.action},currentActionIndex:{immediate:!1,from:0,floor:!0,to:g,freeze:!!d.freeze}}),a.node.select(".showed-text").remove();var l=d.text;if(l&&l.content){{var m=a.node.el("div").addClass("leo-comp--sprite-text"),n=a.width,o=a.height,p=400,q=174,r=(l.position,[45,60]),s=m.el("div").addClass("inside"),t=l.bgImage;s.el("div").addClass("masking").addClass(t.substring(1+t.lastIndexOf("_"),t.lastIndexOf(".")))}if(l.bgImage.indexOf("circle")>=0?(p=300,q=200,r=[60,50],s.addClass("circle")):l.bgImage.indexOf("cloud")>=0?(p=273,q=283,r=[38,40,150,40],s.addClass("cloud")):s.addClass("rect"),"large"===l.size.toLowerCase()){var u=1.5;p*=u,q*=u,r=r.map(function(a){return a*u})}s.style("borderWidth",r.join("px ")+"px");var v,w,x="50% 100%";l.bgImage.indexOf("left")>=0?(v=-p+.18*n,w=-q+.2*o,x="100% 100%"):l.bgImage.indexOf("right")>=0?(v=n-.18*n,w=-q+.2*o,x="0 100%"):(v=(n-p)/2,w=-q-20);var y,z;a.watch("width",y=function(){var b=a.width;v=l.bgImage.indexOf("left")>=0?-p+.18*b:l.bgImage.indexOf("right")>=0?b-.18*b:(b-p)/2,m.style("left",v)},Qd),a.watch("height",z=function(){var b=a.height;w=l.bgImage.indexOf("left")>=0?-q+.2*b:l.bgImage.indexOf("right")>=0?-q+.2*b:-q-20,m.style("top",w)},Qd),m.style({left:v,top:w,backgroundImage:"url("+l.bgImage+")",width:p,height:q,transformOrigin:x}),e.addEventListener("init",function(){a.node.select(".showed-text").remove(),m.style("transform","scale(1)").addClass("showed-text")},null),e.addEventListener("destroy",function(){a.unwatch("width",z,null),a.unwatch("height",y,null),Yb(m[0])},null);var A,B,C=1500,D=Hi("div").addClass("content").html(Ib(l.content,0)),E=e.duration;if(C>=E)s.append(D),A=500,B=Math.max(E-500,0);else{var F=bc(D[0]),G=F.chars;s.append(F.el);var H=Math.min((E-C)/G.length,150);A=1e3+E-C,B=500,G.forEach(function(a,b){var c=ld.create(a,0,{delay:H*b+500});Yb(a),c.addEventListener("init",function(){Xb(a)},null),e.add(c)})}e.add(fd.getAnimation(m[0],"FadeOut",B),A)}var I=d.sound,t=I.src;I&&t&&(e.addEventListener("init",function(){a.getAudio(t).play()},null),e.addEventListener("destroy",function(){a.getAudio(t).pause()},null)),++f}}return f?e:null});var Rd,Sd,Td,Ud,Vd,Wd,Xd={position:"absolute",visibility:"hidden",display:"block"},Yd=/^(?:none|table(?!-c[ea]).+)/;"Width,Height".replace(/\w+/g,function(a){var b=L(a),c=a.toLowerCase(),d="scroll"+a,e="offset"+a,f="client"+a,g=function(a,g){if(arguments.length<2){if(a.setTimeout)return a.innerWidth;if(9===a.nodeType){var h=a.documentElement;return Math.max(a.body[d],h[d],a.body[e],h[e],h[f])}return b(a)}_h(a,c,g)};"Width"===a?(Rd=g,Sd=function(a){return b(a,1)},Td=function(a,c){return b(a,c?3:2)}):(Ud=g,Vd=function(a){return b(a,1)},Wd=function(a,c){return b(a,c?3:2)}),g=null}),Qb(["ver","hor"],function(a){var b="hor"===a?"tx":"ty",c="hor"===a?Rd:Ud,d={yoyo:!0,repeat:1,easing:"linear"};fd.registerAnimationFactory("Swing("+a+")",function(e,f,g){var h=hd.create(g);h.tweenOverwritten=0;for(var i=g.range||c(e)||e["hor"===a?"_actualWidth":"_actualHeight"],j=0;2>j;j++){var k=ld.create(e,f/4,d);k.overwritten=9;var l={};l[b]={to:(1>j?"+":"-")+"="+i,freeze:!1},k.apply(l),h.append(k)}return h})});var Qd=this;fd.registerAnimationFactory("TextScroll",function(a,b,c){void 0===c&&(c={});var d,e,f=a instanceof gf,g=f?a.dom:a;bi(g,"overflow","hidden"),f?(e=a.height,d=Ud(g.getElementsByTagName("div")[0])):(e=Vd(g),Xb(g),d=g.scrollHeight||Ud(g),Yb(g)),c.easing="linear",c.repeat=c.repeat||0;var h=g.querySelector(".leo-comp--txt__content");bi(h,"ty",e);var i=ld.create(h,b/2,c);i.apply({ty:{to:-d,freeze:!1}});var j=hd.create();return j.add(i),j.addEventListener("destroy",function(){return bi(h,"ty","0")},Qd),j}),fd.registerAnimationFactory("TextShine",function(a,b,c){void 0===c&&(c={}),a=a instanceof gf?a.dom:a;for(var d=(c.offsetX||0)+"px "+(c.offsetY||0)+"px "+(c.blur||20)+"px "+cf.parseToString(c.color||"#fff"),e=d,f=c.strength||10,g=0;f>g;g++)e=e+","+d;c.yoyo=!0,c.repeat=2*(c.repeat||0)+1,c.easing="linear";var h=bi(a,je);h=("none"===h?"0 0 0 rgba(255,255,255,0)":e)+",";var i="0 0 0 "+cf.transparentize(cf.parseToString(c.color||"#fff"),0);for(g=0;f>g;g++)h+=i;bi(a,je,i);var j=ld.create(a,b/2,c);return j.overwritten=9,j.apply({textShadow:{to:e,freeze:!1}}),j});var Qd=this;fd.registerAnimationFactory("TextStarWars",function(a,b,c){void 0===c&&(c={});var d,e,f=a instanceof gf,g=f?a.dom:a;bi(g,{perspective:100,overflow:"hidden"}),f?(e=a.height,d=Ud(g.getElementsByTagName("div")[0])):(e=Vd(g),Xb(g),d=g.scrollHeight||Ud(g),Yb(g)),c.easing="linear",c.repeat=c.repeat||0;var h=30,i=g.querySelector(".leo-comp--txt__content");bi(i,{ty:e,rotationX:h,transformOrigin:"50% 0%"});var j=ld.create(i,b,c);j.apply({ty:{to:2*-e,freeze:!1},tz:{to:3*-e/2,freeze:!1}});var k=hd.create();return k.add(j),k.addEventListener("destroy",function(){return bi(i,{ty:0,tz:0,rotationX:0,transformOrigin:"50%"})},Qd),k}),fd.registerAnimationFactory("Zoom",function(a,b,c){void 0===c&&(c={}),c.yoyo=!0,c.repeat=2*(c.repeat||0)+1;var d=ld.create(a,b/2,c);return d.overwritten=9,d.apply({scaleX:{to:"+="+parseFloat(c.scale||.2),freeze:!1},scaleY:{to:"+="+parseFloat(c.scale||.2),freeze:!1}}),d});var Qd=this;fd.registerAnimationFactory("ZoomFocus",function(a,c,d){void 0===d&&(d={}),a=a instanceof gf?a.dom:a;var e=b.createElement("div");bi(e,{position:"absolute",width:"100%",height:"100%",left:0,top:0,borderColor:cf.parseToString(d.color||"rgba(255,255,255,0.5)"),borderStyle:d.type||"solid",boxSizing:"border-box"}),a.appendChild(e);var f=d.width||20;d.yoyo=!0,d.easing="linear",d.repeat=2*(d.repeat||0)+1;var g=ld.create(e,c/2,d);return g.overwritten=9,g.apply({borderWidth:{to:f,freeze:!1}}),g.addEventListener("destroy",function(){a.removeChild(e)},Qd),g}),fd.registerAnimationFactory("ZoomRotate",function(a,b,c){void 0===c&&(c={}),c.yoyo=!0,c.repeat=2*((c.repeat||1)-1)+1;var d=ld.create(a,b/2,c);return d.overwritten=9,d.apply({rotation:{to:"+="+(c.rotate||360),freeze:!1},scaleX:{to:c.scale||0,freeze:!1},scaleY:{to:c.scale||0,freeze:!1}}),d}),Q("Gray");var Zd=[function(a,b,c){return U(a,c,b)+U(a,"width",b)},function(a,b,c){return U(a,c,b)-U(a,"width",b)},function(a,b,c){return U(a,c,b)+U(a,"height",b)},function(a,b,c){return U(a,c,b)-U(a,"height",b)}];G(function(a,b){var c={rotation:("Right"===a||"Bottom"===a?"+":"-")+"=90"};c[2>b?"tx":"ty"]=Zd[b],P("Roll",a,c)}),I("Scan",null,function(a,b,c,d,e){void 0===e&&(e={});var f,g,h=b.getContext("2d"),i=b.cloneNode(!1),j=i.getContext("2d"),k=Rd(a),l=Ud(a),m=k/2,n=l/2,o=Math.ceil(Math.sqrt(k*k+l*l)),p=e.num||10,q=0,r=.5,s=(1-r)/(p-1),t=2*Math.PI/p,u=gd.create(a,c);return u.onRender=function(b){b=d?1-b:b;var c=0;for(h.clearRect(0,0,k,l);p>c;)f=c*s,g=f+r,q=b>=f?b>g?1:(b-f)/r:0,j.clearRect(0,0,k,l),j.save(),j.beginPath(),j.moveTo(m,n),j.arc(m,n,o/2,c*t,(c+q)*t,!1),j.lineTo(m,n),j.closePath(),j.clip(),j.drawImage(a,0,0,k,l),h.drawImage(j.canvas,0,0),j.restore(),c++},u}),Qb(["Ver","Hor"],function(a){I("Shine",a,function(b,c,d,e,f){void 0===f&&(f={});var g=c.getContext("2d"),h=c.cloneNode(!1),i=h.getContext("2d");i.lineWidth=1;for(var j,k=f.shape||a,l=f.num||20,m=0,n=100,o=Math.floor,p=Math.random,q=[],r=Rd(b),s=Ud(b),t="Ver"===k?s:r,u=0;l>u;u++)j=o(p()*l)+1,j>m&&(m=j),n>j&&(n=j),q.push({x:o(p()*r),y:o(p()*s),r:o(p()*t),s:j});var v;v=1==m?0:1/m;var w=gd.create(b,d),x=1/3,y=2/3,z="255, 255, 255",A=.3,B=.65,C=re.get("easeInOutQuad");return w.onRender=function(a){var a=e?1-a:a;g.clearRect(0,0,r,s),i.clearRect(0,0,r,s),i.globalCompositeOperation="source-over",i.globalAlpha=1,a>x&&(i.fillStyle="rgba("+z+","+C((a-x)/y)+")",i.fillRect(0,0,r,s));var c,d,f,h,j,m=0;for(u=0;l>u;u++)c=q[u],d=(c.s-n)*v,a>=d&&(m=(a-d)/(1-d),f=o(c.r*m),h=c.x-f,j=f<<1,i.fillStyle="rgba("+z+","+m/2+")",i.strokeStyle="rgba("+z+","+m+")","Ver"===k?(i.fillRect(0,h,r,j),i.beginPath(),i.moveTo(0,h+.5),i.lineTo(r,h+.5),i.moveTo(0,h+j+.5),i.lineTo(r,h+j+.5),i.stroke(),i.closePath()):(i.fillRect(h,0,j,s),i.beginPath(),i.moveTo(h+.5,0),i.lineTo(h+.5,s),i.moveTo(h+j+.5,0),i.lineTo(h+j+.5,s),i.stroke(),i.closePath()));m=0,A>0&&(g.globalCompositeOperation="lighter",a>=B&&(m=C((a-B)/(1-B))),g.globalAlpha=A*(1-m),g.drawImage(i.canvas,0,0)),i.globalCompositeOperation="source-atop",i.drawImage(b,0,0,r,s),g.globalCompositeOperation="lighter",g.globalAlpha=1,g.drawImage(i.canvas,0,0)},w})}),H("Shuffle",null,function(){return function(a){{var b=a.ClientRect;a.div}return{opacity:0,tx:(Math.random()>.5?1:-1)*Math.random()*b.width*5,ty:(Math.random()>.5?1:-1)*Math.random()*b.height*5}}},null,{sequence:"together"}),G(function(a){H("Slice",a,"Move",a,function(){return"Top"===a||"Bottom"===a?{row:1,col:-1,overflow:"hidden"}:{row:-1,col:1,overflow:"hidden"}})}),Qb(["In","Out"],function(a){var b="Out"===a?"MoveOutTo":"MoveInFrom";Qb(["Hor","Ver"],function(c){if("Hor"===c)var d="j",e=-1,f="Left",g="Right";else var d="i",e=1,f="Top",g="Bottom";fd.registerAnimationFactory("Slice"+a+c+"Cross",R(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:-1*e,overflow:"hidden"}}))})}),G(function(a){H("Smooth",a,"Extend",a,function(){return"Top"===a||"Bottom"===a?{row:1,col:-1}:{row:-1,col:1}})}),Qb(["In","Out"],function(a){var b="Out"===a?"ExtendOutTo":"ExtendInFrom";Qb(["Hor","Ver"],function(c){if("Hor"===c)var d="j",e=-1,f="Left",g="Right";else var d="i",e=1,f="Top",g="Bottom";fd.registerAnimationFactory("Smooth"+a+c+"Cross",R(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:-1*e}}))})}),fd.registerAnimationFactory("SoundFadeOut",function(a,b,c){return fd.getAnimation(a,"Hide",b,c)}),fd.registerAnimationFactory("SoundFadeIn",function(a,b,c){return fd.getAnimation(a,"Show",b,c)}),fd.registerAnimationFactory("SoundHide",function(a,b,c){return fd.getAnimation(a,"SoundFadeOut",.001,c)}),fd.registerAnimationFactory("SoundShow",function(a,b,c){return fd.getAnimation(a,"SoundFadeIn",.001,c)}),G(function(a){H("Stack",a,"Move",a,function(b){return"Top"===a||"Bottom"===a?{row:-1,col:1,originY:b?"Top"===a?"Bottom":"Top":a}:{row:1,col:-1,originX:b?"Left"===a?"Right":"Left":a}})}),Qb(["In","Out"],function(a){var b="Out"===a?"MoveOutTo":"MoveInFrom";Qb(["Hor","Ver"],function(c){if("Hor"===c)var d="i",e=1,f="Left",g="Right";else var d="j",e=-1,f="Top",g="Bottom";fd.registerAnimationFactory("Stack"+a+c+"Cross",R(function(a){return b+(a.index[d]%2===0?f:g)},"Out"===a,function(){return{row:1*e,col:-1*e}}))})}),V("Blur",[{color:function(a){return ke(a,0)},textShadow:function(a){return"0 0 10px "+ke(a,0)}},{textShadow:function(a){return"0 0 10px "+bi(a,ie)},color:function(a){return ke(a,0)}},{color:function(a){return ke(a,1)},textShadow:function(a){var b=bi(a,je);return"none"===b?"0 0 0 "+ke(a,0):b}}],c,[2/3,1/3]),V("Explode",[{scaleY:function(){return 5*ee()},scaleX:function(){return 5*ee()},rotation:function(){return 360*(ee()>.5?1:-1)*ee()},rotationX:function(){return 180*(ee()>.5?1:-1)*ee()},rotationY:function(){return 180*(ee()>.5?1:-1)*ee()},opacity:0,tz:function(){return 1e3*ee()+360}},{scaleX:1,scaleY:1,rotation:0,rotationX:0,rotationY:0,opacity:1,tz:0}],{random:!0}),V("Fade",[{opacity:0},{opacity:1}]),V("Fall",[{rotation:function(){return he()*(360*ee()+180)},opacity:function(){return ee()},ty:function(){return-200*ee()-100},scaleX:function(){return ee()},scaleY:function(){return ee()}},{rotation:0,opacity:1,ty:0,scaleX:1,scaleY:1}],{random:!0}),V("Float",[{scaleX:2,scaleY:2,rotationX:180,opacity:0},{scaleX:1,scaleY:1,rotationX:0,opacity:1}],{transformOrigin:"50% 50% 20px"}),V("Fly",[{rotation:function(){return he()*(180*ee()+180)},opacity:function(){return ee()},scaleX:function(){return ee()},scaleY:function(){return ee()}},{rotation:0,opacity:1,scaleX:1,scaleY:1}],{transformOrigin:function(){return(ee()>.5?-1:1)*fe(1e3*ee())+"% 50%"},random:!0}),["Top","Right","Bottom","Left"].forEach(function(a,b){var c=0,d=0,e=0===b||3===b?-120:120;1===b||3===b?c=e:d=e,V(a,[{tx:c,ty:d},{tx:0,ty:0}])}),V("RotateBottom",[{scaleY:0,scaleX:0,rotationX:-180,opacity:0,ty:-80},{scaleX:1,scaleY:1,rotationX:0,opacity:1,ty:0}],{transformOrigin:"0% 50% -50px",easing:"easeOutBack"}),V("RotateTop",[{scaleY:0,scaleX:0,rotationX:180,opacity:0,ty:80},{scaleX:1,scaleY:1,rotationX:0,opacity:1,ty:0}],{easing:"easeOutBack",transformOrigin:"0 50% -50px"}),V("RScale",[{scaleX:5,scaleY:5},{scaleY:.1,scaleX:.1},{scaleX:3,scaleY:3},{scaleX:1,scaleY:1}],c,[1/6,.5,1/3]),V("Scale",[{scaleX:5,scaleY:5},{scaleX:1,scaleY:1}],{interval:.6},[1/6,.5,1/3]),V("Zoom",[{scaleX:0,scaleY:0},{scaleX:1,scaleY:1}],c,[1/6,.5,1/3]),V("Uneven",[{opacity:0,tz:function(){return 500*ee()*he()-100}},{opacity:1,tz:0}],{random:!0,easing:"easeOutCire"}),fd.registerAnimationFactory("SliceIn",function(a,b,c){return fd.getAnimation(a,"SliceInFromLeft",b,c)}),fd.registerAnimationFactory("SliceOut",function(a,b,c){return fd.getAnimation(a,"SliceOutToLeft",b,c)}),fd.registerAnimationFactory("SmoothIn",function(a,b,c){return fd.getAnimation(a,"SmoothInFromLeft",b,c)}),fd.registerAnimationFactory("SmoothOut",function(a,b,c){return fd.getAnimation(a,"SmoothOutToLeft",b,c)}),fd.registerAnimationFactory("BlindInVer",function(a,b,c){return fd.getAnimation(a,"BlindInFromLeft",b,c)}),fd.registerAnimationFactory("BlindInHor",function(a,b,c){return fd.getAnimation(a,"BlindInFromTop",b,c)}),fd.registerAnimationFactory("BlindOutVer",function(a,b,c){return fd.getAnimation(a,"BlindOutToLeft",b,c)}),fd.registerAnimationFactory("BlindOutHor",function(a,b,c){return fd.getAnimation(a,"BlindOutToTop",b,c)}),G(function(a){P("Extend",a,{clip:{value:"rect("+("Bottom"===a?"100%":"0px,")+("Left"===a?"0px":"100%,")+("Top"===a?"0px":"100%,")+("Right"===a?"100%":"0px")+")",freeze:!1}})}),P("Extend","Middle",{clip:{value:"rect(50%,50%,50%,50%)",freeze:!1}}),P("Extend","Hor",{clip:{value:"rect(0px,50%,100%,50%)",freeze:!1}}),P("Extend","Ver",{clip:{value:"rect(50%,100%,50%,0px)",freeze:!1}}),P("Fade");var $d=[function(a,b,c){return U(a,c,b)+U(a,"width",b)},function(a,b,c){return U(a,c,b)-U(a,"width",b)},function(a,b,c){return U(a,c,b)+U(a,"height",b)},function(a,b,c){return U(a,c,b)-U(a,"height",b)}],_d=function(a,b,c){return 2*U(a,c,b)};G(function(a,b){var c={};c[2>b?"scaleX":"scaleY"]=_d,c[2>b?"originX":"originY"]={to:b%2,constant:1,freeze:!1},c[2>b?"tx":"ty"]=$d[b],P("Flex",a,c),c=null}),fd.registerAnimationFactory("Hide",function(a,b,c){var d=ld.create(a,.001,c);return a instanceof gf?d.to("visible",!1):d.to("display","none"),d}),G(function(a,b){var c={};c[2>b?"tx":"ty"]=$d[b],P("Move",a,c)});var ae=function(a,b){var c=Math.min(U(a,"width",b),U(a,"height",b));return(Math.random()>.5?1:-1)*Math.random()*c},be=function(){return(Math.random()>.5?"-=":"+=")+360*Math.random()};["RandomRotate","RandomZoom"].forEach(function(a,b){P(a,null,{scaleX:b?0:_d,scaleY:b?0:_d,rotation:be,tx:ae,ty:ae})}),P("Scale",null,{scaleX:_d,scaleY:_d}),fd.registerAnimationFactory("Show",function(a,b,c){var d=ld.create(a,.001,c);return a instanceof gf?d.to("visible",!0):d.to("display",""),d}),["Right","Left"].forEach(function(a,b){P("Skew",a,{originY:{to:.8,constant:1,freeze:!1},scaleY:0,tx:$d[b],skewX:75*(b?1:-1)})});var ce=[function(a,b,c){return U(a,c,b)+90},function(a,b,c){return U(a,c,b)-90}];G(function(a,b){var c={};c[2>b?"originX":"originY"]={to:1-b%2,constant:1,freeze:!1},c[2>b?"rotationY":"rotationX"]=ce[b>0&&3>b?0:1],P("Swing",a,c)});var de=function(){function a(){}return a.square=function(a,b,c,d,e){for(var f,g=Math.min(a,b,d-a-1,c-b-1),h=0,i=(2*c+2*d-4)*g;g>h;)i-=8*h++;return b===g?f=i+a-g:a===d-g-1?f=i+d-2*g-1+b-g:b===c-g-1?f=i+d-2*g-1+c-2*g-1+d-a-1-g:a===g&&(f=i+d-2*g-1+c-2*g-1+d-2*g-1+c-b-1-g),e?d*c-f-1:f},a.getSequenceTable=function(b,c,d,e,f){b=b||"diagonal","randomSequence"===b&&(b=a.sequenceArray[Math.floor(Math.random()*a.sequenceArray.length)]);for(var g,h,i=a.sequenceMap[b.toLowerCase()],j=0,k=[],l=0;c>j;){for(g=0;d>g;)h=i(e?d-g-1:g,f?c-j-1:j,c,d),h>l&&(l=h),k.push(h),g++;j++}return k.push(l),k},a.sequenceMap={together:function(){return 0},row:function(a,b,c){return b*(c-1)+a},col:function(a,b,c){return a*c+b},diagonal:function(a,b){return a+b},random:function(a,b,c,d){var e=4*Math.random();return e>3?a+b:e>2?d-a-1+b:e>1?c-b-1+a:c-b-1+d-a-1},rowcross:function(a,b,c,d){return b%2===0?b*d+a:b*d+(d-a-1)},colcross:function(a,b,c){return a%2===0?a*c+b:a*c+(c-b-1)},squarein:function(){return a.square.apply(null,arguments)},squareout:function(){for(var b=[],c=0;c<arguments.length;c++)b[c-0]=arguments[c];return b.push(!0),a.square.apply(null,b)},edgetomiddlediagonal:function(a,b,c,d){return a+b>(d+c)/2+(d+c)%2-1?d+c-a-b-2:a+b},middletoedgediagonal:function(a,b,c,d){return Math.floor(Math.abs((d-1+c+(d+c)%2-1)/2-a-b))},rowseparate:function(a,b,c,d){var e=Math.min(c,2);return b%2===0?a%2===0?a*e:(d-a-1)*e+1:a%2===1?a*e:(d-a)*e-1},colseparate:function(a,b,c,d){var e=Math.min(d,2);return a%2===0?b%2===0?b*e:(c-b-1)*e+1:b%2===1?b*e:(c-b)*e-1},diagonalseparate:function(a,b,c,d){var e=(c+d)%2;return a%2===0?b%2===0?a+b:c-b+d-a-3+1+e:b%2===1?a+b:c-b+d-a-3+1+e}},a.sequenceArray=Object.keys(a.sequenceMap),a}(),ee=function(a){return void 0===a&&(a=1),Math.random()*a},fe=Math.floor,ge=(Math.floor,Math.round),he=(Math.sqrt,Math.sin,Math.cos,Math.tan,Math.atan,function(){return Math.random()>.5?-1:1}),ie=(Math.PI,Math.abs,Math.min,"color"),je="textShadow",ke=function(a,b){return void 0===b&&(b=0),cf.transparentize(bi(a,"color"),b)};P("Zoom",null,{scaleX:0,scaleY:0});var le=Math.PI,me=le/2,ne=2*le,oe=le/180,pe=180/le,qe=1e-7,re={factory:{},eases:{linear:Fd,swing:function(a){return.5-.5*Math.cos(a*le)},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-a*(a-2)},easeInOutQuad:function(a){return(a*=2)<1?a*a/2:-(--a*(a-2)-1)/2},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return(a-=1)*a*a+1},easeInOutCubic:function(a){return(a*=2)<1?a*a*a/2:((a-=2)*a*a+2)/2},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return 1-(a-=1)*a*a*a},easeInOutQuart:function(a){return(a*=2)<1?a*a*a*a/2:1-(a-=2)*a*a*a/2},easeInQuint:function(a){return a*a*a*a*a},easeOutQuint:function(a){return(a-=1)*a*a*a*a+1},easeInOutQuint:function(a){return(a*=2)<1?a*a*a*a*a/2:((a-=2)*a*a*a*a+2)/2},easeInSine:function(a){return~~(1e5*(1-Math.cos(a*me))+.5)/1e5},easeOutSine:function(a){return Math.sin(a*me)},easeInOutSine:function(a){return-(Math.cos(le*a)-1)/2},easeInExpo:function(a){return a?Math.pow(2,10*(a-1)):0},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return a?1===a?1:(a*=2)<1?Math.pow(2,10*(a-1))/2:1-Math.pow(2,-10*--a)/2:0},easeInCirc:function(a){return 1-Math.sqrt(1-a*a)},easeOutCirc:function(a){return Math.sqrt(1-(a-=1)*a)},easeInOutCirc:function(a){return(a*=2)<1?-(Math.sqrt(1-a*a)-1)/2:(Math.sqrt(1-(a-=2)*a)+1)/2}},get:function(a){if("@"===a.charAt(0)&&(a=a.substr(1),/^(.*)\((.*)\)$/.test(a))){a=RegExp.$1;var b=RegExp.$2.split(/\s*,\s*/).map(parseFloat);return re.factory[a].apply(null,b)}return re.eases[a]}};re.factory.back=function(a){return a||(a=1.70158),function(b){return 1===b?1:b*b*((a+1)*b-a)}},re.eases.easeInBack=re.factory.back(),re.eases.easeOutBack=W(re.eases.easeInBack),re.eases.easeInOutBack=X(re.eases.easeInBack),re.eases.easeInBounce=function(a){return a=1-a,1-(1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375)},re.eases.easeOutBounce=W(re.eases.easeInBounce),re.eases.easeInOutBounce=X(re.eases.easeInBounce),re.factory.elastic=function(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/ne*Math.asin(1/a):(a=1,c=b/4),function(d){return d=1-d,d?1===d?0:-a*Math.pow(2,-10*d)*Math.sin((d-c)*ne/b):1}},re.eases.easeInElastic=re.factory.elastic(),re.eases.easeOutElastic=W(re.eases.easeInElastic),re.eases.easeInOutElastic=X(re.eases.easeInElastic);var se=re.factory.steps=function(a,b){null==b&&(b=1);var c=a+"x"+b,d=se.cache;if(d[c])return d[c];var e=1/a,f=function(a){return 1===a?b:~~(a/e)*e};return d.length>=10&&(delete d[d[d.length-1]],d.pop()),d[c]=f,d.unshift(c),f};se.cache=[],Qb(fd._animationFactories,function(a,b){if(/(.*?)In(.*)$/.test(b)){var c=RegExp.$1,d=RegExp.$2,e=c+"Out",f=/From(.*)$/.exec(d);if(f){var g=f[1],h="Left"===g?"Right":"Right"===g?"Left":"Top"===g?"Bottom":"Top";e+="To"+h,c+=g+h}else e+=d,c+=d;fd._animationFactories[e]&&Y(c,b,e)}}),fd.registerTransitionFactory("None",function(a,b,c){b instanceof gf?b.visible=!1:_h(b,"display","none");var d=hd.create();return d.add(fd.getAnimation(b,"Show",c)),d.add(fd.getAnimation(a,"Hide",c)),d});var te={initialize:function(a,b){te._iterate(a,function(a){var c=ve.get(a,"animationOption");if(c&&c.animations)for(var d=c.animations,e=-1,f=d.length;++e<f;){var g=d[e];fd.animate(a,g.name,g.duration,g,b)}})},stop:function(a){var b=this;te._iterate(a,function(a){b.stopComponent(a)})},stopComponent:function(a){var b=ve.get(a,"timeline");b&&(b.destroy(),ve.set(a,"timeline",null)),b=ve.get(a,"showHideAnimation"),b&&(b.stop(!0,!0),ve.set(a,"showHideAnimation",null))},show:function(a){te.showHide(a,!0)},run:function(a,b){var c=ve.get(a,"timeline");c||(c=hd.create(),kd.getInstance().add(c),c.addEventListener("end",function(){c.destroy(),ve.set(a,"timeline",null)},null,1/0),ve.set(a,"timeline",c)),a.transform.accelerate=!0,c.add(fd.animate(a,b.name,b.duration,b))},tween:function(a,b,c){var d=ve.get(a,"timeline");d||(d=hd.create(),kd.getInstance().add(d),d.addEventListener("end",function(){d.destroy(),ve.set(a,"timeline",null)},null,1/0),ve.set(a,"timeline",d)),a.transform.accelerate=!0,d.add(ld.motion(a,c.duration,b,c))},hide:function(a){te.showHide(a,!1)},toggle:function(a){var b=!0;ve.get(a,"showing")?b=!1:ve.get(a,"hiding")?b=!0:a instanceof jf?b=a.audio.paused:a.visible&&(b=!1),te.showHide(a,b)},showHide:function(a,b,c,d){var e=b?"showing":"hiding",f=ve.get(a,e),g=ve.get(a,"showHideAnimation");if(f)g&&d&&d!==g.timeline&&d.add(g);else{g&&(g.stop(!0,!0),ve.set(a,"showHideAnimation",null));var h=a instanceof jf,i=h?!a.audio.paused:a.visible;if(b&&!i||!b&&i){var j=ve.get(a,"animationOption"),k=j?j[b?"enter":"leave"]:null;if(k||b||(k={name:h?"SoundFadeOut":"FadeOut"}),k){h||"Show"===k.name||"Hide"===k.name||(a.transform.accelerate=!0);var g=fd.animate(a,k.name,null==c?k.duration:c,k,d);g.addEventListener("end",function(){ve.set(a,"showHideAnimation",null),ve.set(a,e,!1)},null,1/0),ve.set(a,"showHideAnimation",g),ve.set(a,e,!0)}else h?b?(a.audio.volume=1,a.audio.replay()):a.audio.pause():a.visible=b}}},leave:function(a){var b=hd.create();a=a.concat();for(var c=-1,d=a.length;++c<d;){var e=a.shift();(e.visible||ve.get(e,"showing"))&&te.showHide(e,!1,null,b)}return b.addEventListener("end",b.destroy,b),kd.getInstance().add(b),b},_iterate:function(a,b){for(var c=[a];c.length;){var d=c.shift();if(b(d),d instanceof nf)for(var e=d.children,f=-1,g=e.length;++f<g;)c.push(e[f])}}},ue=function(a){function b(b){a.call(this),this.__leo_guid__=w(),this._timeline=null,this._current=-1,this.paused=!1,this._initialized=!1,this._preloaded=!1,this._options=b||{},this._sceneData=this._options.scenes,this._initPreloadList(),this._container=Gi(b.container||"body"),ad.apps[this[Id]]=this}return dd(b,a),d(b.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),b.prototype._initPreloadList=function(){var a;switch(this._options.preloadType){case 1:a=Wc(this._sceneData.length);break;case 0:a=[];break;default:var b=this._options.preload||[];a=[];for(var c=-1,d=b.length;++c<d;)Array.isArray(b[c])?a=a.concat(Wc(b[c][0],b[c][1]+1)):a.push(b[c])}this._preloadList=a},d(b.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),d(b.prototype,"app",{get:function(){return this._app},enumerable:!0,configurable:!0}),d(b.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0}),b.prototype._initPlugins=function(){for(var a=this.options.plugins||[],b=this.plugins=[],c=-1,d=a.length;++c<d;){var e=Ai.create(a[c].name,a[c],this);e&&b.push(e)}},b.prototype._createTimeline=function(){var a=this;return this._timeline&&this._timeline.destroy(),this._timeline=hd.create(),this._timeline.addEventListener("end",function(){a._timeline.destroy(),a._timeline=null},null),this.paused&&this._timeline.pause(),kd.getInstance().add(this._timeline),this._timeline},d(b.prototype,"current",{get:function(){return this._current},set:function(a){if(!(-1>a||a>=this._sceneData.length)){var b=this._current;a!==b&&(this._current=a,this._preloaded?this._load(a):a>=0&&this._preloadList&&this._preloadList.indexOf(a)<0&&this._preloadList.push(a),ji.dispatchPropertyChangeEvent(this,"current",b))
}},enumerable:!0,configurable:!0}),b.prototype.prev=function(a){void 0===a&&(a=1);var b=this.numScenes;return this.current=((this._current-a)%b+b)%b,this},b.prototype.next=function(a){void 0===a&&(a=1);var b=this.numScenes;return this.current=((this._current+a)%b+b)%b,this},d(b.prototype,"numScenes",{get:function(){return this._sceneData.length},enumerable:!0,configurable:!0}),b.prototype.start=function(){return this._initialized||(this._current<0&&(this._current=0),this.init()),this},b.prototype.resume=function(){return this.paused&&(this.paused=!1,this._timeline&&this._timeline.resume(),this.dispatchSimpleEvent("resume")),this},b.prototype.pause=function(){return this.paused||(this.paused=!0,this._timeline&&this._timeline.pause(),this.dispatchSimpleEvent("pause")),this},b.prototype.destroy=function(){if(this.dispatchSimpleEvent("destroy"),this._initialized){for(var b=this.plugins,c=-1,d=b.length;++c<d;)b[c].destroy();b.length=0,this.plugins=b=null,this._current=-1,this._clearScenes();var e=this._stage.node;this._stage.destroy(),e.remove(),e=null,this._timerManager.destroy(),this._timerManager=null,this._timeline&&(this._timeline.destroy(),this._timeline=null),this.destroyLayout(),this._app.removeClass("leo-app"),this._app=null,this._stage=null,this._scenes=null}a.prototype.destroy.call(this),this._container=null,this._options=null,this._preloadList=null,this._sceneData=null,delete ad.apps[this[Id]]},b.prototype.resize=function(a,b){var c=this._stage.transform.deferred;this._stage.transform.deferred=!0,this._stage.width=a,this._stage.height=b,this._stage.transform.deferred=c},b.prototype.init=function(){if(!this._initialized){this._initialized=!0;var a=this._options;this.initLayout(),this._app.addClass("leo-app"),this.initStage(),this._stage.rootContext.setInnerVariable("__app__",this),this.resize(a.stageWidth,a.stageHeight),this._timerManager=new xe,this._listenLoadEvents(),this._initPlugins(),this._preload(),this._afterInit()}},b.prototype._afterInit=function(){},b.prototype.initLayout=function(){this._app=this._container.el("div")},b.prototype.destroyLayout=function(){this._app.remove()},b.prototype.initStage=function(){var a=this._stage=new Pf;a.transform.originX=a.transform.originY=0,this._app.append(a.dom),a.enter(a),a.rootContext.controller=this,a.overflowMode="hidden"},b.prototype.getScene=function(a){var b=this._sceneData[a],c=this._scenes[a];return c||(c=this._scenes[a]=ff.create(b.type,b.name),ve.set(c,"data",b),ye.construct(c,b),this.stage.addScene(c)),c},b.prototype._preload=function(){var a=this,b=-1,c=this._sceneData.length,d=this._preloadList,e=[],f=this._sceneData;this._scenes=new Array(c);var g=li.getInstance(),h=function(b){b.preloadList=d,b.preloadedList=e,a.dispatchSimpleEvent("preloadProgress",b)},i=function(){if(b>=0&&e.push(d[b]),++b>=d.length)return void a.dispatchSimpleEvent("preloadEnd");var c=d[b];if(0>c||c>=f.length)i();else{var j=a.getScene(c);g.load(a._readLoadableList(j),i,h,j[Id])}};this.dispatchSimpleEvent("preloadStart",d),i()},b.prototype._load=function(a){var b=this;if(a>=0){var c=this.getScene(a);this.dispatchSimpleEvent("loadStart",a),li.getInstance().load(this._readLoadableList(c),function(c){c.sceneIndex=a,b.dispatchSimpleEvent("loadEnd",c)},function(c){c.sceneIndex=a,b.dispatchSimpleEvent("loadProgress",c)},c[Id])}else this.dispatchSimpleEvent("loadEnd",{sceneIndex:-1})},b.prototype._readLoadableList=function(a){for(var b=[],c=a.children.concat();c.length;){var d=c.pop();if(d.loadable&&d.readyState<2&&b.push({target:d,data:ve.get(d,"data")}),d instanceof nf)for(var e=d.children,f=-1,g=e.length;++f<g;)c.push(e[f])}return b},b.prototype._clearScenes=function(){for(var a=this._scenes,b=li.getInstance(),c=-1,d=a.length;++c<d;){var e=a[c];if(e){var f=e[Id];b.contains(f)&&b.remove(f),this._clearData(e)}}},b.prototype._clearData=function(a){for(var b=[a],c=ve;b.length;){var d=b.pop();if(c.hasData(d)&&(c.clear(d),d instanceof nf))for(var e=d.children,f=-1,g=e.length;++f<g;)b.push(e[f])}},b.prototype._listenLoadEvents=function(){this.addEventListener("preloadEnd",this._onpreload,this,1/0),this.addEventListener("loadEnd",this._onload,this,1/0)},b.prototype._onpreload=function(){this.removeEventListener("preloadEnd",this._onpreload,this),this._preloaded=!0,this._preloadList=null,this._load(this._current)},b.prototype._onload=function(a){var b=this,c=a.data.sceneIndex;if(c===this._current){var d=this._stage.currentScene;if(d){var e=function(){b._stage.removeEventListener("transitionStart",e,null),b._timeline&&(b._timeline.stopAnimationsAt(b._timeline.currentTime),b._timeline.destroy(),b._timeline=null)};this._stage.addEventListener("transitionStart",e,null)}if(0>c)this._stage.currentScene=null;else{var f=this._sceneData[c],g=this._scenes[c];f.reset&&ze.initialize(g),this._stage.currentScene=g}var h=function(a){b._stage.removeEventListener("transitionEnd",h,null);var e=a.data;d&&te.stop(d),c>=0&&c===b._current&&g===e&&f.reset&&(te.initialize(g,b._createTimeline()),b._timerManager.timeline=b._timeline,we.initialize(g,b._timerManager))};this._stage.addEventListener("transitionEnd",h,null)}},b}(ed);ad.apps={};var ve={_cache:{},data:function(a){return ve._cache[a[Id]]||(ve._cache[a[Id]]={})},set:function(a,b,c){var d=ve.data(a);return d[b]=c,c},get:function(a,b){var d=ve._cache[a[Id]];return d?d[b]:c},contains:function(a,b){var c=ve._cache[a[Id]];return null!=c&&c.hasOwnProperty(b)},hasData:function(a){return null!=ve._cache[a[Id]]},remove:function(a,b){var c,d=ve;if(this.contains(a,b)){var e=d._cache[a[Id]];c=e[b],delete e[b],Vc(e)&&delete d._cache[a[Id]]}return c},clear:function(a){var b,c=ve,d=a[Id];return c._cache.hasOwnProperty(d)&&(b=c._cache[d],delete c._cache[d]),b}},we={initialize:function(a,b){for(var c=[a],d=b.timeline.duration;c.length;){var e=c.shift(),f=ve.get(e,"timers");if(f)for(var g=-1,h=f.length;++g<h;)b.add({time:f[g].time,callback:function(a,b){return function(c){var d=yb(a,b);d&&a.action.call(d,a,c,b)}}(f[g],e)}),d<f[g].time&&(d=f[g].time);if(e instanceof nf)for(var i=e.children,g=-1,h=i.length;++g<h;)c.push(i[g])}d>b.timeline.duration&&(b.timeline.duration=d),c=null}},xe=function(a){function b(){a.call(this),this._timeline=null,this._timers=[]}return dd(b,a),d(b.prototype,"timeline",{get:function(){return this._timeline},set:function(a){this._timeline!==a&&(this.removeTimelineListener(),this._timeline=a,this.addTimelineListener())},enumerable:!0,configurable:!0}),b.prototype.update=function(a){for(var b=this._timeline,c=this._timers,d=b.currentTime,e=-1,f=c.length;++e<f;){var g=c[e];if(!(d>=g.time))break;g.callback(a)}e>0&&c.splice(0,e),c.length||this.removeTimelineListener()},b.prototype.add=function(a){for(var b=a.time,c=this._timers,d=c.length;--d>=0&&c[d].time>b;);c.splice(d+1,0,a)},b.prototype.addTimelineListener=function(){this._timeline&&this._timeline.addEventListener("update",this.update,this)},b.prototype.removeTimelineListener=function(){this._timeline&&this._timeline.removeEventListener("update",this.update,this)},b.prototype.clear=function(){this._timers.length=0,this.removeTimelineListener()},b.prototype.destroy=function(){this.clear(),this._timers=null},b}(cd),ye={construct:function(a,b){a.transitionConfig=b.transition,b.defaultProps.visible=!1,null==b.reset&&(b.reset=!0),ye._setProperties(a,b),ye._setAnimations(a,b),ye._setEvents(a,b),ye._construct(b.children,a)},_construct:function(a,b){for(var c=-1,d=a.length;++c<d;){var e=a[c],f=ff.create(e.type,e.name);f?(ve.set(f,"data",e),ye._setProperties(f,e),ye._setAnimations(f,e),ye._setEvents(f,e),b.append(f),"group"===e.type&&e.children&&ye._construct(e.children,f)):Ui.warning("type missed","The type '"+e.type+"' for '"+e.name+"' is missed")}},_setProperties:function(a,b){var c=ye.KEYWORDS;for(var d in b)c[d]||a.setProperty(d,b[d])},_setAnimations:function(a,b){var c=(b.manual,{});b.enter&&(c.enter=b.enter,c.enter.delay=0),b.leave&&(c.leave=b.leave,c.leave.delay=0),b.manual||(c.animations=b.animations),ve.set(a,"animationOption",c)},_setEvents:function(a,b){var c=b.events;if(c){for(var d=[],e=-1,f=c.length;++e<f;){var g=c[e];"timer"===g.trigger?d.push(g):a.addEventListener(g.trigger,function(b){return function(c){c.preventDefault();var d=yb(b,a);d&&b.action.call(d,b,c,a)}}(g,a),null)}d.length&&ve.set(a,"timers",d)}},KEYWORDS:g("type name $extra defaultProps reset manual events animations transition children enter leave".split(" "))},ze={initialize:function(a){for(var b=[a];b.length;){var c=b.shift(),d=ve.get(c,"data");if(d&&(c.visible=!1,d.defaultProps&&c.setProperty(d.defaultProps),c instanceof nf))for(var e=c.children,f=-1,g=e.length;++f<g;)b.push(e[f])}}},Ae={},Be=function(){function a(a){var b=this;this.audio=a;var c=Hi("div").addClass("LB_AudioMiniPlayer"),d=c.el("div").addClass("muted")[0];this.node=c,this.mutedButton=d,this.node.bind("tap",function(){b.audio.playPause()}),a.addEventListener("play",this.changePlayState,this),a.addEventListener("pause",this.changePauseState,this)}return a.prototype.changePlayState=function(){this.mutedButton.className="unmute"},a.prototype.changePauseState=function(){this.mutedButton.className="muted"},a.prototype.destroy=function(){this.node.remove(),this.node=null,this.audio.removeEventListener("play",this.changePlayState,this),this.audio.removeEventListener("pause",this.changePauseState,this),this.audio=null},a}(),Ce=function(){function a(a){this.audio=a,this.width=302,this.height=120,this.node=this.createNode()}return a.prototype.createNode=function(){function a(a){return function(b){var c=r.duration;c&&a(b,c)}}var b=this,c="audio-",d=" "+c+"bg",e=Hi("div").addClass(c+"bg").attr("id","leo-lightbox--audio"),f=e.el("div").addClass(c+"loading "+c+"message"),g=e.el("div").addClass(c+"error "+c+"message"+d),h=e.el("div").addClass(c+"progress").attr("title","00:00"),i=h[0],j=h.el("div").addClass(c+"buffered"+d),k=h.el("div").addClass(c+"played"+d),l=(k.el("div").addClass(c+"cursor"+d),e.el("div").addClass(c+"time").html("00:00")),m=e.el("div").addClass(c+"playPause "+c+"play"+d).attr("title","Play/Puase"),n=(e.el("div").addClass(c+"controls "+c+"prev"+d).attr("title","Prev"),e.el("div").addClass(c+"controls "+c+"next"+d).attr("title","Next"),e.el("div").html("Audio player").addClass(c+"title"),e.el("div").addClass(c+"volume"+d)),o=n[0],p=n.el("div").addClass(c+"volume-fg"),q=(p.el("div").addClass(c+"volume-fg-p"+d),p.el("div").addClass(c+"volume-cursor"+d),e.el("div").addClass(c+"volume-switch "+c+"unmuted"+d)),r=this.audio;m.bind("tap",a(function(){r.playPause()})),q.bind("tap",a(function(){r.muted=!r.muted})),h.bind("tap",a(function(a,b){var c=a.tapStartX||a.pageX,d=(c-Dh(a.currentTarget).left)/i.offsetWidth*b;r.currentTime=d})),nh(o,"tap",a(function(a){var b=a.tapStartY||a.pageY,c=1-(b-Dh(o).top)/o.offsetHeight;r.volume=c}));var s=a(function(a,c){i.title=b.formatTime(a.originalEvent.offsetX/i.offsetWidth*c)});h.bind("mouseover",s),h.bind("mousemove",s);var t=a(function(a){o.title=100*(1-a.originalEvent.offsetX/o.offsetHeight)});n.bind("mouseover",t),n.bind("mousemove",t),r.addEventListener("progress",a(function(a,b){var c=r.buffered;bi(j[0],"width",c.end(0)/b*100+"%")}),null),r.addEventListener("timeupdate",a(function(a,c){var d=r.currentTime;k.style("width",d/c*90+10+"%"),l.html(b.formatTime(d))}),null),r.addEventListener("volumechange",function(){var a=r.muted,b=r.volume,e=a?0:b;q[0].className=c+(a||0===e?"muted":"unmuted")+d+" "+c+"volume-switch",p.style("height",73*e+27+"%")},null),r.addEventListener("play",function(){Yb(f[0]),m.removeClass("audio-play").addClass("audio-pause")},null),r.addEventListener("pause",function(){Yb(f[0]),m.removeClass("audio-pause").addClass("audio-play")},null);var u;return r.addEventListener("waiting",function(){clearTimeout(u),u=setTimeout(function(){Yb(g[0]),Xb(f[0])},300)},null),r.addEventListener("load",function(){clearTimeout(u),Yb(f[0]),Yb(g[0])},null),r.addEventListener("canplay",function(){clearTimeout(u),Yb(f[0]),Yb(g[0])},null),r.addEventListener("error",function(){clearTimeout(u),Yb(f[0]),Xb(g[0])},null),e},a.prototype.formatTime=function(a){a=Math.round(a);var b=Math.floor(a/60),c=a%60;return(10>b?"0":"")+b+":"+(10>c?"0":"")+c},a.prototype.show=function(){this.node.style("display","block")},a.prototype.hide=function(){this.node.style("display","none")},a}();Ae.callJS=function(a){a.hint="Run JavaScript Code";try{var b=Function(a.content);return function(){b.call(null)}}catch(c){return null}},Ae.changeAlpha=Z({opacity:!0},!0),Ae.changeAngle=Z({rotate:!0},!0),Ae.changeCaption=Ae.changeHtmlCaption=Ae.changeButtonCaption=function(a,b){var c=ff.getClass(b.type).textType;return c?(a.params={textContent:Ib(a.params.content,c)},ub):null},Ae.changeEmbedCode=function(){return _},Ae.changeFlash=function(){return ab},Ae.changeHotSpotColor=Z({hotSpotColor:!0},!0),Ae.changeImage=function(a,b){return"image"===b.type?(a.params={src:a.params.content,transitionConfig:a.params.transition||{name:"Fade",duration:600,easing:"easeInOutCubic"}},ub):null},Ae.changeImageFilter=function(a,b){if("image"===b.type){var c=a.params;a.options={duration:+c.duration||0};var d=De,e="filter.";a.params={};for(var f in c)d[f]&&(a.params[e+f]=c[f]/100);return null!=c.blur&&(a.params[e+"blur"]=c.blur),wb}return null};var De=g("brightness contrast grayscale invert saturate sepia");Ae.changeLayer=function(a){return 1/0===a.params?bb:(a.params={zIndex:~~+a.params.zIndex},ub)},["Vimeo","Youtube","Sound","Html5-Video"].forEach(function(a){var b=a.toLowerCase();Ae["change"+a]=function(c,d){var e="soundplayer"===d.type;return d.type===b||e?(c.params={src:c.params.content},"Sound"!==a||e?ub:vb):null}}),Ae.changeMovingBackgroundSetting=function(){return cb},Ae.changeMovingObjectSetting=function(){return db},["play","pause"].forEach(function(a){var b="play"===a?"play":a,c=function(){this.audio[b]()};Ae[a]=function(a,b){return/(?:video|vimeo|youtube|sound|soundplayer)$/.test(b.type)?c:null}}),Ae.changePosition=Z(g("left top"),!0),Ae.changeShadow=Z({shadow:!0},!0,350),Ae.changeSize=Z(g("width height"),!0),["Text","Shape","Button"].forEach(function(a){Ae["change"+a+"Format"]=function(a,b){var c=ff.getClass(b.type).textType;return c&&(a.params=Hb(a.params,b.type))?ub:null}}),Ae["changeHtml5-Video"]=function(a,b){return"html5-video"===b.type?(a.params={src:a.params.content},ub):null},["Vimeo","Youtube"].forEach(function(a){var b=a.toLowerCase();Ae["change"+a]=function(a,c){return c.type===b?(a.params={src:a.params.content},ub):null}}),Ae.changeVisible=function(){return eb},Ae["email-to"]=function(a){return a.hint="Email To "+a.content,fb};var Ee=null;Ae.goToPage=function(a,b){if(!a.params||a.params.target===c)return null;var b=parseInt(a.params.target,10),d=a.content;return a.hint=d,"Fixed Page"===d&&(a.hint="Page "+b),a.content=b,gb};var Fe=function(){function a(){var a=this;this.width=300,this.height=200,this.close_style={right:-16,top:-43},this.audio_style={right:10,top:-13},this.resizeOption={mode:1,delh:60},this.__leo_guid__=w(),this.effectArray=["FadeIn","ScaleIn","ZoomIn"],this.index=-2,this.length=0,this.keyupHandler=function(b){b.altKey||b.ctrlKey||b.shiftKey||(b.preventDefault(),39==b.keyCode&&a.next(),37==b.keyCode&&a.prev())},this.container=this.createNode()}return a.getInstance=function(){return a._singleton||(a._singleton=new a),a._singleton},a.prototype.createNode=function(){var a=this,b=Hi("div").attr("id","leo-lightbox--gallery"),c=this.dataWrapper=b.el("div").attr("id","gallery-wrap");Ie(c[0],function(b){"left"===b&&a.next(),"right"===b&&a.prev()}),c.bind("mousedown",function(a){a.preventDefault()}),this.imgWrapper=c.el("div").attr("id","img-wrap"),this.loading=b.el("i").addClass("leo-loading")[0];var d=b.el("div").attr("id","control-bar");d.el("div").attr("id","to-first").addClass("controls").bind({tap:function(){0===a.index?a.shake():a.skipTo(0)}}),d.el("div").attr("id","to-last").addClass("controls").bind({tap:function(){a.index===a.length-1?a.shake():a.skipTo(a.length-1)}}),d.el("div").attr("id","to-next").addClass("controls").bind({tap:function(){a.next()}}),d.el("div").attr("id","to-prev").addClass("controls").bind({tap:function(){a.prev()}});var e=function(){f.unbindAll("keypress");var b=f.val();""===b?f.val(a.index+1+" / "+a.length):(b=parseInt(b,10)-1,a.skipTo(b))},f=this.input=d.el("input").attr("type","text").bind({tap:function(){f.bind("keypress",function(a){13===a.keyCode&&(e(),f[0].click())}),this.setSelectionRange(0,9999)},blur:e});return b},a.prototype.config=function(a){this.action=a;var c=a.content;return"string"==typeof c&&(c=c.split(";")),this.index=-2,this.imgWrapper.html(""),this.dataArray=c,this.length=c.length,this.skipTo(0),qh(b,"keyup",this.keyupHandler),nh(b,"keyup",this.keyupHandler),this},a.prototype.shake=function(){var a,b=0;a=ld.create(this.image,75/(4-b),{yoyo:!0,repeat:1}),a.overwritten=0,a.apply({left:{to:3,freeze:!1}}),kd.getInstance().append(a),a=ld.create(this.image,75/(4-b),{yoyo:!0,repeat:1}),a.overwritten=0,a.apply({left:{to:-3,freeze:!1}}),kd.getInstance().append(a)},a.prototype.hide=function(){qh(b,"keyup",this.keyupHandler),this.width=300,this.height=200},a.prototype.skipTo=function(a){var b,c=this,d=new Image,e=this.dataArray,f=this.length,g=this.index,h=this.input,i=this.imgWrapper,j=Ge.getInstance(this.action);if(this.image&&(this.image.onload=this.image.onerror=null),g!==a){if(a>=f||0>a||isNaN(a))return h.val(g+1+" / "+f),void this.shake();this.lt=setTimeout(function(){Xb(c.loading)},350),this.index=a,h.val(a+1+" / "+f),b=e[a],d.onload=d.onerror=function(){var a=c.width=d.width||25,b=c.height=d.height||25,e={width:"100%",height:"100%"};clearTimeout(c.loadTimeout),d.onload=d.onerror=null,200>a&&(c.width=200,e.width=a),200>b&&(c.height=200,e.height=b),i.html(""),i.style(e),i.append(d),j.resize(!0,function(){c._animate&&c._animate.destroy(),c._animate=fd.animate(i[0],c.effectArray[Math.floor(Math.random()*c.effectArray.length)],500),clearTimeout(c.lt),Yb(c.loading)})},d.src=b,Yb(i[0])}else h.val(a+1+" / "+f),this.shake();this.image=d},a.prototype.prev=function(){this.index-1<0?this.shake():this.skipTo(this.index-1)},a.prototype.next=function(){this.index+1>=this.length?this.shake():this.skipTo(this.index+1)},a._singleton=null,a}();Ae["slide-box"]=function(a){return a.hint="Pop Up Slide Box",hb};var Ge=function(){function c(){var b=this;this.hided=!0,this.resizeHandler=function(){b.resize(!0)},this.inEffect="MoveInFromTop",this.outEffect="MoveOutToTop",this.ESCEventListener=function(a){27===a.keyCode&&(a.preventDefault(),b.hide())},this.raf=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)},this.node=this._createNode()}return c.getInstance=function(a){return c._singleton||(c._singleton=new c),c._singleton.audioURL=a&&a.audio?a.audio.url:"",c._singleton.volume=a&&a.audio?a.audio.volume:1,c._singleton},c.prototype._createNode=function(){var a=this,b=Gi("body").at(0),c="leo-lightbox-",d=b.el("div").attr("id",c+"container").bind("tap",function(b){b.target===a.node[0]&&a.hide()});this.plugin_container=d.el("div").attr("id",c+"scene").bind("tap",function(a){a.stopPropagation()}),Yb(this.plugin_container[0]),this.close_button=this.plugin_container.el("div").attr("id","leo-lightbox-close").addClass("leo-animation-unnecessary").bind("tap",function(){a.hide()});var e=this.audio=new ui;return e.addEventListener("volumechange",function(){var a,b="leo-lg-audio-muted",c="leo-lg-audio-unmuted";e.muted&&(a=b,b=c,c=a),this.audioMute.removeClass(b).addClass(c)},this),this.audioButton=this.plugin_container.el("div").addClass("leo-lg-audio-button"),this.audioReplay=this.audioButton.el("div").addClass("leo-lg-audio-replay").bind("tap",function(){e.replay()}),this.audioMute=this.audioButton.el("div").addClass("leo-lg-audio-unmuted").bind("tap",function(){e.muted=!e.muted}),d},c.prototype.resize=function(a,b){var c=this.plugin;if(c){var d=Math.ceil,e=c.resizeOption,f=e.delw||0,g=e.delh||0,h=c.width||480,i=c.height||240,j=e.minw>=0?e.minw:200,k=e.minh>=0?e.minh:200,l=Math.max(j,Rd(this.node[0])-f-40),m=Math.max(k,Ud(this.node[0])-g-40),n=h,o=i;1===e.mode&&(n>l||o>m?(n/o>l/m?(n=d(l),o=d(n*i/h)):(o=d(m),n=d(o*h/i)),o>n?j>n&&(n=d(j),o=d(n*i/h)):k>o&&(o=d(k),n=d(o*h/i))):(n=d(h),o=d(i)));var p=this.plugin_container[0];if(a){var q=ld.create(p,300);q.apply({width:{to:n},height:{to:o},left:{to:(Rd(this.node[0])-n)/2},top:{to:(Ud(this.node[0])-o)/2}}),kd.getInstance().add(q),b&&q.addEventListener("end",function(){b()},this)}else bi(p,{width:n,height:o,left:(Rd(this.node[0])-n)/2,top:(Ud(this.node[0])-o)/2});return c.resize&&c.resize(l,m),this}},c.prototype.show=function(c,d){var e=this;if(this.hided){this.hided=!1,Xb(this.node[0]);var f=c||this.plugin;if(f){this.plugin=f,this.plugin_container.append(f.container),Xb(f.container[0]),this.close_button.style(f.close_style||{right:-10,top:-10}),this.audioButton.style(f.audio_style||{right:15,top:15}),this.resize(!1),this.plugin_container.style({transform:"none",opacity:1});var g=this.animation;g&&(g.removeAllEventListeners("end"),g.stop(!0,!0)),g=this.animation=fd.animate(this.plugin_container[0],f.inEffect||this.inEffect,f.duration||450,{easing:"easeOutQuad"}),g.addEventListener("end",function(){e.audio.muted=!1,e.showAudio()},this),setTimeout(function(){d&&d()},f.duration||450);var h,i;return 1===f.resizeOption.mode?h=i="":(h=f.width,i=f.height),this.node.style({minWidth:h,minHeight:i}),nh(b,"keydown",this.ESCEventListener),nh(a,"resize",this.resizeHandler),this}}},c.prototype.hide=function(){var c=this,d=this.plugin;if(!d||this.hided)return void Yb(this.node[0]);this.hideAudio(),this.hided=!0,this.plugin_container.style({transform:"none",opacity:1});var e=this.animation;return e&&(e.removeAllEventListeners("end"),e.stop(!0,!0)),e=this.animation=fd.animate(this.plugin_container[0],d.outEffect||this.outEffect,d.duration||450,{easing:"easeOutQuad",freeze:!1}),e.addEventListener("end",function(){Yb(c.node[0]),Yb(d.container[0]),d.hide&&d.hide()},this),qh(a,"resize",this.resizeHandler),qh(b,"keydown",this.ESCEventListener),this},d(c.prototype,"audioURL",{set:function(a){this._url!==a&&(this._url=a,this.audioButton.style("display",a?"block":"none"),this.audio.src=a)},enumerable:!0,configurable:!0}),d(c.prototype,"volume",{set:function(a){this.audio.volume=a},enumerable:!0,configurable:!0}),c.prototype.showAudio=function(){this._url&&this.audio.replay()},c.prototype.hideAudio=function(){this.audio.pause()},c._singleton=null,c}(),He=(function(){function a(){}return a}(),function(a){function e(b,c,d){a.call(this),this._scrollTop=0,this.container=b,this.content=this.container.querySelector(".leo-scroll-content"),this.options=Object.create(c)||{},this.onscroll=d,this.content&&this.init()}return dd(e,a),e.prototype.init=function(){var a=this.options,c=this.height=Ud(this.container),d=this.content_height=Ud(this.content);if(!(c>=d)){var e,f;return a.scrollable!==!1&&a.Y!==!1&&(this.createScrollBarVer(c,d),e=this.bar_container_height=Ud(this.scrollbar_y.parentNode),f=this.bar_height=Ud(this.scrollbar_y),this.mousewheel(c,d)),("touchstart"in b||a.draggable!==!1)&&a.y!==!1&&this.dragVer(c,d,e,f),this}},e.prototype.destroy=function(){a.prototype.destroy.call(this),this.content&&bi(this.content,"ty",this.ty),this.scrollbar_y&&this.scrollbar_y.parentNode.parentNode.removeChild(this.scrollbar_y.parentNode),this.onwheel&&qh(this.container,"mousewheel",this.onwheel),this.mousedown&&qh(this.container,"mousedown",this.mousedown),this.bar_mousedown&&qh(this.scrollbar_y,"mousedown",this.bar_mousedown),this.bar_mousedown=null,this.container=null,this.content=null,this.scrollbar_y=null,this.options=null,this._scrollTop=null,this.onwheel=null,this.mousedown=null,this.unbind_move_y(),this.unbind_up_y()},d(e.prototype,"scrollTop",{get:function(){return this._scrollTop},set:function(a){this.scrollTo(a),this._scrollTop=a},enumerable:!0,configurable:!0}),e.prototype.scrollTo=function(a){a=Math.floor(a),a!==this._scrollTop&&(bi(this.content,"ty",-a),this.bar_container_height!==c&&bi(this.scrollbar_y,"ty",a/(this.content_height-this.height)*(this.bar_container_height-this.bar_height)),this._scrollTop=a,this.dispatchSimpleEvent("scroll"),this.onscroll&&this.onscroll())},e.prototype.dragVer=function(a,c){{var d=this,e=this.content;this.scrollbar_y.parentNode,this.scrollbar_y}this.ty||(this.ty=bi(e,"ty")),this.mousedown=function(f){f.preventDefault();var g=bi(e,"ty"),h=f.pageY;d.unbind_move_y(),d.doc_move_y=function(a){a.preventDefault(),d.scrollTo(-(g+a.pageY-h))},nh(b,"mousemove",d.doc_move_y),d.unbind_up_y(),d.doc_up_y=function(b){b.preventDefault(),d.unbind_move_y();var f,g=f=bi(e,"ty");g>0&&(f=0),a-c>g&&(f=a-c);var h=ld.to({x:0},300,{x:1},{easing:"easeOutBack"});h.addEventListener("update",function(){d.scrollTo(-(g+(f-g)*h.ratio))},null)},uh(b,"mouseup",d.doc_up_y)},nh(this.container,"mousedown",this.mousedown)},e.prototype.unbind_move_y=function(){var a=this.doc_move_y;a&&qh(b,"mousemove",a),this.doc_move_y=null},e.prototype.unbind_up_y=function(){var a=this.doc_up_y;a&&qh(b,"mouseup",a),this.doc_up_y=null},e.prototype.createScrollBarVer=function(a,c){var d=this,e=this.container,f=(bi(e,"left",!0),this.content,this.options),g=b.createElement("div");g.className="leo-scroll-bar-container-y "+(f.y&&f.y.container||"");var h=this.scrollbar_y=b.createElement("div");h.className="leo-scroll-bar-y "+(f.y&&f.y.bar||""),g.appendChild(h),e.appendChild(g);var i=Ud(g),j=i*a/c;Ud(h,j),this.bar_mousedown=function(e){e.stopPropagation(),e.preventDefault();var f=e.pageY,g=bi(h,"ty");d.unbind_move_y(),d.doc_move_y=function(b){b.preventDefault();var e=g+b.pageY-f;0>e&&(e=0),e>i-j&&(e=i-j),d.scrollTo(e/(i-j)*(c-a))},nh(b,"mousemove",d.doc_move_y),d.unbind_up_y(),d.doc_up_y=function(a){a.preventDefault(),d.unbind_move_y()},nh(b,"mouseup",d.doc_up_y)},nh(h,"mousedown",this.bar_mousedown),this.scrollTo(-bi(this.content,"ty"))},e.prototype.mousewheel=function(a,b){var c=this,d=this.container;this.onwheel=function(d){d.preventDefault();var e=c._scrollTop+50*(d.wheelDeltaY<0?1:-1);0>e&&(e=0),e>b-a&&(e=b-a),c.scrollTo(e)},nh(d,"mousewheel",this.onwheel)},e}(ed)),Ie=function(a,b){var c,d,e,f,g,h,i,j,k,l=150,m=100,n=300,o=b||function(){};nh(a,"tapstart",j=function(a){a.preventDefault();var b=a.originalEvent.changedTouches[0];c="none",d=b.pageX,e=b.pageY,i=(new Date).getTime()}),nh(a,"tapmove",Ie.move),nh(a,"tapend",k=function(a){a.preventDefault();var b=a.originalEvent.changedTouches[0];f=b.pageX-d,g=b.pageY-e,h=(new Date).getTime()-i,n>=h&&(Math.abs(f)>=l&&Math.abs(g)<=m?c=0>f?"left":"right":Math.abs(g)>=l&&Math.abs(f)<=m&&(c=0>g?"up":"down")),o(c)});var p=a.id;p||(p=a.id=w());var q=Je[p];q||(q={start:[],end:[]}),q.start.push(j),q.end.push(k)};Ie.move=function(a){a.preventDefault()};var Je={};Ae.loadSlide=function(a){return a.params&&a.params.content!==c?ib:null};var Ke=function(){function d(){this.width=700,this.height=350,this.resizeOption={mode:0},this.imageWidth=25,this.imageHeight=25,this.hided=!0,this.originWidth=332,this.originHeight=340,this.container=this.createNode()}return d.getInstance=function(){return d._singleton||(d._singleton=new d),d._singleton},d.prototype.createNode=function(){var a=this,b="msg-",c=Hi("div").attr("id","leo-lightbox--msg"),d=this.lc=c.el("div").attr("id",b+"left").addClass(b+"part"),e=this.rc=c.el("div").attr("id",b+"right").addClass(b+"part"),f=this.tw=e.el("div").attr("id",b+"content"),g=(this.title=f.el("div").attr("id",b+"title"),this.bc=f.el("div").attr("id",b+"body-container")),h=(this.body=g.el("div").attr("id",b+"body").addClass("leo-scroll-content"),this.gallery=d.el("div").attr("id",b+"gallery")),i=(this.gl=h.el("i").addClass("leo-loading"),this.gi=h.el("img"),this.tc=d.el("div").attr("id",b+"thumbnail")),j=(this.thumbnail=i.el("div").addClass(b+"thumbnail-wrap"),this.origin=e.el("div").attr("id",b+"origin")),k=(this.oi=j.el("img"),this.ol=j.el("i").addClass("leo-loading"),this.mark=h.el("div").attr("id",b+"mark")),l=(this.mi=k.el("img"),this.mc=k.el("div"),this.gc=h.el("div").attr("id",b+"gallery-cover"),this.prevButton=Hi("div").addClass("msg-prev msg-button"));l.bind("tap",function(){a.prev()}).el("div"),d.insert(l,i);var m=this.nextButton=d.el("div").addClass("msg-next msg-button");return m.bind("tap",function(){a.next()}).el("div"),c},d.prototype.lighten=function(a,b){var c=cf.parse(a);return"rgba("+(c[0]+b)+","+(c[1]+b)+","+(c[2]+b)+","+c[3]+")"},d.prototype.config=function(d){function e(a){return function(b){b.preventDefault(),a()}}var f,g,h,i,j=this,k=d.params,l=12,m=44,n=0,o=this.origin,p=(this.mark,this.gc),q=270,r=Ge.getInstance(d),s=k.animations,t="out"===s[0].showType.toLowerCase;this.index=c,this.inEffect=s[t?1:0].animation,this.outEffect=s[t?0:1].animation;var u=this.container,v=k.style;u.style({backgroundColor:v.backgroundColor,opacity:v.opacity,backgroundImage:Nc(v.gradient.angle+"deg",[v.gradient.from,v.gradient.to])});var w=this.body,x=k.body;w.style({fontFamily:x.fontFamily,color:x.color}),w.html(x.content);var y=this.title,z=k.title;y.style({color:z.color,fontFamily:z.fontFamily}),y.text(z.content);var v={opacity:0,display:"block"};r.node.style(v),r.plugin_container.style(v),u.style(v),0===u.parent().length&&b.body.appendChild(u[0]);var A=k.more,B=this.tw,C="msg-",D=this.lighten;if(B.select("#"+C+"learn-more").remove(),"true"===A.type){var E=A.backgroundColor,F=A.color,G=B.el("div").attr("id",C+"learn-more").style({fontFamily:A.fontFamily,borderColor:D(E,-20),borderTopColor:D(E,-40)}).text(A.content),H={color:F,backgroundColor:E,backgroundImage:Nc("10deg",[D(E,50),D(E,-20)])};G.style(H),G.bind({mousedown:e(function(){G.style({backgroundColor:D(E,25)})}),tap:e(function(){var b=A.link;""!==b.trim()&&(b.indexOf("://")<0&&(b="http://"+k.more.link),a.open(b))}),mouseup:e(function(){G.style(H)}),mouseout:e(function(){G.style(H)}),mouseover:e(function(){G.style({backgroundColor:D(E,25),color:D(F,-50),backgroundImage:Nc("10deg",[D(E,80),E])})})})}var I=this.tc,J=this.gl,K=this.gi,L=this.gallery,M=this.srcs=k.image.content.split(";"),N=M.length;K[0].style.width="",K[0].style.height="",Yb(this.prevButton[0]),Yb(this.nextButton[0]),B[0].style.textAlign="",Xb(this.lc[0]);var O=this.rc[0].style;if(O.left="",O.width="",O.height="",O.marginLeft="",w[0].style.width="","true"===A.type&&(G[0].style.marginLeft=""),1===N)if(""===M[0])B.style("text-align","center"),Yb(this.lc[0]),this.rc.style({width:636,height:350,margin:"0px 32px"}),Rd(w[0],632),"true"===A.type&&G.style("margin","auto");else{Yb(I[0]),Ud(L[0],318),Ud(K[0],318),Yb(this.prevButton[0]),Yb(this.nextButton[0]),Xb(J[0]);var P=new Image;P.onload=P.onerror=function(){P.onload=P.onerror=null,Yb(J[0]);var a=Rd(K[0]),b=Ud(K[0]),c=Rd(L[0]),d=Ud(L[0]);K.style({left:Z((c-a)/2),top:Math.floor((d-b)/2),display:"block"}),p.style({width:a,height:b,left:Z((c-a)/2),top:Math.floor((d-b)/2)})},P.src=K[0].src=M[0]}else{Xb(I[0]),Ud(L[0],250),Ud(K[0],250);var Q=this.thumbnail;Q.text("");var R=function(a){return function(b){b.preventDefault(),j.skipTo(a)}},S=function(a){return function(){var b=this;b.onload=b.onerror=null;var c,d;b.width>b.height?(d=40,c=Z(b.width/b.height*d)):(c=40,d=Z(b.height/b.width*c));var e=Z((40-c)/2),f=Z((40-d)/2);bi(b,{width:c,height:d,marginLeft:e,marginTop:f}),a.append(b)}},T=Hi("div"),U=this.liArray=[],V=Hi("img");for(f=0;g=M[f];f++)g&&(T=T.clone(),T.bind("tap",R(f)),V=V.clone(),V.bind("load",S(T)),V.bind("error",S(T)),V.attr("src",M[f]),Q.append(T),U.push(T));for(this.nowIndex=[],Rd(Q[0],N*(m+l)),N*(m+l)-l-2>q?(I.style("cursor","all-scroll"),I[0].style.marginLeft="",Q[0].style.marginLeft="",Xb(this.prevButton[0]),Xb(this.nextButton[0]),h=Math.floor((q+l)/(m+l)),I.bind("mousedown",function(a){a.preventDefault(),Q.style("transition","none");{var c,d=a.pageX;parseFloat(Q.style("marginLeft"))}n=0,j.doc_mousemove&&qh(b,"mousemove",j.doc_mousemove),j.doc_mousemove=function(a){a.preventDefault();var b=event.x,e=parseFloat(Q.style("marginLeft"));for(i=n=e+b-d,n>2&&(b>d&&(n=e+.5),i=2),q-N*(m+l)+13>n&&(d>b&&(n=e-1.2),i=q-N*(m+l)+13),d=b,Q.style("marginLeft",Z(n)),c=Z(Math.abs(i)/(m+l)),c>N-h&&(c=N-h),0>c&&(c=0),j.nowIndex=[],f=0;h>f;f++)j.nowIndex.push(c+f)
},nh(b,"mousemove",j.doc_mousemove),j.doc_mouseup&&qh(b,"mouseup",j.doc_mouseup),nh(b,"mouseup",j.doc_mouseup=function(a){j.doc_mouseup&&qh(b,"mouseup",j.doc_mouseup),a.preventDefault(),n=Z(n),Q.style("transition","all .3s"),j.doc_mousemove&&qh(b,"mousemove",j.doc_mousemove),n>2&&Q.style("marginLeft","2px"),q-N*(m+l)+13>n&&Q.style("marginLeft",q-N*(m+l)+13)})})):5===N?(h=N,I.style("marginLeft",20)):(h=N,I.style("marginLeft",20),Q.style("marginLeft",Math.floor((q-(m+l)*N+l+2)/2))),f=0;h>f;f++)this.nowIndex.push(f);this.skipTo(0)}if(""!==M[0]){var W=this.lc,X=this.rc;"right"===k.image.position.toLowerCase()?(W.style("margin","16px 32px 0px 8px"),X.style("margin","0px 8px 0px 32px"),W.parent().insert(X,W),o.style("left","2px"),""!==M[0]&&G&&G.style("margin-left","168px")):(W[0].style.margin="",X[0].style.margin="",W.parent().insert(W,X),o[0].style.left="",G&&(G[0].style.marginLeft=""))}var Y=this.bc,Z=Math.ceil;Ud(Y[0],214-Ud(this.title[0])),w[0].style.top="",this.scroll&&this.scroll.destroy(),this.scroll=new He(Y[0],{y:{container:"msg-scroll-bar"}}),v={display:"none",opacity:""},u.style(v),r.node.style(v),r.plugin_container.style(v);var $="touchstart"in b,_=function(a){a.preventDefault(),j.hided&&(j.hided=!1,j.hd(a)),$&&(j.doc_mouseup&&qh(b,"touchend",j.doc_mouseup),j.doc_mouseup=function(){j.doc_mousemove&&qh(b,"mousemove",j.doc_mousemove),j.hided||(j.hided=!0,Xb(j.origin[0]),Xb(j.mark[0]),j.gc.style("opacity",.5))},nh(b,"touchend",j.doc_mouseup)),j.doc_mousemove&&qh(b,"mousemove",j.doc_mousemove),j.doc_mousemove=function(a){(a.target===j.gc[0]||a.target===j.mc[0])&&j.hd(a)},nh(b,"mousemove",j.doc_mousemove)};return this.gc.unbindAll("mouseover").unbindAll("touchstart"),this.gc.bind("mouseover",_),$&&this.gc.bind("touchstart",_),this},d.prototype.hd=function(a){var c=this,d=this.gi,e=this.mark,f=this.origin,g=this.mi,h=this.oi,i=this.gc,j=e[0].style,k=g[0].style,l=h[0].style,m=this.ol;Xb(m[0]),g[0].src=d[0].src,h[0].src=d[0].src;var n=new Image;n.onload=n.onerror=function(){n.onload=n.onerror=null,Yb(m[0]);var o,p,q,r,s,t,u,v,w,x,y=Dh(c.gallery[0]).top,z=Dh(c.gallery[0]).left,A=parseFloat(c.gi.style("left")),B=parseFloat(c.gi.style("top")),C=Math.floor,D=c.originWidth,E=c.originHeight,F=n.width||25,G=n.height||25,H=Rd(d[0]),I=Ud(d[0]),J=F/H,K=G/I;Rd(h[0],F),Ud(h[0],G),Rd(g[0],H),Ud(g[0],I),Rd(d[0],H),Ud(d[0],I),o=C(D/F*H),p=C(E/G*I),D>F?(o=H,h.style("marginLeft",(D-F)/2)):h.style("marginLeft",""),E>G?(p=I,h.style("marginTop",(E-G)/2)):h.style("marginTop",""),u=A+H-o-2,v=B+I-p-2,s=z+o/2,t=y+p/2,q=C(a.pageX-s),r=C(a.pageY-t),A>q&&(q=A),q>u&&(q=u),B>r&&(r=B),r>v&&(r=v),j.width=o+"px",j.height=p+"px",j.left=q+"px",j.top=r+"px",k.left=C(A-q)+"px",k.top=C(B-r)+"px",l.left=C((A-q)*J)+"px",l.top=C((B-r)*K)+"px",c.doc_mousemove&&qh(b,"mousemove",c.doc_mousemove),c.doc_mousemove=function(a){a.preventDefault();var d=a.target;q=C(a.pageX-s),r=C(a.pageY-t),A>q&&(q=A),q>u&&(q=u),B>r&&(r=B),r>v&&(r=v),q!==w&&(j.left=q+"px",k.left=C(A-q)+"px",l.left=C((A-q)*J)+"px",w=q),r!==x&&(j.top=r+"px",k.top=C(B-r)+"px",l.top=C((B-r)*K)+"px",x=r),d!==c.mc[0]&&d!==c.gc[0]&&(c.doc_mousemove&&qh(b,"mousemove",c.doc_mousemove),Yb(f[0]),Yb(e[0]),i.style("opacity",0))},nh(b,"mousemove",c.doc_mousemove)},n.src=d[0].src,Xb(f[0]),Xb(e[0]),i.style("opacity",.5)},d.prototype.hide=function(){this.gi[0].src="",this.doc_mousemove&&qh(b,"mousemove",this.doc_mousemove)},d.prototype.skipTo=function(a){{var b,d,e,f=this,g=this.srcs,h=Math.ceil,i=this.liArray,j=this.gi,k=this.thumbnail,l=this.srcs.length,m=this.gallery,n=270,o=this.gc,p=44,q=12;this.mark}if(a!==c&&!isNaN(a)&&(0>a&&(a=0),a>l-1&&(a=l-1),a!==this.index)){if(e=this.gi=j.clone(),e.style({width:"auto",height:"auto",display:"none"}),e[0].src=g[a],m.prepend(e),i[this.index||0].style("outline-color","rgb(145,145,145)"),i[a].style("outline-color","#317ee7"),this.nowIndex.indexOf(a)<0&&(a>this.index?(d=a===l-1?n-(a+1)*(p+q)+13:n-(a+1)*(p+q)-13,this.nowIndex.splice(0,1),this.nowIndex.push(a)):(d=0===a?2:-a*(p+q)+26,this.nowIndex.pop(),this.nowIndex.splice(0,0,a)),k.style("margin-left",d)),j[0].src){var r=fd.animate(j[0],"FadeOut",500);r.addEventListener("end",function(){j.remove()},this)}else j.remove();clearTimeout(this.glt),this.glt=setTimeout(function(){Xb(f.gl[0])},200),b=this.image=new Image,b.onload=b.onerror=function(){b.onload=b.onerror=null,clearTimeout(f.glt);var a=Rd(e[0]),c=Ud(e[0]);Yb(f.gl[0]),Xb(j[0]),e.style({width:a,height:c,left:h((Rd(m[0])-a)/2),top:Math.floor((Ud(m[0])-c)/2)}),o.style({width:a,height:c,left:h((Rd(m[0])-a)/2),top:Math.floor((Ud(m[0])-c)/2)}),e.style({opacity:1}),f.showAnimate&&f.showAnimate.destroy(),f.showAnimate=fd.animate(e[0],"FadeIn",500)},b.src=g[a],this.index=a}},d.prototype.next=function(){this.skipTo(this.index+1)},d.prototype.prev=function(){this.skipTo(this.index-1)},d}();Ae["message-box"]=function(a){var b=a.params,c=b.title,d=b.body;a.hint="Show Detail.",c.content=c.content.replace(/\/\^r\$\//g,"<br/>"),d.content=d.content.replace(/\/\^r\$\//g,"<br/>");var e=b.style;e.backgroundColor=cf.parseToString(e.backgroundColor);var f=e.gradient,g=cf.parse(f.from);g[3]=parseFloat(e.opacity),g=cf.parseToString(g);var h=cf.parse(f.to);h[3]=parseFloat(e.opacity),h=cf.parseToString(h),e.gradient={angle:f.angle,from:g,to:h};var c=b.title;c.color=cf.parseToString(c.color);var d=b.body;d.color=cf.parseToString(d.color);var i=b.more;return i.color=cf.parseToString(i.color),i.backgroundColor=cf.parseToString(i.backgroundColor),bf.isMobile?kb:jb};var Le;Ae.moveCamera=function(a){var b=Ye.scene;return a.params=gc({},a.params,{pageWidth:b.defaultProps.width,pageHeight:b.defaultProps.height}),lb},Ae.openUrl=function(a){var b=a.content;return(""!==b||"http://"!==b)&&(a.params=a.params||{},a.params.target=a.params.target||"_blank",a.hint=a.content=(/:\/\/.*$/i.test(b)?"":"http://")+b),mb};var Me=function(){function d(){this.width=700,this.height=350,this.resizeOption={mode:0},this.imageWidth=25,this.imageHeight=25,this.hided=!0,this.originWidth=332,this.originHeight=340,this.container=this.createNode()}return d.getInstance=function(){return d._singleton||(d._singleton=new d),d._singleton},d.prototype.createNode=function(){{var b=this,c="paypal-",d=Hi("div").attr("id","leo-lightbox--paypal"),e=this.lc=d.el("div").addClass(c+"part "+c+"left"),f=this.rc=d.el("div").addClass(c+"part "+c+"right"),g=this.gallery=e.el("div").addClass(c+"gallery"),h=(this.gl=g.el("i").addClass("leo-loading"),this.gi=g.el("img"),this.tc=e.el("div").addClass(c+"thumbnail")),i=(this.thumbnail=h.el("div"),this.origin=f.el("div").addClass(c+"origin")),j=(this.oi=i.el("img"),this.ol=i.el("i").addClass("leo-loading"),this.gc=g.el("div").addClass(c+"gallery-cover"),this.mark=g.el("div").addClass(c+"mark")),k=(this.mi=j.el("img"),this.mc=j.el("div"),this.tw=f.el("div").addClass(c+"content")),l=(this.productName=k.el("span").addClass(c+"title"),k.el("p").addClass(c+"price-wrap").text("Pirce: "));this.productPrice=l.el("span")}k.el("p").addClass(c+"in-stock").text("In stock.");{var m=this.bc=k.el("div").addClass(c+"body-container");this.body=m.el("div").addClass(c+"body").addClass("leo-scroll-content"),k.el("label").text("Quantity:").attr("for",c+"quantity"),this.input=k.el("input").attr({type:"text",value:1,id:c+"quantity"}),this.span=k.el("span").attr("class",c+"msg").text("Not enough in stock.")}k.el("br");var n=(this.shippingCost=k.el("span").addClass(c+"shipping-cost"),this.button=k.el("div").addClass(c+"buy"),k.el("div").addClass(c+"share")),o=["Facebook","Twitter","Google","More","Contact seller"],p=["https://www.facebook.com/sharer/sharer.php?u=","https://www.twitter.com/share?url=","https://plus.google.com/share?url=","http://www.addthis.com/bookmark.php?v=15&winname=addthis&s=more&url="];["fb","tw","gg","other","email"].forEach(function(d,e){var f=n.el("div").addClass(c+d).attr({title:o[e],"data-index":e}).bind("tap",function(){"4"!==this.getAttribute("data-index")&&a.open(p[this.getAttribute("data-index")]+a.location.href)});4===e&&(b.mail=f)});var q=this.prevButton=Hi("div").addClass("paypal-prev paypal-button");q.style("marginLeft","-2px"),q.bind("tap",function(){b.prev()}).el("div"),e.insert(q,h);var r=this.nextButton=e.el("div").addClass("paypal-next paypal-button");return r.style("marginLeft","2px"),r.bind("tap",function(){b.next()}).el("div"),d},d.prototype.lighten=function(a,b){var c=cf.parse(a);return"rgba("+(c[0]+b)+","+(c[1]+b)+","+(c[2]+b)+","+c[0]+")"},d.prototype.config=function(d){var e=this,f=d.params;this.mail.unbindAll("tap").bind("tap",function(){a.open("mailto:"+f.clientEmail+"?subject="+f.productName,"emailWindow")});var g;"$"===f.currency?g="USD":"£"===f.currency?g="GBP":"€"===f.currency?g="EUR":"CHF"===f.currency&&(g="CHF"),this.productName.text(f.productName),this.productPrice.text(f.currency+f.price),this.shippingCost.html("Shipping cost "+("included"===f.shippingCost.toLowerCase()?"included.":"not included.")+"<br>Delivery time: "+f.deliveryTime+(parseFloat(f.deliveryTime)<=1?" day":" days")+".<br>");var h=this.input,i=this.span;h.unbindAll("keyup"),h.bind("keyup",function(){var a=+this.value;a||0===a?a>parseInt(f.quantity,10)?(h.style("border-color","red"),i.text("Not enough in stock."),Xb(i[0])):(Yb(i[0]),h.style("border-color","rgb(177,177,177)")):(h.style("border-color","red"),i.text("Not a number."),Xb(i[0]))}),this.button.unbindAll("tap").bind("tap",function(){var b=+h.val();(b||0===b)&&b<=parseInt(f.quantity,10)&&a.open("http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business="+f.clientEmail+"&item_name="+f.productName+"&amount="+f.price+"&currency_code="+g+"&quantity="+b+"&notify_url="+a.location.href)});var j,k,l,m,n=12,o=44,p=0,q=(this.origin,this.mark,this.gc),r=270;this.index=c;var s=this.container;this.body.html(f.productDescription);var t=Ge.getInstance(d),u={opacity:0,display:"block"};t.node.style(u),t.plugin_container.style(u),s.style(u),0===s.parent().length&&b.body.appendChild(s[0]);{var v=(f.more,this.tw);this.lighten}v.style({marginTop:(350-Ud(v[0]))/2+5});var w,x=this.tc,y=this.thumbnail,z=this.gl,A=this.gi,B=this.gallery,C=this.srcs=f.imageURL.split(";"),D=C.length,E=Math.ceil;if(Yb(this.prevButton[0]),Yb(this.nextButton[0]),A[0].style.width="",A[0].style.height="",1===D||0===D)w=new Image,Yb(x[0]),Ud(B[0],318),A.style("maxHeight",318),B.prepend(A),Xb(z[0]),w.onload=w.onerror=function(){w.onload=w.onerror=null;var a=Rd(A[0]),b=Ud(A[0]);Yb(z[0]),A.style({left:E((Rd(B[0])-a)/2),top:Math.floor((Ud(B[0])-b)/2),display:"block"}),q.style({width:a,height:b,left:E((Rd(B[0])-a)/2),top:Math.floor((Ud(B[0])-b)/2)})},w.src=A[0].src=C[0];else{Ud(B[0],""),A.style("maxHeight",250),Xb(B[0]),Xb(x[0]);var F,G,H=function(a){return function(b){b.preventDefault(),e.skipTo(a)}},I=[],J=this.liArray=[];for(y.text(""),j=0;k=C[j];j++)k&&""!==k&&(F=b.createElement("div"),F.className="paypal-thumbnail-li",G=b.createElement("img"),G.className="paypal-thumbnail-img",G.style.opacity="0",G.src=k,F.appendChild(G),y.append(F),I.push(G),J.push(F),nh(F,"tap",H(j)));for(this.nowIndex=[],Rd(y[0],D*(o+n)),D*(o+n)-n-2>r?(x.style("cursor","all-scroll"),x[0].style.marginLeft="",y[0].style.marginLeft="",Xb(this.prevButton[0]),Xb(this.nextButton[0]),l=Math.floor((r+n)/(o+n)),x.bind("tapstart",function(a){a.preventDefault(),y.style("transition","none");{var c,d=a.pageX;parseFloat(y.style("marginLeft"))}p=0,e.doc_mousemove&&qh(b,"mousemove",e.doc_mousemove),e.doc_mousemove=function(a){a.preventDefault();var b=event.x,f=parseFloat(y.style("marginLeft"));for(m=p=f+b-d,p>2&&(b>d&&(p=f+.5),m=2),r-D*(o+n)+13>p&&(d>b&&(p=f-1.2),m=r-D*(o+n)+13),d=b,y.style("marginLeft",E(p)),c=E(Math.abs(m)/(o+n)),c>D-l&&(c=D-l),0>c&&(c=0),e.nowIndex=[],j=0;l>j;j++)e.nowIndex.push(c+j)},nh(b,"tapmove",e.doc_mousemove),nh(b,"tapend",function(a){a.preventDefault(),p=E(p),y.style("transition","all .3s"),e.doc_mousemove&&qh(b,"mousemove",e.doc_mousemove),p>2&&y.style("marginLeft","2px"),r-D*(o+n)+13>p&&y.style("marginLeft",r-D*(o+n)+13)})})):5===D?(l=D,x.style("marginLeft",20)):(l=D,x.style("marginLeft",20),y.style("marginLeft",Math.floor((r-(o+n)*D+n+2)/2))),j=0;l>j;j++)this.nowIndex.push(j);this.skipTo(0),I.forEach(function(a){var b=new Image;b.onload=b.onerror=function(){bi(a,"opacity",1),b.width>b.height?bi(a,{maxWidth:"auto",maxHeight:"40px"}):bi(a,{maxWidth:"40px",maxHeight:"auto"}),bi(a,{left:E((40-Rd(a))/2),top:E((40-Ud(a))/2)})},b.src=a.src})}this.bc;this.scroll&&this.scroll.destroy(),this.scroll=new He(this.bc[0],{y:{container:"paypal-scroll-bar"}}),u={display:"none",opacity:""},s.style(u),t.node.style(u),t.plugin_container.style(u);var K="touchstart"in b,L=function(a){a.preventDefault(),e.hided&&(e.hided=!1,e.hd(a)),K&&(e.doc_mouseup&&qh(b,"touchend",e.doc_mouseup),e.doc_mouseup=function(){e.doc_mousemove&&qh(b,"mousemove",e.doc_mousemove),e.hided||(e.hided=!0,Xb(e.origin[0]),Xb(e.mark[0]),e.gc.style("opacity",.5))},nh(b,"touchend",e.doc_mouseup)),e.doc_mousemove&&qh(b,"mousemove",e.doc_mousemove),e.doc_mousemove=function(a){(a.target===e.gc[0]||a.target===e.mc[0])&&e.hd(a)},nh(b,"mousemove",e.doc_mousemove)};return this.gc.unbindAll("mouseover").unbindAll("touchstart"),this.gc.bind("mouseover",L),K&&this.gc.bind("touchstart",L),this},d.prototype.hd=function(a){var c=this,d=this.gi,e=this.mark,f=this.origin,g=this.mi,h=this.oi,i=this.gc,j=e[0].style,k=g[0].style,l=h[0].style,m=this.ol;Xb(m[0]),g[0].src=d[0].src,h[0].src=d[0].src;var n=new Image;n.onload=n.onerror=function(){n.onload=n.onerror=null,Yb(m[0]);var o,p,q,r,s,t,u,v,w,x,y=Dh(c.gallery[0]).top,z=Dh(c.gallery[0]).left,A=parseFloat(c.gi.style("left")),B=parseFloat(c.gi.style("top")),C=Math.floor,D=c.originWidth,E=c.originHeight,F=n.width||25,G=n.height||25,H=Rd(d[0]),I=Ud(d[0]),J=F/H,K=G/I;Rd(h[0],F),Ud(h[0],G),Rd(g[0],H),Ud(g[0],I),Rd(d[0],H),Ud(d[0],I),o=C(D/F*H),p=C(E/G*I),D>F?(o=H,h.style("left",(D-F)/2)):h.style("left",""),E>G?(p=I,h.style("top",(E-G)/2)):h.style("top",""),u=A+H-o-2,v=B+I-p-2,s=z+o/2,t=y+p/2,q=C(a.pageX-s),r=C(a.pageY-t),A>q&&(q=A),q>u&&(q=u),B>r&&(r=B),r>v&&(r=v),j.width=o+"px",j.height=p+"px",j.left=q+"px",j.top=r+"px",k.left=C(A-q)+"px",k.top=C(B-r)+"px",l.left=C((A-q)*J)+"px",l.top=C((B-r)*K)+"px",c.doc_mousemove&&qh(b,"mousemove",c.doc_mousemove),c.doc_mousemove=function(a){a.preventDefault();var d=a.target;q=C(a.pageX-s),r=C(a.pageY-t),A>q&&(q=A),q>u&&(q=u),B>r&&(r=B),r>v&&(r=v),q!==w&&(j.left=q+"px",k.left=C(A-q)+"px",l.left=C((A-q)*J)+"px",w=q),r!==x&&(j.top=r+"px",k.top=C(B-r)+"px",l.top=C((B-r)*K)+"px",x=r),d!==c.mc[0]&&d!==c.mi[0]&&d!==c.gc[0]&&(c.doc_mousemove&&qh(b,"mousemove",c.doc_mousemove),Yb(f[0]),Yb(e[0]),i.style("opacity",0))},nh(b,"mousemove",c.doc_mousemove)},n.src=d[0].src,Xb(f[0]),Xb(e[0]),i.style("opacity",.5)},d.prototype.hide=function(){this.doc_mousemove&&qh(b,"mousemove",this.doc_mousemove)},d.prototype.skipTo=function(a){{var b,d,e,f=this,g=this.srcs,h=Math.ceil,i=this.liArray,j=this.gi,k=this.thumbnail,l=this.srcs.length,m=this.gallery,n=270,o=this.gc,p=44,q=12;this.mark}if(a!==c&&!isNaN(a)&&(0>a&&(a=0),a>l-1&&(a=l-1),a!==this.index)){if(e=this.gi=j.clone(),e.style({width:"auto",height:"auto",display:"none"}),e[0].src=g[a],m.prepend(e),bi(i[this.index||0],"outline-color","rgb(145,145,145)"),bi(i[a],"outline-color","#317ee7"),this.nowIndex.indexOf(a)<0&&(a>this.index?(d=a===l-1?n-(a+1)*(p+q)+13:n-(a+1)*(p+q)-13,this.nowIndex.splice(0,1),this.nowIndex.push(a)):(d=0===a?2:-a*(p+q)+26,this.nowIndex.pop(),this.nowIndex.splice(0,0,a)),k.style("margin-left",d)),j[0].src){var r=fd.animate(j[0],"FadeOut",500);r.addEventListener("end",function(){j.remove()},this)}else j.remove();clearTimeout(this.glt),this.glt=setTimeout(function(){Xb(f.gl[0])},200),b=this.image=new Image,b.onload=b.onerror=function(){b.onload=b.onerror=null,clearTimeout(f.glt);var a=Rd(e[0]),c=Ud(e[0]);Yb(f.gl[0]),Xb(j[0]),e.style({width:a,height:c,left:h((Rd(m[0])-a)/2),top:Math.floor((Ud(m[0])-c)/2)}),o.style({width:a,height:c,left:h((Rd(m[0])-a)/2),top:Math.floor((Ud(m[0])-c)/2)}),e.style({opacity:1}),f.showAnimate&&f.showAnimate.destroy(),f.showAnimate=fd.animate(e[0],"FadeIn",500)},b.src=g[a],this.index=a}},d.prototype.next=function(){this.skipTo(this.index+1)},d.prototype.prev=function(){this.skipTo(this.index-1)},d}();Ae["paypal-box"]=function(a){return a.hint="Pop Up Paypal Box.",a.params.productDescription=a.params.productDescription.replace(/\/\^r\$\//g,"<br>"),bf.isMobile?ob:nb};var Ne,Oe=function(c){function e(){var d=this;c.call(this),this.hided=!0,this.animations=[];var f=b.createElement("div");f.className="leo-phone-msg-box-bg",f.innerHTML=e.html,this.lightbox=f;var g=this.node=f.childNodes[0],h=this.slideContainer=g.querySelector(".leo-phone-msg-box--slide"),i=this.slide=new Hf;i.addEventListener("skip",function(a){this.node.querySelector(".slide--index span").innerHTML=a.data.index},this),i.borderWidth=0,i.taponly=!0,i.dom.style.display="block",nh(g.querySelector(".menu--return-btn"),"tap",function(){d.hide()}),nh(f,"tap",function(){d.hide()}),nh(g.querySelector(".menu--more-btn"),"tap",function(){d.link&&a.open(d.link)}),nh(a,"resize",function(){d.hided||d.resize()});var j=this.audio=new ui;nh(g.querySelector(".slide--replay"),"tap",function(){d.audio.replay()});var k=g.querySelectorAll(".slide--btn")[1];nh(k,"tap",function(){d.audio.playPause()}),j.addEventListener("play",function(){Gi(k).removeClass("slide--muted").addClass("slide--unmuted")},this),j.addEventListener("pause",function(){Gi(k).removeClass("slide--unmuted").addClass("slide--muted")},this),h.appendChild(i.dom),b.body.appendChild(f),b.body.appendChild(g)}return dd(e,c),e.prototype.config=function(a){var b=a.params;this.urls=b.image.content,this.title=b.title,this.body=b.body,this.button=b.more,this.background=b.style;var c=this.node;""===a.audio.url?(this.hasAudio=!1,c.querySelector(".slide--replay").style.display="none",c.querySelectorAll(".slide--btn")[1].style.display="none"):(this.hasAudio=!0,this.audio.src=a.audio.url,this.audio.volume=a.audio.volume,this.audio.load(),c.querySelector(".slide--replay").style.display="block",c.querySelectorAll(".slide--btn")[1].style.display="block");var d=b.animations,e="out"===d[0].showType.toLowerCase;this.inAnimation=d[e?1:0].animation,this.outAnimation=d[e?0:1].animation},e.prototype.resize=function(){var a=this.lightbox.offsetWidth,b=this.lightbox.offsetHeight,c=a-40;c=c>280?280:c;var d=b-40;d=d>500?500:d,bi(this.node,{width:c,height:d});var e=this.slideContainer,f=c-20,g=f;bi(e,{width:f,height:g}),this.slide.width=f,this.slide.height=g,this.node.querySelector(".leo-phone-msg-box--scroll").style.height=d-40+"px"},e.prototype.show=function(){this.hided=!1,this.destroyAnimations(),this.animations.push(fd.animate(this.lightbox,"FadeIn",300,{easing:"linear"})),this.animations.push(fd.animate(this.node,this.inAnimation,300,{easing:"easeOutBack"})),this.lightbox.style.display="block",this.resize(),this.hasAudio&&this.audio.replay()},e.prototype.hide=function(){this.destroyAnimations(),this.animations.push(fd.animate(this.lightbox,"FadeOut",300,{easing:"linear"})),this.animations.push(fd.animate(this.node,this.outAnimation,300,{easing:"easeOutQuad"})),this.hided=!0,this.audio.pause()},e.prototype.destroyAnimations=function(){var a,b=0,c=this.animations;for(c.length;length>b;b++)(a=c[b])&&a.destroy()},d(e.prototype,"urls",{set:function(a){this.slide.url=a,this.node.querySelector(".slide--index span:first-child").innerHTML=1,this.node.querySelector(".slide--index span:last-child").innerHTML="/"+this.slide.urlArray.length},enumerable:!0,configurable:!0}),d(e.prototype,"title",{set:function(a){var b=this.node.querySelector(".content--title");b.innerHTML=a.content,b.style.fontFamily=a.fontFamily,b.style.color=a.color},enumerable:!0,configurable:!0}),d(e.prototype,"body",{set:function(a){var b=this.node.querySelector(".content--body");b.innerHTML=a.content,b.style.fontFamily=a.fontFamily,b.style.color=a.color},enumerable:!0,configurable:!0}),d(e.prototype,"link",{get:function(){return this._link},enumerable:!0,configurable:!0}),d(e.prototype,"button",{set:function(a){var b=this.node.querySelector(".menu--return-btn"),c=this.node.querySelector(".menu--more-btn");b.style.color=c.style.color=a.color,b.style.backgroundColor=c.style.backgroundColor=a.backgroundColor,b.style.fontFamily=c.style.fontFamily=a.fontFamily,a.backgroundColor&&(b.style.borderColor=c.style.borderColor=cf.darker(a.backgroundColor,.3)),c.innerHTML=a.content;var d=a.link;""!==d.replace(/s+/g,"")&&(d.indexOf("://")<0&&(d="http://"+d),this._link=d,c.style.display="true"===a.type?"block":"none")},enumerable:!0,configurable:!0}),d(e.prototype,"background",{set:function(a){var b=this.node;b.style.backgroundImage=Nc(a.gradient.angle+"deg",[a.gradient.from,a.gradient.to])},enumerable:!0,configurable:!0}),e.html='<div class="leo-phone-msg-box"><div class="leo-phone-msg-box--menu"><span class="menu--btn menu--return-btn">Close</span><span class="menu--btn menu--more-btn">More</span><div class="slide--btn slide--replay"><div></div></div><div class="slide--btn slide--muted"><div></div></div><div class="slide--btn slide--index"><span>1</span><span>/6</span></div></div><div class="leo-phone-msg-box--scroll"><div class="leo-phone-msg-box--slide"></div><div class="leo-phone-msg-box--content"><p class="content--title"></p><hr class="content--separator"><p class="content--body"></p></div></div></div>',e}(cd),Pe=function(b){function c(){var c=this;b.call(this);{var d="paypal-",e=this.node.querySelector(".leo-phone-msg-box--content"),f=Gi(e).html(""),g=(this.productName=f.el("span").addClass(d+"title"),f.el("p").addClass(d+"price-wrap").text("Pirce:"));this.productPrice=g.el("span")}f.el("p").addClass(d+"in-stock").text("In stock.");var h=(this.productDescription=f.el("div").addClass(d+"body"),f.el("label").text("Quantity:").attr("for",d+"quantity"),this.input=f.el("input").attr({type:"text",value:1,id:d+"quantity"}).bind("keyup",function(){var a=+h.val();a||0===a?a>parseInt(c.params.quantity,10)?(h.style("border-color","red"),i.text("Not enough in stock."),Xb(i[0])):(Yb(i[0]),h.style("border-color","rgb(177,177,177)")):(h.style("border-color","red"),i.text("Not a number."),Xb(i[0]))})),i=this.span=f.el("span").attr("class",d+"msg").text("Not enough in stock.");f.el("br");var j=(this.shippingCost=f.el("span").addClass(d+"shipping-cost"),f.el("div").addClass(d+"share")),k=["Facebook","Twitter","Google","More","Contact seller"],l=["https://www.facebook.com/sharer/sharer.php?u=","https://www.twitter.com/share?url=","https://plus.google.com/share?url=","http://www.addthis.com/bookmark.php?v=15&winname=addthis&s=more&url="];["fb","tw","gg","other","email"].forEach(function(b,e){var f=j.el("div").addClass(d+b).attr({title:k[e],"data-index":e});4===e?f.bind("tap",function(){a.open("mailto:"+c.params.clientEmail+"?subject="+c.params.productName,"emailWindow")}):f.bind("tap",function(){a.open(l[this.getAttribute("data-index")]+a.location.href)})})}return dd(c,b),c.prototype.config=function(a){var b=this.params=a.params;this.urls=b.imageURL,this.button={content:"PayPal",fontFamily:"",link:""},this.background={gradient:{angle:0,from:"#fff",to:"#fff"}},this.productPrice.text(b.currency+b.price),this.productName.html(b.productName),this.productDescription.html(b.productDescription),this.shippingCost.html("Shipping cost "+("included"===b.shippingCost.toLowerCase()?"included.":"not included.")+"<br>Delivery time: "+b.deliveryTime+(parseFloat(b.deliveryTime)<=1?" day":" days")+".<br>");var c=this.node;""===a.audio.url?(this.hasAudio=!1,c.querySelector(".slide--replay").style.display="none",c.querySelectorAll(".slide--btn")[1].style.display="none"):(this.hasAudio=!0,this.audio.src=a.audio.url,this.audio.volume=a.audio.volume,this.audio.load(),c.querySelector(".slide--replay").style.display="block",c.querySelectorAll(".slide--btn")[1].style.display="block"),this.inAnimation="MoveInFromLeft",this.outAnimation="ExtendOutToRight"},d(c.prototype,"link",{get:function(){var b,c=this.params,d=+this.input.val();return"$"===c.currency?b="USD":"£"===c.currency?b="GBP":"€"===c.currency?b="EUR":"CHF"===c.currency&&(b="CHF"),"http://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business="+c.clientEmail+"&item_name="+c.productName+"&amount="+c.price+"&currency_code="+b+"&quantity="+d+"&notify_url="+a.location.href},enumerable:!0,configurable:!0}),c}(Oe);Ae.playAction=function(a,b){var c=a.params&&a.params.params;if(c&&c.actionName&&"sprite"===b.type){c={animation:c.actionName,duration:a.params.duration,userDefined:1,overwritten:!0,params:{scaleX:c.scaleX||1,scaleY:c.scaleY||1,text:c.text,sound:c.sound}};var d=Ab(c,b.type);return function(){te.run(this,d)}}},Ae.playAnimation=function(a,b){var c=Ab(gc({name:a.params.content},a.params),b.type);return function(){te.run(this,c)}};var Qe=function(){function a(c,d){if(this.target=d,this.__leo_guid__=w(),!(this instanceof a))return new a(c,d);var e=d.__leo_guid__,f=a.hook[e];if(f)return f.replay(),f;a.hook[e]=this,this.bindAppEvents(d);var g=c.content,h=this.audio=b.createElement("audio");g&&(h.setAttribute("preload","metadata"),h.setAttribute("src",g),h.play()),c.audio&&(h.volume=c.audio.volume)}return a.prototype.bindAppEvents=function(){var a,b=this,c=this.target.stage,d=c.context.getInnerVariable("__app__");d.addEventListener("currentChange",a=function(){-1===d.current&&(d.removeEventListener("currentChange",a,null),b.destroy())},null)},a.prototype.replay=function(){this.audio.currentTime=0,this.audio.play()},a.prototype.destroy=function(){this.audio.removeAttribute("autoplay"),this.audio.pause(),this.audio=null;var b=this.target.__leo_guid__;a.hook[b]=null,delete a.hook[b],this.target=null},a.hook={},a}(),Re=function(){function a(){this.width=308,this.height=120,this.resizeOption={mode:0},this.audio=new ui,this.audio.addEventListener("ended",function(){this.audio.pause(),this.audio.currentTime=0},this),/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?(Yb(Ge.getInstance().close_button[0]),this.width=98,this.height=98,this.player=new Be(this.audio)):(this.width=308,this.height=120,this.player=new Ce(this.audio)),this.container=this.player.node}return a.prototype.config=function(a){var b=this.audio,c=a.audio;if(c){var d=c.volume;(d||0===d)&&(b.volume=d)}var e=a.content;b.src=e,b.play()},a.prototype.hide=function(){Xb(Ge.getInstance().close_button[0]),this.audio.pause()},a.getInstance=function(b){return a._singleton||(a._singleton=new a(b)),a._singleton},a}();Ae["audio-box"]=function(a){var b=a.params;return b&&1!=b.popUp?(a.hint="Play Sound.",pb):(a.hint="Pop Up Audio.",qb)};var Se=function(){function a(){this.width=800,this.height=500,this.close_style={right:-7,top:-19},this.resizeOption={mode:1,delw:20,delh:20,minw:0,minh:0},this.__leo_guid__=w(),this.container=this.createNode()}return a.getInstance=function(){return a._singleton||(a._singleton=new a),a._singleton},a.prototype.createNode=function(){{var a=Hi("div").attr("id","leo-lightbox--video");a.el("div").html("Video")}return a},d(a.prototype,"video",{get:function(){var a=this._video;return a?a:this._video=this.container.el("video").attr({controls:!0,preload:"metadata",name:"media"})},enumerable:!0,configurable:!0}),d(a.prototype,"iframe",{get:function(){var a=this._iframe;return a||(a=this.container.el("iframe").attr({webkitAllowFullScreen:!0,mozallowfullscreen:!0,allowFullScrren:!0,allowtransparency:!0})),this._iframe=a},enumerable:!0,configurable:!0}),a.prototype.config=function(a){var b=this;this.action=a;var c=(a.volume,a.content),d=a.params,e=this.iframe,f=d.customSize,g=d.autoplay||d.autoPlay,h=d.target.toLowerCase();if(f&&(this.width=d.customWidth,this.height=d.customHeight),"html5"===h){var i=this.video;Xb(i[0]),e.remove();var j=i.attr("src");j===c||(i.bind("canplay",function(){i.unbindAll("canplay"),b.onload(!0)}),i.bind("error",function(){i.unbindAll("error"),b.onload(!1)}),i.attr("src",c)),g&&i[0].play()}else this.container.append(e),Yb(i[0]),"youtube"===h&&(c="http://www.youtube.com/embed/"+c+"?autoplay="+(g?1:0)+"&wmode=transparent"),"vimeo"===h&&(c="http://player.vimeo.com/video/"+c+"?autoplay="+(g?1:0)+"&wmode=transparent&portrait=0"),e.attr("src",c);return this},a.prototype.onload=function(){{var a=this.video[0],b=this.action,c=b.params;c.autoplay||c.autoPlay}c.customSize||(this.width=a.videoWidth,this.height=a.videoHeight),Ge.getInstance().resize(!0)},a.prototype.hide=function(){var a=this.video[0];a.pause(),Yb(a),this.iframe.remove()},a}();Ae["video-box"]=function(a){a.hint="Play Video.";var b=/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return b?rb:sb},Ae.resetCamera=function(){return tb};var Te={},Ue=g(["when","type","action","target","params"]),Ve={click:"tap",doubleclick:"doubletap",mousedown:"tapstart",mouseup:"tapend"},We={motion:function(a,b){a.name="Motion",a.params=Hb(a.params,b)},"spotlight(move to)":function(a,b){a.name="SpotLight(Move to)",a.params=Hb(a.params,b)}},Xe={"transform.rotation":0,"transform.scaleX":1,"transform.scaleY":1,"transform.skewX":0,"transform.skewY":0,"transform.tx":0,"transform.ty":0};Te.camera=function(a){var b=Ye,c=b.option;c.action?Array.isArray(c.action)||(c.action=[c.action]):c.action=[];for(var d=c.action,e=a.animations||[],f=-1,g=e.length;++f<g;){var h=e[f],i=null;if(h){var j=h.animation.toLowerCase(),k=h.params;if("camera(move to)"===j)j="moveCamera",i={width:k.width,height:k.height,left:k.left,top:k.top,duration:+h.duration||0};else{if("back to center"!==j)continue;j="resetCamera",i={duration:+h.duration||0}}d.push({when:"timer",time:+h.start||0,action:j,params:i})}}},Te.timer=function(a,b){var c=Ye,d=c.option;d.action?Array.isArray(d.action)||(d.action=[d.action]):d.action=[];for(var e=d.action,f=a.elements,g=-1,h=f.length;++g<h;){var i=f[g];if(i){i.template.visible=0;var j=i.template.type;/sound|video/i.test(j)&&(i.template.autoPlay=1),b.push(i);var k=i.template;e.push({when:"timer",time:+k.startTime,target:k.name,action:"changeVisible",params:{visible:!0}});var l=+k.startTime+ +k.duration,m=Db(i.animations);m>=0&&e.push({when:"timer",time:l-m,target:k.name,action:"changeVisible",params:{visible:!1}})}}};var Ye=null,Ze={font:function(a,b,c,d){for(var e in a){var f=d.get(b,e);if(f&&"!"!==f)if(c[f]=a[e],"color"===e)if("number"==typeof a[e]){var g=cf.parse(a[e]);g[3]=1,c[f]=cf.parseToString(g)}else c[f]=cf.parseToString(a[e]);else"backgroundColor"===e&&(c[f]=cf.parseToString(a[e]))}},shadow:function(a,b,c,d){var e=d.get(b,"shadow");e&&"!"!==e&&(c.shadow=Oc(a.offsetX,a.offsetY,a.blur,cf.parseToString(a.color)))},gradualColors:function(a,b,c,d){var e=d.get(b,"gradient");if(e&&"!"!==e){for(var f=a.split(";"),g="",h=0,i=-1,j=f.length;++i<j;){var k=cf.parseToString(f[i]);(!i||i>0&&f[i]!==f[i-1])&&(g+=k+";",++h)}g&&(1>=h&&(g+=g),c.gradient=g.slice(0,-1))}}},$e={arial:[.1,2,1],tahoma:[.2],"arial black":[.4],"arial narrow":[.1,2],verdana:[.2],georgia:[.1,2],"times new roman":[.2,-2],"trebuchet ms":[.25],impact:[.25],"comic sans ms":[.4,0,1],"lucida console":[0],garamond:[.12],"palatino linotype":[.34,0,1],symbol:[.23],"bookman old style":[.21],"courier new":[0,3],"ms sans serif":function(a){var b=13;return a>=31?b=37:a>=24?b=29:a>=18?b=24:a>=16?b=20:a>=13&&(b=16),b}},_e={image:function(a,b){a.src=a.defaultProps.src=b.template.content,a.defaultProps["filter.reset"]=c}};_e["html5-video"]=_e["vimeo-video"]=function(a,b){a.src=a.defaultProps.src=b.template.content,a.autoplay=!!b.template.autoPlay},_e.sound=function(a,b){a.src=a.defaultProps.src=b.template.content,a.volume=a.defaultProps.volume=b.template.volume,a.autoplay=a.defaultProps.volume=null!=b.template.autoPlay?!!b.template.autoPlay:!0,a.loop=a.defaultProps.loop=!!b.template.loop},_e["youtube-video"]=function(a,b){var c=b.template,d=c.videoType||"id",e=c.videoStart||"0";if("id"===d.toLowerCase()){a.src=a.defaultProps.src=c.content,a.autoplay=!!c.autoPlay,a.loop=!!c.loop;var f,g=e.split(":"),h=0;(f=parseInt(g[0]))&&(h=3600*f),(f=parseInt(g[1]))&&(h+=60*f),(f=parseInt(g[2]))&&(h+=f),a.startTime=h}else a.type="htmlembedbox",a.embedCode=a.defaultProps.embedCode=b.template.codeContent
},_e.line=_e.arrowline=_e.dottedline=function(a,b){b.template.content.split(";").forEach(function(b,c){a[(c%2?"y":"x")+(2>c?"1":"2")]=+b})},_e.roundedrectangulardialogbox=_e.rectangulardialogbox=_e.ovaldialogbox=_e.clouddialogbox=function(a,b){var c=b.template.params.split(";");a.handlerX=+c[2],a.handlerY=+c[3]},_e.paypaldiscount=function(a,b){a.textContent=a.defaultProps.src=b.style.font.paypalPrice},_e.paypalprice=function(a,b){a.textContent=b.template.content,a.price=b.style.font.paypalPrice},_e.paypalproductbox=function(a,b){a.urls=a.defaultProps.urls=b.template.content},_e.paypalstar=function(a,b){a.rate=b.template.content,a.src=b.style.backgroundImage},_e.embedweb=function(a,b){a.url=a.defaultProps.url=b.template.content},_e.slide=function(a,b){var c=b.template,d=c.slideType.toLowerCase();"default"!==d?(a.type=d,_e[d](a,b)):(a.url=a.defaultProps.url=c.content,a.autoPlay=!!c.autoPlay,a.interval=c.interval)},_e.sprite=function(a,b){var c=b.sprite;a.srcset=[c.url],a.initialActionName=c.initialAnimationName;for(var d=a.frames=[],e=c.row,f=c.column,g=c.cellWidth,h=c.cellHeight,i=-1;++i<e;)for(var j=-1;++j<f;)d.push([0,j*g,i*h,g,h]);for(var k=c.animations||[],l=a.actions={},m=a.actionConfigs={},i=-1,n=k.length;++i<n;){{var o=k[i];o.content}l[o.name]=o.content.split(",").map(function(a){var b=a.split("-");return(+b[0]-1)*f+(+b[1]-1)}),m[o.name]={frameRate:o.frameRate,repeat:o.repeat&&-1!==o.repeat?o.repeat-1:o.repeat||0}}if(!a.initialActionName&&a.animations)for(var i=-1,n=a.animations.length;++i<n&&!(a.animations[i].userDefined&&a.animations[i].params&&(a.initialActionName=a.animations[i].params.action)););for(var p,q,r,s=[],i=0,t=a.animations,u=t.length;u>i;i++)(p=t[i].params)&&(q=p.sound)&&(r=q.src)&&s.push(r);a.soundURLs=s},_e.dragslide=_e.zoomslide=_e.album=_e.flipslide=_e.fadeslide=function(a,b){var c=b.template;a.url=a.defaultProps.url=c.content,a.autoPlay=c.autoPlay,a.interval=+c.interval},_e.soundplayer=function(a,b){var c=b.template;a.autoPlay=c.autoPlay,a.src=a.defaultProps.src=c.content,a.volume=a.defaultProps.volume=c.volume,a.playerType=c.soundPlayerType},_e.twittertimeline=function(a,b){var c=b.template;a.transparent=c.transparent,a.theme=c.theme,a.screenName=c.userName,a.screenType=c.screenType,a.customTimelineID=c.customTimelineID,a.listSlug=c.listSlug},_e.movingbackground=function(a,b){var c=b.template;a.backgroundImage=c.content||"",a.speed=a.defaultProps.speed=c.speed;var d=c.direction;d=90===d?"top":0===d?"right":270===d?"bottom":"left",a.direction=a.defaultProps.direction=d},_e.movingobject=function(a,b){var c=b.template;a.backgroundImage=c.content,a.speed=a.defaultProps.speed=c.speed,a.direction=a.defaultProps.direction=c.direction,a.mode=a.defaultProps.mode=c.mode.toLowerCase(),a.spin=a.defaultProps.spin=c.spin,a.zoomSpeedX=c.zoomWidthSpeed,a.zoomSpeedY=c.zoomHeightSpeed,a.zoomWidth=c.zoomWidth,a.zoomHeight=c.zoomHeight},_e.htmlembedbox=function(a,b){a.embedCode=a.defaultProps.embedCode=b.template.content},_e.flash=function(a,b){a.src=a.defaultProps.src=b.template.content,a.natualWidth=a.defaultProps.natualWidth=b.style.swfWidth,a.natualHeight=a.defaultProps.natualHeight=b.style.swfHeight,a.offsetX=a.defaultProps.offsetX=b.style.swfLeft,a.offsetY=a.defaultProps.offsetY=b.style.swfTop};var af=function(b){function e(c){void 0===c&&(c=a.navigator.userAgent||a.navigator.vendor||a.opera),b.call(this),this.userAgent=c,this.devices={winPhone:/IEMobile/i,androidPhone:/Android/i,iPhone:/iPhone/i}}return dd(e,b),e.prototype.match=function(a){return a.test(this.userAgent)},e.prototype.matchAny=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];for(var c=(this.userAgent,0),d=a.length;d>c;c++)if(this.match(a[c]))return!0;return!1},d(e.prototype,"isMobile",{get:function(){if(this._isMobile!==c)return this._isMobile;var a=this.devices;return this._isMobile=this.matchAny(a.winPhone,a.androidPhone,a.iPhone)},enumerable:!0,configurable:!0}),d(e.prototype,"isWinPhone",{get:function(){if(this._isWinPhone!==c)return this._isWinPhone;var a=this.devices;return this._isWinPhone=this.match(a.winPhone)},enumerable:!0,configurable:!0}),e}(cd),bf=new af,cf=function(){function a(){}return a.brighter=function(b,c){var d=Array.isArray(b),e=d?b:a.parse(b);c=Math.pow(.7,arguments.length?c:1);var f,g=e[0],h=e[1],i=e[2],j=30,k=e.length>3?e[3]:1;return g||h||i?(g&&j>g&&(g=j),h&&j>h&&(h=j),i&&j>i&&(i=j),f=[~~Math.min(255,g/c+.5),~~Math.min(255,h/c+.5),~~Math.min(255,i/c+.5),k]):f=[j,j,j,k],d?f:a.stringify(f)},a.darker=function(b,c){c=Math.pow(.7,arguments.length?c:1);var d=Array.isArray(b),e=d?b:a.parse(b),f=[c*e[0]|0,c*e[1]|0,c*e[2]|0,e.length>3?e[3]:1];return d?f:a.stringify(f)},a.transparentize=function(b,c){var d=Array.isArray(b),e=d?b:a.parse(b),f=e.concat();return f[3]=Jc(c,0,1),d?f:a.stringify(f)},a.toHSLA=function(b){var c=Array.isArray(b),d=a.toHSLAArray(b);return c?d:a.stringifyHSLA(d)},a.toHSLAArray=function(b){var c,d,e=a.parse(b),f=e[0],g=e[1],h=e[2],i=Math.min(f/=255,g/=255,h/=255),j=Math.max(f,g,h),k=j-i,l=(j+i)/2;k?(d=.5>l?k/(j+i):k/(2-j-i),c=60*(f===j?(g-h)/k+(h>g?6:0):g==j?(h-f)/k+2:(f-g)/k+4)):(c=0,d=l>0&&1>l?0:c);var m=e.concat();return m[0]=c,m[1]=100*d,m[2]=100*l,m},a.stringifyHSLA=function(a){var b="("+a[0]+","+a[1]+"%,"+a[2]+"%";return(a.length>3&&a[3]<1?"hsla"+b+","+a[3]:"hsl"+b)+")"},a.stringify=function(a){return a.length>3&&a[3]<1?"rgba("+a+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},a.format=function(a){for(var b=new Array(4),c=-1;++c<3;)b[c]=Math.max(0,Math.min(255,~~a[c]));var d=a.length>3?+a[3]:1;return d||0===d||(d=1),b[3]=Math.min(0,Math.max(1,d)),b},a.parse=function(b){if(null==b)return b;if(Array.isArray(b))return b;var c=+b;if(!isNaN(c))return[c>>16,c>>8&&255,c>>16&255,0];b=b.trim().toLowerCase(),","===b.charAt(b.length-1)&&(b=b.substr(0,b.length-1));var d;if(d=a.table[b])return[d[0],d[1],d[2],d.length>3?d[3]:1];"0x"===b.substr(0,2)&&(b="#"+b.substr(3));var e,f,g,h;if("#"===b[0]){var i=b.lastIndexOf(",");return i>=0?(h=+b.substr(i+1),b=b.substr(0,i)):h=1,4===b.length?(e=parseInt(b[1]+b[1],16),f=parseInt(b[2]+b[2],16),g=parseInt(b[3]+b[3],16)):(e=parseInt(b.substr(1,2),16),f=parseInt(b.substr(3,2),16),g=parseInt(b.substr(5,2),16)),0===h||h||(h=1),[e,f,g,h]}if("hsl"===b.substr(0,3)){var j=b.match(df),k=+j[0]%360/360,l=+j[1]/100,m=+j[2]/100,h=+j[3],n=.5>=m?m*(l+1):m+l-m*l,o=2*m-n;return j.length>3&&(h=+j[3]),[Lb(k+1/3,o,n),Lb(k,o,n),Lb(k-1/3,o,n),h]}var j=b.match(df);return j?[+j[0],+j[1],+j[2],j.length>3?+j[3]:1]:null},a.parseToString=function(b){return a.stringify(a.parse(b))},a.table={silver:[192,192,192],black:[0,0,0],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],yellow:[255,255,0],orange:[255,165,0],grey:[128,128,128],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],transparent:[0,0,0,0]},a}(),df=/([\d\-\.e]+)/gi,ef={_tables:{},register:function(a,b,c,d){ef._tables[a]={d:c,p:d,pr:b}},get:function(a,b){for(var c,d=ef._tables;;){var e=d[a];if(e||(e=d[a="default"]),c=e.d&&e.d[b]||e.p&&e.p(b,e.d),c||"default"===a)break;a=e.pr||"default"}return c}},ff={_classes:{},register:function(a,b,c){b.componentType=a,ff._classes[a]=b,c&&!ef._tables[a]&&ef.register(a,c)},getClass:function(a){return ff._classes[a]},create:function(a,b,c){try{var d=new ff._classes[a];if(d.name=b,c)for(var b in c)d.setProperty(b,c[b]);return d}catch(e){return null}}},gf=function(a){function b(){a.call(this),this.__leo_guid__=w(),this.DOMEventsEnabled=!0,this._parent=null,this._stage=null,this._visible=!0,this._backface=!0,this._x=0,this._displayX=0,this._y=0,this._displayY=0,this._zIndex=null,this._anchorX=0,this._anchorY=0,this._opacity=1,this._shadow="none",this._hasWidthSet=!1,this._computedWidth=0,this._actualWidth=0,this._hasHeightSet=!1,this._computedHeight=0,this._actualHeight=0,this.init()}return dd(b,a),b.prototype.init=function(){this._node=this.createNode(),this._dom=this._node.attr("data-guid",this.guid).addClass("leo-comp").style("display","none")[0],this.name=this.componentType+"_"+this.guid,this._transform=this.initTransform(),this.positionMode="absolute",this._resizeMode=0},b.prototype.initTransform=function(){return new ch(this._dom,this)},d(b.prototype,"name",{get:function(){return this._name},set:function(a){var b=this._name;this._name=a,this._dom.setAttribute("id",a),this._stage&&this._stage.context.components.updateName(this,b)},enumerable:!0,configurable:!0}),d(b.prototype,"dom",{get:function(){return this._dom},enumerable:!0,configurable:!0}),d(b.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),b.prototype.createNode=function(){return Hi("div")},b.prototype.destroyNode=function(){},d(b.prototype,"guid",{get:function(){return this.__leo_guid__},enumerable:!0,configurable:!0}),d(b.prototype,"componentType",{get:function(){return this.constructor.componentType},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!1},enumerable:!0,configurable:!0}),d(b.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),b.prototype._setParent=function(a){this._parent=a},d(b.prototype,"stage",{get:function(){return this._stage},enumerable:!0,configurable:!0}),d(b.prototype,"visible",{get:function(){return this._visible},set:function(a){this._visible!==a&&(this._visible=a,a?Xb(this._dom):Yb(this._dom),this.notifyPropertyChange("visible",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"backface",{get:function(){return this._backface},set:function(a){this._backface!==a&&(this._backface=a,_h(this._dom,"backfaceVisibility",a?"":"hidden"),this.notifyPropertyChange("backface",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"positionMode",{get:function(){return this._positionMode},set:function(a){var b=this._positionMode;b!==a&&(this._positionMode=a,this._dom.style.position=a,this.notifyPropertyChange("positionMode",b))},enumerable:!0,configurable:!0}),d(b.prototype,"transform",{get:function(){return this._transform},enumerable:!0,configurable:!0}),d(b.prototype,"x",{get:function(){return this._x},set:function(a){var b=this._x;b!==a&&(this._x=a,this.displayX=this._displayX+a-b,this._onXChange(b),this.notifyPropertyChange("x",b))},enumerable:!0,configurable:!0}),b.prototype._onXChange=function(){},d(b.prototype,"displayX",{get:function(){return this._displayX},set:function(a){this._displayX!==a&&(this._displayX=a,this._transform.update())},enumerable:!0,configurable:!0}),d(b.prototype,"y",{get:function(){return this._y},set:function(a){var b=this._y;b!==a&&(this._y=a,this.displayY=this._displayY+a-b,this._onYChange(b),this.notifyPropertyChange("y",b))},enumerable:!0,configurable:!0}),b.prototype._onYChange=function(){},d(b.prototype,"displayY",{get:function(){return this._displayY},set:function(a){this._displayY!==a&&(this._displayY=a,this._transform.update())},enumerable:!0,configurable:!0}),d(b.prototype,"zIndex",{get:function(){return this._zIndex},set:function(a){a=~~a;var b=this._zIndex;b!==a&&(this._zIndex=a,this._dom.style.zIndex=a+"",this.notifyPropertyChange("zIndex",b))},enumerable:!0,configurable:!0}),d(b.prototype,"anchorX",{get:function(){return this._anchorX},set:function(a){var b=this._anchorX;b!==a&&(this._anchorX=a,this._transform.update(),this.notifyPropertyChange("anchorX",b))},enumerable:!0,configurable:!0}),d(b.prototype,"anchorY",{get:function(){return this._anchorY},set:function(a){var b=this._anchorY;b!==a&&(this._anchorY=a,this._transform.update(),this.notifyPropertyChange("anchorY",b))},enumerable:!0,configurable:!0}),d(b.prototype,"opacity",{get:function(){return this._opacity},set:function(a){a>1?a=1:0>a&&(a=0);var b=this._opacity;b!==a&&(this._opacity=a,this._dom.style.opacity=a+"")},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){var b=this._shadow;a!==b&&_h(this._dom,"boxShadow",this._shadow=a)},enumerable:!0,configurable:!0}),d(b.prototype,"resizeMode",{get:function(){return this._resizeMode},set:function(a){this._setResizeMode(a)},enumerable:!0,configurable:!0}),b.prototype._setResizeMode=function(a){if(a=(2+a%2)%2,this._resizeMode!==a&&(this._resizeMode=a,!a)){var b=!1;this._hasWidthSet&&this._actualWidth!==this._computedWidth&&(this.actualWidth=this._computedWidth,b=!0),this._hasHeightSet&&this._actualHeight!==this._computedHeight&&(this.actualHeight=this._computedHeight,b=!0),b&&this._transform.update()}},d(b.prototype,"width",{get:function(){return this._resizeMode?this._computedWidth:this._actualWidth},set:function(a){!this._hasWidthSet&&a&&(this._hasWidthSet=!0,this.actualWidth=a);var b=this._computedWidth;a!==b&&(this._computedWidth=a,this._resizeMode?this._transform.update():this.actualWidth=a,this.notifyPropertyChange("width",b))},enumerable:!0,configurable:!0}),d(b.prototype,"actualWidth",{get:function(){return this._actualWidth},set:function(a){var b=this._actualWidth;if(a!==b){var c=1;this._resizeMode&&b&&(c=this._computedWidth/b),this._dom.style.width=~~(.5+a)+"px",this._onActualWidthChange(this._actualWidth=a),this.notifyPropertyChange("actualWidth",a),this._resizeMode?this.width=a*c:(a!==this._computedWidth&&(c=this._computedWidth,this._computedWidth=a),this._anchorX&&this._transform.update(),a!==c&&this.notifyPropertyChange("width",c))}},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){},d(b.prototype,"height",{get:function(){return this._resizeMode?this._computedHeight:this._actualHeight},set:function(a){!this._hasHeightSet&&a&&(this._hasHeightSet=!0,this.actualHeight=a);var b=this._computedHeight;a!==b&&(this._computedHeight=a,this._resizeMode?this._transform.update():this.actualHeight=a,this.notifyPropertyChange("height",b))},enumerable:!0,configurable:!0}),d(b.prototype,"actualHeight",{get:function(){return this._actualHeight},set:function(a){var b=this._actualHeight;if(a!==b){var c=1;this._resizeMode&&b&&(c=this._computedHeight/b),this._dom.style.height=~~(.5+a)+"px",this._onActualHeightChange(this._actualHeight=a),this.notifyPropertyChange("actualHeight",a),this._resizeMode?this.height=a*c:(a!==this._computedHeight&&(c=this._computedHeight,this._computedHeight=a),this._anchorY&&this._transform.update(),a!==c&&this.notifyPropertyChange("height",c))}},enumerable:!0,configurable:!0}),b.prototype._onActualHeightChange=function(){},b.prototype.getBoundingRect=function(a){a||(a=new oi(0,0,0,0));var b=this.width,c=this.height;return a.set(-this.anchorX*b,-this.anchorY*c,b,c),a},b.prototype.getMeasuredBound=function(a){return this.getBoundingRect(a)},b.prototype.getTransformMatrix=function(a){a||(a=new ni(1,0,0,1,0,0)),a.identity();var b=this._transform;return a.appendTransform(b._tx,b._ty,b._sx*b._scaleX,b._sy*b._scaleY,b._rotation,b._skewX,b._skewY,this.width*(this._transform._originX-this._anchorX),this.height*(this._transform._originY-this._anchorY))},b.prototype.getTransformBound=function(a,c,d){c=d?this.getMeasuredBound(c):this.getBoundingRect(c),a||(a=this.getTransformMatrix(ni.identity));var e=b._point;e||(e=b._point={x:0,y:0}),e.x=c.left,e.y=c.top,a.transformPoint(e);var f=e.x,g=f,h=e.y,i=h;return e.x=c.right,e.y=c.top,a.transformPoint(e),e.x<f?f=e.x:e.x>g&&(g=e.x),e.y<h?h=e.y:e.y>i&&(i=e.y),e.x=c.right,e.y=c.bottom,a.transformPoint(e),e.x<f?f=e.x:e.x>g&&(g=e.x),e.y<h?h=e.y:e.y>i&&(i=e.y),e.x=c.left,e.y=c.bottom,a.transformPoint(e),e.x<f?f=e.x:e.x>g&&(g=e.x),e.y<h?h=e.y:e.y>i&&(i=e.y),c.set(f,h,g-f,i-h)},b.prototype.onTransformUpdate=function(){this._transform._x=Xc(this._displayX+this._computedWidth*(this._transform._originX-this._anchorX)-this._actualWidth*this._transform._originX),this._transform._y=Xc(this._displayY+this._computedHeight*(this._transform._originY-this._anchorY)-this._actualHeight*this._transform._originY);var a=0;this._actualWidth&&(a=Xc(this._computedWidth/this._actualWidth),0===a||a||(a=1),this._transform._sx=a),this._actualHeight&&(a=Xc(this._computedHeight/this._actualHeight),0===a||a||(a=1),this._transform._sy=a)},b.prototype.setProperty=function(a,b){if(arguments.length<2)for(var c in a)this.setProperty(c,a[c]);else{var d=this;if(a.indexOf(".")>=0){for(var e=a.split("."),f=null,g=-1,h=e.length-1;++g<h&&null!=d;)f=d,d=d[e[g]];d&&("function"==typeof d[e[g]]?d[e[g]].call(d,b):d[e[g]]=b)}else"!"!==a&&(d[a]=b)}},b.prototype.getProperty=function(a){var b=this;if("!"===a)return null;if(a.indexOf(".")>=0){for(var c=a.split("."),d=-1,e=c.length-1;++d<e&&null!=b;)b=b[c[d]];return b&&b[c[d]]}return b[a]},b.prototype.notifyPropertyChange=function(a,b){if(this.hasEventListener(a+="Change")){var c=ji.getInstance(a,b);c._setCurrentTarget(c._target=this),this._notifyListener(c),ji.recycle(c)}},b.prototype.watch=function(a,b,c,d){void 0===d&&(d=0),this.addEventListener(a+"Change",b,c,d)},b.prototype.unwatch=function(a,b,c){this.removeEventListener(a+"Change",b,c)},b.prototype.addEventListener=function(b,c,d,e){void 0===e&&(e=0),a.prototype.addEventListener.call(this,b,c,d,e),fi[b]&&sf.delegate(this,b)},b.prototype.dispatchEvent=function(b){if(!b.bubbles)return a.prototype.dispatchEvent.call(this,b);for(var c=[],d=this,e=b.type;d;)d.hasEventListener(e)&&c.push(d),d=d._parent;return this._dispatchPropagationEvent(b,c,c[0]===this?0:-1),!b._defaultPrevented},b.prototype._dispatchPropagationEvent=function(a,b,c){for(var d=0,e=b.length;e>d;++d){var f=b[d];if(a._setCurrentTarget(f),a._target=this,a._eventPhase=d===c?2:3,f._notifyListener(a),a._isPropagationStopped||a._isImmediatePropagationStopped)break}},b.prototype.enter=function(a){this._stage=a,this._visible?Xb(this._dom):Yb(this._dom),sf.flushDelegates(this),a.context.components.add(this)},b.prototype.leave=function(){Yb(this._dom),this._stage&&(this._stage.context.components.remove(this),this._stage=null)},b.prototype.destroy=function(){this._parent?this._parent.remove(this):this._stage&&(this.leave(),this.dispatchSimpleEvent(gi.LEAVE_STAGE)),a.prototype.destroy.call(this),sf.removeDelegates(this),this.destroyNode(this._node),this._transform.destroy(),this._transform=null,this._node=null,this._dom=null},b}(ed);ef.register("default",null,{left:"x",top:"y",visible:"visible",opacity:"opacity",rotate:"transform.rotation",shadow:"shadow",width:"width",height:"height",zIndex:"zIndex"},function(a){return ch.KEYWORDS[a]?"transform."+a:null}),ff.register("unkown",gf);var hf=function(a){function b(){a.call(this),this._srcChanged=!1,this._readyState=0,this._autoplay=!1}return dd(b,a),b.prototype.init=function(){var b=this;a.prototype.init.call(this),this.node.addClass("leo-comp--media hi-action"),this.watch("visible",this._pauseWhenHidden,this),this._media=this._createMedia(),this.media.onload=function(){b._onload()}},d(b.prototype,"media",{get:function(){return this._media},enumerable:!0,configurable:!0}),b.prototype._createMedia=function(){return null},b.prototype._destroyMedia=function(){try{this._media.destroy()}catch(a){}},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this._src},set:function(a){if(this._src!==a){var b=this._src;this._readyState=1,this.stage&&(this._srcChanged=!0),this._media.src=this._src=a,this.notifyPropertyChange("src",b)}},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.src=a.src},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){var a=this._media.loaded;this._readyState=a>0?2:4,(this._autoplay||this._srcChanged)&&this._stage&&this.visible?this._media.resume():this._media.pause(),this.dispatchSimpleEvent("load")},d(b.prototype,"autoplay",{get:function(){return this._autoplay},set:function(a){this._autoplay!==a&&(this._autoplay=a,this.unwatch("visible",this._playWhenVisible,this),a&&(this.watch("visible",this._playWhenVisible,this),this._stage&&this._media.resume()))},enumerable:!0,configurable:!0}),b.prototype._playWhenVisible=function(){this._visible&&this._stage&&this._media.resume()},b.prototype._pauseWhenHidden=function(){this._visible||this._media.pause()},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this._srcChanged=!1,this._autoplay&&this._visible?(this._media.resume(),this._media.currentTime>=this._media.duration-.001&&(this._media.currentTime=0)):this._media.pause()},b.prototype.leave=function(){this._media&&this._media.pause(),a.prototype.leave.call(this)},b.prototype.destroy=function(){this._destroyMedia(),this._media=null,a.prototype.destroy.call(this)},b}(gf),jf=function(a){function b(){a.call(this),this._readyState=0,this.onceloaded=!1,this.destroyed=!1}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.audio=new ui,this.node.addClass("leo-comp--BGM"),this.visible=!1},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"loop",{set:function(a){this._loop!==a&&(this._loop=a,this.audio.loop=a)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.audio.src=a,this.onceloaded&&this.load())},enumerable:!0,configurable:!0}),b.prototype.load=function(){1!==this._readyState&&(this.audio.addEventListener("canplaythrough",this._onload,this),this.audio.addEventListener("error",this._onload,this),this._readyState=1,this.audio.load())},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){this.destroyed||(this.audio.removeEventListener("canplaythrough",this._onload,this),this.audio.removeEventListener("error",this._onload,this),this._readyState=this.audio.readyState||2,this.onceloaded?this.stage&&this.audio.play():(this.onceloaded=!0,this.dispatchSimpleEvent("load")))},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.stage&&4===this.readyState&&this.audio.play()},b.prototype.leave=function(){a.prototype.leave.call(this),this.audio.pause()},b.prototype.destroy=function(){this.destroyed=!0,a.prototype.destroy.call(this),this.audio.destroy(),this.audio=null},b}(gf);ff.register("sound",jf);var kf=function(a){function e(){a.call(this),this._readyState=0,this.onceloaded=!1,this.onceload=!1}return dd(e,a),e.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--audio-player hi-action"),this.audio=new ui,this.container=this.node.el("div")},e.prototype.parseHandler=function(a){var c=this;return function(d){var e=d.button;if(!b.implementation.hasFeature("MouseEvents","2.0"))switch(event.button){case 0:case 1:case 3:case 5:case 7:e=0;break;case 2:case 6:e=2;break;case 4:e=1}!e&&c.audio.duration&&a(d)}},e.prototype.formatTime=function(a){a=Math.round(a);var b=Math.floor(a/60),c=a%60;return(10>b?"0":"")+b+":"+(10>c?"0":"")+c},e.prototype.elTime=function(){this.time=this.container.el("div").addClass("time").text("00:00")[0]},e.prototype.updateTime=function(a){var b,d=this.progressBar,e=a.target,f=a.originalEvent,g=f.offsetX,h=g===c?f.layerX:g;if(e===d)b=h;else{if(!d.contains(e))return;b=e.offsetLeft+h}this.audio.currentTime=b/Rd(d)*this.audio.duration},e.prototype.unbindDocMove=function(){this.docMove&&(qh(b,"mousemove",this.docMove),this.docMove=null)},e.prototype.unbindDocUp=function(){this.docUp&&(qh(b,"mousemove",this.docUp),this.docUp=null)},e.prototype.updateVolume=function(a){var b,d=this.volumeBar,e=a.target,f=a.originalEvent,g=f.offsetX,h=g===c?f.layerX:g;if(e===d)b=h;else{if(!d.contains(e))return;b=e.offsetLeft+h}var i=b/Rd(d);(i>1||i!==i)&&(i=1),0>i&&(i=0),this.audio.volume=i},e.prototype.elVolumeBar=function(){var a=this,d=this.container,e=d.el("div").addClass("volumebar bar");this.volumeBar=e[0];var f=e.el("div").addClass("fg").style("width","100%"),g=e.el("div").addClass("cursor");this.audio.addEventListener("volumechange",function(){var a=this.audio.muted?0:this.audio.volume;f.style("width",100*a+"%"),g.style("left",a*(100*(1-Yh(g[0],"width",!0)/Yh(e[0],"width",!0))+2)-1+"%")},this),e.bind("mousedown",function(c){a.unbindDocMove(),a.updateVolume(c),nh(b,"mousemove",a.docMove=function(b){a.updateVolume(b)}),a.unbindDocUp(),uh(b,"mouseup",a.docUp=function(b){a.updateVolume(b),a.unbindDocMove()})});var h=this.parseHandler(function(a){var b=e[0];if(a.target===b||b.contains(a.target)){var d=a.originalEvent.offsetX;b.title=Math.round((d===c?a.originalEvent.layerX:d)/b.offsetWidth*100)+""}});e.bind("mouseover",h),e.bind("mousemove",h)},e.prototype.elProgressBar=function(){var a=this,d=this.container,e=d.el("div").addClass("progressbar bar"),f=e.el("div").addClass("bg"),g=e.el("div").addClass("fg"),h=e.el("div").addClass("cursor");this.progressBar=e[0];this.audio;this.audio.addEventListener("progress",function(){f.style("width",this.audio.buffered.end(0)/this.audio.duration*100+"%")},this),this.audio.addEventListener("timeupdate",function(){var a=this.audio.currentTime,b=a/this.audio.duration;g.style("width",100*b+"%"),h.style("left",b*(100*(1-Yh(h[0],"width",!0)/Yh(e[0],"width",!0))+2)-1+"%"),this.time.innerHTML=this.formatTime(a)},this),e.bind("mousedown",this.parseHandler(function(c){a.unbindDocMove(),a.updateTime(c),nh(b,"mousemove",a.docMove=a.parseHandler(function(b){a.updateTime(b)})),a.unbindDocUp(),uh(b,"mouseup",a.docUp=a.parseHandler(function(b){a.updateTime(b),a.unbindDocMove()}))}));var i=this.parseHandler(function(b){var d=e[0];if(b.target===d||d.contains(b.target)){var f=b.originalEvent.offsetX;d.title=a.formatTime((f===c?b.originalEvent.layerX:f)/d.offsetWidth*a.audio.duration)}});e.bind("mouseover",i),e.bind("mousemove",i)},e.prototype.elPlayPauseButton=function(){var a=this.container,b=a.el("div").addClass("playButton");b.el("div");var c=this.audio,d=this.playPauseButton=b[0];nh(d,"tap",function(){c.playPause()}),c.addEventListener("play",function(){d.className="pauseButton"},this),c.addEventListener("pause",function(){d.className="playButton"},this)},e.prototype.elVolumeIcon=function(){var a=this.container,b=this.audio,c=a.el("div").addClass("volumeIcon"),d=c.el("div").addClass("volume66");d.el("div"),d.el("div"),d.el("div"),d.el("div"),this.volumeIcon=c[0],c.bind("mousedown",function(){b.muted=!b.muted}),b.addEventListener("volumechange",function(){var a,c=b.volume;b.muted||0===c?a="volumeMute":c>=.66?a="volume66":c>=.33?a="volume33":c>0&&(a="volume"),d[0].className=a},this)},d(e.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(e.prototype,"readyState",{get:function(){return this._readyState},set:function(a){if(this._readyState!==a){this._readyState=a;var b=this.playPauseButton;if(b)switch(a){case 1:b.className="loadButton";default:b.className="playButton"}}},enumerable:!0,configurable:!0}),e.prototype.load=function(){1!==this.readyState&&(this.onceload||(this.onceload=!0),this.readyState=1,this.audio.addEventListener("canplaythrough",this._onload,this),this.audio.addEventListener("error",this._onload,this),this.audio.load())},e.prototype._onload=function(){this.audio.removeEventListener("canplaythrough",this._onload,this),this.audio.removeEventListener("error",this._onload,this),this.readyState=this.audio.readyState||2,this.onceloaded?this.stage&&this._autoplay&&4===this.readyState&&this.audio.play():(this.onceloaded=!0,this.elTime(),this.elProgressBar(),this.elPlayPauseButton(),this.elVolumeIcon(),this.elVolumeBar(),this.dispatchSimpleEvent("load"))},d(e.prototype,"autoPlay",{set:function(a){this._autoplay=a},enumerable:!0,configurable:!0}),d(e.prototype,"backgroundColor",{set:function(a){this.container.style("backgroundColor",a)},enumerable:!0,configurable:!0}),d(e.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.audio.src=a,this.onceload&&this.load())},enumerable:!0,configurable:!0}),d(e.prototype,"volume",{set:function(a){this.audio.volume=a},enumerable:!0,configurable:!0}),e.prototype.enter=function(b){a.prototype.enter.call(this,b),this.stage&&this._autoplay&&4===this.readyState&&this.audio.play()},e.prototype.leave=function(){a.prototype.leave.call(this),this.audio.pause()},d(e.prototype,"playerType",{set:function(a){this._playerType=a,this.container.addClass(a),this.resize()},enumerable:!0,configurable:!0}),e.prototype.resize=function(){var a=this._playerType;if(a){var b,c=e.size[a].width,d=e.size[a].height,f=this.actualWidth,g=this.actualHeight;b=c/d>f/g?f/c:g/d,this.container.style({scaleX:b,scaleY:b})}},e.prototype._onActualWidthChange=function(){this.resize()},e.prototype._onActualHeightChange=function(){this.resize()},e.prototype.destroy=function(){a.prototype.destroy.call(this),this.audio.destroy(),this.audio=null,this.unbindDocMove(),this.unbindDocUp(),Gi(this.progressBar).unbindAll(),Gi(this.volumeBar).unbindAll(),Gi(this.volumeIcon).unbindAll(),rh(this.playPauseButton)},e.size={"default":{width:400,height:30},mini:{width:62,height:30},simple:{width:200,height:60},classical:{width:400,height:32}},e}(gf);ef.register("soundplayer",null,{backgroundColor:"backgroundColor"}),ff.register("soundplayer",kf);var lf=function(a){function b(){a.call(this),this._textContent="",this._bgColor="transparent",this._shadow="none",this._paddingLeft=0,this._paddingRight=0,this._paddingTop=0}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--txt"),this._contentEl=this.node.el("div").addClass("leo-comp--txt__content"),this._textFormat=new Ni(this._contentEl,this),this._textFormat.deep=!0},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){if(this._textContent!==a){var b=this._textContent;this._contentEl.html(this._textContent=a,!0),this.notifyPropertyChange("textContent",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),d(b.prototype,"bgColor",{get:function(){return this._bgColor},set:function(a){if(this._bgColor!==a){var b=this._bgColor;this._dom.style.backgroundColor=this._bgColor=a,this.notifyPropertyChange("bgColor",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){var b=this._shadow;a!==b&&(_h(this._dom,"textShadow",this._shadow=a),this.notifyPropertyChange("shadow",b))},enumerable:!0,configurable:!0}),d(b.prototype,"paddingLeft",{get:function(){return this._paddingLeft},set:function(a){if(this._paddingLeft!==a){var b=this._paddingLeft;this._dom.style.paddingLeft=(this._paddingLeft=a)+"px",this.notifyPropertyChange("paddingLeft",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"paddingRight",{get:function(){return this._paddingRight},set:function(a){if(this._paddingRight!==a){var b=this._paddingRight;this._dom.style.paddingRight=(this._paddingRight=a)+"px",this.notifyPropertyChange("paddingRight",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"paddingTop",{get:function(){return this._paddingTop},set:function(a){if(this._paddingTop!==a){var b=this._paddingTop;this._dom.style.paddingTop=(this._paddingTop=a)+"px",this.notifyPropertyChange("paddingTop",b)}},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){this._textFormat.destroy(),this._textFormat=null,a.prototype.destroy.call(this),this._contentEl=null},b.textType=2,b}(gf);ef.register("text",null,{backgroundColor:"bgColor",topMargin:"paddingTop",marginTop:"paddingTop",marginLeft:"paddingLeft",marginRight:"paddingRight"},function(a){return Ni.compatProperty(a)}),ff.register("text",lf);var mf=function(a){function b(){a.call(this),this._textContent="",this._state=0,this._bgColor="transparent",this._bgSrc="",this._bgImage=null,this._borderWidth=3,this._borderRadius=0,this._borderColor="rgb(0,0,0)"}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--btn"),this._textFormat=new Mi(this._node,this),this._bindEvents()},b.prototype.createNode=function(){var a=Hi("div");return this._button=a.el("button"),a},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){if(this._textContent!==a){var b=this._textContent;this._button.html(this._textContent=a),this.notifyPropertyChange("textContent",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"textFormat",{get:function(){return this._textFormat
},enumerable:!0,configurable:!0}),d(b.prototype,"state",{get:function(){return this._state},set:function(a){a>=0&&2>=a&&this._state!==a&&this._updateColor(this._state=a)},enumerable:!0,configurable:!0}),b.prototype._updateColor=function(a){var b=this._button[0],c=cf.toHSLAArray(this._bgColor);a&&(c[2]=Math.max(0,c[2]-10)),b.style.backgroundColor=cf.stringifyHSLA(c),c=cf.toHSLAArray(this._borderColor),a&&(c[2]=Math.max(0,c[2]-10)),b.style.borderColor=cf.stringifyHSLA(c)},d(b.prototype,"bgColor",{get:function(){return this._bgColor},set:function(a){if(this._bgColor!==a){var b=this._bgColor;this._button[0].style.backgroundColor=this._bgColor=a,this.notifyPropertyChange("bgColor",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"bgSrc",{get:function(){return this._bgSrc},set:function(a){var b=this;if((!a||"none"===a||a.indexOf(".")<0&&"data/image"!==a.substr(0,10))&&(a=""),this._bgSrc!==a){var c=this._bgSrc;a?(this._bgImage||(this._bgImage=new Image),this._bgImage.onload=this._bgImage.onerror=function(){b._bgImage.onload=b._bgImage.onerror=null,b._button[0].style.backgroundImage=a.indexOf(".")>=0?"url("+a+")":a,b._node.addClass("leo-comp--btn__has-bg"),b.dispatchSimpleEvent("bgLoad")},this._bgImage.src=this._bgSrc=a):(this._bgImage&&(this._bgImage.onload=this._bgImage.onerror=null,this._bgImage.src=Bd),this._button[0].style.backgroundImage="none",this._bgSrc=a,this._node.removeClass("leo-comp--btn__has-bg"),this.dispatchSimpleEvent("bgLoad")),this.notifyPropertyChange("bgSrc",c)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderWidth",{get:function(){return this._borderWidth},set:function(a){if(this._borderWidth!==a){var b=this._borderWidth;this._button[0].style.borderWidth=(this._borderWidth=a)+"px",this.notifyPropertyChange("borderWidth",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderRadius",{get:function(){return this._borderRadius},set:function(a){if(this._borderRadius!==a){var b=this._borderRadius;this._borderRadius=a;var c=Xf("borderRadius"),d=a+"px";ai(this._button[0],c,d),ai(this._dom,c,d),this.notifyPropertyChange("borderRadius",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{get:function(){return this._borderColor},set:function(a){if(this._borderColor!==a){var b=this._borderColor;this._button[0].style.borderColor=this._borderColor=a,this.notifyPropertyChange("borderColor",b)}},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){this._button[0].style.width=this.actualWidth+"px"},b.prototype._onActualHeightChange=function(){this._button[0].style.height=this.actualHeight+"px"},b.prototype._destroyBgImg=function(){this._bgImage&&(this._bgImage.onload=this._bgImage.onerror=null,this._bgImage.src=Bd,this._bgImage=null)},b.prototype._bindEvents=function(){var a=this;this.addEventListener("mouseenter",function(){a.state=1},null),this.addEventListener("mouseleave",function(){a.state=0},null);var b=0;this.addEventListener("tapstart",function(){b=a._state,a.state=2},null),this.addEventListener("tapend",function(){2===a._state&&(a.state=2===b?0:b,b=0)},null),this.watch("visible",function(){a.state=0},null)},b.prototype.destroy=function(){this._destroyBgImg(),this._textFormat.destroy(),this._textFormat=null,this._button=null,a.prototype.destroy.call(this)},b.textType=1,b}(gf);ef.register("button",null,{backgroundColor:"bgColor",backgroundImage:"bgSrc",borderRadius:"borderRadius",borderWidth:"borderWidth",borderColor:"borderColor"},function(a){return Mi.compatProperty(a)}),ff.register("button",mf);var nf=function(a){function b(){a.call(this),this._overflowMode="auto",this._perspective=null,this._children=[]}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._node.addClass("leo-comp--container"),this._isSymbol=!1,this.mode3d=!0,this.backface=!1,this._initViewport()},d(b.prototype,"isSymbol",{get:function(){return this._isSymbol},enumerable:!0,configurable:!0}),b.prototype._asSymbol=function(){this._isSymbol=!0,this._resizeMode=1,this._transform.accelerate=!0},d(b.prototype,"overflowMode",{get:function(){return this._overflowMode},set:function(a){var b=this._overflowMode;b!==a&&(this._overflowMode=a,this._dom.style.overflow=a,this.notifyPropertyChange("overflowMode",b))},enumerable:!0,configurable:!0}),d(b.prototype,"mode3d",{get:function(){return this._mode3d},set:function(a){this._mode3d!==a&&(this._mode3d=a,cg&&_h(this._dom,"transformStyle",a?"preserve-3d":""),this.notifyPropertyChange("transformMode",!a))},enumerable:!0,configurable:!0}),d(b.prototype,"resizeMode",{get:function(){return this._resizeMode},set:function(a){this._isSymbol||Ui.fatal("leo_DOMComponentContainer.resizeMode","only symbol can switch the resizeMode"),this._setResizeMode(a)},enumerable:!0,configurable:!0}),d(b.prototype,"perspective",{get:function(){return this._perspective},set:function(a){var b=this._perspective;b!==a&&(this._perspective=a,_h(this._dom,"perspective",null!=a?a+"px":""),this.notifyPropertyChange("perspective",b))},enumerable:!0,configurable:!0}),d(b.prototype,"viewport",{get:function(){return this._viewport},enumerable:!0,configurable:!0}),b.prototype._initViewport=function(){this._viewport=new Tf(this,0,0,0,0)},b.prototype._onActualWidthChange=function(a){this._viewport._rect.width=a},b.prototype._onActualHeightChange=function(a){this._viewport._rect.height=a},b.prototype.getMeasuredBound=function(a){return a||(a=new oi(0,0,0,0)),a=Tf.getContentBound(this._children,a,!1),a.left-=this._viewport.left+this.anchorX*this.width,a.top-=this._viewport.top+this.anchorY*this.height,a},b.prototype.autofit=function(){var a=this._viewport,b=Tf.getContentBound(this._children,oi.identity,!1),c=b.left-a.left,d=b.top-a.top,e=(b.right-a.left,b.bottom-a.top,a.width),f=a.height;a.set(b.left,b.top,b.width,b.height);var g=this._transform.deferred;this._transform.deferred=!1,b.width&&(this.anchorX=(this.anchorX*e-c)/b.width),b.height&&(this.anchorY=(this.anchorY*f-d)/b.height),this._transform.deferred=g},b.prototype._updateChildrenDisplayPosition=function(){for(var a=this._children,b=this._viewport.left,c=this._viewport.top,d=-1,e=a.length;++d<e;){var f=a[d],g=f._transform.deferred;f._transform.deferred=!1,f.displayX=f.x-b,f.displayY=f.y-c,f._transform.deferred=g}},d(b.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),d(b.prototype,"size",{get:function(){return this._children.length},enumerable:!0,configurable:!0}),b.prototype.each=function(a){for(var b=this._children,c=-1,d=b.length;++c<d;){var e=b[c];e[c]&&a.call(e,c)}return this},b.prototype.append=function(a){var b=this._children.length;return this._doAddChild(a,a._parent===this?b-1:b)},b.prototype.insert=function(a,b){return this._doAddChild(a,b)},b.prototype._doAddChild=function(a,c,d){if(a===this)return-1;(0>c||c>this._children.length)&&Ui.fatal("leo_DOMComponentContainer._doAddChild()","index %s is out of range [0, %s]",c,this._children.length);var e=a.parent;return e===this?(this.setChildIndex(a,c),c):(e&&e.remove(a),this._children.splice(c,0,a),a._setParent(this),a.zIndex=b.DEFAULT_ZINDEX+this._children.length,a.backface=this.backface,this._insertDOM(a._dom,c+1===this._children.length?null:this._children[c]._dom),this._updateDisplayPositionOf(a),this.dispatchSimpleEvent(gi.CHILD_ADDED,c),this._stage&&!d&&(a.enter(this._stage),a.dispatchSimpleEvent(gi.ENTER_STAGE)),c)},b.prototype._insertDOM=function(a,b){b?this._dom.insertBefore(a,b):this._dom.appendChild(a)},b.prototype._updateDisplayPositionOf=function(a){a.displayX=a.x-this._viewport.left,a.displayY=a.y-this._viewport.top},b.prototype.setChildIndex=function(a,c){var d=this._children,e=b.DEFAULT_ZINDEX,f=d.indexOf(a);if(0>f&&Ui.fatal("leo_DOMComponentContainer._doSetChildIndex()","child is not in current container"),f!==c)if(d.splice(f,1),0>c||d.length<=c)d.push(a),a.zIndex=e+d.length;else{this._children.splice(c,0,a),a.zIndex=e+c+1;for(var g=d.length;++c<g;)a.zIndex=e+c+1}},b.prototype.remove=function(a){a._parent!==this&&Ui.fatal("leo_DOMComponentContainer.remove()","child is not in current container");var b=this._children.indexOf(a);return b>=0?(this._doRemoveChild(b),b):void Ui.fatal("leo_DOMComponentContainer.remove()","child is not in the children list")},b.prototype.removeAt=function(a){return a>=0&&a<this._children.length?this._doRemoveChild(a):void Ui.fatal("leo_DOMComponentContainer.removeAt()","index %s is out of range [0, %s]",a,this._children.length-1)},b.prototype.removeAll=function(){for(var a=this._children,b=a.length;--b>=0;)this._doRemoveChild(b,!0)},b.prototype._doRemoveChild=function(a,c,d){var e=this._children,f=e[a],g=b.DEFAULT_ZINDEX;if(this.dispatchSimpleEvent(gi.CHILD_REMOVED,a),f._stage&&!d&&(f.leave(),f.dispatchSimpleEvent(gi.LEAVE_STAGE)),f._setParent(null),this._removeDOM(f._dom),e.splice(a--,1),!c)for(var h=e.length;++a<h;)e[a].zIndex=g+a+1;return f},b.prototype._removeDOM=function(a){this._dom.removeChild(a)},b.prototype.at=function(a){return a>=0&&a<this._children.length?this._children[a]:void Ui.fatal("leo_DOMComponentContainer.at()","index %s is out of range [0, %s]",a,this._children.length-1)},b.prototype.indexOf=function(a){return a._parent!==this?-1:this._children.indexOf(a)},b.prototype.contains=function(a){for(;a;){if(a===this)return!0;a=a._parent}return!1},b.prototype.getChildByName=function(a){for(var b=this._children,c=0,d=b.length;d>c;++c){var e=b[c];if(e.name===a)return e}return null},b.prototype.replace=function(a,b){if(a>=0&&a<this._children.length){if(b._parent===this){if(a===this.indexOf(b))return b;var c=this.removeAt(a);return this.setChildIndex(b,a),c}var c=this.removeAt(a);return this.insert(b,a),c}Ui.fatal("leo_DOMComponentContainer.replace()","index %s is out of range [0, %s]",a,this._children.length-1)},b.prototype.enter=function(b){a.prototype.enter.call(this,b);for(var c=this._children,d=gi.ENTER_STAGE,e=-1,f=c.length;++e<f;){var g=c[e];g.enter(b),g.dispatchSimpleEvent(d)}},b.prototype.leave=function(){a.prototype.leave.call(this);for(var b=this._children,c=gi.LEAVE_STAGE,d=-1,e=b.length;++d<e;){var f=b[d];f.leave(),f.dispatchSimpleEvent(c)}},b.prototype.destroy=function(){var b=this._children.concat();this.removeAll();for(var c=b.length;--c>=0;)b[c].destroy();a.prototype.destroy.call(this)},b.group=function(a,c,d){for(var e=d?b.createSymbol():new b,f=-1,g=a.length;++f<g;)e.append(a[f]);var h=Tf.getContentBound(e._children,oi.identity);return e._viewport.set(h.left,h.top,h.width,h.height),e.x=h.left,e.y=h.top,c&&c.append(e),e},b.ungroup=function(a){a._isSymbol&&Ui.fatal("leo_DOMComponentContainer::ungroup()","Cannot ungroup a symbol");for(var b=a._children,c=a._parent,d=a.getBoundingRect(oi.identity),e=d.left+a.x,f=d.top+a.y;b.length;){var g=b[0];g.x=g.displayX+e,g.y=g.displayY+f,a._doRemoveChild(0),c&&c.append(g)}c&&c.remove(a)},b.flatten=function(a){a._isSymbol&&Ui.fatal("leo_DOMComponentContainer::flatten()","Cannot flatten a symbol");for(var c=a._children,d=a._parent,e=a.getBoundingRect(oi.identity),f=e.left+a.x,g=e.top+a.y;c.length;){var h=c[0];h instanceof b&&!h._isSymbol?b.flatten(h):(h.x=h.displayX+f,h.y=h.displayY+g,a._doRemoveChild(0),d&&d.append(h))}d&&d.remove(a)},b.createSymbol=function(){var a=new b;return a._asSymbol(),a},b.convertToSymbol=function(a,c){return b.group(a,c,!0)},b.DEFAULT_ZINDEX=1,b}(gf);ff.register("group",nf);var of=function(a){function b(b){a.call(this),this.target=b,this.prevContext=null,this.components=new pf,this._variables={}}return dd(b,a),b.prototype.getVariable=function(a){return this.containsOwnVariable(a)?this._variables[a]:this.prevContext&&this.prevContext.getVariable(a)},b.prototype.getInnerVariable=function(a){return this.getVariable("\x00"+a)},b.prototype.defineVariable=function(a,b){"object"!=typeof b||"function"!=typeof b.get&&"function"!=typeof b.set?this._variables[a]=b:d(this._variables,a,b)},b.prototype.getOwnVariable=function(a){return this._variables[a]},b.prototype.containsOwnVariable=function(a){return this._variables.hasOwnProperty(a)},b.prototype.containsVariable=function(a){return this.containsOwnVariable(a)||this.prevContext&&this.prevContext.containsVariable(a)},b.prototype.setVariable=function(a,b){return this._variables[a]=b},b.prototype.setInnerVariable=function(a,b){return this._variables["\x00"+a]=b},b.prototype.removeVariable=function(a){if(this.containsOwnVariable(a)){var b=this._variables[a];return delete this._variables[a],b}return c},b.prototype.destroy=function(){this.target=null,this._variables=null,this.prevContext=null,this.components=null},b.CONTEXT_UKEY="__context_val__",b}(cd),pf=function(){function a(){this._map={},this._nameMap={}}return a.prototype.queryByGuid=function(a){return this._map[a]},a.prototype.queryByName=function(a){return this.queryByGuid(this._nameMap[a])},a.prototype.queryByElement=function(a){return this.queryByGuid(+a.getAttribute("data-guid"))},a.prototype.add=function(a){this._map[a.guid]||(this._map[a.guid]=a,this._nameMap[a.name]=a.guid)},a.prototype.updateName=function(a,b){this._nameMap[b]&&(delete this._nameMap[b],this._nameMap[a.name]=a.guid)},a.prototype.remove=function(a){this._map[a.guid]&&delete this._map[a.guid]},a}(),qf=function(c){function e(){c.call(this),this.changed=!1,this.code=""}return dd(e,c),e.prototype.init=function(){var b=this;c.prototype.init.call(this),this.node.addClass("leo-comp--html-embed-box").style("background-color","#fff");var d=this.iFrame=this.node.el("iframe")[0];d.setAttribute("frameBorder","0"),d.setAttribute("scrolling","no"),d.width="0",d.height="0",this.watch("visible",function(){this.insertCodeToIFrame()},this),nh(a,"message",function(a){var c=a.data;if(c){var d=c.__leo_guid__;if(b.__leo_guid__===d){var e=b.iFrame,f=e.contentDocument,g=f.body,h=f.documentElement;e.width=b.actualWidth=b.getMaxWidth(g,h),e.height=b.actualHeight=b.getMaxHeight(g,h)}}})},e.prototype.enter=function(a){c.prototype.enter.call(this,a),this.insertCodeToIFrame()},e.prototype.getMaxWidth=function(a,b){var c=Math.max(a.scrollWidth,a.offsetWidth,b.clientWidth,b.scrollWidth,b.offsetWidth);return c},e.prototype.getMaxHeight=function(a,b){var c=Math.max(a.scrollHeight,a.offsetHeight,b.clientHeight,b.scrollHeight,b.offsetHeight);return c},e.prototype.insertCodeToIFrame=function(){if(this.changed&&this.visible&&this.stage){this.changed=!1;var a=this.iFrame;a.parentNode.removeChild(a),a.src="javascript:document.write('"+this.code.replace(/'/g,"\\'")+"');",this.node.append(a)}},e.prototype.parseCode=function(a){var c=b.createElement("div");c.innerHTML=a;for(var d,e=c.childNodes,f=0,g=0;d=e[f++];)if("SCRIPT"===d.nodeName&&d.src){g++;var h=d.onload;h=h?"("+h.toString()+").apply(this,arguments);":"",d.setAttribute("onload","loadCallback();"+h)}var i="<style>body {margin: 0;padding: 0;}</style><script>var count = 0;var LEO_SCRIPT_COUNT = "+g+";function loadCallback() {if (++count !== LEO_SCRIPT_COUNT) return;setTimeout(function(){var windowLaodedEvent = document.createEvent('CustomEvent');windowLaodedEvent.initCustomEvent('load',true,true);window.dispatchEvent(windowLaodedEvent);var documentLoadedEvent = document.createEvent('Event');documentLoadedEvent.initEvent('DOMContentLoaded',true,true);window.document.dispatchEvent(documentLoadedEvent);}, 0);}</script>",j="<script>window.parent.postMessage({ __leo_guid__: "+this.__leo_guid__+" }, '*');</script>";return i=i+c.innerHTML+j,c=null,i},d(e.prototype,"embedCode",{get:function(){return this._embedCode},set:function(a){this._embedCode!==a&&(this._embedCode=a,this.changed=!0,this.code=this.parseCode(a),this.insertCodeToIFrame())},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){c.prototype.destroy.call(this),this.iFrame=null},e}(gf);ff.register("htmlembedbox",qf),ef.register("htmlembedbox",null,{width:"!",height:"!"},null);var rf=function(a){function b(){a.call(this)}return dd(b,a),d(b.prototype,"url",{get:function(){return this._url},set:function(a){this._url!==a&&(this._url=a,a.indexOf("://")<0&&(a="http://"+a),this.iframe.attr("src",a))},enumerable:!0,configurable:!0}),b.prototype._onActualHeightChange=function(){this.iframe.attr("height",this._actualHeight),this.iframe.style("height",this._actualHeight)},b.prototype._onActualWidthChange=function(){this.iframe.attr("width",this._actualWidth),this.iframe.style("width",this._actualWidth)},b.prototype.createNode=function(){{var a=Hi("div").addClass("leo-comp--embed-web");this.iframe=a.el("iframe").attr({webkitAllowFullScreen:!0,mozallowfullscreen:!0,allowFullScrren:!0,allowtransparency:!0,seamless:!0,frameborder:0})}return/^((?!chrome).)*safari/i.test(navigator.userAgent)&&a.style({webkitOverflowScrolling:"touch",overflow:"scroll"}),a},b}(gf);ff.register("embedweb",rf);var sf=function(){function a(){}return a._hasEventListened=function(b,c){return!(!a._eventTable[b.guid]||!a._eventTable[b.guid].events[c])},a._addDelegateListener=function(b,c,d){var e=a._eventTable[b.guid];e||(e=a._eventTable[b.guid]={target:b,events:{}}),e.events[c]=!0,nh(b.dom,c,d?a.onProxy:a.onDelegate)},a.removeDelegateListeners=function(b,c){var d=a._eventTable[b.guid];if(d){var e=qh,f=c?a.onProxy:a.onDelegate,g=b.dom,h=d.events;for(var i in h)e(g,i,f);d.target=null,d.events=null,delete a._eventTable[b.guid]}},a.flushDelegates=function(b){var c=a._cache[b.guid],d=b.stage,e=a._hasEventListened,f=a._addDelegateListener;if(c&&d){for(var g=(d.dom,-1),h=c.length;++g<h;){var i=c[g];e(d,i)||f(d,i)}delete a._cache[b.guid]}},a.removeDelegates=function(b){var c=a._cache[b.guid];c&&delete a._cache[b.guid],a.removeDelegateListeners(b,!0)},a.delegate=function(b,c){if(a.SELF_PROXY_MAP[c])return void this._addDelegateListener(b,c,!0);var d=b.stage;if(d)a._hasEventListened(d,c)||a._addDelegateListener(d,c);else{var e=a._cache[b.guid];e||(e=a._cache[b.guid]=[]),e.indexOf(c)<0&&e.push(c)}},a.onProxy=function(b){var c=a._eventTable[b.target.getAttribute("data-guid")];if(c){var d=c.target;d.stage&&d.DOMEventsEnabled&&d.dispatchEvent(b)}},a.onDelegate=function(a){var b=Pf.stages[a.currentTarget.getAttribute("data-guid")];if(b){var c=+a.target.getAttribute("data-guid");if(!c)for(var d=a.target.parentNode,e=a.currentTarget;!c&&d&&d!==e;)c=+d.getAttribute("data-guid"),d=d.parentNode;var f;c&&(f=b.context.components.queryByGuid(c))&&f.DOMEventsEnabled&&f.dispatchEvent(a)}else Ui.fatal("leo_DOMEventDelegate.onDelegate()","Cannot find stage")},a._cache={},a._eventTable={},a.SELF_PROXY_MAP={mouseenter:!0,mouseleave:!0},a}(),tf=function(a){function b(){a.call(this),this.circles=[],this._color="rgb(238,85,85)"}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.canvas=this.node.addClass("leo-comp--hotspot").el("canvas")[0],this.watch("visible",this.playPauseAnimation,this)},b.prototype.playPauseAnimation=function(){var a=this.animation;this.visible&&this.stage?(a||(a=this.createAnimation(),this.animation=a),a.resume()):a&&a.stop()},b.prototype.addCircle=function(a){this.circles.push({next:!1,birth:this.getNow()-1e3*a})},b.prototype.getNow=function(){return(new Date).getTime()},b.prototype.checkData=function(a){for(var b,c=this.circles,d=0;b=c[d];)a-b.birth>=3e3?c.splice(d-1,1):d++;var e,f=c[c.length-1];for(f?e=f.time:(e=a,f={birth:a},this.circles.push(f));c.length<1;)c.unshift({birth:e-3e3*(c.indexOf(f)+1)})},b.prototype.createAnimation=function(){var a=this;if(this.actualWidth&&this.actualHeight){var b=gd.create(null,1/0,{onRender:function(){var b=a.canvas.getContext("2d"),c=a.actualWidth,d=a.actualHeight,e=Math.min(c,d),f=e/8,g=c/2,h=d/2;b.clearRect(0,0,c,d),b.save(),b.beginPath(),b.arc(g,h,f,0,2*Math.PI,!1),b.fill();var i=a.getNow();a.checkData(i);for(var j,k=0,l=a.circles;j=l[k++];){var m=(i-j.birth)/3e3;b.beginPath(),b.arc(g,h,(e/2-f/2)*m+f/2,0,2*Math.PI,!1),b.lineWidth=f*(1-m)/4,b.globalAlpha=1-m,b.stroke(),b.closePath()}b.restore()}},{repeat:1/0,easing:"easeOutQuart"});return kd.getInstance().add(b),b.stop(),b}},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation&&this.animation.destroy(),this.canvas=null,this.unwatch("visible",this.playPauseAnimation,this)},b.prototype._onActualWidthChange=function(){this.canvas.width=this.actualWidth},b.prototype._onActualHeightChange=function(){this.canvas.height=this.actualHeight},d(b.prototype,"color",{set:function(a){if(a=cf.parseToString(a),a&&this._color!==a){this._color=a;var b=this.canvas.getContext("2d");b.fillStyle=a,b.strokeStyle=a}},enumerable:!0,configurable:!0}),b.prototype.leave=function(){a.prototype.leave.call(this),this.playPauseAnimation()},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.playPauseAnimation()},b}(gf);ef.register("hotspot",null,{hotSpotColor:"color"}),ff.register("hotspot",tf);var uf=function(a){function b(){a.call(this),this._filter=null,this._loadingEl=null,this._changeSrcEnabled=!0,this.transitionConfig={name:"None",duration:0,easing:"easeInOutCubic"},this._isInTransition=!1,this._transition=null}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._images=new Array(2),this._images[0]=this._createImage(),this.node.addClass("leo-comp--img")},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"filter",{get:function(){return this._filter?this._filter:this._filter=new Wh(this._dom,this)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this._images[0].src},set:function(a){if(a=a||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",this._changeSrcEnabled&&this._images[0].src!==a){var b=this._images[0].src;this._load(a),this.notifyPropertyChange("src",b)}},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.src=a.src},d(b.prototype,"loadingEl",{get:function(){return this._loadingEl||(this._loadingEl=Hi("i").addClass("leo-loading")),this._loadingEl},enumerable:!0,configurable:!0}),d(b.prototype,"image",{get:function(){return this._images[0].img},enumerable:!0,configurable:!0}),d(b.prototype,"naturalWidth",{get:function(){return this._images[0].width},enumerable:!0,configurable:!0}),d(b.prototype,"naturalHeight",{get:function(){return this._images[0].height},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.image.style.width=a+"px"},b.prototype._onActualHeightChange=function(){var a=this.actualHeight;this.image.style.height=a+"px"},b.prototype._destroyImages=function(){this._stopTransition();for(var a=Bd,b=this._images,c=-1,d=b.length;++c<d;){var e=b[c];e&&e.readyState<2&&(e.img.onload=e.img.onerror=null,e.src&&(e.src=a))}b.length=0,this._images=null},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._filter&&(this._filter.destroy(),this._filter=null),this._loadingEl&&(ld.stopTweensOf(this._loadingEl[0]),this._loadingEl.remove(),this._loadingEl=null),this._destroyImages()},d(b.prototype,"readyState",{get:function(){return this._images[0].readyState},enumerable:!0,configurable:!0}),b.prototype._createImage=function(){return{src:null,img:new Image,width:0,height:0,readyState:0}},b.prototype._load=function(a){a=a||Bd;var b=this._images,c=b[0],d=b[1];d&&d.src===a?(c.readyState<2&&(c.img.onload=c.img.onerror=null),this._swapImages(),c=b[0],d=b[1],d.readyState>1?(this._onload(),this.dispatchSimpleEvent("load")):(c.img.style.display="",d.img.style.display="none",d.img.src=Bd,d.src=null,d.readyState=0)):(c.readyState>1&&(this._swapImages(),c=b[0],d=b[1]),c.img.onload=c.img.onerror=null,c.width=c.height=0,c.src=a,c.readyState=1,this._startLoading())},b.prototype._startLoading=function(){var a=this,b=this._images[0];this.loadingEl[0].parentNode||this._loadingEl.appendTo(this._dom),this._visible&&this._stage?ld.to(this._loadingEl[0],200,{opacity:1,display:""}):(this._loadingEl[0].style.opacity="1",Xb(this._loadingEl[0])),b.img.onerror=b.img.onload=function(){b.readyState=2,a._onload(),a.dispatchSimpleEvent("load")},b.img.src=b.src},b.prototype._onload=function(){var a=this._images[0],b=a.img;this.node.append(b),b.onload=b.onerror=null,a.height=b.naturalHeight||b.height||0,a.width=b.naturalWidth||b.width||0,this._loadingEl&&(this._visible&&this._stage?ld.to(this._loadingEl[0],200,{opacity:0,display:"none"}).addEventListener("end",this._loadingEl.remove,this._loadingEl):(this._loadingEl.remove(),Yb(this._loadingEl[0]),this._loadingEl[0].style.opacity="0")),this._images[1]&&(this.node.append(this._images[1].img),this._stage&&this._visible?this._startTransition():b.style.display="")},b.prototype._swapImages=function(){var a=this._images;a[1]||(a[1]=this._createImage(),a[1].img.style.display="none");var b=a[0];a[0]=a[1],a[1]=b;var c=this._transform.deferred;this._transform.deferred=!0,this._onActualWidthChange(),this._onActualHeightChange(),this._transform.deferred=c},b.prototype.leave=function(){this._stopTransition(),a.prototype.leave.call(this)},b.prototype._startTransition=function(){var a=this._images[0],b=this._images[1];this._isInTransition&&this._stopTransition(),this._isInTransition=!0;var c=this.transitionConfig;this._transition=fd.transition(b.img,a.img,c.name,c.duration,c),this._transition.addEventListener("end",this._stopTransition,this)},b.prototype._stopTransition=function(){null!=this._transition&&(this._transition.removeEventListener("end",this._stopTransition,this),this._transition.currentTotalTime=this._transition.totalDuration,this._transition=null,this._isInTransition=!1)},b}(gf);ef.register("image",null,null,function(a){return Wh.KEYWORDS[a]?"filter."+a:null}),ff.register("image",uf);var vf=function(a){function b(){a.call(this),this._state=0,this._colors=["rgba(0,0,0,0)","rgba(0,0,0,0)","rgba(0,0,0,0)"]}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--link"),this._bindEvents()},d(b.prototype,"state",{get:function(){return this._state},set:function(a){a>=0&&2>=a&&this._state!==a&&this._updateColor(this._state=a)},enumerable:!0,configurable:!0}),d(b.prototype,"defaultColor",{get:function(){return this._colors[0]},set:function(a){this._colors[0]!==a&&(this._colors[0]=a,this._updateColor(0))},enumerable:!0,configurable:!0}),d(b.prototype,"hoverColor",{get:function(){return this._colors[1]},set:function(a){this._colors[1]!==a&&(this._colors[1]=a,this._updateColor(1))},enumerable:!0,configurable:!0}),d(b.prototype,"activeColor",{get:function(){return this._colors[2]},set:function(a){this._colors[2]!==a&&(this._colors[2]=a,this._updateColor(2))},enumerable:!0,configurable:!0}),b.prototype._updateColor=function(a){this._state===a&&(this._dom.style.backgroundColor=this._colors[a])},b.prototype._bindEvents=function(){var a=this;this.addEventListener("mouseenter",function(){a.state=1},null),this.addEventListener("mouseleave",function(){a.state=0},null);var b=0;this.addEventListener("tapstart",function(){b=a._state,a.state=2},null),this.addEventListener("tapend",function(){2===a._state&&(a.state=2===b?0:b,b=0)},null),this.watch("visible",function(){a.state=0},null)},b.prototype.enter=function(b){this.state=0,a.prototype.enter.call(this,b)},b}(gf);ef.register("link",null,{linkNormalColor:"defaultColor",linkOverColor:"hoverColor",linkDownColor:"activeColor",shadow:"!"}),ff.register("link",vf);var wf=function(a){function b(){a.apply(this,arguments),this._direction="left",this._speed=100,this._src=""}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.mb=this.node.addClass("leo-comp--moving-background").el("div").addClass("moving-background"),this.watch("visible",this.playPauseAnimation,this)},b.prototype.leave=function(){a.prototype.leave.call(this),this.playPauseAnimation()},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.playPauseAnimation()},b.prototype.playPauseAnimation=function(){if(this.stage){var a=this.animation;this.visible?this.globalAnimation().resume():a&&a.pause()}},b.prototype.globalAnimation=function(){var a=this,b=this.animation;return b?b:(b=gd.create(null,1/0,{onRender:function(b,c,d){var e=a.data;if(e){var f="left"===a._direction||"top"==a._direction;e.delta=e.delta+(f?-1:1)*(c-d)/1e3*a._speed,a.mb.style(e.type,(e.start+(e.delta%e.size-(f?0:e.size)))%e.size)}}},{easing:"linear"}),kd.getInstance().add(b.pause()),this.animation=b)},b.prototype.update=function(){var a=this._direction,b=this.actualWidth,c=this.actualHeight,d=this.getLength,e=this.img.width,f=this.img.height,g=this.mb,h="top"===a||"bottom"===a,i=h?"ty":"tx";e&&f&&c&&b&&(g.style(h?"height":"width",h?d(f,c):d(e,b)),this.data={type:i,size:h?f:e,delta:0,start:Gi(g).style(i)})},b.prototype.getLength=function(a,b){return a>=b?2*a:Math.ceil(b/a)*a+a},d(b.prototype,"direction",{set:function(a){this._direction!==a&&(this._direction=a,this.update())},enumerable:!0,configurable:!0}),d(b.prototype,"speed",{set:function(a){this._speed=a},enumerable:!0,configurable:!0}),d(b.prototype,"backgroundImage",{set:function(a){var b=this;if(this._src!==a){this._src=a;var c=new Image,d=this.mb;c.onload=c.onerror=function(){c.onload=c.onerror=null,d.style("backgroundImage","url("+a+")"),b.update(),c=null,d=null},c.src=a,this.img=c}},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){this.update()},b.prototype._onActualHeightChange=function(){this.update()},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation&&this.animation.destroy(),this.unwatch("visible",this.playPauseAnimation,this),this.img=null,this.mb=null},b}(gf);ef.register("movingbackground",null,{backgroundImage:"backgroundImage"}),ff.register("movingbackground",wf);var xf=function(a){function b(){a.apply(this,arguments),this.anchorX=.5,this.anchorY=.5,this.timer=0,this._backgroundImage="",this._direction=0,this._speed=0,this._mode="normal",this.moveMode=this.normal,this._spin=0,this._zoomSpeedX=0,this._zoomSpeedY=0,this._zoomWidth=0,this._zoomHeight=0}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.img=this.node.el("img").addClass("leo-comp--moving-object-img"),this.watch("visible",this.changeVisible,this)},b.prototype.leave=function(){this.animation.pause(),a.prototype.leave.call(this)},b.prototype.enter=function(b){this.animation.resume(),a.prototype.enter.call(this,b)},b.prototype.changeVisible=function(){this.animation||(this.animation=this.createAnimation()),this.animation[this.visible?"resume":"pause"]()},b.prototype.createAnimation=function(){var a=this,b=gd.create(null,1/0,{onRender:function(b,d,e){var f=(d-e)/1e3,g=a.timer+=f;if(a.img.style("rotation",g*a._spin%360),a._zoomSpeedX>0){var h=Math.abs(a._actualWidthCopy-a._zoomWidth),i=g*a._zoomSpeedX%(2*h);i>h&&(i=2*h-i),a.actualWidth=a._actualWidthCopy+i*(a._actualWidthCopy>=a._zoomWidth?-1:1)}if(a._zoomSpeedY>0){var j=Math.abs(a._actualHeightCopy-a._zoomHeight),k=g*a._zoomSpeedY%(2*j);k>j&&(k=2*j-k),a.actualHeight=a._actualHeightCopy+k*(a._actualHeightCopy>=a._zoomHeight?-1:1)}if(a._initX!==c&&a._initY!==c){var l=a.x+f*a._speed*Math.cos(a._direction/180*Math.PI),m=a.y-f*a._speed*Math.sin(a._direction/180*Math.PI);a.moveMode(parseFloat(l.toFixed(4)),parseFloat(m.toFixed(4)))}}},{easing:"linear"});return kd.getInstance().add(b.pause()),b},b.prototype.collision=function(a,b){var c=this.getTransformBound(),d=this._direction,e=this.stage.actualWidth-c.width-c.left,f=-c.left,g=this.stage.actualHeight-c.height-c.top,h=-c.top;(a>this.stage.actualWidth-c.width-c.left&&this.isQuadrant(d,1,4)||a<-c.left&&this.isQuadrant(d,2,3))&&(this.direction=180-d),(b>this.stage.actualHeight-c.height-c.top&&this.isQuadrant(d,3,4)||b<-c.top&&this.isQuadrant(d,1,2))&&(this.direction=360-d),a>e&&this.isQuadrant(d,1,4)&&(a=e),f>a&&this.isQuadrant(d,2,3)&&(a=f),b>g&&this.isQuadrant(d,3,4)&&(b=g),h>b&&this.isQuadrant(d,1,2)&&(b=h),this.x=a,this.y=b},b.prototype.alternate=function(a,b){var c=this.getTransformBound(),d=this._direction,e=this.stage.actualWidth-c.width-c.left,f=-c.left,g=this.stage.actualHeight-c.height-c.top,h=-c.top;(a>e&&this.isQuadrant(d,1,4)||f>a&&this.isQuadrant(d,2,3)||b>g&&this.isQuadrant(d,3,4)||h>b&&this.isQuadrant(d,1,2))&&(this.direction=180+d),a>e&&this.isQuadrant(d,1,4)&&(a=e,b=-this.getY(a)),f>a&&this.isQuadrant(d,2,3)&&(a=f,b=-this.getY(a)),b>g&&this.isQuadrant(d,3,4)&&(b=g,a=this.getX(-b)),h>b&&this.isQuadrant(d,1,2)&&(b=h,a=this.getX(-b)),this.x=a,this.y=b
},b.prototype.normal=function(a,b){var c=this.getTransformBound(),d=10,e=this._direction;if(90===e||270===e){var f=this.stage.actualHeight-c.top+d,g=-c.height-c.top-d;g>b&&(b=f,this.timer=0),b>f&&(b=g,this.timer=0)}else{var h=0===e||180===e?-1/0:this.getX(-this.stage.actualHeight+c.top),i=0===e||180===e?1/0:this.getX(c.height+c.top),j=[-c.width-c.left,h,i,this.stage.actualWidth-c.left];j.sort(function(a,b){return a-b}),j[2]+=d,j[1]-=d,a>j[2]&&(a=j[1],b=-this.getY(a)||b,this.timer=0),a<j[1]&&(a=j[2],b=-this.getY(a)||b,this.timer=0)}this.x=a,this.y=b},b.prototype.getX=function(a){return(a-(-this._initY-Math.tan(this._direction/180*Math.PI)*this._initX))/Math.tan(this._direction/180*Math.PI)},b.prototype.getY=function(a){return Math.tan(this._direction/180*Math.PI)*a+(-this._initY-Math.tan(this._direction/180*Math.PI)*this._initX)},b.prototype.isQuadrant=function(a,b,c){return a>=90*(b-1)&&90*b>a||a>=90*(c-1)&&90*c>a?!0:!1},b.prototype._onActualWidthChange=function(a){this._actualWidthCopy||(this._actualWidthCopy=a)},b.prototype._onActualHeightChange=function(a){this._actualHeightCopy||(this._actualHeightCopy=a)},d(b.prototype,"backgroundImage",{set:function(a){this._backgroundImage!==a&&(this._backgroundImage=a,this.node.select("img").attr("src",a))},enumerable:!0,configurable:!0}),d(b.prototype,"initX",{set:function(a){this._initX=this.x=a+this._actualWidth/2},enumerable:!0,configurable:!0}),d(b.prototype,"initY",{set:function(a){this._initY=this.y=a+this._actualHeight/2},enumerable:!0,configurable:!0}),d(b.prototype,"direction",{set:function(a){0>a&&(a=360*(-a%360+1)+a),this._direction=a%360},enumerable:!0,configurable:!0}),d(b.prototype,"speed",{set:function(a){this._speed=a},enumerable:!0,configurable:!0}),d(b.prototype,"mode",{set:function(a){this._mode!==a&&(this._mode=a,this.moveMode="collision"===a?this.collision:"alternate"===a?this.alternate:this.normal)},enumerable:!0,configurable:!0}),d(b.prototype,"spin",{set:function(a){this._spin=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomSpeedX",{set:function(a){this._zoomSpeedX=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomSpeedY",{set:function(a){this._zoomSpeedY=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomWidth",{set:function(a){this._zoomWidth=a},enumerable:!0,configurable:!0}),d(b.prototype,"zoomHeight",{set:function(a){this._zoomHeight=a},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){a.prototype.destroy.call(this),this.animation&&(this.animation.destroy(),this.animation=null),this.unwatch("visible",this.changeVisible,this),this.img=null},b}(gf);ef.register("movingobject",null,{backgroundImage:"backgroundImage",left:"initX",top:"initY"}),ff.register("movingobject",xf);var yf=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--paypalbuy")},b.prototype._onActualWidthChange=function(){a.prototype._onActualWidthChange.call(this),this._button.style({paddingLeft:.25*this.actualWidth})},b}(mf);ff.register("paypalbuy",yf,"button");var zf=function(a){function b(){a.call(this),this._textContent="",this._bgSrc="",this.animation=null}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._textFormat=new Mi(this._node,this),this.watch("textFormat.size",function(){this.span.style({fontSize:this._textFormat.size/2+"px"})},this),this.watch("visible",function(){this._visible?this._resumeZoom():this._pauseZoom()},this),this.node.addClass("leo-comp--paypaldiscount")},d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),b.prototype._onActualHeightChange=function(){this.div.style({lineHeight:this.actualHeight+"px"})},b.prototype.createNode=function(){var a=this,b=Hi("div").bind("mouseover",function(){a.node.style({scaleX:1.05,scaleY:1.05})}).bind("mouseout",function(){a.node.style({scaleX:1,scaleY:1})});return this.img=b.el("img"),this.div=b.el("div"),this.span=this.div.el("span").html("OFF"),b},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){this.div.text(a+"%").append(this.span),this._textContent=a},enumerable:!0,configurable:!0}),d(b.prototype,"bgSrc",{get:function(){return this._bgSrc},set:function(a){this.img.attr("src",a)},enumerable:!0,configurable:!0}),b.prototype.leave=function(){a.prototype.leave.call(this),this.animation&&(this.animation.destroy(),this.animation=null)},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.animation=this._createZoom(),this._resumeZoom()},b.prototype._createZoom=function(){var a=fd.getAnimation(this.img[0],"Zoom",4e3,{repeat:999999,scale:.05});return a.pause(),kd.getInstance().add(a),a},b.prototype._resumeZoom=function(){this._stage&&this.animation&&this.visible&&this.animation.resume()},b.prototype._pauseZoom=function(){this.animation&&this.animation.pause()},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._textFormat.destroy(),this._textFormat=null},b}(gf);ef.register("paypaldiscount",null,{backgroundImage:"bgSrc"},function(a){return Mi.compatProperty(a)}),ff.register("paypaldiscount",zf);var Af=function(a){function b(){a.call(this),this._textContent=""}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._textFormat=new Mi(this.node,this),this.watch("textFormat.size",function(){this.content.style({fontSize:3*this._textFormat.size/10+"px"}),this.node.select("sup").style({fontSize:Math.floor(4*this._textFormat.size/7)+"px"})},this),this.watch("visible",function(){this.fixTextPosition()},this),this.node.addClass("leo-comp--paypalprice")},d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),b.prototype.fixTextPosition=function(){this.visible&&this.actualWidth&&this.actualHeight&&this.div&&this.div.style({top:(this.actualHeight-Ud(this.div[0]))/2,left:(this.actualWidth-Rd(this.div[0]))/2})},b.prototype._onActualHeightChange=function(){this.fixTextPosition()},b.prototype._onActualWidthChange=function(){this.fixTextPosition()},b.prototype.createNode=function(){var a=this,b=Hi("div").bind("mouseover",function(){a.node.style({scaleX:1.1,scaleY:1.1})}).bind("mouseout",function(){a.node.style({scaleX:1,scaleY:1})});return this.img=b.el("img"),this.div=b.el("div"),this.content=this.div.el("p"),this.DOMPrice=this.div.el("p"),b},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){this.content.text(a),this._textContent=a},enumerable:!0,configurable:!0}),d(b.prototype,"price",{get:function(){return this.priceString||""},set:function(a){this.priceString=a;var b,c,d=parseFloat(a),e="";d&&(d=d.toString(),b=a.split(d)[1],c=d.split("."),e=c[0],c[1]&&(e+="<sup>"+c[1]+"</sup>"),e+=b||""),this.DOMPrice.html(e)},enumerable:!0,configurable:!0}),d(b.prototype,"src",{get:function(){return this.img.attr("src")},set:function(a){this.img.attr("src",a)},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){a.prototype.destroy.call(this),this._textFormat.destroy(),this._textFormat=null,this.img=null,this.div=null,this.DOMPrice=null},b}(gf);ef.register("paypalprice",null,{backgroundImage:"src"},function(a){return Mi.compatProperty(a)}),ff.register("paypalprice",Af);var Bf=function(a){function b(){a.call(this),this.hotSize=78,this.li=function(){{var a=Hi("div").addClass("ppproduct--li hi-action");a.el("img")}return a}(),this.urlArray=[]}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--paypalproductbox")},b.prototype.liHeight=function(){return Math.round(.2*this.actualHeight)},b.prototype._onActualWidthChange=function(){var a=Math.min(this.hotSize,Math.min(this.actualWidth,this.actualHeight)/2);this.hot.style({width:a,height:a}),this.centerThumbnail()},b.prototype._onActualHeightChange=function(){var a=Math.min(this.hotSize,Math.min(this.actualWidth,this.actualHeight)/2);this.hot.style({width:a,height:a});var b=this.liHeight(),c=Math.round(.05*b);this.li.style({width:b,padding:c}),Qb(this.ul.select(".ppproduct--li"),function(a){bi(a,{width:b,padding:c})}),this.centerThumbnail()},b.prototype.centerThumbnail=function(){var a=this.actualWidth,b=this.urlArray.length*(this.liHeight()+10)-10;this.ul.style("tx",a>b?(a-b)/2:0)},d(b.prototype,"hotSrc",{set:function(a){var b=this;this.hot.bind("load",function(){Xb(b.hot[0])}),this.hot.bind("error",function(){Yb(b.hot[0])}),this.hot.attr("src",a)},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{set:function(a){this.slideContainer.style("borderColor",a)},enumerable:!0,configurable:!0}),d(b.prototype,"boxShadow",{set:function(a){this.slideContainer.style("boxShadow",a)},enumerable:!0,configurable:!0}),d(b.prototype,"padding",{set:function(a){this.slideContainer.style("padding",a)},enumerable:!0,configurable:!0}),d(b.prototype,"paddingColor",{set:function(a){this.slideContainer.style("backgroundColor",a)},enumerable:!0,configurable:!0}),d(b.prototype,"urls",{set:function(a){var b=this;this.urlArray=(a||"").split(";");var c,d,e=this.urlArray.length;1!==e?(c=Xb,d=100*this.slideHeight+"%",this.ul.html(""),Qb(this.urlArray,function(a,c){{var d=b.li.clone().bind("tap",function(){b.skipTo(c,d)});d.select("img").attr("src",a)}b.ul.append(d)}),this.centerThumbnail()):(c=Yb,d="100%"),c(this.thumbnailContainer[0]),this.slideContainer.style("height",d),this.imgWrap.html(""),this.skipTo(0,this.ul.select(".ppproduct--li:first-child"))},enumerable:!0,configurable:!0}),b.prototype.skipTo=function(a,b){function c(){Yb(this.loading[0])}var d=this,e=this.ul.select(".active");if(!(e.length>0&&e[0]===b[0])){Xb(this.loading[0]);var f=this.imgWrap.select(".active").removeClass("active"),g=this.imgWrap.el("img").bind("load",function(){c.call(d)}).bind("error",function(){c.call(d)}).attr("src",this.urlArray[a]).addClass("active");if(f[0]){var h=fd.getTransition(f[0],g[0],Object.keys(fd._transitionFactories)[Math.floor(Object.keys(fd._transitionFactories).length*Math.random())],500);h.addEventListener("end",function(){f.remove()},this),kd.getInstance().add(h)}e.removeClass("active"),b.addClass("active");var i=this.width,j=10,k=this.liHeight()+j,l=0,m=i-this.urlArray.length*k+j,n=(-a+1)*k,o=i-(a+2)*k+j,p=parseInt(this.ul.style("tx"),10);n>l&&(n=l),m>o&&(o=m),n>p&&(p=n),p>o&&(p=o),this.ul.style("tx",p)}},b.prototype.createNode=function(){var a=Hi("div");return this.hot=a.el("img"),this.slideContainer=a.el("div").addClass("ppproduct--slide"),this.imgWrap=this.slideContainer.el("div"),this.loading=this.slideContainer.el("i").addClass("leo-loading"),this.thumbnailContainer=a.el("div").addClass("ppproduct--thumbnail"),this.ul=this.thumbnailContainer.el("div"),a},b}(gf);ef.register("paypalproductbox",null,{backgroundImage:"hotSrc",borderColor:"borderColor",frameWidth:"padding",frameColor:"paddingColor",shadow:"!"}),ff.register("paypalproductbox",Bf);var Cf=function(a){function b(){a.call(this),this._readyState=0,this._rate=5}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("visible",function(){this.visible?this._resumeAnimation():this._pauseAnimation()},this),this.node.addClass("leo-comp--paypalstar")},d(b.prototype,"maxrate",{get:function(){return 5},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.canvas.width=a,this.canvas.style.width=a+"px",this.updateCanvas()},b.prototype._onActualHeightChange=function(){var a=this.actualHeight;this.canvas.height=a,this.canvas.style.height=a+"px",this.updateCanvas()},d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype.updateStar=function(){var a,b=this.node.select("img"),c=this.maxrate,d=this.rate;if(this.star_url)for(;c--;){var a=b[c];a.src=c>=d?this.gray_star_url:this.star_url}},b.prototype.onload=function(){this._readyState=2,this.dispatchSimpleEvent("load"),this.updateStar(),this.updateCanvas()},b.prototype.updateCanvas=function(){if(2===this.readyState){var a=this.canvas,b=a.cloneNode(!1).getContext("2d");if(b){for(var c=this.maxrate,d=a.width,e=a.height;c--;)b.drawImage(this.img,c*d/5,0,d/5,e);var f=Math.round(.5*d),g=a.cloneNode(!1).getContext("2d"),h=g.createLinearGradient(0,0,f,0);h.addColorStop(0,"rgba(255,255,255,0)"),h.addColorStop(.1,"rgba(255,255,255,.1)"),h.addColorStop(.5,"rgba(255,255,255,.7)"),h.addColorStop(.9,"rgba(255,255,255,.1)"),h.addColorStop(1,"rgba(255,255,255,0)"),g.save(),g.fillStyle=h,g.rotate(15*Math.PI/180),g.translate(Math.atan(15*Math.PI/180)*e,0),g.fillRect(0,-f,f,e+2*f),g.restore(),this.animation&&this.animation.destroy();var i=a.getContext("2d");this.animation=gd.create(this,4e3,{onRender:function(a){i.clearRect(0,0,d,e),i.globalCompositeOperation="source-over",i.drawImage(g.canvas,(5*a-1)*d,0),i.globalCompositeOperation="destination-in",i.drawImage(b.canvas,0,0)}},{repeat:999999}),this.animation.pause(),kd.getInstance().add(this.animation),this._resumeAnimation()}}},d(b.prototype,"src",{set:function(a){var b=a.split(";");this.star_url=b[0],this.gray_star_url=b[1]},enumerable:!0,configurable:!0}),b.prototype.load=function(){var a=this,b=new Image,c=new Image,d=!1,e=!1;this._readyState=1,b.onload=function(){b.onload=b.onerror=null,d=!0,d&&e&&a.onload(b)},c.onload=function(){c.onload=c.onerror=null,e=!0,d&&e&&a.onload(c)},b.onerror=c.onerror=function(){a._readyState=4,a.dispatchSimpleEvent("load")},b.src=this.star_url,c.src=this.gray_star_url,this.img=b},d(b.prototype,"rate",{get:function(){return this._rate},set:function(a){var b=this.maxrate;a=Math.min(a,b),a=Math.max(a,0),this._rate=a,this.updateStar()},enumerable:!0,configurable:!0}),b.prototype.createNode=function(){var b=a.prototype.createNode.call(this),c=Hi("img"),d=this.maxrate,e=c[0],f=0;do b.append(e),e=e.cloneNode(!1);while(++f<d);var g=Hi("canvas").appendTo(b);return this.canvas=g[0],b},b.prototype.leave=function(){a.prototype.leave.call(this),this.animation&&(this.animation.destroy(),this.animation=null)},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.updateCanvas()},b.prototype._resumeAnimation=function(){this._stage&&this.animation&&this.visible&&this.animation.resume()},b.prototype._pauseAnimation=function(){this.animation&&this.animation.pause()},b}(gf);ff.register("paypalstar",Cf);var Df=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("visible",this.showHideSWF,this),this.node.addClass("leo-comp-flash")},b.prototype.showHideSWF=function(){this.swf&&(this.visible&&this.stage?this.swf.replay():this.swf.stop())},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.showHideSWF()},b.prototype.leave=function(){a.prototype.leave.call(this),this.showHideSWF()},b.prototype.rePositionSWF=function(){if(this.swf){var a,b=this.actualWidth,d=this.actualHeight,e=this._natualWidth,f=this._natualHeight,g=this._offsetX,h=this._offsetY;b&&d&&e&&f&&g!==c&&h!==c&&(a=b/d>e/f?f/d:e/b,this.swf.offsetX=g/a,this.swf.offsetY=h/a)}},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.swf&&this.swf.destroy()},d(b.prototype,"src",{set:function(a){this._src!==a&&(this._src=a,this.swf?this.swf.src=a:this.swf=new Li(this.dom,{swf:a,width:this.actualWidth,height:this.actualHeight,play:!1,wmode:"transparent"}))},enumerable:!0,configurable:!0}),d(b.prototype,"offsetX",{set:function(a){this._offsetX=a,this.rePositionSWF()},enumerable:!0,configurable:!0}),d(b.prototype,"offsetY",{set:function(a){this._offsetY=a,this.rePositionSWF()},enumerable:!0,configurable:!0}),d(b.prototype,"natualWidth",{set:function(a){this._natualWidth=a,this.rePositionSWF()},enumerable:!0,configurable:!0}),d(b.prototype,"natualHeight",{set:function(a){this._natualHeight=a,this.rePositionSWF()},enumerable:!0,configurable:!0}),b.prototype._onActualWidthChange=function(){this.swf&&(this.swf.width=this.actualWidth),this.rePositionSWF()},b.prototype._onActualHeightChange=function(){this.swf&&(this.swf.height=this.actualHeight),this.rePositionSWF()},b}(gf);ff.register("flash",Df);var Ef=function(a){function b(){a.call(this),this.context=new of(this),this.transitionConfig={name:"None",duration:500,easing:"easeInOutCubic"}}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._asSymbol(),this._node.addClass("leo-comp--scene")},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.context.destroy(),this.context=null},b.prototype.enter=function(b){a.prototype.enter.call(this,b)},b.prototype.leave=function(){a.prototype.leave.call(this)},b}(nf);ff.register("scene",Ef);var Ff=function(a){function b(){a.call(this),this._interval=3e3,this._duration=350,this._autoPlay=!1}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("hi-action")},b.prototype.next=function(){},d(b.prototype,"interval",{set:function(a){this._interval=a},enumerable:!0,configurable:!0}),d(b.prototype,"duration",{set:function(a){this._duration=a},enumerable:!0,configurable:!0}),b.prototype.timeoutHandler=function(){var a=this;this.next(),clearTimeout(this.timeout),this.timeout=setTimeout(function(){a.timeoutHandler()},this._interval+this._duration)},d(b.prototype,"autoPlay",{get:function(){return this._autoPlay},set:function(a){var b=this;a!==this._autoPlay&&(this._autoPlay=a,clearTimeout(this.timeout),a&&(this.timeout=setTimeout(function(){b.timeoutHandler()},this._interval+this._duration)))},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){clearTimeout(this.timeout),a.prototype.destroy.call(this)},d(b.prototype,"borderWidth",{set:function(a){this.dom.style.borderWidth=a+"px"},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{set:function(a){this.dom.style.borderColor=a},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{set:function(a){bi(this.dom,"box-shadow",a)},enumerable:!0,configurable:!0}),b}(gf);ef.register("slidecontrol",null,{borderColor:"borderColor",borderWidth:"borderWidth",shadow:"shadow"}),ff.register("slidecontrol",Ff);var Gf=function(a){function c(){a.call(this),this._rotate=1.6,this._stack=5,this.__zIndex=9999999,this.currentIndex=0,this.removeData=[]}return dd(c,a),c.prototype.enter=function(c){a.prototype.enter.call(this,c);var d=this._urls,e=d&&d.length,f=this._stack,g=this._rotate;if(e){for(var h=this._style=kh("style"),i="transform: rotate("+(f-1)*g+"deg);",j=".slide-stack-"+this.__leo_guid__+"{-webkit-"+i+"-moz-"+i+"-ms-"+i+"-o-"+i+i+"}",k=0;f>k;)i="transform: rotate("+(f>k?k:f)*g+"deg);",j+=".slide-stack-"+this.__leo_guid__+":nth-child("+(k+1)+"){-webkit-"+i+"-moz-"+i+"-ms-"+i+"-o-"+i+i+";}",k++;h.innerHTML=j,b.head.appendChild(h)}},d(c.prototype,"rotate",{set:function(a){this._rotate=a},enumerable:!0,configurable:!0}),d(c.prototype,"url",{set:function(a){var b=this;this.URLString=a,this._urls=a.split(";"),this.initStack(),nh(this.dom,"tap",this.tap=function(a){a.stopPropagation(),b.next()})},enumerable:!0,configurable:!0}),d(c.prototype,"stack",{set:function(a){this._stack=a,this.initStack()},enumerable:!0,configurable:!0}),c.prototype.newPage=function(a){var b=Hi("div").addClass("slide-stack-"+this.__leo_guid__).style("zIndex",this.__zIndex--),c=b.el("i").addClass("leo-loading"),d=b.el("img")[0],a=this.currentIndex+1,e=this._urls.length;return 0>a&&(a=e-1),a>=e&&(a=0),this.node.append(b),d.onload=d.onerror=function(){d.onload=d.onerror=null,c.remove()},d.src=this._urls[a]||"",this.currentIndex=a,b[0]},c.prototype.initStack=function(){var a=this._urls&&this._urls.length,b=this._stack;if(a&&b){var c=0;this.node.html("").addClass("leo-comp--slide-stack stack-"+this.__leo_guid__);for(var d=this.stackArray=[];b>c;)d.push(this.newPage(c++))}},c.prototype.next=function(){var a=this,b=this.stackArray,c=b.shift();b.push(this.newPage(this.currentIndex+1)),bi(c,{left:"100%",opacity:0}),this.removeData.push(c),clearTimeout(this.removeTimeout),this.removeTimeout=setTimeout(function(){for(var b=0,c=a.removeData,d=c.length,e=a.dom;b++<d;)e.removeChild(c.pop())},this._duration)},c.prototype.destroy=function(){a.prototype.destroy.call(this),this.stackArray=null,this.removeData=null;var c=b.head;this._style&&(c.removeChild(this._style),this._style=null),this._width_style&&(c.removeChild(this._width_style),this._width_style=null),this._color_style&&(c.removeChild(this._color_style),this._color_style=null),this._shadow_style&&(c.removeChild(this._shadow_style),this._shadow_style=null),this._origin_style&&(c.removeChild(this._origin_style),this._origin_style=null),this._duration_style&&(c.removeChild(this._duration_style),this._duration_style=null)},d(c.prototype,"borderWidth",{set:function(a){this._width_style=Gi(b.head).el("style").html(".stack-"+this.__leo_guid__+" div{border-width:"+a+"px}")[0]},enumerable:!0,configurable:!0}),d(c.prototype,"borderColor",{set:function(a){this._color_style=Gi(b.head).el("style").html(".stack-"+this.__leo_guid__+" div{border-color:"+a+"}")[0]},enumerable:!0,configurable:!0}),d(c.prototype,"shadow",{set:function(a){a="box-shadow:"+a+";",this._shadow_style=Gi(b.head).el("style").html(".stack-"+this.__leo_guid__+" div{-webkit-"+a+"-moz-"+a+"-ms-"+a+"-o-"+a+a+"}")[0]},enumerable:!0,configurable:!0}),d(c.prototype,"origin",{set:function(a){a="transform-origin:"+a+";",this._origin_style=Gi(b.head).el("style").html(".stack-"+this.__leo_guid__+" div{-webkit-"+a+"-moz-"+a+"-ms-"+a+"-o-"+a+a+"}")[0]},enumerable:!0,configurable:!0}),d(c.prototype,"duration",{set:function(a){a="transition-duration:"+a+"ms;",this._duration_style=Gi(b.head).el("style").html(".stack-"+this.__leo_guid__+" div{-webkit-"+a+"-moz-"+a+"-ms-"+a+"-o-"+a+a+"}")[0]},enumerable:!0,configurable:!0}),c}(Ff);ef.register("album","slidecontrol"),ff.register("album",Gf);var Hf=function(a){function e(){a.call(this),this.li=function(){var a=Hi("div").addClass("slide-li");return a.el("img"),a}(),this.urlArray=[],this._eventmap={start:"tapstart",move:"tapmove",end:"tapend"},this.mouseup=function(){},this.mousemove=function(){},this._interval=2500,this._playPause=!0,this._controls=!1}return dd(e,a),e.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.ul.style("tx",-a),this.ul.children().style("width",a),this.li.style("width",a),this.setButtonSize(),this.addSlideEvents()},e.prototype._onActualHeightChange=function(){this.setButtonSize()},e.prototype.setButtonSize=function(){var a=".slide-",b=Math.min(50,Math.ceil(.2*Math.min(this.actualHeight,this.actualWidth)));this.node.select(a+"play,"+a+"pause").style({width:b,height:b,marginLeft:-b/2}),this.node.select(a+"prev").style({width:b,height:b,marginLeft:5*-b/2}),this.node.select(a+"next").style({width:b,height:b,marginLeft:1.5*b})},d(e.prototype,"url",{set:function(a){var b=this;this.URLString=a;var c=this.urlArray=(a||"").split(";"),d=[c[c.length-1]].concat(c);d.push(c[0]),this.ul.html("").style("tx",-this.actualWidth),Qb(d,function(a){var c=b.li.clone().style("width",b.actualWidth),d=c.el("i").addClass("leo-loading"),e=c.select("img")[0];e.onload=e.onerror=function(){this.onload=this.onerror=null,bi(this,"opacity",1),d.remove(),d=null},e.src=a,b.ul.append(c)}),this.addSlideEvents()},enumerable:!0,configurable:!0}),e.prototype.prevNext=function(a,b){var c,d,e=this.slideAnimation,f=this.urlArray.length,g=this.ul,h=parseInt(g.style("tx"),10),i=this.actualWidth;e&&e.destroy(),e=gd.create(g,250,{easing:"easeInOutQuad"}),"boolean"!=typeof a?(d=h%i,c=Math.abs(d)>i/2?Math.floor(h/i)*i:h-d):(d=Math.floor(h/i),c=b?(a?d:d+1)*i:(a?d-1:d+(h%i===0?1:2))*i),e.onRender=function(a){var b=h+(c-h)*a;(f+1)*-i>=b&&(b=-i),b>=0&&(b=-f*i),g.style("tx",b)};var j=this.autoPlayAnimation;j&&!j.paused&&(j.pause(),e.addEventListener("end",j.resume,j));var k=c;(f+1)*-i>=k&&(k=-i),k>=0&&(k=-f*i),this.dispatchSimpleEvent("skip",{index:-k/i}),kd.getInstance().add(e),this.slideAnimation=e},e.prototype.createNode=function(){var a=Hi("div").addClass("leo-comp--slide hi-action");return bf.isWinPhone&&a.style("touchAction","none"),this.ul=a.el("div").addClass("slide-ul"),this.imgCover=a.el("div").addClass("drag-cover"),a},d(e.prototype,"tagName",{get:function(){return"dslide"},enumerable:!0,configurable:!0}),d(e.prototype,"taponly",{set:function(a){this._eventmap=a?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"tapstart",move:"tapmove",end:"tapend"}},enumerable:!0,configurable:!0}),e.prototype.addSlideEvents=function(){function a(a){a.preventDefault();var b=a.pageX,c=h+b-g;(f+1)*-e>=c&&(c=-e),c>=0&&(c=-f*e),j.style("tx",c)}var d=this,e=this.actualWidth,f=this.urlArray.length;if(0!==e){var g,h,i,j=(this.imgCover,this.ul),k=Gi(b);k.unbind(this._eventmap.start,this.mouseup),k.unbind(this._eventmap.move,this.mousemove),this.imgCover.unbindAll(),this.imgCover.bind(this._eventmap.start,function(b){d.slideAnimation&&d.slideAnimation.destroy(),g=b.pageX,i=(new Date).getTime(),h=parseInt(j.style("tx"),10),k.bind(d._eventmap.move,a)});var l=function(b){if(k.unbind(d._eventmap.move,a),g!==c&&null!==g){var f=b.pageX;!f&&b.originalEvent.changedTouches&&(f=b.originalEvent.changedTouches[0].pageX);var h,j=f-g,l=e/2,m=(new Date).getTime()-i;150>m&&Math.abs(j)>20&&(h=j>0?!1:!0),j>l&&(h=!1),-l>j&&(h=!0),d.prevNext(h,!0),g=null}};k.bind(this._eventmap.end,l),this.mouseup=l,this.mousemove=a}},e.prototype.destroy=function(){this.imgCover.unbindAll(),Gi(b).unbind(this._eventmap.end,this.mouseup),this.node.select(".control").unbindAll(),this.slideAnimation&&this.slideAnimation.destroy(),this.autoPlayAnimation&&this.autoPlayAnimation.destroy(),a.prototype.destroy.call(this)},d(e.prototype,"autoPlay",{set:function(a){var b=this;if(this._autoPlay!==a)if(this._autoPlay=a,this.playPauseButton&&(this.playPauseButton[0].className="slide-"+(a?"pause":"play")+" slide-control"),a){var c=gd.create(this.ul,0,null,{repeat:999999,repeatDelay:this._interval});c.onRender=function(){b.prevNext(!0)},kd.getInstance().add(c),this.autoPlayAnimation=c,this.controls=!1,this.slideAnimation&&this.slideAnimation.removeAllEventListeners("end")}else this.autoPlayAnimation&&this.autoPlayAnimation.destroy(),this.autoPlayAnimation=null,this.controls=!0},enumerable:!0,configurable:!0}),d(e.prototype,"interval",{set:function(a){this._interval=a,this.autoPlayAnimation&&(this.autoPlayAnimation.repeatDelay=a)},enumerable:!0,configurable:!0}),e.prototype.next=function(){this.prevNext(!0)},e.prototype.prev=function(){this.prevNext(!1)},e.prototype.playPause=function(){this.autoPlay=!this._autoPlay},d(e.prototype,"controls",{set:function(a){var b=this;if(this._controls!==a&&"boolean"==typeof a){this._controls=a;var c="slide-",d=this.node;if(a){var e={mousedown:function(){bi(this,"backgroundColor","rgba(60,60,60,.3)")},mouseout:function(){bi(this,"backgroundColor","rgba(0,0,0,.5)")},tap:function(a){b[a.currentTarget.getAttribute("data-action")]()}},f=this.playPauseButton=d.el("div").bind(e).attr("data-action","playPause");f[0].className=c+"play "+c+"control  hi-action",f.el("i");var g=f.clone().attr("data-action","prev").bind(e);g[0].className=c+"prev "+c+"control  hi-action",d.append(g);var h=f.clone().attr("data-action","next").bind(e);h[0].className=c+"next "+c+"control  hi-action",d.append(h),this.setButtonSize()}else d.select(".control").remove()}},enumerable:!0,configurable:!0}),d(e.prototype,"borderWidth",{set:function(a){this.node[0].style.borderWidth=a+"px"},enumerable:!0,configurable:!0}),d(e.prototype,"borderColor",{set:function(a){this.node[0].style.borderColor=a},enumerable:!0,configurable:!0}),e}(gf);ef.register("slide",null,{backgroundImage:"src",borderColor:"borderColor",borderWidth:"borderWidth"}),ff.register("slide",Hf);var If=function(a){function e(){a.call(this),this.skipTimeline=null,this.originAutoPlay=!1,this.stopped=!1,this._borderWidth=0,this._borderColor="#000"}return dd(e,a),e.prototype.newPage=function(a){var b=this.node.prepend(Hi("div").addClass("leo-comp--slide-page")).style({borderColor:this._borderColor,borderWidth:this._borderWidth}),c=b.el("i").addClass("leo-loading"),d=b.el("img")[0];return d.onload=d.onerror=function(){d.onload=d.onerror=null,c.remove()},d.src=this.urls[a]||"",b[0]},d(e.prototype,"url",{set:function(a){this.URLString=a,this.node.html("").addClass("leo-comp--slide-vertical");var b=this.urls=a.split(";");b.length>1&&this.addTouchEvent(),this.curDiv=this.newPage(0),this.currentIndex=0},enumerable:!0,configurable:!0}),e.prototype.createData=function(){var a=this.currentIndex,b=this.urls.length-1;this.prevDiv||(bi(this.prevDiv=this.newPage(0===a?b:a-1),{zIndex:2,top:"-100%"}),bi(this.nextDiv=this.newPage(a===b?0:a+1),{zIndex:2,top:"100%"}))},e.prototype.mousemove=function(a,b){if(b>=0)var c=this.prevDiv,d=-1,e="100";else c=this.nextDiv,d=1,e="0";var f=this.height,g=1+.8*d*(b/f);c.style.top=d*f+b+"px",bi(this.curDiv,{scaleX:g,scaleY:g,transformOrigin:"50% "+e+"%"})},e.prototype.mouseup=function(a,b){var c=.25*this._actualHeight;b>=c?this.prev():b>=0&&this.reverse(!1),-c>=b?this.next():0>=b&&this.reverse(!0)},e.prototype.prev=function(){this.skip(this.currentIndex-1,!1)},e.prototype.next=function(){this.skip(this.currentIndex+1,!0)},e.prototype.reverse=function(a){var b=this.skipTimeline=hd.create(),c=ld.create(a?this.nextDiv:this.prevDiv,300);c.apply({top:(a?"":"-")+"100%"}),b.add(c),c=ld.create(this.curDiv,300),c.apply({scaleX:1,scaleY:1}),b.add(c),kd.getInstance().add(b)},e.prototype.stopAutoPlay=function(){this.stopped=!0,(this.autoPlay=!0)&&(this.originAutoPlay=!0),this.autoPlay=!1},e.prototype.reverseAutoPlay=function(){this.stopped=!1,this.autoPlay=this.originAutoPlay},e.prototype.addTouchEvent=function(){var a,c,d=this,e=b,f=this.doc_move=function(b){b.preventDefault(),d.mousemove(b.pageX-a,b.pageY-c)},g=this.doc_up=function(b){b.preventDefault(),qh(e,"tapmove",f),d.mouseup(b.pageX-a,b.pageY-c)};nh(this.dom,"tapstart",this.node_down=function(b){b.preventDefault(),d.stopAutoPlay();var h=d.skipTimeline;null!==h&&h.stop(!0,!0),a=b.pageX,c=b.pageY,d.createData(),nh(e,"tapmove",f),uh(e,"tapend",g)})},e.prototype.skip=function(a,b){var d=this,e=this.currentIndex,f=this.urls.length;if(0>a&&(a=f-1),a>=f&&(a=0),e!==a){b===c&&(b=a>=0&&e>a?!1:!0),this.prevDiv||this.createData(),this.stopped===!1&&this.stopAutoPlay();var g=this.skipTimeline=hd.create();g.add(ld.to(this.curDiv,300,{scaleX:.1,scaleY:.1})),g.add(ld.to(b?this.nextDiv:this.prevDiv,300,{top:0})),g.addEventListener("end",function(){d.reverseAutoPlay(),d.removeData(b),g.destroy(),d.skipTimeline=null},this),kd.getInstance().add(g),this.currentIndex=a}},e.prototype.removeData=function(a){Gi(this.curDiv).remove(),this.prevDiv&&this.nextDiv&&(Gi(a?this.prevDiv:this.nextDiv).remove(),(this.curDiv=a?this.nextDiv:this.prevDiv).style.zIndex="1",this.prevDiv=null,this.nextDiv=null)},e.prototype.destroy=function(){this.curDiv=null,this.prevDiv=null,this.nextDiv=null;var c=qh,d=b;this.urls.length>1&&(c(this.dom,"tapstart",this.node_down),this.node_down=null),c(d,"tapmove",this.doc_move),this.doc_move=null,c(d,"tapend",this.doc_up),this.doc_up=null,a.prototype.destroy.call(this)},d(e.prototype,"borderWidth",{set:function(a){this._borderWidth=a;var b=this.curDiv;b&&(b.style.borderWidth=a+"px")},enumerable:!0,configurable:!0}),d(e.prototype,"borderColor",{set:function(a){this._borderColor=a;var b=this.curDiv;b&&(b.style.borderColor=a)},enumerable:!0,configurable:!0}),e}(Ff);ef.register("dragslide","slidecontrol"),ff.register("dragslide",If);var Jf=function(a){function b(){a.call(this),this.flipAnimation=null}return dd(b,a),b.prototype.newPage=function(a){var b=this.node.prepend(Hi("div").addClass("leo-comp--slide-page")[0]),c=b.el("i").addClass("leo-loading"),d=b.el("img")[0];return d.onload=d.onerror=function(){d.onload=d.onerror=null,c.remove()},d.src=this.urls[a]||"",b[0]},d(b.prototype,"url",{set:function(a){var b=this;this.URLString=a,this.node.html("").addClass("leo-comp--fade-slide");var c=this.urls=a.split(";");c.length>1&&this.node.bind("tap",this.node_tap=function(){b.next()}),this.curDiv=this.newPage(0),this.currentIndex=0},enumerable:!0,configurable:!0}),b.prototype.next=function(){var a=this.currentIndex,b=this.urls.length,c=a+1;
c>=b&&(c=0);var d=this.newPage(c),e=this.flipAnimation;null!==e&&e.stop(!0,!0),e=this.flipAnimation=ld.to(this.curDiv,this._duration,{opacity:0}),e.addEventListener("end",function(){e.destroy(),this.flipAnimation=null,Gi(this.curDiv).remove(),this.curDiv=d},this),kd.getInstance().add(e),this.currentIndex=c},b.prototype.destroy=function(){this.curDiv=null,this.urls.length>1&&qh(this.dom,"tap",this.node_tap),a.prototype.destroy.call(this)},b}(Ff);ef.register("fadeslide","slidecontrol"),ff.register("fadeslide",Jf);var Kf=function(a){function b(){a.call(this),this.flipAnimation=null,this._borderWidth=0,this._borderColor="#000",this._shadow="none"}return dd(b,a),b.prototype.newPage=function(a){var b=Gi(this.container).prepend(Hi("div").addClass("leo-comp--slide-page-"+a)[0]).style({borderColor:this._borderColor,borderWidth:this._borderWidth,boxShadow:this._shadow}),c=b.el("i").addClass("leo-loading"),d=b.el("img")[0];return d.onload=d.onerror=function(){d.onload=d.onerror=null,c.remove()},d.src=this.urls[a]||"",b[0]},d(b.prototype,"url",{set:function(a){var b=this;this.URLString=a;var d=this.container,e=this.node;d===c?this.container=e.addClass("leo-comp--flip-slide").el("div").addClass("leo-comp--flip-stage").el("div").addClass("leo-comp--flip-container")[0]:d.innerHTML="";this.urls=a.split(";");e.bind("tap",this.node_tap=function(){b.next()}),this.curDiv=this.newPage(0),this.currentIndex=0},enumerable:!0,configurable:!0}),b.prototype.next=function(){var a=this.currentIndex,b=this.urls.length,c=a+1;c>=b&&(c=0);var d=this.newPage(c);bi(d,"rotationY",180);var e=this.flipAnimation,f=this._duration;null!==e&&e.stop(!0,!0),e=this.flipAnimation=hd.create(),e.add(ld.to(this.container,f,{rotationY:180*(a>c?-1:1)})),e.add(ld.to(this.container,f/2,{tz:-200},{yoyo:!0,repeat:1})),e.addEventListener("end",function(){e.destroy(),this.flipAnimation=null,Gi(this.curDiv).remove(),bi(d,"rotationY",0),bi(this.container,{rotationY:0,tz:0}),this.curDiv=d},this),kd.getInstance().add(e),this.currentIndex=c},b.prototype.destroy=function(){this.curDiv=null,qh(this.dom,"tap",this.node_tap),a.prototype.destroy.call(this)},d(b.prototype,"borderWidth",{set:function(a){this._borderWidth=a;var b=this.curDiv;b&&(b.style.borderWidth=a+"px")},enumerable:!0,configurable:!0}),d(b.prototype,"borderColor",{set:function(a){this._borderColor=a;var b=this.curDiv;b&&(b.style.borderColor=a)},enumerable:!0,configurable:!0}),d(b.prototype,"shadow",{set:function(a){this._shadow=a;var b=this.curDiv;b&&bi(b,"boxShadow",a)},enumerable:!0,configurable:!0}),b}(Ff);ef.register("flipslide","slidecontrol"),ff.register("flipslide",Kf);var Lf=function(b){function c(){b.call(this),this.animationStop=!1,this._duration=1500,this.raf=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)},this._interval=15e3,this._autoplay=!0,this.node.addClass("leo-comp--zoom-slide"),this.watch("visible",this.changeVisible,this)}return dd(c,b),c.prototype.changeVisible=function(){var a=this;clearTimeout(this.timeout),this.visible?(this.animationStop=!1,this.lastTime=0,this.timeout=setTimeout(function(){a.start()},50)):this.animationStop=!0},c.prototype.newPage=function(a){var b=this,c=this.img;c&&(c.onload=c.onerror=null);var d=~~(2*Math.random()),e=this._interval/1e3,f=this._duration/1e3*2/(1+Math.sqrt(5)),g=this.node.append(Hi("div").addClass("page origin"+(~~(9*Math.random())+1)).style({transition:"all "+(e+f)+"s linear",transform:"scale("+((d?1*e/15:0)+1)+")"}));return c=this.img=g.el("img").addClass("page-img").style("transition","all "+f+"s linear")[0],clearTimeout(this.__timeout),c.onload=c.onerror=function(){c.onload=c.onerror=null,b.__timeout=setTimeout(function(){c.style.opacity="1",g.style("transform","scale("+((d?0:1*e/15)+1)+")"),g=null,c=null},50)},c.src=this.urls[a]||"",g[0]},d(c.prototype,"url",{set:function(a){var b=this;this.URLString=a,this.node.html("");var c=this.urls=a.split(";");c.length>1&&this.node.bind("tap",this.node_tap=function(){b.next()}),this.currentIndex=0,this.changeVisible()},enumerable:!0,configurable:!0}),c.prototype.start=function(){var b=this,c=(new Date).getTime();c-this.lastTime>this._interval&&this.next(),!this.animationStop&&this._autoplay&&this.raf.apply(a,[function(){b.start()}])},c.prototype.next=function(){this.lastTime=(new Date).getTime(),this.node.select(".removable").remove(),this.curDiv&&(this.curDiv.className+=" removable"),this.currentIndex>=this.urls.length&&(this.currentIndex=0),this.curDiv=this.newPage(this.currentIndex++)},d(c.prototype,"interval",{set:function(a){this._interval=a},enumerable:!0,configurable:!0}),d(c.prototype,"autoplay",{set:function(a){this._autoplay=a},enumerable:!0,configurable:!0}),c.prototype.destroy=function(){b.prototype.destroy.call(this),clearTimeout(this.timeout),clearTimeout(this.__timeout),this.img.onload=this.img.onerror=null,this.curDiv=null,this.img=null,this.node_tap=null},d(c.prototype,"borderWidth",{set:function(a){this.dom.style.borderWidth=a+"px"},enumerable:!0,configurable:!0}),d(c.prototype,"borderColor",{set:function(a){this.dom.style.borderColor=a},enumerable:!0,configurable:!0}),d(c.prototype,"shadow",{set:function(a){bi(this.dom,"box-shadow",a)},enumerable:!0,configurable:!0}),c}(gf);ef.register("zoomslide",null,{borderColor:"borderColor",borderWidth:"borderWidth",shadow:"shadow"}),ff.register("zoomslide",Lf);var Mf=function(a){function b(){a.call(this),this._deferred=!1,this._dirty=!1,this._spotWidth=0,this._spotHeight=0,this._spotX=0,this._spotY=0}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--spotlight"),this._context=this.dom.getContext("2d"),this._transform.accelerate=!0,this.watch("visible",function(){this.visible&&this._dirty&&this.render()},this)},d(b.prototype,"deferredRender",{get:function(){return this._deferred},set:function(a){this._deferred=a,!a&&this._dirty&&this.visible&&this.render()},enumerable:!0,configurable:!0}),b.prototype._setDirty=function(){this._dirty||(this._dirty=!0,this.visible&&!this._deferred&&this.render())},b.prototype.createNode=function(){return Hi("canvas")},b.prototype._onActualWidthChange=function(){var a=this.actualWidth;this.dom.width=a,this.dom.style.width=a+"px",this._setDirty()},b.prototype._onActualHeightChange=function(){var a=this.actualHeight;this.dom.height=a,this.dom.style.height=a+"px",this._setDirty()},d(b.prototype,"spotWidth",{get:function(){return this._spotWidth},set:function(a){this._spotWidth!==a&&(this._spotWidth=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotHeight",{get:function(){return this._spotHeight},set:function(a){this._spotHeight!==a&&(this._spotHeight=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotX",{get:function(){return this._spotX},set:function(a){this._spotX!==a&&(this._spotX=a,this._setDirty())},enumerable:!0,configurable:!0}),d(b.prototype,"spotY",{get:function(){return this._spotY},set:function(a){this._spotY!==a&&(this._spotY=a,this._setDirty())},enumerable:!0,configurable:!0}),b.prototype.enter=function(b){a.prototype.enter.call(this,b),b.watch("actualWidth",this._onStageWidthChange,this),b.watch("actualHeight",this._onStageHeightChange,this),this.actualWidth=b.actualWidth,this.actualHeight=b.actualHeight,this.zIndex=10*b.context.getVariable("maxZIndex"),this.render()},b.prototype.leave=function(){this.stage.unwatch("actualWidth",this._onStageWidthChange,this),this.stage.unwatch("actualHeight",this._onStageHeightChange,this),a.prototype.leave.call(this)},b.prototype.render=function(a){if(a||this.visible&&this._dirty){this._dirty=!1;var b=this.actualWidth,c=this.actualHeight,d=this.spotWidth,e=this.spotHeight,f=this._context,g=Math.max(d,e)/2,h=this.spotX+d/2,i=this.spotY+e/2,j=this.getMaxRadius(h,i,b,c);f.clearRect(0,0,b,c);var k=f.createRadialGradient(h,i,0,h,i,j),l=Math.min(g/j,1);k.addColorStop(0,"transparent"),k.addColorStop(l,"transparent"),k.addColorStop(Math.min(1,(g+20)/j),"#000"),f.fillStyle=k,f.fillRect(0,0,b,c)}},b.prototype._onStageWidthChange=function(a){this.actualWidth=a},b.prototype._onStageHeightChange=function(a){this.actualHeight=a},b.prototype.getMaxRadius=function(a,b,c,d){return Math.sqrt(Math.max(a*a+b*b,(a-c)*(a-c)+b*b,a*a+(b-d)*(b-d),(a-c)*(a-c)+(b-d)*(b-d)))},b}(gf);ef.register("stagelight",null,{width:"spotWidth",height:"spotHeight",left:"spotX",top:"spotY",rotate:"!",shadow:"!"}),ff.register("stagelight",Mf);var Nf=function(a){function b(){a.call(this),this.actionConfigs=null,this._filter=null,this._readyState=0,this.initialActionName=null}return dd(b,a),b.prototype.init=function(){var b=this;a.prototype.init.call(this),this.node.addClass("leo-comp--sprite"),this.resizeMode=1,this._sprite=new Ki(this.dom),this._sprite.onload=function(){b._onload()},this._sprite.onSizeChange=function(a,c){b._onSpriteSizeChange(a,c)}},d(b.prototype,"sprite",{get:function(){return this._sprite},enumerable:!0,configurable:!0}),d(b.prototype,"filter",{get:function(){return this._filter?this._filter:this._filter=new Wh(this._sprite.element,this)},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),d(b.prototype,"srcset",{get:function(){return this._sprite.srcset},set:function(a){this._sprite.srcset=a,this._readyState=this._sprite.loaded?this._readyState:1},enumerable:!0,configurable:!0}),d(b.prototype,"frames",{get:function(){return this._sprite.frames},set:function(a){this._sprite.frames=a},enumerable:!0,configurable:!0}),d(b.prototype,"actions",{get:function(){return this._sprite.actions},set:function(a){this._sprite.actions=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionName",{get:function(){return this._sprite.currentActionName},set:function(a){this._sprite.currentActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionIndex",{get:function(){return this._sprite.currentActionIndex},set:function(a){this._sprite.currentActionIndex=a},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.srcset=a.srcset},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),b.prototype._onload=function(){this._readyState=this._sprite.loaded>0?2:4,this.dispatchSimpleEvent("load")},b.prototype._onSpriteSizeChange=function(a,b){this.actualWidth=a,this.actualHeight=b},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this._sprite.currentActionName=this.initialActionName,this._sprite.currentActionIndex=0},b.prototype.destroy=function(){this._filter&&(this._filter.destroy(),this._filter=null),this._sprite.destroy(),this._sprite=null,a.prototype.destroy.call(this)},b}(gf),Of=function(a){function b(){a.call(this),this.spriteLoaded=!1,this._readyState=0,this.append(this.spriteComponent=new Nf),this.node.addClass("leo-comp--sprite-container"),this.spriteComponent.addEventListener("load",function(){this.spriteLoaded=!0,this.__onload()},this)}return dd(b,a),b.prototype._onActualWidthChange=function(){this.spriteComponent.width=this._actualWidth},b.prototype._onActualHeightChange=function(){this.spriteComponent.height=this._actualHeight},d(b.prototype,"filter",{get:function(){return this.spriteComponent.filter},enumerable:!0,configurable:!0}),d(b.prototype,"actionConfigs",{get:function(){return this.spriteComponent.actionConfigs},set:function(a){this.spriteComponent.actionConfigs=a},enumerable:!0,configurable:!0}),d(b.prototype,"sprite",{get:function(){return this.spriteComponent.sprite},enumerable:!0,configurable:!0}),d(b.prototype,"srcset",{get:function(){return this.spriteComponent.srcset},set:function(a){this.spriteComponent.srcset=a},enumerable:!0,configurable:!0}),d(b.prototype,"frames",{get:function(){return this.spriteComponent.frames},set:function(a){this.spriteComponent.frames=a},enumerable:!0,configurable:!0}),d(b.prototype,"initialActionName",{get:function(){return this.spriteComponent.initialActionName},set:function(a){this.spriteComponent.initialActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"actions",{get:function(){return this.spriteComponent.actions},set:function(a){this.spriteComponent.actions=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionName",{get:function(){return this.spriteComponent.currentActionName},set:function(a){this.spriteComponent.currentActionName=a},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionIndex",{get:function(){return this.spriteComponent.currentActionIndex},set:function(a){this.spriteComponent.currentActionIndex=a},enumerable:!0,configurable:!0}),b.prototype.load=function(a){this.spriteComponent.load(a)},d(b.prototype,"readyState",{get:function(){return this._readyState},enumerable:!0,configurable:!0}),d(b.prototype,"loadable",{get:function(){return!0},enumerable:!0,configurable:!0}),b.prototype.__onload=function(a){a&&(this.error=a),2!==this._readyState&&4!==this._readyState&&this.soundsLoaded&&this.spriteLoaded&&(this._readyState=this.error?2:4,this.dispatchSimpleEvent("load"))},d(b.prototype,"soundURLs",{set:function(a){this._urls=a,this.destroyAudioList();var b=a.length;if(this._readyState=1,this.soundsLoaded=!1,0===b)this.soundsLoaded=!0,this.__onload();else{this.soundsLoaded=!1;for(var c,d,e=0,f=0,g=this.audioList;b>e;e++)(d=a[e])?(c=new ui,g||(this.audioList=g=[]),g.push(c),c.src=a[e],c.addEventListener("canplaythrough",function(){++f===b&&(this.soundsLoaded=!0,this.__onload(!1))},this),c.addEventListener("error",function(){++f===b&&(this.soundsLoaded=!0,this.__onload(!0))},this),c.load()):(this.audioList.push(""),++f===b&&(this.soundsLoaded=!0,this.__onload()))}},enumerable:!0,configurable:!0}),b.prototype.getAudio=function(a){return this.audioList[this._urls.indexOf(a)]},b.prototype.destroyAudioList=function(){var a=this.audioList;if(a){for(var b,c=0,d=a.length;d>c;c++)b=a[c],b&&b.destroy();a.length=0}},b.prototype.destroy=function(){a.prototype.destroy.call(this),this.destroyAudioList(),this.spriteComponent.destroy()},d(b.prototype,"spriteScaleX",{get:function(){return this.spriteComponent.transform.scaleX},set:function(a){this.spriteComponent.transform.scaleX=a},enumerable:!0,configurable:!0}),d(b.prototype,"spriteScaleY",{get:function(){return this.spriteComponent.transform.scaleY},set:function(a){this.spriteComponent.transform.scaleY=a},enumerable:!0,configurable:!0}),b}(nf);ef.register("sprite",null,{scaleX:"spriteScaleX",scaleY:"spriteScaleY"},function(a){return Wh.KEYWORDS[a]?"filter."+a:null}),ff.register("sprite",Of);var Pf=function(a){function b(){a.call(this),this.rootContext=new Qf(this),this._context=this.rootContext,this._prevScene=null,this._currentScene=null,this.fastTransition=!0,this.transitionConfig={enter:{name:"Show",duration:0,easing:"easeInQuad"},leave:{name:"Hide",duration:0,easing:"easeOutQuad"}},this.isInTransition=!1,this._transition=null}return dd(b,a),d(b.prototype,"context",{get:function(){return this._context},set:function(a){this._context!==a&&(null==a&&(a=this.rootContext),a!==this.rootContext&&(a.prevContext=this.rootContext),this._context=a)},enumerable:!0,configurable:!0}),b.prototype.addScene=function(a){return a.visible=!1,this._doAddChild(a,this._children.length,!0)},b.prototype.removeScene=function(a){var b=this;if(this._currentScene===a){this.currentScene=null;var c=function(){b.removeEventListener("transitionend",c,null),b.remove(a)};this.addEventListener("transitionend",c,null)}else this.remove(a)},d(b.prototype,"currentScene",{get:function(){return this._currentScene},set:function(a){if(this._currentScene!==a){var b=this._currentScene;this._setScene(a)&&this.notifyPropertyChange("currentScene",b)}},enumerable:!0,configurable:!0}),b.prototype._setScene=function(a){if(this.isInTransition){if(!this.fastTransition)return!1;this.stopTransition()}return a&&!this.contains(a)&&this.addScene(a),this._prevScene=this._currentScene,this._currentScene=a,this._startTransition(),!0},b.prototype._startTransition=function(){var a=this._currentScene,b=this._prevScene;if(a&&b){this.enterScene(a);var c=a.transitionConfig;this._transition=fd.transition(b,a,c.name,c.duration,c)}else if(a||b){var d=a,c=this.transitionConfig.enter;b?(d=b,c=this.transitionConfig.leave):this.enterScene(a),this._transition=fd.animate(d,c.name,c.duration,c)}this._transition&&(this.isInTransition=!0,this._transition.addEventListener("end",this.stopTransition,this),this.dispatchSimpleEvent("transitionStart"))},b.prototype.stopTransition=function(){null!=this._transition&&(this._transition.removeEventListener("end",this.stopTransition,this),this._transition.currentTotalTime=this._transition.totalDuration,this._transition=null,this.isInTransition=!1,this._prevScene&&(this.leaveScene(this._prevScene),this._prevScene=null),this.dispatchSimpleEvent("transitionEnd",this._currentScene))},b.prototype.enterScene=function(a){return this.contains(a)&&(this.context=a.context,a.enter(this),a.dispatchSimpleEvent(gi.ENTER_STAGE)),this},b.prototype.leaveScene=function(a){if(this.contains(a)){var b=this.context;this.context=a.context,a.leave(),this.context=b,a.dispatchSimpleEvent(gi.LEAVE_STAGE)}return this},b.prototype.init=function(){a.prototype.init.call(this),this._asSymbol(),this._node.addClass("leo-comp--stage"),this.perspective=b.DEFAULT_PERSPECTIVE,b.stages[this.guid]=this},b.prototype.leave=function(){this.stopTransition(),this.context=null,a.prototype.leave.call(this)},b.prototype.destroy=function(){sf.removeDelegateListeners(this),this.stopTransition(),a.prototype.destroy.call(this),this.context=null,this.rootContext.destroy(),this.rootContext=null,delete b.stages[this.guid]},b.stages={},b.DEFAULT_PERSPECTIVE=500,b}(nf);ff.register("stage",Pf);var Qf=function(a){function b(b){var c=this;a.call(this,b),this.controller=null,this.defineVariable("maxZIndex",{get:function(){var a=c.target.currentScene,b=0;if(a)for(var d=a.children,e=-1,f=d.length;++e<f;){var g=d[e].zIndex;g>b&&(b=g)}return b+1},set:Ed})}return dd(b,a),b}(of),Rf=function(c){function e(){c.call(this),this._transparent=!1,this._screenType="users",this._theme="white",this.widgetsReady=!1,a.twttr=function(b,c,d){var e,f=b.getElementsByTagName(c)[0],g=a.twttr||{};if(!b.getElementById(d))return e=b.createElement(c),e.id=d,e.src="https://platform.twitter.com/widgets.js",f.parentNode.insertBefore(e,f),g._e=[],g.ready=function(a){g._e.push(a)},g}(b,"script","twitter-wjs")}return dd(e,c),e.prototype.loadWidgets=function(){if(this.widgetsReady){var b=this.node.text("").el("a").addClass("twitter-timeline").attr({width:this.actualWidth,height:this.actualHeight,href:"https://twitter.com/qinrockets","data-widget-id":"557818402547712000","data-chrome":"noscrollbar"+(this._transparent?" transparent":""),"data-theme":this._theme});"collections"===this._screenType?b.attr("custom-timeline-id",this._customTimelineID):"list"===this._screenType?b.attr({"data-list-owner-screen-name":this._screenName,"data-list-slug":this._listSlug}):"favorites"===this._screenType?b.attr("data-favorites-screen-name",this._screenName):b.attr("data-screen-name",this._screenName),a.twttr.ready(function(){a.twttr.widgets.load()})}},d(e.prototype,"transparent",{get:function(){return this._transparent},set:function(a){this._transparent=a,this.loadWidgets()},enumerable:!0,configurable:!0}),d(e.prototype,"screenName",{get:function(){return this._screenName},set:function(a){this._screenName=a,this.loadWidgets()},enumerable:!0,configurable:!0}),d(e.prototype,"screenType",{get:function(){return this._screenType},set:function(a){this._screenType=a,this.loadWidgets()},enumerable:!0,configurable:!0}),d(e.prototype,"theme",{get:function(){return this._theme},set:function(a){this._theme=a,this.loadWidgets()},enumerable:!0,configurable:!0}),d(e.prototype,"customTimelineID",{get:function(){return this._customTimelineID},set:function(a){this._customTimelineID=a,this.loadWidgets()},enumerable:!0,configurable:!0}),d(e.prototype,"listSlug",{get:function(){return this._listSlug},set:function(a){this._listSlug=a,this.loadWidgets()},enumerable:!0,configurable:!0}),e.prototype._onActualWidthChange=function(){this.loadWidgets()},e.prototype._onActualHeightChange=function(){this.loadWidgets()},e.prototype.enter=function(a){c.prototype.enter.call(this,a),this.widgetsReady=!0,this.loadWidgets()},e}(gf);ff.register("twittertimeline",Rf);var Sf=function(a){function b(){a.call(this)}return dd(b,a),b.prototype._createMedia=function(){return new vi(null,this._dom)},d(b.prototype,"controlable",{get:function(){return this._media.controlable},set:function(a){this._media.controlable=a},enumerable:!0,configurable:!0}),b}(hf);ff.register("html5-video",Sf);var Tf=function(a){function b(b,c,d,e,f){a.call(this),this._rect=new oi(c,d,e,f),this._container=b}return dd(b,a),d(b.prototype,"rect",{get:function(){return this._rect.clone()},enumerable:!0,configurable:!0}),d(b.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),d(b.prototype,"left",{get:function(){return this._rect.x},set:function(a){this._rect.x!==a&&(this._rect.x=a,this._container._updateChildrenDisplayPosition())},enumerable:!0,configurable:!0}),d(b.prototype,"top",{get:function(){return this._rect.y},set:function(a){this._rect.y!==a&&(this._rect.y=a,this._container._updateChildrenDisplayPosition())},enumerable:!0,configurable:!0}),d(b.prototype,"width",{get:function(){return this._rect.width},set:function(a){this._rect.width!==a&&(this._rect.width=a,this._container.actualWidth=a)},enumerable:!0,configurable:!0}),d(b.prototype,"height",{get:function(){return this._rect.height},set:function(a){this._rect.height!==a&&(this._rect.height=a,this._container.actualHeight=a)},enumerable:!0,configurable:!0}),d(b.prototype,"right",{get:function(){return this._rect.right},set:function(a){this._rect.right!==a&&(this.width=a-this._rect.left)},enumerable:!0,configurable:!0}),d(b.prototype,"bottom",{get:function(){return this._rect.bottom},set:function(a){this._rect.bottom!==a&&(this.height=a-this._rect.top)},enumerable:!0,configurable:!0}),b.prototype.set=function(a,b,c,d){var e=!1;this._rect.x!==a&&(this._rect.x=a,e=!0),this._rect.y!==b&&(this._rect.y=b,e=!0),this.width=c,this.height=d,e&&this._container._updateChildrenDisplayPosition()},b.getContentBound=function(a,b,c){if(b||(b=new oi(0,0,0,0)),!a.length)return b.set(0,0,0,0);var d=oi.identity,e=a[0],f=e.getTransformBound(null,d,c);f.left+=e.x,f.top+=e.y;for(var g=f.left,h=f.top,i=f.right,j=f.bottom,k=0,l=a.length;++k<l;){e=a[k],f=e.getTransformBound(null,d),f.left+=e.x,f.top+=e.y;var m=f.left;g>m&&(g=m),m=f.top,h>m&&(h=m),m=f.right,m>i&&(i=m),m=f.bottom,m>j&&(j=m)}return b.set(g,h,i-g,j-h)},b}(cd),Uf=function(a){function b(){a.call(this)}return dd(b,a),b.prototype._createMedia=function(){return new wi(null,this._dom)},b}(hf);ff.register("vimeo-video",Uf);var Vf=function(a){function b(){a.call(this)}return dd(b,a),b.prototype._createMedia=function(){return new yi(null,this._dom)},d(b.prototype,"loop",{get:function(){return this._media.loop},set:function(a){this._media.loop=a},enumerable:!0,configurable:!0}),d(b.prototype,"startTime",{set:function(a){this._media.startTime=a},enumerable:!0,configurable:!0}),b}(hf);ff.register("youtube-video",Vf);var Wf={background:"backgroundColor"},Xf=function(a){var b=Wf[a];if(b)return b;var c=sd.style;if(a in c)return Wf[a]=a;for(var d=td,e=a.charAt(0).toUpperCase()+a.substr(1),f=-1,g=d.length;++f<g;){var h=d[f]+e;if(h in c)return Wf[a]=h}return null},Yf=navigator.userAgent.toLowerCase(),Zf=(-1!==Yf.indexOf("mobile")||-1!==Yf.indexOf("android"),!!("ontouchstart"in a||a.DocumentTouch&&b instanceof a.DocumentTouch)),$f=Xf("transform"),_f=Xf("transformOrigin"),ag=!1,bg=!1,cg=!1,dg=!1,eg=!1,fg=!1,gg="";!function(){var a=b.createElement("div");ag=function(){return a.style.cssText="float:left;",!!a.style.cssFloat}(),Wf["float"]=ag?"cssFloat":"styleFloat",bg=function(){var b="transform:translate3d(1px,1px,1px);";return a.style.cssText=ud.join(b)+b+b,!!~(a.style[$f]+"").indexOf("3d")}(),cg=function(){var b="transform-style:preserve-3d;";return a.style.cssText=ud.join(b)+b+b,!!~(a.style[Xf("transformStyle")]+"").indexOf("3d")}(),dg=function(){return a.style.cssText="-webkit-filter:blur(10px);",!!~(a.style.getPropertyValue("-webkit-filter")+"").indexOf("blur")}(),eg=function(){a.style.cssText="background-image:linear-gradient(to bottom,#000,#fff);";var b=fg=!!~(a.style.backgroundImage+"").indexOf("gradient");if(!b){var c="background-image:",d="linear-gradient(bottom,#000,#fff);",e=ud;if(a.style.cssText=c+e.join(d+c)+d+c+d,d=a.style.backgroundImage+"",fg=!!~d.indexOf("gradient"))for(var f=-1,g=e.length;++f<g;)if(d.indexOf(e[f])>=0){gg=e[f];break}}return b}(),a=null}();var hg=function(a){function b(){var b=this;a.call(this),this._shadowConfig=null,this._strokeWidth=1,this._strokeColor="rgba(0,0,0,0)",this._updateTimer=null,this.needUpdateViewBox=!0,this.watch("visible",function(){b.visible&&b.stage&&b.needUpdateViewBox&&b.updateViewBox()},null)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.node.addClass("leo-comp--shape"),this._svg=this.node.el("svg").style({overflow:"visible",transformStyle:"preserve-3d"}),this._svg.el("defs"),this._shape=this.createShape().appendTo(this._svg).attr({"stroke-linecap":"round","stroke-linejoin":"round"})},b.prototype.createShape=function(){return Hi("svg:g")},b.prototype.destroyShape=function(){this._shape=null},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._clearUpdateTimer()},d(b.prototype,"shadow",{get:function(){return this._shadow},set:function(a){var b=this._shadow;if(a!==b){var c=this._shadowConfig;if(this._shadow=a,"none"===a)this._svg.style("filter","none");else if(dg)this._svg[0].style.webkitFilter="drop-shadow("+a+")";else{c||(c=this._createShadowConfig()),"none"===b&&this._svg.style("filter","url(#"+c.id+")");var d=a.split(" ");c.offset.setAttribute("dx",parseInt(d[0],10)+""),c.offset.setAttribute("dy",parseInt(d[1],10)+""),c.blur.setAttribute("stdDeviation",parseInt(d[2],10)+""),c.color.setAttribute("flood-color",d[3])}this.updateViewBox(!0),this.notifyPropertyChange("shadow",b)}},enumerable:!0,configurable:!0}),b.prototype._createShadowConfig=function(){var a="shadow_"+this.guid+"_"+w(),b="result_"+this.guid+"_"+w(),c=this.node.select("defs").el("filter").attr("id",a),d=c.el("feGaussianBlur").attr("in","SourceAlpha"),e=c.el("feOffset").attr("result",b),f=c.el("feFlood");c.el("feComposite").attr({in2:b,operator:"in"});var g=c.el("feMerge");return g.el("feMergeNode"),g.el("feMergeNode").attr("in","SourceGraphic"),{id:a,blur:d[0],offset:e[0],color:f[0]}},b.prototype._onActualWidthChange=function(){this._onActualSizeChange()},b.prototype._onActualHeightChange=function(){this._onActualSizeChange()},b.prototype._onActualSizeChange=function(){this.updateViewBox(!0)},d(b.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(a){if(this._strokeWidth!==a){var b=this._strokeWidth;this._shape[0].setAttribute("stroke-width",(this._strokeWidth=a)+""),this.updateViewBox(!0),this.notifyPropertyChange("strokeWidth",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(a){if(this._strokeColor!==a){var b=this._strokeColor;this._shape[0].setAttribute("stroke",a),this.notifyPropertyChange("strokeColor",b)}},enumerable:!0,configurable:!0}),b.prototype._clearUpdateTimer=function(){null!=this._updateTimer&&(wd(this._updateTimer),this._updateTimer=null)},b.prototype.updateViewBox=function(a){var b=this;if(this._visible&&this._stage){if(a||this.needUpdateViewBox){this._clearUpdateTimer();var c=this._svg[0],d=c.getBBox();if(d.width+d.height===0)return void(this._updateTimer=vd(function(){b.updateViewBox()},16));var e=1.45*this._strokeWidth,f=0,g=0,h=0,i=this._shadow;if(i&&"none"!==i){var j=i.split(" ");f=+j[0].slice(0,-2)||0,g=+j[1].slice(0,-2)||0,h=(+j[2].slice(0,-2)||0)/2+1}var k=Math.max,l=Math.min,m=d.x+l(0,f-h)-e,n=d.y+l(0,g-h)-e,o=d.width+2*e+k(0,h-f)+k(0,f+h),p=d.height+2*e+k(0,h-g)+k(0,g+h);c.setAttribute("viewBox",m+" "+n+" "+o+" "+p),c.setAttribute("height",""+p),c.setAttribute("width",""+o),_h(c,"transform","translate("+m+"px,"+n+"px)"),this.needUpdateViewBox=!1}}else a&&(this.needUpdateViewBox=!0)},b.prototype.enter=function(b){a.prototype.enter.call(this,b),this.updateViewBox()},b}(gf);ef.register("shape",null,{borderColor:"strokeColor",borderWidth:"strokeWidth"});var ig=function(a){function b(){a.call(this),this._textContent="",this._gradient="",this._gradientEl=null}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._wrapper=this._node.addClass("leo-comp--shape-adv").el("div").addClass("leo-comp--shape__text leo-center-wrapper"),this._text=this._wrapper.el("div").addClass("leo-center-target"),this._textFormat=new Ni(this._text,this),this._textFormat.deep=!0},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){if(this._textContent!==a){var b=this._textContent;this._text.html(this._textContent=a,!0),this.notifyPropertyChange("textContent",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),d(b.prototype,"gradient",{get:function(){return this._gradient},set:function(a){a!==this._gradient&&this._updateGradient(a)},enumerable:!0,configurable:!0}),b.prototype._updateGradient=function(a){if(""===a||"none"===a)this._gradient="",this._shape.attr("fill","none");else{if(this._gradientEl)this._gradient||this._shape.attr("fill","url(#"+this._gradientEl.attr("id")+")");else{var b="gradient"+this.guid+"_"+w();this._gradientEl=this._svg.select("defs").el("linearGradient").attr({id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%"}),this._shape.attr("fill","url(#"+b+")")}for(var c=this._gradientEl,d=a.split(";"),e=c.select("stop"),f=e.length,g=d.length,h=100/(g-1),i=0;f>i&&g>i;++i){var j=e[i];j.setAttribute("offset",i*h+""),j.setAttribute("stop-color",d[i])}for(;g>i;++i)c.el("stop").attr({offset:i*h,"stop-color":d[i]});for(;f>i;++i)c[0].removeChild(e[i])}},b.prototype._onActualSizeChange=function(){this.render(),a.prototype._onActualSizeChange.call(this)},b.prototype.render=function(){},b.prototype.destroy=function(){this._textFormat.destroy(),this._textFormat=null,this._wrapper=null,this._text=null,a.prototype.destroy.call(this)},b.textType=2,b}(hg);ef.register("advshape","shape",{gradient:"gradient"},function(a){return Ni.compatProperty(a)});var jg=function(a){function b(){a.call(this),this._maxArrowWidth=60,this._maxTailWidth=40}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},d(b.prototype,"maxArrowWidth",{get:function(){return this._maxArrowWidth},set:function(a){this._maxArrowWidth!==a&&(this._maxArrowWidth=a,this.render())},enumerable:!0,configurable:!0}),d(b.prototype,"maxTailWidth",{get:function(){return this._maxTailWidth},set:function(a){this._maxTailWidth!==a&&(this._maxTailWidth=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=Math.min(this._maxTailWidth,b/2),d=Math.min(this._maxArrowWidth,2*a/3),e=(b-c)/2;this._shape.attr("points",[0,e+c,0,e,a-d,e,a-d,0,a,b/2,a-d,b,a-d,e+c].join(","))},b}(ig);ff.register("arrow",jg,"advshape");var kg=function(a){function b(){a.call(this),this._x1=0,this._y1=0,this._x2=0,this._y2=0}return dd(b,a),b.prototype.createShape=function(){return this._line=Hi("svg:line")},d(b.prototype,"x1",{get:function(){return this._x1},set:function(a){if(this._x1!==a){var b=this._x1;this._updateXY(!0,this._x1=a,this._x2),this.notifyPropertyChange("x1",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"y1",{get:function(){return this._y1},set:function(a){if(this._y1!==a){var b=this._y1;this._updateXY(!1,this._y1=a,this._y2),this.notifyPropertyChange("y1",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"x2",{get:function(){return this._x2},set:function(a){if(this._x2!==a){var b=this._x2;this._updateXY(!0,this._x1,this._x2=a),this.notifyPropertyChange("x2",b)
}},enumerable:!0,configurable:!0}),d(b.prototype,"y2",{get:function(){return this._y2},set:function(a){if(this._y2!==a){var b=this._y2;this._updateXY(!1,this._y1,this._y2=a),this.notifyPropertyChange("y2",b)}},enumerable:!0,configurable:!0}),b.prototype._updateXY=function(a,b,c){var d=this._line,e=a?"x":"y";c>b?d.attr(e+"1","0").attr(e+"2",c-b+""):d.attr(e+"2","0").attr(e+"1",b-c+""),a?(this.x=Math.min(b,c),this.actualWidth=Math.abs(c-b)):(this.y=Math.min(b,c),this.actualHeight=Math.abs(c-b))},b}(hg);ef.register("line","shape",{width:"!",height:"!",left:"!",top:"!",rotate:"!"}),ff.register("line",kg);var lg=function(a){function b(){a.call(this),this._angle=45}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("strokeWidth",this._updateArrows,this)},b.prototype.createShape=function(){var b=Hi("svg:g");return b.append(a.prototype.createShape.call(this)),this._arrows=[b.el("line").attr({"stroke-linecap":"round","stroke-linejoin":"round"}),b.el("line").attr({"stroke-linecap":"round","stroke-linejoin":"round"})],b},d(b.prototype,"arrowAngle",{get:function(){return this._angle},set:function(a){this._angle!==a&&(this._angle=a,this._updateArrows())},enumerable:!0,configurable:!0}),b.prototype._updateXY=function(b,c,d){a.prototype._updateXY.call(this,b,c,d),this._updateArrows()},b.prototype._updateArrows=function(){var a=this.x1,b=this.x2,c=this.y1,d=this.y2,e=Math.min(a,b),f=Math.min(c,d),g=b-a,h=d-c,i=g?Math.atan(h/g):me;(0>h*i||!h&&0>=g)&&(i+=le);var j=Math.sqrt(g*g+h*h),k=Math.min(2*this.strokeWidth,j/3),l=k/j-1,m=l*k*Math.cos(i),n=l*k*Math.sin(i),o=Math.cos(this._angle*oe),p=Math.sin(this._angle*oe);this._arrows[0].attr({x1:(b-=e)+"",y1:(d-=f)+"",x2:b+m*o-n*p,y2:d+n*o+m*p}),this._arrows[1].attr({x1:b+"",y1:d+"",x2:b+m*o+n*p,y2:d+n*o-m*p})},b}(kg);ff.register("arrowline",lg,"line");var mg=function(a){function b(){a.call(this),this._maxCrossWidth=40}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},d(b.prototype,"maxCrossWidth",{get:function(){return this._maxCrossWidth},set:function(a){this._maxCrossWidth!==a&&(this._maxCrossWidth=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=Math.min(this._maxCrossWidth,a/2),d=(a-c)/2,e=(b-c)/2;this._shape.attr("points",[0,e+c,0,e,d,e,d,0,d+c,0,d+c,e,a,e,a,e+c,d+c,e+c,d+c,b,d,b,d,b-e].join(","))},b}(ig);ff.register("cross",mg,"advshape");var ng=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this.watch("strokeWidth",this._updateDashArray,this)},b.prototype._updateXY=function(b,c,d){a.prototype._updateXY.call(this,b,c,d),this._updateDashArray()},b.prototype._updateDashArray=function(){this._line.attr("stroke-dasharray",this.strokeWidth+5+"px")},b}(kg);ff.register("dottedline",ng,"line");var og=function(a){function b(){a.call(this),this._angle=30}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},d(b.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle!==a&&(this._angle=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=b/2*Math.tan(this._angle*oe);this._shape.attr("points",[0,0,a-c,0,a,b/2,a-c,b,0,b,c,b/2].join(","))},b}(ig);ff.register("dovetailed",og,"advshape");var pg=function(a){function b(){a.call(this),this._textContent="",this._strokeWidth=1,this._strokeColor="rgba(0,0,0,0)",this._gradient=""}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._node.addClass("leo-comp--shape-rect leo-center-wrapper"),this._text=this._node.el("div").addClass("leo-center-target"),this._textFormat=new Ni(this._text,this),this._textFormat.deep=!0},d(b.prototype,"textContent",{get:function(){return this._textContent},set:function(a){if(this._textContent!==a){var b=this._textContent;this._text.html(this._textContent=a,!0),this.notifyPropertyChange("textContent",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"textFormat",{get:function(){return this._textFormat},enumerable:!0,configurable:!0}),d(b.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(a){if(this._strokeWidth!==a){var b=this._strokeWidth;this._dom.style.borderWidth=(this._strokeWidth=a)+"px",this.notifyPropertyChange("strokeWidth",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(a){if(this._strokeColor!==a){var b=this._strokeColor;this._dom.style.borderColor=this._strokeColor=a,this.notifyPropertyChange("strokeColor",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"gradient",{get:function(){return this._gradient},set:function(a){if(this._gradient!==a)if(this._gradient=a,"none"!==a&&a){var b=a.split(";");1===b.length?(this._dom.style.backgroundImage="none",this._dom.style.backgroundColor=b[0]):this._dom.style.backgroundImage=Nc("bottom",b)}else this._dom.style.backgroundImage="none",this._dom.style.backgroundColor=""},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){this._textFormat.destroy(),this._textFormat=null,this._text=null,a.prototype.destroy.call(this)},b.textType=2,b}(gf);ef.register("rectangle",null,{borderColor:"strokeColor",borderWidth:"strokeWidth",gradient:"gradient"},function(a){return Ni.compatProperty(a)}),ff.register("rectangle",pg),ff.register("hightlightarea",pg,"rectangle");var qg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this),this._node.style("borderRadius","100%")},b}(pg);ff.register("ellipse",qg,"advshape");var rg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){var b=a.prototype.createShape.call(this);return this._rects=[b.el("rect"),b.el("rect"),b.el("rect")],b},b.prototype.render=function(){for(var a=this.actualWidth/6,b=~~a,c=this.actualHeight,d=[0,0,b,c,b,0,a<<2,c,~~(5*a),0,b,c],e=this._rects,f=-4,g=d.length;(f+=4)+3<g;)e[f>>2].attr({x:d[f],y:d[f+1],width:d[f+2],height:d[f+3]})},b}(ig);ff.register("flowchart",rg,"advshape");var sg=function(a){function b(){a.call(this),this._hasAngleSet=!1,this._angle=0}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},d(b.prototype,"angle",{get:function(){return this._angle},set:function(a){this._hasAngleSet?this._angle!==a&&(this._angle=a,this.render()):(this._hasAngleSet=!0,this._angle=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=this._hasAngleSet?b/2*Math.tan(this._angle*oe):a/4;this._shape.attr("points",[0,b/2,c,0,a-c,0,a,b/2,a-c,b,c,b].join(","))},b}(ig);ff.register("hexagon",sg,"advshape");var tg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,.75*a,b,a,0,.25*a,0].join(","))},b}(ig);ff.register("parallelogram",tg,"advshape");var ug=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b/3,a/2,0,a,b/3,.8*a,b,.2*a,b].join(","))},b}(ig);ff.register("pentagon",ug,"advshape");var vg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth/2,b=this.actualHeight/2;this._shape.attr("points",[0,b,a,2*b,2*a,b,a,0].join(","))},b}(ig);ff.register("prismatic",vg,"advshape");var wg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,a,b,.75*a,0,.25*a,0].join(","))},b}(ig);ff.register("trapezoid",wg,"advshape");var xg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight;this._shape.attr("points",[0,b,a,b,a/2,0].join(","))},b}(ig);ff.register("triangle",xg,"advshape");var yg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.init=function(){a.prototype.init.call(this)},b.prototype.createShape=function(){var b=a.prototype.createShape.call(this);b[0].style.setProperty("fill","none","important");for(var c=this._lines=[b.el("line"),b.el("line"),b.el("line"),b.el("line")],d={x1:0,y1:0,x2:0,stroke:"#808080","stroke-linecap":"square","stroke-width":2},e=-1,f=c.length;++e<f;)c[e].attr(d);return c[1].attr("y2",0),c[2].attr("stroke","#e6e6e6"),c[3].attr({x1:0,stroke:"#e6e6e6"}),b},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=this._lines;c[0].attr("y2",b),c[1].attr("x2",a),c[2].attr({x1:a,x2:a,y2:b}),c[3].attr({y1:b,y2:b,x2:a})},b}(ig);ff.register("virtualbox",yg,"advshape");var zg=function(a){function b(){a.call(this),this._maxArrowWidth=60,this._maxTailHeight=40}return dd(b,a),b.prototype.createShape=function(){var a=Hi("svg:g");return this._polygons=[a.el("polygon"),a.el("rect"),a.el("rect")],a},d(b.prototype,"maxArrowWidth",{get:function(){return this._maxArrowWidth},set:function(a){this._maxArrowWidth!==a&&(this._maxArrowWidth=a,this.render())},enumerable:!0,configurable:!0}),d(b.prototype,"maxTailHeight",{get:function(){return this._maxTailHeight},set:function(a){this._maxTailHeight!==a&&(this._maxTailHeight=a,this.render())},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=Math.min(this._maxTailHeight,b/2),d=Math.min(this._maxArrowWidth,2*a/3),e=(a-d)/36,f=3*e,g=(b-c)/2,h=this._polygons;h[0].attr("points",[2*f+" "+(g+c),2*f+" "+g,a-d+" "+g,a-d+" 0",a+" "+b/2,a-d+" "+b,a-d+" "+(g+c)].join(","));for(var i=[0,g,e,c,2*e,g,f,c],j=-4,k=i.length;(j+=4)+3<k;)h[(j>>2)+1].attr({x:i[j],y:i[j+1],width:i[j+2],height:i[j+3]})},b}(ig);ff.register("virtualend",zg,"advshape");var Ag=function(a){function b(){a.call(this),this._actualHandlerX=0,this._actualHandlerY=0}return dd(b,a),d(b.prototype,"handlerX",{get:function(){return this._actualHandlerX+this.x},set:function(a){a-=this.x,this._actualHandlerX!==a&&(this._actualHandlerX=a,this.render())},enumerable:!0,configurable:!0}),d(b.prototype,"handlerY",{get:function(){return this._actualHandlerY+this.y},set:function(a){a-=this.y,this._actualHandlerY!==a&&(this._actualHandlerY=a,this.render())},enumerable:!0,configurable:!0}),b.prototype._onXChange=function(a){this._actualHandlerX+=a-this.x,this.render()},b.prototype._onYChange=function(a){this._actualHandlerY+=a-this.y,this.render()},b}(ig),Bg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){var b=a.prototype.createShape.call(this);return this._cloud=b.el("path"),this._circles=[b.el("circle"),b.el("circle")],b},b.prototype._renderCircles=function(){var a=this._circles,b=this.actualWidth/2,c=this.actualHeight/2,d=Math.max(2*b,2*c)/25,e=this._actualHandlerX,f=this._actualHandlerY;a[1].attr({r:3*d/5,cx:e,cy:f});var g=kc(e-b,f-c,b,c);a[0].attr({r:d,cx:(g[0]+b+e)/2,cy:(g[1]+c+f)/2})},b.prototype.render=function(){var a=b.pathData,c=this.actualWidth/a.width,d=this.actualHeight/a.height;this._cloud.attr("d",c*d?Fg.transformPath(a.path,c,d):""),this._renderCircles()},b.pathData={path:"M42.128,47.696c0,0-7.188,0.875-11.438-0.688c-2.563-0.941-4.188-3.563-4.188-3.563s-9.439,1.243-13.939,0.43S4.812,40.563,3,38.813s-2.948-4.77-2.999-8.244c-0.05-3.438,1.123-6.746,2.938-8.438c3.688-3.438,7.938-4.938,7.938-4.938s-0.53-1.672,0.467-3.674c0.908-1.826,1.902-3.023,5.347-4.514c4.188-1.813,7.563-0.5,9.188-0.125s4.188,2.438,4.188,2.438s5.5-11,21.437-11.313c15.938-0.313,21.348,11.016,21.811,11.877c1.314,2.438,1.375,5.688,1.375,5.688s7.5,2.75,9.564,7.188c2.063,4.438,1.188,7.872,0.438,9.938c-2.75,7.563-8.941,8.617-8.941,8.617s-1.061,2.884-5.936,5.071c-4.938,2.125-12.176,1.813-12.176,1.813s-1.643,6.071-7.764,5.974C43.752,56.074,42.128,47.696,42.128,47.696z",width:88,height:58},b}(Ag);ff.register("clouddialogbox",Bg,"advshape");var Cg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:path")},b.prototype.render=function(){var a=this.actualWidth/2,b=this.actualHeight/2,c=this._actualHandlerX-a,d=this._actualHandlerY-b;if(1>c*c/(a*a)+d*d/(b*b))return void this._shape.attr("d","M"+a+" 0 A"+a+" "+b+" 0 1 1 0 "+b+" A"+a+" "+b+" 0 0 1 "+a+" 0 Z");var e=Math.atan2(d,c)*pe,f=Math.tan((e-15)*oe),g=Math.tan((e+15)*oe),h=a*b/Math.sqrt(b*b+f*f*a*a)||0,i=f*h,j=(h-c)*(h-c)+(i-d)*(i-d),k=(h+c)*(h+c)+(i+d)*(i+d);j>k&&(h*=-1,i*=-1);var l=a*b/Math.sqrt(b*b+g*g*a*a)||0,m=g*l,j=(l-c)*(l-c)+(m-d)*(m-d),k=(l+c)*(l+c)+(m+d)*(m+d);j>k&&(l*=-1,m*=-1),this._shape.attr("d",["M"+(h+a)+" "+(i+b),"A"+a+" "+b+" 0 1 0 "+(l+a)+" "+(m+b),"L"+(c+a)+" "+(d+b),"Z"].join(" "))},b}(Ag);ff.register("ovaldialogbox",Cg,"advshape");var Dg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:polygon")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=[0,0,a,0,a,b,0,b],d=this._getArea(),e=this._getHandlerPoints(d);if(e)for(var f=(d+2)%4<<1,g=-1,h=e.length;++g<h;)c.splice(f+g,0,e[g]);this._shape.attr("points",c.join(","))},b.prototype._getArea=function(){return~~((360+(Math.atan2(this._actualHandlerY-this.actualHeight/2,this._actualHandlerX-this.actualWidth/2)*pe+45))/90)%4},b.prototype._getHandlerPoints=function(a,b){var c=this._actualHandlerX,d=this._actualHandlerY,e=this.actualWidth,f=this.actualHeight;if(!b&&c>=0&&e>=c&&d>=0&&f>=d)return null;switch(a){case 0:var g=f/4;return f/2>d?[e,Math.max(d,0),c,d,e,Math.max(d+g,g)]:[e,Math.min(d-g,3*g),c,d,e,Math.min(d,f)];case 2:var g=f/4;return d>=f/2?[0,Math.min(d,f),c,d,0,Math.min(d-g,3*g)]:[0,Math.max(d+g,g),c,d,0,Math.max(d,0)];case 1:var g=e/4;return c>=e/2?[Math.min(c,e),f,c,d,Math.min(c-g,3*g),f]:[Math.max(c+g,g),f,c,d,Math.max(c,0),f];case 3:var g=e/4;return e/2>c?[Math.max(c,0),0,c,d,Math.max(c+g,g),0]:[Math.min(c-g,3*g),0,c,d,Math.min(c,e),0]}},b}(Ag);ff.register("rectangulardialogbox",Dg,"advshape");var Eg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){return Hi("svg:path")},b.prototype.render=function(){var a=this.actualWidth,b=this.actualHeight,c=this._getHandlerPoints(this._getArea(),!0),d=Math.min(a/8,10),e=["M"+d+" 0","L"+(a-d)+" 0","A"+d+" "+d+" 0 0 1 "+a+" "+d,"L"+a+" "+(b-d),"A"+d+" "+d+" 0 0 1 "+(a-d)+" "+b,"L"+d+" "+b,"A"+d+" "+d+" 0 0 1 0 "+(b-d),"L0 "+d,"A"+d+" "+d+" 0 0 1 "+d+" 0","Z"];this._shape.attr("d",this._insertHandlerPoints(c,e,d).join(" "))},b.prototype._getGridPosition=function(a,b,c){var d=c>=a?0:a<=this.actualWidth-c?3:6;return d+(c>=b?1:b<=this.actualHeight-c?2:3)},b.prototype._insertHandlerPoints=function(a,c,d){var e=this._getGridPosition(a[0],a[1],d),f=this._getGridPosition(a[4],a[5],d),g=b._cornerPosMap,h=b._insPosMap,i=this.actualWidth,j=this.actualHeight;if(e===f){var k=g[e];k?c.splice(h[e],0,"A"+d+" "+d+" 0 0 1 "+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]):c.splice(h[e],0,"L"+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5])}else switch(e){case 1:c.splice(0,1,"M"+a[4]+" "+a[5]),c.splice(8,1,(a[0]?"A"+d+" "+d+" 0 0 1 ":"L")+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]),4!==f&&c.splice(1,2);break;case 2:c.splice(7,a[5]?1:2,"L"+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 3:c.splice(6,2!==f?2:1,(a[1]===j?"L":"A"+d+" "+d+" 0 0 1 ")+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 4:c.splice(1,a[4]===i?2:1,"L"+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 6:c.splice(5,a[4]?1:2,"L"+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 7:c.splice(2,8!==f?2:1,(a[1]?"A"+d+" "+d+" 0 0 1 ":"L")+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 8:c.splice(3,a[5]===j?2:1,"L"+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5]);break;case 9:c.splice(4,f+3!==e?2:1,(a[0]===i?"L":"A"+d+" "+d+" 0 0 1 ")+a[0]+" "+a[1],"L"+a[2]+" "+a[3],"L"+a[4]+" "+a[5])}return c},b._cornerPosMap={1:!0,3:!0,7:!0,9:!0},b._insPosMap=[0,8,7,6,1,0,5,2,3,4],b}(Dg);ff.register("roundedrectangulardialogbox",Eg,"advshape");var Fg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype.createShape=function(){var a=Hi("svg:g");return this._createPaths(a),this._createFills(a),this._createStrokes(a),a},b.prototype._createPaths=function(a){this._pathEls=null;var b=this._paths;if(b){this._pathEls=[];for(var c=-1,d=b.length;++c<d;)this._pathEls.push(a.el("path"))}},b.prototype._createStrokes=function(a){this._strokeEls=null;var b=this._strokes;if(b){this._strokeEls=[];for(var c=-1,d=b.length;++c<d;)this._strokeEls.push(a.el("path").attr({fill:"none","stroke-linejoin":"round"}))}},b.prototype._createFills=function(a){this._fillEls=null;var b=this._fills;if(b){this._fillEls=[];for(var c=-1,d=b.length;++c<d;)this._fillEls.push(a.el("path").attr({stroke:"none","fill-rule":"evenodd","clip-rule":"evenodd"}))}},d(b.prototype,"_paths",{get:function(){return this.constructor.pathData.paths},enumerable:!0,configurable:!0}),d(b.prototype,"_strokes",{get:function(){return this.constructor.pathData.strokes},enumerable:!0,configurable:!0}),d(b.prototype,"_fills",{get:function(){return this.constructor.pathData.fills},enumerable:!0,configurable:!0}),d(b.prototype,"_baseWidth",{get:function(){return this.constructor.pathData.width},enumerable:!0,configurable:!0}),d(b.prototype,"_baseHeight",{get:function(){return this.constructor.pathData.height},enumerable:!0,configurable:!0}),b.prototype.render=function(){var a,c,d=this.actualWidth/this._baseWidth,e=this.actualHeight/this._baseHeight,f=b.transformPath;if(a=this._pathEls){c=this._paths;for(var g=-1,h=c.length;++g<h;)a[g].attr("d",d*e?f(c[g],d,e):null)}if(a=this._fillEls){c=this._fills;for(var g=-1,h=c.length;++g<h;)a[g].attr("d",d*e?f(c[g],d,e):null)}if(a=this._strokeEls){c=this._strokes;for(var g=-1,h=c.length;++g<h;)a[g].attr("d",d*e?f(c[g],d,e):null)}},b.transformPath=function(a,b,c){for(var d,e=/([a-zA-Z])([\d.,\s\-]*)/g,f=/(-?[\d.]+)(,?\s*)/g,g="",h=0;d=e.exec(a);){var i=d[1],j=d[2];switch(g+=a.substring(h,d.index)+i,h=e.lastIndex,i=i.toLowerCase(),f.lastIndex=0,i){case"v":d=f.exec(j),g+=+d[1]*c+d[2];break;case"h":d=f.exec(j),g+=+d[1]*b+d[2];break;default:for(var k=0,l=0,m="a"===i;d=f.exec(j);){var n=+d[1],o=d[2];m?(2>k||k>4)&&(n*=(k+(k>4?1:0))%2?c:b):n*=k%2?c:b,++k,g+=n+o,l=f.lastIndex}g+=j.substr(l)}}return g+a.substr(h)},b}(ig),Gg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,36.727L36.64,36.727L47.962,0 59.285,36.727L95.924,36.727L66.282,59.424L77.605,96.151L47.962,73.453L18.32,96.151L29.643,59.424L0,36.727z"],strokes:["M0,36.727L36.64,36.727L47.962,0L59.285,36.727L95.924,36.727L66.282,59.424L77.605,96.151L47.962,73.453L18.32,96.151L29.643,59.424L0,36.727z"],width:98,height:99},b}(Fg);ff.register("5pointstar",Gg,"advshape");var Hg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0,60.095C0,26.905,26.842,0,59.953,0l0,0l0,0c33.11,0,59.952,26.905,59.952,60.095l0,0l0,0c0,33.189-26.842,60.095-59.952,60.095l0,0l0,0C26.842,120.189,0,93.284,0,60.095L0,60.095L0,60.095z M29.977,60.095c0,16.595,13.421,30.047,29.977,30.047l0,0l0,0c16.555,0,29.976-13.452,29.976-30.047S76.508,30.047,59.953,30.047l0,0l0,0C43.397,30.047,29.977,43.5,29.977,60.095L29.977,60.095z"],width:124,height:124},b}(Fg);ff.register("circle",Hg,"advshape");var Ig=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M19.758,54.438c-2.523-19.239,10.468-36.957,29.017-39.573c7.516-1.061,15.158,0.524,21.703,4.502l0,0c6.935-13.559,23.141-18.712,36.196-11.51c2.283,1.26,4.378,2.856,6.221,4.739l0,0c5.401-11.24,18.557-15.806,29.385-10.199c2.996,1.552,5.61,3.796,7.642,6.56v0c8.705-10.629,24.089-11.942,34.359-2.933c4.316,3.787,7.226,9.009,8.229,14.772l0,0c14.265,4.037,22.679,19.329,18.795,34.155c-0.326,1.247-0.736,2.468-1.226,3.655l0,0c11.439,15.449,8.639,37.591-6.255,49.456c-4.637,3.694-10.113,6.086-15.9,6.944l0,0c-0.129,16.62-13.232,29.985-29.268,29.852c-5.357-0.044-10.599-1.624-15.144-4.564l0,0c-5.424,18.633-24.343,29.165-42.256,23.523c-7.507-2.364-13.994-7.365-18.354-14.148l0,0c-18.341,11.477-42.147,5.304-53.173-13.788c-0.139-0.24-0.275-0.482-0.41-0.726l0,0c-12.003,1.457-22.876-7.428-24.285-19.846c-0.751-6.619,1.355-13.244,5.757-18.11l0,0C0.398,90.853-3.094,76.921,2.993,66.083c3.511-6.253,9.67-10.386,16.582-11.129L19.758,54.438z","M23.738,99.605c-4.437,0.36-8.874-0.703-12.714-3.049 M34.956,132.971c-1.785,0.736-3.655,1.228-5.563,1.459 M82.889,149.003c-1.342-2.088-2.466-4.319-3.352-6.656 M144.872,132.405c-0.198,2.477-0.646,4.925-1.339,7.304 M171.483,87.276c10.061,5.079,16.409,15.699,16.319,27.297 M209.975,58.203c-1.629,3.949-4.116,7.453-7.267,10.235 M192.539,20.223c0.277,1.595,0.406,3.214,0.384,4.834 M146.131,14.584c0.946-2.23,2.2-4.307,3.723-6.165 M111.313,17.522c0.386-1.843,0.992-3.629,1.803-5.317 M70.452,19.328c2.368,1.439,4.559,3.171,6.524,5.158 M20.897,59.867c-0.517-1.775-0.897-3.59-1.139-5.427"],width:226,height:174},b}(Fg);ff.register("cloud",Ig,"advshape");var Jg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0,38.611L158.163,38.611L158.163,154.445L0,154.445L0,38.611","M158.163,38.611L191.977,0L191.977,115.834L158.163,154.445L158.163,38.611","M0,38.611L33.814,0L191.977,0L158.163,38.611L0,38.611"],width:196,height:158},b}(Fg);ff.register("cube",Jg,"advshape");var Kg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,86.019l15.19-16.471v7.611l0,0c22.612-3.768,39.878-15.563,44.415-30.344l0,0C65.859,67.2,46.376,87.19,15.19,92.386l0,0v7.613L0,86.019L0,86.019z","M60.76,54.429c0-21.65-27.204-39.203-60.761-39.203l0,0l0,0V0l0,0C33.556,0,60.76,17.552,60.76,39.203l0,0V54.429z"],strokes:["M60.76,54.429c0-21.65-27.204-39.203-60.761-39.203l0,0l0,0V0l0,0C33.556,0,60.76,17.552,60.76,39.203l0,0l0,0V54.429L60.76,54.429c0,17.877-18.742,33.488-45.57,37.959l0,0v7.613L0,86.019l15.19-16.471v7.611l0,0c22.612-3.768,39.878-15.563,44.415-30.344"],width:64,height:100},b}(Fg);ff.register("curvedleftarrow",Kg,"advshape");var Lg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0.012,39.205c0,17.875,18.744,33.488,45.571,37.957l0,0v-7.613l15.189,16.473l-15.189,13.98v-7.613l0,0C18.756,87.917,0.012,72.306,0.012,54.431V39.205z","M60.773,15.227c-29.009,0-53.971,13.23-59.604,31.589l0,0C-5.349,25.578,16.055,4.952,48.973,0.747C52.86,0.25,56.811,0,60.773,0V15.227L60.773,15.227z"],strokes:["M0.012,39.205c0,17.875,18.744,33.488,45.571,37.957l0,0v-7.613l15.189,16.473l-15.189,13.98v-7.613l0,0C18.756,87.917,0.012,72.306,0.012,54.431l0,0V39.205L0.012,39.205c0-21.651,27.204-39.203,60.761-39.203l0,0v15.227l0,0c-29.009,0-53.971,13.23-59.604,31.59"],width:64,height:100},b}(Fg);ff.register("curvedrightarrow",Lg,"advshape");var Mg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,10.512c0,5.806,21.546,10.512,48.125,10.512S96.25,16.318,96.25,10.512l0,0v63.072l0,0c0,5.805-21.546,10.512-48.125,10.512S0,79.39,0,73.584l0,0V10.512z","M0,10.512C0,4.707,21.546,0,48.125,0S96.25,4.707,96.25,10.512l0,0l0,0c0,5.806-21.546,10.512-48.125,10.512S0,16.318,0,10.512L0,10.512L0,10.512z"],strokes:["M96.25,10.512c0,5.806-21.546,10.512-48.125,10.512S0,16.318,0,10.512l0,0l0,0C0,4.707,21.546,0,48.125,0S96.25,4.707,96.25,10.512L96.25,10.512L96.25,10.512v63.072l0,0c0,5.805-21.546,10.512-48.125,10.512S0,79.39,0,73.584l0,0v0V10.512"],width:100,height:88},b}(Fg);ff.register("cylinder",Mg,"advshape");var Ng=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0,71.112C0,31.838,31.987,0,71.444,0l0,0l0,0c39.457,0,71.443,31.838,71.443,71.112l0,0l0,0c0,39.274-31.986,71.112-71.443,71.112l0,0l0,0C31.987,142.224,0,110.386,0,71.112L0,71.112L0,71.112z M110.866,92.29c11.8-21.581,3.716-48.557-18.057-60.253c-13.295-7.142-29.326-7.161-42.638-0.05L110.866,92.29zM32.021,49.935c-11.8,21.581-3.715,48.556,18.057,60.252c13.295,7.142,29.326,7.16,42.638,0.05L32.021,49.935z"],width:145,height:144},b}(Fg);ff.register("doublecircle",Ng,"advshape");var Og=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M47.962,25.818L64.491,0L62.861,23.704L81.624,19.84L74.173,32.563L93.69,36.221L78.191,46.629L95.924,59.16L74.772,57.611L80.581,80.549L62.262,64.355L58.829,87.858L46.772,66.482L37.681,96.151L34.262,69.563L21.147,78.421L25.167,62.04L0.599,64.933L16.529,52.416L0,38.349L20.548,33.907L1.643,10.216L32.472,28.133L37.091,10.216L47.962,25.818z"],strokes:["M47.962,25.818L64.491,0L62.861,23.704L81.624,19.84L74.173,32.563L93.69,36.221L78.191,46.629L95.924,59.16L74.772,57.611L80.581,80.549L62.262,64.355L58.829,87.858L46.772,66.482L37.681,96.151L34.262,69.563L21.147,78.421L25.167,62.04L0.599,64.933L16.529,52.416L0,38.349L20.548,33.907L1.643,10.216L32.472,28.133L37.091,10.216L47.962,25.818z"],width:98,height:99},b}(Fg);ff.register("explosion1",Og,"advshape");var Pg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M50,23.645c20.683-58.048,101.344,0,0,74.634C-51.344,23.645,29.317-34.403,50,23.645L50,23.645z"],strokes:["M50,23.645c20.683-58.048,101.344,0,0,74.634C-51.344,23.645,29.317-34.403,50,23.645L50,23.645z"],width:104,height:102},b}(Fg);ff.register("heart",Pg,"advshape");var Qg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,19.969L19.921,0L19.921,9.984L80.077,9.984L80.077,0L100,19.969L80.077,39.938L80.077,29.953L19.921,29.953L19.921,39.938L0,19.969z"],strokes:["M0,19.969L19.921,0L19.921,9.984L80.077,9.984L80.077,0L100,19.969L80.077,39.938L80.077,29.953L19.921,29.953L19.921,39.938L0,19.969z"],width:103,height:42},b}(Fg);ff.register("leftrightarrow",Qg,"advshape");var Rg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M37.624,0L57.11,27.065L49.072,30.256L73.617,53.449L65.579,57.321L95.924,96.151L44.462,66.393L54.277,62.262L22.302,43.201L33.76,37.312L0,17.316L37.624,0z"],strokes:["M37.624,0L57.11,27.065L49.072,30.256L73.617,53.449L65.579,57.321L95.924,96.151L44.462,66.393L54.277,62.262L22.302,43.201L33.76,37.312L0,17.316L37.624,0z"],width:98,height:99},b}(Fg);ff.register("lightningbolt",Rg,"advshape");var Sg=function(a){function b(){a.call(this)}return dd(b,a),b.prototype._updateGradient=function(b){if(a.prototype._updateGradient.call(this,b),this._gradient){for(var c=this._gradientEl,d=c.select("stop"),e=100,f=0,g=[],h=-1,i=d.length;++h<i;){var j=d[h],k=parseFloat(j.getAttribute("offset"));e>k?(e=k,g[0]=j):k>f&&(f=k,g[1]=j)}for(var h=-1,i=g.length;++h<i;){var j=g[h],l=j.getAttribute("stop-color")||"#000";this._pathEls[h].attr("fill",cf.stringify(cf.darker(cf.parse(l),.15)))}}},b.pathData={fills:["M21.79,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0H21.79z","M10.896,211.519c0,3.635-2.44,6.582-5.448,6.582S0,215.154,0,211.519c0-3.637,2.439-6.584,5.447-6.584l0,0l0,0c1.505,0,2.724,1.477,2.724,3.293c0,1.818-1.219,3.291-2.724,3.291l0,0H10.896z","M5.447,218.101c3.009,0,5.448-2.947,5.448-6.582l0,0H5.447l0,0c1.505,0,2.724-1.473,2.724-3.291c0-1.816-1.219-3.293-2.724-3.293l0,0l0,0h5.448V6.582l0,0C10.896,2.947,13.334,0,16.343,0l0,0l0,0h65.369l0,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.439,6.582-5.447,6.582l0,0l0,0h-5.447v198.355l0,0c0,3.635-2.44,6.582-5.448,6.582l0,0H5.447z M21.79,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0H21.79z"],strokes:["M10.896,204.935V6.582l0,0C10.896,2.947,13.334,0,16.343,0l0,0l0,0h65.369l0,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.439,6.582-5.447,6.582l0,0l0,0h-5.447v198.355l0,0c0,3.635-2.44,6.582-5.448,6.582l0,0l0,0H5.447l0,0c-3.008,0-5.447-2.947-5.447-6.582c0-3.637,2.439-6.584,5.447-6.584l0,0H10.896z M16.343,0c3.008,0,5.447,2.947,5.447,6.582c0,3.634-2.438,6.582-5.447,6.582l0,0l0,0c-1.505,0-2.725-1.474-2.725-3.29c0-1.818,1.22-3.292,2.725-3.292l0,0l0,0h5.447 M76.265,13.164H16.343 M5.447,204.935c1.505,0,2.724,1.477,2.724,3.293c0,1.818-1.219,3.291-2.724,3.291l0,0l0,0h5.448 M5.447,218.101c3.009,0,5.448-2.947,5.448-6.582l0,0v-6.584"],width:89,height:200},b}(Fg);ff.register("paper",Sg,"advshape");var Tg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0,105.666L52.708,52.833L52.708,79.25L58.316,79.25L58.316,0L166.507,0L166.507,79.25L172.115,79.25L172.115,52.833L224.823,105.666L172.115,158.499L172.115,132.083L166.507,132.083L166.507,211.332L58.316,211.332L58.316,132.083L52.708,132.083L52.708,158.499L0,105.666"],width:227,height:213},b}(Fg);ff.register("polygon",Tg,"advshape");var Ug=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,50L22.447,27.5L22.447,38.75L38.658,38.75L38.658,22.5L27.435,22.5L49.882,0L72.329,22.5L61.105,22.5L61.105,38.75L77.317,38.75L77.317,27.5L99.765,50L77.317,72.5L77.317,61.25L61.105,61.25L61.105,77.5L72.329,77.5L49.882,100L27.435,77.5L38.658,77.5L38.658,61.25L22.447,61.25L22.447,72.5L0,50z"],strokes:["M0,50L22.447,27.5L22.447,38.75L38.658,38.75L38.658,22.5L27.435,22.5L49.882,0L72.329,22.5L61.105,22.5L61.105,38.75L77.317,38.75L77.317,27.5L99.765,50L77.317,72.5L77.317,61.25L61.105,61.25L61.105,77.5L72.329,77.5L49.882,100L27.435,77.5L38.658,77.5L38.658,61.25L22.447,61.25L22.447,72.5L0,50z"],width:102,height:102},b}(Fg);ff.register("quadarrow",Ug,"advshape");var Vg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M0,40C0,17.909,17.866,0,39.905,0c22.04,0,39.905,17.909,39.905,40c0,22.092-17.865,40-39.905,40C17.866,80,0,62.092,0,40L0,40z","M22.964,28.037c0-2.301,1.86-4.167,4.156-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.861,4.167-4.157,4.167C24.825,32.204,22.964,30.338,22.964,28.037L22.964,28.037zM48.533,28.037c0-2.301,1.861-4.167,4.157-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.862,4.167-4.157,4.167C50.395,32.204,48.533,30.338,48.533,28.037L48.533,28.037z"],strokes:["M22.964,28.037c0-2.301,1.86-4.167,4.156-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.861,4.167-4.157,4.167C24.825,32.204,22.964,30.338,22.964,28.037L22.964,28.037z M48.533,28.037c0-2.301,1.861-4.167,4.157-4.167c2.295,0,4.157,1.865,4.157,4.167c0,2.302-1.862,4.167-4.157,4.167C50.395,32.204,48.533,30.338,48.533,28.037L48.533,28.037z","M18.276,57.443c14.419,9.928,28.822,9.928,43.208,0","M0,40C0,17.909,17.866,0,39.905,0c22.04,0,39.905,17.909,39.905,40c0,22.092-17.865,40-39.905,40C17.866,80,0,62.092,0,40L0,40z"],width:82,height:82},b}(Fg);ff.register("smileyface",Vg,"advshape");var Wg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={paths:["M0 0L100 0L100 80 Q75 80,50 92T0 93.3Z"],width:100,height:100},b}(Fg);ff.register("textflowchart",Wg,"advshape");var Xg=function(a){function b(){a.call(this)}return dd(b,a),b.pathData={fills:["M9.305,37.309c5.139,0,9.305-4.176,9.305-9.328l0,0c0-2.576-2.083-4.664-4.653-4.664c-2.569,0-4.652,2.088-4.652,4.664l0,0V37.309z","M245.494,18.655c5.139,0,9.305-4.176,9.305-9.328c0-5.151-4.166-9.327-9.305-9.327c-5.14,0-9.306,4.176-9.306,9.327l0,0l0,0c0,2.576,2.083,4.664,4.652,4.664c2.57,0,4.653-2.088,4.653-4.664V18.655z","M254.799,9.328c0,5.151-4.166,9.327-9.305,9.327l0,0l0,0V9.328l0,0c0,2.575-2.083,4.664-4.653,4.664c-2.569,0-4.652-2.088-4.652-4.664l0,0l0,0v9.327H9.305l0,0C4.166,18.655,0,22.831,0,27.982l0,0v111.926l0,0c0,5.151,4.166,9.327,9.305,9.327s9.305-4.176,9.305-9.327l0,0v-9.327h226.884l0,0c5.139,0,9.305-4.176,9.305-9.327V9.328z M9.305,37.309c5.139,0,9.305-4.176,9.305-9.328l0,0c0-2.576-2.083-4.664-4.653-4.664c-2.569,0-4.652,2.088-4.652,4.664l0,0V37.309z"],strokes:["M0,27.982c0-5.151,4.166-9.327,9.305-9.327l0,0l0,0h226.883V9.328l0,0c0-5.151,4.166-9.328,9.306-9.328c5.139,0,9.305,4.176,9.305,9.328l0,0l0,0v111.926l0,0c0,5.151-4.166,9.327-9.305,9.327l0,0l0,0H18.61v9.327l0,0c0,5.151-4.166,9.327-9.305,9.327S0,145.059,0,139.908l0,0V27.982z M236.188,18.655h9.306l0,0c5.139,0,9.305-4.176,9.305-9.328 M245.494,18.655V9.328l0,0c0,2.575-2.083,4.664-4.653,4.664c-2.569,0-4.652-2.088-4.652-4.664l0,0 M9.305,37.309v-9.327c0-2.576,2.083-4.664,4.652-4.664c2.57,0,4.653,2.088,4.653,4.664l0,0l0,0C18.61,33.133,14.444,37.309,9.305,37.309S0,33.133,0,27.982l0,0 M18.61,27.982v102.599"],width:257,height:151},b
}(Sg);ff.register("tranpaper",Xg,"advshape");var Yg=function(a,b){if(a in b)return a;a=a.charAt(0).toUpperCase()+a.substr(1);for(var c=(td.join(a+" ")+a).split(" "),d=-1,e=c.length;++d<e;)if((a=c[d])in b)return a;return null},Zg=Yg("requestAnimationFrame",a),$g=Yg("cancelAnimationFrame",a)||Yg("cancelRequestAnimationFrame",a),_g=Zg?a[Zg]:null,ah=$g?a[$g]:null,bh=function(c){function e(){var a=this;c.call(this),this.running=!1,this.paused=!1,this._justActived=!1,this._lastTickTime=0,this._children=[],this.currentTime=0,this.frames=0,this._locked=!1,this._fixTickTime=0,this._nextTickTime=0,this._interval=250,this._originalInterval=1e3/60,this._rafId=null,this._asap=!1,this._usingRaf=!1,this._updateCallback=function(){a.update()}}return dd(e,c),e.prototype.run=function(){this.running?this.resume():(this.running=!0,this.resume(),this._tick())},e.prototype.resume=function(){!this.paused&&this.running?this._lastTickTime=Date.now():this._justActived=!0,this.paused&&(this.paused=!1)},e.prototype.pause=function(){this.paused||(this.paused=!0)},e.prototype.stop=function(){this.pause(),this.running&&(this.running=!1)},e.prototype.add=function(a){var b=this._children;a&&b.indexOf(a)<0&&(b.push(a),this.interval=this._originalInterval)},e.prototype.remove=function(a){var b=this._children,c=b.indexOf(a);c>=0&&(this._locked?b[c]=null:b.splice(c,1))},e.prototype.update=function(){if(!this.paused){++this.frames,this._asap=!1;var a=Date.now(),b=a-this._lastTickTime;this._lastTickTime=this._fixTickTime=a;var c=b>=this._interval?b-this._interval:0;this._nextTickTime=c>=this._interval?4:this._interval-c,this._justActived&&(b=0,this._justActived=!1),a=this.currentTime+=b,this._locked=!0;for(var d=this._children,e=-1,f=d.length;++e<f;){var g=d[e];g?g.update(a):(d.splice(e--,1),--f)}this._locked=!1,d.length||(this._interval=250),this._tick()}},d(e.prototype,"interval",{set:function(a){if(this._originalInterval=a,this._interval!==a){{this._interval}if(this._interval=a,!this._locked&&null!=this._rafId&&(this._asap?(this._asap=!1,Ad(this._rafId),this._rafId=null):this._usingRaf?ah&&(ah(this._rafId),this._rafId=null):(wd(this._rafId),this._rafId=null),null==this._rafId)){var b=Date.now()-this._lastTickTime;b>=this._interval?(this._asap=!0,this._rafId=zd(this._updateCallback)):(this._fixTime(),this._tick())}}},enumerable:!0,configurable:!0}),e.prototype._fixTime=function(){var a=Date.now(),b=a-this._fixTickTime;this._fixTickTime=a,a=this._interval;var c=b>=a?b-a:b;this._nextTickTime=c>=a?4:a-c},e.prototype._tick=function(){this.running&&(_g&&this._interval===1e3/60?(this._usingRaf=!0,this._rafId=_g(this._updateCallback)):(this._usingRaf=!1,this._rafId=vd(this._updateCallback,this._nextTickTime)))},e.getInstance=function(){if(!this.instance){var c=this.instance=new e,d=Yg("hidden",b),f=d?(/H/.test(d)?d.substr(0,d.indexOf("H")):"")+"visibilitychange":null;"onpageshow"in a&&"onpagehide"in a&&a.addEventListener("pageshow",function(){c.stop(),c.run()},!1),d&&f&&b.addEventListener(f,function(){b[d]||(c.stop(),c.run())},!1),c.run()}return this.instance},e.instance=null,e}(cd);ad.Ticker=bh;var ch=function(a){function c(b,d){a.call(this),this.context=d,this._flags=0,this._accelerate=c.defaultAccelerate,this._deferred=!1,this._x=0,this._y=0,this._tx=0,this._ty=0,this._tz=0,this._sx=1,this._sy=1,this._scaleX=1,this._scaleY=1,this._scaleZ=1,this._rotation=0,this._rotationX=0,this._rotationY=0,this._skewX=0,this._skewY=0,this._p=0,this._originX=.5,this._originY=.5,this._originZ=0,this._dirty=!1,this._originDirty=!1,this._el=b,b[dh]=this}return dd(c,a),d(c.prototype,"el",{get:function(){return this._el},enumerable:!0,configurable:!0}),d(c.prototype,"accelerate",{get:function(){return this._accelerate},set:function(a){this._accelerate!==a&&(this._accelerate=a,this.update())},enumerable:!0,configurable:!0}),d(c.prototype,"deferred",{get:function(){return this._deferred},set:function(a){this._deferred!==a&&(this._deferred=a,a||(this._dirty&&this.update(),this._originDirty&&this.updateOrigin()))},enumerable:!0,configurable:!0}),d(c.prototype,"tx",{get:function(){return this._tx},set:function(a){var b=this._tx;b!==a&&(this._tx=a,this.update(),this.notifyPropertyChange("tx",b))},enumerable:!0,configurable:!0}),d(c.prototype,"ty",{get:function(){return this._ty},set:function(a){var b=this._ty;b!==a&&(this._ty=a,this.update(),this.notifyPropertyChange("ty",b))},enumerable:!0,configurable:!0}),d(c.prototype,"tz",{get:function(){return this._tz},set:function(a){var b=this._tz;b!==a&&(this._tz=a,a?this._flags|=16:this._flags&=-17,this.update(),this.notifyPropertyChange("tz",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleX",{get:function(){return this._scaleX},set:function(a){var b=this._scaleX;b!==a&&(this._scaleX=a,this.update(),this.notifyPropertyChange("scaleX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleY",{get:function(){return this._scaleY},set:function(a){var b=this._scaleY;b!==a&&(this._scaleY=a,this.update(),this.notifyPropertyChange("scaleY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"scaleZ",{get:function(){return this._scaleZ},set:function(a){var b=this._scaleZ;b!==a&&(this._scaleZ=a,1!==a?this._flags|=2:this._flags&=-3,this.update(),this.notifyPropertyChange("scaleZ",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotation",{get:function(){return this._rotation},set:function(a){var b=this._rotation;b!==a&&(this._rotation=a,this.update(),this.notifyPropertyChange("rotation",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotationX",{get:function(){return this._rotationX},set:function(a){var b=this._rotationX;b!==a&&(this._rotationX=a,1!==a?this._flags|=4:this._flags&=-5,this.update(),this.notifyPropertyChange("rotationX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"rotationY",{get:function(){return this._rotationY},set:function(a){var b=this._rotationY;b!==a&&(this._rotationY=a,1!==a?this._flags|=8:this._flags&=-9,this.update(),this.notifyPropertyChange("rotationY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"skewX",{get:function(){return this._skewX},set:function(a){var b=this._skewX;b!==a&&(this._skewX=a,this.update(),this.notifyPropertyChange("skewX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"skewY",{get:function(){return this._skewY},set:function(a){var b=this._skewY;b!==a&&(this._skewY=a,this.update(),this.notifyPropertyChange("skewY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"p",{get:function(){return this._p},set:function(a){var b=this._p;b!==a&&(this._p=a,a?this._flags|=1:this._flags&=-2,this.update(),this.notifyPropertyChange("p",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originX",{get:function(){return this._originX},set:function(a){var b=this._originX;b!==a&&(this._originX=a,this.updateOrigin(),this.notifyPropertyChange("originX",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originY",{get:function(){return this._originY},set:function(a){var b=this._originY;b!==a&&(this._originY=a,this.updateOrigin(),this.notifyPropertyChange("originY",b))},enumerable:!0,configurable:!0}),d(c.prototype,"originZ",{get:function(){return this._originZ},set:function(a){var b=this._originZ;b!==a&&(this._originZ=a,this.updateOrigin(),this.notifyPropertyChange("originZ",b))},enumerable:!0,configurable:!0}),c.prototype.notifyPropertyChange=function(){},c.prototype.update=function(){this._deferred?this._dirty=!0:(this._dirty=!1,this.context&&this.context.onTransformUpdate(),this._el.style[$f]=this._flags&&bg?c.resolve3d(this):c.resolve2d(this,this._accelerate))},c.prototype.updateOrigin=function(){this._deferred?this._originDirty=!0:(this._originDirty=!1,this._el.style[_f]=100*this._originX+"% "+100*this._originY+"% "+(this._originZ&&bg?this._originZ+"px":""))},c.prototype.destroy=function(){this._el=this.context=null},c.prototype.clone=function(a){var b=c.KEYWORDS_LIST,d=this._deferred;this.deferred=!0;for(var e=-1,f=b.length;++e<f;){var g=b[e];this[g]=a[g]}return this.deferred=d,this},c.resolve2d=function(a,b){var c=a._x+a._tx,d=a._y+a._ty,e="translate("+c+"px,"+d+"px)";return b&&bg&&(e+=" translateZ("+a._tz+"px)"),a._rotation%360&&(e+=" rotate("+a._rotation+"deg)"),(a._skewX%360||a._skewY%360)&&(e+=" skew("+a._skewX+"deg,"+a._skewY+"deg)"),c=a._scaleX*a._sx,d=a._scaleY*a._sy,(1!==c||1!==d)&&(e+=" scale("+c+","+d+")"),e},c.resolve3d=function(a){var b=(a._p?"perspective("+a._p+"px)":"")+" translate3d("+(a._x+a._tx)+"px,"+(a._y+a._ty)+"px,"+a._tz+"px)";a._rotationX%360&&(b+=" rotateX("+a._rotationX+"deg)"),a._rotationY%360&&(b+=" rotateY("+a._rotationY+"deg)"),a._rotation%360&&(b+=" rotateZ("+a._rotation+"deg)"),(a._skewX%360||a._skewY%360)&&(b+=" skew("+a._skewX+"deg,"+a._skewY+"deg)");var c=a._scaleX*a._sx,d=a._scaleY*a._sy;return(1!==c||1!==d||1!==a._scaleZ)&&(b+=" scale3d("+c+","+d+","+a._scaleZ+")"),b},c.transform=function(a){var d=a[dh];if(d)return d;d=a[dh]=new c(a);var e=Yh(a,_f);if(e&&"none"!==e)for(var f=e.split(" "),g=-1,h=f.length;++g<h;){var i=f[g];if(2>g){var j=.5;"%"===i.substr(i.length-1)?j=parseFloat(i)/100:(j=parseFloat(i)/(g?Ud(a):Rd(a)),0===j||j||(j=.5)),g?d._originY=j:d._originX=j}else d._originZ=parseFloat(i)}if(e=Yh(a,$f),!e||"none"===e)return d;if(!fh.test(e)){c._transformEl||(c._transformEl=b.createElement("div"));var k=c._transformEl;k.style.cssText="position:absolute;left:0;top:0;visibility:hidden;width:0;height:0;overflow:hidden;",k.style[$f]=e,b.body.appendChild(k),e=Yh(k,"transform"),b.body.removeChild(k),k=null}return c.parse(e,d)},c.parse=function(a,b){a&&"none"!==a||(a="");var d=b._deferred;b._deferred=!0;var e=(a.replace("3d","").match(eh)||[]).map(function(a){return+a});16===e.length?Ob(e,b):Nb(e,b);var f=qe;b.skewY=0;for(var g=c.INNER_KEYWORDS_LIST,h=-1,i=g.length;++h<i;){var j=g[h],k=b[j];b[j]=f>k&&k>-f?0:~~(1e7*k)/1e7}var l=0;return 0!==b._p&&(l=1),1!==b._scaleZ&&(l|=2),0!==b._rotationX&&(l|=4),0!==b._rotationY&&(l|=8),0!==b._tz&&(l|=16),b._flags=l,b._accelerate=!!l||16===e.length,b._deferred=d,b},c.KEYWORDS_LIST="tx ty tz scaleX scaleY scaleZ rotation rotationX rotationY skewX skewY p originX originY originZ".split(" "),c.KEYWORDS=g(c.KEYWORDS_LIST),c.INNER_KEYWORDS_LIST=("_"+c.KEYWORDS_LIST).replace(/ /g," _").split(" "),c.defaultAccelerate=!1,c._transformEl=null,c}(cd),dh="__leo_transform__",eh=/(?:\-|\b)([\d\-\.e]+)/gi,fh=/^matrix(?:3d)?\([^)]+\)$/,gh=b.contains?function(a,b){return a.contains(b)}:function(a,b){return!!(16&a.compareDocumentPosition(b))},hh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ih={},jh=function(a){var b=a.indexOf(":"),c=a;b>=0&&(c=a.substr(0,b),a=a.substr(b+1));var d=ih;return d.space=hh[c],d.local=a,d},kh=function(a,c){var d=jh(a);a=d.local,d.space&&(c=d.space);var e=c?b.createElementNS(c,a):b.createElement(a);return"svg"===a&&(e.setAttribute("xmlns",d.space),e.setAttribute("xmlns:xlink",hh.xlink),e.setAttribute("version","1.1")),e},lh=/^(?:mouse|contextmenu)|click|tap|touch|pointer/,mh={},nh=function(a,b,c,d){for(var e=b,f=Rb(a),g=mh[f]||(mh[f]={}),h=ph,i=oh,j=b;e;){var k=i(a,e,c,d);if(g[k])return;var l=h[e];e=null,l&&(l.bind&&(c=l.bind(a,c)),l.type&&(e=b=l.type)),g[k]=c}var m=c;lh.test(j)&&(m=function(a){var b=a instanceof ii?a:ii.delegate(a);c.call(this,b),ii.recycle(b)},g[k]=m,m[th]=c[th]),a.addEventListener(b,m,!1)},oh=function(a,b,c,d){var e,f,g=th;return(e=a[g])||(e=a[g]=sh++),(f=c[g])||(f=c[g]=sh++),e+"_"+b+"_"+f+(d?"_$":"")},ph={};"onmouseenter"in sd||Qb({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){ph[b]={type:a,bind:function(a,c){return function(d){var e=d.relatedTarget;(!e||e!==a&&!gh(a,e))&&(d._type=b,c.call(a,d))}}}}),"keypress keydown keyup".replace(/\w+/g,function(a){ph[a]={bind:function(a,b){return function(c){var d=c instanceof hi?c:hi.delegate(c);b.call(a,d),hi.recycle(d)}}}}),sd.onmousewheel===c&&(ph.mousewheel={type:"wheel",bind:function(a,b){return function(c){c.wheelDeltaY=c.wheelDelta=c._originalEvent.deltaY>0?-120:120,c._type="mousewheel",b.call(a,c)}}});var qh=function(a,b,c,d){if(a[th]&&c[th]){var e,f=Rb(a),g=b,h=mh[f],i=ph,j=oh;if(h){for(;g;){if(!(e=j(a,g,c,d)))return;var k=i[g];if(g=null,!h[e])return;k&&(k.unbind&&k.unbind(a,c),k.type&&(g=b=k.type)),c=h[e],delete h[e]}Vc(h)&&delete mh[f],a.removeEventListener(b,c,!1)}}},rh=function(a,b){var c=a[th];if(c&&mh[c]){var d=mh[c],e=function(){},f=th,g=qh;for(var h in d){var i=h.split("_"),j=i[1];e[f]=i[2],i[3]||b&&b!==j||g(a,j,e)}}},sh=1,th="__event_guid__",uh=function(a,b,c){var d=function(d){qh(a,b,c),c.call(a,d)},e=th;c[e]||(c[e]=sh++),d[e]=c[e],nh(a,b,d)};if(Zf){var vh={};Qb({tapstart:["mousedown","touchstart"],tapmove:["mousemove","touchmove"],tapend:["mouseup","touchend"],tapcancel:["mouseleave","touchcancel"]},function(a,b){var c=a[1],d=a[0];ph[c]={bind:function(a,b){return function(c){return b.call(a,Sb(a,c))}}},ph[b]={type:d,bind:function(a,d){var e=function(c){c._type=b,d.call(a,c)};return Tb(a,c,oh(a,b,d),e),e},unbind:function(a,d){Ub(a,c,oh(a,b,d))}}});var wh=-1;ph.tap={type:"tapstart",timeThreshold:500,bind:function(a,b){function c(a){i&&a.preventDefault(),j&&a.stopPropagation(),i=!1,j=!1}var d,e,f,g=!1,h=ph.tap.timeThreshold,i=!1,j=!1;vh[oh(a,"tap-click",b)]=c,nh(a,"click",c,!0);var k=oh(a,"tap-tapend",b),l=function(c){Ub(a,"tapend",k),c.tapStartTime||(c.tapStartTime=d,c.tapStartX=e,c.tapStartY=f);var l=c.timeStamp-d;h>=l&&(c._type="tap",b.call(a,c),j=c._isPropagationStopped,i=c._defaultPrevented),c.tapStartTime=null,g=!1};return function(b){if(d=b.timeStamp,e=b.pageX,f=b.pageY,!g){var c=wh;d-c>=h&&(g=!0,wh=d,nh(a,"tapend",vh[k]=l,!0))}}},unbind:function(a,b){Ub(a,"tapend",oh(a,"tap-tapend",b)),Ub(a,"click",oh(a,"tap-click",b))}},ph.doubletap={type:"tap",timeThreshold:500,pixelThreshold:10,bind:function(a,b){var c,d,e,f=0,g=ph.doubletap.timeThreshold,h=ph.doubletap.pixelThreshold;return function(i){var j,k,l,m;f>0&&(j=i.tapStartX-d,k=i.tapStartY-e,l=i.tapStartTime-c,m=Math.sqrt(j*j+k*k),(l>g||m>h)&&(f=0)),0===f&&(c=i.tapStartTime,d=i.tapStartX,e=i.tapStartY),f++,2===f&&(f=0,i._type="doubletap",b.call(a,i))}}}}else{var xh=navigator.msPointerEnabled||navigator.pointerEnabled,yh=navigator.pointerEnabled?"":"ms";Qb({tapstart:xh?yh+"pointerdown":"mousedown",tapmove:xh?yh+"pointermove":"mousemove",tapend:xh?yh+"pointerup":"mouseup",tap:"click",doubletap:"dblclick"},function(a,b){ph[b]={type:a,bind:function(a,c){return function(d){d._type=b,c.call(a,d)}}}})}var zh=function(a,b,c){Ih.test(b)||Kh.test(b)?Mb(a).appendChild(Ph(b,c)):a.innerHTML=b};if(function(){var a=kh("svg");return a.innerHTML="<rect width='1' height='1' />",!(a.firstChild&&"rect"===(a.firstChild.tagName+"").toLocaleLowerCase())}()){var Ah=function(a,b){if(a.childNodes)for(var c=a.childNodes,d=0,e=c.length;e>d;++d){var f=c[d];if(f&&f.tagName){for(var g=kh("svg:"+f.tagName.toLowerCase),h=f.attributes,i=0,j=h.length;j>i;++i){var k=h[d];k&&g.setAttribute(k.name,k.value)}b.appendChild(Ah(f,g))}}return b};Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:function(){return(new XMLSerializer).serializeToString(this)},set:function(a){var c=this.tagName.toLowerCase(),d=this.parentNode,e=Ph(a);"svg"===c?d.insertBefore(e,this):d.insertBefore(Ah(e,b.createDocumentFragment()),this),d.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){return this.outerHTML.replace(new RegExp("<"+this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),"").replace(new RegExp("</"+this.nodeName+">$","i"),"")},set:function(a){Ah(Ph(a),Mb(this))}}})}var Bh=sd.matches||sd[Yg("matchesSelector",sd)],Ch=function(a,b){return Bh.call(b,a)},Dh=function(a){var b={left:0,top:0},c=a.ownerDocument;if(!c)return b;var d=c.defaultView||c.parentWindow,e=c.documentElement;if(!gh(e,a))return b;if(a.getBoundingClientRect){var f=a.getBoundingClientRect();b.top=f.top,b.left=f.left}return{top:b.top+d.pageYOffset-e.clientTop,left:b.left+d.pageXOffset-e.clientLeft}},Eh=function(a){for(var b=a.offsetParent||sd;b&&"HTML"!==b.tagName&&"static"===Yh(b,"position");)b=b.offsetParent;return b||sd},Fh=b.createElement("script"),Gh=b.createRange(),Hh=b.createDocumentFragment(),Ih=/<script/i,Jh=/<([\w:]+)/,Kh=/<(?:tb|td|tf|th|tr|col|opt|leg|cap|area)/,Lh=g(["text/javascript"]),Mh={"*":b.createElement("div"),option:b.createElement("select"),thead:b.createElement("table"),td:b.createElement("tr"),aera:b.createElement("map"),tr:b.createElement("tbody"),col:b.createElement("colgroup"),legend:b.createElement("fieldset")};Mh.optgroup=Mh.option,Mh.tbody=Mh.tfoot=Mh.colgroup=Mh.caption=Mh.thead,Mh.th=Mh.td;var Nh,Oh,Ph=function(a,c){if(a=(""+a).trim(),Gh.createContextualFragment&&!Kh.test(a)&&!Ih.test(a)){var d=b.createRange();return d.selectNodeContents(sd),d.createContextualFragment(a)}var e=Hh.cloneNode(!1),f=(Jh.exec(a)||["",""])[1].toLowerCase();Mh[f]||(f="*");var g=Mh[f];g.innerHTML=a;var h=g.getElementsByTagName("script");if(h.length)for(var i=0,j=h.length;j>i;++i){var k=h[i];if(k&&(!k.type||Lh[k.type]))if(c)k.parentNode.removeChild(k);else{var l=Fh.cloneNode(!1);Array.prototype.forEach.call(k.attributes,function(a){a&&(l[a.name]=a.value)}),l.text=k.text,k.parentNode.replaceChild(l,k)}}for(var m;m=g.firstChild;)e.appendChild(m);return e},Qh=function(a){var b={left:0,top:0};if("fixed"===Yh(a,"position"))var c=a.getBoundingClientRect();else{var d=Eh(a),c=Dh(a);"HTML"!==d.tagName&&(b=Dh(d)),b.top+=Yh(d,"borderTopWidth",!0),b.left+=Yh(d,"borderLeftWidth",!0)}return{top:c.top-b.top-Yh(a,"marginTop",!0),left:c.left-b.left-Yh(a,"marginLeft",!0)}},Rh={BODY:"block"},Sh={style:!0,script:!0},Th={br:!0,hr:!0},Uh=/^\s$/,Vh=a.getComputedStyle,Wh=function(a){function b(b,c){a.call(this),this.context=c,this._deferred=!1,this._blur=0,this._brightness=1,this._contrast=1,this._grayscale=0,this._hueRotate=0,this._invert=0,this._saturate=1,this._sepia=0,this._dropShadow="",this._dirty=!1,this._el=b,b[Xh]=this}return dd(b,a),d(b.prototype,"el",{get:function(){return this._el},enumerable:!0,configurable:!0}),d(b.prototype,"deferred",{get:function(){return this._deferred},set:function(a){this._deferred!==a&&(this._deferred=a,a||this._dirty&&this.update())},enumerable:!0,configurable:!0}),d(b.prototype,"blur",{get:function(){return this._blur},set:function(a){var b=this._blur;0>a&&(a=0),b!==a&&(this._blur=a,this.update(),this.notifyPropertyChange("blur",b))},enumerable:!0,configurable:!0}),d(b.prototype,"brightness",{get:function(){return this._brightness},set:function(a){var b=this._brightness;b!==a&&(this._brightness=a,this.update(),this.notifyPropertyChange("brightness",b))},enumerable:!0,configurable:!0}),d(b.prototype,"contrast",{get:function(){return this._contrast},set:function(a){var b=this._contrast;0>a&&(a=0),b!==a&&(this._contrast=a,this.update(),this.notifyPropertyChange("contrast",b))},enumerable:!0,configurable:!0}),d(b.prototype,"grayscale",{get:function(){return this._grayscale},set:function(a){var b=this._grayscale;a=Math.max(0,Math.min(1,a)),b!==a&&(this._grayscale=a,this.update(),this.notifyPropertyChange("grayscale",b))},enumerable:!0,configurable:!0}),d(b.prototype,"hueRotate",{get:function(){return this._hueRotate},set:function(a){var b=this._hueRotate;b!==a&&(this._hueRotate=a,this.update(),this.notifyPropertyChange("hueRotate",b))},enumerable:!0,configurable:!0}),d(b.prototype,"invert",{get:function(){return this._invert},set:function(a){var b=this._invert;a=Math.max(0,Math.min(1,a)),b!==a&&(this._invert=a,this.update(),this.notifyPropertyChange("invert",b))},enumerable:!0,configurable:!0}),d(b.prototype,"saturate",{get:function(){return this._saturate},set:function(a){var b=this._saturate;0>a&&(a=0),b!==a&&(this._saturate=a,this.update(),this.notifyPropertyChange("saturate",b))},enumerable:!0,configurable:!0}),d(b.prototype,"sepia",{get:function(){return this._sepia},set:function(a){var b=this._sepia;a=Math.max(0,Math.min(1,a)),b!==a&&(this._sepia=a,this.update(),this.notifyPropertyChange("sepia",b))},enumerable:!0,configurable:!0}),d(b.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(a){var b=this._dropShadow;a!==b&&(this._dropShadow=a,this.update(),this.notifyPropertyChange("dropShadow",b))},enumerable:!0,configurable:!0}),b.prototype.notifyPropertyChange=function(){},b.prototype.update=function(){this._deferred?this._dirty=!0:(this._el.style.webkitFilter=b.resolve(this),this._dirty=!1)},b.prototype.reset=function(){this.blur=0,this.brightness=1,this.contrast=1,this.grayscale=0,this.hueRotate=0,this.invert=0,this.saturate=1,this.sepia=0,this.dropShadow=""},b.prototype.destroy=function(){this._el=this.context=null},b.resolve=function(a){var b=a._blur?"blur("+a._blur+"px)":"";return 1!==a._brightness&&(b+=" brightness("+a._brightness+")"),1!==a._contrast&&(b+=" contrast("+a._contrast+")"),a._grayscale&&(b+=" grayscale("+a._grayscale+")"),a._hueRotate&&(b+=" hue-rotate("+a._hueRotate+"deg)"),a._invert&&(b+=" invert("+a._invert+")"),1!==a._saturate&&(b+=" saturate("+a._saturate+")"),a._sepia&&(b+=" sepia("+a._sepia+")"),a._dropShadow&&(b+=" drop-shadow("+a._dropShadow+")"),b},b.filter=function(a){var c=a[Xh];return c?c:b.parse(Yh(a,"webkitFilter"),a[Xh]=new b(a))},b.parse=function(a,b){a&&"none"!==a||(a="");var c=b._deferred;b._deferred=!0;for(var d=Zc(a," ",!0),e=-1,f=d.length;++e<f;){var g=d[e],h=g.indexOf("(");if(h>=0){var i=g.substr(0,h);"hue-rotate"===i&&(i="hueRotate");var j=g.substr(h+1,g.length-1);"drop-shadow"===i?b.dropShadow=j:(i="_"+i,b[i]="%"===j.charAt(j.length-1)?parseFloat(j)/100:parseFloat(j))}}return b._deferred=c,b},b.KEYWORDS_LIST="blur brightness contrast grayscale hueRotate invert saturate sepia dropShadow".split(" "),b.KEYWORDS=g(b.KEYWORDS_LIST),b}(cd),Xh="__leo_filters__",Yh=function(a,b,c){var d,e=$h[b];return b=Xf(b)||b,d=e&&e.get?e.get(a,b):fc(a,b),c?parseFloat(d)||0:d},Zh=g("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom".split(",")),$h={opacity:{get:function(a){var b=fc(a,"opacity");return b?b:"1"}},width:{get:function(a){var b=fc(a,"width")||"";return/px$/.test(b)?b:Rd(a)+"px"}},height:{get:function(a){var b=fc(a,"height")||"";return/px$/.test(b)?b:Ud(a)+"px"}}};"top,left".replace(/\w+/g,function(a){$h[a]={get:function(b){var c=fc(b,a)||"";return/px$/.test(c)?c:Qh(b)[a]+"px"}}});var _h=function(a,b,c){var d=$h[b];!c&&0!==c||!isFinite(c)||Zh[b]||(c+="px"),d&&d.set?d.set(a,c,b):a.style[Xf(b)||b]=c+""},ai=function(a,b,c){var d=$h[b];d&&d.set?d.set(a,c,b):a.style[b]=c+""},bi=function(a,b,c){if(!(arguments.length<3))return"boolean"==typeof c?Yh(a,b,c):void _h(a,b,c);if("string"==typeof b)return Yh(a,b,!1);for(var d in b)_h(a,d,b[d])};ch.KEYWORDS_LIST.forEach(function(a){$h[a]={get:function(b){var c=ch.transform(b);return c[a]},set:function(b,c){var d=ch.transform(b),e=+c;(0===e||e)&&(d[a]=e)}}}),gc(Zh,ch.KEYWORDS);var ci=function(a){function b(b,c,d){void 0===c&&(c=!1),void 0===d&&(d=!1),a.call(this),this.data=null,this.reinitialize(b,c,d)}return dd(b,a),d(b.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),d(b.prototype,"bubbles",{get:function(){return this._bubbles},enumerable:!0,configurable:!0}),d(b.prototype,"cancelable",{get:function(){return this._cancelable},enumerable:!0,configurable:!0}),d(b.prototype,"timeStamp",{get:function(){return this._timeStamp},enumerable:!0,configurable:!0}),d(b.prototype,"eventPhase",{get:function(){return this._eventPhase},enumerable:!0,configurable:!0}),d(b.prototype,"currentTarget",{get:function(){return this._currentTarget},enumerable:!0,configurable:!0}),b.prototype._setCurrentTarget=function(a){this._currentTarget=a},d(b.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),b.prototype.isDefaultPrevented=function(){return this._defaultPrevented},b.prototype.preventDefault=function(){this._cancelable&&(this._defaultPrevented=!0)},b.prototype.isPropagationStopped=function(){return this._isPropagationStopped},b.prototype.stopPropagation=function(){this._bubbles&&(this._isPropagationStopped=!0)},b.prototype.isImmediatePropagationStopped=function(){return this._isImmediatePropagationStopped},b.prototype.stopImmediatePropagation=function(){this._bubbles&&(this._isImmediatePropagationStopped=!0)},b.prototype.reinitialize=function(a,b,c){this._type=a,this._bubbles=b,this._cancelable=c,this._defaultPrevented=!1,this._isPropagationStopped=!1,this._isImmediatePropagationStopped=!1,this._target=null,this._currentTarget=null,this._eventPhase=2,this._timeStamp=Date.now()},b.prototype.destructor=function(){this._target=null,this._currentTarget=null,this.data=null},b.getEventInstance=function(a,b,c,d,e){void 0===c&&(c=!1),void 0===d&&(d=!1),a.getPooled||Vi.addPoolingTo(a,Vi.THREE_ARGUMENTS);var f=a.getPooled(b,c,d);return null!=e&&(f.data=e),f},b.dispatchEvent=function(a,c,d,e){void 0===d&&(d=!1);var f=b.getEventInstance(b,c,d,!1,e),g=a.dispatchEvent(f);return b.recycle(f),g},b}(cd),di=function(a){function b(b,c,d){a.call(this,b,c,d),this.ctrlKey=!1,this.shiftKey=!1,this.altKey=!1,this.which=null,this.relatedTarget=null,this.srcElement=null,this._originalEvent=null}return dd(b,a),d(b.prototype,"originalEvent",{get:function(){return this._originalEvent},enumerable:!0,configurable:!0}),b.prototype.preventDefault=function(){a.prototype.preventDefault.call(this),this._originalEvent.preventDefault()},b.prototype.stopPropagation=function(){a.prototype.stopPropagation.call(this),this._originalEvent.stopPropagation()},b.prototype.stopImmediatePropagation=function(){a.prototype.stopImmediatePropagation.call(this),this._originalEvent.stopImmediatePropagation&&this._originalEvent.stopImmediatePropagation()},b.prototype.destructor=function(){a.prototype.destructor.call(this),this._originalEvent=null,this.relatedTarget=null,this.srcElement=null},b._injectProperties=function(a,b){return a.ctrlKey=b.ctrlKey,a.shiftKey=b.shiftKey,a.altKey=b.altKey,a._target=b.target,a._setCurrentTarget(b.currentTarget),a.which=b.which,a.relatedTarget=b.relatedTarget,a.srcElement=b.srcElement,a._originalEvent=b,a},b.dispatchDOMEvent=function(a,c,d){var e=b.delegate(c,d),f=a.dispatchEvent(e);return b.recycle(e),f},b.delegate=function(a,b){var c=this.getEventInstance(this,a.type,a.bubbles,a.cancelable,b);return this._injectProperties(c,a)},b}(ci),ei=function(){function a(){}return a.TAP="tap",a.TAP_START="tapstart",a.TAP_MOVE="tapmove",a.TAP_END="tapend",a.TAP_CANCEL="mouseleave",a.DOUBLE_TAP="doubletap",a.MOUSE_ENTER="mouseenter",a.MOUSE_LEAVE="mouseleave",a.MOUSE_SCROLL="mousewheel",a.KEY_DOWN="keydown",a.KEY_PRESS="keypress",a.KEY_UP="keyup",a}(),fi=g("mousemove mousedown mouseup click dblclick contextmenu touchstart touchend touchmove touchcancel");Object.keys(ei).forEach(function(a){fi[ei[a]]=!0});var gi=function(){function a(){}return a.CHILD_ADDED="childAdd",a.CHILD_REMOVED="childRemove",a.ENTER_STAGE="enterStage",a.LEAVE_STAGE="leaveStage",a}(),hi=function(a){function b(b,c,d){a.call(this,b,c,d),this.char=null,this.charCode=null,this.key=null,this.keyCode=null,this.keyName=null}return dd(b,a),b.keyName=function(a){return this.keyMap[a]||String.fromCharCode(a)},b._injectProperties=function(a,b){return a=di._injectProperties(a,b),a.char=b.char,a.charCode=b.charCode,a.key=b.key,a.keyCode=b.keyCode,null==a.which&&(a.which=null!=a.charCode?a.charCode:a.keyCode),a.keyName=this.keyName(a.which),a},b.keyMap={8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",27:"ESCAPE",32:"SPACE",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN"},b}(di),ii=function(a){function b(b,c,d){a.call(this,b,c,d),this.pageX=0,this.pageY=0,this.clientX=0,this.clientY=0,this.wheelDelta=0,this.wheelDeltaY=0,this.button=-1,this.toElement=null}return dd(b,a),b.prototype.destructor=function(){a.prototype.destructor.call(this),this.toElement=null,this.button=-1},b._injectProperties=function(a,b){return a=di._injectProperties(a,b),a.wheelDelta=b.wheelDelta,a.wheelDeltaY=b.wheelDeltaY,a.pageX=b.pageX,a.pageY=b.pageY,a.clientX=b.clientX,a.clientY=b.clientY,a.button=b.button,a.toElement=b.toElement,a},b}(di),ji=function(a){function b(b,c,d){a.call(this,b,c,d),this.oldValue=null}return dd(b,a),b.getInstance=function(a,c){var d=b.getEventInstance(b,a,!1,!1);return d.oldValue=c,d},b.dispatchPropertyChangeEvent=function(a,c,d){if(a.hasEventListener(c+="Change")){var e=b.getInstance(c,d);e._setCurrentTarget(e._target=a),a.dispatchEvent(e),b.recycle(e)}},b}(ci),ki=function(a){function b(){a.call(this),this._packages=[],this._packageMap={},this.paused=!1,this._currentPackage=null,this._handler=null}return dd(b,a),b.prototype.load=function(a,b,c,d){return d=this._add(a,b,c,d,0),this._load(),d},d(b.prototype,"current",{get:function(){return this._currentPackage&&this._currentPackage.id},enumerable:!0,configurable:!0}),b.prototype.contains=function(a){return null!=this._packageMap[a]||this.current===a},b.prototype.remove=function(a){if(this.current===a)this._currentPackage=null,this._load();else if(this.contains(a)){var b=this._packageMap[a],c=this._packages.indexOf(this._packageMap[a]);return c>=0&&this._packages.splice(c,1),delete this._packageMap[a],b}return null},b.prototype.push=function(a,b,c,d){var d=this._add(a,b,c,d,this._packages.length);return this._currentPackage||this._load(),d},b.prototype.pause=function(){return this.paused||(this.paused=!0,this._handler&&(yd(this._handler),this._handler=null)),this},b.prototype.resume=function(){return this.paused&&(this.paused=!1,this._startLoading()),this},b.prototype._pack=function(a,b,c,d){return{id:d,next:0,loaded:0,error:0,total:a.length,cells:a,oncomplete:b,onprogress:c}},b.prototype._add=function(a,b,c,d,e){d=d||w(),this.contains(d)&&this.remove(d);var f={id:d,next:0,loaded:0,error:0,total:a.length,cells:a,oncomplete:b,onprogress:c};return this._packages.splice(e,0,this._packageMap[f.id]=f),d},b.prototype._load=function(){var a=this._currentPackage;this._currentPackage=this._packages[0],this._currentPackage?(delete this._packageMap[this._currentPackage.id],this._packages.splice(0,1),a&&this._packages.splice(0,0,this._packageMap[a.id]=a)):this._currentPackage=a,this._startLoading()},b.prototype._startLoading=function(){var a=this;this._handler&&(yd(this._handler),this._handler=null),this._currentPackage&&(this.dispatchSimpleEvent("start",this._currentPackage),this._handler=xd(function(){var c=a._currentPackage;c.next<c.total&&c.next-c.loaded<b.THRESHOLD?a._loadCell(c.next++):c.loaded===c.total&&a._oncomplete()},b.INTERVAL))},b.prototype._loadCell=function(){},b.prototype._oncomplete=function(){var a=this._currentPackage;this._currentPackage=null,this._load(),a.oncomplete&&a.oncomplete.call(null,a),this.dispatchSimpleEvent("complete",a)},b.INTERVAL=16.667,b.THRESHOLD=60,b}(ed),li=function(a){function b(){a.call(this)}return dd(b,a),b.prototype._loadCell=function(a){var b=this,c=this._currentPackage,d=c.cells[a],e=d.target,f=function(){e.removeEventListener("load",f,e),++c.loaded,4===e.readyState&&++c.error,c.onprogress&&c.onprogress.call(null,c),b.dispatchSimpleEvent("progress",c)};e.addEventListener("load",f,e),e.readyState?e.readyState>=2&&f():e.load(d.data)},b.getInstance=function(){return b.instance||(b.instance=new b),b.instance},b.instance=null,b}(ki),mi=function(){function a(b){this._progress=0,this._animations=new Array(2),this._state=0,this._showHideAnimation=null,this.isStarted=!1,this.options=gc({},a.DEFAULT_OPTIONS,b);this.options.container;this._wrapper=Hi("div").addClass("leo-progress-wrapper"),this._bar=Ii("<div class='leo-progress-bar'><div class='leo-progress-bar--inner'></div></div>").appendTo(this._wrapper)[0],this._spin=Ii("<div class='leo-progress-spin'><div class='leo-progress-spin--inner'></div></div>").appendTo(this._wrapper)[0]}return a.prototype.setContainer=function(a){Gi(a).append(this._bar).append(this._spin)},d(a.prototype,"progress",{get:function(){return this._progress},set:function(a){this._progress=a,this.render(a)},enumerable:!0,configurable:!0}),a.prototype.render=function(a){this._bar.style.width=100*a+"%"},a.prototype.destroy=function(){this._animations.forEach(function(a){a&&a.destroy()
}),this._animations=null,this._showHideAnimation&&(this._showHideAnimation.destroy(),this._showHideAnimation=null),this._wrapper.remove(),this._wrapper=null,this._bar=null,this._spin=null,this.options=null},a.prototype._showHide=function(a){var b=this,c=this._state;(a&&2>c||!a&&c>1)&&(this._showHideAnimation&&this._showHideAnimation.stop(!1,!0),a&&!c&&this._wrapper.appendTo(this.options.container).style({display:"none",opacity:0}),this._state=a?2:1,this._showHideAnimation=ld.to(this._wrapper[0],400,{display:a?"":"none",opacity:a?1:0}),this._showHideAnimation.addEventListener("end",function(){b._showHideAnimation=null,b._state=a?3:0,a||(b._stopSpin(),b.isStarted=!1,b._progress=0,b._wrapper.remove())},null))},a.prototype.start=function(){return this.isStarted||(this.isStarted=!0,this._showHide(!0),2&this.options.type&&this._startSpin(),this.trikle()),this},a.prototype.restart=function(){return this.start(),this.set(0,!0)},a.prototype._animateBarTo=function(a){var b=this,c=this._animations;c[0]&&c[0].stop(!1,!0),c[0]=ld.to(this,this.options.speed,{progress:Jc(a,0,1)},{easing:"swing"}),c[0].addEventListener("end",function(){b._animations[0]=null,1===b._progress?b.options.autoDone&&b.done():b.isStarted&&b.trikle()},null)},a.prototype._startSpin=function(){this._animations[1]||(this._animations[1]=ld.to(this._spin,400,{rotation:"+=360"},{repeat:-1,easing:"linear"}))},a.prototype._stopSpin=function(){this._animations[1]&&(this._animations[1].destroy(),this._animations[1]=null)},a.prototype.set=function(a,b){return this._progress!==a&&(this._showHide(!0),2&this.options.type&&this._startSpin(),(b||!this.options.onlyForward||this._progress<a)&&this._animateBarTo(a)),this},a.prototype.inc=function(a){return this.set(Jc(this._progress+this._getAmount(a),0,.994))},a.prototype._getAmount=function(a){var b=this._progress;if(null==a)var a=(1-b)*Jc(Math.random(),.1,.95);return a},a.prototype.trikle=function(){return this.options.trikleRatio?this.inc(Math.random()*this.options.trikleRatio):this},a.prototype.done=function(){var a=this;if(this._state){if(1!==this._progress){this._animateBarTo(1);var b=this._animations;if(b[0])return void b[0].addEventListener("end",function(){a._showHide(!1)},null,-1/0)}this._showHide(!1)}},a.DEFAULT_OPTIONS={speed:200,trikleRatio:.02,autoDone:!0,onlyForward:!0,container:"body",type:3},a}(),ni=function(a){function b(b,c,d,e,f,g){void 0===b&&(b=1),void 0===c&&(c=0),void 0===d&&(d=0),void 0===e&&(e=1),void 0===f&&(f=0),void 0===g&&(g=0),a.call(this),this.a=b,this.b=c,this.c=d,this.d=e,this.tx=f,this.ty=g}return dd(b,a),b.prototype.append=function(a,b,c,d,e,f){var g=this.a,h=this.b,i=this.c,j=this.d;return(1!==a||0!==b||0!==c||1!==d)&&(this.a=g*a+i*b,this.b=h*a+j*b,this.c=g*c+i*d,this.d=h*c+j*d),this.tx+=g*e+i*f,this.ty+=h*e+j*f,this},b.prototype.appendMatrix=function(a){return this.append(a.a,a.b,a.c,a.d,a.tx,a.ty)},b.prototype._multiplyTransform=function(a,b,c,d,e,f,g,h,i){var j=1,k=0;if(e%360){var l=e*oe;j=Math.cos(l),k=Math.sin(l)}(h||i)&&(this.tx+=h,this.ty+=i);var m=j*c,n=k*c,o=-k*d,p=j*d;if(f||g){f*=oe,g*=oe;var q=Math.tan(f),r=Math.tan(g);m-=k*r*c,n+=j*r*c,o+=j*q*d,p+=k*q*d}a+=-m*h-o*i,b+=-n*h-p*i,this.append(m,n,o,p,a,b)},b.prototype.appendTransform=function(a,b,c,d,e,f,g,h,i){return this._multiplyTransform(a,b,c,d,e,f,g,h,i,!1),this},b.prototype.transformPoint=function(a){var b=a.x,c=a.y;return a.x=this.a*b+this.c*c+this.tx,a.y=this.b*b+this.d*c+this.ty,a},b.prototype.identity=function(){return this.a=this.d=1,this.b=this.c=this.tx=this.ty=0,this},b.prototype.invert=function(){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.tx,f=a*d-b*c;return this.a=d/f,this.b=-b/f,this.c=-c/f,this.d=a/f,this.tx=(c*this.ty-e*d)/f,this.ty=-(a*this.ty-e*b)/f,this},b.identity=new b(1,0,0,1,0,0),b}(cd),oi=function(a){function b(b,c,d,e){void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===e&&(e=0),a.call(this),this.x=b,this.y=c,this.width=d,this.height=e}return dd(b,a),d(b.prototype,"right",{get:function(){return this.x+this.width},set:function(a){this.width=a-this.x},enumerable:!0,configurable:!0}),d(b.prototype,"left",{get:function(){return this.x},set:function(a){this.x=a},enumerable:!0,configurable:!0}),d(b.prototype,"bottom",{get:function(){return this.y+this.height},set:function(a){this.height=a-this.y},enumerable:!0,configurable:!0}),d(b.prototype,"top",{get:function(){return this.y},set:function(a){this.y=a},enumerable:!0,configurable:!0}),b.prototype.set=function(a,b,c,d){return this.x=a,this.y=b,this.width=c,this.height=d,this},b.prototype.clone=function(){return new b(this.x,this.y,this.width,this.height)},b.identity=new b(0,0,0,0),b}(cd),pi=function(a){function b(b,c){a.call(this),this._canceler=null,this.loaded=0,this.onload=null,this._node=this._createNode(),this._node.setAttribute("preload","metadata"),this.controlable=!0,c&&c.appendChild(this._node),b&&(this.src=b)}return dd(b,a),b.prototype._createNode=function(){return null},d(b.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),d(b.prototype,"controlable",{get:function(){return null!=this._node.getAttribute("controls")},set:function(a){a?this._node.setAttribute("controls","true"):this._node.removeAttribute("controls")},enumerable:!0,configurable:!0}),b.prototype.resume=function(){this._node.play&&this._node.play()},b.prototype.pause=function(){this._node.pause&&this._node.pause()},d(b.prototype,"support",{get:function(){return!1},enumerable:!0,configurable:!0}),b.prototype.getType=function(a){return a},b.prototype.stop=function(){this.pause()},b.prototype.replay=function(){this.currentTime=0,this.resume()},d(b.prototype,"src",{get:function(){return this._src},set:function(a){if(this._src!==a){this._src=a,this.loaded=0,this.support||this._addEvents();var b=this.getType(a);b?(this._node.setAttribute("type",b),this._addEvents()):this._addEvents(0),this._node.src=a}},enumerable:!0,configurable:!0}),b.prototype._addEvents=function(a){var c=this;void 0===a&&(a=b.TIMEOUT),this._removeEvents();var d=this._node,e=function(){c._onload(!1)},f=function(){c._onload(!0)},g=this.support;g&&(d.addEventListener("canplaythrough",e,!1),d.addEventListener("stalled",e,!1),d.addEventListener("error",f,!1)),g||(a=0);var h=vd(f,a);this._canceler=function(){g&&(d.removeEventListener("canplaythrough",e,!1),d.removeEventListener("stalled",e,!1),d.removeEventListener("error",f,!1)),wd(h),d=f=e=null}},b.prototype._removeEvents=function(){this._canceler&&(this._canceler(),this._canceler=null)},b.prototype._onload=function(a){this._removeEvents(),this.loaded=a?-1:1,this.onload&&this.onload()},d(b.prototype,"paused",{get:function(){return!!this._node.paused},enumerable:!0,configurable:!0}),d(b.prototype,"muted",{get:function(){return!!this._node.muted},set:function(a){this.muted!==a&&(this._node.muted=a)},enumerable:!0,configurable:!0}),d(b.prototype,"volume",{get:function(){return this._node.volume||0},set:function(a){this.volume!==a&&(this._node.volume=a)},enumerable:!0,configurable:!0}),d(b.prototype,"currentTime",{get:function(){return this._node.currentTime||0},set:function(a){if(this.currentTime!==a)try{this._node.currentTime=a}catch(b){}},enumerable:!0,configurable:!0}),d(b.prototype,"duration",{get:function(){try{return this._node.duration||0}catch(a){return 0}},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){this._node.pause(),Wb(this._node),this._node=null,this._removeEvents()},b.TIMEOUT=12345,b}(cd),qi=function(a){function b(){a.apply(this,arguments)}return dd(b,a),b.prototype._createNode=function(){return kh("audio")},d(b.prototype,"support",{get:function(){return b.support},enumerable:!0,configurable:!0}),b.prototype.getType=function(a){var c=a.substr(a.lastIndexOf(".")+1);return b.typeTable[c]},b.typeTable={mp3:"audio/mpeg;",ogg:"audio/ogg; codecs='vorbis'",wav:"audio/wav; codecs='1'",m4a:"audio/x-m4a;",acc:"audio/aac;"},b.supportTypes={},b.support=!1,b}(pi);!function(){var a=kh("audio"),b=qi.supportTypes;qi.support=!!a.canPlayType;try{qi.support&&(b.ogg=!!a.canPlayType("audio/ogg; codecs='vorbis'").replace(/^no$/,""),b.mp3=!!a.canPlayType("audio/mpeg;").replace(/^no$/,""),b.wav=!!a.canPlayType("audio/wav; codecs='1'").replace(/^no$/,""),b.m4a=!!(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(c){}}();var ri={_cache:[],_counter:0,get:function(){return this._cache.length?this._cache.pop():Hd+this._counter++},add:function(a){this._cache.push(a)}},si=function(a){function b(){a.call(this),this.medialist=[]}return dd(b,a),b.prototype.add=function(a){-1===this.medialist.indexOf(a)&&(this.medialist.push(a),1===this.medialist.length&&this.load())},b.prototype.remove=function(a){var b=this.medialist.indexOf(a);b>0?this.medialist.splice(b,1):0===b&&(a.removeEventListener("medialoaded",this.onload,this),this.medialist.shift(),this.load())},b.prototype.load=function(){var a,b=this.medialist;b.length&&(a=b[0],a.addEventListener("medialoaded",this.onload,this),a.loadSource())},b.prototype.onload=function(){var a=this.medialist.shift();a.removeEventListener("medialoaded",this.onload,this),this.load()},b}(cd),ti=new si,ui=function(a){function e(){a.call(this),this.paused=!0,this._volume=1;var c=b.createElement("audio");c.volume=0,c.preload="none",this.originalAudio=c,this.delegate(),this.addEventListener("ended",function(){this.pause()},this),/iPhone|iPod/i.test(navigator.userAgent)&&(this.addEventListener("error",function(){this.dispatchSimpleEvent("medialoaded")},this),this.addEventListener("canplaythrough",function(){this.dispatchSimpleEvent("medialoaded")},this))}return dd(e,a),e.prototype.load=function(){0===this.readyState&&(/iPhone|iPod/i.test(navigator.userAgent)?ti.add(this):this.loadSource())},e.prototype.loadSource=function(){this.originalAudio.load()},e.prototype.replay=function(){0!==this.readyState&&(this.currentTime=0),this.paused=!0,this.play()},e.prototype.play=function(){var a=this.originalAudio;if(!a.error&&(a.ended&&this.replay(),""!==this._src))return 0===a.readyState?(this.addEventListener("canplay",this.play,this),void this.load()):void(this.paused&&(e.volumeChangeable?this.fadeInSound():a.play(),this.paused=!1,this.dispatchSimpleEvent("play")))},e.prototype.pause=function(a){var b=this.originalAudio;this.removeEventListener("canplay",this.play,this),this.paused||b.paused?this.originalAudio.volume=0:e.volumeChangeable?this.fadeOutSound(a):b.pause(),this.paused=!0,this.dispatchSimpleEvent("pause"),a&&a()},e.prototype.fadeInSound=function(){this.originalAudio.play(),this.fadeSound(!1)},e.prototype.fadeOutSound=function(a){var b=this;this.fadeSound(!0,function(){b.originalAudio.pause(),a&&a()})},e.prototype.fadeSound=function(a,b){var c=this;this.animation&&this.animation.destroy();var d=this.originalAudio,e=d.volume;this.animation=gd.create(null,1200,{onRender:function(b){d.volume=a?e*(1-b):e+(c._volume-e)*b},onEnd:function(){b&&b(),this.destroy()}},{easing:"linear"}),kd.getInstance().add(this.animation)},e.prototype.playPause=function(){this.paused?this.play():this.pause()},d(e,"volumeChangeable",{get:function(){if(e._volumeChangeable!==c)return e._volumeChangeable;var a=b.createElement("audio"),d=a.volume;return 0===d?d=1:d/=2,a.volume=d,e._volumeChangeable=a.volume===d?!0:!1},enumerable:!0,configurable:!0}),e.prototype.delegate=function(){for(var a=this,b=e.events,c=0,d="",f=this.originalAudio;d=b[c++];)nh(f,d,function(b){a.dispatchSimpleEvent(b.type)})},e.prototype.undelegate=function(){for(var a=e.events,b=0,c="",d=this.originalAudio;c=a[b++];)rh(d,c)},e.prototype.destroy=function(){var b=this;this.destroyed||(/iPhone|iPod/i.test(navigator.userAgent)&&ti.remove(this),a.prototype.destroy.call(this),this.undelegate(),this.destroyed=!0,this.pause(function(){b.originalAudio.removeAttribute("src"),b.originalAudio=null,b.animation=null}))},d(e.prototype,"muted",{get:function(){return this.originalAudio.muted},set:function(a){this.originalAudio.muted=a},enumerable:!0,configurable:!0}),d(e.prototype,"currentTime",{get:function(){return this.originalAudio.currentTime},set:function(a){this.originalAudio.currentTime=a},enumerable:!0,configurable:!0}),d(e.prototype,"src",{get:function(){return this._src},set:function(a){this._src!==a&&(this._src=a,a&&(this.originalAudio.src=a))},enumerable:!0,configurable:!0}),d(e.prototype,"loop",{get:function(){return this.originalAudio.loop},set:function(a){this.originalAudio.loop=!!a},enumerable:!0,configurable:!0}),d(e.prototype,"controls",{get:function(){return this.originalAudio.controls},set:function(a){this.originalAudio.controls=a},enumerable:!0,configurable:!0}),d(e.prototype,"duration",{get:function(){return this.originalAudio.duration},enumerable:!0,configurable:!0}),d(e.prototype,"readyState",{get:function(){return this.originalAudio.readyState},enumerable:!0,configurable:!0}),d(e.prototype,"buffered",{get:function(){return this.originalAudio.buffered},enumerable:!0,configurable:!0}),d(e.prototype,"volume",{get:function(){return this._volume},set:function(a){e.volumeChangeable&&this._volume!==a&&(this.originalAudio.volume=this._volume=a)},enumerable:!0,configurable:!0}),e.events=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],e}(ed),vi=function(a){function b(){a.apply(this,arguments)}return dd(b,a),b.prototype._createNode=function(){var a=kh("video");return a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.textContent="Your browser does not support the HTML5 video.",a},d(b.prototype,"support",{get:function(){return b.support},enumerable:!0,configurable:!0}),b.prototype.getType=function(a){var c=a.substr(a.lastIndexOf(".")+1);return b.typeTable[c]},b.typeTable={mp4:"video/mp4; codecs='avc1.42E01E'",ogg:"video/ogg; codecs='theora'",ogv:"video/ogg; codecs='theora'",webm:"video/webm; codecs='vp8, vorbis'"},b.supportTypes={},b.support=!1,b}(pi);!function(){var a=kh("video"),b=vi.supportTypes;vi.support=!!a.canPlayType;try{vi.support&&(b.ogg=!!a.canPlayType("video/ogg; codecs='theora'").replace(/^no$/,""),b.h264=!!a.canPlayType("video/mp4; codecs='avc1.42E01E'").replace(/^no$/,""),b.webm=!!a.canPlayType("video/webm; codecs='vp8, vorbis'").replace(/^no$/,""))}catch(c){}}();var wi=function(b){function c(a,c){b.call(this),this._url="",this._eventAdds=!1,this._timer=null,this.loaded=0,this.onload=null,this._canceler=null,this._paused=!0,this._muted=!1,this._originalVolume=1,this._volume=1,this._currentTime=0,this._duration=0;var d=this._node=kh("iframe");d.setAttribute("webkitallowfullscreen",""),d.setAttribute("mozallowfullscreen",""),d.setAttribute("allowfullscreen",""),d.setAttribute("frameborder","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.id=this.playerId=Hd+w(),c&&c.appendChild(this._node),a&&(this.src=a)}return dd(c,b),d(c.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),d(c.prototype,"src",{get:function(){return this._src},set:function(a){this.src!==a&&(this._src=a,this.loaded=0,this._paused=!0,xi?(this._countDown(c.TIMEOUT,!0),this._eventAdds||this._listenMessages(),this._node.src=this._url=Sc(c.pattern,this),this._url=this._url.split("?")[0]):this._countDown(0,!0))},enumerable:!0,configurable:!0}),c.prototype._clearTimer=function(){this._timer&&(wd(this._timer),this._timer=null)},c.prototype._countDown=function(a,b){var c=this;this._clearTimer(),this._timer=vd(function(){c._onload(b)},a)},c.prototype._onload=function(a){this._clearTimer(),this.loaded=a?-1:1,a?this._post("unload"):(this._addEvents(),this._post("getDuration")),this.onload&&this.onload()},c.prototype._listenMessages=function(){var b=this;this._eventAdds=!0;var c=function(a){return b._onmessage(a)};a.addEventListener("message",c,!1),this._canceler=function(){a.removeEventListener("message",c,!1),c=null}},c.prototype._addEvents=function(){this._removeEvents(),this._post("addEventListener","pause"),this._post("addEventListener","play"),this._post("addEventListener","playProgress"),this._post("addEventListener","seek")},c.prototype._removeEvents=function(){this._post("removeEventListener","pause"),this._post("removeEventListener","play"),this._post("removeEventListener","playProgress"),this._post("removeEventListener","seek")},c.prototype._onmessage=function(a){var b=a.data;if(b){var c=JSON.parse(b);if(this.playerId===c.player_id)if(c.event)switch(c.event){case"ready":this.loaded||this._onload(!1);break;case"pause":this._paused=!0;break;case"play":this._paused=!1;break;case"seek":case"playProgress":this._currentTime=+c.seconds}else if(c.method)switch(c.method){case"getDuration":this._duration=+c.value}}},c.prototype._post=function(a,b){if(xi&&1===this.loaded){var c={method:a};null!=b&&(c.value=b);var d=this._node.contentWindow;d&&d.postMessage(JSON.stringify(c),this._url)}},c.prototype.resume=function(){this.paused&&this._post("play")},c.prototype.pause=function(){this.paused||this._post("pause")},c.prototype.stop=function(){this.pause()},c.prototype.replay=function(){this.currentTime=0,this.resume()},d(c.prototype,"paused",{get:function(){return this._paused},enumerable:!0,configurable:!0}),d(c.prototype,"muted",{get:function(){return this._muted},set:function(a){this.muted!==a&&(this._muted=a,a?(this._originalVolume=this.volume,this._post("setVolume",0)):this.volume=this._originalVolume)},enumerable:!0,configurable:!0}),d(c.prototype,"volume",{get:function(){return this._muted?this._originalVolume:this._volume},set:function(a){this._originalVolume=a,this.volume!==a&&this._post("setVolume",a)},enumerable:!0,configurable:!0}),d(c.prototype,"currentTime",{get:function(){return this._currentTime},set:function(a){this.currentTime!==a&&this._post("seekTo",a)},enumerable:!0,configurable:!0}),d(c.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),c.prototype.destroy=function(){this.loaded&&(this._post("unload"),this._removeEvents()),this._canceler&&(this._canceler(),this._canceler=null),Wb(this._node),this._clearTimer(),this._node=null},c.TIMEOUT=12345,c.pattern="http://player.vimeo.com/video/{src}?wmode=opaque&api=1&player_id={playerId}&portrait=0",c}(cd),xi=!!a.postMessage,yi=function(b){function c(a,c){b.call(this),this._timer=null,this._playerReady=0,this._handlers={onReady:"",onError:"",onStateChange:""},this.loaded=0,this.onload=null;var d=this._node=kh("iframe");d.setAttribute("webkitallowfullscreen",""),d.setAttribute("mozallowfullscreen",""),d.setAttribute("allowfullscreen",""),d.setAttribute("frameborder","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),this.player=null,c&&c.appendChild(this._node),a&&(this.src=a)}return dd(c,b),d(c.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),d(c.prototype,"src",{get:function(){return this._src},set:function(a){if(this.src!==a){this._src=a,this.loaded=0;var b=zi.getInstance();this.player||this._playerReady||b.contains(this)||b.add(this),b=null,1===this._playerReady?this._load():-1===this._playerReady&&this._countDown(0,!0)}},enumerable:!0,configurable:!0}),c.prototype._clearTimer=function(){this._timer&&(wd(this._timer),this._timer=null)},c.prototype._countDown=function(a,b){var c=this;this._clearTimer(),this._timer=vd(function(){c._onload(b)},a)},c.prototype.onApiReady=function(){var b=this;this._node.src=Sc(c.pattern,this);var d=this.player=new a.YT.Player(this._node,{});this._timer=vd(function(){b.onPlayerError()},12345),a[this._handlers.onReady=ri.get()]=function(){b.onPlayerReady()},d.addEventListener("onReady",this._handlers.onReady)},c.prototype.onApiError=function(){this._playerReady=-1,this._countDown(0,!0)},c.prototype.onPlayerReady=function(){this._clearEvents(),this._playerReady=1,this._load()},c.prototype.onPlayerError=function(){this._removeEvents(),this._playerReady=-1;try{this.player.destroy()}catch(a){}this.player=null,this._onload(!0)},c.prototype._load=function(){var b=this;this._clearEvents(),a[this._handlers.onError=ri.get()]=function(a){a&&a.data&&b._onload(!0)},a[this._handlers.onStateChange=ri.get()]=function(a){!a||1!==a.data&&5!==a.data||b._onload(!1)},this.player.addEventListener("onStateChange",this._handlers.onStateChange),this.player.addEventListener("onError",this._handlers.onError),this._countDown(c.TIMEOUT,!0),this.player.cueVideoById(this.src,this._startTime)},c.prototype._onload=function(a){this._clearEvents(),1===this._playerReady&&(this.loaded=a?-1:1,this.loop=this._loop,a&&this.player.stopVideo()),this.onload&&this.onload()},c.prototype._removeEvents=function(){var b=this._handlers,c=this.player;for(var d in b){var e=b[d];e&&(a[e]=Ed,c&&c.removeEventListener&&c.removeEventListener(d,e),ri.add(e),b[d]="")}},c.prototype._clearEvents=function(){this._clearTimer(),this._removeEvents()},c.prototype.resume=function(){1===this._playerReady&&this.player.playVideo()},c.prototype.pause=function(){1===this._playerReady&&this.player.pauseVideo()},c.prototype.stop=function(){1===this._playerReady&&this.player.stopVideo()},c.prototype.replay=function(){this.currentTime=this._startTime,this.resume()},d(c.prototype,"paused",{get:function(){if(1===this._playerReady){var a=this.player.getPlayerState();return 1!==a&&3!==a}return!1},enumerable:!0,configurable:!0}),d(c.prototype,"muted",{get:function(){return!(1!==this._playerReady||!this.player.isMuted())},set:function(a){this.muted!==a&&1===this._playerReady&&(a?this.player.mute():this.player.unMute())},enumerable:!0,configurable:!0}),d(c.prototype,"volume",{get:function(){return 1===this._playerReady?this.player.getVolume()/100:1},set:function(a){this.volume!==a&&1===this._playerReady&&this.player.setVolume(~~(100*a))},enumerable:!0,configurable:!0}),d(c.prototype,"currentTime",{get:function(){return 1===this._playerReady?this.player.getCurrentTime():0},set:function(a){this.currentTime!==a&&1===this._playerReady&&this.player.seekTo(a,!0)},enumerable:!0,configurable:!0}),d(c.prototype,"duration",{get:function(){return 1===this._playerReady?this.player.getDuration():0},enumerable:!0,configurable:!0}),d(c.prototype,"loop",{get:function(){return!!this._loop},set:function(b){var c=this;this._loop=b,0!==this.loaded&&this.__loop!==b&&(this.__loop==b,this.player.removeEventListener("onStateChange",this._handlers.onStateChange),b&&(a[this._handlers.onStateChange=ri.get()]=function(a){a&&0===a.data&&c.replay()},this.player.addEventListener("onStateChange",this._handlers.onStateChange)))},enumerable:!0,configurable:!0}),d(c.prototype,"startTime",{set:function(a){this._startTime=a},enumerable:!0,configurable:!0}),c.prototype.destroy=function(){if(zi.instance&&zi.getInstance().remove(this),this._clearEvents(),this.player){1===this._playerReady&&this.player.stopVideo();try{this.player.destroy()}catch(a){}this.player=null}this._playerReady=-1,Wb(this._node),this._node=null},c.pattern=function(){var a="https://www.youtube.com/embed/{src}?wmode=opaque&enablejsapi=1&portrait=0&loop={_loop}";return/^http/.exec(location.protocol)?a+"&origin="+location.protocol+"//"+location.host:a}(),c.TIMEOUT=12345,c}(cd),zi=function(){function c(){this.ready=0,this.loading=!1,this._queue=[]}return c.prototype.load=function(){var c=this;if(!this.ready&&!this.loading){this.loading=!0;var d,e=a.onYouTubeIframeAPIReady,f=null,g=function(b){return function(){null!=f&&wd(f),a.onYouTubeIframeAPIReady=null,d.onerror=null,d=null,c.onready(b),e&&(e.call(a),e=null)}};a.onYouTubeIframeAPIReady=g(!0);var h=g(!1);d=kh("script"),d.onerror=h,d.src="https://www.youtube.com/iframe_api";var i=function(){var a=b.body;a?(a.appendChild(d),f=vd(h,12345)):vd(i,500),a=null};i()}},c.prototype.onready=function(a){this.ready=a?1:-1,this.loading=!1;for(var b=this._queue;b.length;){var c=b.shift();c&&(a?c.onApiReady():c.onApiError())}},c.prototype.contains=function(a){return this._queue.indexOf(a)>=0},c.prototype.add=function(a){return this.ready?this.ready>0?a.onApiReady():a.onApiError():(this.load(),this._queue.push(a)),this},c.prototype.remove=function(a){var b=this._queue.indexOf(a);return b>=0&&this._queue.splice(b,1),this},c.getInstance=function(){var a=c;return a.instance||(a.instance=new a),a.instance},c}(),Ai={_classes:{},register:function(a,b){b.pluginType=a,Ai._classes[a]=b},create:function(a,b,c){try{var d=new Ai._classes[a](c,b);return d}catch(e){return null}}},Bi=function(a){function b(b){a.call(this),this.app=b,this._timer=null,this._init()}return dd(b,a),b.prototype._init=function(){this._progressBar=new mi({container:this.app.container,trikleRatio:.01}),this._setLoadEvents(!0)},b.prototype._setLoadEvents=function(a){var b=this.app,c=a?"addEventListener":"removeEventListener";b[c]("preloadStart",this._start,this),b[c]("preloadProgress",this._onPreloadProgress,this),b[c]("preloadEnd",this._done,this),b[c]("loadStart",this._start,this),b[c]("loadProgress",this._onLoadProgress,this),b[c]("loadEnd",this._done,this)},b.prototype._clearTimer=function(){null!=this._timer&&(wd(this._timer),this._timer=null)},b.prototype._start=function(){var a=this;this._clearTimer(),this._timer=vd(function(){a._clearTimer(),a._progressBar.start()},150)},b.prototype._done=function(){this._clearTimer(),this._progressBar.done()},b.prototype._onPreloadProgress=function(a){var b=a.data,c=~~(b.loadedNumScenes*(1/b.targetNumScenes)),d=b.loaded/b.total/b.targetNumScenes;this._timer&&(this._clearTimer(),this._start()),this._progressBar.set(c+d)},b.prototype._onLoadProgress=function(a){var b=a.data;b.sceneIndex===this.app.current&&this._progressBar.set(b.loaded/b.total)},b.prototype.destroy=function(){a.prototype.destroy.call(this),this._setLoadEvents(!1),this._clearTimer(),this._progressBar.destroy(),this._progressBar=null},b}(ed);Ai.register("progressBar",Bi);var Ci=function(a){function c(){a.call(this),this.once=!1}return dd(c,a),c.prototype.alert=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var d=this.panel;if(!d){var e=b.createElement("div");bi(e,{color:"white",border:"15px solid transparent",fontSize:"4px",position:"fixed",backgroundColor:"rgba(34, 94, 116, 0.6)",zIndex:"9999999999",right:20,top:50,bottom:50,left:20,borderRadius:"4px",fontFamily:"Verdana",fontWeight:"bold",wordBreak:"break-word",whiteSpace:"pre-wrap",lineHeight:1.3,overflow:"hidden",boxShadow:"0 0 10px rgba(0, 0, 0, 1)",pointerEvents:"none"}),d=this.panel=b.createElement("div");{d.style}bi(d,{position:"absolute",bottom:0,right:0}),e.appendChild(d),b.body.appendChild(e)}var f=Array.prototype.slice.call(arguments);d.innerHTML+=(this.once?"\n":"")+f.join(" "),this.once=!0},c}(cd),Di=((new Ci).alert,function(){}),Ei=Di.prototype=[];Ei.__leoS__=1;var Fi=function(a){return Zi(a,Ei)},Gi=function(a){return Fi(a.nodeType?[a]:Dd("string"==typeof a?b.querySelectorAll(a):a))};Ei.addClass=function(a){return this.classed(a,1)},Ei.append=function(a){if(a.nodeType)return Gi(this[0].appendChild(a));if("function"==typeof a)return this.select(function(b){return this.appendChild(a.call(this,b))});for(var b=Gi(a),c=this[0],d=-1,e=b.length;++d<e;)c.appendChild(b[d]);return b},Ei.appendTo=function(a){if("function"==typeof a)return this.each(function(b){a.call(this,b).appendChild(this)});var b=Gi(a)[0];return b?this.each(function(){b.appendChild(this)}):this},Ei.at=function(a){return Fi([this[a]])},Ei.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this[0],d=jh(a);return d.space?c.getAttributeNS(d.space,d.local):c.getAttribute(a)}for(var e in a)this.each(uc(e,a[e]));return this}return this.each(uc(a,b))},Ei.bind=function(a,b){var c=nh;return this.each(arguments.length<2?function(){for(var b in a)c(this,b,a[b])}:function(){c(this,a,b)})},Ei.children=function(a){for(var b="function"==typeof a?a:a?function(){return Ch(a,this)}:function(){return!0},c=[],d=-1,e=this.length;++d<e;){var f=this[d];if(f&&(1===f.nodeType||9===f.nodeType))for(var g=f.children,h=-1,i=g.length;++h<i;)f=g[h],f&&1===f.nodeType&&b.call(f,h,d)&&c.push(f)}return Fi(c)},Ei.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this[0],d=a.split(/^|\s+/),e=d.length,f=-1,g=c.classList;if(g){for(;++f<e;)if(!g.contains(d[f]))return!1}else for(var h=" "+c.className+" ";++f<e;)if(h.indexOf(" "+d[f])<0)return!1;return!0}for(var i in a)this.each(vc(i,a[i]));return this}return this.each(vc(a,b))},Ei.clone=function(a){var b=this;return a&&(b=this.filter(a)),b.select(function(){return Pb(this)})},Ei.each=function(a){for(var b=-1,c=this.length;++b<c;)a.call(this[b],b);return this},Ei.el=function(a){var b=xc(a);return this.select(function(a){return this.appendChild(b.call(this,a))})};var Hi=Gi.el=function(a){return Gi(kh(a))};Ei.filter=function(a){for(var b="function"==typeof a?a:function(){return Ch(a,this)},c=[],d=-1,e=this.length;++d<e;){var f=this[d];f&&b.call(f,d)&&c.push(f)}return Fi(c)},Ei.hasClass=function(a){return this.classed(a)},Ei.html=function(a,b){return 0===arguments.length?this[0].innerHTML:(b=!!b,this.each("function"==typeof a?function(c){zh(this,a.call(this,c),b)}:function(){zh(this,a,b)}))},Ei.insert=function(a,b){var c=b;if("function"!=typeof b){var d=Gi(b)[0];c=function(){return d}}if(a.nodeType)return Gi(this[0].insertBefore(a,c.call(this[0],0)));if("function"==typeof a)return this.select(function(b){return this.insertBefore(a.call(this,b),c.call(this,b))});for(var e=Gi(a),f=this[0],g=-1,h=e.length;++g<h;)f.insertBefore(e[g],c.call(f,g));return e},Ei.parent=function(){return this.select(function(){var a=this.parentNode;return a&&11!==a.nodeType?a:null})};var Ii=function(a,b){return Gi(Ph(a,b).childNodes)};Gi.parse=Ii,Ei.prepend=function(a){return this.insert(a,function(){return this.firstChild})},Ei.prependTo=function(a){if("function"==typeof a)return this.each(function(b){var c=a.call(this,b);c.insertBefore(this,c.firstChild||null)});var b=Gi(a)[0];return b?this.each(function(){b.insertBefore(this,b.firstChild||null)}):this},Ei.prop=function(a,b){if(arguments.length<2){if("string"==typeof a)return"value"===a?this.val():this[0][a];var c="value"in a;c&&this.val(a.value);for(var d in a)c&&"value"===d||this.each(yc(d,a[d]));return this}return"value"===a?this.val(b):this.each(yc(a,b))},Ei.range=function(a,b){return Fi(this.slice(a,b))},Ei.remove=function(){return this.each(function(){Wb(this)})},Ei.removeClass=function(a){return this.classed(a,0)},Ei.select=function(a){for(var b="function"==typeof a?a:function(){return this.querySelectorAll(a)},c=[],d=-1,e=this.length;++d<e;){var f=this[d],g=b.call(f,d);if(g)if(g.nodeType&&!g.length)c.push(g);else for(var h=Dd(g),i=-1,j=h.length;++i<j;)(f=h[i])&&c.push(f)}return Fi(c)},Ei.style=function(a,b){if(arguments.length<2){if("string"==typeof a)return Yh(this[0],a);for(var c in a)this.each(zc(c,a[c]));return this}return this.each(zc(a,b))},Ei.text=function(a){if(0===arguments.length)return this[0].innerHTML;var b;return"function"==typeof a?b=function(b){this.textContent=a.call(this,b)}:(a=""+a,b=function(){this.textContent=a}),this.each(b)},Ei.toggleClass=function(a){return this.classed(a,2)},Ei.traverse=function(a,b){var c="function"==typeof b?b:b?function(){return Ch(b,this)}:function(){return!0};return this.each(function(){for(var b=[this];b.length;){var d=b.pop();if(1===d.nodeType){c.call(d)&&a.call(d);for(var e=d.children,f=-1,g=e.length;++f<g;)b.push(e[f])}}})},Ei.unbind=function(a,b){var c=qh;return this.each(arguments.length<2?function(){for(var b in a)c(this,b,a[b])}:function(){c(this,a,b)})},Ei.unbindAll=function(a){var b=rh;if(arguments.length<1)return this.each(function(){b(this)});var c=a.split(" ");return this.each(function(){for(var a=-1,d=c.length;++a<d;){var e=c[a];e&&b(this,e)}})},Ei.val=function(a){if(0===arguments.length){var b=this[0];if(1===b.nodeType)return(b.value||"").replace(/\r/g,"")}var c="function"==typeof a;return this.each(function(b,d){if(1===this.nodeType){var e;e=c?a.call(this,b,d):a,this.value=e}})},Ei.wrap=function(a,b){b=!!b;var c=typeof a;if("function"===c)return this.each(function(b){jc(this,a.call(this,b))
});var d="string"===c?Ph(a,b):a;return this.each(function(){jc(this,d.cloneNode(!0))})};var Ji,Ki=function(a){function b(b,c,d,e){a.call(this),this._currentActionName="",this._currentActionIndex=0,this._currentFrame=0,this._currentSrc="",this.element=kh("div"),this.loaded=0,this._imgs=null,this.onload=null,b&&b.appendChild(this.element),this._init(c,d,e)}return dd(b,a),b.prototype._init=function(a,b,c){this._srcset=a||[],this._frames=b||[],this._actions=c||{},this._load()},d(b.prototype,"srcset",{get:function(){return this._srcset},set:function(a){this._srcset=a||[],this._load()},enumerable:!0,configurable:!0}),d(b.prototype,"frames",{get:function(){return this._frames},set:function(a){this._frames=a||[],this._currentActionName?this._setCurrentActionIndex(this._currentActionIndex,!0):this._setCurrentFrame(0,!0)},enumerable:!0,configurable:!0}),b.prototype.getAction=function(a){return this._actions[a]},b.prototype.containsAction=function(a){return this._actions.hasOwnProperty(a)},d(b.prototype,"actions",{set:function(a){this._actions=a||{},this._currentActionName&&this.containsAction(this._currentActionName)?this._setCurrentActionIndex(this._currentActionIndex,!1):this.currentActionName=""},enumerable:!0,configurable:!0}),b.prototype.addAction=function(a,b){this._actions[a]=b},b.prototype.removeAction=function(a){this.containsAction(a)&&delete this._actions[a]},d(b.prototype,"currentActionName",{get:function(){return this._currentActionName},set:function(a){this._currentActionName!==a&&(this._currentActionName=this.containsAction(a)?a:"",this.currentActionIndex=0)},enumerable:!0,configurable:!0}),d(b.prototype,"currentActionIndex",{get:function(){return this._currentActionIndex},set:function(a){this._setCurrentActionIndex(a,!1)},enumerable:!0,configurable:!0}),d(b.prototype,"numFramesOfCurrentAction",{get:function(){return this.getNumFramesOfAction(this._currentActionName)},enumerable:!0,configurable:!0}),b.prototype.getNumFramesOfAction=function(a){return a&&this.containsAction(a)?this._actions[a].length:0},b.prototype._setCurrentActionIndex=function(a,b){var c=this.numFramesOfCurrentAction;return c?(a>=c?a=c-1:0>a&&(a=0),this._currentActionIndex=a,void this._setCurrentFrame(this._actions[this._currentActionName][a],b)):(this._currentActionIndex=0,void this._setCurrentFrame(0,b))},d(b.prototype,"currentFrame",{get:function(){return this._currentFrame},set:function(a){this._setCurrentFrame(a,!1)},enumerable:!0,configurable:!0}),b.prototype._setCurrentFrame=function(a,b){var c=this._frames.length;a>=c&&(a=c-1),0>a&&(a=0),(b||this._currentFrame!==a)&&this.update(a,b)},d(b.prototype,"currentSrc",{get:function(){return this._currentSrc},enumerable:!0,configurable:!0}),b.prototype._setCurrentSrc=function(a,b,c,d){if(d||this._currentSrc!==a){this._currentSrc=a;var e=this.element.style;e.backgroundImage=a?"url("+a+")":"none",e.width=b+"px",e.height=c+"px",this._onSizeChange(b,c)}},b.prototype.update=function(a,b){var c=this._currentFrame;if(this._currentFrame=a,this.loaded){var d=this._frames,e=this.element.style;if(!d.length)return void this._setCurrentSrc("",0,0,b);var f=d[a];if(this._setCurrentSrc(this._srcset[f[0]],f[3],f[4],b),c!==a){var g=d[c];(g[3]!==f[3]||g[4]!==f[4])&&(e.width=f[3]+"px",e.height=f[4]+"px",this._onSizeChange(f[3],f[4])),(g[1]!==f[1]||g[2]!==f[2])&&(e.backgroundPosition=-f[1]+"px "+-f[2]+"px")}else e.backgroundPosition=-f[1]+"px "+-f[2]+"px"}},b.prototype._load=function(){function a(){this.onload=this.onerror=null,--d||f._onload(!!e)}function b(){this.onload=this.onerror=null,++e,--d||f._onload(!0)}if(this._clearLoad(),this._currentFrame=0,this._srcset.length){var c=this._srcset;this._imgs||(this._imgs=[]);for(var d=c.length,e=0,f=this,g=(this.element,this._imgs),h=-1,i=c.length;++h<i;){var j=g[h]=kh("img");j.onload=a,j.onerror=b,j.src=c[h]}}else this._onload(!0)},b.prototype._clearLoad=function(){this._imgs&&(this._imgs.forEach(function(a){a.onload=a.onerror=null,a.src=Bd}),this._imgs.length=0),this.loaded=0},b.prototype._onload=function(a){this.loaded=a?-1:1,this.update(this._currentFrame,!0),this.onload&&this.onload()},b.prototype._onSizeChange=function(a,b){this.onSizeChange&&this.onSizeChange(a,b)},b.prototype.destroy=function(){this._clearLoad(),this._imgs=null,this._actions=null,this._srcset=null,this._frames=null,this.element&&Wb(this.element),this.element=null},b}(cd),Li=function(a){function b(b,c){void 0===c&&(c={}),a.call(this),this.options=c,jQuery&&jQuery.flash&&(this.container=$(b),this.container.flash(c))}return dd(b,a),b.prototype.stop=function(){this.container.flash(function(){this.GotoFrame(1)})},b.prototype.play=function(){this.container.flash(function(){this.Play()})},b.prototype.replay=function(){this.stop(),this.play()},b.prototype.destroy=function(){this.container&&(this.stop(),this.container=null)},d(b.prototype,"src",{set:function(a){this.container.flash(function(){this.setAttribute("data",a)})},enumerable:!0,configurable:!0}),d(b.prototype,"width",{set:function(a){this.container.flash(function(){this.setAttribute("width",a)})},enumerable:!0,configurable:!0}),d(b.prototype,"height",{set:function(a){this.container.flash(function(){this.setAttribute("height",a)})},enumerable:!0,configurable:!0}),d(b.prototype,"offsetX",{set:function(a){this.container.flash(function(){bi(this,"tx",a)})},enumerable:!0,configurable:!0}),d(b.prototype,"offsetY",{set:function(a){this.container.flash(function(){bi(this,"ty",a)})},enumerable:!0,configurable:!0}),b}(cd),Mi=function(a){function b(b,c){a.call(this),this.context=c,this.deep=!1,this._family="",this._size=16,this._color="#000",this._bold=!1,this._el=b}return dd(b,a),d(b.prototype,"el",{get:function(){return this._el},enumerable:!0,configurable:!0}),d(b.prototype,"family",{get:function(){return this._family},set:function(a){if(this._family!==a){var b=this._family;this._family=a,this._set(function(){this.style.fontFamily=a}),this.notifyPropertyChange("family",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"size",{get:function(){return this._size},set:function(a){if(this._size!==a){var b=this._size;this._size=a;var c=a+"px";this._set(function(){this.style.fontSize=c}),this._onSizeChange(b),this.notifyPropertyChange("size",b)}},enumerable:!0,configurable:!0}),b.prototype._onSizeChange=function(){},d(b.prototype,"color",{get:function(){return this._color},set:function(a){if(this._color!==a){var b=this._color;this._color=a,this._set(function(){this.style.color=a}),this.notifyPropertyChange("color",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"bold",{get:function(){return this._bold},set:function(a){if(this._bold!==a){this._bold=a;var b=a?"400":"100";this._set(function(){this.style.fontWeight=b}),this.notifyPropertyChange("bold",!a)}},enumerable:!0,configurable:!0}),b.prototype._set=function(a,b){this.deep?this._el.traverse(a,b):a.call(this._el[0])},b.prototype.notifyPropertyChange=function(a,b){this.context&&this.context.notifyPropertyChange("textFormat."+a,b)},b.prototype.destroy=function(){this._el=this.context=null},b.compatProperty=function(a){return b._compatTable[a]},b._compatTable={color:"textFormat.color",family:"textFormat.family",bold:"textFormat.bold",size:"textFormat.size"},b}(cd),Ni=function(a){function b(b,c){a.call(this,b,c),this.context=c,this._align="left",this._letterSpacing=0,this._leading=0}return dd(b,a),d(b.prototype,"align",{get:function(){return this._align},set:function(a){if(this._align!==a){var b=this._align;this._align=a,this._set(function(){this.style.textAlign=a},function(){return"p"===this.nodeName.toLowerCase()}),this.notifyPropertyChange("align",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(a){if(this._letterSpacing!==a){var b=this._letterSpacing;this._letterSpacing=a;var c=a+"px";this._set(function(){this.style.letterSpacing=c}),this.notifyPropertyChange("letterSpacing",b)}},enumerable:!0,configurable:!0}),d(b.prototype,"leading",{get:function(){return this._leading},set:function(a){if(this._leading!==a){var b=this._leading;this._leading=a;var c=this.size+a+"px";this._set(function(){this.style.lineHeight=c},function(){return"p"===this.nodeName.toLowerCase()}),this.notifyPropertyChange("leading",b)}},enumerable:!0,configurable:!0}),b.prototype._onSizeChange=function(){this._el[0].style.lineHeight=this.size+this._leading+"px"},b.compatProperty=function(a){return Mi._compatTable[a]||b._compatTable[a]},b._compatTable={align:"textFormat.align",letterSpacing:"textFormat.letterSpacing",leading:"textFormat.leading"},b}(Mi),Oi=Ec(Cc,"fatal"),Pi=Ec(Bc,"warn"),Qi=Ec(Ac,"log"),Ri=Dc(Oi),Si=Dc(Pi),Ti=Dc(Qi),Ui=function(){function a(){}return a.timeStampEnabled=!0,a.fatal=Gc(Fc(Hc(Ri,Oi,Ic))),a.warning=Gc(Fc(Hc(Si,Pi,Ic))),a.log=Gc(Fc(Hc(Ti,Qi,Ic))),a}(),Vi=function(){function a(){}return a.addPoolingTo=function(b,c){void 0===c&&(c=a.DEFAULT),b.instancePool=[],b.getPooled=c,b.poolSize||(b.poolSize=a.DEFAULT_SIZE),b.recycle=a.DEFAULT_RECYCLER},a.DEFAULT_RECYCLER=function(a){var b=this;a.destructor&&a.destructor(),b.instancePool.length<b.poolSize&&b.instancePool.push(a)},a.DEFAULT=function(a){var b=this;if(b.instancePool.length){var c=b.instancePool.pop();return c.reinitialize&&c.reinitialize(a),c}return new b(a)},a.TWO_ARGUMENTS=function(a,b){var c=this;if(c.instancePool.length){var d=c.instancePool.pop();return d.reinitialize&&d.reinitialize(a,b),d}return new c(a,b)},a.THREE_ARGUMENTS=function(a,b,c){var d=this;if(d.instancePool.length){var e=d.instancePool.pop();return e.reinitialize&&e.reinitialize(a,b,c),e}return new d(a,b,c)},a.FOUR_ARGUMENTS=function(a,b,c,d){var e=this;if(e.instancePool.length){var f=e.instancePool.pop();return f.reinitialize&&f.reinitialize(a,b,c,d),f}return new e(a,b,c,d)},a.FIVE_ARGUMENTS=function(a,b,c,d,e){var f=this;if(f.instancePool.length){var g=f.instancePool.pop();return g.reinitialize&&g.reinitialize(a,b,c,d,e),g}return new f(a,b,c,d,e)},a.DEFAULT_SIZE=10,a}(),Wi={"<":"lt",">":"gt","&":"amp"},Xi=/\{([^\}]+)\}/g,Yi=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,Zi=("l"+(Math.random()+"").substr(3,5),Object.setPrototypeOf||{}.__proto__===Object.prototype?function(a,b){return a.__proto__=b,a}:function(a,b){for(var c in b)a[c]=b[c];return a}),$i=function(a){function b(b){a.call(this,b),this._initialWidth=this.options.initialWidth,this._initialHeight=this.options.initialHeight}return dd(b,a),b.prototype._afterInit=function(){this.resize(this._initialWidth,this._initialHeight)},b.prototype.play=function(){return this.start(),this.current=0,this.resume()},b.prototype.reset=function(){return this.pause(),this.current=-1,this},b.prototype.replay=function(){return this.reset(),this.play()},b.prototype.initLayout=function(){this._app=this._container},b.prototype.initStage=function(){a.prototype.initStage.call(this),this.stage.overflowMode="visible"},b.prototype.destroyLayout=function(){},b.prototype.resize=function(b,c){this._initialized?a.prototype.resize.call(this,b,c):(this._initialWidth=b,this._initialHeight=c)},b}(ue);a.hiSliderFactory=$c,gc(ad,{RootTimeline:kd,Tween:ld,Animation:fd,Timeline:hd})}(this,document);