From f15aaf004c76597d4d536a54358b0431d31fcbfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 10 Jun 2023 12:12:42 +0000 Subject: chore: autopublish 2023-06-10T12:12:42Z --- public/404.html | 4 ++-- public/404/index.html | 4 ++-- public/_gatsby/slices/_gatsby-scripts-1.html | 4 ++-- public/chunk-map.json | 2 +- ...nt---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js | 2 ++ ...-src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js.map | 1 + ...nt---src-pages-index-tsx-65669e05723cb198d13a.js | 2 -- ...-src-pages-index-tsx-65669e05723cb198d13a.js.map | 1 - public/index.html | 6 +++--- public/offline-plugin-app-shell-fallback/index.html | 4 ++-- public/page-data/app-data.json | 2 +- .../6cac9/main.webp | Bin 13662 -> 13260 bytes .../81e0da73927123f3f6b0c9a2d0750e76/88e48/main.png | Bin 45457 -> 43415 bytes public/sw.js | 4 ++-- public/webpack-runtime-35d8c1a6af96b929bd9e.js | 2 -- public/webpack-runtime-35d8c1a6af96b929bd9e.js.map | 1 - public/webpack-runtime-c256ae552c0ea2a39ac8.js | 2 ++ public/webpack-runtime-c256ae552c0ea2a39ac8.js.map | 1 + public/webpack.stats.json | 2 +- 19 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 public/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js create mode 100644 public/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js.map delete mode 100644 public/component---src-pages-index-tsx-65669e05723cb198d13a.js delete mode 100644 public/component---src-pages-index-tsx-65669e05723cb198d13a.js.map delete mode 100644 public/webpack-runtime-35d8c1a6af96b929bd9e.js delete mode 100644 public/webpack-runtime-35d8c1a6af96b929bd9e.js.map create mode 100644 public/webpack-runtime-c256ae552c0ea2a39ac8.js create mode 100644 public/webpack-runtime-c256ae552c0ea2a39ac8.js.map (limited to 'public') diff --git a/public/404.html b/public/404.html index 9c9f3f4..a023af6 100644 --- a/public/404.html +++ b/public/404.html @@ -21,6 +21,6 @@ data-styled.g5[id="Footer-sc-1as233t-0"]{content:"hgjbyt,"}/*!sc*/ - \ No newline at end of file + \ No newline at end of file diff --git a/public/404/index.html b/public/404/index.html index ee7d65b..130937f 100644 --- a/public/404/index.html +++ b/public/404/index.html @@ -21,6 +21,6 @@ data-styled.g5[id="Footer-sc-1as233t-0"]{content:"hgjbyt,"}/*!sc*/ - \ No newline at end of file + \ No newline at end of file diff --git a/public/_gatsby/slices/_gatsby-scripts-1.html b/public/_gatsby/slices/_gatsby-scripts-1.html index 441d169..d3c92c3 100644 --- a/public/_gatsby/slices/_gatsby-scripts-1.html +++ b/public/_gatsby/slices/_gatsby-scripts-1.html @@ -2,6 +2,6 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/chunk-map.json b/public/chunk-map.json index 2623cbe..9ae266c 100644 --- a/public/chunk-map.json +++ b/public/chunk-map.json @@ -1 +1 @@ -{"app":["/app-25a4415cb264cacf65c0.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js"],"component---src-pages-404-tsx":["/component---src-pages-404-tsx-87731b18d61c4e913caf.js"],"component---src-pages-index-tsx":["/component---src-pages-index-tsx-65669e05723cb198d13a.js"]} \ No newline at end of file +{"app":["/app-25a4415cb264cacf65c0.js"],"component---cache-caches-gatsby-plugin-offline-app-shell-js":["/component---cache-caches-gatsby-plugin-offline-app-shell-js-56599e2012c5599fcb23.js"],"component---src-pages-404-tsx":["/component---src-pages-404-tsx-87731b18d61c4e913caf.js"],"component---src-pages-index-tsx":["/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js"]} \ No newline at end of file diff --git a/public/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js b/public/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js new file mode 100644 index 0000000..449307c --- /dev/null +++ b/public/component---src-pages-index-tsx-5d85d69d3d1b5bbb1e8f.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunksubmelon_dev=self.webpackChunksubmelon_dev||[]).push([[691],{3204:function(e){const t=/[\p{Lu}]/u,n=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,a=/([\p{Alpha}\p{N}_]|$)/u,i=/[_.\- ]+/,o=new RegExp("^"+i.source),l=new RegExp(i.source+a.source,"gu"),s=new RegExp("\\d+"+a.source,"gu"),c=(e,a)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(a={pascalCase:!1,preserveConsecutiveUppercase:!1,...a},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const i=!1===a.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(a.locale),c=!1===a.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(a.locale);if(1===e.length)return a.pascalCase?c(e):i(e);return e!==i(e)&&(e=((e,r,a)=>{let i=!1,o=!1,l=!1;for(let s=0;s(r.lastIndex=0,e.replace(r,(e=>t(e)))))(e,i):i(e),a.pascalCase&&(e=c(e.charAt(0))+e.slice(1)),((e,t)=>(l.lastIndex=0,s.lastIndex=0,e.replace(l,((e,n)=>t(n))).replace(s,(e=>t(e)))))(e,c)};e.exports=c,e.exports.default=c},8032:function(e,t,n){n.d(t,{L:function(){return g},M:function(){return k},P:function(){return E},S:function(){return B},_:function(){return l},a:function(){return o},b:function(){return u},g:function(){return d},h:function(){return s}});var r=n(7294),a=(n(3204),n(5697)),i=n.n(a);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}const s=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;function c(e,t,n){const r={};let a="gatsby-image-wrapper";return"fixed"===n?(r.width=e,r.height=t):"constrained"===n&&(a="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:a,"data-gatsby-image-wrapper":"",style:r}}function u(e,t,n,r,a){return void 0===a&&(a={}),o({},n,{loading:r,shouldLoad:e,"data-main-image":"",style:o({},a,{opacity:t?1:0})})}function d(e,t,n,r,a,i,l,s){const c={};i&&(c.backgroundColor=i,"fixed"===n?(c.width=r,c.height=a,c.backgroundColor=i,c.position="relative"):("constrained"===n||"fullWidth"===n)&&(c.position="absolute",c.top=0,c.left=0,c.bottom=0,c.right=0)),l&&(c.objectFit=l),s&&(c.objectPosition=s);const u=o({},e,{"aria-hidden":!0,"data-placeholder-image":"",style:o({opacity:t?0:1,transition:"opacity 500ms linear"},c)});return u}const p=["children"],m=function(e){let{layout:t,width:n,height:a}=e;return"fullWidth"===t?r.createElement("div",{"aria-hidden":!0,style:{paddingTop:a/n*100+"%"}}):"constrained"===t?r.createElement("div",{style:{maxWidth:n,display:"block"}},r.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:"data:image/svg+xml;charset=utf-8,%3Csvg%20height='"+a+"'%20width='"+n+"'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E",style:{maxWidth:"100%",display:"block",position:"static"}})):null},g=function(e){let{children:t}=e,n=l(e,p);return r.createElement(r.Fragment,null,r.createElement(m,o({},n)),t,null)},f=["src","srcSet","loading","alt","shouldLoad"],h=["fallback","sources","shouldLoad"],y=function(e){let{src:t,srcSet:n,loading:a,alt:i="",shouldLoad:s}=e,c=l(e,f);return r.createElement("img",o({},c,{decoding:"async",loading:a,src:s?t:void 0,"data-src":s?void 0:t,srcSet:s?n:void 0,"data-srcset":s?void 0:n,alt:i}))},b=function(e){let{fallback:t,sources:n=[],shouldLoad:a=!0}=e,i=l(e,h);const s=i.sizes||(null==t?void 0:t.sizes),c=r.createElement(y,o({},i,t,{sizes:s,shouldLoad:a}));return n.length?r.createElement("picture",null,n.map((e=>{let{media:t,srcSet:n,type:i}=e;return r.createElement("source",{key:t+"-"+i+"-"+n,type:i,media:t,srcSet:a?n:void 0,"data-srcset":a?void 0:n,sizes:s})})),c):c};var w;y.propTypes={src:a.string.isRequired,alt:a.string.isRequired,sizes:a.string,srcSet:a.string,shouldLoad:a.bool},b.displayName="Picture",b.propTypes={alt:a.string.isRequired,shouldLoad:a.bool,fallback:a.exact({src:a.string.isRequired,srcSet:a.string,sizes:a.string}),sources:a.arrayOf(a.oneOfType([a.exact({media:a.string.isRequired,type:a.string,sizes:a.string,srcSet:a.string.isRequired}),a.exact({media:a.string,type:a.string.isRequired,sizes:a.string,srcSet:a.string.isRequired})]))};const v=["fallback"],E=function(e){let{fallback:t}=e,n=l(e,v);return t?r.createElement(b,o({},n,{fallback:{src:t},"aria-hidden":!0,alt:""})):r.createElement("div",o({},n))};E.displayName="Placeholder",E.propTypes={fallback:a.string,sources:null==(w=b.propTypes)?void 0:w.sources,alt:function(e,t,n){return e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null}};const k=function(e){return r.createElement(r.Fragment,null,r.createElement(b,o({},e)),r.createElement("noscript",null,r.createElement(b,o({},e,{shouldLoad:!0}))))};k.displayName="MainImage",k.propTypes=b.propTypes;const x=["as","className","class","style","image","loading","imgClassName","imgStyle","backgroundColor","objectFit","objectPosition"],C=["style","className"],S=e=>e.replace(/\n/g,""),A=function(e,t,n){for(var r=arguments.length,a=new Array(r>3?r-3:0),o=3;oJSON.stringify(a.images)),[a.images]);p&&(d=p);const A=function(e,t,n){let r="";return"fullWidth"===e&&(r=''),"constrained"===e&&(r='
"),r}(w,y,b);return(0,r.useEffect)((()=>{O||(O=n.e(731).then(n.bind(n,6731)).then((e=>{let{renderImageToString:t,swapPlaceholderImage:n}=e;return T=t,{renderImageToString:t,swapPlaceholderImage:n}})));const e=C.current.querySelector("[data-gatsby-image-ssr]");if(e&&s())return e.complete?(null==m||m({wasCached:!0}),null==g||g({wasCached:!0}),setTimeout((()=>{e.removeAttribute("data-gatsby-image-ssr")}),0)):(null==m||m({wasCached:!0}),e.addEventListener("load",(function t(){e.removeEventListener("load",t),null==g||g({wasCached:!0}),setTimeout((()=>{e.removeAttribute("data-gatsby-image-ssr")}),0)}))),void j.add(S);if(T&&j.has(S))return;let t,r;return O.then((e=>{let{renderImageToString:n,swapPlaceholderImage:l}=e;C.current&&(C.current.innerHTML=n(o({isLoading:!0,isLoaded:j.has(S),image:a},h)),j.has(S)||(t=requestAnimationFrame((()=>{C.current&&(r=l(C.current,S,j,i,m,g,f))}))))})),()=>{t&&cancelAnimationFrame(t),r&&r()}}),[a]),(0,r.useLayoutEffect)((()=>{j.has(S)&&T&&(C.current.innerHTML=T(o({isLoading:j.has(S),isLoaded:j.has(S),image:a},h)),null==m||m({wasCached:!0}),null==g||g({wasCached:!0}))}),[a]),(0,r.createElement)(t,o({},x,{style:o({},E,i,{backgroundColor:u}),className:k+(d?" "+d:""),ref:C,dangerouslySetInnerHTML:{__html:A},suppressHydrationWarning:!0}))},R=(0,r.memo)((function(e){return e.image?(0,r.createElement)(M,e):null}));R.propTypes=I,R.displayName="GatsbyImage";const z=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"];function H(e){return function(t){let{src:n,__imageData:a,__error:i}=t,s=l(t,z);return i&&console.warn(i),a?r.createElement(e,o({image:a},s)):(console.warn("Image not loaded",n),null)}}const P=H((function(e){let{as:t="div",className:n,class:a,style:i,image:s,loading:p="lazy",imgClassName:m,imgStyle:f,backgroundColor:h,objectFit:y,objectPosition:b}=e,w=l(e,x);if(!s)return console.warn("[gatsby-plugin-image] Missing image prop"),null;a&&(n=a),f=o({objectFit:y,objectPosition:b,backgroundColor:h},f);const{width:v,height:A,layout:I,images:N,placeholder:L,backgroundColor:j}=s,O=c(v,A,I),{style:T,className:M}=O,R=l(O,C),z={fallback:void 0,sources:[]};return N.fallback&&(z.fallback=o({},N.fallback,{srcSet:N.fallback.srcSet?S(N.fallback.srcSet):void 0})),N.sources&&(z.sources=N.sources.map((e=>o({},e,{srcSet:S(e.srcSet)})))),r.createElement(t,o({},R,{style:o({},T,i,{backgroundColor:h}),className:M+(n?" "+n:"")}),r.createElement(g,{layout:I,width:v,height:A},r.createElement(E,o({},d(L,!1,I,v,A,j,y,b))),r.createElement(k,o({"data-gatsby-image-ssr":"",className:m},w,u("eager"===p,!1,z,p,f)))))})),F=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a{if(void 0!==e.layout&&!V.has(e.layout))return new Error("Invalid value "+e.layout+'" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".')}};P.displayName="StaticImage",P.propTypes=W;const B=H(R);B.displayName="StaticImage",B.propTypes=W},4690:function(e,t,n){n.d(t,{F:function(){return i}});var r=n(7294),a=n(1980);function i(){const{author:e,description:t,title:n}=(0,a.$)();return r.createElement(r.Fragment,null,r.createElement("meta",{name:"twitter:description",content:null!=t?t:""}),r.createElement("meta",{name:"twitter:title",content:null!=n?n:""}),r.createElement("meta",{name:"twitter:creator",content:null!=e?e:""}),r.createElement("meta",{name:"twitter:card",content:"summary"}),r.createElement("meta",{name:"description",content:null!=t?t:""}),r.createElement("title",null,n))}},955:function(e,t,n){n.d(t,{y:function(){return i},A:function(){return u}});var r=n(7294),a=n(1693);var i=e=>{let{children:t,...n}=e;return r.createElement(a.gp,{theme:{link:!0}},r.createElement(a.Jo,n,t))},o=n(4405),l=n(1980);const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");function c(e){let t="";for(;e>0;)t=s[e%62]+t,e=Math.floor(e/62);return t}var u=e=>{let{children:t}=e;const n=(0,l.w)();return r.createElement(r.StrictMode,null,r.createElement("main",null,r.createElement(o.Pd.Provider,{value:{size:"20",style:{marginBottom:"-4px"}}},r.createElement(a.VY,null,t),r.createElement(a.$_,null,r.createElement("span",null,"©2023 kjhoerr@https://submelon.dev/:",function(e){const t=new Date(1e3*e);return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()].map(c).join(".")+"-0"}(Number(n)))))))}},1980:function(e,t,n){n.d(t,{$:function(){return a},w:function(){return i}});var r=n(1883);const a=()=>{var e;const{site:t}=(0,r.useStaticQuery)("1151343463");return null!==(e=null==t?void 0:t.siteMetadata)&&void 0!==e?e:{}},i=()=>{var e,t;const{site:n}=(0,r.useStaticQuery)("3317292869");return null!==(e=null==n||null===(t=n.siteMetadata)||void 0===t?void 0:t.version)&&void 0!==e?e:"0"}},7200:function(e,t,n){n.r(t),n.d(t,{Head:function(){return s.F}});var r=n(7294),a=n(8032),i=n(9583),o=n(955),l=n(1693),s=n(4690);t.default=()=>r.createElement(o.A,null,r.createElement("div",null,r.createElement(a.S,{src:"../images/main.png",alt:"Picture of Kevin Hoerr",placeholder:"blurred",layout:"fixed",width:350,height:350,__imageData:n(2252)})),r.createElement(l.ti,null,"Hello!"),r.createElement(l.gp,null,r.createElement("p",null,"I'm a computer science and math graduate from Millersville University. I work as a Solutions Architect and specialize in development operations and systems validation for web applications."),r.createElement("p",null,"During my time at Millersville I was the lead Linux admin for the Cyber Defense Organization (CDO). In addition to constructing a new computer lab for our efforts, we participated in NCL and MACCDC."),r.createElement("p",null,"Most of my development experience is focused around full stack development. For the front-end I use TypeScript and ReactJS using create-react-app or NextJS. For back-end systems I have used both Java with Spring Boot and rust with actix-web extensively. To mediate APIs I have used Apache Kafka, OpenAPI, and GraphQL."),r.createElement("p",null,"My free time is spent engaging in general computing hobbies. When I'm not trying out new application frameworks, I am fiddling around with Guix or NixOS. I run a kubernetes cluster at home to manage, maintain, and secure my personal network as well as experimenting with distributed workloads."),r.createElement("em",null,"- Kevin H.")),r.createElement(o.y,{href:"https://github.com/kjhoerr",rel:"me","aria-label":"My GitHub account with my most active personal projects"},r.createElement(i.hJX,null)," kjhoerr on GitHub"),r.createElement(o.y,{href:"https://github.com/kjhoerr/pantry","aria-label":"Source code repository of Kevin's current pet project Pantry"},r.createElement(i.tvD,null)," Pantry (pet project)"),r.createElement(o.y,{href:"https://cybr.es/@kjhoerr",rel:"me","aria-label":"My Mastodon account"},r.createElement(i.WJp,null)," @kjhoerr@cybr.es"))},1693:function(e,t,n){n.d(t,{Jo:function(){return a},gp:function(){return i},ti:function(){return o},VY:function(){return l},$_:function(){return s}});var r=n(2788),a=r.default.a.withConfig({displayName:"BlockAnchor",componentId:"sc-49dv1p-0"})(["padding:8px;width:328px;display:block;text-align:center;-webkit-text-decoration:none;text-decoration:none;color:#666;&:visited,&:active{padding:8px;width:328px;display:block;text-align:center;-webkit-text-decoration:none;text-decoration:none;color:#666;}"]),i=r.default.div.withConfig({displayName:"BlockBody",componentId:"sc-13lvm6o-0"})(["& + &{margin-top:3px;}background-color:#fff;border:1px #000 solid;border-left:3px #000 solid;border-right:3px #000 solid;padding:",";& > ","{&:hover{background-color:#ddd;color:#222;}}&:last-child,&:last-child > ","{border-bottom-left-radius:18px;border-bottom-right-radius:18px;}"],(e=>e.theme.link?"0":"4px 8px"),a,a),o=r.default.div.withConfig({displayName:"BlockHeader",componentId:"sc-1tkpfhe-0"})(["background-color:#000;width:100%;text-align:center;color:#fff;font-size:36px;font-weight:bold;margin-top:3px;padding-top:4px;"]),l=r.default.div.withConfig({displayName:"Content",componentId:"sc-1nsqces-0"})(["width:350px;margin:0px auto;margin-bottom:120px;padding-top:136px;"]),s=r.default.div.withConfig({displayName:"Footer",componentId:"sc-1as233t-0"})(["width:100%;position:fixed;left:0px;bottom:0px;text-align:center;font-size:12px;span{background-color:#e1e1e1;}"])},4405:function(e,t,n){n.d(t,{w_:function(){return c},Pd:function(){return i}});var r=n(7294),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=r.createContext&&r.createContext(a),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","import camelCase from \"camelcase\"\nimport type { IGatsbyImageData } from \"./index\"\n\nconst DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]\nexport const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]\nexport const EVERY_BREAKPOINT = [\n 320, 654, 768, 1024, 1366, 1600, 1920, 2048, 2560, 3440, 3840, 4096,\n]\nconst DEFAULT_FLUID_WIDTH = 800\nconst DEFAULT_FIXED_WIDTH = 800\nconst DEFAULT_ASPECT_RATIO = 4 / 3\n\nexport type Fit = \"cover\" | \"fill\" | \"inside\" | \"outside\" | \"contain\"\n\nexport type Layout = \"fixed\" | \"fullWidth\" | \"constrained\"\nexport type ImageFormat = \"jpg\" | \"png\" | \"webp\" | \"avif\" | \"auto\" | \"\"\n\n/**\n * The minimal required reporter, as we don't want to import it from gatsby-cli\n */\nexport interface IReporter {\n warn(message: string): void\n}\n\nexport interface ISharpGatsbyImageArgs {\n layout?: Layout\n formats?: Array\n placeholder?: \"tracedSVG\" | \"dominantColor\" | \"blurred\" | \"none\"\n tracedSVGOptions?: Record\n width?: number\n height?: number\n aspectRatio?: number\n sizes?: string\n quality?: number\n transformOptions?: {\n fit?: Fit\n cropFocus?: number | string\n duotone?: {\n highlight: string\n shadow: string\n opacity?: number\n }\n grayscale?: boolean\n rotate?: number\n trim?: number\n }\n jpgOptions?: Record\n pngOptions?: Record\n webpOptions?: Record\n avifOptions?: Record\n blurredOptions?: { width?: number; toFormat?: ImageFormat }\n breakpoints?: Array\n outputPixelDensities?: Array\n backgroundColor?: string\n}\n\nexport interface IImageSizeArgs {\n width?: number\n height?: number\n layout?: Layout\n filename: string\n outputPixelDensities?: Array\n breakpoints?: Array\n fit?: Fit\n reporter?: IReporter\n sourceMetadata: { width: number; height: number }\n}\n\nexport interface IImageSizes {\n sizes: Array\n presentationWidth: number\n presentationHeight: number\n aspectRatio: number\n unscaledWidth: number\n}\n\nexport interface IImage {\n src: string\n width: number\n height: number\n format: ImageFormat\n}\n\nexport interface IGatsbyImageHelperArgs {\n pluginName: string\n generateImageSource: (\n filename: string,\n width: number,\n height: number,\n format: ImageFormat,\n fit?: Fit,\n options?: Record\n ) => IImage\n layout?: Layout\n formats?: Array\n filename: string\n placeholderURL?: string\n width?: number\n height?: number\n sizes?: string\n reporter?: IReporter\n sourceMetadata?: { width: number; height: number; format: ImageFormat }\n fit?: Fit\n options?: Record\n breakpoints?: Array\n backgroundColor?: string\n aspectRatio?: number\n}\n\nconst warn = (message: string): void => console.warn(message)\n\nconst sortNumeric = (a: number, b: number): number => a - b\n\nexport const getSizes = (width: number, layout: Layout): string | undefined => {\n switch (layout) {\n // If screen is wider than the max size, image width is the max size,\n // otherwise it's the width of the screen\n case `constrained`:\n return `(min-width: ${width}px) ${width}px, 100vw`\n\n // Image is always the same width, whatever the size of the screen\n case `fixed`:\n return `${width}px`\n\n // Image is always the width of the screen\n case `fullWidth`:\n return `100vw`\n\n default:\n return undefined\n }\n}\n\nexport const getSrcSet = (images: Array): string =>\n images.map(image => `${image.src} ${image.width}w`).join(`,\\n`)\n\nexport function formatFromFilename(filename: string): ImageFormat | undefined {\n const dot = filename.lastIndexOf(`.`)\n if (dot !== -1) {\n const ext = filename.slice(dot + 1)\n if (ext === `jpeg`) {\n return `jpg`\n }\n if (ext.length === 3 || ext.length === 4) {\n return ext as ImageFormat\n }\n }\n return undefined\n}\n\nexport function setDefaultDimensions(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageHelperArgs {\n let {\n layout = `constrained`,\n width,\n height,\n sourceMetadata,\n breakpoints,\n aspectRatio,\n formats = [`auto`, `webp`],\n } = args\n formats = formats.map(format => format.toLowerCase() as ImageFormat)\n layout = camelCase(layout) as Layout\n\n if (width && height) {\n return { ...args, formats, layout, aspectRatio: width / height }\n }\n if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {\n aspectRatio = sourceMetadata.width / sourceMetadata.height\n }\n\n if (layout === `fullWidth`) {\n width = width || sourceMetadata.width || breakpoints[breakpoints.length - 1]\n height = height || Math.round(width / (aspectRatio || DEFAULT_ASPECT_RATIO))\n } else {\n if (!width) {\n if (height && aspectRatio) {\n width = height * aspectRatio\n } else if (sourceMetadata.width) {\n width = sourceMetadata.width\n } else if (height) {\n width = Math.round(height / DEFAULT_ASPECT_RATIO)\n } else {\n width = DEFAULT_FIXED_WIDTH\n }\n }\n\n if (aspectRatio && !height) {\n height = Math.round(width / aspectRatio)\n } else if (!aspectRatio) {\n aspectRatio = width / height\n }\n }\n return { ...args, width, height, aspectRatio, layout, formats }\n}\n\n/**\n * Use this for getting an image for the blurred placeholder. This ensures the\n * aspect ratio and crop match the main image\n */\nexport function getLowResolutionImageURL(\n args: IGatsbyImageHelperArgs,\n width = 20\n): string {\n args = setDefaultDimensions(args)\n const { generateImageSource, filename, aspectRatio } = args\n return generateImageSource(\n filename,\n width,\n Math.round(width / aspectRatio),\n args.sourceMetadata.format || `jpg`,\n args.fit,\n args.options\n )?.src\n}\n\nexport function generateImageData(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageData {\n args = setDefaultDimensions(args)\n\n let {\n pluginName,\n sourceMetadata,\n generateImageSource,\n layout,\n fit,\n options,\n width,\n height,\n filename,\n reporter = { warn },\n backgroundColor,\n placeholderURL,\n } = args\n\n if (!pluginName) {\n reporter.warn(\n `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n )\n }\n\n if (typeof generateImageSource !== `function`) {\n throw new Error(`generateImageSource must be a function`)\n }\n\n if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n // No metadata means we let the CDN handle max size etc, aspect ratio etc\n sourceMetadata = {\n width,\n height,\n format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n }\n } else if (!sourceMetadata.format) {\n sourceMetadata.format = formatFromFilename(filename)\n }\n\n const formats = new Set(args.formats)\n\n if (formats.size === 0 || formats.has(`auto`) || formats.has(``)) {\n formats.delete(`auto`)\n formats.delete(``)\n formats.add(sourceMetadata.format)\n }\n\n if (formats.has(`jpg`) && formats.has(`png`)) {\n reporter.warn(\n `[${pluginName}] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead`\n )\n if (sourceMetadata.format === `jpg`) {\n formats.delete(`png`)\n } else {\n formats.delete(`jpg`)\n }\n }\n\n const imageSizes = calculateImageSizes({ ...args, sourceMetadata })\n\n const result: IGatsbyImageData[\"images\"] = {\n sources: [],\n }\n\n let sizes = args.sizes\n if (!sizes) {\n sizes = getSizes(imageSizes.presentationWidth, layout)\n }\n\n formats.forEach(format => {\n const images = imageSizes.sizes\n .map(size => {\n const imageSrc = generateImageSource(\n filename,\n size,\n Math.round(size / imageSizes.aspectRatio),\n format,\n fit,\n options\n )\n if (\n !imageSrc?.width ||\n !imageSrc.height ||\n !imageSrc.src ||\n !imageSrc.format\n ) {\n reporter.warn(\n `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n )\n return undefined\n }\n return imageSrc\n })\n .filter(Boolean)\n\n if (format === `jpg` || format === `png` || format === `auto`) {\n const unscaled =\n images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n if (unscaled) {\n result.fallback = {\n src: unscaled.src,\n srcSet: getSrcSet(images),\n sizes,\n }\n }\n } else {\n result.sources?.push({\n srcSet: getSrcSet(images),\n sizes,\n type: `image/${format}`,\n })\n }\n })\n\n const imageProps: Partial = {\n images: result,\n layout,\n backgroundColor,\n }\n\n if (placeholderURL) {\n imageProps.placeholder = { fallback: placeholderURL }\n }\n\n switch (layout) {\n case `fixed`:\n imageProps.width = imageSizes.presentationWidth\n imageProps.height = imageSizes.presentationHeight\n break\n\n case `fullWidth`:\n imageProps.width = 1\n imageProps.height = 1 / imageSizes.aspectRatio\n break\n\n case `constrained`:\n imageProps.width = args.width || imageSizes.presentationWidth || 1\n imageProps.height = (imageProps.width || 1) / imageSizes.aspectRatio\n }\n\n return imageProps as IGatsbyImageData\n}\n\nconst dedupeAndSortDensities = (values: Array): Array =>\n Array.from(new Set([1, ...values])).sort(sortNumeric)\n\nexport function calculateImageSizes(args: IImageSizeArgs): IImageSizes {\n const {\n width,\n height,\n filename,\n layout = `constrained`,\n sourceMetadata: imgDimensions,\n reporter = { warn },\n breakpoints = DEFAULT_BREAKPOINTS,\n } = args\n\n // check that all dimensions provided are positive\n const userDimensions = { width, height }\n const erroneousUserDimensions = Object.entries(userDimensions).filter(\n ([_, size]) => typeof size === `number` && size < 1\n )\n if (erroneousUserDimensions.length) {\n throw new Error(\n `Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are ${erroneousUserDimensions\n .map(dim => dim.join(`: `))\n .join(`, `)}`\n )\n }\n\n if (layout === `fixed`) {\n return fixedImageSizes(args)\n } else if (layout === `constrained`) {\n return responsiveImageSizes(args)\n } else if (layout === `fullWidth`) {\n return responsiveImageSizes({ breakpoints, ...args })\n } else {\n reporter.warn(\n `No valid layout was provided for the image at ${filename}. Valid image layouts are fixed, fullWidth, and constrained. Found ${layout}`\n )\n return {\n sizes: [imgDimensions.width],\n presentationWidth: imgDimensions.width,\n presentationHeight: imgDimensions.height,\n aspectRatio: imgDimensions.width / imgDimensions.height,\n unscaledWidth: imgDimensions.width,\n }\n }\n}\nexport function fixedImageSizes({\n filename,\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n reporter = { warn },\n}: IImageSizeArgs): IImageSizes {\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n if (!width) {\n if (!height) {\n width = DEFAULT_FIXED_WIDTH\n } else {\n width = Math.round(height * aspectRatio)\n }\n } else if (!height) {\n height = Math.round(width / aspectRatio)\n }\n\n const originalWidth = width // will use this for presentationWidth, don't want to lose it\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n\n // If the image is smaller than requested, warn the user that it's being processed as such\n // print out this message with the necessary information before we overwrite it for sizing\n if (isTopSizeOverriden) {\n const fixedDimension = imgDimensions.width < width ? `width` : `height`\n reporter.warn(`\nThe requested ${fixedDimension} \"${\n fixedDimension === `width` ? width : height\n }px\" for the image ${filename} was larger than the actual image ${fixedDimension} of ${\n imgDimensions[fixedDimension]\n }px. If possible, replace the current image with a larger one.`)\n\n if (fixedDimension === `width`) {\n width = imgDimensions.width\n height = Math.round(width / aspectRatio)\n } else {\n height = imgDimensions.height\n width = height * aspectRatio\n }\n }\n\n const sizes = densities\n .filter(size => size >= 1) // remove smaller densities because fixed images don't need them\n .map(density => Math.round(density * (width as number)))\n .filter(size => size <= imgDimensions.width)\n\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function responsiveImageSizes({\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n breakpoints,\n layout,\n}: IImageSizeArgs): IImageSizes {\n let sizes\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n // Case 1: width of height were passed in, make sure it isn't larger than the actual image\n width = width && Math.min(width, imgDimensions.width)\n height = height && Math.min(height, imgDimensions.height)\n\n // Case 2: neither width or height were passed in, use default size\n if (!width && !height) {\n width = Math.min(DEFAULT_FLUID_WIDTH, imgDimensions.width)\n height = width / aspectRatio\n }\n\n // if it still hasn't been found, calculate width from the derived height.\n // TS isn't smart enough to realise the type for height has been narrowed here\n if (!width) {\n width = (height as number) * aspectRatio\n }\n\n const originalWidth = width\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n if (isTopSizeOverriden) {\n width = imgDimensions.width\n height = imgDimensions.height\n }\n\n width = Math.round(width)\n\n if (breakpoints?.length > 0) {\n sizes = breakpoints.filter(size => size <= imgDimensions.width)\n\n // If a larger breakpoint has been filtered-out, add the actual image width instead\n if (\n sizes.length < breakpoints.length &&\n !sizes.includes(imgDimensions.width)\n ) {\n sizes.push(imgDimensions.width)\n }\n } else {\n sizes = densities.map(density => Math.round(density * (width as number)))\n sizes = sizes.filter(size => size <= imgDimensions.width)\n }\n\n // ensure that the size passed in is included in the final output\n if (layout === `constrained` && !sizes.includes(width)) {\n sizes.push(width)\n }\n sizes = sizes.sort(sortNumeric)\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function getDimensionsAndAspectRatio(\n dimensions,\n options\n): { width: number; height: number; aspectRatio: number } {\n // Calculate the eventual width/height of the image.\n const imageAspectRatio = dimensions.width / dimensions.he