-
Notifications
You must be signed in to change notification settings - Fork 0
/
17-275d412c7d3fc80fdcbb.js
2 lines (2 loc) · 14 KB
/
17-275d412c7d3fc80fdcbb.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[17,16,18],{242:function(e,t,r){"use strict";r(20),r(135),r(14),r(73),r(54),r(18),Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],a=!0,n=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(l){n=!0,i=l}finally{try{!a&&s.return&&s.return()}finally{if(n)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),o=d(r(0)),s=d(r(1)),l=r(247);function d(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._handleClick=function(e){r.state.beforeAnimate(e),e&&e.preventDefault(),(0,l.animateScroll)(r.state.to,r.state.target,r.state.animate).then(function(t){t&&(r.state.disableHistory||(0,l.updateHistory)(t),r.state.afterAnimate(e))})},r.state=t._stateHelper(e),r.simulateClick=r._handleClick,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default.Component),i(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(t._stateHelper(e))}},{key:"render",value:function(){var e=this.props,t=(e.to,e.target,e.animate,e.beforeAnimate,e.afterAnimate,e.disableHistory,function(e,t){var r={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r}(e,["to","target","animate","beforeAnimate","afterAnimate","disableHistory"]));return this.props.children?o.default.createElement("a",n({},t,{href:"#"+this.state.to,onClick:this._handleClick})):null}}],[{key:"_normalizeId",value:function(e){return e&&e.replace(/^#/,"")||""}},{key:"_stateHelper",value:function(e){var r=e.animate||{},a=r.offset,n=void 0===a?0:a,i=r.duration,o=void 0===i?400:i,s=r.easing,l=void 0===s?c:s;return{to:t._normalizeId(e.to),target:t._normalizeId(e.target),animate:{offset:n,duration:o,easing:l},beforeAnimate:e.beforeAnimate||function(){},afterAnimate:e.afterAnimate||function(){},disableHistory:e.disableHistory}}},{key:"getDerivedStateFromProps",value:function(e){return t._stateHelper(e)}}]),t}();function c(e,t,r,a,n){return-a*(t/=n)*(t-2)+r}u.propTypes={to:s.default.string.isRequired,target:s.default.string,animate:s.default.shape({offset:s.default.number,duration:s.default.number,easing:s.default.func}),beforeAnimate:s.default.func,afterAnimate:s.default.func,disableHistory:s.default.bool,children:s.default.node},t.default=u;var f=a(/^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(o.default.version),4),p=f[2],g=f[3];p>=16&&g>=3&&delete u.prototype.componentWillReceiveProps},247:function(e,t,r){"use strict";r(30),r(5),Object.defineProperty(t,"__esModule",{value:!0}),t.animateScroll=void 0,t.updateHistory=function(e){e="#"+e,history.pushState?history.pushState(null,null,e):location.hash=e};var a,n,i=r(75);t.animateScroll=(a=void 0,n=void 0,function(e,t,r){var o=document.getElementById(t);function s(){return o?o.scrollTop:document.documentElement.scrollTop||document.body.scrollTop}return new Promise(function(t,l){var d=e?document.getElementById(e):document.body;if(!d)return l(new Error("Cannot find element: #"+e));var u,c=r.offset,f=r.duration,p=r.easing,g=s(),m=(u=o?o.getBoundingClientRect().top:0,d.getBoundingClientRect().top-u+s()+c-g);a&&((0,i.clearTimeout)(a),n()),n=t,function r(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+20;if(function(e){o?o.scrollTop=e:document.documentElement.scrollTop=document.body.scrollTop=e}(p(null,n,g,m,f)),!(n<f))return a=void 0,t(e);a=(0,i.setTimeout)(function(){r(n)},20)}()})})},249:function(e,t,r){"use strict";r(18),r(13),r(5),r(55),r(136),r(250);var a=r(4);t.__esModule=!0,t.default=void 0;var n,i=a(r(31)),o=a(r(42)),s=a(r(41)),l=a(r(22)),d=a(r(0)),u=a(r(1)),c=function(e){var t=(0,l.default)({},e),r=t.resolutions,a=t.sizes,n=t.critical;return r&&(t.fixed=r,delete t.resolutions),a&&(t.fluid=a,delete t.sizes),n&&(t.loading="eager"),t.fluid&&(t.fluid=S([].concat(t.fluid))),t.fixed&&(t.fixed=S([].concat(t.fixed))),t},f=function(e){var t=e.fluid,r=e.fixed;return(t&&t[0]||r&&r[0]).src},p=Object.create({}),g=function(e){var t=c(e),r=f(t);return p[r]||!1},m="undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype,h="undefined"!=typeof window,b=h&&window.IntersectionObserver,y=new WeakMap;function v(e){return e.map(function(e){var t=e.src,r=e.srcSet,a=e.srcSetWebp,n=e.media,i=e.sizes;return d.default.createElement(d.default.Fragment,{key:t},a&&d.default.createElement("source",{type:"image/webp",media:n,srcSet:a,sizes:i}),d.default.createElement("source",{media:n,srcSet:r,sizes:i}))})}function S(e){var t=[],r=[];return e.forEach(function(e){return(e.media?t:r).push(e)}),t.concat(r)}function w(e){return e.map(function(e){var t=e.src,r=e.media,a=e.tracedSVG;return d.default.createElement("source",{key:t,media:r,srcSet:a})})}function E(e){return e.map(function(e){var t=e.src,r=e.media,a=e.base64;return d.default.createElement("source",{key:t,media:r,srcSet:a})})}function O(e,t){var r=e.srcSet,a=e.srcSetWebp,n=e.media,i=e.sizes;return"<source "+(t?"type='image/webp' ":"")+(n?'media="'+n+'" ':"")+'srcset="'+(t?a:r)+'" '+(i?'sizes="'+i+'" ':"")+"/>"}var L=function(e,t){var r=(void 0===n&&"undefined"!=typeof window&&window.IntersectionObserver&&(n=new window.IntersectionObserver(function(e){e.forEach(function(e){if(y.has(e.target)){var t=y.get(e.target);(e.isIntersecting||e.intersectionRatio>0)&&(n.unobserve(e.target),y.delete(e.target),t())}})},{rootMargin:"200px"})),n);return r&&(r.observe(e),y.set(e,t)),function(){r.unobserve(e),y.delete(e)}},I=function(e){var t=e.src?'src="'+e.src+'" ':'src="" ',r=e.sizes?'sizes="'+e.sizes+'" ':"",a=e.srcSet?'srcset="'+e.srcSet+'" ':"",n=e.title?'title="'+e.title+'" ':"",i=e.alt?'alt="'+e.alt+'" ':'alt="" ',o=e.width?'width="'+e.width+'" ':"",s=e.height?'height="'+e.height+'" ':"",l=e.crossOrigin?'crossorigin="'+e.crossOrigin+'" ':"",d=e.loading?'loading="'+e.loading+'" ':"",u=e.draggable?'draggable="'+e.draggable+'" ':"";return"<picture>"+e.imageVariants.map(function(e){return(e.srcSetWebp?O(e,!0):"")+O(e)}).join("")+"<img "+d+o+s+r+a+t+i+n+l+u+'style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>'},_=function(e){var t=e.src,r=e.imageVariants,a=e.generateSources,n=e.spreadProps,i=d.default.createElement(R,(0,l.default)({src:t},n));return r.length>1?d.default.createElement("picture",null,a(r),i):i},R=d.default.forwardRef(function(e,t){var r=e.sizes,a=e.srcSet,n=e.src,i=e.style,o=e.onLoad,u=e.onError,c=e.loading,f=e.draggable,p=(0,s.default)(e,["sizes","srcSet","src","style","onLoad","onError","loading","draggable"]);return d.default.createElement("img",(0,l.default)({sizes:r,srcSet:a,src:n},p,{onLoad:o,onError:u,ref:t,loading:c,draggable:f,style:(0,l.default)({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"},i)}))});R.propTypes={style:u.default.object,onError:u.default.func,onLoad:u.default.func};var z=function(e){function t(t){var r;(r=e.call(this,t)||this).seenBefore=h&&g(t),r.addNoScript=!(t.critical&&!t.fadeIn),r.useIOSupport=!m&&b&&!t.critical&&!r.seenBefore;var a=t.critical||h&&(m||!r.useIOSupport);return r.state={isVisible:a,imgLoaded:!1,imgCached:!1,fadeIn:!r.seenBefore&&t.fadeIn},r.imageRef=d.default.createRef(),r.handleImageLoaded=r.handleImageLoaded.bind((0,o.default)((0,o.default)(r))),r.handleRef=r.handleRef.bind((0,o.default)((0,o.default)(r))),r}(0,i.default)(t,e);var r=t.prototype;return r.componentDidMount=function(){if(this.state.isVisible&&"function"==typeof this.props.onStartLoad&&this.props.onStartLoad({wasCached:g(this.props)}),this.props.critical){var e=this.imageRef.current;e&&e.complete&&this.handleImageLoaded()}},r.componentWillUnmount=function(){this.cleanUpListeners&&this.cleanUpListeners()},r.handleRef=function(e){var t=this;this.useIOSupport&&e&&(this.cleanUpListeners=L(e,function(){var e=g(t.props);t.state.isVisible||"function"!=typeof t.props.onStartLoad||t.props.onStartLoad({wasCached:e}),t.setState({isVisible:!0},function(){return t.setState({imgLoaded:e,imgCached:!!t.imageRef.current.currentSrc})})}))},r.handleImageLoaded=function(){var e,t,r;e=this.props,t=c(e),r=f(t),p[r]=!0,this.setState({imgLoaded:!0}),this.props.onLoad&&this.props.onLoad()},r.render=function(){var e=c(this.props),t=e.title,r=e.alt,a=e.className,n=e.style,i=void 0===n?{}:n,o=e.imgStyle,s=void 0===o?{}:o,u=e.placeholderStyle,f=void 0===u?{}:u,p=e.placeholderClassName,g=e.fluid,m=e.fixed,h=e.backgroundColor,b=e.durationFadeIn,y=e.Tag,S=e.itemProp,O=e.loading,L=e.draggable,z=!1===this.state.fadeIn||this.state.imgLoaded,T=!0===this.state.fadeIn&&!this.state.imgCached,k=(0,l.default)({opacity:z?1:0,transition:T?"opacity "+b+"ms":"none"},s),P="boolean"==typeof h?"lightgray":h,j={transitionDelay:b+"ms"},C=(0,l.default)({opacity:this.state.imgLoaded?0:1},T&&j,s,f),V={title:t,alt:this.state.isVisible?"":r,style:C,className:p};if(g){var A=g,H=A[0];return d.default.createElement(y,{className:(a||"")+" gatsby-image-wrapper",style:(0,l.default)({position:"relative",overflow:"hidden"},i),ref:this.handleRef,key:"fluid-"+JSON.stringify(H.srcSet)},d.default.createElement(y,{style:{width:"100%",paddingBottom:100/H.aspectRatio+"%"}}),P&&d.default.createElement(y,{title:t,style:(0,l.default)({backgroundColor:P,position:"absolute",top:0,bottom:0,opacity:this.state.imgLoaded?0:1,right:0,left:0},T&&j)}),H.base64&&d.default.createElement(_,{src:H.base64,spreadProps:V,imageVariants:A,generateSources:E}),H.tracedSVG&&d.default.createElement(_,{src:H.tracedSVG,spreadProps:V,imageVariants:A,generateSources:w}),this.state.isVisible&&d.default.createElement("picture",null,v(A),d.default.createElement(R,{alt:r,title:t,sizes:H.sizes,src:H.src,crossOrigin:this.props.crossOrigin,srcSet:H.srcSet,style:k,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:S,loading:O,draggable:L})),this.addNoScript&&d.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:I((0,l.default)({alt:r,title:t,loading:O},H,{imageVariants:A}))}}))}if(m){var x=m,N=x[0],M=(0,l.default)({position:"relative",overflow:"hidden",display:"inline-block",width:N.width,height:N.height},i);return"inherit"===i.display&&delete M.display,d.default.createElement(y,{className:(a||"")+" gatsby-image-wrapper",style:M,ref:this.handleRef,key:"fixed-"+JSON.stringify(N.srcSet)},P&&d.default.createElement(y,{title:t,style:(0,l.default)({backgroundColor:P,width:N.width,opacity:this.state.imgLoaded?0:1,height:N.height},T&&j)}),N.base64&&d.default.createElement(_,{src:N.base64,spreadProps:V,imageVariants:x,generateSources:E}),N.tracedSVG&&d.default.createElement(_,{src:N.tracedSVG,spreadProps:V,imageVariants:x,generateSources:w}),this.state.isVisible&&d.default.createElement("picture",null,v(x),d.default.createElement(R,{alt:r,title:t,width:N.width,height:N.height,sizes:N.sizes,src:N.src,crossOrigin:this.props.crossOrigin,srcSet:N.srcSet,style:k,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:S,loading:O,draggable:L})),this.addNoScript&&d.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:I((0,l.default)({alt:r,title:t,loading:O},N,{imageVariants:x}))}}))}return null},t}(d.default.Component);z.defaultProps={fadeIn:!0,durationFadeIn:500,alt:"",Tag:"div",loading:"lazy"};var T=u.default.shape({width:u.default.number.isRequired,height:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string,media:u.default.string}),k=u.default.shape({aspectRatio:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,sizes:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string,media:u.default.string});z.propTypes={resolutions:T,sizes:k,fixed:u.default.oneOfType([T,u.default.arrayOf(T)]),fluid:u.default.oneOfType([k,u.default.arrayOf(k)]),fadeIn:u.default.bool,durationFadeIn:u.default.number,title:u.default.string,alt:u.default.string,className:u.default.oneOfType([u.default.string,u.default.object]),critical:u.default.bool,crossOrigin:u.default.oneOfType([u.default.string,u.default.bool]),style:u.default.object,imgStyle:u.default.object,placeholderStyle:u.default.object,placeholderClassName:u.default.string,backgroundColor:u.default.oneOfType([u.default.string,u.default.bool]),onLoad:u.default.func,onError:u.default.func,onStartLoad:u.default.func,Tag:u.default.string,itemProp:u.default.string,loading:u.default.oneOf(["auto","lazy","eager"]),draggable:u.default.bool};var P=z;t.default=P},250:function(e,t,r){"use strict";r(251)("fixed",function(e){return function(){return e(this,"tt","","")}})},251:function(e,t,r){var a=r(7),n=r(11),i=r(43),o=/"/g,s=function(e,t,r,a){var n=String(i(e)),s="<"+t;return""!==r&&(s+=" "+r+'="'+String(a).replace(o,""")+'"'),s+">"+n+"</"+t+">"};e.exports=function(e,t){var r={};r[e]=t(s),a(a.P+a.F*n(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",r)}}}]);
//# sourceMappingURL=17-275d412c7d3fc80fdcbb.js.map