-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-video-js-15ae384b2cf61cb27e7f.js
2 lines (2 loc) · 12 KB
/
component---src-pages-video-js-15ae384b2cf61cb27e7f.js
1
2
"use strict";(self.webpackChunkgatsby_starter_hello_world=self.webpackChunkgatsby_starter_hello_world||[]).push([[231],{9760:function(e,t,r){r.d(t,{r:function(){return E}});var n=r(7294),o=r(3336),a=r(4192),i=r(7459),l=r(9409),s={center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},c=(0,o.css)(["align-items:",";"],(function(e){return s[e.align]})),u={around:"space-around",between:"space-between",center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},f=(0,o.css)(["align-content:",";"],(function(e){return u[e.alignContent]})),m={center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},p=(0,o.css)(["justify-items:",";"],(function(e){return m[e.justify]})),d={around:"space-around",between:"space-between",center:"center",end:"flex-end",start:"flex-start",stretch:"stretch"},g=(0,o.css)(["justify-content:",";"],(function(e){return d[e.justifyContent]})),h={flex:"1fr",full:"100%","1/2":"50%","1/4":"25%","2/4":"50%","3/4":"75%","1/3":"33.33%","2/3":"66.66%"},y=function(e,t){return Array.isArray(e)?"minmax("+(t.global.size[e[0]]||e[0])+", "+(t.global.size[e[1]]||e[1])+")":"flex"===e?"1fr":"minmax("+(t.global.size[e]||e)+", 1fr)"},b=function(e,t,r){var n=h[e];return!r||!n||t.fillContainer&&"horizontal"!==t.fillContainer||console.warn("Grid needs `fill` when using fractional row sizes"),n||t.theme.global.size[e]||e},w=o.default.div.attrs((function(e){return{"aria-label":e.a11yTitleProp}})).withConfig({displayName:"StyledGrid",componentId:"sc-1wofa1l-0"})(["display:grid;box-sizing:border-box;"," "," "," "," "," "," "," "," "," "," "," "," ",""],a.$G,(function(e){return e.border&&(Array.isArray(e.border)?e.border.map((function(t){return(0,i.$)(t,e.responsive,e.theme)})):(0,i.$)(e.border,e.responsive,e.theme))}),(function(e){return(t=e.fillContainer)?"horizontal"===t?"width: 100%;":"vertical"===t?"height: 100%;":"\n width: 100%;\n height: 100%;\n ":t;var t}),(function(e){return e.align&&c}),(function(e){return e.alignContent&&f}),(function(e){return e.areas&&function(e){if(Array.isArray(e.rowsProp)&&Array.isArray(e.columns)||console.warn("Grid `areas` requires `rows` and `columns` to be arrays."),Array.isArray(e.areas)&&e.areas.every((function(e){return Array.isArray(e)})))return"grid-template-areas: "+e.areas.map((function(e){return'"'+e.join(" ")+'"'})).join(" ")+";";var t=e.rowsProp.map((function(){return e.columns.map((function(){return"."}))}));return e.areas.forEach((function(e){for(var r=e.start[1];r<=e.end[1];r+=1)for(var n=e.start[0];n<=e.end[0];n+=1)t[r][n]=e.name})),"grid-template-areas: "+t.map((function(e){return'"'+e.join(" ")+'"'})).join(" ")+";"}(e)}),(function(e){return e.columns&&function(e){return Array.isArray(e.columns)?(0,o.css)(["grid-template-columns:",";"],e.columns.map((function(t){return Array.isArray(t)?"minmax("+b(t[0],e)+", "+b(t[1],e)+")":b(t,e)})).join(" ")):"object"==typeof e.columns?(0,o.css)(["grid-template-columns:repeat( ",","," );"],"number"==typeof(t=e.columns.count)?t:"auto-"+t,y(e.columns.size,e.theme)):(0,o.css)(["grid-template-columns:repeat( auto-fill,"," );"],y(e.columns,e.theme));var t}(e)}),(function(e){return e.gap&&function(e){if("string"==typeof e.gap){var t=e.theme.global.edgeSize[e.gap]||e.gap;return"grid-gap: "+t+" "+t+";"}return e.gap.row&&e.gap.column?"\n grid-row-gap: "+(e.theme.global.edgeSize[e.gap.row]||e.gap.row)+";\n grid-column-gap: "+(e.theme.global.edgeSize[e.gap.column]||e.gap.column)+";\n ":e.gap.row?"\n grid-row-gap: "+(e.theme.global.edgeSize[e.gap.row]||e.gap.row)+";\n ":e.gap.column?"\n grid-column-gap: "+(e.theme.global.edgeSize[e.gap.column]||e.gap.column)+";\n ":""}(e)}),(function(e){return e.justify&&p}),(function(e){return e.justifyContent&&g}),(function(e){return e.pad&&(0,a.oW)("padding",e.pad,e.responsive,e.theme.global.edgeSize.responsiveBreakpoint,e.theme)}),(function(e){return e.rowsProp&&function(e){return Array.isArray(e.rowsProp)?(0,o.css)(["grid-template-rows:",";"],e.rowsProp.map((function(t){return Array.isArray(t)?"minmax("+b(t[0],e,!0)+", "+b(t[1],e,!0)+")":b(t,e,!0)})).join(" ")):(0,o.css)(["grid-auto-rows:",";"],e.theme.global.size[e.rowsProp])}(e)}),(function(e){return e.theme.grid&&e.theme.grid.extend}));function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}w.defaultProps={},Object.setPrototypeOf(w.defaultProps,l.l);var x=(0,n.forwardRef)((function(e,t){var r=e.a11yTitle,o=e.border,a=e.fill,i=e.responsive,l=void 0===i||i,s=e.rows,c=e.tag,u=e.as,f=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,["a11yTitle","border","fill","responsive","rows","tag","as"]);return n.createElement(w,v({ref:t,a11yTitleProp:r,as:!u&&c?c:u,border:o,fillContainer:a,responsive:l,rowsProp:s},f))}));x.displayName="Grid";var E=x;E.available="undefined"!=typeof window&&window.CSS&&window.CSS.supports&&window.CSS.supports("display","grid")},569:function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.Z=void 0;var c=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?l(e):t}(this,a(t).call(this,e)),s(l(l(r)),"image",void 0),s(l(l(r)),"loadImage",(function(e,t){r.image&&(r.image.onload=null,r.image.onerror=null);var n=new Image;r.image=n,n.onload=r.onLoad,n.onerror=r.onError,n.src=e,t&&(n.srcset=t.srcSet,n.sizes=t.sizes)})),s(l(l(r)),"onLoad",(function(){r.props.delay?r.setImageWithDelay():r.setImage()})),s(l(l(r)),"setImageWithDelay",(function(){setTimeout((function(){r.setImage()}),r.props.delay)})),s(l(l(r)),"setImage",(function(){r.setState({image:r.image.src,loading:!1,srcSetData:{srcSet:r.image.srcset||"",sizes:r.image.sizes||""}})})),s(l(l(r)),"onError",(function(e){var t=r.props.onError;t&&t(e)})),r.state={image:e.placeholder,loading:!0,srcSetData:{srcSet:"",sizes:""}},r}var r,c,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(t,e),r=t,(c=[{key:"componentDidMount",value:function(){var e=this.props,t=e.src,r=e.srcSetData;this.loadImage(t,r)}},{key:"componentDidUpdate",value:function(e){var t=this,r=this.props,n=r.src,o=r.placeholder,a=r.srcSetData;n!==e.src&&this.setState({image:o,loading:!0},(function(){t.loadImage(n,a)}))}},{key:"componentWillUnmount",value:function(){this.image&&(this.image.onload=null,this.image.onerror=null)}},{key:"render",value:function(){var e=this.state,t=e.image,r=e.loading,n=e.srcSetData,o=this.props.children;if(!o||"function"!=typeof o)throw new Error("ProgressiveImage requires a function as its only child");return o(t,r,n)}}])&&o(r.prototype,c),u&&o(r,u),t}(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(7294)).Component);t.Z=c},86:function(e,t,r){var n=r(7294),o=r(1930),a=r(6289),i=r(5444),l=r(7752),s=r(7220);r(6359);t.Z=function(e){var t=e.dataList,r=(e.onClickAppsIcon,e.showFallBack,e.isOwner),c=e.vertical,u=e.render,f=n.useContext(o.b),m=(0,n.useState)(!1),p=m[0],d=m[1],g=(0,n.useState)([]),h=g[0],y=(g[1],{xxsmall:"100%",xsmall:"100%",small:"100%",medium:"24%",xlarge:"20%",full:"20%"});return n.createElement(a.x,{fill:!0,wrap:!0,direction:c?"column":"row",gap:"10px"},t&&t.map((function(e,t){e.thumbnail,e.title,e.cta;var r=e.cardHref,o=(e.image,e.description,r?{style:{cursor:"pointer"},onClick:function(){return(0,i.c4)(r)}}:{});return n.createElement(a.x,Object.assign({},o,{outline:!1,key:t,width:y[f],gap:"xxsmall",direction:c?"row":"column"}),u&&u(e,t))})),p&&h&&n.createElement(l.Z,{onClose:function(){return d(!1)}},n.createElement(a.x,null,n.createElement(s.Z,{showUpload:r,files:h}))))}},7220:function(e,t,r){var n=r(7294),o=r(6289),a=r(733),i=r(3277),l=r(2059),s=r(8905);t.Z=function(e){var t=e.files,r=e.showUpload,c=e.imageFit,u=void 0===c?"contain":c,f=(0,n.useState)(t),m=f[0],p=f[1],d=(0,n.useState)(0),g=d[0],h=d[1],y=(0,n.useState)(null),b=y[0],w=y[1];n.useContext(s.Z);return(0,n.useEffect)((function(){g<m.length&&g>-1&&w(m[g])}),[g]),n.createElement(o.x,null,r&&n.createElement(l.Z,{onChange:function(e,t){p(m.concat([t]))}}),n.createElement(o.x,{width:{min:"300px",max:"600px"},height:"340px",overflow:"hidden"},b&&n.createElement(a.E,{fit:u,src:b.url()})),n.createElement(o.x,{direction:"row",gap:"small"},n.createElement(o.x,null,n.createElement(i.e,{onClick:function(){return g-1>-1&&h(g-1)}},"Prev")),n.createElement(o.x,{margin:{left:"auto"}},n.createElement(i.e,{onClick:function(){return g+1<m.length&&h(g+1)}},"Next"))))}},6359:function(e,t,r){r.d(t,{E:function(){return c}});var n=r(9756),o=r(7294),a=r(733),i="https://parsefiles.back4app.com/32hrI9O4UWscR1vOtkNt62eoLtZgyS9SUIEwp0HL/ef090da5003a00bc6c4bf12255c43aa3_fallback.png",l=r(569),s=["src","onImageClick","imageProps"],c=function(e){var t=e.src,r=e.onImageClick,c=e.imageProps,u=((0,n.Z)(e,s),o.createElement(a.E,{src:i,fit:"cover"}));return o.createElement(o.Fragment,null,o.createElement(l.Z,{src:t,placeholder:i},(function(e,t){return t?u:o.createElement(o.Fragment,null,o.createElement(a.E,Object.assign({fallback:i,src:e,onClick:r},c)))})))}},5286:function(e,t,r){r.r(t),r.d(t,{default:function(){return h}});var n=r(7294),o=r(86),a=r(6289),i=r(1930),l=r(9760),s=function(e){var t=e.children,r=n.useContext(i.b),o="small"===r?["auto","auto","auto"]:["auto","auto"],s="small"===r?[{name:"header",start:[0,0],end:[1,0]},{name:"main",start:[0,1],end:[1,1]},{name:"sidebar",start:[0,2],end:[1,2]}]:[{name:"header",start:[0,0],end:[1,0]},{name:"main",start:[0,1],end:[0,1]},{name:"sidebar",start:[1,1],end:[1,1]}];return n.createElement(a.x,{align:"center"},r,n.createElement(a.x,{width:"90%"},n.createElement(l.r,{fill:!0,rows:o,columns:["flex","flex"],gap:"small",areas:s},t)))},c=r(9756),u=r(3336),f=["videoId"],m=u.default.div.withConfig({displayName:"YoutubeVideo__Container",componentId:"sc-1xm16ot-0"})(["position:relative;overflow:hidden;width:100%;padding-top:56.25%;"]),p=u.default.iframe.withConfig({displayName:"YoutubeVideo__IFrame",componentId:"sc-1xm16ot-1"})(["position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;"]),d=function(e){var t=e.videoId;(0,c.Z)(e,f);return n.createElement(m,null,n.createElement(p,{src:"https://www.youtube.com/embed/"+t}))},g=r(2203),h=function(e){var t=e.location,r=g.parse(t.search);return n.createElement(n.Fragment,null,n.createElement(s,null,n.createElement(a.x,{gridArea:"header"},"header"),n.createElement(a.x,{gridArea:"sidebar"}),n.createElement(a.x,{gridArea:"main"},n.createElement(d,{videoId:r.id})),n.createElement(a.x,{gridArea:"sidebar"},n.createElement(a.x,null,n.createElement(o.Z,{dataList:[{image:"https://i.ytimg.com/vi/uJwF8JgQJW0/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDYbomsLKYBF2bT4pQHKSmtGAEgOQ",title:"video 1",description:"video 1 description"},{},{},{},{},{},{},{},{}]})))))}}}]);
//# sourceMappingURL=component---src-pages-video-js-15ae384b2cf61cb27e7f.js.map