This commit is contained in:
thednp 2016-09-24 12:12:29 +03:00
parent 7bcc0049d7
commit f93780061a
8 changed files with 9 additions and 9 deletions

View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | Attributes Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | Attributes Plugin | MIT-License
!function(t){if("function"==typeof define&&define.amd)define(["./kute.js"],function(e){return t(e),e});else if("object"==typeof module&&"function"==typeof require){var e=require("./kute.js");module.exports=t(e)}else{if("undefined"==typeof window.KUTE)throw new Error("Attributes Plugin requires KUTE.js.");t(e)}}(function(t){"use strict";var e,r=window,n=r.KUTE,i=r.dom,o=n.prS,u=n.pp,a=r.Interpolate.unit,f=r.Interpolate.number,c=r.Interpolate.color,s=function(t,e){return t.getAttribute(e)},p=["fill","stroke","stop-color"],l=n.truC,d=n.truD,v=function(t){return/[A-Z]/g.test(t)?t.replace(t.match(/[A-Z]/g)[0],"-"+t.match(/[A-Z]/g)[0].toLowerCase()):t};o.attr=function(t,e,r){var n={};for(var i in r){var o=v(i).replace(/_+[a-z]+/,""),u=s(t,o);n[o]=p.indexOf(v(i))!==-1?u||"rgba(0,0,0,0)":u||(/opacity/i.test(i)?1:0)}return n},u.attr=function(t,r,n){"attr"in i||(i.attr=function(t,e,r,n,o){for(var u in n)i.attributes[u](t,u,r[u],n[u],o)},e=i.attributes={});var o,u={};for(o in r){var b=v(o),A=s(n,b.replace(/_+[a-z]+/,""));if(p.indexOf(b)===-1&&(/(%|[a-z]+)$/.test(r[o])||/(%|[a-z]+)$/.test(A))){var m=d(A).u||d(r[o]).u,w=/%/.test(m)?"_percent":"_"+m;o+w in e||(e[o+w]=function(t,e,r,n,i){var o=o||v(e).replace(w,"");t.setAttribute(o,a(r.v,n.v,n.u,i))}),u[o+w]=d(r[o])}else p.indexOf(b)>-1?(o in e||(e[o]=function(t,e,n,i,o){var u=u||v(e);t.setAttribute(u,c(n,i,o,r.keepHex))}),u[o]=l(r[o])):(o in e||(e[o]=function(t,e,r,n,i){var o=o||v(e);t.setAttribute(o,f(r,n,i))}),u[o]=parseFloat(r[o]))}return u}});

View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | Bezier Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | Bezier Plugin | MIT-License
!function(n){if("function"==typeof define&&define.amd)define(["./kute.js"],function(e){return n(e),e});else if("object"==typeof module&&"function"==typeof require){var e=require("./kute.js");module.exports=n(e)}else{if("undefined"==typeof window.KUTE)throw new Error("Bezier Easing functions depend on KUTE.js. Read the docs for more info.");window.KUTE.Ease=window.KUTE.Ease||n(e)}}(function(n){"use strict";var e=window,t=t||{};t.Bezier=e.Bezier=function(n,e,t,u){return r.pB(n,e,t,u)};var r=t.Bezier.prototype=e.Bezier.prototype;return r.ni=4,r.nms=.001,r.sp=1e-7,r.smi=10,r.ksts=11,r.ksss=1/(r.ksts-1),r.f32as="Float32Array"in e,r.msv=r.f32as?new Float32Array(r.ksts):new Array(r.ksts),r.A=function(n,e){return 1-3*e+3*n},r.B=function(n,e){return 3*e-6*n},r.C=function(n){return 3*n},r.pB=function(n,e,t,u){this._p=!1;var s=this;return function(i){return s._p||r.pc(n,t,e,u),n===e&&t===u?i:0===i?0:1===i?1:r.cB(r.gx(i,n,t),e,u)}},r.cB=function(n,e,t){return((r.A(e,t)*n+r.B(e,t))*n+r.C(e))*n},r.gS=function(n,e,t){return 3*r.A(e,t)*n*n+2*r.B(e,t)*n+r.C(e)},r.bS=function(n,e,t,u,s){var i,a,o=0,c=r.sp,f=r.smi;do a=e+(t-e)/2,i=r.cB(a,u,s)-n,i>0?t=a:e=a;while(Math.abs(i)>c&&++o<f);return a},r.nri=function(n,e,t,u){var s=0,i=r.ni;for(s;s<i;++s){var a=r.gS(e,t,u);if(0===a)return e;var o=r.cB(e,t,u)-n;e-=o/a}return e},r.csv=function(n,e){var t=0,u=r.ksts;for(t;t<u;++t)r.msv[t]=r.cB(t*r.ksss,n,e)},r.gx=function(n,e,t){for(var u=0,s=1,i=r.ksts-1;s!=i&&r.msv[s]<=n;++s)u+=r.ksss;--s;var a=(n-r.msv[s])/(r.msv[s+1]-r.msv[s]),o=u+a*r.ksss,c=r.gS(o,e,t),f=u+r.ksss;return c>=r.nms?r.nri(n,o,e,t):0===c?o:r.bS(n,u,f,e,t)},r.pc=function(n,e,t,u){this._p=!0,n==t&&e==u||r.csv(n,e)},e.Ease={},e.Ease.easeIn=function(){return r.pB(.42,0,1,1)},e.Ease.easeOut=function(){return r.pB(0,0,.58,1)},e.easeInOut=function(){return r.pB(.5,.16,.49,.86)},e.Ease.easeInSine=function(){return r.pB(.47,0,.745,.715)},e.Ease.easeOutSine=function(){return r.pB(.39,.575,.565,1)},e.Ease.easeInOutSine=function(){return r.pB(.445,.05,.55,.95)},e.Ease.easeInQuad=function(){return r.pB(.55,.085,.68,.53)},e.Ease.easeOutQuad=function(){return r.pB(.25,.46,.45,.94)},e.Ease.easeInOutQuad=function(){return r.pB(.455,.03,.515,.955)},e.Ease.easeInCubic=function(){return r.pB(.55,.055,.675,.19)},e.Ease.easeOutCubic=function(){return r.pB(.215,.61,.355,1)},e.Ease.easeInOutCubic=function(){return r.pB(.645,.045,.355,1)},e.Ease.easeInQuart=function(){return r.pB(.895,.03,.685,.22)},e.Ease.easeOutQuart=function(){return r.pB(.165,.84,.44,1)},e.Ease.easeInOutQuart=function(){return r.pB(.77,0,.175,1)},e.Ease.easeInQuint=function(){return r.pB(.755,.05,.855,.06)},e.Ease.easeOutQuint=function(){return r.pB(.23,1,.32,1)},e.Ease.easeInOutQuint=function(){return r.pB(.86,0,.07,1)},e.Ease.easeInExpo=function(){return r.pB(.95,.05,.795,.035)},e.Ease.easeOutExpo=function(){return r.pB(.19,1,.22,1)},e.Ease.easeInOutExpo=function(){return r.pB(1,0,0,1)},e.Ease.easeInCirc=function(){return r.pB(.6,.04,.98,.335)},e.Ease.easeOutCirc=function(){return r.pB(.075,.82,.165,1)},e.Ease.easeInOutCirc=function(){return r.pB(.785,.135,.15,.86)},e.Ease.easeInBack=function(){return r.pB(.6,-.28,.735,.045)},e.Ease.easeOutBack=function(){return r.pB(.175,.885,.32,1.275)},e.Ease.easeInOutBack=function(){return r.pB(.68,-.55,.265,1.55)},e.Ease.slowMo=function(){return r.pB(0,.5,1,.5)},e.Ease.slowMo1=function(){return r.pB(0,.7,1,.3)},e.Ease.slowMo2=function(){return r.pB(0,.9,1,.1)},t});

2
src/kute-css.min.js vendored
View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | CSS Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | CSS Plugin | MIT-License
!function(t){if("function"==typeof define&&define.amd)define(["./kute.js"],function(r){return t(r),r});else if("object"==typeof module&&"function"==typeof require){var r=require("./kute.js");module.exports=t(r)}else{if("undefined"==typeof window.KUTE)throw new Error("CSS Plugin require KUTE.js.");t(r)}}(function(t){"use strict";for(var r,e=window,o=e.KUTE,i=e.dom,n=o.pp,u=o.prS,d=o.gCS,a=o.property("borderRadius"),l=o.property("borderTopLeftRadius"),f=o.property("borderTopRightRadius"),p=o.property("borderBottomLeftRadius"),c=o.property("borderBottomRightRadius"),g=["borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],s=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],b=["right","bottom","minWidth","minHeight","maxWidth","maxHeight","padding","margin","paddingTop","paddingBottom","paddingLeft","paddingRight","marginTop","marginBottom","marginLeft","marginRight","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","outlineWidth"],h=["fontSize","lineHeight","letterSpacing","wordSpacing"],v=["clip"],m=["backgroundPosition"],R=s.concat(b,h),y=g.concat(v,s,b,h,m),x=y.length,T=(e.Interpolate.number,e.Interpolate.unit),D=e.Interpolate.color,B=B||{},L=0;L<x;L++)r=y[L],g.indexOf(r)!==-1?B[r]="rgba(0,0,0,0)":R.indexOf(r)!==-1?B[r]=0:m.indexOf(r)!==-1?B[r]=[50,50]:"clip"===r&&(B[r]=[0,0,0,0]);for(var L=0,w=g.length;L<w;L++)r=g[L],n[r]=function(t,r){return t in i||(i[t]=function(t,r,e,o,i,n){t.style[r]=D(e,o,i,n.keepHex)}),n.cls(t,r)},u[r]=function(t,r,e){return d(t,r)||B[r]};for(var L=0,w=R.length;L<w;L++)r=R[L],n[r]=function(t,r){return t in i||(i[t]=function(t,r,e,o,i){t.style[r]=T(e.value,o.value,o.unit,i)}),n.box(t,r)},u[r]=function(t,r,e){return d(t,r)||B[r]};for(var L=0,w=s.length;L<w;L++)r=s[L],n[r]=function(t,r){return t in i||("borderRadius"===t?i[t]=function(t,r,e,o,i){t.style[a]=T(e.value,o.value,o.unit,i)}:"borderTopLeftRadius"===t?i[t]=function(t,r,e,o,i){t.style[l]=T(e.value,o.value,o.unit,i)}:"borderTopRightRadius"===t?i[t]=function(t,r,e,o,i){t.style[f]=T(e.value,o.value,o.unit,i)}:"borderBottomLeftRadius"===t?i[t]=function(t,r,e,o,i){t.style[p]=T(e.value,o.value,o.unit,i)}:"borderBottomRightRadius"===t&&(i[t]=function(t,r,e,o,i){t.style[c]=T(e.value,o.value,o.unit,i)})),n.box(t,r)},u[r]=function(t,r,e){return d(t,r)||B[r]};return n.clip=function(t,r){if(t in i||(i[t]=function(t,r,e,o,i){var n=0,u=[];for(n;n<4;n++){var d=e[n].v,a=o[n].v,l=o[n].u||"px";u[n]=T(d,a,l,i)}t.style[r]="rect("+u+")"}),r instanceof Array)return[o.truD(r[0]),o.truD(r[1]),o.truD(r[2]),o.truD(r[3])];var e=r.replace(/rect|\(|\)/g,"");return e=/\,/g.test(e)?e.split(/\,/g):e.split(/\s/g),[o.truD(e[0]),o.truD(e[1]),o.truD(e[2]),o.truD(e[3])]},u.clip=function(t,r,e){var o=d(t,r),i=d(t,"width"),n=d(t,"height");return/rect/.test(o)?o:[0,i,n,0]},n.backgroundPosition=function(t,r){if(t in i||(i[t]=function(t,r,e,o,i){t.style[r]=T(e.x.v,o.x.v,"%",i)+" "+T(e.y.v,o.y.v,"%",i)}),r instanceof Array)return{x:o.truD(r[0])||{v:50,u:"%"},y:o.truD(r[1])||{v:50,u:"%"}};var e,n,u=r.replace(/top|left/g,0).replace(/right|bottom/g,100).replace(/center|middle/g,50);return u=/\,/g.test(u)?u.split(/\,/g):u.split(/\s/g),u=2===u.length?u:[u[0],50],e=o.truD(u[0]),n=o.truD(u[1]),{x:e,y:n}},u.backgroundPosition=function(t,r,e){return d(t,r)||B[r]},this});

View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | jQuery Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | jQuery Plugin | MIT-License
!function(e){if("function"==typeof define&&define.amd)define(["./kute.js","jquery"],function(n,t){return e(t,n),n});else if("object"==typeof module&&"function"==typeof require){var n=require("./kute.js"),t=require("jquery");module.exports=e(t,n)}else{if("undefined"==typeof window.KUTE||"undefined"==typeof window.$&&"undefined"==typeof window.jQuery)throw new Error("jQuery Plugin for KUTE.js depend on KUTE.js and jQuery");var t=window.jQuery||window.$,n=window.KUTE;t.fn.KUTE=e(t,n)}}(function(e,n){"use strict";return e.fn.fromTo=function(e,t,i){var o=this.length>1?this:this[0],r=this.length>1?"allFromTo":"fromTo";return n[r](o,e,t,i)},e.fn.to=function(e,t){var i=this.length>1?this:this[0],o=this.length>1?"allTo":"to";return n[o](i,e,t)},this});

View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | Physics Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | Physics Plugin | MIT-License
!function(t){if("function"==typeof define&&define.amd)define(["./kute.js"],function(n){return t(n),n});else if("object"==typeof module&&"function"==typeof require){var n=require("./kute.js");module.exports=t(n)}else{if("undefined"==typeof window.KUTE)throw new Error("Physics Easing functions for KUTE.js depend on KUTE.js");window.KUTE.Physics=window.KUTE.Physics||t(n)}}(function(t){"use strict";var n=window,r=r||{};r.spring=n.spring=function(t){t=t||{};var n=Math.max(1,(t.frequency||300)/20),r=Math.pow(20,(t.friction||200)/100),e=t.anticipationStrength||0,o=(t.anticipationSize||0)/1e3;return function(t){var u,c,a,p,f,y,s,h;return y=t/(1-o)-o/(1-o),t<o?(h=o/(1-o)-o/(1-o),s=0/(1-o)-o/(1-o),f=Math.acos(1/i.A1(t,h)),a=(Math.acos(1/i.A1(t,s))-f)/(n*-o),u=i.A1):(u=i.A2,f=0,a=1),c=u(y,o,e,r),p=n*(t-o)*a+f,1-c*Math.cos(p)}};var i=r.spring.prototype=n.spring.prototype;i.A1=function(t,n,r){var i,e,o,u;return o=n/(1-n),u=0,e=(o-.8*u)/(o-u),i=(.8-e)/o,i*t*r/100+e},i.A2=function(t,n,r,i){return Math.pow(i/10,-t)*(1-t)},r.bounce=n.bounce=function(t){t=t||{};var n=Math.max(1,(t.frequency||300)/20),r=Math.pow(20,(t.friction||200)/100);return function(t){var i=Math.pow(r/10,-t)*(1-t),e=n*t*1+Math.PI/2;return i*Math.cos(e)}},r.gravity=n.gravity=function(t){var n,r,i,o,u,c;return t=t||{},n=(t.bounciness||400)/1250,i=(t.elasticity||200)/1e3,u=t.initialForce||!1,o=100,r=[],c=function(){var t,r;for(t=Math.sqrt(2/o),r={a:-t,b:t,H:1},u&&(r.a=0,r.b=2*r.b);r.H>.001;)c=r.b-r.a,r={a:r.b,b:r.b+c*n,H:r.H*n*n};return r.b}(),function(){var t,e,a,p;for(e=Math.sqrt(2/(o*c*c)),a={a:-e,b:e,H:1},u&&(a.a=0,a.b=2*a.b),r.push(a),t=c,p=[];a.b<1&&a.H>.001;)t=a.b-a.a,a={a:a.b,b:a.b+t*n,H:a.H*i},p.push(r.push(a));return p}(),function(n){var i,o,a;for(o=0,i=r[o];!(n>=i.a&&n<=i.b)&&(o+=1,i=r[o]););return a=i?e.getPointInCurve(i.a,i.b,i.H,n,t,c):u?0:1}};var e=r.gravity.prototype=n.gravity.prototype;e.getPointInCurve=function(t,n,r,i,e,o){var u,c;return o=n-t,c=2/o*i-1-2*t/o,u=c*c*r-r+1,e.initialForce&&(u=1-u),u},r.forceWithGravity=n.forceWithGravity=function(t){var n=t||{};return n.initialForce=!0,r.gravity(n)},r.bezier=n.BezierMultiPoint=function(t){t=t||{};var n=t.points,r=!1,i=[];return function(){var t,r;for(t in n){if(r=parseInt(t),r>=n.length-1)break;o.fn(n[r],n[r+1],i)}return i}(),function(t){return 0===t?0:1===t?1:o.yForX(t,i,r)}};var o=r.bezier.prototype=n.BezierMultiPoint.prototype;return o.fn=function(t,n,r){var i=function(r){return o.Bezier(r,t,t.cp[t.cp.length-1],n.cp[0],n)};return r.push(i)},o.Bezier=function(t,n,r,i,e){return{x:Math.pow(1-t,3)*n.x+3*Math.pow(1-t,2)*t*r.x+3*(1-t)*Math.pow(t,2)*i.x+Math.pow(t,3)*e.x,y:Math.pow(1-t,3)*n.y+3*Math.pow(1-t,2)*t*r.y+3*(1-t)*Math.pow(t,2)*i.y+Math.pow(t,3)*e.y}},o.yForX=function(t,n,r){var i,e,o,u,c,a,p,f,y=0,s=n.length;for(i=null,y;y<s&&(e=n[y],t>=e(0).x&&t<=e(1).x&&(i=e),null===i);y++);if(!i)return r?0:1;for(f=1e-4,u=0,a=1,c=(a+u)/2,p=i(c).x,o=0;Math.abs(t-p)>f&&o<100;)t>p?u=c:a=c,c=(a+u)/2,p=i(c).x,o++;return i(c).y},n.Physics={physicsInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.92-r/1e3,y:0}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.08+r/1e3,y:1}]}]})},physicsBackOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:0,y:0}]},{x:1,y:1,cp:[{x:.735+r/1e3,y:1.3}]}]})},physicsBackIn:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.28-r/1e3,y:-.6}]},{x:1,y:1,cp:[{x:1,y:1}]}]})},physicsBackInOut:function(t){var r;return t=t||{},r=t.friction||200,n.BezierMultiPoint({points:[{x:0,y:0,cp:[{x:.68-r/1e3,y:-.55}]},{x:1,y:1,cp:[{x:.265+r/1e3,y:1.45}]}]})}},r});

2
src/kute-svg.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
// KUTE.js v1.5.8 | © dnp_theme | Text Plugin | MIT-License
// KUTE.js v1.5.9 | © dnp_theme | Text Plugin | MIT-License
!function(t){if("function"==typeof define&&define.amd)define(["./kute.js"],function(e){return t(e),e});else if("object"==typeof module&&"function"==typeof require){require("./kute.js");module.exports=t()}else{if("undefined"==typeof window.KUTE)throw new Error("Text-Plugin requires KUTE.js.");t()}}(function(t){"use strict";var e=window,n=e.KUTE,r=e.dom,i=n.prS,u=n.pp,s=e.Interpolate.number,o=String("abcdefghijklmnopqrstuvwxyz").split(""),a=String("abcdefghijklmnopqrstuvwxyz".toUpperCase()).split(""),f=String("~!@#$%^&*()_+{}[];'<>,./?=-").split(""),p=String("0123456789").split(""),l=o.concat(a,p),h=(l.concat(f),Math.random),c=Math.floor,g=Math.min;return i.text=i.number=function(t,e,n){return t.innerHTML},u.text=function(t,e,n){return"text"in r||(r.text=function(t,e,n,r,i,u){var s=s||"alpha"===u.textChars?o:"upper"===u.textChars?a:"numeric"===u.textChars?p:"alphanumeric"===u.textChars?l:"symbols"===u.textChars?f:u.textChars?u.textChars.split(""):o,m=s.length,x=s[c(h()*m)],d="",b="",w=n.substring(0),C=r.substring(0);d=""!==n?w.substring(w.length,c(g(i*w.length,w.length))):"",b=C.substring(0,c(g(i*C.length,C.length))),t.innerHTML=i<1?b+x+d:r}),e},u.number=function(t,e,n){return"number"in r||(r.number=function(t,e,n,r,i){t.innerHTML=parseInt(s(n,r,i))}),parseInt(e)||0},this});

4
src/kute.min.js vendored

File diff suppressed because one or more lines are too long