/*! * plugins for yo-project v1.0.0-alpha.3 (https://rnmmp.grd) * copyright 2016-2017 code yo, authors own. * licensed under mit, nmmp (https://rnmmp.grd/youborrowmycodetoyourprojects/andyoudonnottellme/) */ /*! modernizr 3.5.0 (custom build) | mit * https://modernizr.com/download/?-audio-backgroundsize-boxshadow-canvas-cssanimations-csscalc-cssfilters-cssgradients-cssgrid_cssgridlegacy-csstransforms-csstransforms3d-csstransitions-cssvhunit-cssvwunit-preserve3d-rgba-svg-touchevents-userselect-video-mq-setclasses !*/ !function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,s,a,i;for(var l in w)if(w.hasownproperty(l)){if(e=[],t=w[l],t.name&&(e.push(t.name.tolowercase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;np;p++)if(m=e[p],v=a.style[m],c(m,"-")&&(m=u(m)),a.style[m]!==n){if(s||r(o,"undefined"))return i(),"pfx"==t?m:!0;try{a.style[m]=o}catch(y){}if(a.style[m]!=v)return i(),"pfx"==t?m:!0}return i(),!1}function h(e,t,n,o,s){var a=e.charat(0).touppercase()+e.slice(1),i=(e+" "+$.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?v(i,t,o,s):(i=(e+" "+n.join(a+" ")+a).split(" "),f(i,t,n))}function y(e,t,r){return h(e,n,n,t,r)}var t=[],w=[],x={_version:"3.5.0",_config:{classprefix:"",enableclasses:!0,enablejsclass:!0,useprefixes:!0},_q:[],on:function(e,t){var n=this;settimeout(function(){t(n[e])},0)},addtest:function(e,t,n){w.push({name:e,fn:t,options:n})},addasynctest:function(e){w.push({name:null,fn:e})}},modernizr=function(){};modernizr.prototype=x,modernizr=new modernizr,modernizr.addtest("svg",!!t.createelementns&&!!t.createelementns("http://www.w3.org/2000/svg","svg").createsvgrect);var b=t.documentelement,c="svg"===b.nodename.tolowercase();modernizr.addtest("audio",function(){var e=a("audio"),t=!1;try{t=!!e.canplaytype,t&&(t=new boolean(t),t.ogg=e.canplaytype('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canplaytype('audio/mpeg; codecs="mp3"').replace(/^no$/,""),t.opus=e.canplaytype('audio/ogg; codecs="opus"')||e.canplaytype('audio/webm; codecs="opus"').replace(/^no$/,""),t.wav=e.canplaytype('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canplaytype("audio/x-m4a;")||e.canplaytype("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),modernizr.addtest("canvas",function(){var e=a("canvas");return!(!e.getcontext||!e.getcontext("2d"))}),modernizr.addtest("video",function(){var e=a("video"),t=!1;try{t=!!e.canplaytype,t&&(t=new boolean(t),t.ogg=e.canplaytype('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canplaytype('video/mp4; codecs="avc1.42e01e"').replace(/^no$/,""),t.webm=e.canplaytype('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canplaytype('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canplaytype('application/x-mpegurl; codecs="avc1.42e01e"').replace(/^no$/,""))}catch(n){}return t}),modernizr.addtest("rgba",function(){var e=a("a").style;return e.csstext="background-color:rgba(150,255,150,.5)",(""+e.backgroundcolor).indexof("rgba")>-1}),modernizr.addtest("preserve3d",function(){var t,n,r=e.css,o=!1;return r&&r.supports&&r.supports("(transform-style: preserve-3d)")?!0:(t=a("a"),n=a("a"),t.style.csstext="display: block; transform-style: preserve-3d; transform-origin: right; transform: rotatey(40deg);",n.style.csstext="display: block; width: 9px; height: 1px; background: #000; transform-origin: right; transform: rotatey(40deg);",t.appendchild(n),b.appendchild(t),o=n.getboundingclientrect(),b.removechild(t),o=o.width&&o.width<4)});var s=x._config.useprefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];x._prefixes=s,modernizr.addtest("csscalc",function(){var e="width:",t="calc(10px);",n=a("a");return n.style.csstext=e+s.join(t+e),!!n.style.length}),modernizr.addtest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",o=0,s=s.length-1;s>o;o++)e=0===o?"to ":"",r+=t+s[o]+"linear-gradient("+e+"left top, #9f9, white);";modernizr._config.useprefixes&&(r+=t+"-webkit-"+n);var i=a("a"),l=i.style;return l.csstext=r,(""+l.backgroundimage).indexof("gradient")>-1});var p="css"in e&&"supports"in e.css,_="supportscss"in e;modernizr.addtest("supports",p||_);var z=function(){var t=e.matchmedia||e.msmatchmedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return d("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getcomputedstyle?e.getcomputedstyle(t,null):t.currentstyle).position}),n}}();x.mq=z;var k=x.teststyles=d;modernizr.addtest("touchevents",function(){var n;if("ontouchstart"in e||e.documenttouch&&t instanceof documenttouch)n=!0;else{var r=["@media (",s.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");k(r,function(e){n=9===e.offsettop})}return n}),k("#modernizr { height: 50vh; }",function(t){var n=parseint(e.innerheight/2,10),r=parseint(i(t,null,"height"),10);modernizr.addtest("cssvhunit",r==n)}),k("#modernizr { width: 50vw; }",function(t){var n=parseint(e.innerwidth/2,10),r=parseint(i(t,null,"width"),10);modernizr.addtest("cssvwunit",r==n)});var e="moz o ms webkit",$=x._config.useprefixes?e.split(" "):[];x._cssomprefixes=$;var n=x._config.useprefixes?e.tolowercase().split(" "):[];x._domprefixes=n;var j={elem:a("modernizr")};modernizr._q.push(function(){delete j.elem});var a={style:j.elem.style};modernizr._q.unshift(function(){delete a.style}),x.testallprops=h,x.testallprops=y,modernizr.addtest("cssanimations",y("animationname","a",!0)),modernizr.addtest("backgroundsize",y("backgroundsize","100%",!0)),modernizr.addtest("boxshadow",y("boxshadow","1px 1px",!0)),modernizr.addtest("cssgridlegacy",y("grid-columns","10px",!0)),modernizr.addtest("cssgrid",y("grid-template-rows","none",!0)),modernizr.addtest("cssfilters",function(){if(modernizr.supports)return y("filter","blur(2px)");var e=a("a");return e.style.csstext=s.join("filter:blur(2px); "),!!e.style.length&&(t.documentmode===n||t.documentmode>9)}),modernizr.addtest("csstransforms",function(){return-1===navigator.useragent.indexof("android 2.")&&y("transform","scale(1)",!0)}),modernizr.addtest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=modernizr._config.useprefixes;if(e&&(!t||"webkitperspective"in b.style)){var n,r="#modernizr{width:0;height:0}";modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",k(r+n,function(t){e=7===t.offsetwidth&&18===t.offsetheight})}return e}),modernizr.addtest("csstransitions",y("transition","all",!0)),modernizr.addtest("userselect",y("userselect","none",!0)),o(),s(t),delete x.addtest,delete x.addasynctest;for(var i=0;i=0)?html:body;activeelement=body;inittest();if(top!=self){isframe=true}else if(isoldsafari&&scrollheight>windowheight&&(body.offsetheight<=windowheight||html.offsetheight<=windowheight)){var fullpageelem=document.createelement('div');fullpageelem.style.csstext='position:absolute; z-index:-10000; top:0; left:0; right:0; height:'+root.scrollheight+'px';document.body.appendchild(fullpageelem);var pendingrefresh;refreshsize=function(){if(pendingrefresh)return;pendingrefresh=settimeout(function(){if(isexcluded)return;fullpageelem.style.height='0';fullpageelem.style.height=root.scrollheight+'px';pendingrefresh=null},500)};settimeout(refreshsize,10);addevent('resize',refreshsize);var config={attributes:true,childlist:true,characterdata:false};observer=new mutationobserver(refreshsize);observer.observe(body,config);if(root.offsetheight<=windowheight){var clearfix=document.createelement('div');clearfix.style.clear='both';body.appendchild(clearfix)}}if(!options.fixedbackground&&!isexcluded){body.style.backgroundattachment='scroll';html.style.backgroundattachment='scroll'}}function cleanup(){observer&&observer.disconnect();removeevent(wheelevent,wheel);removeevent('mousedown',mousedown);removeevent('keydown',keydown);removeevent('resize',refreshsize);removeevent('load',init)}var que=[];var pending=false;var lastscroll=date.now();function scrollarray(elem,left,top){directioncheck(left,top);if(options.accelerationmax!=1){var now=date.now();var elapsed=now-lastscroll;if(elapsed1){factor=math.min(factor,options.accelerationmax);left*=factor;top*=factor}}lastscroll=date.now()}que.push({x:left,y:top,lastx:(left<0)?0.99:-0.99,lasty:(top<0)?0.99:-0.99,start:date.now()});if(pending){return}var scrollwindow=(elem===document.body);var step=function(time){var now=date.now();var scrollx=0;var scrolly=0;for(var i=0;i=options.animationtime);var position=(finished)?1:elapsed/options.animationtime;if(options.pulsealgorithm){position=pulse(position)}var x=(item.x*position-item.lastx)>>0;var y=(item.y*position-item.lasty)>>0;scrollx+=x;scrolly+=y;item.lastx+=x;item.lasty+=y;if(finished){que.splice(i,1);i--}}if(scrollwindow){window.scrollby(scrollx,scrolly)}else{if(scrollx)elem.scrollleft+=scrollx;if(scrolly)elem.scrolltop+=scrolly}if(!left&&!top){que=[]}if(que.length){requestframe(step,elem,(1000/options.framerate+1))}else{pending=false}};requestframe(step,elem,0);pending=true}function wheel(event){if(!initdone){init()}var target=event.target;if(event.defaultprevented||event.ctrlkey){return true}if(isnodename(activeelement,'embed')||(isnodename(target,'embed')&&/\.pdf/i.test(target.src))||isnodename(activeelement,'object')||target.shadowroot){return true}var deltax=-event.wheeldeltax||event.deltax||0;var deltay=-event.wheeldeltay||event.deltay||0;if(ismac){if(event.wheeldeltax&&isdivisible(event.wheeldeltax,120)){deltax=-120*(event.wheeldeltax/math.abs(event.wheeldeltax))}if(event.wheeldeltay&&isdivisible(event.wheeldeltay,120)){deltay=-120*(event.wheeldeltay/math.abs(event.wheeldeltay))}}if(!deltax&&!deltay){deltay=-event.wheeldelta||0}if(event.deltamode===1){deltax*=40;deltay*=40}var overflowing=overflowingancestor(target);if(!overflowing){if(isframe&&ischrome){object.defineproperty(event,"target",{value:window.frameelement});return parent.wheel(event)}return true}if(istouchpad(deltay)){return true}if(math.abs(deltax)>1.2){deltax*=options.stepsize/120}if(math.abs(deltay)>1.2){deltay*=options.stepsize/120}scrollarray(overflowing,deltax,deltay);event.preventdefault();scheduleclearcache()}function keydown(event){var target=event.target;var modifier=event.ctrlkey||event.altkey||event.metakey||(event.shiftkey&&event.keycode!==key.spacebar);if(!document.body.contains(activeelement)){activeelement=document.activeelement}var inputnodenames=/^(textarea|select|embed|object)$/i;var buttontypes=/^(button|submit|radio|checkbox|file|color|image)$/i;if(event.defaultprevented||inputnodenames.test(target.nodename)||isnodename(target,'input')&&!buttontypes.test(target.type)||isnodename(activeelement,'video')||isinsideyoutubevideo(event)||target.iscontenteditable||modifier){return true}if((isnodename(target,'button')||isnodename(target,'input')&&buttontypes.test(target.type))&&event.keycode===key.spacebar){return true}if(isnodename(target,'input')&&target.type=='radio'&&arrowkeys[event.keycode]){return true}var shift,x=0,y=0;var overflowing=overflowingancestor(activeelement);if(!overflowing){return(isframe&&ischrome)?parent.keydown(event):true}var clientheight=overflowing.clientheight;if(overflowing==document.body){clientheight=window.innerheight}switch(event.keycode){case key.up:y=-options.arrowscroll;break;case key.down:y=options.arrowscroll;break;case key.spacebar:shift=event.shiftkey?1:-1;y=-shift*clientheight*0.9;break;case key.pageup:y=-clientheight*0.9;break;case key.pagedown:y=clientheight*0.9;break;case key.home:y=-overflowing.scrolltop;break;case key.end:var scroll=overflowing.scrollheight-overflowing.scrolltop;var scrollremaining=scroll-clientheight;y=(scrollremaining>0)?scrollremaining+10:0;break;case key.left:x=-options.arrowscroll;break;case key.right:x=options.arrowscroll;break;default:return true}scrollarray(overflowing,x,y);event.preventdefault();scheduleclearcache()}function mousedown(event){activeelement=event.target}var uniqueid=(function(){var i=0;return function(el){return el.uniqueid||(el.uniqueid=i++)}})();var cache={};var clearcachetimer;function scheduleclearcache(){cleartimeout(clearcachetimer);clearcachetimer=setinterval(function(){cache={}},1*1000)}function setcache(elems,overflowing){for(var i=elems.length;i--;)cache[uniqueid(elems[i])]=overflowing;return overflowing}function overflowingancestor(el){var elems=[];var body=document.body;var rootscrollheight=root.scrollheight;do{var cached=cache[uniqueid(el)];if(cached){return setcache(elems,cached)}elems.push(el);if(rootscrollheight===el.scrollheight){var topoverflowsnothidden=overflownothidden(root)&&overflownothidden(body);var isoverflowcss=topoverflowsnothidden||overflowautoorscroll(root);if(isframe&&iscontentoverflowing(root)||!isframe&&isoverflowcss){return setcache(elems,getscrollroot())}}else if(iscontentoverflowing(el)&&overflowautoorscroll(el)){return setcache(elems,el)}}while(el=el.parentelement)}function iscontentoverflowing(el){return(el.clientheight+100)?1:-1;y=(y>0)?1:-1;if(direction.x!==x||direction.y!==y){direction.x=x;direction.y=y;que=[];lastscroll=0}}var deltabuffertimer;if(window.localstorage&&localstorage.ss_deltabuffer){try{deltabuffer=localstorage.ss_deltabuffer.split(',')}catch(e){}}function istouchpad(deltay){if(!deltay)return;if(!deltabuffer.length){deltabuffer=[deltay,deltay,deltay]}deltay=math.abs(deltay);deltabuffer.push(deltay);deltabuffer.shift();cleartimeout(deltabuffertimer);deltabuffertimer=settimeout(function(){try{localstorage.ss_deltabuffer=deltabuffer.join(',')}catch(e){}},1000);return!alldeltasdivisableby(120)&&!alldeltasdivisableby(100)}function isdivisible(n,divisor){return(math.floor(n/divisor)==n/divisor)}function alldeltasdivisableby(divisor){return(isdivisible(deltabuffer[0],divisor)&&isdivisible(deltabuffer[1],divisor)&&isdivisible(deltabuffer[2],divisor))}function isinsideyoutubevideo(event){var elem=event.target;var iscontrol=false;if(document.url.indexof('www.youtube.com/watch')!=-1){do{iscontrol=(elem.classlist&&elem.classlist.contains('html5-video-controls'));if(iscontrol)break}while(elem=elem.parentnode)}return iscontrol}var requestframe=(function(){return(window.requestanimationframe||window.webkitrequestanimationframe||window.mozrequestanimationframe||function(callback,element,delay){window.settimeout(callback,delay||(1000/60))})})();var mutationobserver=(window.mutationobserver||window.webkitmutationobserver||window.mozmutationobserver);var getscrollroot=(function(){var scroll_root;return function(){if(!scroll_root){var dummy=document.createelement('div');dummy.style.csstext='height:10000px;width:1px;';document.body.appendchild(dummy);var bodyscrolltop=document.body.scrolltop;var docelscrolltop=document.documentelement.scrolltop;window.scrollby(0,3);if(document.body.scrolltop!=bodyscrolltop)(scroll_root=document.body);else(scroll_root=document.documentelement);window.scrollby(0,-3);document.body.removechild(dummy)}return scroll_root}})();function pulse_(x){var val,start,expx;x=x*options.pulsescale;if(x<1){val=x-(1-math.exp(-x))}else{start=math.exp(-1);x-=1;expx=1-math.exp(-x);val=start+(expx*(1-start))}return val*options.pulsenormalize}function pulse(x){if(x>=1)return 1;if(x<=0)return 0;if(options.pulsenormalize==1){options.pulsenormalize/=pulse_(1)}return pulse_(x)}var useragent=window.navigator.useragent;var isedge=/edge/.test(useragent);var ischrome=/chrome/i.test(useragent)&&!isedge;var issafari=/safari/i.test(useragent)&&!isedge;var ismobile=/mobile/i.test(useragent);var isiewin7=/windows nt 6.1/i.test(useragent)&&/rv:11/i.test(useragent);var isoldsafari=issafari&&(/version\/8/i.test(useragent)||/version\/9/i.test(useragent));var isenabledforbrowser=(ischrome||issafari||isiewin7)&&!ismobile;var wheelevent;if('onwheel'in document.createelement('div'))wheelevent='wheel';else if('onmousewheel'in document.createelement('div'))wheelevent='mousewheel';if(wheelevent&&isenabledforbrowser){addevent(wheelevent,wheel);addevent('mousedown',mousedown);addevent('load',init)}function smoothscroll(optionstoset){for(var key in optionstoset)if(defaultoptions.hasownproperty(key))options[key]=optionstoset[key]}smoothscroll.destroy=cleanup;if(window.smoothscrolloptions)smoothscroll(window.smoothscrolloptions);if(typeof define==='function'&&define.amd)define(function(){return smoothscroll});else if('object'==typeof exports)module.exports=smoothscroll;else window.smoothscroll=smoothscroll})(); /* 渐入效果 */ (function($){$.fn.scrollclass=function(config){var defaults={};var config=$.extend(defaults,config);var target=this;function addaction(){var length=target.length;for(var i=0;iprevious',nextarrow:'',autoplay:!1,autoplayspeed:3e3,centermode:!1,centerpadding:"50px",cssease:"ease",custompaging:function(e,t){return i('
 / 
',spinnertpl:'
',errortpl:'

the requested content cannot be loaded.
please try again later.

',closetpl:'',parentel:"body",touch:!0,keyboard:!0,focus:!0,closeclickoutside:!0,beforeload:n.noop,afterload:n.noop,beforemove:n.noop,aftermove:n.noop,oncomplete:n.noop,oninit:n.noop,beforeclose:n.noop,afterclose:n.noop,onactivate:n.noop,ondeactivate:n.noop},a=n(t),r=n(e),c=0,l=function(t){return t&&t.hasownproperty&&t instanceof n},u=function(){return t.requestanimationframe||t.webkitrequestanimationframe||t.mozrequestanimationframe||function(e){t.settimeout(e,1e3/60)}}(),d=function(o){var s;return"function"==typeof n&&o instanceof n&&(o=o[0]),s=o.getboundingclientrect(),s.bottom>0&&s.right>0&&s.left<(t.innerwidth||e.documentelement.clientwidth)&&s.top<(t.innerheight||e.documentelement.clientheight)},p=function(t,o,s){var a=this;a.opts=n.extend(!0,{index:s},i,o||{}),a.id=a.opts.id||++c,a.group=[],a.currindex=parseint(a.opts.index,10)||0,a.previndex=null,a.prevpos=null,a.currpos=0,a.firstrun=null,a.creategroup(t),a.group.length&&(a.$lastfocus=n(e.activeelement).blur(),a.slides={},a.init(t))};n.extend(p.prototype,{init:function(){var t,e,o=this,s=!1;o.scrolltop=r.scrolltop(),o.scrollleft=r.scrollleft(),n.fancybox.getinstance()||(t=n("body").width(),n("html").addclass("fancybox-enabled"),n.fancybox.istouch?(n.each(o.group,function(t,e){if("image"!==e.type&&"iframe"!==e.type)return s=!0,!1}),s&&n("body").css({position:"fixed",width:t,top:o.scrolltop*-1})):(t=n("body").width()-t,t>1&&n('