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AK,OAAQ,CACtDC,EAAG,wJACD,W,kDCHJ,KAAeF,EAAAA,EAAAA,IAA4BC,EAAAA,EAAAA,KAAK,OAAQ,CACtDC,EAAG,wCACD,O,2DCDJ,KAAeF,EAAAA,EAAAA,IAA4BC,EAAAA,EAAAA,KAAK,OAAQ,CACtDC,EAAG,ocACD,Y,2DCFJ,KAAeF,EAAAA,EAAAA,IAA4BC,EAAAA,EAAAA,KAAK,OAAQ,CACtDC,EAAG,weACD,U","sources":["components/books/VerticalBook.tsx","components/buttons/ReaderFollowButton.tsx","components/meta/Helmet.tsx","components/misc/CategoryLinkChip.tsx","components/misc/NewsletterBanner.tsx","statics/Homepage/NewsletterEmailSignup.tsx","statics/public-authors/AuthorShow.tsx","utils/casing.ts","../node_modules/@mui/icons-material/esm/Facebook.js","../node_modules/@mui/icons-material/esm/Home.js","../node_modules/@mui/icons-material/esm/Instagram.js","../node_modules/@mui/icons-material/esm/Twitter.js"],"sourcesContent":["import React from 'react';\nimport { Box, Typography } from '@mui/material';\nimport { Book } from '../../store/books/booksSlice';\nimport MuiRouterLink from '../mui-wrappers/MuiRouterLink';\nimport { parameterize } from '../../utils/casing';\n\nconst VerticalBook = function ({ book }: { book: Book }) {\n  return (\n    <MuiRouterLink to={`/books/${book.id}/${parameterize(book.title)}`}>\n      <Box\n        component=\"img\"\n        src={book.amazon_image_url}\n        alt={book.title}\n        sx={{ width: '100%', height: 'auto', boxShadow: '2px 2px 7px rgb(0 0 0 / 10%)', aspectRatio: '1 / 1.5' }}\n      />\n      <Typography sx={{ mt: 1 }}>{book.title}</Typography>\n    </MuiRouterLink>\n  );\n};\n\nexport default VerticalBook;\n","import React from 'react';\nimport {\n  Box,\n  Button,\n  Dialog,\n  DialogActions,\n  DialogContent,\n  Typography,\n} from '@mui/material';\nimport NewsletterEmailSignup from '../../statics/Homepage/NewsletterEmailSignup';\n\nconst ReaderFollowButton = function ({\n  resource,\n  extraParams,\n  resourceType,\n}: {\n  resource: string;\n  extraParams: Object;\n  resourceType: string;\n}) {\n  const [open, setOpen] = React.useState(false);\n\n  return (\n    <>\n      <Box sx={{ maxWidth: { xs: '100%', md: 220 }, pl: { xs: 0, md: 2 }, ml: { xs: 0, md: 2 }, mt: { xs: 2, md: 0 }, borderLeft: { xs: 0, md: '2px solid' }, borderColor: { xs: '#fff', md: '#7fd7ff' } }}>\n        <Button fullWidth variant='contained' color=\"secondary\" sx={{ mb: 1 }} onClick={() => setOpen(true)}>\n          Get Alerts\n        </Button>\n        <Typography variant='caption'>\n          Want to be notified when {resource} is free or on sale? Click on the &apos;Get Alerts&apos; button and we&apos;ll send you an email when the price drops.\n        </Typography>\n      </Box>\n\n      <Dialog\n        onClose={() => setOpen(false)}\n        open={open}\n        PaperProps={{ sx: { maxWidth: 400 } }}\n      >\n        <DialogContent>\n          You&apos;ll be the first one to know when we find a new deal on {resource}!\n          <NewsletterEmailSignup extraParams={extraParams} hideText btnText='Create Alert' follow={resourceType} handleSuccess={() => setOpen(false)} />\n        </DialogContent>\n\n        <DialogActions>\n          <Button onClick={() => setOpen(false)}>\n            Cancel\n          </Button>\n        </DialogActions>\n      </Dialog>\n    </>\n  );\n};\n\nexport default ReaderFollowButton;\n","import React from 'react';\nimport { Helmet as ReactHelmet } from 'react-helmet';\n\ninterface HelmetInput {\n  title: string;\n  url: string;\n  description?: string;\n  // Provide if there's a better image than the default\n  ogImage?: string;\n}\n\nexport default function Helmet({ metaContent, schema }: { metaContent: HelmetInput, schema?: Array<Object> }) {\n  const { title, url, description, ogImage } = metaContent;\n  const defaultOgImage =\n    'https://website-assets-public.s3.us-west-2.amazonaws.com/opengraph/girl-in-hammock.jpg';\n  const currentOgImage = ogImage || defaultOgImage;\n  // Recent OG Images generated from Canva are 1200 x 600\n  // So if one was set from Helmet, we use the smaller 600 size.\n  // These will have to be redone and this discrepancy removed.\n  const height = ogImage ? '600' : '630';\n  return (\n    <ReactHelmet>\n      <title>{title}</title>\n      <meta property=\"og:title\" content={title} />\n      <link rel=\"canonical\" href={url} />\n      <meta property=\"og:url\" content={url} />\n      <meta property=\"og:description\" content={description} />\n      <meta property=\"og:image\" content={currentOgImage} />\n      <meta property=\"og:image:url\" content={currentOgImage} />\n      <meta property=\"og:image:width\" content=\"1200\" />\n      <meta property=\"og:image:height\" content={height} />\n\n      <script type=\"application/ld+json\">\n        {JSON.stringify({\n          \"@context\": \"https://schema.org\",\n          \"@type\": \"Organization\",\n          \"url\": \"https://bookraid.com\",\n          \"logo\": \"https://bookraid.com/logo.png\",\n          \"description\": \"BookRaid is a website and newsletter that lets you download free & bestselling discount eBooks for your Kindle, Nook, Kobo, or other eReader\"\n        })}\n      </script>\n      {schema && (\n        schema.map(sch => <script type=\"application/ld+json\">{JSON.stringify(sch)}</script>)\n      )}\n    </ReactHelmet>\n  );\n}\n\nHelmet.defaultProps = {\n  schema: [],\n};\n","import { Chip, darken, lighten } from \"@mui/material\";\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { camelize, parameterize } from \"../../utils/casing\";\nimport { Category } from \"../../store/categories/categoriesSlice\";\nimport { colors } from '../../theme/theme';\n\nconst CategoryLinkChip = function ({ category }: { category: Category }) {\n  return (\n    <Chip\n      sx={{\n        borderRadius: '4px',\n        borderColor: darken(colors.categories[camelize(category.name)].backgroundColor, 0.1),\n        '&:hover': {\n          borderColor: darken(colors.categories[camelize(category.name)].backgroundColor, 0.2),\n          backgroundColor: `${lighten(colors.categories[camelize(category.name)].backgroundColor, 0.6)} !important`,\n        },\n      }}\n      clickable\n      label={category.name}\n      variant=\"outlined\"\n      component={Link}\n      to={`/categories/${category.id}/${parameterize(category.name)}`}\n    />\n  )\n}\n\nexport default CategoryLinkChip;\n","import { Box, Grid, Typography } from '@mui/material';\nimport React from 'react';\nimport NewsletterEmailSignup from '../../statics/Homepage/NewsletterEmailSignup';\n\nconst NewsletterBanner = function () {\n  return (\n    <Box sx={{\n      display: 'flex',\n      justifyContent: 'center',\n      alignItems: 'center',\n      width: '100%',\n      p: { xs: 2, md: 3, xl: 4 },\n      backgroundColor: '#fff3ea',\n    }}>\n      <Grid container spacing={2} sx={{ maxWidth: 1400 }}>\n        <Grid item xs={12} sm={7}>\n          <Box sx={{ display: 'flex', justifyContent: 'center', flexDirection: 'column', height: '100%' }}>\n            <Typography variant=\"h5\" sx={{ mb: 2, fontWeight: 'bold' }}>Join now to get limited time, exclusive deals on free and discounted eBooks</Typography>\n            <Typography>We&apos;ll find amazing new authors and books for you to get excited about. You just have to worry about finding the time to read them all.</Typography>\n          </Box>\n        </Grid>\n        <Grid item xs={0} sm={1} />\n        <Grid item xs={12} sm={4}>\n          <Box sx={{ display: 'flex', justifyContent: { xs: 'center', md: 'flex-end' }, alignItems: 'center', height: '100%' }}>\n            <Box sx={{ backgroundColor: 'white', px: 3, pb: 3, pt: 1 }}>\n              <NewsletterEmailSignup hideText />\n            </Box>\n          </Box>\n        </Grid>\n      </Grid>\n    </Box>\n  )\n}\n\nexport default NewsletterBanner;\n","import React from 'react';\nimport { Box, TextField, Typography } from '@mui/material';\nimport FacebookPixel from 'react-facebook-pixel';\nimport RedditPixel from 'react-reddit-pixel';\nimport ReactGA from 'react-ga4';\nimport ReactPinterestTag from 'react-pinterest-tag';\nimport { push } from 'connected-react-router';\nimport { LoadingButton } from '@mui/lab';\nimport { createReader } from '../../store/readers/readersSlice';\nimport { useAppDispatch } from '../../app/hooks';\nimport { addSnack } from '../../store/snacks/snacksSlice';\n\nconst NewsletterEmailSignup = function ({\n  signupEmailFieldRef,\n  hideText,\n  extraParams,\n  btnText,\n  follow,\n  handleSuccess,\n}: {\n  signupEmailFieldRef?: any;\n  hideText?: boolean;\n  extraParams?: Object;\n  btnText?: string;\n  follow?: string;\n  handleSuccess?: Function;\n}) {\n  const [email, setEmail] = React.useState('');\n  const [creating, setCreating] = React.useState(false);\n  const dispatch = useAppDispatch();\n\n  async function handleCreate(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    setCreating(true);\n\n    dispatch(createReader({ email, ...extraParams }))\n      .unwrap()\n      .then((e: any) => {\n        FacebookPixel.trackCustom('ReaderSubscribed');\n        RedditPixel.track('SignUp');\n        ReactGA.event({\n          category: 'Readers',\n          action: 'ReadersSignUp',\n        });\n        ReactPinterestTag.track('checkout', {\n          value: 100,\n          order_quantity: 1,\n          currency: 'USD',\n          line_items: [\n            {\n              product_name: 'Newsletter subscription',\n              product_id: '1',\n              product_price: 1.0,\n              product_quantity: 1,\n            },\n          ],\n        });\n        // reader conversion\n        ReactGA.gtag('event', 'conversion', {\n          send_to: process.env.REACT_APP_GTAG_READER_SIGNUP as string,\n        });\n\n        if (e.skip_categories) {\n          dispatch(addSnack({ message: `Follow on ${follow} successfully created.`, variant: 'success' }))\n        } else {\n          let pushUrl = `/readers/${e.uuid}/edit`;\n          if (follow) { pushUrl += `?follow=${follow}`; }\n          dispatch(push(pushUrl));\n        }\n        if (handleSuccess) { handleSuccess(); }\n      })\n      .finally(() => {\n        setCreating(false);\n      })\n      .catch(() => {\n        // throw e;\n      });\n\n    return () => setCreating(false);\n  }\n\n  return (\n    <Box sx={{ maxWidth: '350px', margin: '0 auto' }}>\n      {!hideText && <Typography variant=\"h4\" component=\"h1\" color=\"secondary.main\" align=\"center\">\n        Discounted &amp; Free Bestselling Ebooks\n      </Typography>}\n\n      <form onSubmit={handleCreate}>\n        <TextField\n          onChange={(e) => setEmail(e.target.value)}\n          ref={signupEmailFieldRef || null}\n          variant=\"outlined\"\n          margin=\"normal\"\n          required\n          fullWidth\n          name=\"email\"\n          label=\"Email\"\n          value={email}\n        />\n        <LoadingButton\n          loading={creating}\n          variant=\"contained\"\n          color=\"secondary\"\n          type=\"submit\"\n          fullWidth\n        >\n          {btnText}\n        </LoadingButton>\n      </form>\n    </Box>\n  );\n};\n\nNewsletterEmailSignup.defaultProps = {\n  signupEmailFieldRef: null,\n  hideText: false,\n  extraParams: {},\n  btnText: `Start Reading - It's Free`,\n  follow: null,\n  handleSuccess: null,\n};\n\nexport default NewsletterEmailSignup;\n","import React from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n  Avatar,\n  Box,\n  Container,\n  Grid,\n  IconButton,\n  Typography,\n} from '@mui/material';\nimport { Facebook, Home, Instagram, Twitter } from '@mui/icons-material';\nimport { useAppDispatch, useAppSelector } from '../../app/hooks';\nimport { Book } from '../../store/books/booksSlice';\nimport LoadingSpinner from '../../components/misc/LoadingSpinner';\nimport Helmet from '../../components/meta/Helmet';\nimport NewsletterBanner from '../../components/misc/NewsletterBanner';\nimport VerticalBook from '../../components/books/VerticalBook';\nimport { Author, getAuthor, selectAuthor } from '../../store/authors/authorsSlice';\nimport { Category } from '../../store/categories/categoriesSlice';\nimport CategoryLinkChip from '../../components/misc/CategoryLinkChip';\nimport ReaderFollowButton from '../../components/buttons/ReaderFollowButton';\nimport { parameterize } from '../../utils/casing';\n\nconst AuthorShow = function () {\n  const id = parseInt(useParams<{ id: string }>().id, 10);\n  const dispatch = useAppDispatch();\n  const [authorLoading, setAuthorLoading] = React.useState(true);\n  const author = useAppSelector((state) => selectAuthor(state, id)) as Author;\n  const [uniqCategories, setUniqCategories] = React.useState<Category[]>([]);\n\n  React.useEffect(() => {\n    if (!id) {\n      return;\n    }\n    dispatch(\n      getAuthor({\n        id,\n        resourceType: 'partner',\n        public: true,\n        joins: [{ books: 'category' }],\n      })\n    ).finally(() => {\n      setAuthorLoading(false);\n    });\n\n    // Note that without this cleanup method in the return function,\n    // we get memory leak warnings from react\n    // https://stackoverflow.com/a/60907638\n    // no return method gives a memory leak\n    // return () => { }; // empty return gives a memory leak\n    // return () => setBookLoading(true); // this gives a memory leak\n    // eslint-disable-next-line consistent-return\n    return () => setAuthorLoading(false); // this works\n  }, [dispatch, id]);\n\n  React.useEffect(() => {\n    if (author && author.books) {\n      setUniqCategories(\n        author.books!\n          .map((book: Book) => book.category!)\n          .filter(\n            (category: Category, index: number, self: Category[]) =>\n              self.findIndex((c) => c.id === category.id) === index\n          )\n      );\n    }\n  }, [author]);\n\n  if (authorLoading) {\n    return <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 10 }}>\n      <LoadingSpinner />\n    </Box>\n  }\n\n  return (\n    <Box>\n      <NewsletterBanner />\n      <Container component=\"main\">\n        <Box sx={{ display: 'flex', mt: 4, flexDirection: 'column' }}>\n          <Box sx={{ display: 'flex', flexDirection: { xs: 'column', md: 'row' }, alignItems: { xs: 'center', md: 'flex-start' } }}>\n            <Avatar src={author.avatar_url} alt={author.name} sx={{ width: '200px', height: '200px', mr: { xs: 0, md: 2 }, mb: { xs: 2, md: 0 } }} />\n            <Box sx={{ dislay: 'flex', flexDirection: 'column', flexGrow: 1 }}>\n              <Box sx={{ display: 'flex', flexDirection: 'column', alignItems: { xs: 'center', md: 'flex-start' }}}>\n                <Typography variant=\"h3\" component=\"h1\" sx={{ fontWeight: 'bold' }}>{author.name}</Typography>\n\n                <Box sx={{ display: 'flex' }}>\n                  {author.website && <IconButton\n                    href={author.website.startsWith('http') ? author.website : `https://${author.website}`}\n                    sx={{ mr: 1 }}\n                    color=\"secondary\"\n                    size=\"small\"\n                    aria-label=\"website link\"\n                  >\n                    <Home />\n                  </IconButton>}\n                  {author.facebook && <IconButton\n                    href={author.facebook.startsWith('http') ? author.facebook : `https://${author.facebook}`}\n                    sx={{ mr: 1 }}\n                    color=\"secondary\"\n                    size=\"small\"\n                    aria-label=\"facebook link\"\n                  >\n                    <Facebook />\n                  </IconButton>}\n                  {author.instagram && <IconButton\n                    href={author.instagram.startsWith('http') ? author.instagram : `https://${author.instagram}`}\n                    sx={{ mr: 1 }}\n                    color=\"secondary\"\n                    size=\"small\"\n                    aria-label=\"instagram link\"\n                  >\n                    <Instagram />\n                  </IconButton>}\n                  {author.twitter && <IconButton\n                    href={author.twitter.startsWith('http') ? author.twitter : `https://${author.twitter}`}\n                    color=\"secondary\"\n                    size=\"small\"\n                    aria-label=\"twitter link\"\n                  >\n                    <Twitter />\n                  </IconButton>}\n                </Box>\n              </Box>\n\n              {author.description && <Typography dangerouslySetInnerHTML={{ __html: author.description }} />}\n\n              {uniqCategories && <Box sx={{ display: 'flex', mt: 1, flexWrap: 'wrap' }}>\n                <Typography variant=\"h6\" sx={{ fontWeight: 'bold', mt: 1 }}>Genres:</Typography>\n                {uniqCategories.map((category) => (\n                  <Box key={category.id} sx={{ ml: 1, mt: 1 }}>\n                    <CategoryLinkChip category={category} />\n                  </Box>\n                ))}\n              </Box>}\n            </Box>\n            <ReaderFollowButton\n              resource={`a ${author.name} book`}\n              resourceType='author'\n              extraParams={{ author_ids: [author.id] }}\n            />\n          </Box>\n        </Box>\n\n        <Grid container spacing={2} sx={{ mb: 12 }}>\n          <Grid item xs={12}>\n            <Typography variant=\"h4\" sx={{ fontWeight: 'bold', mt: 4 }}>Books by {author.name}</Typography>\n          </Grid>\n          {author.books!.map((book) => (\n            <Grid item xs={6} sm={4} lg={2} key={book.id}>\n              <VerticalBook book={book} />\n            </Grid>\n          ))}\n        </Grid>\n\n        <Helmet\n          metaContent={{\n            title: `${author.name} Profile - BookRaid`,\n            url: `https://bookraid.com/authors/${author.id}/${parameterize(author.name)}`,\n            description: `Author page for ${author.name} on BookRaid. Get notified when ${author.name} books are free or on sale.`,\n          }}\n        />\n      </Container>\n    </Box>\n  );\n};\n\nexport default AuthorShow;\n","/**\n * Turns some \"Non Slug Case String\" to a \"slug-case-string\"\n *\n * Strips html entities out completely in the first `replace`.\n */\nexport const slugCase = function (token: string): string {\n  return trimNonWhitespaceCharacters(token)\n    .replace(/&[^;]*;/g, '')\n    .replace(/&/g, '')\n    .replace(/\\s+/g, '-')\n    .toLowerCase();\n};\n\n// convert to camelCase\nexport const camelize = function (str: string) {\n  const moddedStr = trimNonWhitespaceCharacters(str)\n    .replace(/-/g, ' ')\n    .toLowerCase();\n  return moddedStr\n    .replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (word, index) =>\n      index === 0 ? word.toLowerCase() : word.toUpperCase()\n    )\n    .replace(/\\s+/g, '');\n};\n\n/**\n * Turns some \"Non Slug Case String\" to a \"snake_case_string\"\n */\nexport const snakeCase = function (token: string): string {\n  return trimNonWhitespaceCharacters(token)\n    .replace(/\\s/g, '_')\n    .replace(/-/g, '_')\n    .toLowerCase();\n};\n\n/**\n * Remove some junk characters to reduce everything to letters only\n * @param textToTrim\n * @returns\n */\nconst trimNonWhitespaceCharacters = function (textToTrim: string): string {\n  return textToTrim\n    .trim()\n    .replace(/'/g, '')\n    .replace(/,/g, '')\n    .replace(/_/g, ' ');\n};\n\nexport const parameterize = function (text: string): string {\n  return text\n    .toLowerCase()\n    .trim()\n    .replace(/ /g, '-')\n    .replace(/[^\\w-]+/g, '');\n};\n","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n  d: \"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z\"\n}), 'Facebook');","import createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n  d: \"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\"\n}), 'Home');","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n  d: \"M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z\"\n}), 'Instagram');","import * as React from 'react';\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n  d: \"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z\"\n}), 'Twitter');"],"names":["book","to","id","parameterize","title","component","src","amazon_image_url","alt","sx","width","height","boxShadow","aspectRatio","mt","resource","extraParams","resourceType","React","open","setOpen","maxWidth","xs","md","pl","ml","borderLeft","borderColor","fullWidth","variant","color","mb","onClick","onClose","PaperProps","hideText","btnText","follow","handleSuccess","Helmet","metaContent","schema","url","description","ogImage","currentOgImage","property","content","rel","href","type","JSON","stringify","map","sch","defaultProps","category","borderRadius","darken","colors","camelize","name","backgroundColor","lighten","clickable","label","Link","display","justifyContent","alignItems","p","xl","container","spacing","item","sm","flexDirection","fontWeight","px","pb","pt","NewsletterEmailSignup","signupEmailFieldRef","email","setEmail","creating","setCreating","dispatch","useAppDispatch","event","preventDefault","createReader","unwrap","then","e","FacebookPixel","RedditPixel","ReactGA","action","ReactPinterestTag","value","order_quantity","currency","line_items","product_name","product_id","product_price","product_quantity","send_to","process","skip_categories","addSnack","message","pushUrl","uuid","push","finally","catch","margin","align","onSubmit","onChange","target","ref","required","loading","parseInt","useParams","authorLoading","setAuthorLoading","author","useAppSelector","state","selectAuthor","uniqCategories","setUniqCategories","getAuthor","public","joins","books","filter","index","self","findIndex","c","avatar_url","mr","dislay","flexGrow","website","startsWith","size","facebook","instagram","twitter","dangerouslySetInnerHTML","__html","flexWrap","author_ids","lg","slugCase","token","trimNonWhitespaceCharacters","replace","toLowerCase","str","word","toUpperCase","textToTrim","trim","text","createSvgIcon","_jsx","d"],"sourceRoot":""}