{"version":3,"sources":["webpack:///./content/ncube/nav.yml","webpack:///./src/components/pagination.tsx","webpack:///./src/utils.ts","webpack:///./src/components/sidebar-section.tsx","webpack:///./src/components/sidebar-content.tsx","webpack:///./node_modules/react-feather/dist/icons/x.js","webpack:///./node_modules/react-feather/dist/icons/menu.js","webpack:///./src/components/sidebar-mobile.tsx","webpack:///./src/components/layout.tsx","webpack:///./src/templates/template.tsx","webpack:///./content/sugarcube/nav.yml"],"names":["module","exports","Pagination","prev","next","prevArticle","undefined","className","to","slug","title","nextArticle","sugarcubeSections","sugarcubeNav","map","item","directory","ncubeSections","ncubeNav","SidebarSection","sections","items","t","isCurrent","key","c","SidebarContent","root","location","pathname","startsWith","pages","useStaticQuery","allMdx","edges","entries","subSections","reduce","memo","node","find","page","path","fields","concat","frontmatter","_extends","Object","assign","target","i","arguments","length","source","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","props","color","size","otherProps","createElement","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","x1","y1","x2","y2","defaultProps","SidebarMobile","useState","sidebarExpanded","setSidebarExpanded","clickHandler","menuButton","onClick","onKeyPress","role","tabIndex","sidebar","Layout","children","nextDoc","RegExp","test","prevDoc","hasPager","queries","small","big","matches","components","h1","style","h2","h3","pre","code","language","replace","pageQuery","PageTemplate","mdx","data","window","body"],"mappings":"6EAAAA,EAAOC,QAAU,CAAC,CAAC,MAAQ,cAAc,MAAQ,CAAC,CAAC,KAAO,SAAS,CAAC,KAAO,gBAAgB,CAAC,KAAO,cAAc,CAAC,MAAQ,SAAS,MAAQ,CAAC,CAAC,KAAO,eAAe,CAAC,KAAO,eAAe,CAAC,KAAO,gB,yPCwCnLC,EAhCI,SAAC,GAAkC,IAAjCC,EAAiC,EAAjCA,KAAMC,EAA2B,EAA3BA,KACnBC,OACKC,IAATH,EACE,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c08478.js","sourcesContent":["module.exports = [{\"title\":\"Get Started\",\"items\":[{\"slug\":\"about\"},{\"slug\":\"installation\"},{\"slug\":\"tutorial\"}]},{\"title\":\"Guides\",\"items\":[{\"slug\":\"youtube-api\"},{\"slug\":\"twitter-api\"},{\"slug\":\"glossary\"}]}]","import {Link} from \"gatsby\";\nimport React from \"react\";\n\ninterface PaginationProps {\n next?: {slug: string; title: string};\n prev?: {slug: string; title: string};\n}\n\nconst Pagination = ({prev, next}: PaginationProps) => {\n const prevArticle =\n prev === undefined ? (\n \"\"\n ) : (\n
\n Previous article\n \n {prev.title}\n \n
\n );\n const nextArticle =\n next === undefined ? (\n \"\"\n ) : (\n
\n Next article\n \n {next.title}\n \n
\n );\n\n return (\n
\n
{prevArticle}
\n
{nextArticle}
\n
\n );\n};\n\nexport default Pagination;\n","import ncubeNav from \"../content/ncube/nav.yml\";\nimport sugarcubeNav from \"../content/sugarcube/nav.yml\";\nimport {NavItem} from \"./types\";\n\ndeclare const InstallTrigger: unknown;\n\nexport const sugarcubeSections: NavItem[] = sugarcubeNav.map((item) => ({\n ...item,\n directory: \"sugarcube\",\n}));\n\nexport const ncubeSections: NavItem[] = ncubeNav.map((item) => ({\n ...item,\n directory: \"ncube\",\n}));\n\n// https://stackoverflow.com/a/49328524\n// export const isFirefox = typeof InstallTrigger !== \"undefined\";\n// export const isChrome =\n// !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);\n","import c from \"classnames\";\nimport {Link} from \"gatsby\";\nimport React from \"react\";\n\ninterface SidebarSectionProps {\n title: string;\n items: Array<{title: string; slug: string; isCurrent: boolean}>;\n}\n\nconst SidebarSection = ({title, items}: SidebarSectionProps) => {\n const sections = items.map(({title: t, slug, isCurrent}) => {\n return (\n \n \n {t}\n \n \n );\n });\n\n return (\n
  • \n {title}\n
      {sections}
    \n
  • \n );\n};\n\nexport default SidebarSection;\n","import {graphql, useStaticQuery} from \"gatsby\";\nimport React from \"react\";\n\nimport {MdxSidebar, NavItem} from \"../types\";\nimport {ncubeSections, sugarcubeSections} from \"../utils\";\nimport SidebarSection from \"./sidebar-section\";\n\ninterface SidebarContentProps {\n location: Location;\n}\n\ntype SubSection = {\n title: string;\n slug: string;\n isCurrent: boolean;\n};\n\ntype SidebarSection = {title: string; subSections: SubSection[]};\n\nconst SidebarContent = ({location}: SidebarContentProps) => {\n let root: \"sugarcube\" | \"ncube\";\n let sections: NavItem[] = [];\n\n switch (true) {\n case location.pathname.startsWith(\"/ncube\"): {\n root = \"ncube\";\n sections = ncubeSections;\n break;\n }\n default: {\n root = \"sugarcube\";\n sections = sugarcubeSections;\n }\n }\n\n const {\n allMdx: {edges: pages},\n } = useStaticQuery(graphql`\n query sidebarContentQuery {\n allMdx(sort: {order: ASC, fields: [fields___slug]}) {\n edges {\n node {\n fields {\n slug\n }\n id\n frontmatter {\n title\n parents\n prev\n next\n }\n }\n }\n }\n }\n `);\n\n const toc: SidebarSection[] = sections.map(({title, items}) => {\n const subSections = items.reduce((memo, {slug}) => {\n const node = pages.find((page) => {\n const path = `/${root}/${slug}`;\n return page.node.fields.slug === path;\n });\n\n if (!node) return memo;\n\n return memo.concat([\n {\n title: node.node.frontmatter.title,\n slug: node.node.fields.slug,\n // FIXME: Find a more robust way to determine if the current page is\n // active.\n isCurrent: location.pathname.startsWith(node.node.fields.slug),\n },\n ]);\n }, [] as SubSection[]);\n\n return {title, subSections};\n });\n\n const entries = toc.map(({title, subSections}) => {\n return ;\n });\n\n return
      {entries}
    ;\n};\n\nexport default SidebarContent;\n","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React from 'react';\n\nvar X = function X(props) {\n var color = props.color,\n size = props.size,\n otherProps = _objectWithoutProperties(props, [\"color\", \"size\"]);\n\n return React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: color,\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, otherProps), React.createElement(\"line\", {\n x1: \"18\",\n y1: \"6\",\n x2: \"6\",\n y2: \"18\"\n }), React.createElement(\"line\", {\n x1: \"6\",\n y1: \"6\",\n x2: \"18\",\n y2: \"18\"\n }));\n};\n\nX.defaultProps = {\n color: 'currentColor',\n size: '24'\n};\nexport default X;","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React from 'react';\n\nvar Menu = function Menu(props) {\n var color = props.color,\n size = props.size,\n otherProps = _objectWithoutProperties(props, [\"color\", \"size\"]);\n\n return React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: color,\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, otherProps), React.createElement(\"line\", {\n x1: \"3\",\n y1: \"12\",\n x2: \"21\",\n y2: \"12\"\n }), React.createElement(\"line\", {\n x1: \"3\",\n y1: \"6\",\n x2: \"21\",\n y2: \"6\"\n }), React.createElement(\"line\", {\n x1: \"3\",\n y1: \"18\",\n x2: \"21\",\n y2: \"18\"\n }));\n};\n\nMenu.defaultProps = {\n color: 'currentColor',\n size: '24'\n};\nexport default Menu;","import React, {useState} from \"react\";\nimport {Menu, X} from \"react-feather\";\n\nimport SidebarContent from \"./sidebar-content\";\n\ninterface SidebarMobileProps {\n location: Location;\n}\n\nconst SidebarMobile = ({location}: SidebarMobileProps) => {\n const [sidebarExpanded, setSidebarExpanded] = useState(false);\n\n const clickHandler = () => setSidebarExpanded(!sidebarExpanded);\n\n const menuButton = (\n \n {sidebarExpanded ? : }\n \n );\n\n const sidebar = (\n
    \n \n
    \n );\n\n return (\n <>\n {sidebarExpanded ? sidebar : \"\"}\n
    {menuButton}
    \n \n );\n};\n\nexport default SidebarMobile;\n","// eslint-disable-next-line import/no-extraneous-dependencies\nimport {Location} from \"@reach/router\";\nimport c from \"classnames\";\nimport {graphql, useStaticQuery} from \"gatsby\";\nimport React from \"react\";\nimport Media from \"react-media\";\n\nimport {MdxPages} from \"../types\";\nimport Footer from \"./footer\";\nimport Header from \"./header\";\nimport Pagination from \"./pagination\";\nimport SidebarContent from \"./sidebar-content\";\nimport SidebarMobile from \"./sidebar-mobile\";\n\ninterface LayoutProps {\n children: React.ReactNode;\n prev?: string;\n next?: string;\n}\n\nconst Layout = ({next, prev, children}: LayoutProps) => {\n const {\n allMdx: {edges: pages},\n } = useStaticQuery(graphql`\n query nextDocQuery {\n allMdx {\n edges {\n node {\n id\n fields {\n slug\n }\n frontmatter {\n title\n }\n }\n }\n }\n }\n `);\n\n const nextDoc =\n next === undefined\n ? undefined\n : pages.find(({node}) => new RegExp(next, \"i\").test(node.fields.slug));\n const prevDoc =\n prev === undefined\n ? undefined\n : pages.find(({node}) => new RegExp(prev, \"i\").test(node.fields.slug));\n\n const hasPager = prevDoc || nextDoc;\n\n return (\n
    \n
    \n {({location}) =>
    }\n
    \n\n
    \n \n {({location}) => (\n \n {(matches) => (\n <>\n {matches.small && (\n
    \n \n
    \n )}\n {matches.big && (\n
    \n \n
    \n )}\n \n )}\n \n )}\n
    \n\n
    \n
    {children}
    \n \n \n
    \n
    \n
    \n\n