-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-index-tsx-5f800bdf3df359eccef5.js
2 lines (2 loc) · 15.7 KB
/
component---src-pages-index-tsx-5f800bdf3df359eccef5.js
1
2
"use strict";(self.webpackChunkgatsby_starter_blog=self.webpackChunkgatsby_starter_blog||[]).push([[245],{3674:function(e,t,n){n.d(t,{z:function(){return f}});var a=n(6540),s=n(8855),r=n(3720),i=n(4848),l=(0,s.R)((function(e,t){const{direction:n,align:a,justify:s,wrap:l,basis:o,grow:c,shrink:d,...u}=e,f={display:"flex",flexDirection:n,alignItems:a,justifyContent:s,flexWrap:l,flexBasis:o,flexGrow:c,flexShrink:d};return(0,i.jsx)(r.B.div,{ref:t,__css:f,...u})}));l.displayName="Flex";var o=n(4194),c=n(8539),d=n(7500),u=n(2532);function f(){return a.createElement(l,{className:"bio"},a.createElement(o.z,null,a.createElement(l,{width:200},a.createElement(u.S,{className:"bio-avatar",layout:"fixed",formats:["auto","webp","avif"],src:"../images/profile-pic.png",width:200,height:200,quality:100,alt:"Profile picture",__imageData:n(838)})),a.createElement(c.T,{align:"start"},a.createElement(d.E,{fontSize:"xl",as:"b"},"Welcome to my blog !"),a.createElement(d.E,null,"I am a Software Engineer, mostly self-taught and passionated about a lot of different topics."),a.createElement(d.E,null,"On this blog, you will find blog posts about anything, recipes, photos and any other endeavors I may find interesting to share."),a.createElement(d.E,null," Happy browsing !"))))}},2934:function(e,t,n){n.r(t),n.d(t,{default:function(){return ne}});var a=n(4506),s=n(6540);var r=n(9857);function i(...e){return t=>{e.forEach((e=>{!function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)}))}}function l(e){const t=e.target,{tagName:n,isContentEditable:a}=t;return"INPUT"!==n&&"TEXTAREA"!==n&&!0!==a}function o(e={}){const{ref:t,isDisabled:n,isFocusable:a,clickOnEnter:o=!0,clickOnSpace:c=!0,onMouseDown:d,onMouseUp:u,onClick:f,onKeyDown:m,onKeyUp:b,tabIndex:p,onMouseOver:h,onMouseLeave:g,...v}=e,[E,x]=(0,s.useState)(!0),[y,N]=(0,s.useState)(!1),I=function(){const e=(0,s.useRef)(new Map),t=e.current,n=(0,s.useCallback)(((t,n,a,s)=>{e.current.set(a,{type:n,el:t,options:s}),t.addEventListener(n,a,s)}),[]),a=(0,s.useCallback)(((t,n,a,s)=>{t.removeEventListener(n,a,s),e.current.delete(a)}),[]);return(0,s.useEffect)((()=>()=>{t.forEach(((e,t)=>{a(e.el,e.type,t,e.options)}))}),[a,t]),{add:n,remove:a}}(),k=E?p:p||0,w=n&&!a,C=(0,s.useCallback)((e=>{if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==f||f(e)}),[n,f]),S=(0,s.useCallback)((e=>{y&&l(e)&&(e.preventDefault(),e.stopPropagation(),N(!1),I.remove(document,"keyup",S,!1))}),[y,I]),T=(0,s.useCallback)((e=>{if(null==m||m(e),n||e.defaultPrevented||e.metaKey)return;if(!l(e.nativeEvent)||E)return;const t=o&&"Enter"===e.key;if(c&&" "===e.key&&(e.preventDefault(),N(!0)),t){e.preventDefault();e.currentTarget.click()}I.add(document,"keyup",S,!1)}),[n,E,m,o,c,I,S]),_=(0,s.useCallback)((e=>{if(null==b||b(e),n||e.defaultPrevented||e.metaKey)return;if(!l(e.nativeEvent)||E)return;if(c&&" "===e.key){e.preventDefault(),N(!1);e.currentTarget.click()}}),[c,E,n,b]),O=(0,s.useCallback)((e=>{0===e.button&&(N(!1),I.remove(document,"mouseup",O,!1))}),[I]),D=(0,s.useCallback)((e=>{if(0!==e.button)return;if(n)return e.stopPropagation(),void e.preventDefault();E||N(!0);e.currentTarget.focus({preventScroll:!0}),I.add(document,"mouseup",O,!1),null==d||d(e)}),[n,E,d,I,O]),M=(0,s.useCallback)((e=>{0===e.button&&(E||N(!1),null==u||u(e))}),[u,E]),z=(0,s.useCallback)((e=>{n?e.preventDefault():null==h||h(e)}),[n,h]),j=(0,s.useCallback)((e=>{y&&(e.preventDefault(),N(!1)),null==g||g(e)}),[y,g]),P=i(t,(e=>{e&&"BUTTON"!==e.tagName&&x(!1)}));return E?{...v,ref:P,type:"button","aria-disabled":w?void 0:n,disabled:w,onClick:C,onMouseDown:d,onMouseUp:u,onKeyUp:b,onKeyDown:m,onMouseOver:h,onMouseLeave:g}:{...v,ref:P,role:"button","data-active":(0,r.sE)(y),"aria-disabled":n?"true":void 0,tabIndex:w?void 0:k,onClick:C,onMouseDown:D,onMouseUp:M,onKeyUp:_,onKeyDown:T,onMouseOver:z,onMouseLeave:j}}var c=Object.defineProperty,d=(e,t,n)=>(((e,t,n)=>{t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function u(e){return e.sort(((e,t)=>{const n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function f(e,t,n){let a=e+1;return n&&a>=t&&(a=0),a}function m(e,t,n){let a=e-1;return n&&a<0&&(a=t),a}var b="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,p=e=>e,h=class{constructor(){d(this,"descendants",new Map),d(this,"register",(e=>{var t;if(null!=e)return"object"==typeof(t=e)&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE?this.registerNode(e):t=>{this.registerNode(t,e)}})),d(this,"unregister",(e=>{this.descendants.delete(e);const t=u(Array.from(this.descendants.keys()));this.assignIndex(t)})),d(this,"destroy",(()=>{this.descendants.clear()})),d(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),d(this,"count",(()=>this.descendants.size)),d(this,"enabledCount",(()=>this.enabledValues().length)),d(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),d(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),d(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),d(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),d(this,"first",(()=>this.item(0))),d(this,"firstEnabled",(()=>this.enabledItem(0))),d(this,"last",(()=>this.item(this.descendants.size-1))),d(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),d(this,"indexOf",(e=>{var t,n;return e&&null!=(n=null==(t=this.descendants.get(e))?void 0:t.index)?n:-1})),d(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),d(this,"next",((e,t=!0)=>{const n=f(e,this.count(),t);return this.item(n)})),d(this,"nextEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const a=f(this.enabledIndexOf(n.node),this.enabledCount(),t);return this.enabledItem(a)})),d(this,"prev",((e,t=!0)=>{const n=m(e,this.count()-1,t);return this.item(n)})),d(this,"prevEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const a=m(this.enabledIndexOf(n.node),this.enabledCount()-1,t);return this.enabledItem(a)})),d(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const n=u(Array.from(this.descendants.keys()).concat(e));(null==t?void 0:t.disabled)&&(t.disabled=!!t.disabled);const a={node:e,index:-1,...t};this.descendants.set(e,a),this.assignIndex(n)}))}},g=n(61);var[v,E]=(0,g.q)({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});var x=n(1295);var y=n(1117);var[N,I,k,w]=[p(v),()=>p(E()),()=>function(){const e=(0,s.useRef)(new h);return b((()=>()=>e.current.destroy())),e.current}(),e=>function(e){const t=E(),[n,a]=(0,s.useState)(-1),r=(0,s.useRef)(null);b((()=>()=>{r.current&&t.unregister(r.current)}),[]),b((()=>{if(!r.current)return;const e=Number(r.current.dataset.index);n==e||Number.isNaN(e)||a(e)}));const l=p(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(r.current),register:i(l,r)}}(e)];function C(e){var t;const{defaultIndex:n,onChange:a,index:r,isManual:i,isLazy:l,lazyBehavior:o="unmount",orientation:c="horizontal",direction:d="ltr",...u}=e,[f,m]=(0,s.useState)(null!=n?n:0),[b,p]=function(e){const{value:t,defaultValue:n,onChange:a,shouldUpdate:r=((e,t)=>e!==t)}=e,i=(0,x.c)(a),l=(0,x.c)(r),[o,c]=(0,s.useState)(n),d=void 0!==t,u=d?t:o,f=(0,x.c)((e=>{const t="function"==typeof e?e(u):e;l(u,t)&&(d||c(t),i(t))}),[d,i,u,l]);return[u,f]}({defaultValue:null!=n?n:0,value:r,onChange:a});(0,s.useEffect)((()=>{null!=r&&m(r)}),[r]);const h=k(),g=(0,s.useId)();return{id:`tabs-${null!=(t=e.id)?t:g}`,selectedIndex:b,focusedIndex:f,setSelectedIndex:p,setFocusedIndex:m,isManual:i,isLazy:l,lazyBehavior:o,orientation:c,descendants:h,direction:d,htmlProps:u}}var[S,T]=(0,g.q)({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});var[_,O]=(0,g.q)({});function D(e,t){return`${e}--tab-${t}`}function M(e,t){return`${e}--tabpanel-${t}`}var z=n(8855),j=n(7484),P=n(4515),R=n(3720),B=n(4848),[L,A]=(0,g.q)({name:"TabsStylesContext",errorMessage:"useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Tabs />\" "}),F=(0,z.R)((function(e,t){const n=(0,j.o5)("Tabs",e),{children:a,className:i,...l}=(0,P.MN)(e),{htmlProps:o,descendants:c,...d}=C(l),u=(0,s.useMemo)((()=>d),[d]),{isFitted:f,...m}=o,b={position:"relative",...n.root};return(0,B.jsx)(N,{value:c,children:(0,B.jsx)(S,{value:u,children:(0,B.jsx)(L,{value:n,children:(0,B.jsx)(R.B.div,{className:(0,r.cx)("chakra-tabs",i),ref:t,...m,__css:b,children:a})})})})}));F.displayName="Tabs";var U=(0,z.R)((function(e,t){const n=function(e){const{focusedIndex:t,orientation:n,direction:a}=T(),i=I(),l=(0,s.useCallback)((e=>{const s=()=>{var e;const n=i.nextEnabled(t);n&&(null==(e=n.node)||e.focus())},r=()=>{var e;const n=i.prevEnabled(t);n&&(null==(e=n.node)||e.focus())},l="horizontal"===n,o="vertical"===n,c=e.key,d="ltr"===a?"ArrowLeft":"ArrowRight",u="ltr"===a?"ArrowRight":"ArrowLeft",f={[d]:()=>l&&r(),[u]:()=>l&&s(),ArrowDown:()=>o&&s(),ArrowUp:()=>o&&r(),Home:()=>{var e;const t=i.firstEnabled();t&&(null==(e=t.node)||e.focus())},End:()=>{var e;const t=i.lastEnabled();t&&(null==(e=t.node)||e.focus())}}[c];f&&(e.preventDefault(),f(e))}),[i,t,n,a]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:(0,r.Hj)(e.onKeyDown,l)}}({...e,ref:t}),a={display:"flex",...A().tablist};return(0,B.jsx)(R.B.div,{...n,className:(0,r.cx)("chakra-tabs__tablist",e.className),__css:a})}));U.displayName="TabList";var K=(0,z.R)((function(e,t){const n=A(),a=function(e){const{isDisabled:t=!1,isFocusable:n=!1,...a}=e,{setSelectedIndex:s,isManual:l,id:c,setFocusedIndex:d,selectedIndex:u}=T(),{index:f,register:m}=w({disabled:t&&!n}),b=f===u;return{...o({...a,ref:i(m,e.ref),isDisabled:t,isFocusable:n,onClick:(0,r.Hj)(e.onClick,(()=>{s(f)}))}),id:D(c,f),role:"tab",tabIndex:b?0:-1,type:"button","aria-selected":b,"aria-controls":M(c,f),onFocus:t?void 0:(0,r.Hj)(e.onFocus,(()=>{d(f),!l&&(!t||!n)&&s(f)}))}}({...e,ref:t}),s={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...n.tab};return(0,B.jsx)(R.B.button,{...a,className:(0,r.cx)("chakra-tabs__tab",e.className),__css:s})}));K.displayName="Tab";var V=(0,z.R)((function(e,t){const n=function(e){const t=T(),{id:n,selectedIndex:a}=t,r=(0,y.a)(e.children).map(((e,t)=>(0,s.createElement)(_,{key:t,value:{isSelected:t===a,id:M(n,t),tabId:D(n,t),selectedIndex:a}},e)));return{...e,children:r}}(e),a=A();return(0,B.jsx)(R.B.div,{...n,width:"100%",ref:t,className:(0,r.cx)("chakra-tabs__tab-panels",e.className),__css:a.tabpanels})}));V.displayName="TabPanels";var $=(0,z.R)((function(e,t){const n=function(e){const{children:t,...n}=e,{isLazy:a,lazyBehavior:r}=T(),{isSelected:i,id:l,tabId:o}=O(),c=(0,s.useRef)(!1);i&&(c.current=!0);const d=function(e){const{wasSelected:t,enabled:n,isSelected:a,mode:s="unmount"}=e;return!n||!!a||!("keepMounted"!==s||!t)}({wasSelected:c.current,isSelected:i,enabled:a,mode:r});return{tabIndex:0,...n,children:d?t:null,role:"tabpanel","aria-labelledby":o,hidden:!i,id:l}}({...e,ref:t}),a=A();return(0,B.jsx)(R.B.div,{outline:"0",...n,className:(0,r.cx)("chakra-tabs__tab-panel",e.className),__css:a.tabpanel})}));$.displayName="TabPanel";var G=n(3674),H=n(4399),q=n(4794),W=n(7500),Y=n(8539),J=n(4194),X=n(6287),Q=(0,z.R)((function(e,t){const n=(0,j.Vl)("Heading",e),{className:a,...s}=(0,P.MN)(e);return(0,B.jsx)(R.B.h2,{ref:t,className:(0,r.cx)("chakra-heading",e.className),...s,__css:n})}));Q.displayName="Heading";var Z=n(2532);const ee=e=>{let{posts:t}=e;return 0===t.length?s.createElement(W.E,null,"No blog posts found."):s.createElement(Y.T,{spacing:8,paddingTop:4,alignItems:"flex-start"},t.map((e=>s.createElement(J.z,{spacing:4,key:e.fields.name},s.createElement(X.az,{minWidth:120,height:120},s.createElement(Z.G,{objectFit:"cover",image:(0,Z.c)(e.icon.childImageSharp),alt:"Caffe Latte"})),s.createElement(Y.T,{spacing:0,align:"flex-start"},s.createElement(q.Link,{to:e.fields.slug},s.createElement(Q,{fontSize:26,marginY:0},e.frontmatter.title)),s.createElement(W.E,{fontSize:14,marginBottom:2},e.frontmatter.date),s.createElement(W.E,{fontSize:15,marginBottom:0},e.frontmatter.description||e.excerpt))))))},te=e=>{let{images:t}=e;return 0===t.length?s.createElement(W.E,null,"No blog images found."):s.createElement(Y.T,{spacing:8,paddingTop:4},t.map((e=>s.createElement(J.z,{spacing:4,key:e.fields.name},s.createElement(X.az,{minWidth:120,height:120},s.createElement(Z.G,{objectFit:"cover",image:(0,Z.c)(e.icon.childImageSharp),alt:"Caffe Latte"})),s.createElement(Y.T,{spacing:0,align:"flex-start"},s.createElement(q.Link,{to:e.fields.slug},s.createElement(Q,{fontSize:26,marginY:0},e.frontmatter.title)),s.createElement(W.E,{fontSize:14,marginBottom:2},e.frontmatter.date),s.createElement(W.E,{fontSize:15,marginBottom:0},e.frontmatter.description||e.excerpt))))))};var ne=e=>{var t;let{data:n,location:r}=e;const i=(null===(t=n.site.siteMetadata)||void 0===t?void 0:t.title)||"Title",l=n.allMarkdownRemark.nodes.filter((e=>"blog"===e.fields.type)).reduce(((e,t)=>{const s=t.fields.name,r=n.allFile.nodes.find((e=>e.childImageSharp&&e.childImageSharp.fixed.originalName===`${s}-icon.png`));return[].concat((0,a.A)(e),[{...t,icon:r}])}),[]),o=n.allMarkdownRemark.nodes.filter((e=>"gallery"===e.fields.type)).reduce(((e,t)=>{const s=n.allFile.nodes,r=t.fields.name,i=s.find((e=>e.childImageSharp&&e.childImageSharp.fixed.originalName===`${r}-icon.png`)),l=s.filter((e=>"md"!==e.extension&&e.relativeDirectory===r));return[].concat((0,a.A)(e),[{...t,images:l,icon:i}])}),[]);return s.createElement(H.P,{location:r,title:i},s.createElement(G.z,null),s.createElement(F,{isFitted:!0,defaultIndex:0},s.createElement(U,null,s.createElement(K,null,"Posts"),s.createElement(K,null,"Gallery"),s.createElement(K,null,"Recipes")),s.createElement(V,null,s.createElement($,null,s.createElement(ee,{posts:l})),s.createElement($,null,s.createElement(te,{images:o})),s.createElement($,null,"No recipes yet"))))}},8539:function(e,t,n){n.d(t,{T:function(){return i}});var a=n(4765),s=n(8855),r=n(4848),i=(0,s.R)(((e,t)=>(0,r.jsx)(a.B,{align:"center",...e,direction:"column",ref:t})));i.displayName="VStack"},6287:function(e,t,n){n.d(t,{az:function(){return i}});var a=n(3720),s=n(8855),r=n(4848),i=(0,a.B)("div");i.displayName="Box";var l=(0,s.R)((function(e,t){const{size:n,centerContent:a=!0,...s}=e,l=a?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,r.jsx)(i,{ref:t,boxSize:n,__css:{...l,flexShrink:0,flexGrow:0},...s})}));l.displayName="Square",(0,s.R)((function(e,t){const{size:n,...a}=e;return(0,r.jsx)(l,{size:n,ref:t,borderRadius:"9999px",...a})})).displayName="Circle"},838:function(e){e.exports=JSON.parse('{"layout":"fixed","backgroundColor":"#d8d8d8","images":{"fallback":{"src":"/static/6ef968cfebb62e6eda1d4c39e3772686/839ae/profile-pic.jpg","srcSet":"/static/6ef968cfebb62e6eda1d4c39e3772686/839ae/profile-pic.jpg 200w,\\n/static/6ef968cfebb62e6eda1d4c39e3772686/10998/profile-pic.jpg 400w","sizes":"200px"},"sources":[{"srcSet":"/static/6ef968cfebb62e6eda1d4c39e3772686/73fca/profile-pic.avif 200w,\\n/static/6ef968cfebb62e6eda1d4c39e3772686/44a11/profile-pic.avif 400w","type":"image/avif","sizes":"200px"},{"srcSet":"/static/6ef968cfebb62e6eda1d4c39e3772686/8b00d/profile-pic.webp 200w,\\n/static/6ef968cfebb62e6eda1d4c39e3772686/9c0a1/profile-pic.webp 400w","type":"image/webp","sizes":"200px"}]},"width":200,"height":200}')}}]);
//# sourceMappingURL=component---src-pages-index-tsx-5f800bdf3df359eccef5.js.map