diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 00000000..ddec128b --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,66 @@ +# Sample workflow for building and deploying a VitePress site to GitHub Pages +# +name: Deploy VitePress site to Pages + +on: + # Runs on pushes targeting the `main` branch. Change this to `master` if you're + # using the `master` branch as the default branch. + push: + branches: [main] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Not needed if lastUpdated is not enabled + # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm + # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm # or pnpm / yarn + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Install dependencies + run: npm ci # or pnpm install / yarn install / bun install + - name: Build with VitePress + run: | + npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build + touch docs/.vitepress/dist/.nojekyll + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/.vitepress/dist + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/paperai-docs/.vitepress/cache/deps/@theme_index.js b/paperai-docs/.vitepress/cache/deps/@theme_index.js new file mode 100644 index 00000000..33a0fdd8 --- /dev/null +++ b/paperai-docs/.vitepress/cache/deps/@theme_index.js @@ -0,0 +1,268 @@ +import { + useMediaQuery +} from "./chunk-DN3Q4TEW.js"; +import { + computed, + ref, + shallowRef, + watch +} from "./chunk-456JUNPJ.js"; + +// node_modules/vitepress/dist/client/theme-default/index.js +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/fonts.css"; + +// node_modules/vitepress/dist/client/theme-default/without-fonts.js +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/vars.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/base.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/utils.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css"; +import "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css"; +import VPBadge from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; +import Layout from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/Layout.vue"; +import { default as default2 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; +import { default as default3 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue"; +import { default as default4 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue"; +import { default as default5 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue"; +import { default as default6 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue"; +import { default as default7 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue"; +import { default as default8 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue"; +import { default as default9 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue"; +import { default as default10 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue"; +import { default as default11 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue"; +import { default as default12 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue"; +import { default as default13 } from "C:/git-program/paper-ai/paperai-docs/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue"; + +// node_modules/vitepress/dist/client/shared.js +var inBrowser = typeof document !== "undefined"; + +// node_modules/vitepress/dist/client/theme-default/support/utils.js +import { withBase } from "vitepress"; + +// node_modules/vitepress/dist/client/theme-default/composables/data.js +import { useData as useData$ } from "vitepress"; +var useData = useData$; + +// node_modules/vitepress/dist/client/theme-default/support/utils.js +function ensureStartingSlash(path) { + return /^\//.test(path) ? path : `/${path}`; +} + +// node_modules/vitepress/dist/client/theme-default/support/sidebar.js +function getSidebar(_sidebar, path) { + if (Array.isArray(_sidebar)) + return addBase(_sidebar); + if (_sidebar == null) + return []; + path = ensureStartingSlash(path); + const dir = Object.keys(_sidebar).sort((a, b) => { + return b.split("/").length - a.split("/").length; + }).find((dir2) => { + return path.startsWith(ensureStartingSlash(dir2)); + }); + const sidebar = dir ? _sidebar[dir] : []; + return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base); +} +function getSidebarGroups(sidebar) { + const groups = []; + let lastGroupIndex = 0; + for (const index in sidebar) { + const item = sidebar[index]; + if (item.items) { + lastGroupIndex = groups.push(item); + continue; + } + if (!groups[lastGroupIndex]) { + groups.push({ items: [] }); + } + groups[lastGroupIndex].items.push(item); + } + return groups; +} +function addBase(items, _base) { + return [...items].map((_item) => { + const item = { ..._item }; + const base = item.base || _base; + if (base && item.link) + item.link = base + item.link; + if (item.items) + item.items = addBase(item.items, base); + return item; + }); +} + +// node_modules/vitepress/dist/client/theme-default/composables/hash.js +var hashRef = ref(inBrowser ? location.hash : ""); +if (inBrowser) { + window.addEventListener("hashchange", () => { + hashRef.value = location.hash; + }); +} + +// node_modules/vitepress/dist/client/theme-default/composables/sidebar.js +function useSidebar() { + const { frontmatter, page, theme: theme2 } = useData(); + const is960 = useMediaQuery("(min-width: 960px)"); + const isOpen = ref(false); + const _sidebar = computed(() => { + const sidebarConfig = theme2.value.sidebar; + const relativePath = page.value.relativePath; + return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : []; + }); + const sidebar = ref(_sidebar.value); + watch(_sidebar, (next, prev) => { + if (JSON.stringify(next) !== JSON.stringify(prev)) + sidebar.value = _sidebar.value; + }); + const hasSidebar = computed(() => { + return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home"; + }); + const leftAside = computed(() => { + if (hasAside) + return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left"; + return false; + }); + const hasAside = computed(() => { + if (frontmatter.value.layout === "home") + return false; + if (frontmatter.value.aside != null) + return !!frontmatter.value.aside; + return theme2.value.aside !== false; + }); + const isSidebarEnabled = computed(() => hasSidebar.value && is960.value); + const sidebarGroups = computed(() => { + return hasSidebar.value ? getSidebarGroups(sidebar.value) : []; + }); + function open() { + isOpen.value = true; + } + function close() { + isOpen.value = false; + } + function toggle() { + isOpen.value ? close() : open(); + } + return { + isOpen, + sidebar, + sidebarGroups, + hasSidebar, + hasAside, + leftAside, + isSidebarEnabled, + open, + close, + toggle + }; +} + +// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js +import { onContentUpdated } from "vitepress"; + +// node_modules/vitepress/dist/client/theme-default/composables/outline.js +import { getScrollOffset } from "vitepress"; +var resolvedHeaders = []; +function getHeaders(range) { + const headers = [ + ...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)") + ].filter((el) => el.id && el.hasChildNodes()).map((el) => { + const level = Number(el.tagName[1]); + return { + element: el, + title: serializeHeader(el), + link: "#" + el.id, + level + }; + }); + return resolveHeaders(headers, range); +} +function serializeHeader(h) { + let ret = ""; + for (const node of h.childNodes) { + if (node.nodeType === 1) { + if (node.classList.contains("VPBadge") || node.classList.contains("header-anchor") || node.classList.contains("ignore-header")) { + continue; + } + ret += node.textContent; + } else if (node.nodeType === 3) { + ret += node.textContent; + } + } + return ret.trim(); +} +function resolveHeaders(headers, range) { + if (range === false) { + return []; + } + const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2; + const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange; + headers = headers.filter((h) => h.level >= high && h.level <= low); + resolvedHeaders.length = 0; + for (const { element, link } of headers) { + resolvedHeaders.push({ element, link }); + } + const ret = []; + outer: + for (let i = 0; i < headers.length; i++) { + const cur = headers[i]; + if (i === 0) { + ret.push(cur); + } else { + for (let j = i - 1; j >= 0; j--) { + const prev = headers[j]; + if (prev.level < cur.level) { + ; + (prev.children || (prev.children = [])).push(cur); + continue outer; + } + } + ret.push(cur); + } + } + return ret; +} + +// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js +function useLocalNav() { + const { theme: theme2, frontmatter } = useData(); + const headers = shallowRef([]); + const hasLocalNav = computed(() => { + return headers.value.length > 0; + }); + onContentUpdated(() => { + headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline); + }); + return { + headers, + hasLocalNav + }; +} + +// node_modules/vitepress/dist/client/theme-default/without-fonts.js +var theme = { + Layout, + enhanceApp: ({ app }) => { + app.component("Badge", VPBadge); + } +}; +var without_fonts_default = theme; +export { + default2 as VPBadge, + default4 as VPButton, + default8 as VPDocAsideSponsors, + default6 as VPHomeFeatures, + default5 as VPHomeHero, + default7 as VPHomeSponsors, + default3 as VPImage, + default9 as VPSponsors, + default13 as VPTeamMembers, + default10 as VPTeamPage, + default12 as VPTeamPageSection, + default11 as VPTeamPageTitle, + without_fonts_default as default, + useLocalNav, + useSidebar +}; +//# sourceMappingURL=@theme_index.js.map diff --git a/paperai-docs/.vitepress/cache/deps/@theme_index.js.map b/paperai-docs/.vitepress/cache/deps/@theme_index.js.map new file mode 100644 index 00000000..d429fc0b --- /dev/null +++ b/paperai-docs/.vitepress/cache/deps/@theme_index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../node_modules/vitepress/dist/client/shared.js", "../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../node_modules/vitepress/dist/client/theme-default/composables/hash.js", "../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js", "../../../node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../node_modules/vitepress/dist/client/theme-default/composables/outline.js"], + "sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nexport { useLocalNav } from './composables/local-nav';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\\/\\/)/i;\nexport const APPEARANCE_KEY = 'vitepress-theme-appearance';\nconst HASH_RE = /#.*$/;\nconst HASH_OR_QUERY_RE = /[?#].*$/;\nconst INDEX_OR_EXT_RE = /(?:(^|\\/)index)?\\.(?:md|html)$/;\nexport const inBrowser = typeof document !== 'undefined';\nexport const notFoundPageData = {\n relativePath: '',\n filePath: '',\n title: '404',\n description: 'Not Found',\n headers: [],\n frontmatter: { sidebar: false, layout: 'page' },\n lastUpdated: 0,\n isNotFound: true\n};\nexport function isActive(currentPath, matchPath, asRegex = false) {\n if (matchPath === undefined) {\n return false;\n }\n currentPath = normalize(`/${currentPath}`);\n if (asRegex) {\n return new RegExp(matchPath).test(currentPath);\n }\n if (normalize(matchPath) !== currentPath) {\n return false;\n }\n const hashMatch = matchPath.match(HASH_RE);\n if (hashMatch) {\n return (inBrowser ? location.hash : '') === hashMatch[0];\n }\n return true;\n}\nfunction normalize(path) {\n return decodeURI(path)\n .replace(HASH_OR_QUERY_RE, '')\n .replace(INDEX_OR_EXT_RE, '$1');\n}\nexport function isExternal(path) {\n return EXTERNAL_URL_RE.test(path);\n}\n/**\n * this merges the locales data to the main data by the route\n */\nexport function resolveSiteDataByRoute(siteData, relativePath) {\n const localeIndex = Object.keys(siteData.locales).find((key) => key !== 'root' &&\n !isExternal(key) &&\n isActive(relativePath, `/${key}/`, true)) || 'root';\n return Object.assign({}, siteData, {\n localeIndex,\n lang: siteData.locales[localeIndex]?.lang ?? siteData.lang,\n dir: siteData.locales[localeIndex]?.dir ?? siteData.dir,\n title: siteData.locales[localeIndex]?.title ?? siteData.title,\n titleTemplate: siteData.locales[localeIndex]?.titleTemplate ?? siteData.titleTemplate,\n description: siteData.locales[localeIndex]?.description ?? siteData.description,\n head: mergeHead(siteData.head, siteData.locales[localeIndex]?.head ?? []),\n themeConfig: {\n ...siteData.themeConfig,\n ...siteData.locales[localeIndex]?.themeConfig\n }\n });\n}\n/**\n * Create the page title string based on config.\n */\nexport function createTitle(siteData, pageData) {\n const title = pageData.title || siteData.title;\n const template = pageData.titleTemplate ?? siteData.titleTemplate;\n if (typeof template === 'string' && template.includes(':title')) {\n return template.replace(/:title/g, title);\n }\n const templateString = createTitleTemplate(siteData.title, template);\n if (title === templateString.slice(3)) {\n return title;\n }\n return `${title}${templateString}`;\n}\nfunction createTitleTemplate(siteTitle, template) {\n if (template === false) {\n return '';\n }\n if (template === true || template === undefined) {\n return ` | ${siteTitle}`;\n }\n if (siteTitle === template) {\n return '';\n }\n return ` | ${template}`;\n}\nfunction hasTag(head, tag) {\n const [tagType, tagAttrs] = tag;\n if (tagType !== 'meta')\n return false;\n const keyAttr = Object.entries(tagAttrs)[0]; // First key\n if (keyAttr == null)\n return false;\n return head.some(([type, attrs]) => type === tagType && attrs[keyAttr[0]] === keyAttr[1]);\n}\nexport function mergeHead(prev, curr) {\n return [...prev.filter((tagAttrs) => !hasTag(curr, tagAttrs)), ...curr];\n}\n// https://github.com/rollup/rollup/blob/fec513270c6ac350072425cc045db367656c623b/src/utils/sanitizeFileName.ts\nconst INVALID_CHAR_REGEX = /[\\u0000-\\u001F\"#$&*+,:;<=>?[\\]^`{|}\\u007F]/g;\nconst DRIVE_LETTER_REGEX = /^[a-z]:/i;\nexport function sanitizeFileName(name) {\n const match = DRIVE_LETTER_REGEX.exec(name);\n const driveLetter = match ? match[0] : '';\n return (driveLetter +\n name\n .slice(driveLetter.length)\n .replace(INVALID_CHAR_REGEX, '_')\n .replace(/(^|\\/)_+(?=[^/]*$)/, '$1'));\n}\nexport function slash(p) {\n return p.replace(/\\\\/g, '/');\n}\nconst KNOWN_EXTENSIONS = new Set();\nexport function treatAsHtml(filename) {\n if (KNOWN_EXTENSIONS.size === 0) {\n const extraExts = (typeof process === 'object' && process.env.VITE_EXTRA_EXTENSIONS) ||\n import.meta.env?.VITE_EXTRA_EXTENSIONS ||\n '';\n ('3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,' +\n 'doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,' +\n 'man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,' +\n 'opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,' +\n 'tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,' +\n 'yaml,yml,zip' +\n (extraExts && typeof extraExts === 'string' ? ',' + extraExts : ''))\n .split(',')\n .forEach((ext) => KNOWN_EXTENSIONS.add(ext));\n }\n const ext = filename.split('.').pop();\n return ext == null || !KNOWN_EXTENSIONS.has(ext.toLowerCase());\n}\n// https://github.com/sindresorhus/escape-string-regexp/blob/ba9a4473850cb367936417e97f1f2191b7cc67dd/index.js\nexport function escapeRegExp(str) {\n return str.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n", "import { withBase } from 'vitepress';\nimport { useData } from '../composables/data';\nimport { isExternal, treatAsHtml } from '../../shared';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId)\n clearTimeout(timeoutId);\n if (!called) {\n fn();\n (called = true) && setTimeout(() => (called = false), delay);\n }\n else\n timeoutId = setTimeout(fn, delay);\n };\n}\nexport function ensureStartingSlash(path) {\n return /^\\//.test(path) ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');\n if (isExternal(url) ||\n url.startsWith('#') ||\n !protocol.startsWith('http') ||\n !treatAsHtml(pathname))\n return url;\n const { site } = useData();\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { ensureStartingSlash } from './utils';\nimport { isActive } from '../../shared';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n recursivelyExtractLinks(item.items);\n }\n }\n }\n recursivelyExtractLinks(sidebar);\n return links;\n}\n/**\n * Check if the given sidebar item contains any active link.\n */\nexport function hasActiveLink(path, items) {\n if (Array.isArray(items)) {\n return items.some((item) => hasActiveLink(path, item));\n }\n return isActive(path, items.link)\n ? true\n : items.items\n ? hasActiveLink(path, items.items)\n : false;\n}\nfunction addBase(items, _base) {\n return [...items].map((_item) => {\n const item = { ..._item };\n const base = item.base || _base;\n if (base && item.link)\n item.link = base + item.link;\n if (item.items)\n item.items = addBase(item.items, base);\n return item;\n });\n}\n", "import { inBrowser } from '../../shared';\nimport { ref } from 'vue';\nconst hashRef = ref(inBrowser ? location.hash : '');\nif (inBrowser) {\n window.addEventListener('hashchange', () => {\n hashRef.value = location.hash;\n });\n}\nexport { hashRef };\n", "import { useMediaQuery } from '@vueuse/core';\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect, watchPostEffect } from 'vue';\nimport { isActive } from '../../shared';\nimport { hasActiveLink as containsActiveLink, getSidebar, getSidebarGroups } from '../support/sidebar';\nimport { useData } from './data';\nimport { hashRef } from './hash';\nexport function useSidebar() {\n const { frontmatter, page, theme } = useData();\n const is960 = useMediaQuery('(min-width: 960px)');\n const isOpen = ref(false);\n const _sidebar = computed(() => {\n const sidebarConfig = theme.value.sidebar;\n const relativePath = page.value.relativePath;\n return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];\n });\n const sidebar = ref(_sidebar.value);\n watch(_sidebar, (next, prev) => {\n if (JSON.stringify(next) !== JSON.stringify(prev))\n sidebar.value = _sidebar.value;\n });\n const hasSidebar = computed(() => {\n return (frontmatter.value.sidebar !== false &&\n sidebar.value.length > 0 &&\n frontmatter.value.layout !== 'home');\n });\n const leftAside = computed(() => {\n if (hasAside)\n return frontmatter.value.aside == null\n ? theme.value.aside === 'left'\n : frontmatter.value.aside === 'left';\n return false;\n });\n const hasAside = computed(() => {\n if (frontmatter.value.layout === 'home')\n return false;\n if (frontmatter.value.aside != null)\n return !!frontmatter.value.aside;\n return theme.value.aside !== false;\n });\n const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);\n const sidebarGroups = computed(() => {\n return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];\n });\n function open() {\n isOpen.value = true;\n }\n function close() {\n isOpen.value = false;\n }\n function toggle() {\n isOpen.value ? close() : open();\n }\n return {\n isOpen,\n sidebar,\n sidebarGroups,\n hasSidebar,\n hasAside,\n leftAside,\n isSidebarEnabled,\n open,\n close,\n toggle\n };\n}\n/**\n * a11y: cache the element that opened the Sidebar (the menu button) then\n * focus that button again when Menu is closed with Escape key.\n */\nexport function useCloseSidebarOnEscape(isOpen, close) {\n let triggerElement;\n watchEffect(() => {\n triggerElement = isOpen.value\n ? document.activeElement\n : undefined;\n });\n onMounted(() => {\n window.addEventListener('keyup', onEscape);\n });\n onUnmounted(() => {\n window.removeEventListener('keyup', onEscape);\n });\n function onEscape(e) {\n if (e.key === 'Escape' && isOpen.value) {\n close();\n triggerElement?.focus();\n }\n }\n}\nexport function useSidebarControl(item) {\n const { page } = useData();\n const collapsed = ref(false);\n const collapsible = computed(() => {\n return item.value.collapsed != null;\n });\n const isLink = computed(() => {\n return !!item.value.link;\n });\n const isActiveLink = ref(false);\n const updateIsActiveLink = () => {\n isActiveLink.value = isActive(page.value.relativePath, item.value.link);\n };\n watch([page, item, hashRef], updateIsActiveLink);\n onMounted(updateIsActiveLink);\n const hasActiveLink = computed(() => {\n if (isActiveLink.value) {\n return true;\n }\n return item.value.items\n ? containsActiveLink(page.value.relativePath, item.value.items)\n : false;\n });\n const hasChildren = computed(() => {\n return !!(item.value.items && item.value.items.length);\n });\n watchEffect(() => {\n collapsed.value = !!(collapsible.value && item.value.collapsed);\n });\n watchPostEffect(() => {\n ;\n (isActiveLink.value || hasActiveLink.value) && (collapsed.value = false);\n });\n function toggle() {\n if (collapsible.value) {\n collapsed.value = !collapsed.value;\n }\n }\n return {\n collapsed,\n collapsible,\n isLink,\n isActiveLink,\n hasActiveLink,\n hasChildren,\n toggle\n };\n}\n", "import { onContentUpdated } from 'vitepress';\nimport { computed, shallowRef } from 'vue';\nimport { getHeaders } from '../composables/outline';\nimport { useData } from './data';\nexport function useLocalNav() {\n const { theme, frontmatter } = useData();\n const headers = shallowRef([]);\n const hasLocalNav = computed(() => {\n return headers.value.length > 0;\n });\n onContentUpdated(() => {\n headers.value = getHeaders(frontmatter.value.outline ?? theme.value.outline);\n });\n return {\n headers,\n hasLocalNav\n };\n}\n", "import { getScrollOffset } from 'vitepress';\nimport { onMounted, onUnmounted, onUpdated } from 'vue';\nimport { throttleAndDebounce } from '../support/utils';\nimport { useAside } from './aside';\n// cached list of anchor elements from resolveHeaders\nconst resolvedHeaders = [];\nexport function resolveTitle(theme) {\n return ((typeof theme.outline === 'object' &&\n !Array.isArray(theme.outline) &&\n theme.outline.label) ||\n theme.outlineTitle ||\n 'On this page');\n}\nexport function getHeaders(range) {\n const headers = [\n ...document.querySelectorAll('.VPDoc :where(h1,h2,h3,h4,h5,h6)')\n ]\n .filter((el) => el.id && el.hasChildNodes())\n .map((el) => {\n const level = Number(el.tagName[1]);\n return {\n element: el,\n title: serializeHeader(el),\n link: '#' + el.id,\n level\n };\n });\n return resolveHeaders(headers, range);\n}\nfunction serializeHeader(h) {\n let ret = '';\n for (const node of h.childNodes) {\n if (node.nodeType === 1) {\n if (node.classList.contains('VPBadge') ||\n node.classList.contains('header-anchor') ||\n node.classList.contains('ignore-header')) {\n continue;\n }\n ret += node.textContent;\n }\n else if (node.nodeType === 3) {\n ret += node.textContent;\n }\n }\n return ret.trim();\n}\nexport function resolveHeaders(headers, range) {\n if (range === false) {\n return [];\n }\n const levelsRange = (typeof range === 'object' && !Array.isArray(range)\n ? range.level\n : range) || 2;\n const [high, low] = typeof levelsRange === 'number'\n ? [levelsRange, levelsRange]\n : levelsRange === 'deep'\n ? [2, 6]\n : levelsRange;\n headers = headers.filter((h) => h.level >= high && h.level <= low);\n // clear previous caches\n resolvedHeaders.length = 0;\n // update global header list for active link rendering\n for (const { element, link } of headers) {\n resolvedHeaders.push({ element, link });\n }\n const ret = [];\n outer: for (let i = 0; i < headers.length; i++) {\n const cur = headers[i];\n if (i === 0) {\n ret.push(cur);\n }\n else {\n for (let j = i - 1; j >= 0; j--) {\n const prev = headers[j];\n if (prev.level < cur.level) {\n ;\n (prev.children || (prev.children = [])).push(cur);\n continue outer;\n }\n }\n ret.push(cur);\n }\n }\n return ret;\n}\nexport function useActiveAnchor(container, marker) {\n const { isAsideEnabled } = useAside();\n const onScroll = throttleAndDebounce(setActiveLink, 100);\n let prevActiveLink = null;\n onMounted(() => {\n requestAnimationFrame(setActiveLink);\n window.addEventListener('scroll', onScroll);\n });\n onUpdated(() => {\n // sidebar update means a route change\n activateLink(location.hash);\n });\n onUnmounted(() => {\n window.removeEventListener('scroll', onScroll);\n });\n function setActiveLink() {\n if (!isAsideEnabled.value) {\n return;\n }\n const scrollY = window.scrollY;\n const innerHeight = window.innerHeight;\n const offsetHeight = document.body.offsetHeight;\n const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1;\n // resolvedHeaders may be repositioned, hidden or fix positioned\n const headers = resolvedHeaders\n .map(({ element, link }) => ({\n link,\n top: getAbsoluteTop(element)\n }))\n .filter(({ top }) => !Number.isNaN(top))\n .sort((a, b) => a.top - b.top);\n // no headers available for active link\n if (!headers.length) {\n activateLink(null);\n return;\n }\n // page top\n if (scrollY < 1) {\n activateLink(null);\n return;\n }\n // page bottom - highlight last link\n if (isBottom) {\n activateLink(headers[headers.length - 1].link);\n return;\n }\n // find the last header above the top of viewport\n let activeLink = null;\n for (const { link, top } of headers) {\n if (top > scrollY + getScrollOffset() + 4) {\n break;\n }\n activeLink = link;\n }\n activateLink(activeLink);\n }\n function activateLink(hash) {\n if (prevActiveLink) {\n prevActiveLink.classList.remove('active');\n }\n if (hash == null) {\n prevActiveLink = null;\n }\n else {\n prevActiveLink = container.value.querySelector(`a[href=\"${decodeURIComponent(hash)}\"]`);\n }\n const activeLink = prevActiveLink;\n if (activeLink) {\n activeLink.classList.add('active');\n marker.value.style.top = activeLink.offsetTop + 39 + 'px';\n marker.value.style.opacity = '1';\n }\n else {\n marker.value.style.top = '33px';\n marker.value.style.opacity = '0';\n }\n }\n}\nfunction getAbsoluteTop(element) {\n let offsetTop = 0;\n while (element !== document.body) {\n if (element === null) {\n // child element is:\n // - not attached to the DOM (display: none)\n // - set to fixed position (not scrollable)\n // - body or html element (null offsetParent)\n return NaN;\n }\n offsetTop += element.offsetTop;\n element = element.offsetParent;\n }\n return offsetTop;\n}\n"], + "mappings": ";;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,iBAA6B;AACtC,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAAoC;AAC7C,SAAoB,WAAXA,iBAAgC;;;AChBlC,IAAM,YAAY,OAAO,aAAa;;;ACL7C,SAAS,gBAAgB;;;ACAzB,SAAS,WAAW,gBAAgB;AAC7B,IAAM,UAAU;;;ADgBhB,SAAS,oBAAoB,MAAM;AACtC,SAAO,MAAM,KAAK,IAAI,IAAI,OAAO,IAAI,IAAI;AAC7C;;;AEXO,SAAS,WAAW,UAAU,MAAM;AACvC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U,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;", + "names": ["default", "dir", "theme", "theme"] +} diff --git a/paperai-docs/.vitepress/cache/deps/_metadata.json b/paperai-docs/.vitepress/cache/deps/_metadata.json new file mode 100644 index 00000000..ddb461b4 --- /dev/null +++ b/paperai-docs/.vitepress/cache/deps/_metadata.json @@ -0,0 +1,40 @@ +{ + "hash": "8c371e85", + "configHash": "441e0395", + "lockfileHash": "9cf9febc", + "browserHash": "c76444d4", + "optimized": { + "vue": { + "src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", + "file": "vue.js", + "fileHash": "263297c9", + "needsInterop": false + }, + "vitepress > @vue/devtools-api": { + "src": "../../../node_modules/@vue/devtools-api/dist/index.js", + "file": "vitepress___@vue_devtools-api.js", + "fileHash": "483a8161", + "needsInterop": false + }, + "vitepress > @vueuse/core": { + "src": "../../../node_modules/@vueuse/core/index.mjs", + "file": "vitepress___@vueuse_core.js", + "fileHash": "5dcb9da3", + "needsInterop": false + }, + "@theme/index": { + "src": "../../../node_modules/vitepress/dist/client/theme-default/index.js", + "file": "@theme_index.js", + "fileHash": "9a4b4951", + "needsInterop": false + } + }, + "chunks": { + "chunk-DN3Q4TEW": { + "file": "chunk-DN3Q4TEW.js" + }, + "chunk-456JUNPJ": { + "file": "chunk-456JUNPJ.js" + } + } +} \ No newline at end of file diff --git a/paperai-docs/.vitepress/cache/deps/chunk-456JUNPJ.js b/paperai-docs/.vitepress/cache/deps/chunk-456JUNPJ.js new file mode 100644 index 00000000..024b0d45 --- /dev/null +++ b/paperai-docs/.vitepress/cache/deps/chunk-456JUNPJ.js @@ -0,0 +1,11388 @@ +// node_modules/@vue/shared/dist/shared.esm-bundler.js +function makeMap(str, expectsLowerCase) { + const set2 = new Set(str.split(",")); + return expectsLowerCase ? (val) => set2.has(val.toLowerCase()) : (val) => set2.has(val); +} +var EMPTY_OBJ = true ? Object.freeze({}) : {}; +var EMPTY_ARR = true ? Object.freeze([]) : []; +var NOOP = () => { +}; +var NO = () => false; +var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +var isModelListener = (key) => key.startsWith("onUpdate:"); +var extend = Object.assign; +var remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var hasOwn = (val, key) => hasOwnProperty.call(val, key); +var isArray = Array.isArray; +var isMap = (val) => toTypeString(val) === "[object Map]"; +var isSet = (val) => toTypeString(val) === "[object Set]"; +var isDate = (val) => toTypeString(val) === "[object Date]"; +var isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +var isFunction = (val) => typeof val === "function"; +var isString = (val) => typeof val === "string"; +var isSymbol = (val) => typeof val === "symbol"; +var isObject = (val) => val !== null && typeof val === "object"; +var isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +var objectToString = Object.prototype.toString; +var toTypeString = (value) => objectToString.call(value); +var toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +var isPlainObject = (val) => toTypeString(val) === "[object Object]"; +var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +var isReservedProp = makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +var isBuiltInDirective = makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +var cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +var camelizeRE = /-(\w)/g; +var camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +var hyphenateRE = /\B([A-Z])/g; +var hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +var capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +var toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); +var hasChanged = (value, oldValue) => !Object.is(value, oldValue); +var invokeArrayFns = (fns, arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } +}; +var def = (obj, key, value) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +var looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +var toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +var _globalThis; +var getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +var isGloballyAllowed = makeMap(GLOBALS_ALLOWED); +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +var listDelimiterRE = /;(?![^(]*\))/g; +var propertyDelimiterRE = /:([^]+)/; +var styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} +var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +var isHTMLTag = makeMap(HTML_TAGS); +var isSVGTag = makeMap(SVG_TAGS); +var isMathMLTag = makeMap(MATH_TAGS); +var isVoidTag = makeMap(VOID_TAGS); +var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +var isSpecialBooleanAttr = makeMap(specialBooleanAttrs); +var isBooleanAttr = makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +var isKnownHtmlAttr = makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +var isKnownSvgAttr = makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} +var toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +var replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +var stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} +var activeEffectScope; +var EffectScope = class { + constructor(detached = false) { + this.detached = detached; + this._active = true; + this.effects = []; + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else if (true) { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; + } + } +}; +function effectScope(detached) { + return new EffectScope(detached); +} +function recordEffectScope(effect2, scope = activeEffectScope) { + if (scope && scope.active) { + scope.effects.push(effect2); + } +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (true) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} +var activeEffect; +var ReactiveEffect = class { + constructor(fn, trigger2, scheduler, scope) { + this.fn = fn; + this.trigger = trigger2; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + this._dirtyLevel = 4; + this._trackId = 0; + this._runnings = 0; + this._shouldSchedule = false; + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { + this._dirtyLevel = 1; + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 4) { + break; + } + } + } + if (this._dirtyLevel === 1) { + this._dirtyLevel = 0; + } + resetTracking(); + } + return this._dirtyLevel >= 4; + } + set dirty(v) { + this._dirtyLevel = v ? 4 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); + } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; + } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } +}; +function triggerComputed(computed3) { + return computed3.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); + } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); + } + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +var shouldTrack = true; +var pauseScheduleStack = 0; +var trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function pauseScheduling() { + pauseScheduleStack++; +} +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } +} +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; + } + if (true) { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + } +} +var queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + let tracking; + if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); + effect2._dirtyLevel = dirtyLevel; + } + if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + if (true) { + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + effect2.trigger(); + if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { + effect2._shouldSchedule = false; + if (effect2.scheduler) { + queueEffectSchedulers.push(effect2.scheduler); + } + } + } + } + resetScheduling(); +} +var createDep = (cleanup, computed3) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed3; + return dep; +}; +var targetMap = /* @__PURE__ */ new WeakMap(); +var ITERATE_KEY = Symbol(true ? "iterate" : ""); +var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : ""); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + true ? { + target, + type, + key + } : void 0 + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 4, + true ? { + target, + type, + key, + newValue, + oldValue, + oldTarget + } : void 0 + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} +var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`); +var builtInSymbols = new Set( + Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +var arrayInstrumentations = createArrayInstrumentations(); +function createArrayInstrumentations() { + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { + return res; + } + }; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; + }; + }); + return instrumentations; +} +function hasOwnProperty2(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +var BaseReactiveHandler = class { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty2; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +}; +var MutableReactiveHandler = class extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +}; +var ReadonlyReactiveHandler = class extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + if (true) { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + if (true) { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +}; +var mutableHandlers = new MutableReactiveHandler(); +var readonlyHandlers = new ReadonlyReactiveHandler(); +var shallowReactiveHandlers = new MutableReactiveHandler( + true +); +var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true); +var toShallow = (value) => value; +var getProto = (v) => Reflect.getPrototypeOf(v); +function get(target, key, isReadonly2 = false, isShallow2 = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } +} +function has(key, isReadonly2 = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); +} +function size(target, isReadonly2 = false) { + target = target["__v_raw"]; + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); +} +function add(value) { + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; +} +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (true) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; +} +function deleteEntry(key) { + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (true) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; +} +function clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; +} +function createForEach(isReadonly2, isShallow2) { + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; +} +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + if (true) { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations() { + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; +} +var [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = createInstrumentations(); +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +var mutableCollectionHandlers = { + get: createInstrumentationGetter(false, false) +}; +var shallowCollectionHandlers = { + get: createInstrumentationGetter(false, true) +}; +var readonlyCollectionHandlers = { + get: createInstrumentationGetter(true, false) +}; +var shallowReadonlyCollectionHandlers = { + get: createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} +var reactiveMap = /* @__PURE__ */ new WeakMap(); +var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +var readonlyMap = /* @__PURE__ */ new WeakMap(); +var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2; + default: + return 0; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + if (true) { + console.warn(`value cannot be made reactive: ${String(target)}`); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return isReactive(value) || isReadonly(value); +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +var toReactive = (value) => isObject(value) ? reactive(value) : value; +var toReadonly = (value) => isObject(value) ? readonly(value) : value; +var COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; +var ComputedRefImpl = class { + constructor(getter, _setter, isReadonly2, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue( + this, + this.effect._dirtyLevel === 2 ? 2 : 3 + ) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly2; + } + get value() { + const self2 = toRaw(this); + if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) { + triggerRefValue(self2, 4); + } + trackRefValue(self2); + if (self2.effect._dirtyLevel >= 2) { + warn(COMPUTED_SIDE_EFFECT_WARN); + triggerRefValue(self2, 2); + } + return self2._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion +}; +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = true ? () => { + warn("Write operation failed: computed value is readonly"); + } : NOOP; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; +} +function trackRefValue(ref2) { + var _a; + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + (_a = ref2.dep) != null ? _a : ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + ), + true ? { + target: ref2, + type: "get", + key: "value" + } : void 0 + ); + } +} +function triggerRefValue(ref2, dirtyLevel = 4, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + true ? { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } : void 0 + ); + } +} +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +var RefImpl = class { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 4, newVal); + } + } +}; +function triggerRef(ref2) { + triggerRefValue(ref2, 4, true ? ref2.value : void 0); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +var shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +var CustomRefImpl = class { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get: get2, set: set2 } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get2; + this._set = set2; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +}; +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +var ObjectRefImpl = class { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +}; +var GetterRefImpl = class { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +}; +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} +var TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +var TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +var stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (false) + return; + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} +var ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +var ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); +} +function logError(err, type, contextVNode, throwInDev = true) { + if (true) { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else { + console.error(err); + } +} +var isFlushing = false; +var isFlushPending = false; +var queue = []; +var flushIndex = 0; +var pendingPostFlushCbs = []; +var activePostFlushCbs = null; +var postFlushIndex = 0; +var resolvedPromise = Promise.resolve(); +var currentFlushPromise = null; +var RECURSION_LIMIT = 100; +function nextTick(fn) { + const p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); + } + queueFlush(); + } +} +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +var getId = (job) => job.id == null ? Infinity : job.id; +var comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; +function flushJobs(seen) { + isFlushPending = false; + isFlushing = true; + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; + } + callWithErrorHandling(job, null, 14); + } + } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); + } + } +} +var isHmrUpdating = false; +var hmrDirtyComponents = /* @__PURE__ */ new Set(); +if (true) { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +var map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); + } + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} +var devtools$1; +var buffer = []; +var devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version2) { + emit$1("app:init", app, version2, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount", app); +} +var devtoolsComponentAdded = createDevtoolsComponentHook( + "component:added" + /* COMPONENT_ADDED */ +); +var devtoolsComponentUpdated = createDevtoolsComponentHook( + "component:updated" + /* COMPONENT_UPDATED */ +); +var _devtoolsComponentRemoved = createDevtoolsComponentHook( + "component:removed" + /* COMPONENT_REMOVED */ +); +var devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +var devtoolsPerfStart = createDevtoolsPerformanceHook( + "perf:start" + /* PERFORMANCE_START */ +); +var devtoolsPerfEnd = createDevtoolsPerformanceHook( + "perf:end" + /* PERFORMANCE_END */ +); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit", + component.appContext.app, + component, + event, + params + ); +} +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + if (true) { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener2 = event.startsWith("update:"); + const modelArg = isModelListener2 && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (number) { + args = rawArgs.map(looseToNumber); + } + } + if (true) { + devtoolsComponentEmit(instance, event, args); + } + if (true) { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener2) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} +var currentRenderingInstance = null; +var currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +var withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + if (true) { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} +var accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit: emit2, + render: render2, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + if (true) { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render2.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render22 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render22.length > 1 ? render22( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit: emit2 + } : { attrs, slots, emit: emit2 } + ) : render22( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside renders non-element root node that cannot be animated.` + ); + } + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +var getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +var getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +var filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +var isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} +var COMPONENTS = "components"; +var DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else if (true) { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} +var isSuspense = (type) => type.__isSuspense; +var suspenseId = 0; +var SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren +}; +var Suspense = SuspenseImpl; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +var hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + ` is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove: remove2 } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + if (true) { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + if (true) { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + if (true) { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove2(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (true) { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(` slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; +} +var ssrContextKey = Symbol.for("v-scx"); +var useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; +function watchEffect(effect2, options) { + return doWatch(effect2, null, options); +} +function watchPostEffect(effect2, options) { + return doWatch( + effect2, + null, + true ? extend({}, options, { flush: "post" }) : { flush: "post" } + ); +} +function watchSyncEffect(effect2, options) { + return doWatch( + effect2, + null, + true ? extend({}, options, { flush: "sync" }) : { flush: "sync" } + ); +} +var INITIAL_WATCHER_VALUE = {}; +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); + }; + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); + } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect2.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect2.onStop = void 0; + }; + }; + let ssrCleanup; + if (isInSSRComponentSetup) { + onCleanup = NOOP; + if (!cb) { + getter(); + } else if (immediate) { + callWithAsyncErrorHandling(cb, instance, 3, [ + getter(), + isMultiSource ? [] : void 0, + onCleanup + ]); + } + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else { + return NOOP; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect2.active || !effect2.dirty) { + return; + } + if (cb) { + const newValue = effect2.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect2.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect2 = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect2.stop(); + if (scope) { + remove(scope.effects, effect2); + } + }; + if (true) { + effect2.onTrack = onTrack; + effect2.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect2.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect2.run.bind(effect2), + instance && instance.suspense + ); + } else { + effect2.run(); + } + if (ssrCleanup) + ssrCleanup.push(unwatch); + return unwatch; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { + return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; +} +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} +var leaveCbKey = Symbol("_leaveCb"); +var enterCbKey = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +var TransitionHookValidator = [Function, Array]; +var BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +var BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + " can only be used on a single element or component. Use for lists." + ); + break; + } + child = c; + hasFound = true; + if (false) + break; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } +}; +var BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook3 = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook3(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook3(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook3(cancelHook, [el]); + } else { + callHook3(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove2) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove2(); + } + callHook3(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove2(); + if (cancelled) { + callHook3(onLeaveCancelled, [el]); + } else { + callHook3(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getKeepAliveChild(vnode) { + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} +var isAsyncWrapper = (i) => !!i.type.__asyncLoader; +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve2, reject) => { + const userRetry = () => resolve2(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} +var isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +var KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + if (true) { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + if (true) { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + if (true) { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + if (true) { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +var KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p2) => matches(p2, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else if (true) { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` + ); + } +} +var createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +var onBeforeMount = createHook("bm"); +var onMounted = createHook("m"); +var onBeforeUpdate = createHook("bu"); +var onUpdated = createHook("u"); +var onBeforeUnmount = createHook("bum"); +var onUnmounted = createHook("um"); +var onServerPrefetch = createHook("sp"); +var onRenderTriggered = createHook( + "rtg" +); +var onRenderTracked = createHook( + "rtc" +); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} +var getPublicInstance = (i) => { + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); +}; +var publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => true ? shallowReadonly(i.props) : i.props, + $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs, + $slots: (i) => true ? shallowReadonly(i.slots) : i.slots, + $refs: (i) => true ? shallowReadonly(i.refs) : i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP + }) +); +var isReservedPrefix = (key) => key === "_" || key === "$"; +var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +var PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1: + return setupState[key]; + case 2: + return data[key]; + case 4: + return ctx[key]; + case 3: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { + accessCache[key] = 0; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/paperai-docs/index.md b/paperai-docs/index.md new file mode 100644 index 00000000..52109489 --- /dev/null +++ b/paperai-docs/index.md @@ -0,0 +1,30 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "paperai-docs" + text: "paperai docs" + tagline: My great project tagline + actions: + - theme: brand + text: paperai-function + link: /paperai-function + - theme: brand + text: paperai-deploy + link: /paperai-deploy + - theme: brand + text: paperai-env + link: /paperai-env + - theme: alt + text: API Examples + link: /api-examples + +features: + - title: Feature 1 使用真实文献 + details: 从各种文献网站获取真实文献 + - title: Feature 2 AI写作 + details: 内置免费AI模型 + - title: Feature 3 文献管理 + details: 将文献有序地排列 +--- diff --git a/paperai-docs/markdown-examples.md b/paperai-docs/markdown-examples.md new file mode 100644 index 00000000..f9258a55 --- /dev/null +++ b/paperai-docs/markdown-examples.md @@ -0,0 +1,85 @@ +# Markdown Extension Examples + +This page demonstrates some of the built-in markdown extensions provided by VitePress. + +## Syntax Highlighting + +VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: + +**Input** + +````md +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` +```` + +**Output** + +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +## Custom Containers + +**Input** + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +**Output** + +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: + +## More + +Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). diff --git a/paperai-docs/node_modules/.bin/esbuild b/paperai-docs/node_modules/.bin/esbuild new file mode 100644 index 00000000..63bb6d40 --- /dev/null +++ b/paperai-docs/node_modules/.bin/esbuild @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@" +else + exec node "$basedir/../esbuild/bin/esbuild" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/esbuild.cmd b/paperai-docs/node_modules/.bin/esbuild.cmd new file mode 100644 index 00000000..cc920c59 --- /dev/null +++ b/paperai-docs/node_modules/.bin/esbuild.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %* diff --git a/paperai-docs/node_modules/.bin/esbuild.ps1 b/paperai-docs/node_modules/.bin/esbuild.ps1 new file mode 100644 index 00000000..81ffbf9c --- /dev/null +++ b/paperai-docs/node_modules/.bin/esbuild.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } else { + & "node$exe" "$basedir/../esbuild/bin/esbuild" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.bin/nanoid b/paperai-docs/node_modules/.bin/nanoid new file mode 100644 index 00000000..46220bdb --- /dev/null +++ b/paperai-docs/node_modules/.bin/nanoid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@" +else + exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/nanoid.cmd b/paperai-docs/node_modules/.bin/nanoid.cmd new file mode 100644 index 00000000..9c40107c --- /dev/null +++ b/paperai-docs/node_modules/.bin/nanoid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %* diff --git a/paperai-docs/node_modules/.bin/nanoid.ps1 b/paperai-docs/node_modules/.bin/nanoid.ps1 new file mode 100644 index 00000000..d8a4d7ad --- /dev/null +++ b/paperai-docs/node_modules/.bin/nanoid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } else { + & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.bin/parser b/paperai-docs/node_modules/.bin/parser new file mode 100644 index 00000000..7696ad41 --- /dev/null +++ b/paperai-docs/node_modules/.bin/parser @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +else + exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/parser.cmd b/paperai-docs/node_modules/.bin/parser.cmd new file mode 100644 index 00000000..1ad5c81c --- /dev/null +++ b/paperai-docs/node_modules/.bin/parser.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/paperai-docs/node_modules/.bin/parser.ps1 b/paperai-docs/node_modules/.bin/parser.ps1 new file mode 100644 index 00000000..8926517b --- /dev/null +++ b/paperai-docs/node_modules/.bin/parser.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } else { + & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.bin/rollup b/paperai-docs/node_modules/.bin/rollup new file mode 100644 index 00000000..998fc164 --- /dev/null +++ b/paperai-docs/node_modules/.bin/rollup @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@" +else + exec node "$basedir/../rollup/dist/bin/rollup" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/rollup.cmd b/paperai-docs/node_modules/.bin/rollup.cmd new file mode 100644 index 00000000..b3f110b3 --- /dev/null +++ b/paperai-docs/node_modules/.bin/rollup.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rollup\dist\bin\rollup" %* diff --git a/paperai-docs/node_modules/.bin/rollup.ps1 b/paperai-docs/node_modules/.bin/rollup.ps1 new file mode 100644 index 00000000..10f657d7 --- /dev/null +++ b/paperai-docs/node_modules/.bin/rollup.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "$basedir/node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } else { + & "node$exe" "$basedir/../rollup/dist/bin/rollup" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.bin/vite b/paperai-docs/node_modules/.bin/vite new file mode 100644 index 00000000..014463f9 --- /dev/null +++ b/paperai-docs/node_modules/.bin/vite @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@" +else + exec node "$basedir/../vite/bin/vite.js" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/vite.cmd b/paperai-docs/node_modules/.bin/vite.cmd new file mode 100644 index 00000000..f62e966d --- /dev/null +++ b/paperai-docs/node_modules/.bin/vite.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %* diff --git a/paperai-docs/node_modules/.bin/vite.ps1 b/paperai-docs/node_modules/.bin/vite.ps1 new file mode 100644 index 00000000..a7759bcf --- /dev/null +++ b/paperai-docs/node_modules/.bin/vite.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args + } else { + & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../vite/bin/vite.js" $args + } else { + & "node$exe" "$basedir/../vite/bin/vite.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.bin/vitepress b/paperai-docs/node_modules/.bin/vitepress new file mode 100644 index 00000000..823385aa --- /dev/null +++ b/paperai-docs/node_modules/.bin/vitepress @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../vitepress/bin/vitepress.js" "$@" +else + exec node "$basedir/../vitepress/bin/vitepress.js" "$@" +fi diff --git a/paperai-docs/node_modules/.bin/vitepress.cmd b/paperai-docs/node_modules/.bin/vitepress.cmd new file mode 100644 index 00000000..2a811c37 --- /dev/null +++ b/paperai-docs/node_modules/.bin/vitepress.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vitepress\bin\vitepress.js" %* diff --git a/paperai-docs/node_modules/.bin/vitepress.ps1 b/paperai-docs/node_modules/.bin/vitepress.ps1 new file mode 100644 index 00000000..edfd8e31 --- /dev/null +++ b/paperai-docs/node_modules/.bin/vitepress.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../vitepress/bin/vitepress.js" $args + } else { + & "$basedir/node$exe" "$basedir/../vitepress/bin/vitepress.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../vitepress/bin/vitepress.js" $args + } else { + & "node$exe" "$basedir/../vitepress/bin/vitepress.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/paperai-docs/node_modules/.package-lock.json b/paperai-docs/node_modules/.package-lock.json new file mode 100644 index 00000000..2c40b01e --- /dev/null +++ b/paperai-docs/node_modules/.package-lock.json @@ -0,0 +1,1044 @@ +{ + "name": "paperai-docs", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.22.1.tgz", + "integrity": "sha512-Sw6IAmOCvvP6QNgY9j+Hv09mvkvEIDKjYW8ow0UDDAxSXy664RBNQk3i/0nt7gvceOJ6jGmOTimaZoY1THmU7g==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.22.1" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.22.1.tgz", + "integrity": "sha512-TJMBKqZNKYB9TptRRjSUtevJeQVXRmg6rk9qgFKWvOy8jhCPdyNZV1nB3SKGufzvTVbomAukFR8guu/8NRKBTA==", + "dev": true + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.22.1.tgz", + "integrity": "sha512-ve+6Ac2LhwpufuWavM/aHjLoNz/Z/sYSgNIXsinGofWOysPilQZPUetqLj8vbvi+DHZZaYSEP9H5SRVXnpsNNw==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.22.1" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.22.1.tgz", + "integrity": "sha512-k8m+oegM2zlns/TwZyi4YgCtyToackkOpE+xCaKCYfBfDtdGOaVZCM5YvGPtK+HGaJMIN/DoTL8asbM3NzHonw==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/client-search": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.22.1.tgz", + "integrity": "sha512-1ssi9pyxyQNN4a7Ji9R50nSdISIumMFDwKNuwZipB6TkauJ8J7ha/uO60sPJFqQyqvvI+px7RSNRQT3Zrvzieg==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/client-search": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.22.1.tgz", + "integrity": "sha512-IvaL5v9mZtm4k4QHbBGDmU3wa/mKokmqNBqPj0K7lcR8ZDKzUorhcGp/u8PkPC/e0zoHSTvRh7TRkGX3Lm7iOQ==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.22.1.tgz", + "integrity": "sha512-sl+/klQJ93+4yaqZ7ezOttMQ/nczly/3GmgZXJ1xmoewP5jmdP/X/nV5U7EHHH3hCUEHeN7X1nsIhGPVt9E1cQ==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.22.1.tgz", + "integrity": "sha512-yb05NA4tNaOgx3+rOxAmFztgMTtGBi97X7PC3jyNeGiwkAjOZc2QrdZBYyIdcDLoI09N0gjtpClcackoTN0gPA==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/@algolia/logger-common": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.22.1.tgz", + "integrity": "sha512-OnTFymd2odHSO39r4DSWRFETkBufnY2iGUZNrMXpIhF5cmFE8pGoINNPzwg02QLBlGSaLqdKy0bM8S0GyqPLBg==", + "dev": true + }, + "node_modules/@algolia/logger-console": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.22.1.tgz", + "integrity": "sha512-O99rcqpVPKN1RlpgD6H3khUWylU24OXlzkavUAMy6QZd1776QAcauE3oP8CmD43nbaTjBexZj2nGsBH9Tc0FVA==", + "dev": true, + "dependencies": { + "@algolia/logger-common": "4.22.1" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.22.1.tgz", + "integrity": "sha512-dtQGYIg6MteqT1Uay3J/0NDqD+UciHy3QgRbk7bNddOJu+p3hzjTRYESqEnoX/DpEkaNYdRHUKNylsqMpgwaEw==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.22.1" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.22.1.tgz", + "integrity": "sha512-dgvhSAtg2MJnR+BxrIFqlLtkLlVVhas9HgYKMk2Uxiy5m6/8HZBL40JVAMb2LovoPFs9I/EWIoFVjOrFwzn5Qg==", + "dev": true + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.22.1.tgz", + "integrity": "sha512-JfmZ3MVFQkAU+zug8H3s8rZ6h0ahHZL/SpMaSasTCGYR5EEJsCc8SI5UZ6raPN2tjxa5bxS13BRpGSBUens7EA==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.22.1" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.22.1.tgz", + "integrity": "sha512-kzWgc2c9IdxMa3YqA6TN0NW5VrKYYW/BELIn7vnLyn+U/RFdZ4lxxt9/8yq3DKV5snvoDzzO4ClyejZRdV3lMQ==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.22.1", + "@algolia/logger-common": "4.22.1", + "@algolia/requester-common": "4.22.1" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", + "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@docsearch/css": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz", + "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==", + "dev": true + }, + "node_modules/@docsearch/js": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.5.2.tgz", + "integrity": "sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==", + "dev": true, + "dependencies": { + "@docsearch/react": "3.5.2", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz", + "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.5.2", + "algoliasearch": "^4.19.1" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", + "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@shikijs/core": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.1.3.tgz", + "integrity": "sha512-1QWSvWcPbvZXsDxB1F7ejW+Kuxp3z/JHs944hp/f8BYOlFd5gplzseFIkE/GTu/qytFef3zNME4qw1oHbQ0j2A==", + "dev": true + }, + "node_modules/@shikijs/transformers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.1.3.tgz", + "integrity": "sha512-jv71dQFTucv2RK2pafAxca4hgKP6Uv5ukKrVjH/vGZ8jGH0j2AcLVCcM76ieamwJ1p5WkZcA0X/Bq2qpjhEUSg==", + "dev": true, + "dependencies": { + "shiki": "1.1.3" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/linkify-it": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.7.tgz", + "integrity": "sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==", + "dev": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", + "dev": true + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "dev": true + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz", + "integrity": "sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==", + "dev": true, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.19.tgz", + "integrity": "sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.9", + "@vue/shared": "3.4.19", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.19.tgz", + "integrity": "sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.4.19", + "@vue/shared": "3.4.19" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.19.tgz", + "integrity": "sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.9", + "@vue/compiler-core": "3.4.19", + "@vue/compiler-dom": "3.4.19", + "@vue/compiler-ssr": "3.4.19", + "@vue/shared": "3.4.19", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.6", + "postcss": "^8.4.33", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.19.tgz", + "integrity": "sha512-P0PLKC4+u4OMJ8sinba/5Z/iDT84uMRRlrWzadgLA69opCpI1gG4N55qDSC+dedwq2fJtzmGald05LWR5TFfLw==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.4.19", + "@vue/shared": "3.4.19" + } + }, + "node_modules/@vue/devtools-api": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.0.14.tgz", + "integrity": "sha512-TluWR9qZ6aO11bwtYK8+fzXxBqLfsE0mWZz1q/EQBmO9k82Cm6deieLwNNXjNFJz7xutazoia5Qa+zTYkPPOfw==", + "dev": true, + "dependencies": { + "@vue/devtools-kit": "^7.0.14" + } + }, + "node_modules/@vue/devtools-kit": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.0.14.tgz", + "integrity": "sha512-wAAJazr4hI0aVRpgWOCVPw+NzMQdthhnprHHIg4njp1MkKrpCNGQ7MtQbZF1AltAA7xpMCGyyt+0kYH0FqTiPg==", + "dev": true, + "dependencies": { + "@vue/devtools-schema": "^7.0.14", + "@vue/devtools-shared": "^7.0.14", + "hookable": "^5.5.3", + "mitt": "^3.0.1", + "perfect-debounce": "^1.0.0", + "speakingurl": "^14.0.1" + } + }, + "node_modules/@vue/devtools-schema": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@vue/devtools-schema/-/devtools-schema-7.0.14.tgz", + "integrity": "sha512-tpUeCLVrdHX+KzWMLTAwx/vAPFbo6jAUi7sr6Q+0mBIqIVSSIxNr5wEhegiFvYva+OtDeM2OrT+f7/X/5bvZNg==", + "dev": true + }, + "node_modules/@vue/devtools-shared": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.0.14.tgz", + "integrity": "sha512-79RP1NDakBVWou9rDpVnT1WMjTbL1lJKm6YEOodjQ0dq5ehf0wsRbeYDhgAlnjehWRzTq5GAYFBFUPYBs0/QpA==", + "dev": true, + "dependencies": { + "rfdc": "^1.3.1" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.19.tgz", + "integrity": "sha512-+VcwrQvLZgEclGZRHx4O2XhyEEcKaBi50WbxdVItEezUf4fqRh838Ix6amWTdX0CNb/b6t3Gkz3eOebfcSt+UA==", + "dev": true, + "dependencies": { + "@vue/shared": "3.4.19" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.19.tgz", + "integrity": "sha512-/Z3tFwOrerJB/oyutmJGoYbuoadphDcJAd5jOuJE86THNZji9pYjZroQ2NFsZkTxOq0GJbb+s2kxTYToDiyZzw==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.4.19", + "@vue/shared": "3.4.19" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.19.tgz", + "integrity": "sha512-IyZzIDqfNCF0OyZOauL+F4yzjMPN2rPd8nhqPP2N1lBn3kYqJpPHHru+83Rkvo2lHz5mW+rEeIMEF9qY3PB94g==", + "dev": true, + "dependencies": { + "@vue/runtime-core": "3.4.19", + "@vue/shared": "3.4.19", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.19.tgz", + "integrity": "sha512-eAj2p0c429RZyyhtMRnttjcSToch+kTWxFPHlzGMkR28ZbF1PDlTcmGmlDxccBuqNd9iOQ7xPRPAGgPVj+YpQw==", + "dev": true, + "dependencies": { + "@vue/compiler-ssr": "3.4.19", + "@vue/shared": "3.4.19" + }, + "peerDependencies": { + "vue": "3.4.19" + } + }, + "node_modules/@vue/shared": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.19.tgz", + "integrity": "sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==", + "dev": true + }, + "node_modules/@vueuse/core": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.2.tgz", + "integrity": "sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.7.2", + "@vueuse/shared": "10.7.2", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", + "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.2.tgz", + "integrity": "sha512-+u3RLPFedjASs5EKPc69Ge49WNgqeMfSxFn+qrQTzblPXZg6+EFzhjarS5edj2qAf6xQ93f95TUxRwKStXj/sQ==", + "dev": true, + "dependencies": { + "@vueuse/core": "10.7.2", + "@vueuse/shared": "10.7.2", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "*", + "axios": "*", + "change-case": "*", + "drauu": "*", + "focus-trap": "*", + "fuse.js": "*", + "idb-keyval": "*", + "jwt-decode": "*", + "nprogress": "*", + "qrcode": "*", + "sortablejs": "*", + "universal-cookie": "*" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations/node_modules/vue-demi": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", + "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.2.tgz", + "integrity": "sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.2.tgz", + "integrity": "sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==", + "dev": true, + "dependencies": { + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", + "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/algoliasearch": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.22.1.tgz", + "integrity": "sha512-jwydKFQJKIx9kIZ8Jm44SdpigFwRGPESaxZBaHSV0XWN2yBJAOT4mT7ppvlrpA4UGzz92pqFnVKr/kaZXrcreg==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.22.1", + "@algolia/cache-common": "4.22.1", + "@algolia/cache-in-memory": "4.22.1", + "@algolia/client-account": "4.22.1", + "@algolia/client-analytics": "4.22.1", + "@algolia/client-common": "4.22.1", + "@algolia/client-personalization": "4.22.1", + "@algolia/client-search": "4.22.1", + "@algolia/logger-common": "4.22.1", + "@algolia/logger-console": "4.22.1", + "@algolia/requester-browser-xhr": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/requester-node-http": "4.22.1", + "@algolia/transporter": "4.22.1" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dev": true, + "dependencies": { + "tabbable": "^6.2.0" + } + }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, + "node_modules/minisearch": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", + "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", + "dev": true + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/preact": { + "version": "10.19.5", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.5.tgz", + "integrity": "sha512-OPELkDmSVbKjbFqF9tgvOowiiQ9TmsJljIzXRyNE8nGiis94pwv1siF78rQkAP1Q1738Ce6pellRg/Ns/CtHqQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true + }, + "node_modules/rollup": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", + "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.12.0", + "@rollup/rollup-android-arm64": "4.12.0", + "@rollup/rollup-darwin-arm64": "4.12.0", + "@rollup/rollup-darwin-x64": "4.12.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", + "@rollup/rollup-linux-arm64-gnu": "4.12.0", + "@rollup/rollup-linux-arm64-musl": "4.12.0", + "@rollup/rollup-linux-riscv64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-musl": "4.12.0", + "@rollup/rollup-win32-arm64-msvc": "4.12.0", + "@rollup/rollup-win32-ia32-msvc": "4.12.0", + "@rollup/rollup-win32-x64-msvc": "4.12.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/search-insights": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.13.0.tgz", + "integrity": "sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==", + "dev": true, + "peer": true + }, + "node_modules/shiki": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.1.3.tgz", + "integrity": "sha512-k/B4UvtWmGcHMLp6JnQminlex3Go5MHKXEiormmzTJECAiSQiwSon6USuwTyto8EMUQc9aYRJ7HojkfVLbBk+g==", + "dev": true, + "dependencies": { + "@shikijs/core": "1.1.3" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/speakingurl": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", + "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, + "node_modules/vite": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", + "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.35", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "1.0.0-rc.42", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.42.tgz", + "integrity": "sha512-VeiVVXFblt/sjruFSJBNChMWwlztMrRMe8UXdNpf4e05mKtTYEY38MF5qoP90KxPTCfMQiKqwEGwXAGuOTK8HQ==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.5.2", + "@docsearch/js": "^3.5.2", + "@shikijs/core": "^1.0.0-rc.0", + "@shikijs/transformers": "^1.0.0-rc.0", + "@types/markdown-it": "^13.0.7", + "@vitejs/plugin-vue": "^5.0.3", + "@vue/devtools-api": "^7.0.14", + "@vueuse/core": "^10.7.2", + "@vueuse/integrations": "^10.7.2", + "focus-trap": "^7.5.4", + "mark.js": "8.11.1", + "minisearch": "^6.3.0", + "shiki": "^1.0.0-rc.0", + "vite": "^5.0.12", + "vue": "^3.4.15" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4.3.2", + "postcss": "^8.4.34" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "postcss": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.19.tgz", + "integrity": "sha512-W/7Fc9KUkajFU8dBeDluM4sRGc/aa4YJnOYck8dkjgZoXtVsn3OeTGni66FV1l3+nvPA7VBFYtPioaGKUmEADw==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.4.19", + "@vue/compiler-sfc": "3.4.19", + "@vue/runtime-dom": "3.4.19", + "@vue/server-renderer": "3.4.19", + "@vue/shared": "3.4.19" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/README.md b/paperai-docs/node_modules/@algolia/autocomplete-core/README.md new file mode 100644 index 00000000..c3e83bb9 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/README.md @@ -0,0 +1,17 @@ +# @algolia/autocomplete-core + +The [`autocomplete-core`](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-core/createAutocomplete) package is the foundation of Autocomplete. It exposes primitives to build an autocomplete experience. + +You likely don’t need to use this package directly unless you’re building a [renderer](https://www.algolia.com/doc/ui-libraries/autocomplete/guides/creating-a-renderer). + +## Installation + +```sh +yarn add @algolia/autocomplete-core +# or +npm install @algolia/autocomplete-core +``` + +## Documentation + +See [**Documentation**](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-core). diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.d.ts new file mode 100644 index 00000000..ef6afb1d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.d.ts @@ -0,0 +1,2 @@ +import { AutocompleteOptions, BaseItem } from './types'; +export declare function checkOptions(options: AutocompleteOptions): void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js new file mode 100644 index 00000000..8f22cbb2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/checkOptions.js @@ -0,0 +1,4 @@ +import { warn } from '@algolia/autocomplete-shared'; +export function checkOptions(options) { + process.env.NODE_ENV !== 'production' ? warn(!options.debug, 'The `debug` option is meant for development debugging and should not be used in production.') : void 0; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.d.ts new file mode 100644 index 00000000..b1b973c6 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.d.ts @@ -0,0 +1,8 @@ +import { AutocompleteApi, AutocompleteOptions as AutocompleteCoreOptions, BaseItem } from './types'; +export interface AutocompleteOptionsWithMetadata extends AutocompleteCoreOptions { + /** + * @internal + */ + __autocomplete_metadata?: Record; +} +export declare function createAutocomplete(options: AutocompleteOptionsWithMetadata): AutocompleteApi; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js new file mode 100644 index 00000000..92b53767 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js @@ -0,0 +1,92 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights'; +import { checkOptions } from './checkOptions'; +import { createStore } from './createStore'; +import { getAutocompleteSetters } from './getAutocompleteSetters'; +import { getDefaultProps } from './getDefaultProps'; +import { getPropGetters } from './getPropGetters'; +import { getMetadata, injectMetadata } from './metadata'; +import { onInput } from './onInput'; +import { stateReducer } from './stateReducer'; +export function createAutocomplete(options) { + checkOptions(options); + var subscribers = []; + var props = getDefaultProps(options, subscribers); + var store = createStore(stateReducer, props, onStoreStateChange); + var setters = getAutocompleteSetters({ + store: store + }); + var propGetters = getPropGetters(_objectSpread({ + props: props, + refresh: refresh, + store: store, + navigator: props.navigator + }, setters)); + function onStoreStateChange(_ref) { + var prevState = _ref.prevState, + state = _ref.state; + props.onStateChange(_objectSpread({ + prevState: prevState, + state: state, + refresh: refresh, + navigator: props.navigator + }, setters)); + } + function refresh() { + return onInput(_objectSpread({ + event: new Event('input'), + nextState: { + isOpen: store.getState().isOpen + }, + props: props, + navigator: props.navigator, + query: store.getState().query, + refresh: refresh, + store: store + }, setters)); + } + if (options.insights && !props.plugins.some(function (plugin) { + return plugin.name === 'aa.algoliaInsightsPlugin'; + })) { + var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights; + props.plugins.push(createAlgoliaInsightsPlugin(insightsParams)); + } + props.plugins.forEach(function (plugin) { + var _plugin$subscribe; + return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, { + navigator: props.navigator, + refresh: refresh, + onSelect: function onSelect(fn) { + subscribers.push({ + onSelect: fn + }); + }, + onActive: function onActive(fn) { + subscribers.push({ + onActive: fn + }); + }, + onResolve: function onResolve(fn) { + subscribers.push({ + onResolve: fn + }); + } + })); + }); + injectMetadata({ + metadata: getMetadata({ + plugins: props.plugins, + options: options + }), + environment: props.environment + }); + return _objectSpread(_objectSpread({ + refresh: refresh, + navigator: props.navigator + }, propGetters), setters); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.d.ts new file mode 100644 index 00000000..1aec83ac --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.d.ts @@ -0,0 +1,7 @@ +import { AutocompleteState, AutocompleteStore, BaseItem, InternalAutocompleteOptions, Reducer } from './types'; +declare type OnStoreStateChange = ({ prevState, state, }: { + prevState: AutocompleteState; + state: AutocompleteState; +}) => void; +export declare function createStore(reducer: Reducer, props: InternalAutocompleteOptions, onStoreStateChange: OnStoreStateChange): AutocompleteStore; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.js new file mode 100644 index 00000000..960bcc25 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/createStore.js @@ -0,0 +1,28 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { createCancelablePromiseList } from './utils'; +export function createStore(reducer, props, onStoreStateChange) { + var state = props.initialState; + return { + getState: function getState() { + return state; + }, + dispatch: function dispatch(action, payload) { + var prevState = _objectSpread({}, state); + state = reducer(state, { + type: action, + props: props, + payload: payload + }); + onStoreStateChange({ + state: state, + prevState: prevState + }); + }, + pendingRequests: createCancelablePromiseList() + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.d.ts new file mode 100644 index 00000000..0fe1e7fc --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.d.ts @@ -0,0 +1,13 @@ +import { AutocompleteCollection, AutocompleteStore, BaseItem } from './types'; +interface GetAutocompleteSettersOptions { + store: AutocompleteStore; +} +export declare function getAutocompleteSetters({ store, }: GetAutocompleteSettersOptions): { + setActiveItemId: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater; + setQuery: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater; + setCollections: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater<(AutocompleteCollection | import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection").AutocompleteCollectionItemsArray)[]>; + setIsOpen: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater; + setStatus: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater<"idle" | "loading" | "stalled" | "error">; + setContext: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters").StateUpdater; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js new file mode 100644 index 00000000..5e9467cf --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js @@ -0,0 +1,48 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { flatten } from '@algolia/autocomplete-shared'; +export function getAutocompleteSetters(_ref) { + var store = _ref.store; + var setActiveItemId = function setActiveItemId(value) { + store.dispatch('setActiveItemId', value); + }; + var setQuery = function setQuery(value) { + store.dispatch('setQuery', value); + }; + var setCollections = function setCollections(rawValue) { + var baseItemId = 0; + var value = rawValue.map(function (collection) { + return _objectSpread(_objectSpread({}, collection), {}, { + // We flatten the stored items to support calling `getAlgoliaResults` + // from the source itself. + items: flatten(collection.items).map(function (item) { + return _objectSpread(_objectSpread({}, item), {}, { + __autocomplete_id: baseItemId++ + }); + }) + }); + }); + store.dispatch('setCollections', value); + }; + var setIsOpen = function setIsOpen(value) { + store.dispatch('setIsOpen', value); + }; + var setStatus = function setStatus(value) { + store.dispatch('setStatus', value); + }; + var setContext = function setContext(value) { + store.dispatch('setContext', value); + }; + return { + setActiveItemId: setActiveItemId, + setQuery: setQuery, + setCollections: setCollections, + setIsOpen: setIsOpen, + setStatus: setStatus, + setContext: setContext + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.d.ts new file mode 100644 index 00000000..f06b2a2a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.d.ts @@ -0,0 +1,6 @@ +import { AutocompleteState, BaseItem } from './types'; +interface GetCompletionProps { + state: AutocompleteState; +} +export declare function getCompletion({ state, }: GetCompletionProps): string | null; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js new file mode 100644 index 00000000..61814f96 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js @@ -0,0 +1,9 @@ +import { getActiveItem } from './utils'; +export function getCompletion(_ref) { + var _getActiveItem; + var state = _ref.state; + if (state.isOpen === false || state.activeItemId === null) { + return null; + } + return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.d.ts new file mode 100644 index 00000000..4dd7dbad --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.d.ts @@ -0,0 +1,2 @@ +import { AutocompleteOptions, AutocompleteSubscribers, BaseItem, InternalAutocompleteOptions } from './types'; +export declare function getDefaultProps(props: AutocompleteOptions, pluginSubscribers: AutocompleteSubscribers): InternalAutocompleteOptions; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js new file mode 100644 index 00000000..d7e08562 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js @@ -0,0 +1,128 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared'; +import { getNormalizedSources } from './utils'; +export function getDefaultProps(props, pluginSubscribers) { + var _props$id; + /* eslint-disable no-restricted-globals */ + var environment = typeof window !== 'undefined' ? window : {}; + /* eslint-enable no-restricted-globals */ + var plugins = props.plugins || []; + return _objectSpread(_objectSpread({ + debug: false, + openOnFocus: false, + placeholder: '', + autoFocus: false, + defaultActiveItemId: null, + stallThreshold: 300, + insights: false, + environment: environment, + shouldPanelOpen: function shouldPanelOpen(_ref) { + var state = _ref.state; + return getItemsCount(state) > 0; + }, + reshape: function reshape(_ref2) { + var sources = _ref2.sources; + return sources; + } + }, props), {}, { + // Since `generateAutocompleteId` triggers a side effect (it increments + // an internal counter), we don't want to execute it if unnecessary. + id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(), + plugins: plugins, + // The following props need to be deeply defaulted. + initialState: _objectSpread({ + activeItemId: null, + query: '', + completion: null, + collections: [], + isOpen: false, + status: 'idle', + context: {} + }, props.initialState), + onStateChange: function onStateChange(params) { + var _props$onStateChange; + (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params); + plugins.forEach(function (x) { + var _x$onStateChange; + return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params); + }); + }, + onSubmit: function onSubmit(params) { + var _props$onSubmit; + (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params); + plugins.forEach(function (x) { + var _x$onSubmit; + return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params); + }); + }, + onReset: function onReset(params) { + var _props$onReset; + (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params); + plugins.forEach(function (x) { + var _x$onReset; + return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params); + }); + }, + getSources: function getSources(params) { + return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) { + return plugin.getSources; + })), [props.getSources]).filter(Boolean).map(function (getSources) { + return getNormalizedSources(getSources, params); + })).then(function (nested) { + return flatten(nested); + }).then(function (sources) { + return sources.map(function (source) { + return _objectSpread(_objectSpread({}, source), {}, { + onSelect: function onSelect(params) { + source.onSelect(params); + pluginSubscribers.forEach(function (x) { + var _x$onSelect; + return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params); + }); + }, + onActive: function onActive(params) { + source.onActive(params); + pluginSubscribers.forEach(function (x) { + var _x$onActive; + return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params); + }); + }, + onResolve: function onResolve(params) { + source.onResolve(params); + pluginSubscribers.forEach(function (x) { + var _x$onResolve; + return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params); + }); + } + }); + }); + }); + }, + navigator: _objectSpread({ + navigate: function navigate(_ref3) { + var itemUrl = _ref3.itemUrl; + environment.location.assign(itemUrl); + }, + navigateNewTab: function navigateNewTab(_ref4) { + var itemUrl = _ref4.itemUrl; + var windowReference = environment.open(itemUrl, '_blank', 'noopener'); + windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus(); + }, + navigateNewWindow: function navigateNewWindow(_ref5) { + var itemUrl = _ref5.itemUrl; + environment.open(itemUrl, '_blank', 'noopener'); + } + }, props.navigator) + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.d.ts new file mode 100644 index 00000000..27f3adf2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.d.ts @@ -0,0 +1,16 @@ +import { AutocompleteScopeApi, AutocompleteStore, BaseItem, GetEnvironmentProps, GetFormProps, GetInputProps, GetItemProps, GetLabelProps, GetListProps, GetPanelProps, GetRootProps, InternalAutocompleteOptions } from './types'; +interface GetPropGettersOptions extends AutocompleteScopeApi { + store: AutocompleteStore; + props: InternalAutocompleteOptions; +} +export declare function getPropGetters({ props, refresh, store, ...setters }: GetPropGettersOptions): { + getEnvironmentProps: GetEnvironmentProps; + getRootProps: GetRootProps; + getFormProps: GetFormProps; + getLabelProps: GetLabelProps; + getInputProps: GetInputProps; + getPanelProps: GetPanelProps; + getListProps: GetListProps; + getItemProps: GetItemProps; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js new file mode 100644 index 00000000..2ea578f8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js @@ -0,0 +1,320 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +var _excluded = ["props", "refresh", "store"], + _excluded2 = ["inputElement", "formElement", "panelElement"], + _excluded3 = ["inputElement"], + _excluded4 = ["inputElement", "maxLength"], + _excluded5 = ["sourceIndex"], + _excluded6 = ["sourceIndex"], + _excluded7 = ["item", "source", "sourceIndex"]; +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } +import { noop } from '@algolia/autocomplete-shared'; +import { onInput } from './onInput'; +import { onKeyDown as _onKeyDown } from './onKeyDown'; +import { getActiveItem, isOrContainsNode, isSamsung } from './utils'; +export function getPropGetters(_ref) { + var props = _ref.props, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties(_ref, _excluded); + var getEnvironmentProps = function getEnvironmentProps(providedProps) { + var inputElement = providedProps.inputElement, + formElement = providedProps.formElement, + panelElement = providedProps.panelElement, + rest = _objectWithoutProperties(providedProps, _excluded2); + function onMouseDownOrTouchStart(event) { + // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur` + // handler when it's not an interaction with Autocomplete. + // We detect it with the following heuristics: + // - the panel is closed AND there are no pending requests + // (no interaction with the autocomplete, no future state updates) + // - OR the touched target is the input element (should open the panel) + var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty(); + if (!isAutocompleteInteraction || event.target === inputElement) { + return; + } + + // @TODO: support cases where there are multiple Autocomplete instances. + // Right now, a second instance makes this computation return false. + var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) { + return isOrContainsNode(contextNode, event.target); + }); + if (isTargetWithinAutocomplete === false) { + store.dispatch('blur', null); + + // If requests are still pending when the user closes the panel, they + // could reopen the panel once they resolve. + // We want to prevent any subsequent query from reopening the panel + // because it would result in an unsolicited UI behavior. + if (!props.debug) { + store.pendingRequests.cancelAll(); + } + } + } + return _objectSpread({ + // We do not rely on the native `blur` event of the input to close the + // panel, but rather on a custom `touchstart`/`mousedown` event outside + // of the autocomplete elements. + // This ensures we don't mistakenly interpret interactions within the + // autocomplete (but outside of the input) as a signal to close the panel. + // For example, clicking reset button causes an input blur, but if + // `openOnFocus=true`, it shouldn't close the panel. + // On touch devices, scrolling results (`touchmove`) causes an input blur + // but shouldn't close the panel. + onTouchStart: onMouseDownOrTouchStart, + onMouseDown: onMouseDownOrTouchStart, + // When scrolling on touch devices (mobiles, tablets, etc.), we want to + // mimic the native platform behavior where the input is blurred to + // hide the virtual keyboard. This gives more vertical space to + // discover all the suggestions showing up in the panel. + onTouchMove: function onTouchMove(event) { + if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) { + return; + } + inputElement.blur(); + } + }, rest); + }; + var getRootProps = function getRootProps(rest) { + return _objectSpread({ + role: 'combobox', + 'aria-expanded': store.getState().isOpen, + 'aria-haspopup': 'listbox', + 'aria-owns': store.getState().isOpen ? "".concat(props.id, "-list") : undefined, + 'aria-labelledby': "".concat(props.id, "-label") + }, rest); + }; + var getFormProps = function getFormProps(providedProps) { + var inputElement = providedProps.inputElement, + rest = _objectWithoutProperties(providedProps, _excluded3); + return _objectSpread({ + action: '', + noValidate: true, + role: 'search', + onSubmit: function onSubmit(event) { + var _providedProps$inputE; + event.preventDefault(); + props.onSubmit(_objectSpread({ + event: event, + refresh: refresh, + state: store.getState() + }, setters)); + store.dispatch('submit', null); + (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur(); + }, + onReset: function onReset(event) { + var _providedProps$inputE2; + event.preventDefault(); + props.onReset(_objectSpread({ + event: event, + refresh: refresh, + state: store.getState() + }, setters)); + store.dispatch('reset', null); + (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus(); + } + }, rest); + }; + var getInputProps = function getInputProps(providedProps) { + var _props$environment$na; + function onFocus(event) { + // We want to trigger a query when `openOnFocus` is true + // because the panel should open with the current query. + if (props.openOnFocus || Boolean(store.getState().query)) { + onInput(_objectSpread({ + event: event, + props: props, + query: store.getState().completion || store.getState().query, + refresh: refresh, + store: store + }, setters)); + } + store.dispatch('focus', null); + } + var _ref2 = providedProps || {}, + inputElement = _ref2.inputElement, + _ref2$maxLength = _ref2.maxLength, + maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength, + rest = _objectWithoutProperties(_ref2, _excluded4); + var activeItem = getActiveItem(store.getState()); + var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || ''; + var shouldFallbackKeyHint = isSamsung(userAgent); + var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search'; + return _objectSpread({ + 'aria-autocomplete': 'both', + 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined, + 'aria-controls': store.getState().isOpen ? "".concat(props.id, "-list") : undefined, + 'aria-labelledby': "".concat(props.id, "-label"), + value: store.getState().completion || store.getState().query, + id: "".concat(props.id, "-input"), + autoComplete: 'off', + autoCorrect: 'off', + autoCapitalize: 'off', + enterKeyHint: enterKeyHint, + spellCheck: 'false', + autoFocus: props.autoFocus, + placeholder: props.placeholder, + maxLength: maxLength, + type: 'search', + onChange: function onChange(event) { + onInput(_objectSpread({ + event: event, + props: props, + query: event.currentTarget.value.slice(0, maxLength), + refresh: refresh, + store: store + }, setters)); + }, + onKeyDown: function onKeyDown(event) { + _onKeyDown(_objectSpread({ + event: event, + props: props, + refresh: refresh, + store: store + }, setters)); + }, + onFocus: onFocus, + // We don't rely on the `blur` event. + // See explanation in `onTouchStart`/`onMouseDown`. + // @MAJOR See if we need to keep this handler. + onBlur: noop, + onClick: function onClick(event) { + // When the panel is closed and you click on the input while + // the input is focused, the `onFocus` event is not triggered + // (default browser behavior). + // In an autocomplete context, it makes sense to open the panel in this + // case. + // We mimic this event by catching the `onClick` event which + // triggers the `onFocus` for the panel to open. + if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) { + onFocus(event); + } + } + }, rest); + }; + var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) { + return typeof sourceId !== 'undefined' ? "".concat(instanceId, "-").concat(sourceId) : instanceId; + }; + var getLabelProps = function getLabelProps(providedProps) { + var _ref3 = providedProps || {}, + sourceIndex = _ref3.sourceIndex, + rest = _objectWithoutProperties(_ref3, _excluded5); + return _objectSpread({ + htmlFor: "".concat(getAutocompleteId(props.id, sourceIndex), "-input"), + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-label") + }, rest); + }; + var getListProps = function getListProps(providedProps) { + var _ref4 = providedProps || {}, + sourceIndex = _ref4.sourceIndex, + rest = _objectWithoutProperties(_ref4, _excluded6); + return _objectSpread({ + role: 'listbox', + 'aria-labelledby': "".concat(getAutocompleteId(props.id, sourceIndex), "-label"), + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-list") + }, rest); + }; + var getPanelProps = function getPanelProps(rest) { + return _objectSpread({ + onMouseDown: function onMouseDown(event) { + // Prevents the `activeElement` from being changed to the panel so + // that the blur event is not triggered, otherwise it closes the + // panel. + event.preventDefault(); + }, + onMouseLeave: function onMouseLeave() { + store.dispatch('mouseleave', null); + } + }, rest); + }; + var getItemProps = function getItemProps(providedProps) { + var item = providedProps.item, + source = providedProps.source, + sourceIndex = providedProps.sourceIndex, + rest = _objectWithoutProperties(providedProps, _excluded7); + return _objectSpread({ + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-item-").concat(item.__autocomplete_id), + role: 'option', + 'aria-selected': store.getState().activeItemId === item.__autocomplete_id, + onMouseMove: function onMouseMove(event) { + if (item.__autocomplete_id === store.getState().activeItemId) { + return; + } + store.dispatch('mousemove', item.__autocomplete_id); + var activeItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && activeItem) { + var _item = activeItem.item, + itemInputValue = activeItem.itemInputValue, + itemUrl = activeItem.itemUrl, + _source = activeItem.source; + _source.onActive(_objectSpread({ + event: event, + item: _item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: _source, + state: store.getState() + }, setters)); + } + }, + onMouseDown: function onMouseDown(event) { + // Prevents the `activeElement` from being changed to the item so it + // can remain with the current `activeElement`. + event.preventDefault(); + }, + onClick: function onClick(event) { + var itemInputValue = source.getItemInputValue({ + item: item, + state: store.getState() + }); + var itemUrl = source.getItemUrl({ + item: item, + state: store.getState() + }); + + // If `getItemUrl` is provided, it means that the suggestion + // is a link, not plain text that aims at updating the query. + // We can therefore skip the state change because it will update + // the `activeItemId`, resulting in a UI flash, especially + // noticeable on mobile. + var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({ + event: event, + nextState: { + isOpen: false + }, + props: props, + query: itemInputValue, + refresh: refresh, + store: store + }, setters)); + runPreCommand.then(function () { + source.onSelect(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + }); + } + }, rest); + }; + return { + getEnvironmentProps: getEnvironmentProps, + getRootProps: getRootProps, + getFormProps: getFormProps, + getLabelProps: getLabelProps, + getInputProps: getInputProps, + getPanelProps: getPanelProps, + getListProps: getListProps, + getItemProps: getItemProps + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.d.ts new file mode 100644 index 00000000..ce100ed6 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.d.ts @@ -0,0 +1,3 @@ +export * from './createAutocomplete'; +export * from './getDefaultProps'; +export * from './types'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.js new file mode 100644 index 00000000..012b3034 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/index.js @@ -0,0 +1,3 @@ +export * from './createAutocomplete'; +export * from './getDefaultProps'; +export * from './types'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.d.ts new file mode 100644 index 00000000..efa9c1c1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.d.ts @@ -0,0 +1,33 @@ +import { UserAgent } from '@algolia/autocomplete-shared'; +import { AutocompleteEnvironment, AutocompleteOptionsWithMetadata, AutocompletePlugin, BaseItem } from '.'; +declare type AutocompleteMetadata = { + plugins: Array<{ + name: string | undefined; + options: string[]; + }>; + options: Record; + ua: UserAgent[]; +}; +declare type GetMetadataParams = { + plugins: Array>; + options: AutocompleteOptionsWithMetadata; +}; +export declare function getMetadata({ plugins, options, }: GetMetadataParams): { + plugins: { + name: string | undefined; + options: string[]; + }[]; + options: { + 'autocomplete-core': string[]; + }; + ua: { + segment: string; + version: string; + }[]; +}; +declare type InlineMetadataParams = { + metadata: AutocompleteMetadata; + environment: AutocompleteEnvironment; +}; +export declare function injectMetadata({ metadata, environment, }: InlineMetadataParams): void; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.js new file mode 100644 index 00000000..308c3630 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/metadata.js @@ -0,0 +1,41 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { userAgents } from '@algolia/autocomplete-shared'; +export function getMetadata(_ref) { + var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3; + var plugins = _ref.plugins, + options = _ref.options; + var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment; + var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {}; + return { + plugins: plugins.map(function (plugin) { + return { + name: plugin.name, + options: Object.keys(plugin.__autocomplete_pluginOptions || []) + }; + }), + options: _objectSpread({ + 'autocomplete-core': Object.keys(options) + }, extraOptions), + ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || []) + }; +} +export function injectMetadata(_ref3) { + var _environment$navigato, _environment$navigato2; + var metadata = _ref3.metadata, + environment = _ref3.environment; + var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler'); + if (isMetadataEnabled) { + var metadataContainer = environment.document.createElement('meta'); + var headRef = environment.document.querySelector('head'); + metadataContainer.name = 'algolia:metadata'; + setTimeout(function () { + metadataContainer.content = JSON.stringify(metadata); + headRef.appendChild(metadataContainer); + }, 0); + } +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.d.ts new file mode 100644 index 00000000..88b699ad --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.d.ts @@ -0,0 +1,18 @@ +import { AutocompleteScopeApi, AutocompleteState, AutocompleteStore, BaseItem, InternalAutocompleteOptions } from './types'; +import { CancelablePromise } from './utils'; +interface OnInputParams extends AutocompleteScopeApi { + event: any; + /** + * The next partial state to apply after the function is called. + * + * This is useful when we call `onInput` in a different scenario than an + * actual input. For example, we use `onInput` when we click on an item, + * but we want to close the panel in that case. + */ + nextState?: Partial>; + props: InternalAutocompleteOptions; + query: string; + store: AutocompleteStore; +} +export declare function onInput({ event, nextState, props, query, refresh, store, ...setters }: OnInputParams): CancelablePromise; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.js new file mode 100644 index 00000000..97107a9a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onInput.js @@ -0,0 +1,125 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +var _excluded = ["event", "nextState", "props", "query", "refresh", "store"]; +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } +import { reshape } from './reshape'; +import { preResolve, resolve, postResolve } from './resolve'; +import { cancelable, createConcurrentSafePromise, getActiveItem } from './utils'; +var lastStalledId = null; +var runConcurrentSafePromise = createConcurrentSafePromise(); +export function onInput(_ref) { + var event = _ref.event, + _ref$nextState = _ref.nextState, + nextState = _ref$nextState === void 0 ? {} : _ref$nextState, + props = _ref.props, + query = _ref.query, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties(_ref, _excluded); + if (lastStalledId) { + props.environment.clearTimeout(lastStalledId); + } + var setCollections = setters.setCollections, + setIsOpen = setters.setIsOpen, + setQuery = setters.setQuery, + setActiveItemId = setters.setActiveItemId, + setStatus = setters.setStatus; + setQuery(query); + setActiveItemId(props.defaultActiveItemId); + if (!query && props.openOnFocus === false) { + var _nextState$isOpen; + var collections = store.getState().collections.map(function (collection) { + return _objectSpread(_objectSpread({}, collection), {}, { + items: [] + }); + }); + setStatus('idle'); + setCollections(collections); + setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({ + state: store.getState() + })); + + // We make sure to update the latest resolved value of the tracked + // promises to keep late resolving promises from "cancelling" the state + // updates performed in this code path. + // We chain with a void promise to respect `onInput`'s expected return type. + var _request = cancelable(runConcurrentSafePromise(collections).then(function () { + return Promise.resolve(); + })); + return store.pendingRequests.add(_request); + } + setStatus('loading'); + lastStalledId = props.environment.setTimeout(function () { + setStatus('stalled'); + }, props.stallThreshold); + + // We track the entire promise chain triggered by `onInput` before mutating + // the Autocomplete state to make sure that any state manipulation is based on + // fresh data regardless of when promises individually resolve. + // We don't track nested promises and only rely on the full chain resolution, + // meaning we should only ever manipulate the state once this concurrent-safe + // promise is resolved. + var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({ + query: query, + refresh: refresh, + state: store.getState() + }, setters)).then(function (sources) { + return Promise.all(sources.map(function (source) { + return Promise.resolve(source.getItems(_objectSpread({ + query: query, + refresh: refresh, + state: store.getState() + }, setters))).then(function (itemsOrDescription) { + return preResolve(itemsOrDescription, source.sourceId, store.getState()); + }); + })).then(resolve).then(function (responses) { + return postResolve(responses, sources, store); + }).then(function (collections) { + return reshape({ + collections: collections, + props: props, + state: store.getState() + }); + }); + }))).then(function (collections) { + var _nextState$isOpen2; + // Parameters passed to `onInput` could be stale when the following code + // executes, because `onInput` calls may not resolve in order. + // If it becomes a problem we'll need to save the last passed parameters. + // See: https://codesandbox.io/s/agitated-cookies-y290z + + setStatus('idle'); + setCollections(collections); + var isPanelOpen = props.shouldPanelOpen({ + state: store.getState() + }); + setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen); + var highlightedItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && highlightedItem) { + var item = highlightedItem.item, + itemInputValue = highlightedItem.itemInputValue, + itemUrl = highlightedItem.itemUrl, + source = highlightedItem.source; + source.onActive(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + } + }).finally(function () { + setStatus('idle'); + if (lastStalledId) { + props.environment.clearTimeout(lastStalledId); + } + }); + return store.pendingRequests.add(request); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.d.ts new file mode 100644 index 00000000..51a1dcee --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.d.ts @@ -0,0 +1,8 @@ +import { AutocompleteScopeApi, AutocompleteStore, BaseItem, InternalAutocompleteOptions } from './types'; +interface OnKeyDownOptions extends AutocompleteScopeApi { + event: KeyboardEvent; + props: InternalAutocompleteOptions; + store: AutocompleteStore; +} +export declare function onKeyDown({ event, props, refresh, store, ...setters }: OnKeyDownOptions): void; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js new file mode 100644 index 00000000..1cb0efd2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js @@ -0,0 +1,195 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +var _excluded = ["event", "props", "refresh", "store"]; +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } +import { onInput } from './onInput'; +import { getActiveItem } from './utils'; +export function onKeyDown(_ref) { + var event = _ref.event, + props = _ref.props, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties(_ref, _excluded); + if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { + // eslint-disable-next-line no-inner-declarations + var triggerScrollIntoView = function triggerScrollIntoView() { + var nodeItem = props.environment.document.getElementById("".concat(props.id, "-item-").concat(store.getState().activeItemId)); + if (nodeItem) { + if (nodeItem.scrollIntoViewIfNeeded) { + nodeItem.scrollIntoViewIfNeeded(false); + } else { + nodeItem.scrollIntoView(false); + } + } + }; // eslint-disable-next-line no-inner-declarations + var triggerOnActive = function triggerOnActive() { + var highlightedItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && highlightedItem) { + var item = highlightedItem.item, + itemInputValue = highlightedItem.itemInputValue, + itemUrl = highlightedItem.itemUrl, + source = highlightedItem.source; + source.onActive(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + } + }; // Default browser behavior changes the caret placement on ArrowUp and + // ArrowDown. + event.preventDefault(); + + // When re-opening the panel, we need to split the logic to keep the actions + // synchronized as `onInput` returns a promise. + if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) { + onInput(_objectSpread({ + event: event, + props: props, + query: store.getState().query, + refresh: refresh, + store: store + }, setters)).then(function () { + store.dispatch(event.key, { + nextActiveItemId: props.defaultActiveItemId + }); + triggerOnActive(); + // Since we rely on the DOM, we need to wait for all the micro tasks to + // finish (which include re-opening the panel) to make sure all the + // elements are available. + setTimeout(triggerScrollIntoView, 0); + }); + } else { + store.dispatch(event.key, {}); + triggerOnActive(); + triggerScrollIntoView(); + } + } else if (event.key === 'Escape') { + // This prevents the default browser behavior on `input[type="search"]` + // from removing the query right away because we first want to close the + // panel. + event.preventDefault(); + store.dispatch(event.key, null); + + // Hitting the `Escape` key signals the end of a user interaction with the + // autocomplete. At this point, we should ignore any requests that are still + // pending and could reopen the panel once they resolve, because that would + // result in an unsolicited UI behavior. + store.pendingRequests.cancelAll(); + } else if (event.key === 'Tab') { + store.dispatch('blur', null); + + // Hitting the `Escape` key signals the end of a user interaction with the + // autocomplete. At this point, we should ignore any requests that are still + // pending and could reopen the panel once they resolve, because that would + // result in an unsolicited UI behavior. + store.pendingRequests.cancelAll(); + } else if (event.key === 'Enter') { + // No active item, so we let the browser handle the native `onSubmit` form + // event. + if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) { + return collection.items.length === 0; + })) { + // If requests are still pending when the panel closes, they could reopen + // the panel once they resolve. + // We want to prevent any subsequent query from reopening the panel + // because it would result in an unsolicited UI behavior. + if (!props.debug) { + store.pendingRequests.cancelAll(); + } + return; + } + + // This prevents the `onSubmit` event to be sent because an item is + // highlighted. + event.preventDefault(); + var _ref2 = getActiveItem(store.getState()), + item = _ref2.item, + itemInputValue = _ref2.itemInputValue, + itemUrl = _ref2.itemUrl, + source = _ref2.source; + if (event.metaKey || event.ctrlKey) { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigateNewTab({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + } + } else if (event.shiftKey) { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigateNewWindow({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + } + } else if (event.altKey) { + // Keep native browser behavior + } else { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigate({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + return; + } + onInput(_objectSpread({ + event: event, + nextState: { + isOpen: false + }, + props: props, + query: itemInputValue, + refresh: refresh, + store: store + }, setters)).then(function () { + source.onSelect(_objectSpread({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + }); + } + } +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.d.ts new file mode 100644 index 00000000..2989b769 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.d.ts @@ -0,0 +1,11 @@ +import { AutocompleteCollection, AutocompleteState, BaseItem, InternalAutocompleteOptions } from './types'; +declare type ReshapeParams = { + collections: Array>; + props: InternalAutocompleteOptions; + state: AutocompleteState; +}; +export declare function reshape({ collections, props, state, }: ReshapeParams): { + source: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape").AutocompleteReshapeSource; + items: TItem[]; +}[]; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.js new file mode 100644 index 00000000..df275c1e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/reshape.js @@ -0,0 +1,45 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { flatten } from '@algolia/autocomplete-shared'; +export function reshape(_ref) { + var collections = _ref.collections, + props = _ref.props, + state = _ref.state; + // Sources are grouped by `sourceId` to conveniently pick them via destructuring. + // Example: `const { recentSearchesPlugin } = sourcesBySourceId` + var originalSourcesBySourceId = collections.reduce(function (acc, collection) { + return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, { + getItems: function getItems() { + // We provide the resolved items from the collection to the `reshape` prop. + return flatten(collection.items); + } + }))); + }, {}); + var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) { + if (plugin.reshape) { + return plugin.reshape(acc); + } + return acc; + }, { + sourcesBySourceId: originalSourcesBySourceId, + state: state + }), + sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId; + var reshapeSources = props.reshape({ + sourcesBySourceId: sourcesBySourceId, + sources: Object.values(sourcesBySourceId), + state: state + }); + + // We reconstruct the collections with the items modified by the `reshape` prop. + return flatten(reshapeSources).filter(Boolean).map(function (source) { + return { + source: source, + items: source.getItems() + }; + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.d.ts new file mode 100644 index 00000000..a68d9f46 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.d.ts @@ -0,0 +1,42 @@ +import type { ExecuteResponse, RequesterDescription, TransformResponse } from '@algolia/autocomplete-preset-algolia'; +import { MultipleQueriesQuery, SearchForFacetValuesResponse, SearchResponse } from '@algolia/client-search'; +import { AutocompleteState, AutocompleteStore, BaseItem, InternalAutocompleteSource } from './types'; +declare type RequestDescriptionPreResolved = Pick, 'execute' | 'requesterId' | 'searchClient' | 'transformResponse'> & { + requests: Array<{ + query: MultipleQueriesQuery; + sourceId: string; + transformResponse: TransformResponse; + }>; +}; +declare type RequestDescriptionPreResolvedCustom = { + items: TItem[] | TItem[][]; + sourceId: string; + transformResponse?: undefined; +}; +export declare function preResolve(itemsOrDescription: TItem[] | TItem[][] | RequesterDescription, sourceId: string, state: AutocompleteState): RequestDescriptionPreResolved | RequestDescriptionPreResolvedCustom; +export declare function resolve(items: Array | RequestDescriptionPreResolvedCustom>): Promise<(RequestDescriptionPreResolvedCustom | { + items: SearchForFacetValuesResponse | SearchResponse; + sourceId: string; + transformResponse: TransformResponse; +})[]>; +export declare function postResolve(responses: Array | ExecuteResponse[0]>, sources: Array>, store: AutocompleteStore): { + source: InternalAutocompleteSource; + items: { + label: string; + count: number; + _highlightResult: { + label: { + value: string; + }; + }; + }[][] | { + label: string; + count: number; + _highlightResult: { + label: { + value: string; + }; + }; + }[] | import("@algolia/client-search").Hit[] | (SearchForFacetValuesResponse | SearchResponse | TItem[] | TItem[][])[]; +}[]; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.js new file mode 100644 index 00000000..d40ea7e1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/resolve.js @@ -0,0 +1,114 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +import { decycle, flatten, invariant } from '@algolia/autocomplete-shared'; +import { mapToAlgoliaResponse } from './utils'; +function isDescription(item) { + return Boolean(item.execute); +} +function isRequesterDescription(description) { + return Boolean(description === null || description === void 0 ? void 0 : description.execute); +} +export function preResolve(itemsOrDescription, sourceId, state) { + if (isRequesterDescription(itemsOrDescription)) { + var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) { + var _state$context$key; + return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters; + })))) : {}; + return _objectSpread(_objectSpread({}, itemsOrDescription), {}, { + requests: itemsOrDescription.queries.map(function (query) { + return { + query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, { + params: _objectSpread(_objectSpread({}, contextParameters), query.params) + }) : query, + sourceId: sourceId, + transformResponse: itemsOrDescription.transformResponse + }; + }) + }); + } + return { + items: itemsOrDescription, + sourceId: sourceId + }; +} +export function resolve(items) { + var packed = items.reduce(function (acc, current) { + if (!isDescription(current)) { + acc.push(current); + return acc; + } + var searchClient = current.searchClient, + execute = current.execute, + requesterId = current.requesterId, + requests = current.requests; + var container = acc.find(function (item) { + return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId; + }); + if (container) { + var _container$items; + (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests)); + } else { + var request = { + execute: execute, + requesterId: requesterId, + items: requests, + searchClient: searchClient + }; + acc.push(request); + } + return acc; + }, []); + var values = packed.map(function (maybeDescription) { + if (!isDescription(maybeDescription)) { + return Promise.resolve(maybeDescription); + } + var _ref = maybeDescription, + execute = _ref.execute, + items = _ref.items, + searchClient = _ref.searchClient; + return execute({ + searchClient: searchClient, + requests: items + }); + }); + return Promise.all(values).then(function (responses) { + return flatten(responses); + }); +} +export function postResolve(responses, sources, store) { + return sources.map(function (source) { + var matches = responses.filter(function (response) { + return response.sourceId === source.sourceId; + }); + var results = matches.map(function (_ref2) { + var items = _ref2.items; + return items; + }); + var transform = matches[0].transformResponse; + var items = transform ? transform(mapToAlgoliaResponse(results)) : results; + source.onResolve({ + source: source, + results: results, + items: items, + state: store.getState() + }); + invariant(Array.isArray(items), function () { + return "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned type ").concat(JSON.stringify(_typeof(items)), ":\n\n").concat(JSON.stringify(decycle(items), null, 2), ".\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"); + }); + invariant(items.every(Boolean), "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned ").concat(JSON.stringify(undefined), ".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems")); + return { + source: source, + items: items + }; + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.d.ts new file mode 100644 index 00000000..48e479b7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.d.ts @@ -0,0 +1,2 @@ +import { Reducer } from './types'; +export declare const stateReducer: Reducer; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js new file mode 100644 index 00000000..8a0ed569 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js @@ -0,0 +1,144 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { getItemsCount, invariant } from '@algolia/autocomplete-shared'; +import { getCompletion } from './getCompletion'; +import { getNextActiveItemId } from './utils'; +export var stateReducer = function stateReducer(state, action) { + switch (action.type) { + case 'setActiveItemId': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: action.payload + }); + } + case 'setQuery': + { + return _objectSpread(_objectSpread({}, state), {}, { + query: action.payload, + completion: null + }); + } + case 'setCollections': + { + return _objectSpread(_objectSpread({}, state), {}, { + collections: action.payload + }); + } + case 'setIsOpen': + { + return _objectSpread(_objectSpread({}, state), {}, { + isOpen: action.payload + }); + } + case 'setStatus': + { + return _objectSpread(_objectSpread({}, state), {}, { + status: action.payload + }); + } + case 'setContext': + { + return _objectSpread(_objectSpread({}, state), {}, { + context: _objectSpread(_objectSpread({}, state.context), action.payload) + }); + } + case 'ArrowDown': + { + var nextState = _objectSpread(_objectSpread({}, state), {}, { + activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId) + }); + return _objectSpread(_objectSpread({}, nextState), {}, { + completion: getCompletion({ + state: nextState + }) + }); + } + case 'ArrowUp': + { + var _nextState = _objectSpread(_objectSpread({}, state), {}, { + activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId) + }); + return _objectSpread(_objectSpread({}, _nextState), {}, { + completion: getCompletion({ + state: _nextState + }) + }); + } + case 'Escape': + { + if (state.isOpen) { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: null, + isOpen: false, + completion: null + }); + } + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: null, + query: '', + status: 'idle', + collections: [] + }); + } + case 'submit': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: null, + isOpen: false, + status: 'idle' + }); + } + case 'reset': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: + // Since we open the panel on reset when openOnFocus=true + // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case) + + // Since we close the panel when openOnFocus=false + // we lose track of the highlighted index. (Query-suggestions use-case) + action.props.openOnFocus === true ? action.props.defaultActiveItemId : null, + status: 'idle', + query: '' + }); + } + case 'focus': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: action.props.defaultActiveItemId, + isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({ + state: state + }) + }); + } + case 'blur': + { + if (action.props.debug) { + return state; + } + return _objectSpread(_objectSpread({}, state), {}, { + isOpen: false, + activeItemId: null + }); + } + case 'mousemove': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: action.payload + }); + } + case 'mouseleave': + { + return _objectSpread(_objectSpread({}, state), {}, { + activeItemId: action.props.defaultActiveItemId + }); + } + default: + invariant(false, "The reducer action ".concat(JSON.stringify(action.type), " is not supported.")); + return state; + } +}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.d.ts new file mode 100644 index 00000000..bffe9fe2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.d.ts @@ -0,0 +1,15 @@ +import { CancelablePromiseList } from '../utils'; +import { BaseItem, InternalAutocompleteOptions, AutocompleteState } from './'; +export interface AutocompleteStore { + getState(): AutocompleteState; + dispatch(action: ActionType, payload: any): void; + pendingRequests: CancelablePromiseList; +} +export declare type Reducer = (state: AutocompleteState, action: Action) => AutocompleteState; +declare type Action = { + type: ActionType; + props: InternalAutocompleteOptions; + payload: TPayload; +}; +export declare type ActionType = 'setActiveItemId' | 'setQuery' | 'setCollections' | 'setIsOpen' | 'setStatus' | 'setContext' | 'ArrowUp' | 'ArrowDown' | 'Escape' | 'Enter' | 'submit' | 'reset' | 'focus' | 'blur' | 'mousemove' | 'mouseleave' | 'click'; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteStore.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.d.ts new file mode 100644 index 00000000..b6a5fed7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.d.ts @@ -0,0 +1,7 @@ +import { BaseItem, OnActiveParams, OnResolveParams, OnSelectParams } from './'; +export declare type AutocompleteSubscriber = { + onSelect(params: OnSelectParams): void; + onActive(params: OnActiveParams): void; + onResolve(params: OnResolveParams): void; +}; +export declare type AutocompleteSubscribers = Array>>; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/AutocompleteSubscribers.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.d.ts new file mode 100644 index 00000000..3ce852c5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.d.ts @@ -0,0 +1,18 @@ +export * from '@algolia/autocomplete-shared/dist/esm/core'; +export * from './AutocompleteStore'; +export * from './AutocompleteSubscribers'; +import { CreateAlgoliaInsightsPluginParams, AutocompleteInsightsApi as _AutocompleteInsightsApi, AlgoliaInsightsHit as _AlgoliaInsightsHit } from '@algolia/autocomplete-plugin-algolia-insights'; +import { AutocompleteOptions as _AutocompleteOptions, BaseItem } from '@algolia/autocomplete-shared/dist/esm/core'; +export declare type AutocompleteInsightsApi = _AutocompleteInsightsApi; +export declare type AlgoliaInsightsHit = _AlgoliaInsightsHit; +export interface AutocompleteOptions extends _AutocompleteOptions { + /** + * Whether to enable the Insights plugin and load the Insights library if it has not been loaded yet. + * + * See [**autocomplete-plugin-algolia-insights**](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/) for more information. + * + * @default false + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-insights + */ + insights?: CreateAlgoliaInsightsPluginParams | boolean; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.js new file mode 100644 index 00000000..8feca058 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/types/index.js @@ -0,0 +1,4 @@ +export * from '@algolia/autocomplete-shared/dist/esm/core'; +export * from './AutocompleteStore'; +export * from './AutocompleteSubscribers'; +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.d.ts new file mode 100644 index 00000000..c3d9bf32 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.d.ts @@ -0,0 +1,15 @@ +declare type PromiseExecutor = (resolve: (value: TValue | PromiseLike) => void, reject: (reason?: any) => void) => void; +export declare type CancelablePromise = { + then(onfulfilled?: ((value: TValue) => TResultFulfilled | PromiseLike | CancelablePromise) | undefined | null, onrejected?: ((reason: any) => TResultRejected | PromiseLike | CancelablePromise) | undefined | null): CancelablePromise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike | CancelablePromise) | undefined | null): CancelablePromise; + finally(onfinally?: (() => void) | undefined | null): CancelablePromise; + cancel(): void; + isCanceled(): boolean; +}; +export declare function createCancelablePromise(executor: PromiseExecutor): CancelablePromise; +export declare namespace createCancelablePromise { + var resolve: (value?: TValue | PromiseLike | CancelablePromise | undefined) => CancelablePromise | undefined>; + var reject: (reason?: any) => CancelablePromise; +} +export declare function cancelable(promise: Promise): CancelablePromise; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js new file mode 100644 index 00000000..6db5f907 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js @@ -0,0 +1,62 @@ +function createInternalCancelablePromise(promise, initialState) { + var state = initialState; + return { + then: function then(onfulfilled, onrejected) { + return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state); + }, + catch: function _catch(onrejected) { + return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state); + }, + finally: function _finally(onfinally) { + if (onfinally) { + state.onCancelList.push(onfinally); + } + return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () { + state.onCancelList = []; + return onfinally(); + }, state, promise)), state); + }, + cancel: function cancel() { + state.isCanceled = true; + var callbacks = state.onCancelList; + state.onCancelList = []; + callbacks.forEach(function (callback) { + callback(); + }); + }, + isCanceled: function isCanceled() { + return state.isCanceled === true; + } + }; +} +export function createCancelablePromise(executor) { + return createInternalCancelablePromise(new Promise(function (resolve, reject) { + return executor(resolve, reject); + }), { + isCanceled: false, + onCancelList: [] + }); +} +createCancelablePromise.resolve = function (value) { + return cancelable(Promise.resolve(value)); +}; +createCancelablePromise.reject = function (reason) { + return cancelable(Promise.reject(reason)); +}; +export function cancelable(promise) { + return createInternalCancelablePromise(promise, { + isCanceled: false, + onCancelList: [] + }); +} +function createCallback(onResult, state, fallback) { + if (!onResult) { + return fallback; + } + return function callback(arg) { + if (state.isCanceled) { + return arg; + } + return onResult(arg); + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.d.ts new file mode 100644 index 00000000..69de0b06 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.d.ts @@ -0,0 +1,21 @@ +import { CancelablePromise } from '.'; +export declare type CancelablePromiseList = { + /** + * Add a cancelable promise to the list. + * + * @param cancelablePromise The cancelable promise to add. + */ + add(cancelablePromise: CancelablePromise): CancelablePromise; + /** + * Cancel all pending promises. + * + * Requests aren't actually stopped. All pending promises will settle, but + * attached handlers won't run. + */ + cancelAll(): void; + /** + * Whether there are pending promises in the list. + */ + isEmpty(): boolean; +}; +export declare function createCancelablePromiseList(): CancelablePromiseList; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js new file mode 100644 index 00000000..13b57856 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js @@ -0,0 +1,21 @@ +export function createCancelablePromiseList() { + var list = []; + return { + add: function add(cancelablePromise) { + list.push(cancelablePromise); + return cancelablePromise.finally(function () { + list = list.filter(function (item) { + return item !== cancelablePromise; + }); + }); + }, + cancelAll: function cancelAll() { + list.forEach(function (promise) { + return promise.cancel(); + }); + }, + isEmpty: function isEmpty() { + return list.length === 0; + } + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.d.ts new file mode 100644 index 00000000..7a4ab5ac --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.d.ts @@ -0,0 +1,8 @@ +import { MaybePromise } from '@algolia/autocomplete-shared'; +/** + * Creates a runner that executes promises in a concurrent-safe way. + * + * This is useful to prevent older promises to resolve after a newer promise, + * otherwise resulting in stale resolved values. + */ +export declare function createConcurrentSafePromise(): (promise: MaybePromise) => Promise; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js new file mode 100644 index 00000000..75cb0c89 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js @@ -0,0 +1,36 @@ +/** + * Creates a runner that executes promises in a concurrent-safe way. + * + * This is useful to prevent older promises to resolve after a newer promise, + * otherwise resulting in stale resolved values. + */ +export function createConcurrentSafePromise() { + var basePromiseId = -1; + var latestResolvedId = -1; + var latestResolvedValue = undefined; + return function runConcurrentSafePromise(promise) { + basePromiseId++; + var currentPromiseId = basePromiseId; + return Promise.resolve(promise).then(function (x) { + // The promise might take too long to resolve and get outdated. This would + // result in resolving stale values. + // When this happens, we ignore the promise value and return the one + // coming from the latest resolved value. + // + // +----------------------------------+ + // | 100ms | + // | run(1) +---> R1 | + // | 300ms | + // | run(2) +-------------> R2 (SKIP) | + // | 200ms | + // | run(3) +--------> R3 | + // +----------------------------------+ + if (latestResolvedValue && currentPromiseId < latestResolvedId) { + return latestResolvedValue; + } + latestResolvedId = currentPromiseId; + latestResolvedValue = x; + return x; + }); + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.d.ts new file mode 100644 index 00000000..d2e3f30a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.d.ts @@ -0,0 +1,7 @@ +import { AutocompleteState, BaseItem } from '../types'; +export declare function getActiveItem(state: AutocompleteState): { + item: TItem; + itemInputValue: string; + itemUrl: string | undefined; + source: import("@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource").InternalAutocompleteSource; +} | null; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js new file mode 100644 index 00000000..84569158 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js @@ -0,0 +1,77 @@ +// We don't have access to the autocomplete source when we call `onKeyDown` +// or `onClick` because those are native browser events. +// However, we can get the source from the suggestion index. +function getCollectionFromActiveItemId(state) { + // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3] + // We want to get the accumulated counts: + // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6] + var accumulatedCollectionsCount = state.collections.map(function (collections) { + return collections.items.length; + }).reduce(function (acc, collectionsCount, index) { + var previousValue = acc[index - 1] || 0; + var nextValue = previousValue + collectionsCount; + acc.push(nextValue); + return acc; + }, []); + + // Based on the accumulated counts, we can infer the index of the suggestion. + var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) { + if (current <= state.activeItemId) { + return acc + 1; + } + return acc; + }, 0); + return state.collections[collectionIndex]; +} + +/** + * Gets the highlighted index relative to a suggestion object (not the absolute + * highlighted index). + * + * Example: + * [['a', 'b'], ['c', 'd', 'e'], ['f']] + * ↑ + * (absolute: 3, relative: 1) + */ +function getRelativeActiveItemId(_ref) { + var state = _ref.state, + collection = _ref.collection; + var isOffsetFound = false; + var counter = 0; + var previousItemsOffset = 0; + while (isOffsetFound === false) { + var currentCollection = state.collections[counter]; + if (currentCollection === collection) { + isOffsetFound = true; + break; + } + previousItemsOffset += currentCollection.items.length; + counter++; + } + return state.activeItemId - previousItemsOffset; +} +export function getActiveItem(state) { + var collection = getCollectionFromActiveItemId(state); + if (!collection) { + return null; + } + var item = collection.items[getRelativeActiveItemId({ + state: state, + collection: collection + })]; + var source = collection.source; + var itemInputValue = source.getItemInputValue({ + item: item, + state: state + }); + var itemUrl = source.getItemUrl({ + item: item, + state: state + }); + return { + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + source: source + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.d.ts new file mode 100644 index 00000000..6ed80b3c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.d.ts @@ -0,0 +1,17 @@ +/** + * Returns the next active item ID from the current state. + * + * We allow circular keyboard navigation from the base index. + * The base index can either be `null` (nothing is highlighted) or `0` + * (the first item is highlighted). + * The base index is allowed to get assigned `null` only if + * `props.defaultActiveItemId` is `null`. This pattern allows to "stop" + * by the actual query before navigating to other suggestions as seen on + * Google or Amazon. + * + * @param moveAmount The offset to increment (or decrement) the last index + * @param baseIndex The current index to compute the next index from + * @param itemCount The number of items + * @param defaultActiveItemId The default active index to fallback to + */ +export declare function getNextActiveItemId(moveAmount: number, baseIndex: number | null, itemCount: number, defaultActiveItemId: number | null): number | null; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js new file mode 100644 index 00000000..a7bb5246 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js @@ -0,0 +1,29 @@ +/** + * Returns the next active item ID from the current state. + * + * We allow circular keyboard navigation from the base index. + * The base index can either be `null` (nothing is highlighted) or `0` + * (the first item is highlighted). + * The base index is allowed to get assigned `null` only if + * `props.defaultActiveItemId` is `null`. This pattern allows to "stop" + * by the actual query before navigating to other suggestions as seen on + * Google or Amazon. + * + * @param moveAmount The offset to increment (or decrement) the last index + * @param baseIndex The current index to compute the next index from + * @param itemCount The number of items + * @param defaultActiveItemId The default active index to fallback to + */ +export function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) { + if (!itemCount) { + return null; + } + if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) { + return itemCount + moveAmount; + } + var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount; + if (numericIndex <= -1 || numericIndex >= itemCount) { + return defaultActiveItemId === null ? null : 0; + } + return numericIndex; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.d.ts new file mode 100644 index 00000000..8061dcb1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.d.ts @@ -0,0 +1,2 @@ +import { BaseItem, GetSources, GetSourcesParams, InternalGetSources } from '../types'; +export declare function getNormalizedSources(getSources: GetSources, params: GetSourcesParams): ReturnType>; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js new file mode 100644 index 00000000..ffa3c0c4 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js @@ -0,0 +1,48 @@ +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +import { invariant, decycle, noop } from '@algolia/autocomplete-shared'; +export function getNormalizedSources(getSources, params) { + var seenSourceIds = []; + return Promise.resolve(getSources(params)).then(function (sources) { + invariant(Array.isArray(sources), function () { + return "The `getSources` function must return an array of sources but returned type ".concat(JSON.stringify(_typeof(sources)), ":\n\n").concat(JSON.stringify(decycle(sources), null, 2)); + }); + return Promise.all(sources + // We allow `undefined` and `false` sources to allow users to use + // `Boolean(query) && source` (=> `false`). + // We need to remove these values at this point. + .filter(function (maybeSource) { + return Boolean(maybeSource); + }).map(function (source) { + invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.'); + if (seenSourceIds.includes(source.sourceId)) { + throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(source.sourceId), " is not unique.")); + } + seenSourceIds.push(source.sourceId); + var defaultSource = { + getItemInputValue: function getItemInputValue(_ref) { + var state = _ref.state; + return state.query; + }, + getItemUrl: function getItemUrl() { + return undefined; + }, + onSelect: function onSelect(_ref2) { + var setIsOpen = _ref2.setIsOpen; + setIsOpen(false); + }, + onActive: noop, + onResolve: noop + }; + Object.keys(defaultSource).forEach(function (key) { + defaultSource[key].__default = true; + }); + var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source); + return Promise.resolve(normalizedSource); + })); + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.d.ts new file mode 100644 index 00000000..d30313d5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.d.ts @@ -0,0 +1,9 @@ +export * from './createCancelablePromise'; +export * from './createCancelablePromiseList'; +export * from './createConcurrentSafePromise'; +export * from './getNextActiveItemId'; +export * from './getNormalizedSources'; +export * from './getActiveItem'; +export * from './isOrContainsNode'; +export * from './isSamsung'; +export * from './mapToAlgoliaResponse'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.js new file mode 100644 index 00000000..2c2d44a5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/index.js @@ -0,0 +1,9 @@ +export * from './createCancelablePromise'; +export * from './createCancelablePromiseList'; +export * from './createConcurrentSafePromise'; +export * from './getNextActiveItemId'; +export * from './getNormalizedSources'; +export * from './getActiveItem'; +export * from './isOrContainsNode'; +export * from './isSamsung'; +export * from './mapToAlgoliaResponse'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.d.ts new file mode 100644 index 00000000..8ee16d0f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.d.ts @@ -0,0 +1 @@ +export declare function isOrContainsNode(parent: Node, child: Node): boolean; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js new file mode 100644 index 00000000..7cc4d9b5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js @@ -0,0 +1,3 @@ +export function isOrContainsNode(parent, child) { + return parent === child || parent.contains(child); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.d.ts new file mode 100644 index 00000000..515e21a6 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.d.ts @@ -0,0 +1 @@ +export declare function isSamsung(userAgent: string): boolean; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js new file mode 100644 index 00000000..55e7bfa0 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js @@ -0,0 +1,4 @@ +var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i; +export function isSamsung(userAgent) { + return Boolean(userAgent && userAgent.match(regex)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.d.ts new file mode 100644 index 00000000..6312421b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.d.ts @@ -0,0 +1,14 @@ +import type { SearchForFacetValuesResponse, SearchResponse } from '@algolia/client-search'; +export declare function mapToAlgoliaResponse(rawResults: Array | SearchForFacetValuesResponse>): { + results: (SearchResponse | SearchForFacetValuesResponse)[]; + hits: import("@algolia/client-search").Hit[][]; + facetHits: { + label: string; + count: number; + _highlightResult: { + label: { + value: string; + }; + }; + }[][]; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js new file mode 100644 index 00000000..435eee2e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js @@ -0,0 +1,23 @@ +export function mapToAlgoliaResponse(rawResults) { + return { + results: rawResults, + hits: rawResults.map(function (result) { + return result.hits; + }).filter(Boolean), + facetHits: rawResults.map(function (result) { + var _facetHits; + return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) { + // Bring support for the highlighting components. + return { + label: facetHit.value, + count: facetHit.count, + _highlightResult: { + label: { + value: facetHit.highlighted + } + } + }; + }); + }).filter(Boolean) + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js new file mode 100644 index 00000000..2a52c3a7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js @@ -0,0 +1,2471 @@ +/*! @algolia/autocomplete-core 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@algolia/autocomplete-core"] = {})); +})(this, (function (exports) { 'use strict'; + + function ownKeys$2(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { + _defineProperty$2(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _typeof$3(obj) { + "@babel/helpers - typeof"; + + return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof$3(obj); + } + function _defineProperty$2(obj, key, value) { + key = _toPropertyKey$2(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _objectWithoutPropertiesLoose$1(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; + } + function _objectWithoutProperties$1(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose$1(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; + } + function _toConsumableArray$2(arr) { + return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); + } + function _arrayWithoutHoles$2(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); + } + function _iterableToArray$2(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _unsupportedIterableToArray$4(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); + } + function _arrayLikeToArray$4(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _nonIterableSpread$2() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _toPrimitive$2(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + function _toPropertyKey$2(arg) { + var key = _toPrimitive$2(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + + function createRef(initialValue) { + return { + current: initialValue + }; + } + + function debounce(fn, time) { + var timerId = undefined; + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (timerId) { + clearTimeout(timerId); + } + timerId = setTimeout(function () { + return fn.apply(void 0, args); + }, time); + }; + } + + function _slicedToArray$1(arr, i) { + return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$1(); + } + function _nonIterableRest$1() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray$3(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); + } + function _arrayLikeToArray$3(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _iterableToArrayLimit$1(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } + } + function _arrayWithHoles$1(arr) { + if (Array.isArray(arr)) return arr; + } + function _typeof$2(obj) { + "@babel/helpers - typeof"; + + return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof$2(obj); + } + /** + * Decycles objects with circular references. + * This is used to print cyclic structures in development environment only. + */ + function decycle(obj) { + var seen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set(); + if (!obj || _typeof$2(obj) !== 'object') { + return obj; + } + if (seen.has(obj)) { + return '[Circular]'; + } + var newSeen = seen.add(obj); + if (Array.isArray(obj)) { + return obj.map(function (x) { + return decycle(x, newSeen); + }); + } + return Object.fromEntries(Object.entries(obj).map(function (_ref) { + var _ref2 = _slicedToArray$1(_ref, 2), + key = _ref2[0], + value = _ref2[1]; + return [key, decycle(value, newSeen)]; + })); + } + + function flatten(values) { + return values.reduce(function (a, b) { + return a.concat(b); + }, []); + } + + var autocompleteId = 0; + function generateAutocompleteId() { + return "autocomplete-".concat(autocompleteId++); + } + + function getItemsCount(state) { + if (state.collections.length === 0) { + return 0; + } + return state.collections.reduce(function (sum, collection) { + return sum + collection.items.length; + }, 0); + } + + /** + * Throws an error if the condition is not met in development mode. + * This is used to make development a better experience to provide guidance as + * to where the error comes from. + */ + function invariant(condition, message) { + if (!condition) { + throw new Error("[Autocomplete] ".concat(typeof message === 'function' ? message() : message)); + } + } + + function isPrimitive(obj) { + return obj !== Object(obj); + } + function isEqual(first, second) { + if (first === second) { + return true; + } + if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') { + return first === second; + } + if (Object.keys(first).length !== Object.keys(second).length) { + return false; + } + for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + if (!(key in second)) { + return false; + } + if (!isEqual(first[key], second[key])) { + return false; + } + } + return true; + } + + var noop = function noop() {}; + + /** + * Safely runs code meant for browser environments only. + */ + function safelyRunOnBrowser(callback) { + if (typeof window !== 'undefined') { + return callback({ + window: window + }); + } + return undefined; + } + + var version = '1.9.3'; + + var userAgents = [{ + segment: 'autocomplete-core', + version: version + }]; + + var warnCache = { + current: {} + }; + + /** + * Logs a warning if the condition is not met. + * This is used to log issues in development environment only. + */ + function warn(condition, message) { + if (condition) { + return; + } + var sanitizedMessage = message.trim(); + var hasAlreadyPrinted = warnCache.current[sanitizedMessage]; + if (!hasAlreadyPrinted) { + warnCache.current[sanitizedMessage] = true; + + // eslint-disable-next-line no-console + console.warn("[Autocomplete] ".concat(sanitizedMessage)); + } + } + + function createClickedEvent(_ref) { + var item = _ref.item, + items = _ref.items; + return { + index: item.__autocomplete_indexName, + items: [item], + positions: [1 + items.findIndex(function (x) { + return x.objectID === item.objectID; + })], + queryID: item.__autocomplete_queryID, + algoliaSource: ['autocomplete'] + }; + } + + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest(); + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray$2(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); + } + function _arrayLikeToArray$2(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _iterableToArrayLimit(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + /** + * Determines if a given insights `client` supports the optional call to `init` + * and the ability to set credentials via extra parameters when sending events. + */ + function isModernInsightsClient(client) { + var _split$map = (client.version || '').split('.').map(Number), + _split$map2 = _slicedToArray(_split$map, 2), + major = _split$map2[0], + minor = _split$map2[1]; + + /* eslint-disable @typescript-eslint/camelcase */ + var v3 = major >= 3; + var v2_4 = major === 2 && minor >= 4; + var v1_10 = major === 1 && minor >= 10; + return v3 || v2_4 || v1_10; + /* eslint-enable @typescript-eslint/camelcase */ + } + + var _excluded$3 = ["items"], + _excluded2$1 = ["items"]; + function _typeof$1(obj) { + "@babel/helpers - typeof"; + + return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof$1(obj); + } + function _toConsumableArray$1(arr) { + return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1(); + } + function _nonIterableSpread$1() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray$1(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); + } + function _iterableToArray$1(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _arrayWithoutHoles$1(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); + } + function _arrayLikeToArray$1(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; + } + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; + } + function ownKeys$1(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread$1(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { + _defineProperty$1(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty$1(obj, key, value) { + key = _toPropertyKey$1(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _toPropertyKey$1(arg) { + var key = _toPrimitive$1(arg, "string"); + return _typeof$1(key) === "symbol" ? key : String(key); + } + function _toPrimitive$1(input, hint) { + if (_typeof$1(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_typeof$1(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + function chunk(item) { + var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20; + var chunks = []; + for (var i = 0; i < item.objectIDs.length; i += chunkSize) { + chunks.push(_objectSpread$1(_objectSpread$1({}, item), {}, { + objectIDs: item.objectIDs.slice(i, i + chunkSize) + })); + } + return chunks; + } + function mapToInsightsParamsApi(params) { + return params.map(function (_ref) { + var items = _ref.items, + param = _objectWithoutProperties(_ref, _excluded$3); + return _objectSpread$1(_objectSpread$1({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) { + var objectID = _ref2.objectID; + return objectID; + })) || param.objectIDs + }); + }); + } + function createSearchInsightsApi(searchInsights) { + var canSendHeaders = isModernInsightsClient(searchInsights); + function sendToInsights(method, payloads, items) { + if (canSendHeaders && typeof items !== 'undefined') { + var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials, + appId = _items$0$__autocomple.appId, + apiKey = _items$0$__autocomple.apiKey; + var headers = { + 'X-Algolia-Application-Id': appId, + 'X-Algolia-API-Key': apiKey + }; + searchInsights.apply(void 0, [method].concat(_toConsumableArray$1(payloads), [{ + headers: headers + }])); + } else { + searchInsights.apply(void 0, [method].concat(_toConsumableArray$1(payloads))); + } + } + return { + /** + * Initializes Insights with Algolia credentials. + */ + init: function init(appId, apiKey) { + searchInsights('init', { + appId: appId, + apiKey: apiKey + }); + }, + /** + * Sets the user token to attach to events. + */ + setUserToken: function setUserToken(userToken) { + searchInsights('setUserToken', userToken); + }, + /** + * Sends click events to capture a query and its clicked items and positions. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/ + */ + clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() { + for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) { + params[_key] = arguments[_key]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/ + */ + clickedObjectIDs: function clickedObjectIDs() { + for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + params[_key2] = arguments[_key2]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture the filters a user clicks on. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/ + */ + clickedFilters: function clickedFilters() { + for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + params[_key3] = arguments[_key3]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['clickedFilters'].concat(params)); + } + }, + /** + * Sends conversion events to capture a query and its clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/ + */ + convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() { + for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + params[_key4] = arguments[_key4]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/ + */ + convertedObjectIDs: function convertedObjectIDs() { + for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + params[_key5] = arguments[_key5]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture the filters a user uses when converting. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/ + */ + convertedFilters: function convertedFilters() { + for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + params[_key6] = arguments[_key6]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['convertedFilters'].concat(params)); + } + }, + /** + * Sends view events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/ + */ + viewedObjectIDs: function viewedObjectIDs() { + for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + params[_key7] = arguments[_key7]; + } + if (params.length > 0) { + params.reduce(function (acc, _ref3) { + var items = _ref3.items, + param = _objectWithoutProperties(_ref3, _excluded2$1); + return [].concat(_toConsumableArray$1(acc), _toConsumableArray$1(chunk(_objectSpread$1(_objectSpread$1({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) { + var objectID = _ref4.objectID; + return objectID; + })) || param.objectIDs + })).map(function (payload) { + return { + items: items, + payload: payload + }; + }))); + }, []).forEach(function (_ref5) { + var items = _ref5.items, + payload = _ref5.payload; + return sendToInsights('viewedObjectIDs', [payload], items); + }); + } + }, + /** + * Sends view events to capture the filters a user uses when viewing. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/ + */ + viewedFilters: function viewedFilters() { + for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { + params[_key8] = arguments[_key8]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['viewedFilters'].concat(params)); + } + } + }; + } + + function createViewedEvents(_ref) { + var items = _ref.items; + var itemsByIndexName = items.reduce(function (acc, current) { + var _acc$current$__autoco; + acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current); + return acc; + }, {}); + return Object.keys(itemsByIndexName).map(function (indexName) { + var items = itemsByIndexName[indexName]; + return { + index: indexName, + items: items, + algoliaSource: ['autocomplete'] + }; + }); + } + + function isAlgoliaInsightsHit(hit) { + return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID; + } + + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return _typeof(key) === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (_typeof(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_typeof(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var VIEW_EVENT_DELAY = 400; + var ALGOLIA_INSIGHTS_VERSION = '2.6.0'; + var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js"); + var sendViewedObjectIDs = debounce(function (_ref) { + var onItemsChange = _ref.onItemsChange, + items = _ref.items, + insights = _ref.insights, + state = _ref.state; + onItemsChange({ + insights: insights, + insightsEvents: createViewedEvents({ + items: items + }).map(function (event) { + return _objectSpread({ + eventName: 'Items Viewed' + }, event); + }), + state: state + }); + }, VIEW_EVENT_DELAY); + function createAlgoliaInsightsPlugin(options) { + var _getOptions = getOptions(options), + providedInsightsClient = _getOptions.insightsClient, + onItemsChange = _getOptions.onItemsChange, + onSelectEvent = _getOptions.onSelect, + onActiveEvent = _getOptions.onActive; + var insightsClient = providedInsightsClient; + if (!providedInsightsClient) { + safelyRunOnBrowser(function (_ref2) { + var window = _ref2.window; + var pointer = window.AlgoliaAnalyticsObject || 'aa'; + if (typeof pointer === 'string') { + insightsClient = window[pointer]; + } + if (!insightsClient) { + window.AlgoliaAnalyticsObject = pointer; + if (!window[pointer]) { + window[pointer] = function () { + if (!window[pointer].queue) { + window[pointer].queue = []; + } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + window[pointer].queue.push(args); + }; + } + window[pointer].version = ALGOLIA_INSIGHTS_VERSION; + insightsClient = window[pointer]; + loadInsights(window); + } + }); + } + var insights = createSearchInsightsApi(insightsClient); + var previousItems = createRef([]); + var debouncedOnStateChange = debounce(function (_ref3) { + var state = _ref3.state; + if (!state.isOpen) { + return; + } + var items = state.collections.reduce(function (acc, current) { + return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items)); + }, []).filter(isAlgoliaInsightsHit); + if (!isEqual(previousItems.current.map(function (x) { + return x.objectID; + }), items.map(function (x) { + return x.objectID; + }))) { + previousItems.current = items; + if (items.length > 0) { + sendViewedObjectIDs({ + onItemsChange: onItemsChange, + items: items, + insights: insights, + state: state + }); + } + } + }, 0); + return { + name: 'aa.algoliaInsightsPlugin', + subscribe: function subscribe(_ref4) { + var setContext = _ref4.setContext, + onSelect = _ref4.onSelect, + onActive = _ref4.onActive; + insightsClient('addAlgoliaAgent', 'insights-plugin'); + setContext({ + algoliaInsightsPlugin: { + __algoliaSearchParameters: { + clickAnalytics: true + }, + insights: insights + } + }); + onSelect(function (_ref5) { + var item = _ref5.item, + state = _ref5.state, + event = _ref5.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onSelectEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread({ + eventName: 'Item Selected' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + onActive(function (_ref6) { + var item = _ref6.item, + state = _ref6.state, + event = _ref6.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onActiveEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread({ + eventName: 'Item Active' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + }, + onStateChange: function onStateChange(_ref7) { + var state = _ref7.state; + debouncedOnStateChange({ + state: state + }); + }, + __autocomplete_pluginOptions: options + }; + } + function getOptions(options) { + return _objectSpread({ + onItemsChange: function onItemsChange(_ref8) { + var insights = _ref8.insights, + insightsEvents = _ref8.insightsEvents; + insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread(_objectSpread({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onSelect: function onSelect(_ref9) { + var insights = _ref9.insights, + insightsEvents = _ref9.insightsEvents; + insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread(_objectSpread({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onActive: noop + }, options); + } + function loadInsights(environment) { + var errorMessage = "[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete"; + try { + var script = environment.document.createElement('script'); + script.async = true; + script.src = ALGOLIA_INSIGHTS_SRC; + script.onerror = function () { + // eslint-disable-next-line no-console + console.error(errorMessage); + }; + document.body.appendChild(script); + } catch (cause) { + // eslint-disable-next-line no-console + console.error(errorMessage); + } + } + + function checkOptions(options) { + "development" !== 'production' ? warn(!options.debug, 'The `debug` option is meant for development debugging and should not be used in production.') : void 0; + } + + function createInternalCancelablePromise(promise, initialState) { + var state = initialState; + return { + then: function then(onfulfilled, onrejected) { + return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state); + }, + catch: function _catch(onrejected) { + return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state); + }, + finally: function _finally(onfinally) { + if (onfinally) { + state.onCancelList.push(onfinally); + } + return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () { + state.onCancelList = []; + return onfinally(); + }, state, promise)), state); + }, + cancel: function cancel() { + state.isCanceled = true; + var callbacks = state.onCancelList; + state.onCancelList = []; + callbacks.forEach(function (callback) { + callback(); + }); + }, + isCanceled: function isCanceled() { + return state.isCanceled === true; + } + }; + } + function cancelable(promise) { + return createInternalCancelablePromise(promise, { + isCanceled: false, + onCancelList: [] + }); + } + function createCallback(onResult, state, fallback) { + if (!onResult) { + return fallback; + } + return function callback(arg) { + if (state.isCanceled) { + return arg; + } + return onResult(arg); + }; + } + + function createCancelablePromiseList() { + var list = []; + return { + add: function add(cancelablePromise) { + list.push(cancelablePromise); + return cancelablePromise.finally(function () { + list = list.filter(function (item) { + return item !== cancelablePromise; + }); + }); + }, + cancelAll: function cancelAll() { + list.forEach(function (promise) { + return promise.cancel(); + }); + }, + isEmpty: function isEmpty() { + return list.length === 0; + } + }; + } + + /** + * Creates a runner that executes promises in a concurrent-safe way. + * + * This is useful to prevent older promises to resolve after a newer promise, + * otherwise resulting in stale resolved values. + */ + function createConcurrentSafePromise() { + var basePromiseId = -1; + var latestResolvedId = -1; + var latestResolvedValue = undefined; + return function runConcurrentSafePromise(promise) { + basePromiseId++; + var currentPromiseId = basePromiseId; + return Promise.resolve(promise).then(function (x) { + // The promise might take too long to resolve and get outdated. This would + // result in resolving stale values. + // When this happens, we ignore the promise value and return the one + // coming from the latest resolved value. + // + // +----------------------------------+ + // | 100ms | + // | run(1) +---> R1 | + // | 300ms | + // | run(2) +-------------> R2 (SKIP) | + // | 200ms | + // | run(3) +--------> R3 | + // +----------------------------------+ + if (latestResolvedValue && currentPromiseId < latestResolvedId) { + return latestResolvedValue; + } + latestResolvedId = currentPromiseId; + latestResolvedValue = x; + return x; + }); + }; + } + + /** + * Returns the next active item ID from the current state. + * + * We allow circular keyboard navigation from the base index. + * The base index can either be `null` (nothing is highlighted) or `0` + * (the first item is highlighted). + * The base index is allowed to get assigned `null` only if + * `props.defaultActiveItemId` is `null`. This pattern allows to "stop" + * by the actual query before navigating to other suggestions as seen on + * Google or Amazon. + * + * @param moveAmount The offset to increment (or decrement) the last index + * @param baseIndex The current index to compute the next index from + * @param itemCount The number of items + * @param defaultActiveItemId The default active index to fallback to + */ + function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) { + if (!itemCount) { + return null; + } + if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) { + return itemCount + moveAmount; + } + var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount; + if (numericIndex <= -1 || numericIndex >= itemCount) { + return defaultActiveItemId === null ? null : 0; + } + return numericIndex; + } + + function getNormalizedSources(getSources, params) { + var seenSourceIds = []; + return Promise.resolve(getSources(params)).then(function (sources) { + invariant(Array.isArray(sources), function () { + return "The `getSources` function must return an array of sources but returned type ".concat(JSON.stringify(_typeof$3(sources)), ":\n\n").concat(JSON.stringify(decycle(sources), null, 2)); + }); + return Promise.all(sources + // We allow `undefined` and `false` sources to allow users to use + // `Boolean(query) && source` (=> `false`). + // We need to remove these values at this point. + .filter(function (maybeSource) { + return Boolean(maybeSource); + }).map(function (source) { + invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.'); + if (seenSourceIds.includes(source.sourceId)) { + throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(source.sourceId), " is not unique.")); + } + seenSourceIds.push(source.sourceId); + var defaultSource = { + getItemInputValue: function getItemInputValue(_ref) { + var state = _ref.state; + return state.query; + }, + getItemUrl: function getItemUrl() { + return undefined; + }, + onSelect: function onSelect(_ref2) { + var setIsOpen = _ref2.setIsOpen; + setIsOpen(false); + }, + onActive: noop, + onResolve: noop + }; + Object.keys(defaultSource).forEach(function (key) { + defaultSource[key].__default = true; + }); + var normalizedSource = _objectSpread2(_objectSpread2({}, defaultSource), source); + return Promise.resolve(normalizedSource); + })); + }); + } + + // We don't have access to the autocomplete source when we call `onKeyDown` + // or `onClick` because those are native browser events. + // However, we can get the source from the suggestion index. + function getCollectionFromActiveItemId(state) { + // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3] + // We want to get the accumulated counts: + // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6] + var accumulatedCollectionsCount = state.collections.map(function (collections) { + return collections.items.length; + }).reduce(function (acc, collectionsCount, index) { + var previousValue = acc[index - 1] || 0; + var nextValue = previousValue + collectionsCount; + acc.push(nextValue); + return acc; + }, []); + + // Based on the accumulated counts, we can infer the index of the suggestion. + var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) { + if (current <= state.activeItemId) { + return acc + 1; + } + return acc; + }, 0); + return state.collections[collectionIndex]; + } + + /** + * Gets the highlighted index relative to a suggestion object (not the absolute + * highlighted index). + * + * Example: + * [['a', 'b'], ['c', 'd', 'e'], ['f']] + * ↑ + * (absolute: 3, relative: 1) + */ + function getRelativeActiveItemId(_ref) { + var state = _ref.state, + collection = _ref.collection; + var isOffsetFound = false; + var counter = 0; + var previousItemsOffset = 0; + while (isOffsetFound === false) { + var currentCollection = state.collections[counter]; + if (currentCollection === collection) { + isOffsetFound = true; + break; + } + previousItemsOffset += currentCollection.items.length; + counter++; + } + return state.activeItemId - previousItemsOffset; + } + function getActiveItem(state) { + var collection = getCollectionFromActiveItemId(state); + if (!collection) { + return null; + } + var item = collection.items[getRelativeActiveItemId({ + state: state, + collection: collection + })]; + var source = collection.source; + var itemInputValue = source.getItemInputValue({ + item: item, + state: state + }); + var itemUrl = source.getItemUrl({ + item: item, + state: state + }); + return { + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + source: source + }; + } + + function isOrContainsNode(parent, child) { + return parent === child || parent.contains(child); + } + + var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i; + function isSamsung(userAgent) { + return Boolean(userAgent && userAgent.match(regex)); + } + + function mapToAlgoliaResponse(rawResults) { + return { + results: rawResults, + hits: rawResults.map(function (result) { + return result.hits; + }).filter(Boolean), + facetHits: rawResults.map(function (result) { + var _facetHits; + return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) { + // Bring support for the highlighting components. + return { + label: facetHit.value, + count: facetHit.count, + _highlightResult: { + label: { + value: facetHit.highlighted + } + } + }; + }); + }).filter(Boolean) + }; + } + + function createStore(reducer, props, onStoreStateChange) { + var state = props.initialState; + return { + getState: function getState() { + return state; + }, + dispatch: function dispatch(action, payload) { + var prevState = _objectSpread2({}, state); + state = reducer(state, { + type: action, + props: props, + payload: payload + }); + onStoreStateChange({ + state: state, + prevState: prevState + }); + }, + pendingRequests: createCancelablePromiseList() + }; + } + + function getAutocompleteSetters(_ref) { + var store = _ref.store; + var setActiveItemId = function setActiveItemId(value) { + store.dispatch('setActiveItemId', value); + }; + var setQuery = function setQuery(value) { + store.dispatch('setQuery', value); + }; + var setCollections = function setCollections(rawValue) { + var baseItemId = 0; + var value = rawValue.map(function (collection) { + return _objectSpread2(_objectSpread2({}, collection), {}, { + // We flatten the stored items to support calling `getAlgoliaResults` + // from the source itself. + items: flatten(collection.items).map(function (item) { + return _objectSpread2(_objectSpread2({}, item), {}, { + __autocomplete_id: baseItemId++ + }); + }) + }); + }); + store.dispatch('setCollections', value); + }; + var setIsOpen = function setIsOpen(value) { + store.dispatch('setIsOpen', value); + }; + var setStatus = function setStatus(value) { + store.dispatch('setStatus', value); + }; + var setContext = function setContext(value) { + store.dispatch('setContext', value); + }; + return { + setActiveItemId: setActiveItemId, + setQuery: setQuery, + setCollections: setCollections, + setIsOpen: setIsOpen, + setStatus: setStatus, + setContext: setContext + }; + } + + function getDefaultProps(props, pluginSubscribers) { + var _props$id; + /* eslint-disable no-restricted-globals */ + var environment = typeof window !== 'undefined' ? window : {}; + /* eslint-enable no-restricted-globals */ + var plugins = props.plugins || []; + return _objectSpread2(_objectSpread2({ + debug: false, + openOnFocus: false, + placeholder: '', + autoFocus: false, + defaultActiveItemId: null, + stallThreshold: 300, + insights: false, + environment: environment, + shouldPanelOpen: function shouldPanelOpen(_ref) { + var state = _ref.state; + return getItemsCount(state) > 0; + }, + reshape: function reshape(_ref2) { + var sources = _ref2.sources; + return sources; + } + }, props), {}, { + // Since `generateAutocompleteId` triggers a side effect (it increments + // an internal counter), we don't want to execute it if unnecessary. + id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(), + plugins: plugins, + // The following props need to be deeply defaulted. + initialState: _objectSpread2({ + activeItemId: null, + query: '', + completion: null, + collections: [], + isOpen: false, + status: 'idle', + context: {} + }, props.initialState), + onStateChange: function onStateChange(params) { + var _props$onStateChange; + (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params); + plugins.forEach(function (x) { + var _x$onStateChange; + return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params); + }); + }, + onSubmit: function onSubmit(params) { + var _props$onSubmit; + (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params); + plugins.forEach(function (x) { + var _x$onSubmit; + return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params); + }); + }, + onReset: function onReset(params) { + var _props$onReset; + (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params); + plugins.forEach(function (x) { + var _x$onReset; + return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params); + }); + }, + getSources: function getSources(params) { + return Promise.all([].concat(_toConsumableArray$2(plugins.map(function (plugin) { + return plugin.getSources; + })), [props.getSources]).filter(Boolean).map(function (getSources) { + return getNormalizedSources(getSources, params); + })).then(function (nested) { + return flatten(nested); + }).then(function (sources) { + return sources.map(function (source) { + return _objectSpread2(_objectSpread2({}, source), {}, { + onSelect: function onSelect(params) { + source.onSelect(params); + pluginSubscribers.forEach(function (x) { + var _x$onSelect; + return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params); + }); + }, + onActive: function onActive(params) { + source.onActive(params); + pluginSubscribers.forEach(function (x) { + var _x$onActive; + return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params); + }); + }, + onResolve: function onResolve(params) { + source.onResolve(params); + pluginSubscribers.forEach(function (x) { + var _x$onResolve; + return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params); + }); + } + }); + }); + }); + }, + navigator: _objectSpread2({ + navigate: function navigate(_ref3) { + var itemUrl = _ref3.itemUrl; + environment.location.assign(itemUrl); + }, + navigateNewTab: function navigateNewTab(_ref4) { + var itemUrl = _ref4.itemUrl; + var windowReference = environment.open(itemUrl, '_blank', 'noopener'); + windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus(); + }, + navigateNewWindow: function navigateNewWindow(_ref5) { + var itemUrl = _ref5.itemUrl; + environment.open(itemUrl, '_blank', 'noopener'); + } + }, props.navigator) + }); + } + + function reshape(_ref) { + var collections = _ref.collections, + props = _ref.props, + state = _ref.state; + // Sources are grouped by `sourceId` to conveniently pick them via destructuring. + // Example: `const { recentSearchesPlugin } = sourcesBySourceId` + var originalSourcesBySourceId = collections.reduce(function (acc, collection) { + return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty$2({}, collection.source.sourceId, _objectSpread2(_objectSpread2({}, collection.source), {}, { + getItems: function getItems() { + // We provide the resolved items from the collection to the `reshape` prop. + return flatten(collection.items); + } + }))); + }, {}); + var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) { + if (plugin.reshape) { + return plugin.reshape(acc); + } + return acc; + }, { + sourcesBySourceId: originalSourcesBySourceId, + state: state + }), + sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId; + var reshapeSources = props.reshape({ + sourcesBySourceId: sourcesBySourceId, + sources: Object.values(sourcesBySourceId), + state: state + }); + + // We reconstruct the collections with the items modified by the `reshape` prop. + return flatten(reshapeSources).filter(Boolean).map(function (source) { + return { + source: source, + items: source.getItems() + }; + }); + } + + function isDescription(item) { + return Boolean(item.execute); + } + function isRequesterDescription(description) { + return Boolean(description === null || description === void 0 ? void 0 : description.execute); + } + function preResolve(itemsOrDescription, sourceId, state) { + if (isRequesterDescription(itemsOrDescription)) { + var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray$2(Object.keys(state.context).map(function (key) { + var _state$context$key; + return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters; + })))) : {}; + return _objectSpread2(_objectSpread2({}, itemsOrDescription), {}, { + requests: itemsOrDescription.queries.map(function (query) { + return { + query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread2(_objectSpread2({}, query), {}, { + params: _objectSpread2(_objectSpread2({}, contextParameters), query.params) + }) : query, + sourceId: sourceId, + transformResponse: itemsOrDescription.transformResponse + }; + }) + }); + } + return { + items: itemsOrDescription, + sourceId: sourceId + }; + } + function resolve(items) { + var packed = items.reduce(function (acc, current) { + if (!isDescription(current)) { + acc.push(current); + return acc; + } + var searchClient = current.searchClient, + execute = current.execute, + requesterId = current.requesterId, + requests = current.requests; + var container = acc.find(function (item) { + return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId; + }); + if (container) { + var _container$items; + (_container$items = container.items).push.apply(_container$items, _toConsumableArray$2(requests)); + } else { + var request = { + execute: execute, + requesterId: requesterId, + items: requests, + searchClient: searchClient + }; + acc.push(request); + } + return acc; + }, []); + var values = packed.map(function (maybeDescription) { + if (!isDescription(maybeDescription)) { + return Promise.resolve(maybeDescription); + } + var _ref = maybeDescription, + execute = _ref.execute, + items = _ref.items, + searchClient = _ref.searchClient; + return execute({ + searchClient: searchClient, + requests: items + }); + }); + return Promise.all(values).then(function (responses) { + return flatten(responses); + }); + } + function postResolve(responses, sources, store) { + return sources.map(function (source) { + var matches = responses.filter(function (response) { + return response.sourceId === source.sourceId; + }); + var results = matches.map(function (_ref2) { + var items = _ref2.items; + return items; + }); + var transform = matches[0].transformResponse; + var items = transform ? transform(mapToAlgoliaResponse(results)) : results; + source.onResolve({ + source: source, + results: results, + items: items, + state: store.getState() + }); + invariant(Array.isArray(items), function () { + return "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned type ").concat(JSON.stringify(_typeof$3(items)), ":\n\n").concat(JSON.stringify(decycle(items), null, 2), ".\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"); + }); + invariant(items.every(Boolean), "The `getItems` function from source \"".concat(source.sourceId, "\" must return an array of items but returned ").concat(JSON.stringify(undefined), ".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems")); + return { + source: source, + items: items + }; + }); + } + + var _excluded$2 = ["event", "nextState", "props", "query", "refresh", "store"]; + var lastStalledId = null; + var runConcurrentSafePromise = createConcurrentSafePromise(); + function onInput(_ref) { + var event = _ref.event, + _ref$nextState = _ref.nextState, + nextState = _ref$nextState === void 0 ? {} : _ref$nextState, + props = _ref.props, + query = _ref.query, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties$1(_ref, _excluded$2); + if (lastStalledId) { + props.environment.clearTimeout(lastStalledId); + } + var setCollections = setters.setCollections, + setIsOpen = setters.setIsOpen, + setQuery = setters.setQuery, + setActiveItemId = setters.setActiveItemId, + setStatus = setters.setStatus; + setQuery(query); + setActiveItemId(props.defaultActiveItemId); + if (!query && props.openOnFocus === false) { + var _nextState$isOpen; + var collections = store.getState().collections.map(function (collection) { + return _objectSpread2(_objectSpread2({}, collection), {}, { + items: [] + }); + }); + setStatus('idle'); + setCollections(collections); + setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({ + state: store.getState() + })); + + // We make sure to update the latest resolved value of the tracked + // promises to keep late resolving promises from "cancelling" the state + // updates performed in this code path. + // We chain with a void promise to respect `onInput`'s expected return type. + var _request = cancelable(runConcurrentSafePromise(collections).then(function () { + return Promise.resolve(); + })); + return store.pendingRequests.add(_request); + } + setStatus('loading'); + lastStalledId = props.environment.setTimeout(function () { + setStatus('stalled'); + }, props.stallThreshold); + + // We track the entire promise chain triggered by `onInput` before mutating + // the Autocomplete state to make sure that any state manipulation is based on + // fresh data regardless of when promises individually resolve. + // We don't track nested promises and only rely on the full chain resolution, + // meaning we should only ever manipulate the state once this concurrent-safe + // promise is resolved. + var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread2({ + query: query, + refresh: refresh, + state: store.getState() + }, setters)).then(function (sources) { + return Promise.all(sources.map(function (source) { + return Promise.resolve(source.getItems(_objectSpread2({ + query: query, + refresh: refresh, + state: store.getState() + }, setters))).then(function (itemsOrDescription) { + return preResolve(itemsOrDescription, source.sourceId, store.getState()); + }); + })).then(resolve).then(function (responses) { + return postResolve(responses, sources, store); + }).then(function (collections) { + return reshape({ + collections: collections, + props: props, + state: store.getState() + }); + }); + }))).then(function (collections) { + var _nextState$isOpen2; + // Parameters passed to `onInput` could be stale when the following code + // executes, because `onInput` calls may not resolve in order. + // If it becomes a problem we'll need to save the last passed parameters. + // See: https://codesandbox.io/s/agitated-cookies-y290z + + setStatus('idle'); + setCollections(collections); + var isPanelOpen = props.shouldPanelOpen({ + state: store.getState() + }); + setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen); + var highlightedItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && highlightedItem) { + var item = highlightedItem.item, + itemInputValue = highlightedItem.itemInputValue, + itemUrl = highlightedItem.itemUrl, + source = highlightedItem.source; + source.onActive(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + } + }).finally(function () { + setStatus('idle'); + if (lastStalledId) { + props.environment.clearTimeout(lastStalledId); + } + }); + return store.pendingRequests.add(request); + } + + var _excluded$1 = ["event", "props", "refresh", "store"]; + function onKeyDown(_ref) { + var event = _ref.event, + props = _ref.props, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties$1(_ref, _excluded$1); + if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { + // eslint-disable-next-line no-inner-declarations + var triggerScrollIntoView = function triggerScrollIntoView() { + var nodeItem = props.environment.document.getElementById("".concat(props.id, "-item-").concat(store.getState().activeItemId)); + if (nodeItem) { + if (nodeItem.scrollIntoViewIfNeeded) { + nodeItem.scrollIntoViewIfNeeded(false); + } else { + nodeItem.scrollIntoView(false); + } + } + }; // eslint-disable-next-line no-inner-declarations + var triggerOnActive = function triggerOnActive() { + var highlightedItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && highlightedItem) { + var item = highlightedItem.item, + itemInputValue = highlightedItem.itemInputValue, + itemUrl = highlightedItem.itemUrl, + source = highlightedItem.source; + source.onActive(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + } + }; // Default browser behavior changes the caret placement on ArrowUp and + // ArrowDown. + event.preventDefault(); + + // When re-opening the panel, we need to split the logic to keep the actions + // synchronized as `onInput` returns a promise. + if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) { + onInput(_objectSpread2({ + event: event, + props: props, + query: store.getState().query, + refresh: refresh, + store: store + }, setters)).then(function () { + store.dispatch(event.key, { + nextActiveItemId: props.defaultActiveItemId + }); + triggerOnActive(); + // Since we rely on the DOM, we need to wait for all the micro tasks to + // finish (which include re-opening the panel) to make sure all the + // elements are available. + setTimeout(triggerScrollIntoView, 0); + }); + } else { + store.dispatch(event.key, {}); + triggerOnActive(); + triggerScrollIntoView(); + } + } else if (event.key === 'Escape') { + // This prevents the default browser behavior on `input[type="search"]` + // from removing the query right away because we first want to close the + // panel. + event.preventDefault(); + store.dispatch(event.key, null); + + // Hitting the `Escape` key signals the end of a user interaction with the + // autocomplete. At this point, we should ignore any requests that are still + // pending and could reopen the panel once they resolve, because that would + // result in an unsolicited UI behavior. + store.pendingRequests.cancelAll(); + } else if (event.key === 'Tab') { + store.dispatch('blur', null); + + // Hitting the `Escape` key signals the end of a user interaction with the + // autocomplete. At this point, we should ignore any requests that are still + // pending and could reopen the panel once they resolve, because that would + // result in an unsolicited UI behavior. + store.pendingRequests.cancelAll(); + } else if (event.key === 'Enter') { + // No active item, so we let the browser handle the native `onSubmit` form + // event. + if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) { + return collection.items.length === 0; + })) { + // If requests are still pending when the panel closes, they could reopen + // the panel once they resolve. + // We want to prevent any subsequent query from reopening the panel + // because it would result in an unsolicited UI behavior. + if (!props.debug) { + store.pendingRequests.cancelAll(); + } + return; + } + + // This prevents the `onSubmit` event to be sent because an item is + // highlighted. + event.preventDefault(); + var _ref2 = getActiveItem(store.getState()), + item = _ref2.item, + itemInputValue = _ref2.itemInputValue, + itemUrl = _ref2.itemUrl, + source = _ref2.source; + if (event.metaKey || event.ctrlKey) { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigateNewTab({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + } + } else if (event.shiftKey) { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigateNewWindow({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + } + } else if (event.altKey) ; else { + if (itemUrl !== undefined) { + source.onSelect(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + props.navigator.navigate({ + itemUrl: itemUrl, + item: item, + state: store.getState() + }); + return; + } + onInput(_objectSpread2({ + event: event, + nextState: { + isOpen: false + }, + props: props, + query: itemInputValue, + refresh: refresh, + store: store + }, setters)).then(function () { + source.onSelect(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + }); + } + } + } + + var _excluded = ["props", "refresh", "store"], + _excluded2 = ["inputElement", "formElement", "panelElement"], + _excluded3 = ["inputElement"], + _excluded4 = ["inputElement", "maxLength"], + _excluded5 = ["sourceIndex"], + _excluded6 = ["sourceIndex"], + _excluded7 = ["item", "source", "sourceIndex"]; + function getPropGetters(_ref) { + var props = _ref.props, + refresh = _ref.refresh, + store = _ref.store, + setters = _objectWithoutProperties$1(_ref, _excluded); + var getEnvironmentProps = function getEnvironmentProps(providedProps) { + var inputElement = providedProps.inputElement, + formElement = providedProps.formElement, + panelElement = providedProps.panelElement, + rest = _objectWithoutProperties$1(providedProps, _excluded2); + function onMouseDownOrTouchStart(event) { + // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur` + // handler when it's not an interaction with Autocomplete. + // We detect it with the following heuristics: + // - the panel is closed AND there are no pending requests + // (no interaction with the autocomplete, no future state updates) + // - OR the touched target is the input element (should open the panel) + var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty(); + if (!isAutocompleteInteraction || event.target === inputElement) { + return; + } + + // @TODO: support cases where there are multiple Autocomplete instances. + // Right now, a second instance makes this computation return false. + var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) { + return isOrContainsNode(contextNode, event.target); + }); + if (isTargetWithinAutocomplete === false) { + store.dispatch('blur', null); + + // If requests are still pending when the user closes the panel, they + // could reopen the panel once they resolve. + // We want to prevent any subsequent query from reopening the panel + // because it would result in an unsolicited UI behavior. + if (!props.debug) { + store.pendingRequests.cancelAll(); + } + } + } + return _objectSpread2({ + // We do not rely on the native `blur` event of the input to close the + // panel, but rather on a custom `touchstart`/`mousedown` event outside + // of the autocomplete elements. + // This ensures we don't mistakenly interpret interactions within the + // autocomplete (but outside of the input) as a signal to close the panel. + // For example, clicking reset button causes an input blur, but if + // `openOnFocus=true`, it shouldn't close the panel. + // On touch devices, scrolling results (`touchmove`) causes an input blur + // but shouldn't close the panel. + onTouchStart: onMouseDownOrTouchStart, + onMouseDown: onMouseDownOrTouchStart, + // When scrolling on touch devices (mobiles, tablets, etc.), we want to + // mimic the native platform behavior where the input is blurred to + // hide the virtual keyboard. This gives more vertical space to + // discover all the suggestions showing up in the panel. + onTouchMove: function onTouchMove(event) { + if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) { + return; + } + inputElement.blur(); + } + }, rest); + }; + var getRootProps = function getRootProps(rest) { + return _objectSpread2({ + role: 'combobox', + 'aria-expanded': store.getState().isOpen, + 'aria-haspopup': 'listbox', + 'aria-owns': store.getState().isOpen ? "".concat(props.id, "-list") : undefined, + 'aria-labelledby': "".concat(props.id, "-label") + }, rest); + }; + var getFormProps = function getFormProps(providedProps) { + providedProps.inputElement; + var rest = _objectWithoutProperties$1(providedProps, _excluded3); + return _objectSpread2({ + action: '', + noValidate: true, + role: 'search', + onSubmit: function onSubmit(event) { + var _providedProps$inputE; + event.preventDefault(); + props.onSubmit(_objectSpread2({ + event: event, + refresh: refresh, + state: store.getState() + }, setters)); + store.dispatch('submit', null); + (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur(); + }, + onReset: function onReset(event) { + var _providedProps$inputE2; + event.preventDefault(); + props.onReset(_objectSpread2({ + event: event, + refresh: refresh, + state: store.getState() + }, setters)); + store.dispatch('reset', null); + (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus(); + } + }, rest); + }; + var getInputProps = function getInputProps(providedProps) { + var _props$environment$na; + function onFocus(event) { + // We want to trigger a query when `openOnFocus` is true + // because the panel should open with the current query. + if (props.openOnFocus || Boolean(store.getState().query)) { + onInput(_objectSpread2({ + event: event, + props: props, + query: store.getState().completion || store.getState().query, + refresh: refresh, + store: store + }, setters)); + } + store.dispatch('focus', null); + } + var _ref2 = providedProps || {}; + _ref2.inputElement; + var _ref2$maxLength = _ref2.maxLength, + maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength, + rest = _objectWithoutProperties$1(_ref2, _excluded4); + var activeItem = getActiveItem(store.getState()); + var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || ''; + var shouldFallbackKeyHint = isSamsung(userAgent); + var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search'; + return _objectSpread2({ + 'aria-autocomplete': 'both', + 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? "".concat(props.id, "-item-").concat(store.getState().activeItemId) : undefined, + 'aria-controls': store.getState().isOpen ? "".concat(props.id, "-list") : undefined, + 'aria-labelledby': "".concat(props.id, "-label"), + value: store.getState().completion || store.getState().query, + id: "".concat(props.id, "-input"), + autoComplete: 'off', + autoCorrect: 'off', + autoCapitalize: 'off', + enterKeyHint: enterKeyHint, + spellCheck: 'false', + autoFocus: props.autoFocus, + placeholder: props.placeholder, + maxLength: maxLength, + type: 'search', + onChange: function onChange(event) { + onInput(_objectSpread2({ + event: event, + props: props, + query: event.currentTarget.value.slice(0, maxLength), + refresh: refresh, + store: store + }, setters)); + }, + onKeyDown: function onKeyDown$1(event) { + onKeyDown(_objectSpread2({ + event: event, + props: props, + refresh: refresh, + store: store + }, setters)); + }, + onFocus: onFocus, + // We don't rely on the `blur` event. + // See explanation in `onTouchStart`/`onMouseDown`. + // @MAJOR See if we need to keep this handler. + onBlur: noop, + onClick: function onClick(event) { + // When the panel is closed and you click on the input while + // the input is focused, the `onFocus` event is not triggered + // (default browser behavior). + // In an autocomplete context, it makes sense to open the panel in this + // case. + // We mimic this event by catching the `onClick` event which + // triggers the `onFocus` for the panel to open. + if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) { + onFocus(event); + } + } + }, rest); + }; + var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) { + return typeof sourceId !== 'undefined' ? "".concat(instanceId, "-").concat(sourceId) : instanceId; + }; + var getLabelProps = function getLabelProps(providedProps) { + var _ref3 = providedProps || {}, + sourceIndex = _ref3.sourceIndex, + rest = _objectWithoutProperties$1(_ref3, _excluded5); + return _objectSpread2({ + htmlFor: "".concat(getAutocompleteId(props.id, sourceIndex), "-input"), + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-label") + }, rest); + }; + var getListProps = function getListProps(providedProps) { + var _ref4 = providedProps || {}, + sourceIndex = _ref4.sourceIndex, + rest = _objectWithoutProperties$1(_ref4, _excluded6); + return _objectSpread2({ + role: 'listbox', + 'aria-labelledby': "".concat(getAutocompleteId(props.id, sourceIndex), "-label"), + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-list") + }, rest); + }; + var getPanelProps = function getPanelProps(rest) { + return _objectSpread2({ + onMouseDown: function onMouseDown(event) { + // Prevents the `activeElement` from being changed to the panel so + // that the blur event is not triggered, otherwise it closes the + // panel. + event.preventDefault(); + }, + onMouseLeave: function onMouseLeave() { + store.dispatch('mouseleave', null); + } + }, rest); + }; + var getItemProps = function getItemProps(providedProps) { + var item = providedProps.item, + source = providedProps.source, + sourceIndex = providedProps.sourceIndex, + rest = _objectWithoutProperties$1(providedProps, _excluded7); + return _objectSpread2({ + id: "".concat(getAutocompleteId(props.id, sourceIndex), "-item-").concat(item.__autocomplete_id), + role: 'option', + 'aria-selected': store.getState().activeItemId === item.__autocomplete_id, + onMouseMove: function onMouseMove(event) { + if (item.__autocomplete_id === store.getState().activeItemId) { + return; + } + store.dispatch('mousemove', item.__autocomplete_id); + var activeItem = getActiveItem(store.getState()); + if (store.getState().activeItemId !== null && activeItem) { + var _item = activeItem.item, + itemInputValue = activeItem.itemInputValue, + itemUrl = activeItem.itemUrl, + _source = activeItem.source; + _source.onActive(_objectSpread2({ + event: event, + item: _item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: _source, + state: store.getState() + }, setters)); + } + }, + onMouseDown: function onMouseDown(event) { + // Prevents the `activeElement` from being changed to the item so it + // can remain with the current `activeElement`. + event.preventDefault(); + }, + onClick: function onClick(event) { + var itemInputValue = source.getItemInputValue({ + item: item, + state: store.getState() + }); + var itemUrl = source.getItemUrl({ + item: item, + state: store.getState() + }); + + // If `getItemUrl` is provided, it means that the suggestion + // is a link, not plain text that aims at updating the query. + // We can therefore skip the state change because it will update + // the `activeItemId`, resulting in a UI flash, especially + // noticeable on mobile. + var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread2({ + event: event, + nextState: { + isOpen: false + }, + props: props, + query: itemInputValue, + refresh: refresh, + store: store + }, setters)); + runPreCommand.then(function () { + source.onSelect(_objectSpread2({ + event: event, + item: item, + itemInputValue: itemInputValue, + itemUrl: itemUrl, + refresh: refresh, + source: source, + state: store.getState() + }, setters)); + }); + } + }, rest); + }; + return { + getEnvironmentProps: getEnvironmentProps, + getRootProps: getRootProps, + getFormProps: getFormProps, + getLabelProps: getLabelProps, + getInputProps: getInputProps, + getPanelProps: getPanelProps, + getListProps: getListProps, + getItemProps: getItemProps + }; + } + + function getMetadata(_ref) { + var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3; + var plugins = _ref.plugins, + options = _ref.options; + var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment; + var extraOptions = optionsKey ? _defineProperty$2({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {}; + return { + plugins: plugins.map(function (plugin) { + return { + name: plugin.name, + options: Object.keys(plugin.__autocomplete_pluginOptions || []) + }; + }), + options: _objectSpread2({ + 'autocomplete-core': Object.keys(options) + }, extraOptions), + ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || []) + }; + } + function injectMetadata(_ref3) { + var _environment$navigato, _environment$navigato2; + var metadata = _ref3.metadata, + environment = _ref3.environment; + var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler'); + if (isMetadataEnabled) { + var metadataContainer = environment.document.createElement('meta'); + var headRef = environment.document.querySelector('head'); + metadataContainer.name = 'algolia:metadata'; + setTimeout(function () { + metadataContainer.content = JSON.stringify(metadata); + headRef.appendChild(metadataContainer); + }, 0); + } + } + + function getCompletion(_ref) { + var _getActiveItem; + var state = _ref.state; + if (state.isOpen === false || state.activeItemId === null) { + return null; + } + return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null; + } + + var stateReducer = function stateReducer(state, action) { + switch (action.type) { + case 'setActiveItemId': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: action.payload + }); + } + case 'setQuery': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + query: action.payload, + completion: null + }); + } + case 'setCollections': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + collections: action.payload + }); + } + case 'setIsOpen': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + isOpen: action.payload + }); + } + case 'setStatus': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + status: action.payload + }); + } + case 'setContext': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + context: _objectSpread2(_objectSpread2({}, state.context), action.payload) + }); + } + case 'ArrowDown': + { + var nextState = _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId) + }); + return _objectSpread2(_objectSpread2({}, nextState), {}, { + completion: getCompletion({ + state: nextState + }) + }); + } + case 'ArrowUp': + { + var _nextState = _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId) + }); + return _objectSpread2(_objectSpread2({}, _nextState), {}, { + completion: getCompletion({ + state: _nextState + }) + }); + } + case 'Escape': + { + if (state.isOpen) { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: null, + isOpen: false, + completion: null + }); + } + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: null, + query: '', + status: 'idle', + collections: [] + }); + } + case 'submit': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: null, + isOpen: false, + status: 'idle' + }); + } + case 'reset': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: + // Since we open the panel on reset when openOnFocus=true + // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case) + + // Since we close the panel when openOnFocus=false + // we lose track of the highlighted index. (Query-suggestions use-case) + action.props.openOnFocus === true ? action.props.defaultActiveItemId : null, + status: 'idle', + query: '' + }); + } + case 'focus': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: action.props.defaultActiveItemId, + isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({ + state: state + }) + }); + } + case 'blur': + { + if (action.props.debug) { + return state; + } + return _objectSpread2(_objectSpread2({}, state), {}, { + isOpen: false, + activeItemId: null + }); + } + case 'mousemove': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: action.payload + }); + } + case 'mouseleave': + { + return _objectSpread2(_objectSpread2({}, state), {}, { + activeItemId: action.props.defaultActiveItemId + }); + } + default: + invariant(false, "The reducer action ".concat(JSON.stringify(action.type), " is not supported.")); + return state; + } + }; + + function createAutocomplete(options) { + checkOptions(options); + var subscribers = []; + var props = getDefaultProps(options, subscribers); + var store = createStore(stateReducer, props, onStoreStateChange); + var setters = getAutocompleteSetters({ + store: store + }); + var propGetters = getPropGetters(_objectSpread2({ + props: props, + refresh: refresh, + store: store, + navigator: props.navigator + }, setters)); + function onStoreStateChange(_ref) { + var prevState = _ref.prevState, + state = _ref.state; + props.onStateChange(_objectSpread2({ + prevState: prevState, + state: state, + refresh: refresh, + navigator: props.navigator + }, setters)); + } + function refresh() { + return onInput(_objectSpread2({ + event: new Event('input'), + nextState: { + isOpen: store.getState().isOpen + }, + props: props, + navigator: props.navigator, + query: store.getState().query, + refresh: refresh, + store: store + }, setters)); + } + if (options.insights && !props.plugins.some(function (plugin) { + return plugin.name === 'aa.algoliaInsightsPlugin'; + })) { + var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights; + props.plugins.push(createAlgoliaInsightsPlugin(insightsParams)); + } + props.plugins.forEach(function (plugin) { + var _plugin$subscribe; + return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread2(_objectSpread2({}, setters), {}, { + navigator: props.navigator, + refresh: refresh, + onSelect: function onSelect(fn) { + subscribers.push({ + onSelect: fn + }); + }, + onActive: function onActive(fn) { + subscribers.push({ + onActive: fn + }); + }, + onResolve: function onResolve(fn) { + subscribers.push({ + onResolve: fn + }); + } + })); + }); + injectMetadata({ + metadata: getMetadata({ + plugins: props.plugins, + options: options + }), + environment: props.environment + }); + return _objectSpread2(_objectSpread2({ + refresh: refresh, + navigator: props.navigator + }, propGetters), setters); + } + + exports.createAutocomplete = createAutocomplete; + exports.getDefaultProps = getDefaultProps; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=index.development.js.map diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js.map b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js.map new file mode 100644 index 00000000..6ed8d7a8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.development.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.development.js","sources":["../../../autocomplete-shared/dist/esm/createRef.js","../../../autocomplete-shared/dist/esm/debounce.js","../../../autocomplete-shared/dist/esm/decycle.js","../../../autocomplete-shared/dist/esm/flatten.js","../../../autocomplete-shared/dist/esm/generateAutocompleteId.js","../../../autocomplete-shared/dist/esm/getItemsCount.js","../../../autocomplete-shared/dist/esm/invariant.js","../../../autocomplete-shared/dist/esm/isEqual.js","../../../autocomplete-shared/dist/esm/noop.js","../../../autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../autocomplete-shared/dist/esm/version.js","../../../autocomplete-shared/dist/esm/userAgents.js","../../../autocomplete-shared/dist/esm/warn.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","../../../autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","../../../autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","../../src/checkOptions.ts","../../src/utils/createCancelablePromise.ts","../../src/utils/createCancelablePromiseList.ts","../../src/utils/createConcurrentSafePromise.ts","../../src/utils/getNextActiveItemId.ts","../../src/utils/getNormalizedSources.ts","../../src/utils/getActiveItem.ts","../../src/utils/isOrContainsNode.ts","../../src/utils/isSamsung.ts","../../src/utils/mapToAlgoliaResponse.ts","../../src/createStore.ts","../../src/getAutocompleteSetters.ts","../../src/getDefaultProps.ts","../../src/reshape.ts","../../src/resolve.ts","../../src/onInput.ts","../../src/onKeyDown.ts","../../src/getPropGetters.ts","../../src/metadata.ts","../../src/getCompletion.ts","../../src/stateReducer.ts","../../src/createAutocomplete.ts"],"sourcesContent":["export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n/**\n * Decycles objects with circular references.\n * This is used to print cyclic structures in development environment only.\n */\nexport function decycle(obj) {\n var seen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();\n if (!(process.env.NODE_ENV !== 'production') || !obj || _typeof(obj) !== 'object') {\n return obj;\n }\n if (seen.has(obj)) {\n return '[Circular]';\n }\n var newSeen = seen.add(obj);\n if (Array.isArray(obj)) {\n return obj.map(function (x) {\n return decycle(x, newSeen);\n });\n }\n return Object.fromEntries(Object.entries(obj).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n return [key, decycle(value, newSeen)];\n }));\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","/**\n * Throws an error if the condition is not met in development mode.\n * This is used to make development a better experience to provide guidance as\n * to where the error comes from.\n */\nexport function invariant(condition, message) {\n if (!(process.env.NODE_ENV !== 'production')) {\n return;\n }\n if (!condition) {\n throw new Error(\"[Autocomplete] \".concat(typeof message === 'function' ? message() : message));\n }\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export var version = '1.9.3';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export var warnCache = {\n current: {}\n};\n\n/**\n * Logs a warning if the condition is not met.\n * This is used to log issues in development environment only.\n */\nexport function warn(condition, message) {\n if (!(process.env.NODE_ENV !== 'production')) {\n return;\n }\n if (condition) {\n return;\n }\n var sanitizedMessage = message.trim();\n var hasAlreadyPrinted = warnCache.current[sanitizedMessage];\n if (!hasAlreadyPrinted) {\n warnCache.current[sanitizedMessage] = true;\n\n // eslint-disable-next-line no-console\n console.warn(\"[Autocomplete] \".concat(sanitizedMessage));\n }\n}","export function createClickedEvent(_ref) {\n var item = _ref.item,\n items = _ref.items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","import { warn } from '@algolia/autocomplete-shared';\n\nimport { AutocompleteOptions, BaseItem } from './types';\n\nexport function checkOptions(\n options: AutocompleteOptions\n) {\n warn(\n !options.debug,\n 'The `debug` option is meant for development debugging and should not be used in production.'\n );\n}\n","type PromiseExecutor = (\n resolve: (value: TValue | PromiseLike) => void,\n reject: (reason?: any) => void\n) => void;\n\ntype CancelablePromiseState = {\n isCanceled: boolean;\n onCancelList: Array<(...args: any[]) => any>;\n};\n\nfunction createInternalCancelablePromise(\n promise: Promise,\n initialState: CancelablePromiseState\n): CancelablePromise {\n const state = initialState;\n\n return {\n then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(\n promise.then(\n createCallback(onfulfilled, state, promise),\n createCallback(onrejected, state, promise)\n ),\n state\n );\n },\n catch(onrejected) {\n return createInternalCancelablePromise(\n promise.catch(createCallback(onrejected, state, promise)),\n state\n );\n },\n finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n\n return createInternalCancelablePromise(\n promise.finally(\n createCallback(\n onfinally &&\n (() => {\n state.onCancelList = [];\n\n return onfinally();\n }),\n state,\n promise\n )\n ),\n state\n );\n },\n cancel() {\n state.isCanceled = true;\n const callbacks = state.onCancelList;\n state.onCancelList = [];\n\n callbacks.forEach((callback) => {\n callback();\n });\n },\n isCanceled() {\n return state.isCanceled === true;\n },\n };\n}\n\nexport type CancelablePromise = {\n then(\n onfulfilled?:\n | ((\n value: TValue\n ) =>\n | TResultFulfilled\n | PromiseLike\n | CancelablePromise)\n | undefined\n | null,\n onrejected?:\n | ((\n reason: any\n ) =>\n | TResultRejected\n | PromiseLike\n | CancelablePromise)\n | undefined\n | null\n ): CancelablePromise;\n catch(\n onrejected?:\n | ((\n reason: any\n ) => TResult | PromiseLike | CancelablePromise)\n | undefined\n | null\n ): CancelablePromise;\n finally(\n onfinally?: (() => void) | undefined | null\n ): CancelablePromise;\n cancel(): void;\n isCanceled(): boolean;\n};\n\nexport function createCancelablePromise(\n executor: PromiseExecutor\n): CancelablePromise {\n return createInternalCancelablePromise(\n new Promise((resolve, reject) => {\n return executor(resolve, reject);\n }),\n { isCanceled: false, onCancelList: [] }\n );\n}\n\ncreateCancelablePromise.resolve = (\n value?: TValue | PromiseLike | CancelablePromise\n) => cancelable(Promise.resolve(value));\n\ncreateCancelablePromise.reject = (reason?: any) =>\n cancelable(Promise.reject(reason));\n\nexport function cancelable(promise: Promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: [],\n });\n}\n\nfunction createCallback(\n onResult: ((...args: any[]) => any) | null | undefined,\n state: CancelablePromiseState,\n fallback: any\n) {\n if (!onResult) {\n return fallback;\n }\n\n return function callback(arg?: any) {\n if (state.isCanceled) {\n return arg;\n }\n\n return onResult(arg);\n };\n}\n","import { CancelablePromise } from '.';\n\nexport type CancelablePromiseList = {\n /**\n * Add a cancelable promise to the list.\n *\n * @param cancelablePromise The cancelable promise to add.\n */\n add(cancelablePromise: CancelablePromise): CancelablePromise;\n /**\n * Cancel all pending promises.\n *\n * Requests aren't actually stopped. All pending promises will settle, but\n * attached handlers won't run.\n */\n cancelAll(): void;\n /**\n * Whether there are pending promises in the list.\n */\n isEmpty(): boolean;\n};\n\nexport function createCancelablePromiseList<\n TValue\n>(): CancelablePromiseList {\n let list: Array> = [];\n\n return {\n add(cancelablePromise) {\n list.push(cancelablePromise);\n\n return cancelablePromise.finally(() => {\n list = list.filter((item) => item !== cancelablePromise);\n });\n },\n cancelAll() {\n list.forEach((promise) => promise.cancel());\n },\n isEmpty() {\n return list.length === 0;\n },\n };\n}\n","import { MaybePromise } from '@algolia/autocomplete-shared';\n\n/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n let basePromiseId = -1;\n let latestResolvedId = -1;\n let latestResolvedValue: unknown = undefined;\n\n return function runConcurrentSafePromise(\n promise: MaybePromise\n ) {\n basePromiseId++;\n const currentPromiseId = basePromiseId;\n\n return Promise.resolve(promise).then((x) => {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue as TValue;\n }\n\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n\n return x;\n });\n };\n}\n","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(\n moveAmount: number,\n baseIndex: number | null,\n itemCount: number,\n defaultActiveItemId: number | null\n): number | null {\n if (!itemCount) {\n return null;\n }\n\n if (\n moveAmount < 0 &&\n (baseIndex === null || (defaultActiveItemId !== null && baseIndex === 0))\n ) {\n return itemCount + moveAmount;\n }\n\n const numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n\n return numericIndex;\n}\n","import { invariant, decycle, noop } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteSource,\n BaseItem,\n GetSources,\n GetSourcesParams,\n InternalAutocompleteSource,\n InternalGetSources,\n} from '../types';\n\nexport function getNormalizedSources(\n getSources: GetSources,\n params: GetSourcesParams\n): ReturnType> {\n const seenSourceIds: string[] = [];\n\n return Promise.resolve(getSources(params)).then((sources) => {\n invariant(\n Array.isArray(sources),\n () =>\n `The \\`getSources\\` function must return an array of sources but returned type ${JSON.stringify(\n typeof sources\n )}:\\n\\n${JSON.stringify(decycle(sources), null, 2)}`\n );\n\n return Promise.all(\n sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter((maybeSource: any): maybeSource is AutocompleteSource =>\n Boolean(maybeSource)\n )\n .map((source) => {\n invariant(\n typeof source.sourceId === 'string',\n 'A source must provide a `sourceId` string.'\n );\n\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\n `[Autocomplete] The \\`sourceId\\` ${JSON.stringify(\n source.sourceId\n )} is not unique.`\n );\n }\n\n seenSourceIds.push(source.sourceId);\n\n const defaultSource: Omit<\n InternalAutocompleteSource,\n 'sourceId' | 'getItems'\n > = {\n getItemInputValue({ state }) {\n return state.query;\n },\n getItemUrl() {\n return undefined;\n },\n onSelect({ setIsOpen }) {\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop,\n };\n\n Object.keys(defaultSource).forEach((key) => {\n defaultSource[key].__default = true;\n });\n\n const normalizedSource: InternalAutocompleteSource = {\n ...defaultSource,\n ...source,\n };\n\n return Promise.resolve(normalizedSource);\n })\n );\n });\n}\n","import { AutocompleteCollection, AutocompleteState, BaseItem } from '../types';\n\n// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(\n state: AutocompleteState\n): AutocompleteCollection | undefined {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n const accumulatedCollectionsCount = state.collections\n .map((collections) => collections.items.length)\n .reduce((acc, collectionsCount, index) => {\n const previousValue = acc[index - 1] || 0;\n const nextValue = previousValue + collectionsCount;\n\n acc.push(nextValue);\n\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n const collectionIndex = accumulatedCollectionsCount.reduce((acc, current) => {\n if (current <= state.activeItemId!) {\n return acc + 1;\n }\n\n return acc;\n }, 0);\n\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId({\n state,\n collection,\n}: {\n state: AutocompleteState;\n collection: AutocompleteCollection;\n}): number {\n let isOffsetFound = false;\n let counter = 0;\n let previousItemsOffset = 0;\n\n while (isOffsetFound === false) {\n const currentCollection = state.collections[counter];\n\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n\n previousItemsOffset += currentCollection.items.length;\n\n counter++;\n }\n\n return state.activeItemId! - previousItemsOffset;\n}\n\nexport function getActiveItem(\n state: AutocompleteState\n) {\n const collection = getCollectionFromActiveItemId(state);\n\n if (!collection) {\n return null;\n }\n\n const item = collection.items[getRelativeActiveItemId({ state, collection })];\n const source = collection.source;\n const itemInputValue = source.getItemInputValue({ item, state });\n const itemUrl = source.getItemUrl({ item, state });\n\n return {\n item,\n itemInputValue,\n itemUrl,\n source,\n };\n}\n","export function isOrContainsNode(parent: Node, child: Node) {\n return parent === child || parent.contains(child);\n}\n","const regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\n\nexport function isSamsung(userAgent: string) {\n return Boolean(userAgent && userAgent.match(regex));\n}\n","import type {\n SearchForFacetValuesResponse,\n SearchResponse,\n} from '@algolia/client-search';\n\nexport function mapToAlgoliaResponse(\n rawResults: Array | SearchForFacetValuesResponse>\n) {\n return {\n results: rawResults,\n hits: rawResults\n .map((result) => (result as SearchResponse).hits)\n .filter(Boolean),\n facetHits: rawResults\n .map((result) =>\n (result as SearchForFacetValuesResponse).facetHits?.map((facetHit) => {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted,\n },\n },\n };\n })\n )\n .filter(Boolean),\n };\n}\n","import {\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n Reducer,\n} from './types';\nimport { createCancelablePromiseList } from './utils';\n\ntype OnStoreStateChange = ({\n prevState,\n state,\n}: {\n prevState: AutocompleteState;\n state: AutocompleteState;\n}) => void;\n\nexport function createStore(\n reducer: Reducer,\n props: InternalAutocompleteOptions,\n onStoreStateChange: OnStoreStateChange\n): AutocompleteStore {\n let state = props.initialState;\n\n return {\n getState() {\n return state;\n },\n dispatch(action, payload) {\n const prevState = { ...state };\n state = reducer(state, {\n type: action,\n props,\n payload,\n });\n\n onStoreStateChange({ state, prevState });\n },\n pendingRequests: createCancelablePromiseList(),\n };\n}\n","import { flatten } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteApi,\n AutocompleteCollection,\n AutocompleteStore,\n BaseItem,\n} from './types';\n\ninterface GetAutocompleteSettersOptions {\n store: AutocompleteStore;\n}\n\nexport function getAutocompleteSetters({\n store,\n}: GetAutocompleteSettersOptions) {\n const setActiveItemId: AutocompleteApi['setActiveItemId'] = (\n value\n ) => {\n store.dispatch('setActiveItemId', value);\n };\n\n const setQuery: AutocompleteApi['setQuery'] = (value) => {\n store.dispatch('setQuery', value);\n };\n\n const setCollections: AutocompleteApi['setCollections'] = (\n rawValue\n ) => {\n let baseItemId = 0;\n const value = rawValue.map>((collection) => ({\n ...collection,\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items as any).map((item: any) => ({\n ...item,\n __autocomplete_id: baseItemId++,\n })),\n }));\n\n store.dispatch('setCollections', value);\n };\n\n const setIsOpen: AutocompleteApi['setIsOpen'] = (value) => {\n store.dispatch('setIsOpen', value);\n };\n\n const setStatus: AutocompleteApi['setStatus'] = (value) => {\n store.dispatch('setStatus', value);\n };\n\n const setContext: AutocompleteApi['setContext'] = (value) => {\n store.dispatch('setContext', value);\n };\n\n return {\n setActiveItemId,\n setQuery,\n setCollections,\n setIsOpen,\n setStatus,\n setContext,\n };\n}\n","import {\n getItemsCount,\n generateAutocompleteId,\n flatten,\n} from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteEnvironment,\n AutocompleteOptions,\n AutocompleteSubscribers,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport { getNormalizedSources } from './utils';\n\nexport function getDefaultProps(\n props: AutocompleteOptions,\n pluginSubscribers: AutocompleteSubscribers\n): InternalAutocompleteOptions {\n /* eslint-disable no-restricted-globals */\n const environment: AutocompleteEnvironment = (\n typeof window !== 'undefined' ? window : {}\n ) as typeof window;\n /* eslint-enable no-restricted-globals */\n const plugins = props.plugins || [];\n\n return {\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment,\n shouldPanelOpen: ({ state }) => getItemsCount(state) > 0,\n reshape: ({ sources }) => sources,\n ...props,\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: props.id ?? generateAutocompleteId(),\n plugins,\n // The following props need to be deeply defaulted.\n initialState: {\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {},\n ...props.initialState,\n },\n onStateChange(params) {\n props.onStateChange?.(params);\n plugins.forEach((x) => x.onStateChange?.(params));\n },\n onSubmit(params) {\n props.onSubmit?.(params);\n plugins.forEach((x) => x.onSubmit?.(params));\n },\n onReset(params) {\n props.onReset?.(params);\n plugins.forEach((x) => x.onReset?.(params));\n },\n getSources(params) {\n return Promise.all(\n [...plugins.map((plugin) => plugin.getSources), props.getSources]\n .filter(Boolean)\n .map((getSources) => getNormalizedSources(getSources!, params))\n )\n .then((nested) => flatten(nested))\n .then((sources) =>\n sources.map((source) => ({\n ...source,\n onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach((x) => x.onSelect?.(params));\n },\n onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach((x) => x.onActive?.(params));\n },\n onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach((x) => x.onResolve?.(params));\n },\n }))\n );\n },\n navigator: {\n navigate({ itemUrl }) {\n environment.location.assign(itemUrl);\n },\n navigateNewTab({ itemUrl }) {\n const windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference?.focus();\n },\n navigateNewWindow({ itemUrl }) {\n environment.open(itemUrl, '_blank', 'noopener');\n },\n ...props.navigator,\n },\n };\n}\n","import { flatten } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteCollection,\n AutocompleteReshapeSourcesBySourceId,\n AutocompleteState,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\n\ntype ReshapeParams = {\n collections: Array>;\n props: InternalAutocompleteOptions;\n state: AutocompleteState;\n};\n\nexport function reshape({\n collections,\n props,\n state,\n}: ReshapeParams) {\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n const originalSourcesBySourceId = collections.reduce<\n AutocompleteReshapeSourcesBySourceId\n >(\n (acc, collection) => ({\n ...acc,\n [collection.source.sourceId]: {\n ...collection.source,\n getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n },\n },\n }),\n {}\n );\n\n const { sourcesBySourceId } = props.plugins.reduce(\n (acc, plugin) => {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n },\n {\n sourcesBySourceId: originalSourcesBySourceId,\n state,\n }\n );\n\n const reshapeSources = props.reshape({\n sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state,\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources)\n .filter(Boolean)\n .map((source) => {\n return {\n source,\n items: source.getItems(),\n };\n });\n}\n","import type {\n Execute,\n ExecuteResponse,\n RequesterDescription,\n TransformResponse,\n} from '@algolia/autocomplete-preset-algolia';\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport {\n MultipleQueriesQuery,\n SearchForFacetValuesResponse,\n SearchResponse,\n} from '@algolia/client-search';\nimport type { SearchClient } from 'algoliasearch/lite';\n\nimport {\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteSource,\n OnResolveParams,\n} from './types';\nimport { mapToAlgoliaResponse } from './utils';\n\nfunction isDescription(\n item:\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom\n | PackedDescription\n): item is RequestDescriptionPreResolved {\n return Boolean((item as RequestDescriptionPreResolved).execute);\n}\n\nfunction isRequesterDescription(\n description: TItem[] | TItem[][] | RequesterDescription\n): description is RequesterDescription {\n return Boolean((description as RequesterDescription)?.execute);\n}\n\ntype PackedDescription = {\n searchClient: SearchClient;\n execute: Execute;\n requesterId?: string;\n items: RequestDescriptionPreResolved['requests'];\n};\n\ntype RequestDescriptionPreResolved = Pick<\n RequesterDescription,\n 'execute' | 'requesterId' | 'searchClient' | 'transformResponse'\n> & {\n requests: Array<{\n query: MultipleQueriesQuery;\n sourceId: string;\n transformResponse: TransformResponse;\n }>;\n};\n\ntype RequestDescriptionPreResolvedCustom = {\n items: TItem[] | TItem[][];\n sourceId: string;\n transformResponse?: undefined;\n};\n\nexport function preResolve(\n itemsOrDescription: TItem[] | TItem[][] | RequesterDescription,\n sourceId: string,\n state: AutocompleteState\n):\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom {\n if (isRequesterDescription(itemsOrDescription)) {\n const contextParameters =\n itemsOrDescription.requesterId === 'algolia'\n ? Object.assign(\n {},\n ...Object.keys(state.context).map((key) => {\n return (state.context[key] as Record)\n ?.__algoliaSearchParameters;\n })\n )\n : {};\n\n return {\n ...itemsOrDescription,\n requests: itemsOrDescription.queries.map((query) => ({\n query:\n itemsOrDescription.requesterId === 'algolia'\n ? {\n ...query,\n params: {\n ...contextParameters,\n ...query.params,\n },\n }\n : query,\n sourceId,\n transformResponse: itemsOrDescription.transformResponse,\n })),\n };\n }\n\n return {\n items: itemsOrDescription,\n sourceId,\n };\n}\n\nexport function resolve(\n items: Array<\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom\n >\n) {\n const packed = items.reduce<\n Array | PackedDescription>\n >((acc, current) => {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n\n const { searchClient, execute, requesterId, requests } = current;\n\n const container = acc.find>(\n (item): item is PackedDescription => {\n return (\n isDescription(current) &&\n isDescription(item) &&\n item.searchClient === searchClient &&\n Boolean(requesterId) &&\n item.requesterId === requesterId\n );\n }\n );\n\n if (container) {\n container.items.push(...requests);\n } else {\n const request: PackedDescription = {\n execute,\n requesterId,\n items: requests,\n searchClient,\n };\n acc.push(request);\n }\n\n return acc;\n }, []);\n\n const values = packed.map<\n | Promise>\n | ReturnType>\n >((maybeDescription) => {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(\n maybeDescription as RequestDescriptionPreResolvedCustom\n );\n }\n\n const { execute, items, searchClient } =\n maybeDescription as PackedDescription;\n\n return execute({\n searchClient,\n requests: items,\n });\n });\n\n return Promise.all<\n RequestDescriptionPreResolvedCustom | ExecuteResponse\n >(values).then((responses) =>\n flatten<\n RequestDescriptionPreResolvedCustom | ExecuteResponse[0]\n >(responses)\n );\n}\n\nexport function postResolve(\n responses: Array<\n RequestDescriptionPreResolvedCustom | ExecuteResponse[0]\n >,\n sources: Array>,\n store: AutocompleteStore\n) {\n return sources.map((source) => {\n const matches = responses.filter(\n (response) => response.sourceId === source.sourceId\n );\n const results = matches.map(({ items }) => items);\n const transform = matches[0].transformResponse;\n const items = transform\n ? transform(\n mapToAlgoliaResponse(\n results as Array<\n SearchForFacetValuesResponse | SearchResponse\n >\n )\n )\n : results;\n\n source.onResolve({\n source,\n results,\n items,\n state: store.getState(),\n } as OnResolveParams);\n\n invariant(\n Array.isArray(items),\n () => `The \\`getItems\\` function from source \"${\n source.sourceId\n }\" must return an array of items but returned type ${JSON.stringify(\n typeof items\n )}:\\n\\n${JSON.stringify(decycle(items), null, 2)}.\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`\n );\n\n invariant(\n (items as Array).every(Boolean),\n `The \\`getItems\\` function from source \"${\n source.sourceId\n }\" must return an array of items but returned ${JSON.stringify(\n undefined\n )}.\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`\n );\n\n return {\n source,\n items,\n };\n });\n}\n","import { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport {\n AutocompleteScopeApi,\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport {\n cancelable,\n CancelablePromise,\n createConcurrentSafePromise,\n getActiveItem,\n} from './utils';\n\nlet lastStalledId: number | null = null;\n\ninterface OnInputParams\n extends AutocompleteScopeApi {\n event: any;\n /**\n * The next partial state to apply after the function is called.\n *\n * This is useful when we call `onInput` in a different scenario than an\n * actual input. For example, we use `onInput` when we click on an item,\n * but we want to close the panel in that case.\n */\n nextState?: Partial>;\n props: InternalAutocompleteOptions;\n query: string;\n store: AutocompleteStore;\n}\n\nconst runConcurrentSafePromise = createConcurrentSafePromise();\n\nexport function onInput({\n event,\n nextState = {},\n props,\n query,\n refresh,\n store,\n ...setters\n}: OnInputParams): CancelablePromise {\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n\n const { setCollections, setIsOpen, setQuery, setActiveItemId, setStatus } =\n setters;\n\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n\n if (!query && props.openOnFocus === false) {\n const collections = store.getState().collections.map((collection) => ({\n ...collection,\n items: [],\n }));\n\n setStatus('idle');\n setCollections(collections);\n setIsOpen(\n nextState.isOpen ?? props.shouldPanelOpen({ state: store.getState() })\n );\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n const request = cancelable(\n runConcurrentSafePromise(collections).then(() => Promise.resolve())\n );\n\n return store.pendingRequests.add(request);\n }\n\n setStatus('loading');\n\n lastStalledId = props.environment.setTimeout(() => {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n const request = cancelable(\n runConcurrentSafePromise(\n props\n .getSources({\n query,\n refresh,\n state: store.getState(),\n ...setters,\n })\n .then((sources) => {\n return Promise.all(\n sources.map((source) => {\n return Promise.resolve(\n source.getItems({\n query,\n refresh,\n state: store.getState(),\n ...setters,\n })\n ).then((itemsOrDescription) =>\n preResolve(\n itemsOrDescription,\n source.sourceId,\n store.getState()\n )\n );\n })\n )\n .then(resolve)\n .then((responses) => postResolve(responses, sources, store))\n .then((collections) =>\n reshape({ collections, props, state: store.getState() })\n );\n })\n )\n )\n .then((collections) => {\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n\n setCollections(collections as any);\n\n const isPanelOpen = props.shouldPanelOpen({ state: store.getState() });\n\n setIsOpen(\n nextState.isOpen ??\n ((props.openOnFocus && !query && isPanelOpen) || isPanelOpen)\n );\n\n const highlightedItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && highlightedItem) {\n const { item, itemInputValue, itemUrl, source } = highlightedItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n })\n .finally(() => {\n setStatus('idle');\n\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n\n return store.pendingRequests.add(request);\n}\n","import { onInput } from './onInput';\nimport {\n ActionType,\n AutocompleteScopeApi,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport { getActiveItem } from './utils';\n\ninterface OnKeyDownOptions\n extends AutocompleteScopeApi {\n event: KeyboardEvent;\n props: InternalAutocompleteOptions;\n store: AutocompleteStore;\n}\n\nexport function onKeyDown({\n event,\n props,\n refresh,\n store,\n ...setters\n}: OnKeyDownOptions): void {\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n function triggerScrollIntoView() {\n const nodeItem = props.environment.document.getElementById(\n `${props.id}-item-${store.getState().activeItemId}`\n );\n\n if (nodeItem) {\n if ((nodeItem as any).scrollIntoViewIfNeeded) {\n (nodeItem as any).scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }\n\n // eslint-disable-next-line no-inner-declarations\n function triggerOnActive() {\n const highlightedItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && highlightedItem) {\n const { item, itemInputValue, itemUrl, source } = highlightedItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n }\n\n // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (\n store.getState().isOpen === false &&\n (props.openOnFocus || Boolean(store.getState().query))\n ) {\n onInput({\n event,\n props,\n query: store.getState().query,\n refresh,\n store,\n ...setters,\n }).then(() => {\n store.dispatch(event.key as ActionType, {\n nextActiveItemId: props.defaultActiveItemId,\n });\n\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (\n store.getState().activeItemId === null ||\n store\n .getState()\n .collections.every((collection) => collection.items.length === 0)\n ) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n\n const { item, itemInputValue, itemUrl, source } = getActiveItem(\n store.getState()\n )!;\n\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigateNewTab({\n itemUrl,\n item,\n state: store.getState(),\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigateNewWindow({\n itemUrl,\n item,\n state: store.getState(),\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigate({\n itemUrl,\n item,\n state: store.getState(),\n });\n\n return;\n }\n\n onInput({\n event,\n nextState: { isOpen: false },\n props,\n query: itemInputValue,\n refresh,\n store,\n ...setters,\n }).then(() => {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n });\n }\n }\n}\n","import { noop } from '@algolia/autocomplete-shared';\n\nimport { onInput } from './onInput';\nimport { onKeyDown } from './onKeyDown';\nimport {\n AutocompleteScopeApi,\n AutocompleteStore,\n BaseItem,\n GetEnvironmentProps,\n GetFormProps,\n GetInputProps,\n GetItemProps,\n GetLabelProps,\n GetListProps,\n GetPanelProps,\n GetRootProps,\n InternalAutocompleteOptions,\n} from './types';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\n\ninterface GetPropGettersOptions\n extends AutocompleteScopeApi {\n store: AutocompleteStore;\n props: InternalAutocompleteOptions;\n}\n\nexport function getPropGetters<\n TItem extends BaseItem,\n TEvent,\n TMouseEvent,\n TKeyboardEvent\n>({ props, refresh, store, ...setters }: GetPropGettersOptions) {\n const getEnvironmentProps: GetEnvironmentProps = (providedProps) => {\n const { inputElement, formElement, panelElement, ...rest } = providedProps;\n\n function onMouseDownOrTouchStart(event: MouseEvent | TouchEvent) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n const isAutocompleteInteraction =\n store.getState().isOpen || !store.pendingRequests.isEmpty();\n\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n const isTargetWithinAutocomplete = [formElement, panelElement].some(\n (contextNode) => {\n return isOrContainsNode(contextNode, event.target as Node);\n }\n );\n\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n\n return {\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove(event: TouchEvent) {\n if (\n store.getState().isOpen === false ||\n inputElement !== props.environment.document.activeElement ||\n event.target === inputElement\n ) {\n return;\n }\n\n inputElement.blur();\n },\n ...rest,\n };\n };\n\n const getRootProps: GetRootProps = (rest) => {\n return {\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? `${props.id}-list` : undefined,\n 'aria-labelledby': `${props.id}-label`,\n ...rest,\n };\n };\n\n const getFormProps: GetFormProps = (providedProps) => {\n const { inputElement, ...rest } = providedProps;\n\n return {\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: (event) => {\n (event as unknown as Event).preventDefault();\n\n props.onSubmit({\n event,\n refresh,\n state: store.getState(),\n ...setters,\n });\n\n store.dispatch('submit', null);\n providedProps.inputElement?.blur();\n },\n onReset: (event) => {\n (event as unknown as Event).preventDefault();\n\n props.onReset({\n event,\n refresh,\n state: store.getState(),\n ...setters,\n });\n\n store.dispatch('reset', null);\n providedProps.inputElement?.focus();\n },\n ...rest,\n };\n };\n\n const getInputProps: GetInputProps = (\n providedProps\n ) => {\n function onFocus(event: TEvent) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput({\n event,\n props,\n query: store.getState().completion || store.getState().query,\n refresh,\n store,\n ...setters,\n });\n }\n\n store.dispatch('focus', null);\n }\n\n const { inputElement, maxLength = 512, ...rest } = providedProps || {};\n const activeItem = getActiveItem(store.getState());\n\n const userAgent = props.environment.navigator?.userAgent || '';\n const shouldFallbackKeyHint = isSamsung(userAgent);\n const enterKeyHint =\n activeItem?.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n\n return {\n 'aria-autocomplete': 'both',\n 'aria-activedescendant':\n store.getState().isOpen && store.getState().activeItemId !== null\n ? `${props.id}-item-${store.getState().activeItemId}`\n : undefined,\n 'aria-controls': store.getState().isOpen ? `${props.id}-list` : undefined,\n 'aria-labelledby': `${props.id}-label`,\n value: store.getState().completion || store.getState().query,\n id: `${props.id}-input`,\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength,\n type: 'search',\n onChange: (event) => {\n onInput({\n event,\n props,\n query: (\n (event as unknown as Event).currentTarget as HTMLInputElement\n ).value.slice(0, maxLength),\n refresh,\n store,\n ...setters,\n });\n },\n onKeyDown: (event) => {\n onKeyDown({\n event: event as unknown as KeyboardEvent,\n props,\n refresh,\n store,\n ...setters,\n });\n },\n onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: (event) => {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (\n providedProps.inputElement ===\n props.environment.document.activeElement &&\n !store.getState().isOpen\n ) {\n onFocus(event as unknown as TEvent);\n }\n },\n ...rest,\n };\n };\n\n const getAutocompleteId = (instanceId: string, sourceId?: number) => {\n return typeof sourceId !== 'undefined'\n ? `${instanceId}-${sourceId}`\n : instanceId;\n };\n\n const getLabelProps: GetLabelProps = (providedProps) => {\n const { sourceIndex, ...rest } = providedProps || {};\n\n return {\n htmlFor: `${getAutocompleteId(props.id, sourceIndex)}-input`,\n id: `${getAutocompleteId(props.id, sourceIndex)}-label`,\n ...rest,\n };\n };\n\n const getListProps: GetListProps = (providedProps) => {\n const { sourceIndex, ...rest } = providedProps || {};\n\n return {\n role: 'listbox',\n 'aria-labelledby': `${getAutocompleteId(props.id, sourceIndex)}-label`,\n id: `${getAutocompleteId(props.id, sourceIndex)}-list`,\n ...rest,\n };\n };\n\n const getPanelProps: GetPanelProps = (rest) => {\n return {\n onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n (event as unknown as MouseEvent).preventDefault();\n },\n onMouseLeave() {\n store.dispatch('mouseleave', null);\n },\n ...rest,\n };\n };\n\n const getItemProps: GetItemProps = (providedProps) => {\n const { item, source, sourceIndex, ...rest } = providedProps;\n\n return {\n id: `${getAutocompleteId(props.id, sourceIndex as number)}-item-${\n item.__autocomplete_id\n }`,\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n\n store.dispatch('mousemove', item.__autocomplete_id);\n\n const activeItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && activeItem) {\n const { item, itemInputValue, itemUrl, source } = activeItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n },\n onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n (event as unknown as MouseEvent).preventDefault();\n },\n onClick(event) {\n const itemInputValue = source.getItemInputValue({\n item,\n state: store.getState(),\n });\n const itemUrl = source.getItemUrl({\n item,\n state: store.getState(),\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n const runPreCommand = itemUrl\n ? Promise.resolve()\n : onInput({\n event,\n nextState: { isOpen: false },\n props,\n query: itemInputValue,\n refresh,\n store,\n ...setters,\n });\n\n runPreCommand.then(() => {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n });\n },\n ...rest,\n };\n };\n\n return {\n getEnvironmentProps,\n getRootProps,\n getFormProps,\n getLabelProps,\n getInputProps,\n getPanelProps,\n getListProps,\n getItemProps,\n };\n}\n","import { UserAgent, userAgents } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteEnvironment,\n AutocompleteOptions,\n AutocompleteOptionsWithMetadata,\n AutocompletePlugin,\n BaseItem,\n} from '.';\n\ntype AutocompleteMetadata = {\n plugins: Array<{\n name: string | undefined;\n options: string[];\n }>;\n options: Record;\n ua: UserAgent[];\n};\n\ntype GetMetadataParams = {\n plugins: Array>;\n options: AutocompleteOptionsWithMetadata;\n};\n\nexport function getMetadata({\n plugins,\n options,\n}: GetMetadataParams) {\n const optionsKey = ((options.__autocomplete_metadata\n ?.userAgents as UserAgent[]) || [])[0]?.segment;\n\n const extraOptions = optionsKey\n ? {\n [optionsKey]: Object.keys(\n (options.__autocomplete_metadata\n ?.options as AutocompleteOptions) || {}\n ),\n }\n : {};\n\n return {\n plugins: plugins.map((plugin) => ({\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || []),\n })),\n options: {\n 'autocomplete-core': Object.keys(options),\n ...extraOptions,\n },\n ua: userAgents.concat(\n (options.__autocomplete_metadata?.userAgents as any) || []\n ),\n };\n}\n\ntype InlineMetadataParams = {\n metadata: AutocompleteMetadata;\n environment: AutocompleteEnvironment;\n};\n\nexport function injectMetadata({\n metadata,\n environment,\n}: InlineMetadataParams) {\n const isMetadataEnabled =\n environment.navigator?.userAgent?.includes('Algolia Crawler');\n\n if (isMetadataEnabled) {\n const metadataContainer = environment.document.createElement('meta');\n const headRef = environment.document.querySelector('head');\n\n metadataContainer.name = 'algolia:metadata';\n\n setTimeout(() => {\n metadataContainer.content = JSON.stringify(metadata);\n headRef!.appendChild(metadataContainer);\n }, 0);\n }\n}\n","import { AutocompleteState, BaseItem } from './types';\nimport { getActiveItem } from './utils';\n\ninterface GetCompletionProps {\n state: AutocompleteState;\n}\n\nexport function getCompletion({\n state,\n}: GetCompletionProps): string | null {\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n\n return getActiveItem(state)?.itemInputValue || null;\n}\n","import { getItemsCount, invariant } from '@algolia/autocomplete-shared';\n\nimport { getCompletion } from './getCompletion';\nimport { Reducer } from './types';\nimport { getNextActiveItemId } from './utils';\n\nexport const stateReducer: Reducer = (state, action) => {\n switch (action.type) {\n case 'setActiveItemId': {\n return {\n ...state,\n activeItemId: action.payload,\n };\n }\n\n case 'setQuery': {\n return {\n ...state,\n query: action.payload,\n completion: null,\n };\n }\n\n case 'setCollections': {\n return {\n ...state,\n collections: action.payload,\n };\n }\n\n case 'setIsOpen': {\n return {\n ...state,\n isOpen: action.payload,\n };\n }\n\n case 'setStatus': {\n return {\n ...state,\n status: action.payload,\n };\n }\n\n case 'setContext': {\n return {\n ...state,\n context: {\n ...state.context,\n ...action.payload,\n },\n };\n }\n\n case 'ArrowDown': {\n const nextState = {\n ...state,\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId')\n ? action.payload.nextActiveItemId\n : getNextActiveItemId(\n 1,\n state.activeItemId,\n getItemsCount(state),\n action.props.defaultActiveItemId\n ),\n };\n\n return {\n ...nextState,\n completion: getCompletion({ state: nextState }),\n };\n }\n\n case 'ArrowUp': {\n const nextState = {\n ...state,\n activeItemId: getNextActiveItemId(\n -1,\n state.activeItemId,\n getItemsCount(state),\n action.props.defaultActiveItemId\n ),\n };\n\n return {\n ...nextState,\n completion: getCompletion({ state: nextState }),\n };\n }\n\n case 'Escape': {\n if (state.isOpen) {\n return {\n ...state,\n activeItemId: null,\n isOpen: false,\n completion: null,\n };\n }\n\n return {\n ...state,\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: [],\n };\n }\n\n case 'submit': {\n return {\n ...state,\n activeItemId: null,\n isOpen: false,\n status: 'idle',\n };\n }\n\n case 'reset': {\n return {\n ...state,\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true\n ? action.props.defaultActiveItemId\n : null,\n status: 'idle',\n query: '',\n };\n }\n\n case 'focus': {\n return {\n ...state,\n activeItemId: action.props.defaultActiveItemId,\n isOpen:\n (action.props.openOnFocus || Boolean(state.query)) &&\n action.props.shouldPanelOpen({ state }),\n };\n }\n\n case 'blur': {\n if (action.props.debug) {\n return state;\n }\n\n return {\n ...state,\n isOpen: false,\n activeItemId: null,\n };\n }\n\n case 'mousemove': {\n return {\n ...state,\n activeItemId: action.payload,\n };\n }\n\n case 'mouseleave': {\n return {\n ...state,\n activeItemId: action.props.defaultActiveItemId,\n };\n }\n\n default:\n invariant(\n false,\n `The reducer action ${JSON.stringify(action.type)} is not supported.`\n );\n\n return state;\n }\n};\n","import { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\n\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nimport {\n AutocompleteApi,\n AutocompleteOptions as AutocompleteCoreOptions,\n BaseItem,\n AutocompleteSubscribers,\n} from './types';\n\nexport interface AutocompleteOptionsWithMetadata\n extends AutocompleteCoreOptions {\n /**\n * @internal\n */\n __autocomplete_metadata?: Record;\n}\n\nexport function createAutocomplete<\n TItem extends BaseItem,\n TEvent = Event,\n TMouseEvent = MouseEvent,\n TKeyboardEvent = KeyboardEvent\n>(\n options: AutocompleteOptionsWithMetadata\n): AutocompleteApi {\n checkOptions(options);\n\n const subscribers: AutocompleteSubscribers = [];\n const props = getDefaultProps(options, subscribers);\n const store = createStore(stateReducer, props, onStoreStateChange);\n\n const setters = getAutocompleteSetters({ store });\n const propGetters = getPropGetters<\n TItem,\n TEvent,\n TMouseEvent,\n TKeyboardEvent\n >({ props, refresh, store, navigator: props.navigator, ...setters });\n\n function onStoreStateChange({ prevState, state }) {\n props.onStateChange({\n prevState,\n state,\n refresh,\n navigator: props.navigator,\n ...setters,\n });\n }\n\n function refresh() {\n return onInput({\n event: new Event('input'),\n nextState: { isOpen: store.getState().isOpen },\n props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh,\n store,\n ...setters,\n });\n }\n\n if (\n options.insights &&\n !props.plugins.some((plugin) => plugin.name === 'aa.algoliaInsightsPlugin')\n ) {\n const insightsParams =\n typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n\n props.plugins.forEach((plugin) =>\n plugin.subscribe?.({\n ...setters,\n navigator: props.navigator,\n refresh,\n onSelect(fn) {\n subscribers.push({ onSelect: fn });\n },\n onActive(fn) {\n subscribers.push({ onActive: fn });\n },\n onResolve(fn) {\n subscribers.push({ onResolve: fn });\n },\n })\n );\n\n injectMetadata({\n metadata: getMetadata({ plugins: props.plugins, options }),\n environment: props.environment,\n });\n\n return {\n refresh,\n navigator: props.navigator,\n ...propGetters,\n ...setters,\n };\n}\n"],"names":["createRef","initialValue","current","debounce","fn","time","timerId","undefined","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","from","test","len","arr2","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","return","isArray","_typeof","obj","decycle","seen","Set","has","newSeen","add","map","x","fromEntries","entries","_ref","_ref2","key","flatten","values","reduce","a","b","concat","autocompleteId","generateAutocompleteId","getItemsCount","state","collections","sum","collection","items","invariant","condition","message","Error","isPrimitive","isEqual","first","second","keys","_Object$keys","noop","safelyRunOnBrowser","callback","window","version","userAgents","segment","warnCache","warn","sanitizedMessage","trim","hasAlreadyPrinted","console","createClickedEvent","item","index","__autocomplete_indexName","positions","findIndex","objectID","queryID","__autocomplete_queryID","algoliaSource","isModernInsightsClient","client","_split$map","split","Number","_split$map2","major","minor","v3","v2_4","v1_10","_excluded","_excluded2","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","iter","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","param","createSearchInsightsApi","searchInsights","canSendHeaders","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","appId","apiKey","headers","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","VIEW_EVENT_DELAY","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onSelect","onActiveEvent","onActive","pointer","AlgoliaAnalyticsObject","queue","loadInsights","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","_ref8","_ref9","environment","errorMessage","script","document","createElement","async","src","onerror","error","body","appendChild","cause","checkOptions","process","debug","createInternalCancelablePromise","promise","initialState","then","onfulfilled","onrejected","createCallback","catch","_catch","finally","_finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","createCancelablePromiseList","list","cancelablePromise","cancelAll","isEmpty","createConcurrentSafePromise","basePromiseId","latestResolvedId","latestResolvedValue","runConcurrentSafePromise","currentPromiseId","Promise","resolve","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getNormalizedSources","getSources","seenSourceIds","sources","JSON","stringify","all","maybeSource","Boolean","sourceId","includes","defaultSource","getItemInputValue","query","getItemUrl","setIsOpen","onResolve","__default","normalizedSource","getCollectionFromActiveItemId","accumulatedCollectionsCount","collectionsCount","previousValue","nextValue","collectionIndex","activeItemId","getRelativeActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getActiveItem","itemInputValue","itemUrl","isOrContainsNode","parent","child","contains","regex","isSamsung","userAgent","match","mapToAlgoliaResponse","rawResults","results","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","createStore","reducer","props","onStoreStateChange","getState","dispatch","action","prevState","type","pendingRequests","getAutocompleteSetters","store","setActiveItemId","setQuery","setCollections","rawValue","baseItemId","__autocomplete_id","setStatus","getDefaultProps","pluginSubscribers","_props$id","plugins","openOnFocus","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","id","completion","status","context","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","plugin","nested","_x$onSelect","_x$onActive","_x$onResolve","navigator","navigate","location","assign","navigateNewTab","windowReference","open","focus","navigateNewWindow","originalSourcesBySourceId","getItems","_props$plugins$reduce","sourcesBySourceId","reshapeSources","isDescription","execute","isRequesterDescription","description","preResolve","itemsOrDescription","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","packed","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","matches","response","transform","every","lastStalledId","onInput","_ref$nextState","nextState","refresh","setters","_nextState$isOpen","_nextState$isOpen2","isPanelOpen","highlightedItem","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","preventDefault","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","getPropGetters","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","rest","onMouseDownOrTouchStart","isAutocompleteInteraction","isTargetWithinAutocomplete","some","contextNode","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","role","getFormProps","_excluded3","noValidate","_providedProps$inputE","_providedProps$inputE2","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","_excluded4","activeItem","shouldFallbackKeyHint","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","onBlur","onClick","getAutocompleteId","instanceId","getLabelProps","sourceIndex","_excluded5","htmlFor","getListProps","_excluded6","getPanelProps","onMouseLeave","getItemProps","_excluded7","onMouseMove","runPreCommand","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","injectMetadata","_environment$navigato","_environment$navigato2","metadata","isMetadataEnabled","metadataContainer","headRef","querySelector","content","getCompletion","_getActiveItem","stateReducer","hasOwnProperty","createAutocomplete","subscribers","propGetters","Event","insightsParams","_plugin$subscribe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAO,CAASA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAASA,CAACC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAY,CAAE,CAAA,CAAA;IACtC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EACLC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,EAAED,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;KACV,CAAA;AACH,CAAA,CAAA,CAAA;;ACJO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASE,CAAQA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAACC,CAAE,CA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AAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACP3C,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE5C,CAAK,CAAA,CAAA,CAAA,CAAA,CAAC4C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;KACd6I,EAAAA,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EACXjG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAA;AAEd,CAAA,CAAA,CAAA;;;;;;;"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.production.js b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.production.js new file mode 100644 index 00000000..cfda69e8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/dist/umd/index.production.js @@ -0,0 +1,3 @@ +/*! @algolia/autocomplete-core 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/autocomplete-core"]={})}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r=3||2===n&&r>=4||1===n&&r>=10);function i(t,n,r){if(o&&void 0!==r){var i=r[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(S(n),[{headers:a}]))}else e.apply(void 0,[t].concat(S(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDsAfterSearch",E(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDs",E(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDsAfterSearch",E(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDs",E(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=j(t,b);return[].concat(S(e),S(_(A(A({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return i("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function x(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function C(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function q(e){return q="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},q(e)}function k(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&B({onItemsChange:r,items:n,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;a("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:c}}),n((function(e){var t=e.item,n=e.state,r=e.event;C(t)&&o({state:n,event:r,insights:c,item:t,insightsEvents:[R({eventName:"Item Selected"},d({item:t,items:l.current}))]})})),r((function(e){var t=e.item,n=e.state,r=e.event;C(t)&&i({state:n,event:r,insights:c,item:t,insightsEvents:[R({eventName:"Item Active"},d({item:t,items:l.current}))]})}))},onStateChange:function(e){var t=e.state;s({state:t})},__autocomplete_pluginOptions:e}}function L(e,t){var n=t;return{then:function(t,r){return L(e.then(J(t,n,e),J(r,n,e)),n)},catch:function(t){return L(e.catch(J(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),L(e.finally(J(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function K(e){return L(e,{isCanceled:!1,onCancelList:[]})}function J(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function Q(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function $(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(t,n){return n<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,o=0,i=0;!1===r;){var a=t.collections[o];if(a===n){r=!0;break}i+=a.items.length,o++}return t.activeItemId-i}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}var H=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function W(e,t){var r,o="undefined"!=typeof window?window:{},a=e.plugins||[];return n(n({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:!1,environment:o,shouldPanelOpen:function(e){return s(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(l++),plugins:a,initialState:n({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(r){return Promise.all([].concat(i(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:m,onResolve:m};Object.keys(t).forEach((function(e){t[e].__default=!0}));var o=n(n({},t),e);return Promise.resolve(o)})))}))}(e,r)}))).then((function(e){return c(e)})).then((function(e){return e.map((function(e){return n(n({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:n({navigate:function(e){var t=e.itemUrl;o.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=o.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;o.open(t,"_blank","noopener")}},e.navigator)})}function X(e){return Boolean(e.execute)}function z(e,t,r){if(a=e,Boolean(null==a?void 0:a.execute)){var o="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(i(Object.keys(r.context).map((function(e){var t;return null===(t=r.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return n(n({},e),{},{requests:e.queries.map((function(r){return{query:"algolia"===e.requesterId?n(n({},r),{},{params:n(n({},o),r.params)}):r,sourceId:t,transformResponse:e.transformResponse}}))})}var a;return{items:e,sourceId:t}}function G(e){var t=e.reduce((function(e,t){if(!X(t))return e.push(t),e;var n=t.searchClient,r=t.execute,o=t.requesterId,a=t.requests,u=e.find((function(e){return X(t)&&X(e)&&e.searchClient===n&&Boolean(o)&&e.requesterId===o}));if(u){var c;(c=u.items).push.apply(c,i(a))}else{var l={execute:r,requesterId:o,items:a,searchClient:n};e.push(l)}return e}),[]).map((function(e){if(!X(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})}));return Promise.all(t).then((function(e){return c(e)}))}function Y(e,t,n){return t.map((function(t){var r,o=e.filter((function(e){return e.sourceId===t.sourceId})),i=o.map((function(e){return e.items})),a=o[0].transformResponse,u=a?a({results:r=i,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):i;return t.onResolve({source:t,results:i,items:u,state:n.getState()}),u.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:u}}))}var Z,ee,te,ne=["event","nextState","props","query","refresh","store"],re=null,oe=(Z=-1,ee=-1,te=void 0,function(e){var t=++Z;return Promise.resolve(e).then((function(e){return te&&t arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","type PromiseExecutor = (\n resolve: (value: TValue | PromiseLike) => void,\n reject: (reason?: any) => void\n) => void;\n\ntype CancelablePromiseState = {\n isCanceled: boolean;\n onCancelList: Array<(...args: any[]) => any>;\n};\n\nfunction createInternalCancelablePromise(\n promise: Promise,\n initialState: CancelablePromiseState\n): CancelablePromise {\n const state = initialState;\n\n return {\n then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(\n promise.then(\n createCallback(onfulfilled, state, promise),\n createCallback(onrejected, state, promise)\n ),\n state\n );\n },\n catch(onrejected) {\n return createInternalCancelablePromise(\n promise.catch(createCallback(onrejected, state, promise)),\n state\n );\n },\n finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n\n return createInternalCancelablePromise(\n promise.finally(\n createCallback(\n onfinally &&\n (() => {\n state.onCancelList = [];\n\n return onfinally();\n }),\n state,\n promise\n )\n ),\n state\n );\n },\n cancel() {\n state.isCanceled = true;\n const callbacks = state.onCancelList;\n state.onCancelList = [];\n\n callbacks.forEach((callback) => {\n callback();\n });\n },\n isCanceled() {\n return state.isCanceled === true;\n },\n };\n}\n\nexport type CancelablePromise = {\n then(\n onfulfilled?:\n | ((\n value: TValue\n ) =>\n | TResultFulfilled\n | PromiseLike\n | CancelablePromise)\n | undefined\n | null,\n onrejected?:\n | ((\n reason: any\n ) =>\n | TResultRejected\n | PromiseLike\n | CancelablePromise)\n | undefined\n | null\n ): CancelablePromise;\n catch(\n onrejected?:\n | ((\n reason: any\n ) => TResult | PromiseLike | CancelablePromise)\n | undefined\n | null\n ): CancelablePromise;\n finally(\n onfinally?: (() => void) | undefined | null\n ): CancelablePromise;\n cancel(): void;\n isCanceled(): boolean;\n};\n\nexport function createCancelablePromise(\n executor: PromiseExecutor\n): CancelablePromise {\n return createInternalCancelablePromise(\n new Promise((resolve, reject) => {\n return executor(resolve, reject);\n }),\n { isCanceled: false, onCancelList: [] }\n );\n}\n\ncreateCancelablePromise.resolve = (\n value?: TValue | PromiseLike | CancelablePromise\n) => cancelable(Promise.resolve(value));\n\ncreateCancelablePromise.reject = (reason?: any) =>\n cancelable(Promise.reject(reason));\n\nexport function cancelable(promise: Promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: [],\n });\n}\n\nfunction createCallback(\n onResult: ((...args: any[]) => any) | null | undefined,\n state: CancelablePromiseState,\n fallback: any\n) {\n if (!onResult) {\n return fallback;\n }\n\n return function callback(arg?: any) {\n if (state.isCanceled) {\n return arg;\n }\n\n return onResult(arg);\n };\n}\n","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(\n moveAmount: number,\n baseIndex: number | null,\n itemCount: number,\n defaultActiveItemId: number | null\n): number | null {\n if (!itemCount) {\n return null;\n }\n\n if (\n moveAmount < 0 &&\n (baseIndex === null || (defaultActiveItemId !== null && baseIndex === 0))\n ) {\n return itemCount + moveAmount;\n }\n\n const numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n\n return numericIndex;\n}\n","import { AutocompleteCollection, AutocompleteState, BaseItem } from '../types';\n\n// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(\n state: AutocompleteState\n): AutocompleteCollection | undefined {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n const accumulatedCollectionsCount = state.collections\n .map((collections) => collections.items.length)\n .reduce((acc, collectionsCount, index) => {\n const previousValue = acc[index - 1] || 0;\n const nextValue = previousValue + collectionsCount;\n\n acc.push(nextValue);\n\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n const collectionIndex = accumulatedCollectionsCount.reduce((acc, current) => {\n if (current <= state.activeItemId!) {\n return acc + 1;\n }\n\n return acc;\n }, 0);\n\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId({\n state,\n collection,\n}: {\n state: AutocompleteState;\n collection: AutocompleteCollection;\n}): number {\n let isOffsetFound = false;\n let counter = 0;\n let previousItemsOffset = 0;\n\n while (isOffsetFound === false) {\n const currentCollection = state.collections[counter];\n\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n\n previousItemsOffset += currentCollection.items.length;\n\n counter++;\n }\n\n return state.activeItemId! - previousItemsOffset;\n}\n\nexport function getActiveItem(\n state: AutocompleteState\n) {\n const collection = getCollectionFromActiveItemId(state);\n\n if (!collection) {\n return null;\n }\n\n const item = collection.items[getRelativeActiveItemId({ state, collection })];\n const source = collection.source;\n const itemInputValue = source.getItemInputValue({ item, state });\n const itemUrl = source.getItemUrl({ item, state });\n\n return {\n item,\n itemInputValue,\n itemUrl,\n source,\n };\n}\n","const regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\n\nexport function isSamsung(userAgent: string) {\n return Boolean(userAgent && userAgent.match(regex));\n}\n","import {\n getItemsCount,\n generateAutocompleteId,\n flatten,\n} from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteEnvironment,\n AutocompleteOptions,\n AutocompleteSubscribers,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport { getNormalizedSources } from './utils';\n\nexport function getDefaultProps(\n props: AutocompleteOptions,\n pluginSubscribers: AutocompleteSubscribers\n): InternalAutocompleteOptions {\n /* eslint-disable no-restricted-globals */\n const environment: AutocompleteEnvironment = (\n typeof window !== 'undefined' ? window : {}\n ) as typeof window;\n /* eslint-enable no-restricted-globals */\n const plugins = props.plugins || [];\n\n return {\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment,\n shouldPanelOpen: ({ state }) => getItemsCount(state) > 0,\n reshape: ({ sources }) => sources,\n ...props,\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: props.id ?? generateAutocompleteId(),\n plugins,\n // The following props need to be deeply defaulted.\n initialState: {\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {},\n ...props.initialState,\n },\n onStateChange(params) {\n props.onStateChange?.(params);\n plugins.forEach((x) => x.onStateChange?.(params));\n },\n onSubmit(params) {\n props.onSubmit?.(params);\n plugins.forEach((x) => x.onSubmit?.(params));\n },\n onReset(params) {\n props.onReset?.(params);\n plugins.forEach((x) => x.onReset?.(params));\n },\n getSources(params) {\n return Promise.all(\n [...plugins.map((plugin) => plugin.getSources), props.getSources]\n .filter(Boolean)\n .map((getSources) => getNormalizedSources(getSources!, params))\n )\n .then((nested) => flatten(nested))\n .then((sources) =>\n sources.map((source) => ({\n ...source,\n onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach((x) => x.onSelect?.(params));\n },\n onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach((x) => x.onActive?.(params));\n },\n onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach((x) => x.onResolve?.(params));\n },\n }))\n );\n },\n navigator: {\n navigate({ itemUrl }) {\n environment.location.assign(itemUrl);\n },\n navigateNewTab({ itemUrl }) {\n const windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference?.focus();\n },\n navigateNewWindow({ itemUrl }) {\n environment.open(itemUrl, '_blank', 'noopener');\n },\n ...props.navigator,\n },\n };\n}\n","import { invariant, decycle, noop } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteSource,\n BaseItem,\n GetSources,\n GetSourcesParams,\n InternalAutocompleteSource,\n InternalGetSources,\n} from '../types';\n\nexport function getNormalizedSources(\n getSources: GetSources,\n params: GetSourcesParams\n): ReturnType> {\n const seenSourceIds: string[] = [];\n\n return Promise.resolve(getSources(params)).then((sources) => {\n invariant(\n Array.isArray(sources),\n () =>\n `The \\`getSources\\` function must return an array of sources but returned type ${JSON.stringify(\n typeof sources\n )}:\\n\\n${JSON.stringify(decycle(sources), null, 2)}`\n );\n\n return Promise.all(\n sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter((maybeSource: any): maybeSource is AutocompleteSource =>\n Boolean(maybeSource)\n )\n .map((source) => {\n invariant(\n typeof source.sourceId === 'string',\n 'A source must provide a `sourceId` string.'\n );\n\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\n `[Autocomplete] The \\`sourceId\\` ${JSON.stringify(\n source.sourceId\n )} is not unique.`\n );\n }\n\n seenSourceIds.push(source.sourceId);\n\n const defaultSource: Omit<\n InternalAutocompleteSource,\n 'sourceId' | 'getItems'\n > = {\n getItemInputValue({ state }) {\n return state.query;\n },\n getItemUrl() {\n return undefined;\n },\n onSelect({ setIsOpen }) {\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop,\n };\n\n Object.keys(defaultSource).forEach((key) => {\n defaultSource[key].__default = true;\n });\n\n const normalizedSource: InternalAutocompleteSource = {\n ...defaultSource,\n ...source,\n };\n\n return Promise.resolve(normalizedSource);\n })\n );\n });\n}\n","import type {\n Execute,\n ExecuteResponse,\n RequesterDescription,\n TransformResponse,\n} from '@algolia/autocomplete-preset-algolia';\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport {\n MultipleQueriesQuery,\n SearchForFacetValuesResponse,\n SearchResponse,\n} from '@algolia/client-search';\nimport type { SearchClient } from 'algoliasearch/lite';\n\nimport {\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteSource,\n OnResolveParams,\n} from './types';\nimport { mapToAlgoliaResponse } from './utils';\n\nfunction isDescription(\n item:\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom\n | PackedDescription\n): item is RequestDescriptionPreResolved {\n return Boolean((item as RequestDescriptionPreResolved).execute);\n}\n\nfunction isRequesterDescription(\n description: TItem[] | TItem[][] | RequesterDescription\n): description is RequesterDescription {\n return Boolean((description as RequesterDescription)?.execute);\n}\n\ntype PackedDescription = {\n searchClient: SearchClient;\n execute: Execute;\n requesterId?: string;\n items: RequestDescriptionPreResolved['requests'];\n};\n\ntype RequestDescriptionPreResolved = Pick<\n RequesterDescription,\n 'execute' | 'requesterId' | 'searchClient' | 'transformResponse'\n> & {\n requests: Array<{\n query: MultipleQueriesQuery;\n sourceId: string;\n transformResponse: TransformResponse;\n }>;\n};\n\ntype RequestDescriptionPreResolvedCustom = {\n items: TItem[] | TItem[][];\n sourceId: string;\n transformResponse?: undefined;\n};\n\nexport function preResolve(\n itemsOrDescription: TItem[] | TItem[][] | RequesterDescription,\n sourceId: string,\n state: AutocompleteState\n):\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom {\n if (isRequesterDescription(itemsOrDescription)) {\n const contextParameters =\n itemsOrDescription.requesterId === 'algolia'\n ? Object.assign(\n {},\n ...Object.keys(state.context).map((key) => {\n return (state.context[key] as Record)\n ?.__algoliaSearchParameters;\n })\n )\n : {};\n\n return {\n ...itemsOrDescription,\n requests: itemsOrDescription.queries.map((query) => ({\n query:\n itemsOrDescription.requesterId === 'algolia'\n ? {\n ...query,\n params: {\n ...contextParameters,\n ...query.params,\n },\n }\n : query,\n sourceId,\n transformResponse: itemsOrDescription.transformResponse,\n })),\n };\n }\n\n return {\n items: itemsOrDescription,\n sourceId,\n };\n}\n\nexport function resolve(\n items: Array<\n | RequestDescriptionPreResolved\n | RequestDescriptionPreResolvedCustom\n >\n) {\n const packed = items.reduce<\n Array | PackedDescription>\n >((acc, current) => {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n\n const { searchClient, execute, requesterId, requests } = current;\n\n const container = acc.find>(\n (item): item is PackedDescription => {\n return (\n isDescription(current) &&\n isDescription(item) &&\n item.searchClient === searchClient &&\n Boolean(requesterId) &&\n item.requesterId === requesterId\n );\n }\n );\n\n if (container) {\n container.items.push(...requests);\n } else {\n const request: PackedDescription = {\n execute,\n requesterId,\n items: requests,\n searchClient,\n };\n acc.push(request);\n }\n\n return acc;\n }, []);\n\n const values = packed.map<\n | Promise>\n | ReturnType>\n >((maybeDescription) => {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(\n maybeDescription as RequestDescriptionPreResolvedCustom\n );\n }\n\n const { execute, items, searchClient } =\n maybeDescription as PackedDescription;\n\n return execute({\n searchClient,\n requests: items,\n });\n });\n\n return Promise.all<\n RequestDescriptionPreResolvedCustom | ExecuteResponse\n >(values).then((responses) =>\n flatten<\n RequestDescriptionPreResolvedCustom | ExecuteResponse[0]\n >(responses)\n );\n}\n\nexport function postResolve(\n responses: Array<\n RequestDescriptionPreResolvedCustom | ExecuteResponse[0]\n >,\n sources: Array>,\n store: AutocompleteStore\n) {\n return sources.map((source) => {\n const matches = responses.filter(\n (response) => response.sourceId === source.sourceId\n );\n const results = matches.map(({ items }) => items);\n const transform = matches[0].transformResponse;\n const items = transform\n ? transform(\n mapToAlgoliaResponse(\n results as Array<\n SearchForFacetValuesResponse | SearchResponse\n >\n )\n )\n : results;\n\n source.onResolve({\n source,\n results,\n items,\n state: store.getState(),\n } as OnResolveParams);\n\n invariant(\n Array.isArray(items),\n () => `The \\`getItems\\` function from source \"${\n source.sourceId\n }\" must return an array of items but returned type ${JSON.stringify(\n typeof items\n )}:\\n\\n${JSON.stringify(decycle(items), null, 2)}.\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`\n );\n\n invariant(\n (items as Array).every(Boolean),\n `The \\`getItems\\` function from source \"${\n source.sourceId\n }\" must return an array of items but returned ${JSON.stringify(\n undefined\n )}.\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`\n );\n\n return {\n source,\n items,\n };\n });\n}\n","import type {\n SearchForFacetValuesResponse,\n SearchResponse,\n} from '@algolia/client-search';\n\nexport function mapToAlgoliaResponse(\n rawResults: Array | SearchForFacetValuesResponse>\n) {\n return {\n results: rawResults,\n hits: rawResults\n .map((result) => (result as SearchResponse).hits)\n .filter(Boolean),\n facetHits: rawResults\n .map((result) =>\n (result as SearchForFacetValuesResponse).facetHits?.map((facetHit) => {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted,\n },\n },\n };\n })\n )\n .filter(Boolean),\n };\n}\n","import { MaybePromise } from '@algolia/autocomplete-shared';\n\n/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n let basePromiseId = -1;\n let latestResolvedId = -1;\n let latestResolvedValue: unknown = undefined;\n\n return function runConcurrentSafePromise(\n promise: MaybePromise\n ) {\n basePromiseId++;\n const currentPromiseId = basePromiseId;\n\n return Promise.resolve(promise).then((x) => {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue as TValue;\n }\n\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n\n return x;\n });\n };\n}\n","import { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport {\n AutocompleteScopeApi,\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport {\n cancelable,\n CancelablePromise,\n createConcurrentSafePromise,\n getActiveItem,\n} from './utils';\n\nlet lastStalledId: number | null = null;\n\ninterface OnInputParams\n extends AutocompleteScopeApi {\n event: any;\n /**\n * The next partial state to apply after the function is called.\n *\n * This is useful when we call `onInput` in a different scenario than an\n * actual input. For example, we use `onInput` when we click on an item,\n * but we want to close the panel in that case.\n */\n nextState?: Partial>;\n props: InternalAutocompleteOptions;\n query: string;\n store: AutocompleteStore;\n}\n\nconst runConcurrentSafePromise = createConcurrentSafePromise();\n\nexport function onInput({\n event,\n nextState = {},\n props,\n query,\n refresh,\n store,\n ...setters\n}: OnInputParams): CancelablePromise {\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n\n const { setCollections, setIsOpen, setQuery, setActiveItemId, setStatus } =\n setters;\n\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n\n if (!query && props.openOnFocus === false) {\n const collections = store.getState().collections.map((collection) => ({\n ...collection,\n items: [],\n }));\n\n setStatus('idle');\n setCollections(collections);\n setIsOpen(\n nextState.isOpen ?? props.shouldPanelOpen({ state: store.getState() })\n );\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n const request = cancelable(\n runConcurrentSafePromise(collections).then(() => Promise.resolve())\n );\n\n return store.pendingRequests.add(request);\n }\n\n setStatus('loading');\n\n lastStalledId = props.environment.setTimeout(() => {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n const request = cancelable(\n runConcurrentSafePromise(\n props\n .getSources({\n query,\n refresh,\n state: store.getState(),\n ...setters,\n })\n .then((sources) => {\n return Promise.all(\n sources.map((source) => {\n return Promise.resolve(\n source.getItems({\n query,\n refresh,\n state: store.getState(),\n ...setters,\n })\n ).then((itemsOrDescription) =>\n preResolve(\n itemsOrDescription,\n source.sourceId,\n store.getState()\n )\n );\n })\n )\n .then(resolve)\n .then((responses) => postResolve(responses, sources, store))\n .then((collections) =>\n reshape({ collections, props, state: store.getState() })\n );\n })\n )\n )\n .then((collections) => {\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n\n setCollections(collections as any);\n\n const isPanelOpen = props.shouldPanelOpen({ state: store.getState() });\n\n setIsOpen(\n nextState.isOpen ??\n ((props.openOnFocus && !query && isPanelOpen) || isPanelOpen)\n );\n\n const highlightedItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && highlightedItem) {\n const { item, itemInputValue, itemUrl, source } = highlightedItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n })\n .finally(() => {\n setStatus('idle');\n\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n\n return store.pendingRequests.add(request);\n}\n","import { flatten } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteCollection,\n AutocompleteReshapeSourcesBySourceId,\n AutocompleteState,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\n\ntype ReshapeParams = {\n collections: Array>;\n props: InternalAutocompleteOptions;\n state: AutocompleteState;\n};\n\nexport function reshape({\n collections,\n props,\n state,\n}: ReshapeParams) {\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n const originalSourcesBySourceId = collections.reduce<\n AutocompleteReshapeSourcesBySourceId\n >(\n (acc, collection) => ({\n ...acc,\n [collection.source.sourceId]: {\n ...collection.source,\n getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n },\n },\n }),\n {}\n );\n\n const { sourcesBySourceId } = props.plugins.reduce(\n (acc, plugin) => {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n },\n {\n sourcesBySourceId: originalSourcesBySourceId,\n state,\n }\n );\n\n const reshapeSources = props.reshape({\n sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state,\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources)\n .filter(Boolean)\n .map((source) => {\n return {\n source,\n items: source.getItems(),\n };\n });\n}\n","import { noop } from '@algolia/autocomplete-shared';\n\nimport { onInput } from './onInput';\nimport { onKeyDown } from './onKeyDown';\nimport {\n AutocompleteScopeApi,\n AutocompleteStore,\n BaseItem,\n GetEnvironmentProps,\n GetFormProps,\n GetInputProps,\n GetItemProps,\n GetLabelProps,\n GetListProps,\n GetPanelProps,\n GetRootProps,\n InternalAutocompleteOptions,\n} from './types';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\n\ninterface GetPropGettersOptions\n extends AutocompleteScopeApi {\n store: AutocompleteStore;\n props: InternalAutocompleteOptions;\n}\n\nexport function getPropGetters<\n TItem extends BaseItem,\n TEvent,\n TMouseEvent,\n TKeyboardEvent\n>({ props, refresh, store, ...setters }: GetPropGettersOptions) {\n const getEnvironmentProps: GetEnvironmentProps = (providedProps) => {\n const { inputElement, formElement, panelElement, ...rest } = providedProps;\n\n function onMouseDownOrTouchStart(event: MouseEvent | TouchEvent) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n const isAutocompleteInteraction =\n store.getState().isOpen || !store.pendingRequests.isEmpty();\n\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n const isTargetWithinAutocomplete = [formElement, panelElement].some(\n (contextNode) => {\n return isOrContainsNode(contextNode, event.target as Node);\n }\n );\n\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n\n return {\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove(event: TouchEvent) {\n if (\n store.getState().isOpen === false ||\n inputElement !== props.environment.document.activeElement ||\n event.target === inputElement\n ) {\n return;\n }\n\n inputElement.blur();\n },\n ...rest,\n };\n };\n\n const getRootProps: GetRootProps = (rest) => {\n return {\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? `${props.id}-list` : undefined,\n 'aria-labelledby': `${props.id}-label`,\n ...rest,\n };\n };\n\n const getFormProps: GetFormProps = (providedProps) => {\n const { inputElement, ...rest } = providedProps;\n\n return {\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: (event) => {\n (event as unknown as Event).preventDefault();\n\n props.onSubmit({\n event,\n refresh,\n state: store.getState(),\n ...setters,\n });\n\n store.dispatch('submit', null);\n providedProps.inputElement?.blur();\n },\n onReset: (event) => {\n (event as unknown as Event).preventDefault();\n\n props.onReset({\n event,\n refresh,\n state: store.getState(),\n ...setters,\n });\n\n store.dispatch('reset', null);\n providedProps.inputElement?.focus();\n },\n ...rest,\n };\n };\n\n const getInputProps: GetInputProps = (\n providedProps\n ) => {\n function onFocus(event: TEvent) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput({\n event,\n props,\n query: store.getState().completion || store.getState().query,\n refresh,\n store,\n ...setters,\n });\n }\n\n store.dispatch('focus', null);\n }\n\n const { inputElement, maxLength = 512, ...rest } = providedProps || {};\n const activeItem = getActiveItem(store.getState());\n\n const userAgent = props.environment.navigator?.userAgent || '';\n const shouldFallbackKeyHint = isSamsung(userAgent);\n const enterKeyHint =\n activeItem?.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n\n return {\n 'aria-autocomplete': 'both',\n 'aria-activedescendant':\n store.getState().isOpen && store.getState().activeItemId !== null\n ? `${props.id}-item-${store.getState().activeItemId}`\n : undefined,\n 'aria-controls': store.getState().isOpen ? `${props.id}-list` : undefined,\n 'aria-labelledby': `${props.id}-label`,\n value: store.getState().completion || store.getState().query,\n id: `${props.id}-input`,\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength,\n type: 'search',\n onChange: (event) => {\n onInput({\n event,\n props,\n query: (\n (event as unknown as Event).currentTarget as HTMLInputElement\n ).value.slice(0, maxLength),\n refresh,\n store,\n ...setters,\n });\n },\n onKeyDown: (event) => {\n onKeyDown({\n event: event as unknown as KeyboardEvent,\n props,\n refresh,\n store,\n ...setters,\n });\n },\n onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: (event) => {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (\n providedProps.inputElement ===\n props.environment.document.activeElement &&\n !store.getState().isOpen\n ) {\n onFocus(event as unknown as TEvent);\n }\n },\n ...rest,\n };\n };\n\n const getAutocompleteId = (instanceId: string, sourceId?: number) => {\n return typeof sourceId !== 'undefined'\n ? `${instanceId}-${sourceId}`\n : instanceId;\n };\n\n const getLabelProps: GetLabelProps = (providedProps) => {\n const { sourceIndex, ...rest } = providedProps || {};\n\n return {\n htmlFor: `${getAutocompleteId(props.id, sourceIndex)}-input`,\n id: `${getAutocompleteId(props.id, sourceIndex)}-label`,\n ...rest,\n };\n };\n\n const getListProps: GetListProps = (providedProps) => {\n const { sourceIndex, ...rest } = providedProps || {};\n\n return {\n role: 'listbox',\n 'aria-labelledby': `${getAutocompleteId(props.id, sourceIndex)}-label`,\n id: `${getAutocompleteId(props.id, sourceIndex)}-list`,\n ...rest,\n };\n };\n\n const getPanelProps: GetPanelProps = (rest) => {\n return {\n onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n (event as unknown as MouseEvent).preventDefault();\n },\n onMouseLeave() {\n store.dispatch('mouseleave', null);\n },\n ...rest,\n };\n };\n\n const getItemProps: GetItemProps = (providedProps) => {\n const { item, source, sourceIndex, ...rest } = providedProps;\n\n return {\n id: `${getAutocompleteId(props.id, sourceIndex as number)}-item-${\n item.__autocomplete_id\n }`,\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n\n store.dispatch('mousemove', item.__autocomplete_id);\n\n const activeItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && activeItem) {\n const { item, itemInputValue, itemUrl, source } = activeItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n },\n onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n (event as unknown as MouseEvent).preventDefault();\n },\n onClick(event) {\n const itemInputValue = source.getItemInputValue({\n item,\n state: store.getState(),\n });\n const itemUrl = source.getItemUrl({\n item,\n state: store.getState(),\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n const runPreCommand = itemUrl\n ? Promise.resolve()\n : onInput({\n event,\n nextState: { isOpen: false },\n props,\n query: itemInputValue,\n refresh,\n store,\n ...setters,\n });\n\n runPreCommand.then(() => {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n });\n },\n ...rest,\n };\n };\n\n return {\n getEnvironmentProps,\n getRootProps,\n getFormProps,\n getLabelProps,\n getInputProps,\n getPanelProps,\n getListProps,\n getItemProps,\n };\n}\n","export function isOrContainsNode(parent: Node, child: Node) {\n return parent === child || parent.contains(child);\n}\n","import { onInput } from './onInput';\nimport {\n ActionType,\n AutocompleteScopeApi,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n} from './types';\nimport { getActiveItem } from './utils';\n\ninterface OnKeyDownOptions\n extends AutocompleteScopeApi {\n event: KeyboardEvent;\n props: InternalAutocompleteOptions;\n store: AutocompleteStore;\n}\n\nexport function onKeyDown({\n event,\n props,\n refresh,\n store,\n ...setters\n}: OnKeyDownOptions): void {\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n function triggerScrollIntoView() {\n const nodeItem = props.environment.document.getElementById(\n `${props.id}-item-${store.getState().activeItemId}`\n );\n\n if (nodeItem) {\n if ((nodeItem as any).scrollIntoViewIfNeeded) {\n (nodeItem as any).scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }\n\n // eslint-disable-next-line no-inner-declarations\n function triggerOnActive() {\n const highlightedItem = getActiveItem(store.getState());\n\n if (store.getState().activeItemId !== null && highlightedItem) {\n const { item, itemInputValue, itemUrl, source } = highlightedItem;\n\n source.onActive({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n }\n }\n\n // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (\n store.getState().isOpen === false &&\n (props.openOnFocus || Boolean(store.getState().query))\n ) {\n onInput({\n event,\n props,\n query: store.getState().query,\n refresh,\n store,\n ...setters,\n }).then(() => {\n store.dispatch(event.key as ActionType, {\n nextActiveItemId: props.defaultActiveItemId,\n });\n\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (\n store.getState().activeItemId === null ||\n store\n .getState()\n .collections.every((collection) => collection.items.length === 0)\n ) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n\n const { item, itemInputValue, itemUrl, source } = getActiveItem(\n store.getState()\n )!;\n\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigateNewTab({\n itemUrl,\n item,\n state: store.getState(),\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigateNewWindow({\n itemUrl,\n item,\n state: store.getState(),\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n props.navigator.navigate({\n itemUrl,\n item,\n state: store.getState(),\n });\n\n return;\n }\n\n onInput({\n event,\n nextState: { isOpen: false },\n props,\n query: itemInputValue,\n refresh,\n store,\n ...setters,\n }).then(() => {\n source.onSelect({\n event,\n item,\n itemInputValue,\n itemUrl,\n refresh,\n source,\n state: store.getState(),\n ...setters,\n });\n });\n }\n }\n}\n","import { UserAgent, userAgents } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteEnvironment,\n AutocompleteOptions,\n AutocompleteOptionsWithMetadata,\n AutocompletePlugin,\n BaseItem,\n} from '.';\n\ntype AutocompleteMetadata = {\n plugins: Array<{\n name: string | undefined;\n options: string[];\n }>;\n options: Record;\n ua: UserAgent[];\n};\n\ntype GetMetadataParams = {\n plugins: Array>;\n options: AutocompleteOptionsWithMetadata;\n};\n\nexport function getMetadata({\n plugins,\n options,\n}: GetMetadataParams) {\n const optionsKey = ((options.__autocomplete_metadata\n ?.userAgents as UserAgent[]) || [])[0]?.segment;\n\n const extraOptions = optionsKey\n ? {\n [optionsKey]: Object.keys(\n (options.__autocomplete_metadata\n ?.options as AutocompleteOptions) || {}\n ),\n }\n : {};\n\n return {\n plugins: plugins.map((plugin) => ({\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || []),\n })),\n options: {\n 'autocomplete-core': Object.keys(options),\n ...extraOptions,\n },\n ua: userAgents.concat(\n (options.__autocomplete_metadata?.userAgents as any) || []\n ),\n };\n}\n\ntype InlineMetadataParams = {\n metadata: AutocompleteMetadata;\n environment: AutocompleteEnvironment;\n};\n\nexport function injectMetadata({\n metadata,\n environment,\n}: InlineMetadataParams) {\n const isMetadataEnabled =\n environment.navigator?.userAgent?.includes('Algolia Crawler');\n\n if (isMetadataEnabled) {\n const metadataContainer = environment.document.createElement('meta');\n const headRef = environment.document.querySelector('head');\n\n metadataContainer.name = 'algolia:metadata';\n\n setTimeout(() => {\n metadataContainer.content = JSON.stringify(metadata);\n headRef!.appendChild(metadataContainer);\n }, 0);\n }\n}\n","import { AutocompleteState, BaseItem } from './types';\nimport { getActiveItem } from './utils';\n\ninterface GetCompletionProps {\n state: AutocompleteState;\n}\n\nexport function getCompletion({\n state,\n}: GetCompletionProps): string | null {\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n\n return getActiveItem(state)?.itemInputValue || null;\n}\n","import { getItemsCount, invariant } from '@algolia/autocomplete-shared';\n\nimport { getCompletion } from './getCompletion';\nimport { Reducer } from './types';\nimport { getNextActiveItemId } from './utils';\n\nexport const stateReducer: Reducer = (state, action) => {\n switch (action.type) {\n case 'setActiveItemId': {\n return {\n ...state,\n activeItemId: action.payload,\n };\n }\n\n case 'setQuery': {\n return {\n ...state,\n query: action.payload,\n completion: null,\n };\n }\n\n case 'setCollections': {\n return {\n ...state,\n collections: action.payload,\n };\n }\n\n case 'setIsOpen': {\n return {\n ...state,\n isOpen: action.payload,\n };\n }\n\n case 'setStatus': {\n return {\n ...state,\n status: action.payload,\n };\n }\n\n case 'setContext': {\n return {\n ...state,\n context: {\n ...state.context,\n ...action.payload,\n },\n };\n }\n\n case 'ArrowDown': {\n const nextState = {\n ...state,\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId')\n ? action.payload.nextActiveItemId\n : getNextActiveItemId(\n 1,\n state.activeItemId,\n getItemsCount(state),\n action.props.defaultActiveItemId\n ),\n };\n\n return {\n ...nextState,\n completion: getCompletion({ state: nextState }),\n };\n }\n\n case 'ArrowUp': {\n const nextState = {\n ...state,\n activeItemId: getNextActiveItemId(\n -1,\n state.activeItemId,\n getItemsCount(state),\n action.props.defaultActiveItemId\n ),\n };\n\n return {\n ...nextState,\n completion: getCompletion({ state: nextState }),\n };\n }\n\n case 'Escape': {\n if (state.isOpen) {\n return {\n ...state,\n activeItemId: null,\n isOpen: false,\n completion: null,\n };\n }\n\n return {\n ...state,\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: [],\n };\n }\n\n case 'submit': {\n return {\n ...state,\n activeItemId: null,\n isOpen: false,\n status: 'idle',\n };\n }\n\n case 'reset': {\n return {\n ...state,\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true\n ? action.props.defaultActiveItemId\n : null,\n status: 'idle',\n query: '',\n };\n }\n\n case 'focus': {\n return {\n ...state,\n activeItemId: action.props.defaultActiveItemId,\n isOpen:\n (action.props.openOnFocus || Boolean(state.query)) &&\n action.props.shouldPanelOpen({ state }),\n };\n }\n\n case 'blur': {\n if (action.props.debug) {\n return state;\n }\n\n return {\n ...state,\n isOpen: false,\n activeItemId: null,\n };\n }\n\n case 'mousemove': {\n return {\n ...state,\n activeItemId: action.payload,\n };\n }\n\n case 'mouseleave': {\n return {\n ...state,\n activeItemId: action.props.defaultActiveItemId,\n };\n }\n\n default:\n invariant(\n false,\n `The reducer action ${JSON.stringify(action.type)} is not supported.`\n );\n\n return state;\n }\n};\n","import { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\n\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nimport {\n AutocompleteApi,\n AutocompleteOptions as AutocompleteCoreOptions,\n BaseItem,\n AutocompleteSubscribers,\n} from './types';\n\nexport interface AutocompleteOptionsWithMetadata\n extends AutocompleteCoreOptions {\n /**\n * @internal\n */\n __autocomplete_metadata?: Record;\n}\n\nexport function createAutocomplete<\n TItem extends BaseItem,\n TEvent = Event,\n TMouseEvent = MouseEvent,\n TKeyboardEvent = KeyboardEvent\n>(\n options: AutocompleteOptionsWithMetadata\n): AutocompleteApi {\n checkOptions(options);\n\n const subscribers: AutocompleteSubscribers = [];\n const props = getDefaultProps(options, subscribers);\n const store = createStore(stateReducer, props, onStoreStateChange);\n\n const setters = getAutocompleteSetters({ store });\n const propGetters = getPropGetters<\n TItem,\n TEvent,\n TMouseEvent,\n TKeyboardEvent\n >({ props, refresh, store, navigator: props.navigator, ...setters });\n\n function onStoreStateChange({ prevState, state }) {\n props.onStateChange({\n prevState,\n state,\n refresh,\n navigator: props.navigator,\n ...setters,\n });\n }\n\n function refresh() {\n return onInput({\n event: new Event('input'),\n nextState: { isOpen: store.getState().isOpen },\n props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh,\n store,\n ...setters,\n });\n }\n\n if (\n options.insights &&\n !props.plugins.some((plugin) => plugin.name === 'aa.algoliaInsightsPlugin')\n ) {\n const insightsParams =\n typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n\n props.plugins.forEach((plugin) =>\n plugin.subscribe?.({\n ...setters,\n navigator: props.navigator,\n refresh,\n onSelect(fn) {\n subscribers.push({ onSelect: fn });\n },\n onActive(fn) {\n subscribers.push({ onActive: fn });\n },\n onResolve(fn) {\n subscribers.push({ onResolve: fn });\n },\n })\n );\n\n injectMetadata({\n metadata: getMetadata({ plugins: props.plugins, options }),\n environment: props.environment,\n });\n\n return {\n refresh,\n navigator: props.navigator,\n ...propGetters,\n ...setters,\n };\n}\n","import {\n AutocompleteState,\n AutocompleteStore,\n BaseItem,\n InternalAutocompleteOptions,\n Reducer,\n} from './types';\nimport { createCancelablePromiseList } from './utils';\n\ntype OnStoreStateChange = ({\n prevState,\n state,\n}: {\n prevState: AutocompleteState;\n state: AutocompleteState;\n}) => void;\n\nexport function createStore(\n reducer: Reducer,\n props: InternalAutocompleteOptions,\n onStoreStateChange: OnStoreStateChange\n): AutocompleteStore {\n let state = props.initialState;\n\n return {\n getState() {\n return state;\n },\n dispatch(action, payload) {\n const prevState = { ...state };\n state = reducer(state, {\n type: action,\n props,\n payload,\n });\n\n onStoreStateChange({ state, prevState });\n },\n pendingRequests: createCancelablePromiseList(),\n };\n}\n","import { CancelablePromise } from '.';\n\nexport type CancelablePromiseList = {\n /**\n * Add a cancelable promise to the list.\n *\n * @param cancelablePromise The cancelable promise to add.\n */\n add(cancelablePromise: CancelablePromise): CancelablePromise;\n /**\n * Cancel all pending promises.\n *\n * Requests aren't actually stopped. All pending promises will settle, but\n * attached handlers won't run.\n */\n cancelAll(): void;\n /**\n * Whether there are pending promises in the list.\n */\n isEmpty(): boolean;\n};\n\nexport function createCancelablePromiseList<\n TValue\n>(): CancelablePromiseList {\n let list: Array> = [];\n\n return {\n add(cancelablePromise) {\n list.push(cancelablePromise);\n\n return cancelablePromise.finally(() => {\n list = list.filter((item) => item !== cancelablePromise);\n });\n },\n cancelAll() {\n list.forEach((promise) => promise.cancel());\n },\n isEmpty() {\n return list.length === 0;\n },\n };\n}\n","import { flatten } from '@algolia/autocomplete-shared';\n\nimport {\n AutocompleteApi,\n AutocompleteCollection,\n AutocompleteStore,\n BaseItem,\n} from './types';\n\ninterface GetAutocompleteSettersOptions {\n store: AutocompleteStore;\n}\n\nexport function getAutocompleteSetters({\n store,\n}: GetAutocompleteSettersOptions) {\n const setActiveItemId: AutocompleteApi['setActiveItemId'] = (\n value\n ) => {\n store.dispatch('setActiveItemId', value);\n };\n\n const setQuery: AutocompleteApi['setQuery'] = (value) => {\n store.dispatch('setQuery', value);\n };\n\n const setCollections: AutocompleteApi['setCollections'] = (\n rawValue\n ) => {\n let baseItemId = 0;\n const value = rawValue.map>((collection) => ({\n ...collection,\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items as any).map((item: any) => ({\n ...item,\n __autocomplete_id: baseItemId++,\n })),\n }));\n\n store.dispatch('setCollections', value);\n };\n\n const setIsOpen: AutocompleteApi['setIsOpen'] = (value) => {\n store.dispatch('setIsOpen', value);\n };\n\n const setStatus: AutocompleteApi['setStatus'] = (value) => {\n store.dispatch('setStatus', value);\n };\n\n const setContext: AutocompleteApi['setContext'] = (value) => {\n store.dispatch('setContext', value);\n };\n\n return {\n setActiveItemId,\n setQuery,\n setCollections,\n setIsOpen,\n setStatus,\n setContext,\n };\n}\n"],"names":["debounce","fn","time","timerId","undefined","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply","flatten","values","reduce","a","b","concat","autocompleteId","getItemsCount","state","collections","sum","collection","items","isPrimitive","obj","Object","isEqual","first","second","keys","_i","_Object$keys","key","noop","userAgents","segment","version","createClickedEvent","_ref","item","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_slicedToArray","arr","i","isArray","_arrayWithHoles","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","call","next","done","push","value","err","return","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_excluded","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","_objectWithoutProperties","source","excluded","target","sourceKeys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","arg","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","map","param","_ref2","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","current","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","callback","window","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","createInternalCancelablePromise","promise","initialState","then","onfulfilled","onrejected","createCallback","catch","finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getActiveItem","collectionIndex","collectionsCount","nextValue","activeItemId","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","getItemInputValue","itemUrl","getItemUrl","regex","getDefaultProps","props","pluginSubscribers","_props$id","plugins","debug","openOnFocus","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","sources","id","query","completion","status","context","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","maybeSource","sourceId","includes","Error","JSON","stringify","defaultSource","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigator","navigate","location","assign","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","getState","every","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","pendingRequests","add","getItems","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","isEmpty","some","contextNode","parent","child","contains","dispatch","cancelAll","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","action","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","_excluded3","getLabelProps","sourceIndex","_excluded5","htmlFor","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","_excluded4","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","type","onChange","currentTarget","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","_excluded6","getItemProps","_excluded7","__autocomplete_id","onMouseMove","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","stateReducer","hasOwnProperty","subscribers","reducer","onStoreStateChange","list","prevState","cancelablePromise","createStore","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata"],"mappings":";63EAAO,SAASA,EAASC,EAAIC,GAC3B,IAAIC,OAAUC,EACd,OAAO,WACL,IAAK,IAAIC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EAAGA,EAAOL,EAAMK,IAC/EF,EAAKE,GAAQJ,UAAUI,GAErBP,GACFQ,aAAaR,GAEfA,EAAUS,YAAW,WACnB,OAAOX,EAAGY,WAAM,EAAQL,KACvBN,ICXA,SAASY,EAAQC,GACtB,OAAOA,EAAOC,QAAO,SAAUC,EAAGC,GAChC,OAAOD,EAAEE,OAAOD,KACf,ICHL,IAAIE,EAAiB,ECAd,SAASC,EAAcC,GAC5B,OAAiC,IAA7BA,EAAMC,YAAYhB,OACb,EAEFe,EAAMC,YAAYP,QAAO,SAAUQ,EAAKC,GAC7C,OAAOD,EAAMC,EAAWC,MAAMnB,SAC7B,GCNL,SAASoB,EAAYC,GACnB,OAAOA,IAAQC,OAAOD,GAEjB,SAASE,EA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C3CE,EAASxR,YAAYuR,KACpB,IGoBLI,CAAe,CACbL,SAAU7B,GAAY,CAAE/L,QAASH,EAAMG,QAAStF,QAAAA,IAChDiB,YAAakE,EAAMlE,cAGrBzG,EAAAA,EAAA,CACEiR,QAAAA,EACAtD,UAAWhD,EAAMgD,WACdyK,GACAlH"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-core/package.json b/paperai-docs/node_modules/@algolia/autocomplete-core/package.json new file mode 100644 index 00000000..3c3e95f2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-core/package.json @@ -0,0 +1,42 @@ +{ + "name": "@algolia/autocomplete-core", + "description": "Core primitives for building autocomplete experiences.", + "version": "1.9.3", + "license": "MIT", + "homepage": "https://github.com/algolia/autocomplete", + "repository": "algolia/autocomplete", + "author": { + "name": "Algolia, Inc.", + "url": "https://www.algolia.com" + }, + "source": "src/index.ts", + "types": "dist/esm/index.d.ts", + "module": "dist/esm/index.js", + "main": "dist/umd/index.production.js", + "umd:main": "dist/umd/index.production.js", + "unpkg": "dist/umd/index.production.js", + "jsdelivr": "dist/umd/index.production.js", + "sideEffects": false, + "files": [ + "dist/" + ], + "scripts": { + "build:clean": "rm -rf ./dist", + "build:esm": "babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/esm --ignore '**/*/__tests__/'", + "build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm", + "build:umd": "rollup --config", + "build": "yarn build:clean && yarn build:umd && yarn build:esm && yarn build:types", + "on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"", + "prepare": "yarn build:esm && yarn build:types", + "watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\"" + }, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + }, + "devDependencies": { + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@algolia/client-search": "4.16.0", + "algoliasearch": "4.16.0" + } +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/README.md b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/README.md new file mode 100644 index 00000000..00b667a7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/README.md @@ -0,0 +1,15 @@ +# @algolia/autocomplete-plugin-algolia-insights + +The Algolia Insights plugin automatically sends click and conversion events to the [Algolia Insights API](https://www.algolia.com/doc/rest-api/insights]) whenever a user interacts with the autocomplete. + +## Installation + +```sh +yarn add @algolia/autocomplete-plugin-algolia-insights +# or +npm install @algolia/autocomplete-plugin-algolia-insights +``` + +## Documentation + +See [**Documentation**](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights). diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.d.ts new file mode 100644 index 00000000..1cf53c70 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.d.ts @@ -0,0 +1,37 @@ +import { AutocompletePlugin } from '@algolia/autocomplete-shared'; +import { InsightsClient, OnActiveParams, OnItemsChangeParams, OnSelectParams } from './types'; +export declare type CreateAlgoliaInsightsPluginParams = { + /** + * The initialized Search Insights client. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-insightsclient + */ + insightsClient?: InsightsClient; + /** + * Hook to send an Insights event when the items change. + * + * By default, it sends a `viewedObjectIDs` event. + * + * In as-you-type experiences, items change as the user types. This hook is debounced every 400ms to reflect actual items that users notice and avoid generating too many events for items matching "in progress" queries. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onitemschange + */ + onItemsChange?(params: OnItemsChangeParams): void; + /** + * Hook to send an Insights event when an item is selected. + * + * By default, it sends a clickedObjectIDsAfterSearch event. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onselect + */ + onSelect?(params: OnSelectParams): void; + /** + * Hook to send an Insights event when an item is active. + * + * By default, it doesn't send any events. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onactive + */ + onActive?(params: OnActiveParams): void; +}; +export declare function createAlgoliaInsightsPlugin(options: CreateAlgoliaInsightsPluginParams): AutocompletePlugin; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js new file mode 100644 index 00000000..ddf265b6 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js @@ -0,0 +1,200 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared'; +import { createClickedEvent } from './createClickedEvent'; +import { createSearchInsightsApi } from './createSearchInsightsApi'; +import { createViewedEvents } from './createViewedEvents'; +import { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit'; +var VIEW_EVENT_DELAY = 400; +var ALGOLIA_INSIGHTS_VERSION = '2.6.0'; +var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js"); +var sendViewedObjectIDs = debounce(function (_ref) { + var onItemsChange = _ref.onItemsChange, + items = _ref.items, + insights = _ref.insights, + state = _ref.state; + onItemsChange({ + insights: insights, + insightsEvents: createViewedEvents({ + items: items + }).map(function (event) { + return _objectSpread({ + eventName: 'Items Viewed' + }, event); + }), + state: state + }); +}, VIEW_EVENT_DELAY); +export function createAlgoliaInsightsPlugin(options) { + var _getOptions = getOptions(options), + providedInsightsClient = _getOptions.insightsClient, + onItemsChange = _getOptions.onItemsChange, + onSelectEvent = _getOptions.onSelect, + onActiveEvent = _getOptions.onActive; + var insightsClient = providedInsightsClient; + if (!providedInsightsClient) { + safelyRunOnBrowser(function (_ref2) { + var window = _ref2.window; + var pointer = window.AlgoliaAnalyticsObject || 'aa'; + if (typeof pointer === 'string') { + insightsClient = window[pointer]; + } + if (!insightsClient) { + window.AlgoliaAnalyticsObject = pointer; + if (!window[pointer]) { + window[pointer] = function () { + if (!window[pointer].queue) { + window[pointer].queue = []; + } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + window[pointer].queue.push(args); + }; + } + window[pointer].version = ALGOLIA_INSIGHTS_VERSION; + insightsClient = window[pointer]; + loadInsights(window); + } + }); + } + var insights = createSearchInsightsApi(insightsClient); + var previousItems = createRef([]); + var debouncedOnStateChange = debounce(function (_ref3) { + var state = _ref3.state; + if (!state.isOpen) { + return; + } + var items = state.collections.reduce(function (acc, current) { + return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items)); + }, []).filter(isAlgoliaInsightsHit); + if (!isEqual(previousItems.current.map(function (x) { + return x.objectID; + }), items.map(function (x) { + return x.objectID; + }))) { + previousItems.current = items; + if (items.length > 0) { + sendViewedObjectIDs({ + onItemsChange: onItemsChange, + items: items, + insights: insights, + state: state + }); + } + } + }, 0); + return { + name: 'aa.algoliaInsightsPlugin', + subscribe: function subscribe(_ref4) { + var setContext = _ref4.setContext, + onSelect = _ref4.onSelect, + onActive = _ref4.onActive; + insightsClient('addAlgoliaAgent', 'insights-plugin'); + setContext({ + algoliaInsightsPlugin: { + __algoliaSearchParameters: { + clickAnalytics: true + }, + insights: insights + } + }); + onSelect(function (_ref5) { + var item = _ref5.item, + state = _ref5.state, + event = _ref5.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onSelectEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread({ + eventName: 'Item Selected' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + onActive(function (_ref6) { + var item = _ref6.item, + state = _ref6.state, + event = _ref6.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onActiveEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread({ + eventName: 'Item Active' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + }, + onStateChange: function onStateChange(_ref7) { + var state = _ref7.state; + debouncedOnStateChange({ + state: state + }); + }, + __autocomplete_pluginOptions: options + }; +} +function getOptions(options) { + return _objectSpread({ + onItemsChange: function onItemsChange(_ref8) { + var insights = _ref8.insights, + insightsEvents = _ref8.insightsEvents; + insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread(_objectSpread({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onSelect: function onSelect(_ref9) { + var insights = _ref9.insights, + insightsEvents = _ref9.insightsEvents; + insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread(_objectSpread({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onActive: noop + }, options); +} +function loadInsights(environment) { + var errorMessage = "[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete"; + try { + var script = environment.document.createElement('script'); + script.async = true; + script.src = ALGOLIA_INSIGHTS_SRC; + script.onerror = function () { + // eslint-disable-next-line no-console + console.error(errorMessage); + }; + document.body.appendChild(script); + } catch (cause) { + // eslint-disable-next-line no-console + console.error(errorMessage); + } +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.d.ts new file mode 100644 index 00000000..ddd51f25 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.d.ts @@ -0,0 +1,9 @@ +import type { AlgoliaInsightsHit, ClickedObjectIDsAfterSearchParams, InsightsParamsWithItems } from './types'; +declare type CreateClickedEventParams = { + item: AlgoliaInsightsHit; + items: AlgoliaInsightsHit[]; +}; +export declare function createClickedEvent({ item, items, }: CreateClickedEventParams): Omit, 'eventName'> & { + algoliaSource?: string[]; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js new file mode 100644 index 00000000..8fbb672a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js @@ -0,0 +1,13 @@ +export function createClickedEvent(_ref) { + var item = _ref.item, + items = _ref.items; + return { + index: item.__autocomplete_indexName, + items: [item], + positions: [1 + items.findIndex(function (x) { + return x.objectID === item.objectID; + })], + queryID: item.__autocomplete_queryID, + algoliaSource: ['autocomplete'] + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.d.ts new file mode 100644 index 00000000..a694c463 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.d.ts @@ -0,0 +1,59 @@ +import { ClickedFiltersParams, ClickedObjectIDsAfterSearchParams, ClickedObjectIDsParams, ConvertedFiltersParams, ConvertedObjectIDsAfterSearchParams, ConvertedObjectIDsParams, InsightsClient, InsightsParamsWithItems, ViewedFiltersParams, ViewedObjectIDsParams } from './types'; +export declare function createSearchInsightsApi(searchInsights: InsightsClient): { + /** + * Initializes Insights with Algolia credentials. + */ + init(appId: string, apiKey: string): void; + /** + * Sets the user token to attach to events. + */ + setUserToken(userToken: string): void; + /** + * Sends click events to capture a query and its clicked items and positions. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/ + */ + clickedObjectIDsAfterSearch(...params: Array>): void; + /** + * Sends click events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/ + */ + clickedObjectIDs(...params: Array>): void; + /** + * Sends click events to capture the filters a user clicks on. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/ + */ + clickedFilters(...params: ClickedFiltersParams[]): void; + /** + * Sends conversion events to capture a query and its clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/ + */ + convertedObjectIDsAfterSearch(...params: Array>): void; + /** + * Sends conversion events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/ + */ + convertedObjectIDs(...params: Array>): void; + /** + * Sends conversion events to capture the filters a user uses when converting. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/ + */ + convertedFilters(...params: ConvertedFiltersParams[]): void; + /** + * Sends view events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/ + */ + viewedObjectIDs(...params: Array>): void; + /** + * Sends view events to capture the filters a user uses when viewing. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/ + */ + viewedFilters(...params: ViewedFiltersParams[]): void; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js new file mode 100644 index 00000000..8ac781fd --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js @@ -0,0 +1,197 @@ +var _excluded = ["items"], + _excluded2 = ["items"]; +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { isModernInsightsClient } from './isModernInsightsClient'; +function chunk(item) { + var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20; + var chunks = []; + for (var i = 0; i < item.objectIDs.length; i += chunkSize) { + chunks.push(_objectSpread(_objectSpread({}, item), {}, { + objectIDs: item.objectIDs.slice(i, i + chunkSize) + })); + } + return chunks; +} +function mapToInsightsParamsApi(params) { + return params.map(function (_ref) { + var items = _ref.items, + param = _objectWithoutProperties(_ref, _excluded); + return _objectSpread(_objectSpread({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) { + var objectID = _ref2.objectID; + return objectID; + })) || param.objectIDs + }); + }); +} +export function createSearchInsightsApi(searchInsights) { + var canSendHeaders = isModernInsightsClient(searchInsights); + function sendToInsights(method, payloads, items) { + if (canSendHeaders && typeof items !== 'undefined') { + var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials, + appId = _items$0$__autocomple.appId, + apiKey = _items$0$__autocomple.apiKey; + var headers = { + 'X-Algolia-Application-Id': appId, + 'X-Algolia-API-Key': apiKey + }; + searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{ + headers: headers + }])); + } else { + searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads))); + } + } + return { + /** + * Initializes Insights with Algolia credentials. + */ + init: function init(appId, apiKey) { + searchInsights('init', { + appId: appId, + apiKey: apiKey + }); + }, + /** + * Sets the user token to attach to events. + */ + setUserToken: function setUserToken(userToken) { + searchInsights('setUserToken', userToken); + }, + /** + * Sends click events to capture a query and its clicked items and positions. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/ + */ + clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() { + for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) { + params[_key] = arguments[_key]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/ + */ + clickedObjectIDs: function clickedObjectIDs() { + for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + params[_key2] = arguments[_key2]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture the filters a user clicks on. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/ + */ + clickedFilters: function clickedFilters() { + for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + params[_key3] = arguments[_key3]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['clickedFilters'].concat(params)); + } + }, + /** + * Sends conversion events to capture a query and its clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/ + */ + convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() { + for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + params[_key4] = arguments[_key4]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/ + */ + convertedObjectIDs: function convertedObjectIDs() { + for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + params[_key5] = arguments[_key5]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture the filters a user uses when converting. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/ + */ + convertedFilters: function convertedFilters() { + for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + params[_key6] = arguments[_key6]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['convertedFilters'].concat(params)); + } + }, + /** + * Sends view events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/ + */ + viewedObjectIDs: function viewedObjectIDs() { + for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + params[_key7] = arguments[_key7]; + } + if (params.length > 0) { + params.reduce(function (acc, _ref3) { + var items = _ref3.items, + param = _objectWithoutProperties(_ref3, _excluded2); + return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) { + var objectID = _ref4.objectID; + return objectID; + })) || param.objectIDs + })).map(function (payload) { + return { + items: items, + payload: payload + }; + }))); + }, []).forEach(function (_ref5) { + var items = _ref5.items, + payload = _ref5.payload; + return sendToInsights('viewedObjectIDs', [payload], items); + }); + } + }, + /** + * Sends view events to capture the filters a user uses when viewing. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/ + */ + viewedFilters: function viewedFilters() { + for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { + params[_key8] = arguments[_key8]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['viewedFilters'].concat(params)); + } + } + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.d.ts new file mode 100644 index 00000000..bf5cb84f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.d.ts @@ -0,0 +1,6 @@ +import { AlgoliaInsightsHit, InsightsParamsWithItems, ViewedObjectIDsParams } from './types'; +declare type CreateViewedEventsParams = { + items: AlgoliaInsightsHit[]; +}; +export declare function createViewedEvents({ items, }: CreateViewedEventsParams): Array, 'eventName'>>; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js new file mode 100644 index 00000000..a3db0cac --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js @@ -0,0 +1,16 @@ +export function createViewedEvents(_ref) { + var items = _ref.items; + var itemsByIndexName = items.reduce(function (acc, current) { + var _acc$current$__autoco; + acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current); + return acc; + }, {}); + return Object.keys(itemsByIndexName).map(function (indexName) { + var items = itemsByIndexName[indexName]; + return { + index: indexName, + items: items, + algoliaSource: ['autocomplete'] + }; + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.ts new file mode 100644 index 00000000..0421ce7c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.d.ts @@ -0,0 +1,2 @@ +export * from './types'; +export * from './createAlgoliaInsightsPlugin'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.js new file mode 100644 index 00000000..3de936bd --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/index.js @@ -0,0 +1,2 @@ +export * from './types'; +export * from './createAlgoliaInsightsPlugin'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.d.ts new file mode 100644 index 00000000..e20140cf --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.d.ts @@ -0,0 +1,2 @@ +import { AlgoliaInsightsHit } from './types'; +export declare function isAlgoliaInsightsHit(hit: any): hit is AlgoliaInsightsHit; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js new file mode 100644 index 00000000..7bd9d280 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js @@ -0,0 +1,3 @@ +export function isAlgoliaInsightsHit(hit) { + return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.d.ts new file mode 100644 index 00000000..1a3a47fe --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.d.ts @@ -0,0 +1,6 @@ +import type { InsightsClient } from './types'; +/** + * Determines if a given insights `client` supports the optional call to `init` + * and the ability to set credentials via extra parameters when sending events. + */ +export declare function isModernInsightsClient(client: InsightsClient): boolean; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js new file mode 100644 index 00000000..8502979d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js @@ -0,0 +1,23 @@ +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +/** + * Determines if a given insights `client` supports the optional call to `init` + * and the ability to set credentials via extra parameters when sending events. + */ +export function isModernInsightsClient(client) { + var _split$map = (client.version || '').split('.').map(Number), + _split$map2 = _slicedToArray(_split$map, 2), + major = _split$map2[0], + minor = _split$map2[1]; + + /* eslint-disable @typescript-eslint/camelcase */ + var v3 = major >= 3; + var v2_4 = major === 2 && minor >= 4; + var v1_10 = major === 1 && minor >= 10; + return v3 || v2_4 || v1_10; + /* eslint-enable @typescript-eslint/camelcase */ +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.d.ts new file mode 100644 index 00000000..af7ba1a1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.d.ts @@ -0,0 +1,9 @@ +export declare type AlgoliaInsightsHit = { + objectID: string; + __autocomplete_indexName: string; + __autocomplete_queryID: string; + __autocomplete_algoliaCredentials: { + appId: string; + apiKey: string; + }; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AlgoliaInsightsHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.d.ts new file mode 100644 index 00000000..62ed9160 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.d.ts @@ -0,0 +1,63 @@ +import { createSearchInsightsApi } from '../createSearchInsightsApi'; +import type { AlgoliaInsightsHit } from './AlgoliaInsightsHit'; +export declare type AutocompleteInsightsApi = ReturnType; +export declare type InsightsParamsWithItems = Omit & { + items: AlgoliaInsightsHit[]; + /** + * @deprecated use `items` instead + */ + objectIDs?: string[]; +}; +export declare type ClickedObjectIDsAfterSearchParams = { + eventName: string; + index: string; + objectIDs: string[]; + positions: number[]; + queryID: string; + userToken?: string; +}; +export declare type ClickedObjectIDsParams = { + eventName: string; + index: string; + objectIDs: string[]; + userToken?: string; +}; +export declare type ClickedFiltersParams = { + eventName: string; + filters: string[]; + index: string; + userToken: string; +}; +export declare type ConvertedObjectIDsAfterSearchParams = { + eventName: string; + index: string; + objectIDs: string[]; + queryID: string; + userToken?: string; +}; +export declare type ConvertedObjectIDsParams = { + eventName: string; + index: string; + objectIDs: string[]; + userToken: string; +}; +export declare type ConvertedFiltersParams = { + eventName: string; + filters: string[]; + index: string; + userToken: string; +}; +export declare type ViewedObjectIDsParams = { + eventName: string; + index: string; + objectIDs: string[]; + userToken?: string; +}; +export declare type ViewedFiltersParams = { + eventName: string; + filters: string[]; + index: string; + userToken: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/AutocompleteInsightsApi.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.d.ts new file mode 100644 index 00000000..2f2ae4a3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.d.ts @@ -0,0 +1,20 @@ +import type { AutocompleteState } from '@algolia/autocomplete-shared'; +import type { ClickedObjectIDsAfterSearchParams, InsightsParamsWithItems, ViewedObjectIDsParams } from './AutocompleteInsightsApi'; +import type { AlgoliaInsightsHit, AutocompleteInsightsApi } from '.'; +export declare type OnSelectParams = { + insights: AutocompleteInsightsApi; + insightsEvents: Array>; + item: AlgoliaInsightsHit; + state: AutocompleteState; + event: any; +}; +export declare type OnActiveParams = OnSelectParams; +export declare type OnItemsChangeParams = { + insights: AutocompleteInsightsApi; + insightsEvents: Array>; + state: AutocompleteState; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/EventParams.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.d.ts new file mode 100644 index 00000000..732cbcf8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.d.ts @@ -0,0 +1,16 @@ +import type { InsightsMethodMap, InsightsClient as _InsightsClient } from 'search-insights'; +export type { Init as InsightsInit, AddAlgoliaAgent as InsightsAddAlgoliaAgent, SetUserToken as InsightsSetUserToken, GetUserToken as InsightsGetUserToken, OnUserTokenChange as InsightsOnUserTokenChange, } from 'search-insights'; +export declare type InsightsClientMethod = keyof InsightsMethodMap; +export declare type InsightsClientPayload = { + eventName: string; + queryID: string; + index: string; + objectIDs: string[]; + positions?: number[]; +}; +declare type QueueItemMap = Record; +declare type QueueItem = QueueItemMap[keyof QueueItemMap]; +export declare type InsightsClient = _InsightsClient & { + queue?: QueueItem[]; + version?: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/InsightsClient.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.d.ts new file mode 100644 index 00000000..165e4c70 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.d.ts @@ -0,0 +1,4 @@ +export * from './AlgoliaInsightsHit'; +export * from './AutocompleteInsightsApi'; +export * from './EventParams'; +export * from './InsightsClient'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.js new file mode 100644 index 00000000..163c9d0b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/types/index.js @@ -0,0 +1,4 @@ +export * from './AlgoliaInsightsHit'; +export * from './AutocompleteInsightsApi'; +export * from './EventParams'; +export * from './InsightsClient'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js new file mode 100644 index 00000000..ff38be77 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js @@ -0,0 +1,631 @@ +/*! @algolia/autocomplete-plugin-algolia-insights 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@algolia/autocomplete-plugin-algolia-insights"] = {})); +})(this, (function (exports) { 'use strict'; + + function _iterableToArrayLimit(arr, i) { + var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; + if (null != _i) { + var _s, + _e, + _x, + _r, + _arr = [], + _n = !0, + _d = !1; + try { + if (_x = (_i = _i.call(arr)).next, 0 === i) { + if (Object(_i) !== _i) return; + _n = !1; + } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); + } catch (err) { + _d = !0, _e = err; + } finally { + try { + if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + } finally { + if (_d) throw _e; + } + } + return _arr; + } + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; + } + function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; + } + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + + function createRef(initialValue) { + return { + current: initialValue + }; + } + + function debounce(fn, time) { + var timerId = undefined; + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (timerId) { + clearTimeout(timerId); + } + timerId = setTimeout(function () { + return fn.apply(void 0, args); + }, time); + }; + } + + function isPrimitive(obj) { + return obj !== Object(obj); + } + function isEqual(first, second) { + if (first === second) { + return true; + } + if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') { + return first === second; + } + if (Object.keys(first).length !== Object.keys(second).length) { + return false; + } + for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + if (!(key in second)) { + return false; + } + if (!isEqual(first[key], second[key])) { + return false; + } + } + return true; + } + + var noop = function noop() {}; + + /** + * Safely runs code meant for browser environments only. + */ + function safelyRunOnBrowser(callback) { + if (typeof window !== 'undefined') { + return callback({ + window: window + }); + } + return undefined; + } + + function createClickedEvent(_ref) { + var item = _ref.item, + items = _ref.items; + return { + index: item.__autocomplete_indexName, + items: [item], + positions: [1 + items.findIndex(function (x) { + return x.objectID === item.objectID; + })], + queryID: item.__autocomplete_queryID, + algoliaSource: ['autocomplete'] + }; + } + + /** + * Determines if a given insights `client` supports the optional call to `init` + * and the ability to set credentials via extra parameters when sending events. + */ + function isModernInsightsClient(client) { + var _split$map = (client.version || '').split('.').map(Number), + _split$map2 = _slicedToArray(_split$map, 2), + major = _split$map2[0], + minor = _split$map2[1]; + + /* eslint-disable @typescript-eslint/camelcase */ + var v3 = major >= 3; + var v2_4 = major === 2 && minor >= 4; + var v1_10 = major === 1 && minor >= 10; + return v3 || v2_4 || v1_10; + /* eslint-enable @typescript-eslint/camelcase */ + } + + var _excluded = ["items"], + _excluded2 = ["items"]; + function chunk(item) { + var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20; + var chunks = []; + for (var i = 0; i < item.objectIDs.length; i += chunkSize) { + chunks.push(_objectSpread2(_objectSpread2({}, item), {}, { + objectIDs: item.objectIDs.slice(i, i + chunkSize) + })); + } + return chunks; + } + function mapToInsightsParamsApi(params) { + return params.map(function (_ref) { + var items = _ref.items, + param = _objectWithoutProperties(_ref, _excluded); + return _objectSpread2(_objectSpread2({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) { + var objectID = _ref2.objectID; + return objectID; + })) || param.objectIDs + }); + }); + } + function createSearchInsightsApi(searchInsights) { + var canSendHeaders = isModernInsightsClient(searchInsights); + function sendToInsights(method, payloads, items) { + if (canSendHeaders && typeof items !== 'undefined') { + var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials, + appId = _items$0$__autocomple.appId, + apiKey = _items$0$__autocomple.apiKey; + var headers = { + 'X-Algolia-Application-Id': appId, + 'X-Algolia-API-Key': apiKey + }; + searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{ + headers: headers + }])); + } else { + searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads))); + } + } + return { + /** + * Initializes Insights with Algolia credentials. + */ + init: function init(appId, apiKey) { + searchInsights('init', { + appId: appId, + apiKey: apiKey + }); + }, + /** + * Sets the user token to attach to events. + */ + setUserToken: function setUserToken(userToken) { + searchInsights('setUserToken', userToken); + }, + /** + * Sends click events to capture a query and its clicked items and positions. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/ + */ + clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() { + for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) { + params[_key] = arguments[_key]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/ + */ + clickedObjectIDs: function clickedObjectIDs() { + for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + params[_key2] = arguments[_key2]; + } + if (params.length > 0) { + sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends click events to capture the filters a user clicks on. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/ + */ + clickedFilters: function clickedFilters() { + for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + params[_key3] = arguments[_key3]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['clickedFilters'].concat(params)); + } + }, + /** + * Sends conversion events to capture a query and its clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/ + */ + convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() { + for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + params[_key4] = arguments[_key4]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/ + */ + convertedObjectIDs: function convertedObjectIDs() { + for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + params[_key5] = arguments[_key5]; + } + if (params.length > 0) { + sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items); + } + }, + /** + * Sends conversion events to capture the filters a user uses when converting. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/ + */ + convertedFilters: function convertedFilters() { + for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + params[_key6] = arguments[_key6]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['convertedFilters'].concat(params)); + } + }, + /** + * Sends view events to capture clicked items. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/ + */ + viewedObjectIDs: function viewedObjectIDs() { + for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + params[_key7] = arguments[_key7]; + } + if (params.length > 0) { + params.reduce(function (acc, _ref3) { + var items = _ref3.items, + param = _objectWithoutProperties(_ref3, _excluded2); + return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread2(_objectSpread2({}, param), {}, { + objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) { + var objectID = _ref4.objectID; + return objectID; + })) || param.objectIDs + })).map(function (payload) { + return { + items: items, + payload: payload + }; + }))); + }, []).forEach(function (_ref5) { + var items = _ref5.items, + payload = _ref5.payload; + return sendToInsights('viewedObjectIDs', [payload], items); + }); + } + }, + /** + * Sends view events to capture the filters a user uses when viewing. + * + * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/ + */ + viewedFilters: function viewedFilters() { + for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { + params[_key8] = arguments[_key8]; + } + if (params.length > 0) { + searchInsights.apply(void 0, ['viewedFilters'].concat(params)); + } + } + }; + } + + function createViewedEvents(_ref) { + var items = _ref.items; + var itemsByIndexName = items.reduce(function (acc, current) { + var _acc$current$__autoco; + acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current); + return acc; + }, {}); + return Object.keys(itemsByIndexName).map(function (indexName) { + var items = itemsByIndexName[indexName]; + return { + index: indexName, + items: items, + algoliaSource: ['autocomplete'] + }; + }); + } + + function isAlgoliaInsightsHit(hit) { + return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID; + } + + var VIEW_EVENT_DELAY = 400; + var ALGOLIA_INSIGHTS_VERSION = '2.6.0'; + var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js"); + var sendViewedObjectIDs = debounce(function (_ref) { + var onItemsChange = _ref.onItemsChange, + items = _ref.items, + insights = _ref.insights, + state = _ref.state; + onItemsChange({ + insights: insights, + insightsEvents: createViewedEvents({ + items: items + }).map(function (event) { + return _objectSpread2({ + eventName: 'Items Viewed' + }, event); + }), + state: state + }); + }, VIEW_EVENT_DELAY); + function createAlgoliaInsightsPlugin(options) { + var _getOptions = getOptions(options), + providedInsightsClient = _getOptions.insightsClient, + onItemsChange = _getOptions.onItemsChange, + onSelectEvent = _getOptions.onSelect, + onActiveEvent = _getOptions.onActive; + var insightsClient = providedInsightsClient; + if (!providedInsightsClient) { + safelyRunOnBrowser(function (_ref2) { + var window = _ref2.window; + var pointer = window.AlgoliaAnalyticsObject || 'aa'; + if (typeof pointer === 'string') { + insightsClient = window[pointer]; + } + if (!insightsClient) { + window.AlgoliaAnalyticsObject = pointer; + if (!window[pointer]) { + window[pointer] = function () { + if (!window[pointer].queue) { + window[pointer].queue = []; + } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + window[pointer].queue.push(args); + }; + } + window[pointer].version = ALGOLIA_INSIGHTS_VERSION; + insightsClient = window[pointer]; + loadInsights(window); + } + }); + } + var insights = createSearchInsightsApi(insightsClient); + var previousItems = createRef([]); + var debouncedOnStateChange = debounce(function (_ref3) { + var state = _ref3.state; + if (!state.isOpen) { + return; + } + var items = state.collections.reduce(function (acc, current) { + return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items)); + }, []).filter(isAlgoliaInsightsHit); + if (!isEqual(previousItems.current.map(function (x) { + return x.objectID; + }), items.map(function (x) { + return x.objectID; + }))) { + previousItems.current = items; + if (items.length > 0) { + sendViewedObjectIDs({ + onItemsChange: onItemsChange, + items: items, + insights: insights, + state: state + }); + } + } + }, 0); + return { + name: 'aa.algoliaInsightsPlugin', + subscribe: function subscribe(_ref4) { + var setContext = _ref4.setContext, + onSelect = _ref4.onSelect, + onActive = _ref4.onActive; + insightsClient('addAlgoliaAgent', 'insights-plugin'); + setContext({ + algoliaInsightsPlugin: { + __algoliaSearchParameters: { + clickAnalytics: true + }, + insights: insights + } + }); + onSelect(function (_ref5) { + var item = _ref5.item, + state = _ref5.state, + event = _ref5.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onSelectEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread2({ + eventName: 'Item Selected' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + onActive(function (_ref6) { + var item = _ref6.item, + state = _ref6.state, + event = _ref6.event; + if (!isAlgoliaInsightsHit(item)) { + return; + } + onActiveEvent({ + state: state, + event: event, + insights: insights, + item: item, + insightsEvents: [_objectSpread2({ + eventName: 'Item Active' + }, createClickedEvent({ + item: item, + items: previousItems.current + }))] + }); + }); + }, + onStateChange: function onStateChange(_ref7) { + var state = _ref7.state; + debouncedOnStateChange({ + state: state + }); + }, + __autocomplete_pluginOptions: options + }; + } + function getOptions(options) { + return _objectSpread2({ + onItemsChange: function onItemsChange(_ref8) { + var insights = _ref8.insights, + insightsEvents = _ref8.insightsEvents; + insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread2(_objectSpread2({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onSelect: function onSelect(_ref9) { + var insights = _ref9.insights, + insightsEvents = _ref9.insightsEvents; + insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) { + return _objectSpread2(_objectSpread2({}, event), {}, { + algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal']) + }); + }))); + }, + onActive: noop + }, options); + } + function loadInsights(environment) { + var errorMessage = "[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete"; + try { + var script = environment.document.createElement('script'); + script.async = true; + script.src = ALGOLIA_INSIGHTS_SRC; + script.onerror = function () { + // eslint-disable-next-line no-console + console.error(errorMessage); + }; + document.body.appendChild(script); + } catch (cause) { + // eslint-disable-next-line no-console + console.error(errorMessage); + } + } + + exports.createAlgoliaInsightsPlugin = createAlgoliaInsightsPlugin; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=index.development.js.map diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js.map b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js.map new file mode 100644 index 00000000..66a3a2fe --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.development.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.development.js","sources":["../../../autocomplete-shared/dist/esm/createRef.js","../../../autocomplete-shared/dist/esm/debounce.js","../../../autocomplete-shared/dist/esm/isEqual.js","../../../autocomplete-shared/dist/esm/noop.js","../../../autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../src/createClickedEvent.ts","../../src/isModernInsightsClient.ts","../../src/createSearchInsightsApi.ts","../../src/createViewedEvents.ts","../../src/isAlgoliaInsightsHit.ts","../../src/createAlgoliaInsightsPlugin.ts"],"sourcesContent":["export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","import type {\n AlgoliaInsightsHit,\n ClickedObjectIDsAfterSearchParams,\n InsightsParamsWithItems,\n} from './types';\n\ntype CreateClickedEventParams = {\n item: AlgoliaInsightsHit;\n items: AlgoliaInsightsHit[];\n};\n\nexport function createClickedEvent({\n item,\n items,\n}: CreateClickedEventParams): Omit<\n InsightsParamsWithItems,\n 'eventName'\n> & { algoliaSource?: string[] } {\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex((x) => x.objectID === item.objectID)],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete'],\n };\n}\n","import type { InsightsClient } from './types';\n\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client: InsightsClient): boolean {\n const [major, minor] = (client.version || '').split('.').map(Number);\n\n /* eslint-disable @typescript-eslint/camelcase */\n const v3 = major >= 3;\n const v2_4 = major === 2 && minor >= 4;\n const v1_10 = major === 1 && minor >= 10;\n\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}\n","import type { InsightsMethodMap } from 'search-insights';\n\nimport { isModernInsightsClient } from './isModernInsightsClient';\nimport {\n AlgoliaInsightsHit,\n ClickedFiltersParams,\n ClickedObjectIDsAfterSearchParams,\n ClickedObjectIDsParams,\n ConvertedFiltersParams,\n ConvertedObjectIDsAfterSearchParams,\n ConvertedObjectIDsParams,\n InsightsClient,\n InsightsClientMethod,\n InsightsParamsWithItems,\n ViewedFiltersParams,\n ViewedObjectIDsParams,\n} from './types';\n\nfunction chunk(\n item: TItem,\n chunkSize: number = 20\n): TItem[] {\n const chunks: TItem[] = [];\n for (let i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push({\n ...item,\n objectIDs: item.objectIDs.slice(i, i + chunkSize),\n });\n }\n return chunks;\n}\n\nfunction mapToInsightsParamsApi<\n TInsightsParamsType extends {\n items: AlgoliaInsightsHit[];\n objectIDs?: string[];\n }\n>(params: TInsightsParamsType[]) {\n return params.map(({ items, ...param }) => ({\n ...param,\n objectIDs: items?.map(({ objectID }) => objectID) || param.objectIDs,\n }));\n}\n\nexport function createSearchInsightsApi(searchInsights: InsightsClient) {\n const canSendHeaders = isModernInsightsClient(searchInsights);\n\n function sendToInsights(\n method: InsightsClientMethod,\n payloads: InsightsMethodMap[TInsightsMethod],\n items?: AlgoliaInsightsHit[]\n ) {\n if (canSendHeaders && typeof items !== 'undefined') {\n const { appId, apiKey } = items[0].__autocomplete_algoliaCredentials;\n const headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey,\n };\n\n searchInsights(method, ...payloads, { headers });\n } else {\n searchInsights(method, ...payloads);\n }\n }\n\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init(appId: string, apiKey: string) {\n searchInsights('init', { appId, apiKey });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken(userToken: string) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch(\n ...params: Array<\n InsightsParamsWithItems\n >\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'clickedObjectIDsAfterSearch',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'clickedObjectIDs',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters(...params: ClickedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('clickedFilters', ...params);\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch(\n ...params: Array<\n InsightsParamsWithItems\n >\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'convertedObjectIDsAfterSearch',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'convertedObjectIDs',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters(...params: ConvertedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('convertedFilters', ...params);\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n params\n .reduce<\n Array<{\n items?: AlgoliaInsightsHit[];\n payload: ViewedObjectIDsParams;\n }>\n >(\n (acc, { items, ...param }) => [\n ...acc,\n ...chunk({\n ...param,\n objectIDs:\n items?.map(({ objectID }) => objectID) || param.objectIDs,\n }).map((payload) => {\n return { items, payload };\n }),\n ],\n []\n )\n .forEach(({ items, payload }) =>\n sendToInsights('viewedObjectIDs', [payload], items)\n );\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters(...params: ViewedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('viewedFilters', ...params);\n }\n },\n };\n}\n","import {\n AlgoliaInsightsHit,\n InsightsParamsWithItems,\n ViewedObjectIDsParams,\n} from './types';\n\ntype CreateViewedEventsParams = {\n items: AlgoliaInsightsHit[];\n};\n\nexport function createViewedEvents({\n items,\n}: CreateViewedEventsParams): Array<\n Omit, 'eventName'>\n> {\n const itemsByIndexName = items.reduce>(\n (acc, current) => {\n acc[current.__autocomplete_indexName] = (\n acc[current.__autocomplete_indexName] ?? []\n ).concat(current);\n\n return acc;\n },\n {}\n );\n\n return Object.keys(itemsByIndexName).map((indexName) => {\n const items = itemsByIndexName[indexName];\n\n return {\n index: indexName,\n items,\n algoliaSource: ['autocomplete'],\n };\n });\n}\n","import { AlgoliaInsightsHit } from './types';\n\nexport function isAlgoliaInsightsHit(hit: any): hit is AlgoliaInsightsHit {\n return (\n hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID\n );\n}\n","import {\n AutocompleteState,\n AutocompletePlugin,\n createRef,\n debounce,\n isEqual,\n noop,\n safelyRunOnBrowser,\n} from '@algolia/autocomplete-shared';\n\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nimport {\n AlgoliaInsightsHit,\n AutocompleteInsightsApi,\n InsightsClient,\n OnActiveParams,\n OnItemsChangeParams,\n OnSelectParams,\n} from './types';\n\nconst VIEW_EVENT_DELAY = 400;\nconst ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nconst ALGOLIA_INSIGHTS_SRC = `https://cdn.jsdelivr.net/npm/search-insights@${ALGOLIA_INSIGHTS_VERSION}/dist/search-insights.min.js`;\n\ntype SendViewedObjectIDsParams = {\n onItemsChange(params: OnItemsChangeParams): void;\n items: AlgoliaInsightsHit[];\n insights: AutocompleteInsightsApi;\n state: AutocompleteState;\n};\n\nconst sendViewedObjectIDs = debounce(\n ({ onItemsChange, items, insights, state }) => {\n onItemsChange({\n insights,\n insightsEvents: createViewedEvents({ items }).map((event) => ({\n eventName: 'Items Viewed',\n ...event,\n })),\n state,\n });\n },\n VIEW_EVENT_DELAY\n);\n\nexport type CreateAlgoliaInsightsPluginParams = {\n /**\n * The initialized Search Insights client.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-insightsclient\n */\n insightsClient?: InsightsClient;\n /**\n * Hook to send an Insights event when the items change.\n *\n * By default, it sends a `viewedObjectIDs` event.\n *\n * In as-you-type experiences, items change as the user types. This hook is debounced every 400ms to reflect actual items that users notice and avoid generating too many events for items matching \"in progress\" queries.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onitemschange\n */\n onItemsChange?(params: OnItemsChangeParams): void;\n /**\n * Hook to send an Insights event when an item is selected.\n *\n * By default, it sends a clickedObjectIDsAfterSearch event.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onselect\n */\n onSelect?(params: OnSelectParams): void;\n /**\n * Hook to send an Insights event when an item is active.\n *\n * By default, it doesn't send any events.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onactive\n */\n onActive?(params: OnActiveParams): void;\n};\n\nexport function createAlgoliaInsightsPlugin(\n options: CreateAlgoliaInsightsPluginParams\n): AutocompletePlugin {\n const {\n insightsClient: providedInsightsClient,\n onItemsChange,\n onSelect: onSelectEvent,\n onActive: onActiveEvent,\n } = getOptions(options);\n let insightsClient = providedInsightsClient as InsightsClient;\n\n if (!providedInsightsClient) {\n safelyRunOnBrowser(({ window }) => {\n const pointer = window.AlgoliaAnalyticsObject || 'aa';\n\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n\n if (!window[pointer]) {\n window[pointer] = (...args: any[]) => {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n\n window[pointer].queue.push(args);\n };\n }\n\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n\n insightsClient = window[pointer];\n\n loadInsights(window);\n }\n });\n }\n\n const insights = createSearchInsightsApi(insightsClient);\n const previousItems = createRef([]);\n\n const debouncedOnStateChange = debounce<{\n state: AutocompleteState;\n }>(({ state }) => {\n if (!state.isOpen) {\n return;\n }\n\n const items = state.collections\n .reduce((acc, current) => {\n return [...acc, ...current.items];\n }, [])\n .filter(isAlgoliaInsightsHit);\n\n if (\n !isEqual(\n previousItems.current.map((x) => x.objectID),\n items.map((x) => x.objectID)\n )\n ) {\n previousItems.current = items;\n\n if (items.length > 0) {\n sendViewedObjectIDs({ onItemsChange, items, insights, state });\n }\n }\n }, 0);\n\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe({ setContext, onSelect, onActive }) {\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true,\n },\n insights,\n },\n });\n\n onSelect(({ item, state, event }) => {\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n\n onSelectEvent({\n state: state as AutocompleteState,\n event,\n insights,\n item,\n insightsEvents: [\n {\n eventName: 'Item Selected',\n ...createClickedEvent({ item, items: previousItems.current }),\n },\n ],\n });\n });\n\n onActive(({ item, state, event }) => {\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n\n onActiveEvent({\n state: state as AutocompleteState,\n event,\n insights,\n item,\n insightsEvents: [\n {\n eventName: 'Item Active',\n ...createClickedEvent({ item, items: previousItems.current }),\n },\n ],\n });\n });\n },\n onStateChange({ state }) {\n debouncedOnStateChange({ state: state as AutocompleteState });\n },\n __autocomplete_pluginOptions: options,\n };\n}\n\nfunction getOptions(options: CreateAlgoliaInsightsPluginParams) {\n return {\n onItemsChange({ insights, insightsEvents }: OnItemsChangeParams) {\n insights.viewedObjectIDs(\n ...insightsEvents.map((event) => ({\n ...event,\n algoliaSource: [\n ...(event.algoliaSource || []),\n 'autocomplete-internal',\n ],\n }))\n );\n },\n onSelect({ insights, insightsEvents }: OnSelectParams) {\n insights.clickedObjectIDsAfterSearch(\n ...insightsEvents.map((event) => ({\n ...event,\n algoliaSource: [\n ...(event.algoliaSource || []),\n 'autocomplete-internal',\n ],\n }))\n );\n },\n onActive: noop,\n ...options,\n };\n}\n\nfunction loadInsights(environment: typeof window) {\n const errorMessage = `[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete`;\n\n try {\n const script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n\n script.onerror = () => {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}\n"],"names":["createRef","initialValue","current","debounce","fn","time","timerId","undefined","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply","isPrimitive","obj","Object","isEqual","first","second","keys","_i","_Object$keys","key","noop","safelyRunOnBrowser","callback","window","createClickedEvent","_ref","item","items","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","isModernInsightsClient","client","_split$map","version","split","map","Number","_split$map2","_slicedToArray","major","minor","v3","v2_4","v1_10","chunk","chunkSize","chunks","i","objectIDs","push","_objectSpread","slice","mapToInsightsParamsApi","params","param","_objectWithoutProperties","_excluded","_ref2","createSearchInsightsApi","searchInsights","canSendHeaders","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","appId","apiKey","headers","concat","_toConsumableArray","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","reduce","acc","_ref3","_excluded2","_ref4","payload","forEach","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","VIEW_EVENT_DELAY","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","state","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onSelect","onActiveEvent","onActive","pointer","AlgoliaAnalyticsObject","queue","loadInsights","previousItems","debouncedOnStateChange","isOpen","collections","filter","name","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","_ref8","_ref9","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAO,SAASA,SAASA,CAACC,YAAY,EAAE;IACtC,OAAO;EACLC,IAAAA,OAAO,EAAED,YAAAA;KACV,CAAA;EACH;;ECJO,SAASE,QAAQA,CAACC,EAAE,EAAEC,IAAI,EAAE;IACjC,IAAIC,OAAO,GAAGC,SAAS,CAAA;EACvB,EAAA,OAAO,YAAY;MACjB,KAAK,IAAIC,IAAI,GAAGC,SAAS,CAACC,MAAM,EAAEC,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AA;EAC7B,GAAA;EACF;;;;;;;;;;"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js new file mode 100644 index 00000000..01107d3a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js @@ -0,0 +1,3 @@ +/*! @algolia/autocomplete-plugin-algolia-insights 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/autocomplete-plugin-algolia-insights"]={})}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,c,a=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:20,r=[],i=0;i=3||2===r&&a>=4||1===r&&a>=10);function l(t,n,r){if(u&&void 0!==r){var i=r[0].__autocomplete_algoliaCredentials,o={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(c(n),[{headers:o}]))}else e.apply(void 0,[t].concat(c(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&l("clickedObjectIDsAfterSearch",y(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&l("clickedObjectIDs",y(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&l("convertedObjectIDsAfterSearch",y(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&l("convertedObjectIDs",y(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,o=i(t,g);return[].concat(c(e),c(d(n(n({},o),{},{objectIDs:(null==r?void 0:r.map((function(e){return e.objectID})))||o.objectIDs})).map((function(e){return{items:r,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return l("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function b(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}var O="2.6.0",I="https://cdn.jsdelivr.net/npm/search-insights@".concat(O,"/dist/search-insights.min.js"),w=l((function(e){var t=e.onItemsChange,r=e.items,i=e.insights,o=e.state;t({insights:i,insightsEvents:b({items:r}).map((function(e){return n({eventName:"Items Viewed"},e)})),state:o})}),400);e.createAlgoliaInsightsPlugin=function(e){var t=function(e){return n({onItemsChange:function(e){var t=e.insights,r=e.insightsEvents;t.viewedObjectIDs.apply(t,c(r.map((function(e){return n(n({},e),{},{algoliaSource:[].concat(c(e.algoliaSource||[]),["autocomplete-internal"])})}))))},onSelect:function(e){var t=e.insights,r=e.insightsEvents;t.clickedObjectIDsAfterSearch.apply(t,c(r.map((function(e){return n(n({},e),{},{algoliaSource:[].concat(c(e.algoliaSource||[]),["autocomplete-internal"])})}))))},onActive:p},e)}(e),r=t.insightsClient,i=t.onItemsChange,o=t.onSelect,a=t.onActive,u=r;r||function(e){if("undefined"!=typeof window)e({window:window})}((function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(u=t[n]),u||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),i=0;i0&&w({onItemsChange:i,items:n,insights:s,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,i=e.onActive;u("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:s}}),r((function(e){var t=e.item,r=e.state,i=e.event;j(t)&&o({state:r,event:i,insights:s,item:t,insightsEvents:[n({eventName:"Item Selected"},m({item:t,items:v.current}))]})})),i((function(e){var t=e.item,r=e.state,i=e.event;j(t)&&a({state:r,event:i,insights:s,item:t,insightsEvents:[n({eventName:"Item Active"},m({item:t,items:v.current}))]})}))},onStateChange:function(e){var t=e.state;g({state:t})},__autocomplete_pluginOptions:e}},Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=index.production.js.map diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js.map b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js.map new file mode 100644 index 00000000..9c96ffea --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/umd/index.production.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.production.js","sources":["../../../autocomplete-shared/dist/esm/debounce.js","../../../autocomplete-shared/dist/esm/isEqual.js","../../../autocomplete-shared/dist/esm/noop.js","../../src/createClickedEvent.ts","../../src/createSearchInsightsApi.ts","../../src/isModernInsightsClient.ts","../../src/createViewedEvents.ts","../../src/isAlgoliaInsightsHit.ts","../../src/createAlgoliaInsightsPlugin.ts","../../../autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../autocomplete-shared/dist/esm/createRef.js"],"sourcesContent":["export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","import type {\n AlgoliaInsightsHit,\n ClickedObjectIDsAfterSearchParams,\n InsightsParamsWithItems,\n} from './types';\n\ntype CreateClickedEventParams = {\n item: AlgoliaInsightsHit;\n items: AlgoliaInsightsHit[];\n};\n\nexport function createClickedEvent({\n item,\n items,\n}: CreateClickedEventParams): Omit<\n InsightsParamsWithItems,\n 'eventName'\n> & { algoliaSource?: string[] } {\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex((x) => x.objectID === item.objectID)],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete'],\n };\n}\n","import type { InsightsMethodMap } from 'search-insights';\n\nimport { isModernInsightsClient } from './isModernInsightsClient';\nimport {\n AlgoliaInsightsHit,\n ClickedFiltersParams,\n ClickedObjectIDsAfterSearchParams,\n ClickedObjectIDsParams,\n ConvertedFiltersParams,\n ConvertedObjectIDsAfterSearchParams,\n ConvertedObjectIDsParams,\n InsightsClient,\n InsightsClientMethod,\n InsightsParamsWithItems,\n ViewedFiltersParams,\n ViewedObjectIDsParams,\n} from './types';\n\nfunction chunk(\n item: TItem,\n chunkSize: number = 20\n): TItem[] {\n const chunks: TItem[] = [];\n for (let i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push({\n ...item,\n objectIDs: item.objectIDs.slice(i, i + chunkSize),\n });\n }\n return chunks;\n}\n\nfunction mapToInsightsParamsApi<\n TInsightsParamsType extends {\n items: AlgoliaInsightsHit[];\n objectIDs?: string[];\n }\n>(params: TInsightsParamsType[]) {\n return params.map(({ items, ...param }) => ({\n ...param,\n objectIDs: items?.map(({ objectID }) => objectID) || param.objectIDs,\n }));\n}\n\nexport function createSearchInsightsApi(searchInsights: InsightsClient) {\n const canSendHeaders = isModernInsightsClient(searchInsights);\n\n function sendToInsights(\n method: InsightsClientMethod,\n payloads: InsightsMethodMap[TInsightsMethod],\n items?: AlgoliaInsightsHit[]\n ) {\n if (canSendHeaders && typeof items !== 'undefined') {\n const { appId, apiKey } = items[0].__autocomplete_algoliaCredentials;\n const headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey,\n };\n\n searchInsights(method, ...payloads, { headers });\n } else {\n searchInsights(method, ...payloads);\n }\n }\n\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init(appId: string, apiKey: string) {\n searchInsights('init', { appId, apiKey });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken(userToken: string) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch(\n ...params: Array<\n InsightsParamsWithItems\n >\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'clickedObjectIDsAfterSearch',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'clickedObjectIDs',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters(...params: ClickedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('clickedFilters', ...params);\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch(\n ...params: Array<\n InsightsParamsWithItems\n >\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'convertedObjectIDsAfterSearch',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n sendToInsights(\n 'convertedObjectIDs',\n mapToInsightsParamsApi(params),\n params[0].items\n );\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters(...params: ConvertedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('convertedFilters', ...params);\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs(\n ...params: Array>\n ) {\n if (params.length > 0) {\n params\n .reduce<\n Array<{\n items?: AlgoliaInsightsHit[];\n payload: ViewedObjectIDsParams;\n }>\n >(\n (acc, { items, ...param }) => [\n ...acc,\n ...chunk({\n ...param,\n objectIDs:\n items?.map(({ objectID }) => objectID) || param.objectIDs,\n }).map((payload) => {\n return { items, payload };\n }),\n ],\n []\n )\n .forEach(({ items, payload }) =>\n sendToInsights('viewedObjectIDs', [payload], items)\n );\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters(...params: ViewedFiltersParams[]) {\n if (params.length > 0) {\n searchInsights('viewedFilters', ...params);\n }\n },\n };\n}\n","import type { InsightsClient } from './types';\n\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client: InsightsClient): boolean {\n const [major, minor] = (client.version || '').split('.').map(Number);\n\n /* eslint-disable @typescript-eslint/camelcase */\n const v3 = major >= 3;\n const v2_4 = major === 2 && minor >= 4;\n const v1_10 = major === 1 && minor >= 10;\n\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}\n","import {\n AlgoliaInsightsHit,\n InsightsParamsWithItems,\n ViewedObjectIDsParams,\n} from './types';\n\ntype CreateViewedEventsParams = {\n items: AlgoliaInsightsHit[];\n};\n\nexport function createViewedEvents({\n items,\n}: CreateViewedEventsParams): Array<\n Omit, 'eventName'>\n> {\n const itemsByIndexName = items.reduce>(\n (acc, current) => {\n acc[current.__autocomplete_indexName] = (\n acc[current.__autocomplete_indexName] ?? []\n ).concat(current);\n\n return acc;\n },\n {}\n );\n\n return Object.keys(itemsByIndexName).map((indexName) => {\n const items = itemsByIndexName[indexName];\n\n return {\n index: indexName,\n items,\n algoliaSource: ['autocomplete'],\n };\n });\n}\n","import { AlgoliaInsightsHit } from './types';\n\nexport function isAlgoliaInsightsHit(hit: any): hit is AlgoliaInsightsHit {\n return (\n hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID\n );\n}\n","import {\n AutocompleteState,\n AutocompletePlugin,\n createRef,\n debounce,\n isEqual,\n noop,\n safelyRunOnBrowser,\n} from '@algolia/autocomplete-shared';\n\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nimport {\n AlgoliaInsightsHit,\n AutocompleteInsightsApi,\n InsightsClient,\n OnActiveParams,\n OnItemsChangeParams,\n OnSelectParams,\n} from './types';\n\nconst VIEW_EVENT_DELAY = 400;\nconst ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nconst ALGOLIA_INSIGHTS_SRC = `https://cdn.jsdelivr.net/npm/search-insights@${ALGOLIA_INSIGHTS_VERSION}/dist/search-insights.min.js`;\n\ntype SendViewedObjectIDsParams = {\n onItemsChange(params: OnItemsChangeParams): void;\n items: AlgoliaInsightsHit[];\n insights: AutocompleteInsightsApi;\n state: AutocompleteState;\n};\n\nconst sendViewedObjectIDs = debounce(\n ({ onItemsChange, items, insights, state }) => {\n onItemsChange({\n insights,\n insightsEvents: createViewedEvents({ items }).map((event) => ({\n eventName: 'Items Viewed',\n ...event,\n })),\n state,\n });\n },\n VIEW_EVENT_DELAY\n);\n\nexport type CreateAlgoliaInsightsPluginParams = {\n /**\n * The initialized Search Insights client.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-insightsclient\n */\n insightsClient?: InsightsClient;\n /**\n * Hook to send an Insights event when the items change.\n *\n * By default, it sends a `viewedObjectIDs` event.\n *\n * In as-you-type experiences, items change as the user types. This hook is debounced every 400ms to reflect actual items that users notice and avoid generating too many events for items matching \"in progress\" queries.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onitemschange\n */\n onItemsChange?(params: OnItemsChangeParams): void;\n /**\n * Hook to send an Insights event when an item is selected.\n *\n * By default, it sends a clickedObjectIDsAfterSearch event.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onselect\n */\n onSelect?(params: OnSelectParams): void;\n /**\n * Hook to send an Insights event when an item is active.\n *\n * By default, it doesn't send any events.\n *\n * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-algolia-insights/createAlgoliaInsightsPlugin/#param-onactive\n */\n onActive?(params: OnActiveParams): void;\n};\n\nexport function createAlgoliaInsightsPlugin(\n options: CreateAlgoliaInsightsPluginParams\n): AutocompletePlugin {\n const {\n insightsClient: providedInsightsClient,\n onItemsChange,\n onSelect: onSelectEvent,\n onActive: onActiveEvent,\n } = getOptions(options);\n let insightsClient = providedInsightsClient as InsightsClient;\n\n if (!providedInsightsClient) {\n safelyRunOnBrowser(({ window }) => {\n const pointer = window.AlgoliaAnalyticsObject || 'aa';\n\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n\n if (!window[pointer]) {\n window[pointer] = (...args: any[]) => {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n\n window[pointer].queue.push(args);\n };\n }\n\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n\n insightsClient = window[pointer];\n\n loadInsights(window);\n }\n });\n }\n\n const insights = createSearchInsightsApi(insightsClient);\n const previousItems = createRef([]);\n\n const debouncedOnStateChange = debounce<{\n state: AutocompleteState;\n }>(({ state }) => {\n if (!state.isOpen) {\n return;\n }\n\n const items = state.collections\n .reduce((acc, current) => {\n return [...acc, ...current.items];\n }, [])\n .filter(isAlgoliaInsightsHit);\n\n if (\n !isEqual(\n previousItems.current.map((x) => x.objectID),\n items.map((x) => x.objectID)\n )\n ) {\n previousItems.current = items;\n\n if (items.length > 0) {\n sendViewedObjectIDs({ onItemsChange, items, insights, state });\n }\n }\n }, 0);\n\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe({ setContext, onSelect, onActive }) {\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true,\n },\n insights,\n },\n });\n\n onSelect(({ item, state, event }) => {\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n\n onSelectEvent({\n state: state as AutocompleteState,\n event,\n insights,\n item,\n insightsEvents: [\n {\n eventName: 'Item Selected',\n ...createClickedEvent({ item, items: previousItems.current }),\n },\n ],\n });\n });\n\n onActive(({ item, state, event }) => {\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n\n onActiveEvent({\n state: state as AutocompleteState,\n event,\n insights,\n item,\n insightsEvents: [\n {\n eventName: 'Item Active',\n ...createClickedEvent({ item, items: previousItems.current }),\n },\n ],\n });\n });\n },\n onStateChange({ state }) {\n debouncedOnStateChange({ state: state as AutocompleteState });\n },\n __autocomplete_pluginOptions: options,\n };\n}\n\nfunction getOptions(options: CreateAlgoliaInsightsPluginParams) {\n return {\n onItemsChange({ insights, insightsEvents }: OnItemsChangeParams) {\n insights.viewedObjectIDs(\n ...insightsEvents.map((event) => ({\n ...event,\n algoliaSource: [\n ...(event.algoliaSource || []),\n 'autocomplete-internal',\n ],\n }))\n );\n },\n onSelect({ insights, insightsEvents }: OnSelectParams) {\n insights.clickedObjectIDsAfterSearch(\n ...insightsEvents.map((event) => ({\n ...event,\n algoliaSource: [\n ...(event.algoliaSource || []),\n 'autocomplete-internal',\n ],\n }))\n );\n },\n onActive: noop,\n ...options,\n };\n}\n\nfunction loadInsights(environment: typeof window) {\n const errorMessage = `[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete`;\n\n try {\n const script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n\n script.onerror = () => {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}\n","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}"],"names":["debounce","fn","time","timerId","undefined","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply","isPrimitive","obj","Object","isEqual","first","second","keys","_i","_Object$keys","key","noop","createClickedEvent","_ref","item","items","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","chunk","chunkSize","chunks","i","objectIDs","push","_objectSpread","slice","mapToInsightsParamsApi","params","map","param","_objectWithoutProperties","_excluded","_ref2","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","_slicedToArray","version","split","Number","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","concat","_toConsumableArray","init","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","reduce","acc","_ref3","_excluded2","_ref4","payload","forEach","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","current","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","state","insightsEvents","event","eventName","options","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","callback","window","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","collections","filter","name","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions"],"mappings":";mhGAAO,SAASA,EAASC,EAAIC,GAC3B,IAAIC,OAAUC,EACd,OAAO,WACL,IAAK,IAAIC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EAAGA,EAAOL,EAAMK,IAC/EF,EAAKE,GAAQJ,UAAUI,GAErBP,GACFQ,aAAaR,GAEfA,EAAUS,YAAW,WACnB,OAAOX,EAAGY,WAAM,EAAQL,KACvBN,ICXP,SAASY,EAAYC,GACnB,OAAOA,IAAQC,OAAOD,GAEjB,SAASE,EAAQC,EAAOC,GAC7B,GAAID,IAAUC,EACZ,OAAO,EAET,GAAIL,EAAYI,IAAUJ,EAAYK,IAA4B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O6H,EAAc7C,iBAM3DmB,GAAS,SAAAqC,GAA4B,IAAzBzI,EAAIyI,EAAJzI,KAAM2F,EAAK8C,EAAL9C,MAAOE,EAAK4C,EAAL5C,MAClBT,EAAqBpF,IAI1ByG,EAAc,CACZd,MAAOA,EACPE,MAAAA,EACAH,SAAAA,EACA1F,KAAAA,EACA4F,eAAgB,CAAA3E,EAAA,CAEZ6E,UAAW,eACRhG,EAAmB,CAAEE,KAAAA,EAAMC,MAAO6H,EAAc7C,kBAM7DyD,cAAa,SAAAC,GAAY,IAAThD,EAAKgD,EAALhD,MACdoC,EAAuB,CAAEpC,MAAOA,KAElCiD,6BAA8B7C"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/package.json b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/package.json new file mode 100644 index 00000000..b7044be0 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-plugin-algolia-insights/package.json @@ -0,0 +1,39 @@ +{ + "name": "@algolia/autocomplete-plugin-algolia-insights", + "description": "A plugin to add Algolia Insights to Algolia Autocomplete.", + "version": "1.9.3", + "license": "MIT", + "homepage": "https://github.com/algolia/autocomplete", + "repository": "algolia/autocomplete", + "author": { + "name": "Algolia, Inc.", + "url": "https://www.algolia.com" + }, + "source": "src/index.ts", + "types": "dist/esm/index.d.ts", + "module": "dist/esm/index.js", + "main": "dist/umd/index.production.js", + "umd:main": "dist/umd/index.production.js", + "unpkg": "dist/umd/index.production.js", + "jsdelivr": "dist/umd/index.production.js", + "sideEffects": false, + "files": [ + "dist/" + ], + "scripts": { + "build:clean": "rm -rf ./dist", + "build:esm": "babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/esm --ignore '**/*/__tests__/'", + "build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm", + "build:umd": "rollup --config", + "build": "rm -rf ./dist && yarn build:umd && yarn build:esm && yarn build:types", + "on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"", + "prepare": "yarn run build:esm && yarn build:types", + "watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\"" + }, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/README.md b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/README.md new file mode 100644 index 00000000..da4d3c1b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/README.md @@ -0,0 +1,15 @@ +# @algolia/autocomplete-preset-algolia + +The Algolia preset provides fetching and highlighting utilities for usage with Algolia. + +## Installation + +```sh +yarn add @algolia/autocomplete-preset-algolia +# or +npm install @algolia/autocomplete-preset-algolia +``` + +## Documentation + +See [**Documentation**](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-preset-algolia). diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.d.ts new file mode 100644 index 00000000..eefc295f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.d.ts @@ -0,0 +1,2 @@ +export declare const HIGHLIGHT_PRE_TAG = "__aa-highlight__"; +export declare const HIGHLIGHT_POST_TAG = "__/aa-highlight__"; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.js new file mode 100644 index 00000000..66dcdd18 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/constants/index.js @@ -0,0 +1,2 @@ +export var HIGHLIGHT_PRE_TAG = '__aa-highlight__'; +export var HIGHLIGHT_POST_TAG = '__/aa-highlight__'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.d.ts new file mode 100644 index 00000000..5a71fa4a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.d.ts @@ -0,0 +1,4 @@ +import { HighlightResult } from '../types'; +export declare type HighlightedHit = THit & { + _highlightResult?: HighlightResult; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.d.ts new file mode 100644 index 00000000..f6fe5616 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.d.ts @@ -0,0 +1,4 @@ +export declare type ParseAlgoliaHitParams = { + hit: TItem; + attribute: keyof TItem | string[]; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.d.ts new file mode 100644 index 00000000..977a68dd --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.d.ts @@ -0,0 +1,4 @@ +export declare type ParsedAttribute = { + value: string; + isHighlighted: boolean; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.d.ts new file mode 100644 index 00000000..0299206c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.d.ts @@ -0,0 +1,4 @@ +import { SnippetResult } from '../types'; +export declare type SnippetedHit = THit & { + _snippetResult?: SnippetResult; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.d.ts new file mode 100644 index 00000000..fdc8b211 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.d.ts @@ -0,0 +1,6 @@ +export * from './HighlightedHit'; +export * from './parseAlgoliaHitHighlight'; +export * from './parseAlgoliaHitReverseHighlight'; +export * from './parseAlgoliaHitReverseSnippet'; +export * from './parseAlgoliaHitSnippet'; +export * from './SnippetedHit'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.js new file mode 100644 index 00000000..2f9950e3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.js @@ -0,0 +1,6 @@ +export * from './HighlightedHit'; +export * from './parseAlgoliaHitHighlight'; +export * from './parseAlgoliaHitReverseHighlight'; +export * from './parseAlgoliaHitReverseSnippet'; +export * from './parseAlgoliaHitSnippet'; +export * from './SnippetedHit'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.d.ts new file mode 100644 index 00000000..d588c3f3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.d.ts @@ -0,0 +1,2 @@ +import { ParsedAttribute } from './ParsedAttribute'; +export declare function isPartHighlighted(parts: ParsedAttribute[], i: number): boolean; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js new file mode 100644 index 00000000..16ea0086 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js @@ -0,0 +1,25 @@ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; +var hasAlphanumeric = new RegExp(/\w/i); +var regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g; +var regexHasEscapedHtml = RegExp(regexEscapedHtml.source); +function unescape(value) { + return value && regexHasEscapedHtml.test(value) ? value.replace(regexEscapedHtml, function (character) { + return htmlEscapes[character]; + }) : value; +} +export function isPartHighlighted(parts, i) { + var _parts, _parts2; + var current = parts[i]; + var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true; + var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true; + if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) { + return isPreviousHighlighted; + } + return current.isHighlighted; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.d.ts new file mode 100644 index 00000000..d045d316 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.d.ts @@ -0,0 +1,4 @@ +import { HighlightedHit } from './HighlightedHit'; +import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams'; +import { ParsedAttribute } from './ParsedAttribute'; +export declare function parseAlgoliaHitHighlight>({ hit, attribute, }: ParseAlgoliaHitParams): ParsedAttribute[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js new file mode 100644 index 00000000..f2413da5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js @@ -0,0 +1,21 @@ +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared'; +import { parseAttribute } from './parseAttribute'; +export function parseAlgoliaHitHighlight(_ref) { + var hit = _ref.hit, + attribute = _ref.attribute; + var path = Array.isArray(attribute) ? attribute : [attribute]; + var highlightedValue = getAttributeValueByPath(hit, ['_highlightResult'].concat(_toConsumableArray(path), ['value'])); + if (typeof highlightedValue !== 'string') { + process.env.NODE_ENV !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToHighlight`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/') : void 0; + highlightedValue = getAttributeValueByPath(hit, path) || ''; + } + return parseAttribute({ + highlightedValue: highlightedValue + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.d.ts new file mode 100644 index 00000000..d18eb18a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.d.ts @@ -0,0 +1,4 @@ +import { HighlightedHit } from './HighlightedHit'; +import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams'; +import { ParsedAttribute } from './ParsedAttribute'; +export declare function parseAlgoliaHitReverseHighlight>(props: ParseAlgoliaHitParams): ParsedAttribute[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js new file mode 100644 index 00000000..ab35f172 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js @@ -0,0 +1,5 @@ +import { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight'; +import { reverseHighlightedParts } from './reverseHighlightedParts'; +export function parseAlgoliaHitReverseHighlight(props) { + return reverseHighlightedParts(parseAlgoliaHitHighlight(props)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.d.ts new file mode 100644 index 00000000..dd17c6be --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.d.ts @@ -0,0 +1,4 @@ +import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams'; +import { ParsedAttribute } from './ParsedAttribute'; +import { SnippetedHit } from './SnippetedHit'; +export declare function parseAlgoliaHitReverseSnippet>(props: ParseAlgoliaHitParams): ParsedAttribute[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js new file mode 100644 index 00000000..fbaf4776 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js @@ -0,0 +1,5 @@ +import { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet'; +import { reverseHighlightedParts } from './reverseHighlightedParts'; +export function parseAlgoliaHitReverseSnippet(props) { + return reverseHighlightedParts(parseAlgoliaHitSnippet(props)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.d.ts new file mode 100644 index 00000000..9ec48cd1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.d.ts @@ -0,0 +1,4 @@ +import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams'; +import { ParsedAttribute } from './ParsedAttribute'; +import { SnippetedHit } from './SnippetedHit'; +export declare function parseAlgoliaHitSnippet>({ hit, attribute, }: ParseAlgoliaHitParams): ParsedAttribute[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js new file mode 100644 index 00000000..dbbbe4cd --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js @@ -0,0 +1,21 @@ +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared'; +import { parseAttribute } from './parseAttribute'; +export function parseAlgoliaHitSnippet(_ref) { + var hit = _ref.hit, + attribute = _ref.attribute; + var path = Array.isArray(attribute) ? attribute : [attribute]; + var highlightedValue = getAttributeValueByPath(hit, ['_snippetResult'].concat(_toConsumableArray(path), ['value'])); + if (typeof highlightedValue !== 'string') { + process.env.NODE_ENV !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToSnippet`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/') : void 0; + highlightedValue = getAttributeValueByPath(hit, path) || ''; + } + return parseAttribute({ + highlightedValue: highlightedValue + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.d.ts new file mode 100644 index 00000000..da17b624 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.d.ts @@ -0,0 +1,6 @@ +import { ParsedAttribute } from './ParsedAttribute'; +declare type ParseAttributeParams = { + highlightedValue: string; +}; +export declare function parseAttribute({ highlightedValue, }: ParseAttributeParams): ParsedAttribute[]; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js new file mode 100644 index 00000000..e19997eb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js @@ -0,0 +1,48 @@ +import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants'; +/** + * Creates a data structure that allows to concatenate similar highlighting + * parts in a single value. + */ +function createAttributeSet() { + var initialValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var value = initialValue; + return { + get: function get() { + return value; + }, + add: function add(part) { + var lastPart = value[value.length - 1]; + if ((lastPart === null || lastPart === void 0 ? void 0 : lastPart.isHighlighted) === part.isHighlighted) { + value[value.length - 1] = { + value: lastPart.value + part.value, + isHighlighted: lastPart.isHighlighted + }; + } else { + value.push(part); + } + } + }; +} +export function parseAttribute(_ref) { + var highlightedValue = _ref.highlightedValue; + var preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG); + var firstValue = preTagParts.shift(); + var parts = createAttributeSet(firstValue ? [{ + value: firstValue, + isHighlighted: false + }] : []); + preTagParts.forEach(function (part) { + var postTagParts = part.split(HIGHLIGHT_POST_TAG); + parts.add({ + value: postTagParts[0], + isHighlighted: true + }); + if (postTagParts[1] !== '') { + parts.add({ + value: postTagParts[1], + isHighlighted: false + }); + } + }); + return parts.get(); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.d.ts new file mode 100644 index 00000000..2c979a92 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.d.ts @@ -0,0 +1,5 @@ +import { ParsedAttribute } from './ParsedAttribute'; +export declare function reverseHighlightedParts(parts: ParsedAttribute[]): { + isHighlighted: boolean; + value: string; +}[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js new file mode 100644 index 00000000..169d1b2d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js @@ -0,0 +1,24 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +import { isPartHighlighted } from './isPartHighlighted'; +export function reverseHighlightedParts(parts) { + // We don't want to highlight the whole word when no parts match. + if (!parts.some(function (part) { + return part.isHighlighted; + })) { + return parts.map(function (part) { + return _objectSpread(_objectSpread({}, part), {}, { + isHighlighted: false + }); + }); + } + return parts.map(function (part, i) { + return _objectSpread(_objectSpread({}, part), {}, { + isHighlighted: !isPartHighlighted(parts, i) + }); + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.d.ts new file mode 100644 index 00000000..eb7fce68 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.d.ts @@ -0,0 +1,4 @@ +export * from './highlight'; +export * from './requester'; +export * from './search'; +export * from './types'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.js new file mode 100644 index 00000000..ae796904 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/index.js @@ -0,0 +1,4 @@ +export * from './highlight'; +export * from './requester'; +export * from './search'; +export * from './types'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.d.ts new file mode 100644 index 00000000..6b7477c3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.d.ts @@ -0,0 +1 @@ +export declare const createAlgoliaRequester: (requesterParams: import("@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester").RequesterParams) => (requestParams: import("@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester").RequestParams) => import("@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester").RequesterDescription; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.js new file mode 100644 index 00000000..cad7daa7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createAlgoliaRequester.js @@ -0,0 +1,3 @@ +import { fetchAlgoliaResults } from '../search'; +import { createRequester } from './createRequester'; +export var createAlgoliaRequester = createRequester(fetchAlgoliaResults, 'algolia'); \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.d.ts new file mode 100644 index 00000000..0e5eb9db --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.d.ts @@ -0,0 +1,2 @@ +import type { Fetcher, RequesterParams, RequestParams, RequesterDescription } from '../types'; +export declare function createRequester(fetcher: Fetcher, requesterId?: string): (requesterParams: RequesterParams) => (requestParams: RequestParams) => RequesterDescription; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.js new file mode 100644 index 00000000..9cd971c9 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/createRequester.js @@ -0,0 +1,35 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +export function createRequester(fetcher, requesterId) { + function execute(fetcherParams) { + return fetcher({ + searchClient: fetcherParams.searchClient, + queries: fetcherParams.requests.map(function (x) { + return x.query; + }) + }).then(function (responses) { + return responses.map(function (response, index) { + var _fetcherParams$reques = fetcherParams.requests[index], + sourceId = _fetcherParams$reques.sourceId, + transformResponse = _fetcherParams$reques.transformResponse; + return { + items: response, + sourceId: sourceId, + transformResponse: transformResponse + }; + }); + }); + } + return function createSpecifiedRequester(requesterParams) { + return function requester(requestParams) { + return _objectSpread(_objectSpread({ + requesterId: requesterId, + execute: execute + }, requesterParams), requestParams); + }; + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.d.ts new file mode 100644 index 00000000..34993f33 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.d.ts @@ -0,0 +1,5 @@ +import { RequestParams } from '../types'; +/** + * Retrieves Algolia facet hits from multiple indices. + */ +export declare function getAlgoliaFacets(requestParams: RequestParams): import("@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester").RequesterDescription; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.js new file mode 100644 index 00000000..847dc0b8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaFacets.js @@ -0,0 +1,28 @@ +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +import { invariant } from '@algolia/autocomplete-shared'; +import { createAlgoliaRequester } from './createAlgoliaRequester'; + +/** + * Retrieves Algolia facet hits from multiple indices. + */ +export function getAlgoliaFacets(requestParams) { + invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaFacets({ searchClient }).'); + var requester = createAlgoliaRequester({ + transformResponse: function transformResponse(response) { + return response.facetHits; + } + }); + var queries = requestParams.queries.map(function (query) { + return _objectSpread(_objectSpread({}, query), {}, { + type: 'facet' + }); + }); + return requester(_objectSpread(_objectSpread({}, requestParams), {}, { + queries: queries + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.d.ts new file mode 100644 index 00000000..4fc1786d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.d.ts @@ -0,0 +1,5 @@ +import { RequestParams } from '../types'; +/** + * Retrieves Algolia results from multiple indices. + */ +export declare function getAlgoliaResults(requestParams: RequestParams): import("@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester").RequesterDescription; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.js new file mode 100644 index 00000000..456e0fca --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/getAlgoliaResults.js @@ -0,0 +1,16 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +import { invariant } from '@algolia/autocomplete-shared'; +import { createAlgoliaRequester } from './createAlgoliaRequester'; + +/** + * Retrieves Algolia results from multiple indices. + */ +export function getAlgoliaResults(requestParams) { + invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaResults({ searchClient }).'); + var requester = createAlgoliaRequester({ + transformResponse: function transformResponse(response) { + return response.hits; + } + }); + return requester(requestParams); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.d.ts new file mode 100644 index 00000000..b6123a4f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.d.ts @@ -0,0 +1,3 @@ +export * from './createRequester'; +export * from './getAlgoliaFacets'; +export * from './getAlgoliaResults'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.js new file mode 100644 index 00000000..a2c16b98 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/requester/index.js @@ -0,0 +1,3 @@ +export * from './createRequester'; +export * from './getAlgoliaFacets'; +export * from './getAlgoliaResults'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.d.ts new file mode 100644 index 00000000..f0e9b069 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.d.ts @@ -0,0 +1,2 @@ +import type { SearchForFacetValuesResponse, SearchResponse, SearchParams } from '../types'; +export declare function fetchAlgoliaResults({ searchClient, queries, userAgents, }: SearchParams): Promise | SearchForFacetValuesResponse>>; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.js new file mode 100644 index 00000000..2accdda3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.js @@ -0,0 +1,65 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +var _excluded = ["params"]; +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +import { userAgents as coreUserAgents, invariant } from '@algolia/autocomplete-shared'; +import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants'; +import { getAppIdAndApiKey } from '../utils'; +export function fetchAlgoliaResults(_ref) { + var searchClient = _ref.searchClient, + queries = _ref.queries, + _ref$userAgents = _ref.userAgents, + userAgents = _ref$userAgents === void 0 ? [] : _ref$userAgents; + if (typeof searchClient.addAlgoliaAgent === 'function') { + var algoliaAgents = [].concat(_toConsumableArray(coreUserAgents), _toConsumableArray(userAgents)); + algoliaAgents.forEach(function (_ref2) { + var segment = _ref2.segment, + version = _ref2.version; + searchClient.addAlgoliaAgent(segment, version); + }); + } + var _getAppIdAndApiKey = getAppIdAndApiKey(searchClient), + appId = _getAppIdAndApiKey.appId, + apiKey = _getAppIdAndApiKey.apiKey; + invariant(Boolean(appId), 'The Algolia `appId` was not accessible from the searchClient passed.'); + invariant(Boolean(apiKey), 'The Algolia `apiKey` was not accessible from the searchClient passed.'); + return searchClient.search(queries.map(function (searchParameters) { + var params = searchParameters.params, + headers = _objectWithoutProperties(searchParameters, _excluded); + return _objectSpread(_objectSpread({}, headers), {}, { + params: _objectSpread({ + hitsPerPage: 5, + highlightPreTag: HIGHLIGHT_PRE_TAG, + highlightPostTag: HIGHLIGHT_POST_TAG + }, params) + }); + })).then(function (response) { + return response.results.map(function (result, resultIndex) { + var _result$hits; + return _objectSpread(_objectSpread({}, result), {}, { + hits: (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _result$hits.map(function (hit) { + return _objectSpread(_objectSpread({}, hit), {}, { + // Bring support for the Insights plugin. + __autocomplete_indexName: result.index || queries[resultIndex].indexName, + __autocomplete_queryID: result.queryID, + __autocomplete_algoliaCredentials: { + appId: appId, + apiKey: apiKey + } + }); + }) + }); + }); + }); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.d.ts new file mode 100644 index 00000000..f8277f2b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.d.ts @@ -0,0 +1 @@ +export * from './fetchAlgoliaResults'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.js new file mode 100644 index 00000000..4fc44bf4 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/search/index.js @@ -0,0 +1 @@ +export * from './fetchAlgoliaResults'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.d.ts new file mode 100644 index 00000000..232a6ba8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.d.ts @@ -0,0 +1,2 @@ +export * from '@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch'; +export * from '@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.js new file mode 100644 index 00000000..4001f4e6 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/index.js @@ -0,0 +1,2 @@ +export * from '@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch'; +export * from '@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.d.ts new file mode 100644 index 00000000..d7b0d01c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.d.ts @@ -0,0 +1,5 @@ +import type { SearchClient } from '../types'; +export declare function getAppIdAndApiKey(searchClient: SearchClient): { + appId: string; + apiKey: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.js new file mode 100644 index 00000000..fde0466f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.js @@ -0,0 +1,15 @@ +export function getAppIdAndApiKey(searchClient) { + var _ref = searchClient.transporter || {}, + _ref$headers = _ref.headers, + headers = _ref$headers === void 0 ? {} : _ref$headers, + _ref$queryParameters = _ref.queryParameters, + queryParameters = _ref$queryParameters === void 0 ? {} : _ref$queryParameters; + var APP_ID = 'x-algolia-application-id'; + var API_KEY = 'x-algolia-api-key'; + var appId = headers[APP_ID] || queryParameters[APP_ID]; + var apiKey = headers[API_KEY] || queryParameters[API_KEY]; + return { + appId: appId, + apiKey: apiKey + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.d.ts new file mode 100644 index 00000000..4ae8e1aa --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.d.ts @@ -0,0 +1 @@ +export * from './getAppIdAndApiKey'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.js new file mode 100644 index 00000000..acf58140 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/esm/utils/index.js @@ -0,0 +1 @@ +export * from './getAppIdAndApiKey'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js new file mode 100644 index 00000000..0c8a5fdd --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js @@ -0,0 +1,438 @@ +/*! @algolia/autocomplete-preset-algolia 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@algolia/autocomplete-preset-algolia"] = {})); +})(this, (function (exports) { 'use strict'; + + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; + } + function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose(source, excluded); + var key, i; + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + return target; + } + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + + function getAttributeValueByPath(record, path) { + return path.reduce(function (current, key) { + return current && current[key]; + }, record); + } + + /** + * Throws an error if the condition is not met in development mode. + * This is used to make development a better experience to provide guidance as + * to where the error comes from. + */ + function invariant(condition, message) { + if (!condition) { + throw new Error("[Autocomplete] ".concat(typeof message === 'function' ? message() : message)); + } + } + + var version = '1.9.3'; + + var userAgents = [{ + segment: 'autocomplete-core', + version: version + }]; + + var warnCache = { + current: {} + }; + + /** + * Logs a warning if the condition is not met. + * This is used to log issues in development environment only. + */ + function warn(condition, message) { + if (condition) { + return; + } + var sanitizedMessage = message.trim(); + var hasAlreadyPrinted = warnCache.current[sanitizedMessage]; + if (!hasAlreadyPrinted) { + warnCache.current[sanitizedMessage] = true; + + // eslint-disable-next-line no-console + console.warn("[Autocomplete] ".concat(sanitizedMessage)); + } + } + + var HIGHLIGHT_PRE_TAG = '__aa-highlight__'; + var HIGHLIGHT_POST_TAG = '__/aa-highlight__'; + + /** + * Creates a data structure that allows to concatenate similar highlighting + * parts in a single value. + */ + function createAttributeSet() { + var initialValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var value = initialValue; + return { + get: function get() { + return value; + }, + add: function add(part) { + var lastPart = value[value.length - 1]; + if ((lastPart === null || lastPart === void 0 ? void 0 : lastPart.isHighlighted) === part.isHighlighted) { + value[value.length - 1] = { + value: lastPart.value + part.value, + isHighlighted: lastPart.isHighlighted + }; + } else { + value.push(part); + } + } + }; + } + function parseAttribute(_ref) { + var highlightedValue = _ref.highlightedValue; + var preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG); + var firstValue = preTagParts.shift(); + var parts = createAttributeSet(firstValue ? [{ + value: firstValue, + isHighlighted: false + }] : []); + preTagParts.forEach(function (part) { + var postTagParts = part.split(HIGHLIGHT_POST_TAG); + parts.add({ + value: postTagParts[0], + isHighlighted: true + }); + if (postTagParts[1] !== '') { + parts.add({ + value: postTagParts[1], + isHighlighted: false + }); + } + }); + return parts.get(); + } + + function parseAlgoliaHitHighlight(_ref) { + var hit = _ref.hit, + attribute = _ref.attribute; + var path = Array.isArray(attribute) ? attribute : [attribute]; + var highlightedValue = getAttributeValueByPath(hit, ['_highlightResult'].concat(_toConsumableArray(path), ['value'])); + if (typeof highlightedValue !== 'string') { + "development" !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToHighlight`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/') : void 0; + highlightedValue = getAttributeValueByPath(hit, path) || ''; + } + return parseAttribute({ + highlightedValue: highlightedValue + }); + } + + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + var hasAlphanumeric = new RegExp(/\w/i); + var regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g; + var regexHasEscapedHtml = RegExp(regexEscapedHtml.source); + function unescape(value) { + return value && regexHasEscapedHtml.test(value) ? value.replace(regexEscapedHtml, function (character) { + return htmlEscapes[character]; + }) : value; + } + function isPartHighlighted(parts, i) { + var _parts, _parts2; + var current = parts[i]; + var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true; + var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true; + if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) { + return isPreviousHighlighted; + } + return current.isHighlighted; + } + + function reverseHighlightedParts(parts) { + // We don't want to highlight the whole word when no parts match. + if (!parts.some(function (part) { + return part.isHighlighted; + })) { + return parts.map(function (part) { + return _objectSpread2(_objectSpread2({}, part), {}, { + isHighlighted: false + }); + }); + } + return parts.map(function (part, i) { + return _objectSpread2(_objectSpread2({}, part), {}, { + isHighlighted: !isPartHighlighted(parts, i) + }); + }); + } + + function parseAlgoliaHitReverseHighlight(props) { + return reverseHighlightedParts(parseAlgoliaHitHighlight(props)); + } + + function parseAlgoliaHitSnippet(_ref) { + var hit = _ref.hit, + attribute = _ref.attribute; + var path = Array.isArray(attribute) ? attribute : [attribute]; + var highlightedValue = getAttributeValueByPath(hit, ['_snippetResult'].concat(_toConsumableArray(path), ['value'])); + if (typeof highlightedValue !== 'string') { + "development" !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToSnippet`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/') : void 0; + highlightedValue = getAttributeValueByPath(hit, path) || ''; + } + return parseAttribute({ + highlightedValue: highlightedValue + }); + } + + function parseAlgoliaHitReverseSnippet(props) { + return reverseHighlightedParts(parseAlgoliaHitSnippet(props)); + } + + function createRequester(fetcher, requesterId) { + function execute(fetcherParams) { + return fetcher({ + searchClient: fetcherParams.searchClient, + queries: fetcherParams.requests.map(function (x) { + return x.query; + }) + }).then(function (responses) { + return responses.map(function (response, index) { + var _fetcherParams$reques = fetcherParams.requests[index], + sourceId = _fetcherParams$reques.sourceId, + transformResponse = _fetcherParams$reques.transformResponse; + return { + items: response, + sourceId: sourceId, + transformResponse: transformResponse + }; + }); + }); + } + return function createSpecifiedRequester(requesterParams) { + return function requester(requestParams) { + return _objectSpread2(_objectSpread2({ + requesterId: requesterId, + execute: execute + }, requesterParams), requestParams); + }; + }; + } + + function getAppIdAndApiKey(searchClient) { + var _ref = searchClient.transporter || {}, + _ref$headers = _ref.headers, + headers = _ref$headers === void 0 ? {} : _ref$headers, + _ref$queryParameters = _ref.queryParameters, + queryParameters = _ref$queryParameters === void 0 ? {} : _ref$queryParameters; + var APP_ID = 'x-algolia-application-id'; + var API_KEY = 'x-algolia-api-key'; + var appId = headers[APP_ID] || queryParameters[APP_ID]; + var apiKey = headers[API_KEY] || queryParameters[API_KEY]; + return { + appId: appId, + apiKey: apiKey + }; + } + + var _excluded = ["params"]; + function fetchAlgoliaResults(_ref) { + var searchClient = _ref.searchClient, + queries = _ref.queries, + _ref$userAgents = _ref.userAgents, + userAgents$1 = _ref$userAgents === void 0 ? [] : _ref$userAgents; + if (typeof searchClient.addAlgoliaAgent === 'function') { + var algoliaAgents = [].concat(_toConsumableArray(userAgents), _toConsumableArray(userAgents$1)); + algoliaAgents.forEach(function (_ref2) { + var segment = _ref2.segment, + version = _ref2.version; + searchClient.addAlgoliaAgent(segment, version); + }); + } + var _getAppIdAndApiKey = getAppIdAndApiKey(searchClient), + appId = _getAppIdAndApiKey.appId, + apiKey = _getAppIdAndApiKey.apiKey; + invariant(Boolean(appId), 'The Algolia `appId` was not accessible from the searchClient passed.'); + invariant(Boolean(apiKey), 'The Algolia `apiKey` was not accessible from the searchClient passed.'); + return searchClient.search(queries.map(function (searchParameters) { + var params = searchParameters.params, + headers = _objectWithoutProperties(searchParameters, _excluded); + return _objectSpread2(_objectSpread2({}, headers), {}, { + params: _objectSpread2({ + hitsPerPage: 5, + highlightPreTag: HIGHLIGHT_PRE_TAG, + highlightPostTag: HIGHLIGHT_POST_TAG + }, params) + }); + })).then(function (response) { + return response.results.map(function (result, resultIndex) { + var _result$hits; + return _objectSpread2(_objectSpread2({}, result), {}, { + hits: (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _result$hits.map(function (hit) { + return _objectSpread2(_objectSpread2({}, hit), {}, { + // Bring support for the Insights plugin. + __autocomplete_indexName: result.index || queries[resultIndex].indexName, + __autocomplete_queryID: result.queryID, + __autocomplete_algoliaCredentials: { + appId: appId, + apiKey: apiKey + } + }); + }) + }); + }); + }); + } + + var createAlgoliaRequester = createRequester(fetchAlgoliaResults, 'algolia'); + + /** + * Retrieves Algolia facet hits from multiple indices. + */ + function getAlgoliaFacets(requestParams) { + invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaFacets({ searchClient }).'); + var requester = createAlgoliaRequester({ + transformResponse: function transformResponse(response) { + return response.facetHits; + } + }); + var queries = requestParams.queries.map(function (query) { + return _objectSpread2(_objectSpread2({}, query), {}, { + type: 'facet' + }); + }); + return requester(_objectSpread2(_objectSpread2({}, requestParams), {}, { + queries: queries + })); + } + + /** + * Retrieves Algolia results from multiple indices. + */ + function getAlgoliaResults(requestParams) { + invariant(_typeof(requestParams.searchClient) === 'object', 'The `searchClient` parameter is required for getAlgoliaResults({ searchClient }).'); + var requester = createAlgoliaRequester({ + transformResponse: function transformResponse(response) { + return response.hits; + } + }); + return requester(requestParams); + } + + exports.createRequester = createRequester; + exports.fetchAlgoliaResults = fetchAlgoliaResults; + exports.getAlgoliaFacets = getAlgoliaFacets; + exports.getAlgoliaResults = getAlgoliaResults; + exports.parseAlgoliaHitHighlight = parseAlgoliaHitHighlight; + exports.parseAlgoliaHitReverseHighlight = parseAlgoliaHitReverseHighlight; + exports.parseAlgoliaHitReverseSnippet = parseAlgoliaHitReverseSnippet; + exports.parseAlgoliaHitSnippet = parseAlgoliaHitSnippet; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=index.development.js.map diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js.map b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js.map new file mode 100644 index 00000000..276ef7ea --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.development.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.development.js","sources":["../../../autocomplete-shared/dist/esm/getAttributeValueByPath.js","../../../autocomplete-shared/dist/esm/invariant.js","../../../autocomplete-shared/dist/esm/version.js","../../../autocomplete-shared/dist/esm/userAgents.js","../../../autocomplete-shared/dist/esm/warn.js","../../src/constants/index.ts","../../src/highlight/parseAttribute.ts","../../src/highlight/parseAlgoliaHitHighlight.ts","../../src/highlight/isPartHighlighted.ts","../../src/highlight/reverseHighlightedParts.ts","../../src/highlight/parseAlgoliaHitReverseHighlight.ts","../../src/highlight/parseAlgoliaHitSnippet.ts","../../src/highlight/parseAlgoliaHitReverseSnippet.ts","../../src/requester/createRequester.ts","../../src/utils/getAppIdAndApiKey.ts","../../src/search/fetchAlgoliaResults.ts","../../src/requester/createAlgoliaRequester.ts","../../src/requester/getAlgoliaFacets.ts","../../src/requester/getAlgoliaResults.ts"],"sourcesContent":["export function getAttributeValueByPath(record, path) {\n return path.reduce(function (current, key) {\n return current && current[key];\n }, record);\n}","/**\n * Throws an error if the condition is not met in development mode.\n * This is used to make development a better experience to provide guidance as\n * to where the error comes from.\n */\nexport function invariant(condition, message) {\n if (!(process.env.NODE_ENV !== 'production')) {\n return;\n }\n if (!condition) {\n throw new Error(\"[Autocomplete] \".concat(typeof message === 'function' ? message() : message));\n }\n}","export var version = '1.9.3';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export var warnCache = {\n current: {}\n};\n\n/**\n * Logs a warning if the condition is not met.\n * This is used to log issues in development environment only.\n */\nexport function warn(condition, message) {\n if (!(process.env.NODE_ENV !== 'production')) {\n return;\n }\n if (condition) {\n return;\n }\n var sanitizedMessage = message.trim();\n var hasAlreadyPrinted = warnCache.current[sanitizedMessage];\n if (!hasAlreadyPrinted) {\n warnCache.current[sanitizedMessage] = true;\n\n // eslint-disable-next-line no-console\n console.warn(\"[Autocomplete] \".concat(sanitizedMessage));\n }\n}","export const HIGHLIGHT_PRE_TAG = '__aa-highlight__';\nexport const HIGHLIGHT_POST_TAG = '__/aa-highlight__';\n","import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\n\nimport { ParsedAttribute } from './ParsedAttribute';\n\n/**\n * Creates a data structure that allows to concatenate similar highlighting\n * parts in a single value.\n */\nfunction createAttributeSet(initialValue: ParsedAttribute[] = []) {\n const value = initialValue;\n\n return {\n get() {\n return value;\n },\n add(part: ParsedAttribute) {\n const lastPart: ParsedAttribute | undefined = value[value.length - 1];\n\n if (lastPart?.isHighlighted === part.isHighlighted) {\n value[value.length - 1] = {\n value: lastPart.value + part.value,\n isHighlighted: lastPart.isHighlighted,\n };\n } else {\n value.push(part);\n }\n },\n };\n}\n\ntype ParseAttributeParams = {\n highlightedValue: string;\n};\n\nexport function parseAttribute({\n highlightedValue,\n}: ParseAttributeParams): ParsedAttribute[] {\n const preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG);\n const firstValue = preTagParts.shift();\n const parts = createAttributeSet(\n firstValue ? [{ value: firstValue, isHighlighted: false }] : []\n );\n\n preTagParts.forEach((part) => {\n const postTagParts = part.split(HIGHLIGHT_POST_TAG);\n\n parts.add({\n value: postTagParts[0],\n isHighlighted: true,\n });\n\n if (postTagParts[1] !== '') {\n parts.add({\n value: postTagParts[1],\n isHighlighted: false,\n });\n }\n });\n\n return parts.get();\n}\n","import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\n\nimport { HighlightedHit } from './HighlightedHit';\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAttribute } from './parseAttribute';\nimport { ParsedAttribute } from './ParsedAttribute';\n\nexport function parseAlgoliaHitHighlight>({\n hit,\n attribute,\n}: ParseAlgoliaHitParams): ParsedAttribute[] {\n const path = Array.isArray(attribute) ? attribute : ([attribute] as string[]);\n let highlightedValue = getAttributeValueByPath(hit, [\n '_highlightResult',\n ...path,\n 'value',\n ]);\n\n if (typeof highlightedValue !== 'string') {\n warn(\n false,\n `The attribute \"${path.join('.')}\" described by the path ${JSON.stringify(\n path\n )} does not exist on the hit. Did you set it in \\`attributesToHighlight\\`?` +\n '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/'\n );\n\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n\n return parseAttribute({ highlightedValue });\n}\n","import { ParsedAttribute } from './ParsedAttribute';\n\nconst htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n};\nconst hasAlphanumeric = new RegExp(/\\w/i);\nconst regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;\nconst regexHasEscapedHtml = RegExp(regexEscapedHtml.source);\n\nfunction unescape(value: string): string {\n return value && regexHasEscapedHtml.test(value)\n ? value.replace(regexEscapedHtml, (character) => htmlEscapes[character])\n : value;\n}\n\nexport function isPartHighlighted(parts: ParsedAttribute[], i: number) {\n const current = parts[i];\n const isNextHighlighted = parts[i + 1]?.isHighlighted || true;\n const isPreviousHighlighted = parts[i - 1]?.isHighlighted || true;\n\n if (\n !hasAlphanumeric.test(unescape(current.value)) &&\n isPreviousHighlighted === isNextHighlighted\n ) {\n return isPreviousHighlighted;\n }\n\n return current.isHighlighted;\n}\n","import { isPartHighlighted } from './isPartHighlighted';\nimport { ParsedAttribute } from './ParsedAttribute';\n\nexport function reverseHighlightedParts(parts: ParsedAttribute[]) {\n // We don't want to highlight the whole word when no parts match.\n if (!parts.some((part) => part.isHighlighted)) {\n return parts.map((part) => ({ ...part, isHighlighted: false }));\n }\n\n return parts.map((part, i) => ({\n ...part,\n isHighlighted: !isPartHighlighted(parts, i),\n }));\n}\n","import { HighlightedHit } from './HighlightedHit';\nimport { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight';\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\n\nexport function parseAlgoliaHitReverseHighlight<\n THit extends HighlightedHit\n>(props: ParseAlgoliaHitParams): ParsedAttribute[] {\n return reverseHighlightedParts(parseAlgoliaHitHighlight(props));\n}\n","import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\n\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAttribute } from './parseAttribute';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { SnippetedHit } from './SnippetedHit';\n\nexport function parseAlgoliaHitSnippet>({\n hit,\n attribute,\n}: ParseAlgoliaHitParams): ParsedAttribute[] {\n const path = Array.isArray(attribute) ? attribute : ([attribute] as string[]);\n let highlightedValue = getAttributeValueByPath(hit, [\n '_snippetResult',\n ...path,\n 'value',\n ]);\n\n if (typeof highlightedValue !== 'string') {\n warn(\n false,\n `The attribute \"${path.join('.')}\" described by the path ${JSON.stringify(\n path\n )} does not exist on the hit. Did you set it in \\`attributesToSnippet\\`?` +\n '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/'\n );\n\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n\n return parseAttribute({ highlightedValue });\n}\n","import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\nimport { SnippetedHit } from './SnippetedHit';\n\nexport function parseAlgoliaHitReverseSnippet<\n THit extends SnippetedHit\n>(props: ParseAlgoliaHitParams): ParsedAttribute[] {\n return reverseHighlightedParts(parseAlgoliaHitSnippet(props));\n}\n","import type {\n Fetcher,\n ExecuteParams,\n RequesterParams,\n RequestParams,\n RequesterDescription,\n} from '../types';\n\nexport function createRequester(fetcher: Fetcher, requesterId?: string) {\n function execute(fetcherParams: ExecuteParams) {\n return fetcher({\n searchClient: fetcherParams.searchClient,\n queries: fetcherParams.requests.map((x) => x.query),\n }).then((responses) =>\n responses.map((response, index) => {\n const { sourceId, transformResponse } = fetcherParams.requests[index];\n\n return {\n items: response,\n sourceId,\n transformResponse,\n };\n })\n );\n }\n\n return function createSpecifiedRequester(\n requesterParams: RequesterParams\n ) {\n return function requester(\n requestParams: RequestParams\n ): RequesterDescription {\n return {\n requesterId,\n execute,\n ...requesterParams,\n ...requestParams,\n };\n };\n };\n}\n","import type { SearchClient } from '../types';\n\nexport function getAppIdAndApiKey(searchClient: SearchClient): {\n appId: string;\n apiKey: string;\n} {\n const { headers = {}, queryParameters = {} } = searchClient.transporter || {};\n const APP_ID = 'x-algolia-application-id';\n const API_KEY = 'x-algolia-api-key';\n const appId = headers[APP_ID] || queryParameters[APP_ID];\n const apiKey = headers[API_KEY] || queryParameters[API_KEY];\n return { appId, apiKey };\n}\n","import {\n userAgents as coreUserAgents,\n UserAgent,\n invariant,\n} from '@algolia/autocomplete-shared';\n\nimport { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\nimport type {\n SearchForFacetValuesResponse,\n SearchResponse,\n SearchParams,\n} from '../types';\nimport { getAppIdAndApiKey } from '../utils';\n\nexport function fetchAlgoliaResults({\n searchClient,\n queries,\n userAgents = [],\n}: SearchParams): Promise<\n Array | SearchForFacetValuesResponse>\n> {\n if (typeof searchClient.addAlgoliaAgent === 'function') {\n const algoliaAgents: UserAgent[] = [...coreUserAgents, ...userAgents];\n\n algoliaAgents.forEach(({ segment, version }) => {\n searchClient.addAlgoliaAgent(segment, version);\n });\n }\n\n const { appId, apiKey } = getAppIdAndApiKey(searchClient);\n\n invariant(\n Boolean(appId),\n 'The Algolia `appId` was not accessible from the searchClient passed.'\n );\n invariant(\n Boolean(apiKey),\n 'The Algolia `apiKey` was not accessible from the searchClient passed.'\n );\n\n return searchClient\n .search(\n queries.map((searchParameters) => {\n const { params, ...headers } = searchParameters;\n\n return {\n ...headers,\n params: {\n hitsPerPage: 5,\n highlightPreTag: HIGHLIGHT_PRE_TAG,\n highlightPostTag: HIGHLIGHT_POST_TAG,\n ...params,\n },\n };\n })\n )\n .then((response) => {\n return response.results.map((result, resultIndex) => ({\n ...result,\n hits: result.hits?.map((hit) => ({\n ...hit,\n // Bring support for the Insights plugin.\n __autocomplete_indexName:\n result.index || queries[resultIndex].indexName,\n __autocomplete_queryID: result.queryID,\n __autocomplete_algoliaCredentials: {\n appId,\n apiKey,\n },\n })),\n }));\n });\n}\n","import { fetchAlgoliaResults } from '../search';\n\nimport { createRequester } from './createRequester';\n\nexport const createAlgoliaRequester = createRequester(\n fetchAlgoliaResults,\n 'algolia'\n);\n","import { invariant } from '@algolia/autocomplete-shared';\n\nimport type { MultipleQueriesQuery } from '../types';\nimport { RequestParams } from '../types';\n\nimport { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia facet hits from multiple indices.\n */\nexport function getAlgoliaFacets(requestParams: RequestParams) {\n invariant(\n typeof requestParams.searchClient === 'object',\n 'The `searchClient` parameter is required for getAlgoliaFacets({ searchClient }).'\n );\n\n const requester = createAlgoliaRequester({\n transformResponse: (response) => response.facetHits,\n });\n\n const queries = requestParams.queries.map((query) => ({\n ...query,\n type: 'facet',\n })) as MultipleQueriesQuery[];\n\n return requester({\n ...requestParams,\n queries,\n });\n}\n","import { invariant } from '@algolia/autocomplete-shared';\n\nimport { RequestParams } from '../types';\n\nimport { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia results from multiple indices.\n */\nexport function getAlgoliaResults(requestParams: RequestParams) {\n invariant(\n typeof requestParams.searchClient === 'object',\n 'The `searchClient` parameter is required for getAlgoliaResults({ searchClient }).'\n );\n\n const requester = createAlgoliaRequester({\n transformResponse: (response) => response.hits,\n });\n\n return requester(requestParams);\n}\n"],"names":["getAttributeValueByPath","record","path","reduce","current","key","invariant","condition","message","Error","concat","version","userAgents","segment","warnCache","warn","sanitizedMessage","trim","hasAlreadyPrinted","console","HIGHLIGHT_PRE_TAG","HIGHLIGHT_POST_TAG","createAttributeSet","initialValue","arguments","length","undefined","value","get","add","part","lastPart","isHighlighted","push","parseAttribute","_ref","highlightedValue","preTagParts","split","firstValue","shift","parts","forEach","postTagParts","parseAlgoliaHitHighlight","hit","attribute","Array","isArray","_toConsumableArray","process","join","JSON","stringify","htmlEscapes","hasAlphanumeric","RegExp","regexEscapedHtml","regexHasEscapedHtml","source","unescape","test","replace","character","isPartHighlighted","i","_parts","_parts2","isNextHighlighted","isPreviousHighlighted","reverseHighlightedParts","some","map","_objectSpread","parseAlgoliaHitReverseHighlight","props","parseAlgoliaHitSnippet","parseAlgoliaHitReverseSnippet","createRequester","fetcher","requesterId","execute","fetcherParams","searchClient","queries","requests","x","query","then","responses","response","index","_fetcherParams$reques","sourceId","transformResponse","items","createSpecifiedRequester","requesterParams","requester","requestParams","getAppIdAndApiKey","transporter","_ref$headers","headers","_ref$queryParameters","queryParameters","APP_ID","API_KEY","appId","apiKey","fetchAlgoliaResults","_ref$userAgents","addAlgoliaAgent","algoliaAgents","coreUserAgents","_ref2","_getAppIdAndApiKey","Boolean","search","searchParameters","params","_objectWithoutProperties","_excluded","hitsPerPage","highlightPreTag","highlightPostTag","results","result","resultIndex","_result$hits","hits","__autocomplete_indexName","indexName","__autocomplete_queryID","queryID","__autocomplete_algoliaCredentials","createAlgoliaRequester","getAlgoliaFacets","_typeof","facetHits","type","getAlgoliaResults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASA,CAAuBA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAACC,CAAM,CAA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C,CAAAA,CAAAA,CAAAA,CAAI,CAAA;EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAChD,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC,CAAA;IAEF,CAAOhC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAACC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CAAC,CAAA;AACjC,CAAA,CAAA,CAAA;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js new file mode 100644 index 00000000..0ad821ca --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js @@ -0,0 +1,3 @@ +/*! @algolia/autocomplete-preset-algolia 1.9.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/autocomplete-preset-algolia"]={})}(this,(function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function u(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var r=e[e.length-1];(null==r?void 0:r.isHighlighted)===t.isHighlighted?e[e.length-1]={value:r.value+t.value,isHighlighted:r.isHighlighted}:e.push(t)}}}(r?[{value:r,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split(f);n.add({value:t[0],isHighlighted:!0}),""!==t[1]&&n.add({value:t[1],isHighlighted:!1})})),n.get()}function g(e){var t=e.hit,r=e.attribute,n=Array.isArray(r)?r:[r],i=l(t,["_highlightResult"].concat(u(n),["value"]));return"string"!=typeof i&&(i=l(t,n)||""),p({highlightedValue:i})}var h={"&":"&","<":"<",">":">",""":'"',"'":"'"},d=new RegExp(/\w/i),y=/&(amp|quot|lt|gt|#39);/g,v=RegExp(y.source);function m(e,t){var r,n,i,o=e[t],u=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return d.test((i=o.value)&&v.test(i)?i.replace(y,(function(e){return h[e]})):i)||a!==u?o.isHighlighted:a}function b(e){return e.some((function(e){return e.isHighlighted}))?e.map((function(t,n){return r(r({},t),{},{isHighlighted:!m(e,n)})})):e.map((function(e){return r(r({},e),{},{isHighlighted:!1})}))}function O(e){var t=e.hit,r=e.attribute,n=Array.isArray(r)?r:[r],i=l(t,["_snippetResult"].concat(u(n),["value"]));return"string"!=typeof i&&(i=l(t,n)||""),p({highlightedValue:i})}function j(e,t){function n(t){return e({searchClient:t.searchClient,queries:t.requests.map((function(e){return e.query}))}).then((function(e){return e.map((function(e,r){var n=t.requests[r];return{items:e,sourceId:n.sourceId,transformResponse:n.transformResponse}}))}))}return function(e){return function(i){return r(r({requesterId:t,execute:n},e),i)}}}var A=["params"];function _(e){var t=e.searchClient,n=e.queries,i=e.userAgents,a=void 0===i?[]:i;"function"==typeof t.addAlgoliaAgent&&[].concat(u(c),u(a)).forEach((function(e){var r=e.segment,n=e.version;t.addAlgoliaAgent(r,n)}));var l=function(e){var t=e.transporter||{},r=t.headers,n=void 0===r?{}:r,i=t.queryParameters,o=void 0===i?{}:i,u="x-algolia-application-id",a="x-algolia-api-key";return{appId:n[u]||o[u],apiKey:n[a]||o[a]}}(t),p=l.appId,g=l.apiKey;return t.search(n.map((function(e){var t=e.params;return r(r({},o(e,A)),{},{params:r({hitsPerPage:5,highlightPreTag:s,highlightPostTag:f},t)})}))).then((function(e){return e.results.map((function(e,t){var i;return r(r({},e),{},{hits:null===(i=e.hits)||void 0===i?void 0:i.map((function(i){return r(r({},i),{},{__autocomplete_indexName:e.index||n[t].indexName,__autocomplete_queryID:e.queryID,__autocomplete_algoliaCredentials:{appId:p,apiKey:g}})}))})}))}))}var H=j(_,"algolia");e.createRequester=j,e.fetchAlgoliaResults=_,e.getAlgoliaFacets=function(e){n(e.searchClient);var t=H({transformResponse:function(e){return e.facetHits}}),i=e.queries.map((function(e){return r(r({},e),{},{type:"facet"})}));return t(r(r({},e),{},{queries:i}))},e.getAlgoliaResults=function(e){return n(e.searchClient),H({transformResponse:function(e){return e.hits}})(e)},e.parseAlgoliaHitHighlight=g,e.parseAlgoliaHitReverseHighlight=function(e){return b(g(e))},e.parseAlgoliaHitReverseSnippet=function(e){return b(O(e))},e.parseAlgoliaHitSnippet=O,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=index.production.js.map diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js.map b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js.map new file mode 100644 index 00000000..d26b169d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/dist/umd/index.production.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.production.js","sources":["../../../autocomplete-shared/dist/esm/getAttributeValueByPath.js","../../../autocomplete-shared/dist/esm/version.js","../../../autocomplete-shared/dist/esm/userAgents.js","../../src/constants/index.ts","../../src/highlight/parseAttribute.ts","../../src/highlight/parseAlgoliaHitHighlight.ts","../../src/highlight/isPartHighlighted.ts","../../src/highlight/reverseHighlightedParts.ts","../../src/highlight/parseAlgoliaHitSnippet.ts","../../src/requester/createRequester.ts","../../src/search/fetchAlgoliaResults.ts","../../src/utils/getAppIdAndApiKey.ts","../../src/requester/createAlgoliaRequester.ts","../../src/requester/getAlgoliaFacets.ts","../../src/requester/getAlgoliaResults.ts","../../src/highlight/parseAlgoliaHitReverseHighlight.ts","../../src/highlight/parseAlgoliaHitReverseSnippet.ts"],"sourcesContent":["export function getAttributeValueByPath(record, path) {\n return path.reduce(function (current, key) {\n return current && current[key];\n }, record);\n}","export var version = '1.9.3';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export const HIGHLIGHT_PRE_TAG = '__aa-highlight__';\nexport const HIGHLIGHT_POST_TAG = '__/aa-highlight__';\n","import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\n\nimport { ParsedAttribute } from './ParsedAttribute';\n\n/**\n * Creates a data structure that allows to concatenate similar highlighting\n * parts in a single value.\n */\nfunction createAttributeSet(initialValue: ParsedAttribute[] = []) {\n const value = initialValue;\n\n return {\n get() {\n return value;\n },\n add(part: ParsedAttribute) {\n const lastPart: ParsedAttribute | undefined = value[value.length - 1];\n\n if (lastPart?.isHighlighted === part.isHighlighted) {\n value[value.length - 1] = {\n value: lastPart.value + part.value,\n isHighlighted: lastPart.isHighlighted,\n };\n } else {\n value.push(part);\n }\n },\n };\n}\n\ntype ParseAttributeParams = {\n highlightedValue: string;\n};\n\nexport function parseAttribute({\n highlightedValue,\n}: ParseAttributeParams): ParsedAttribute[] {\n const preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG);\n const firstValue = preTagParts.shift();\n const parts = createAttributeSet(\n firstValue ? [{ value: firstValue, isHighlighted: false }] : []\n );\n\n preTagParts.forEach((part) => {\n const postTagParts = part.split(HIGHLIGHT_POST_TAG);\n\n parts.add({\n value: postTagParts[0],\n isHighlighted: true,\n });\n\n if (postTagParts[1] !== '') {\n parts.add({\n value: postTagParts[1],\n isHighlighted: false,\n });\n }\n });\n\n return parts.get();\n}\n","import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\n\nimport { HighlightedHit } from './HighlightedHit';\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAttribute } from './parseAttribute';\nimport { ParsedAttribute } from './ParsedAttribute';\n\nexport function parseAlgoliaHitHighlight>({\n hit,\n attribute,\n}: ParseAlgoliaHitParams): ParsedAttribute[] {\n const path = Array.isArray(attribute) ? attribute : ([attribute] as string[]);\n let highlightedValue = getAttributeValueByPath(hit, [\n '_highlightResult',\n ...path,\n 'value',\n ]);\n\n if (typeof highlightedValue !== 'string') {\n warn(\n false,\n `The attribute \"${path.join('.')}\" described by the path ${JSON.stringify(\n path\n )} does not exist on the hit. Did you set it in \\`attributesToHighlight\\`?` +\n '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/'\n );\n\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n\n return parseAttribute({ highlightedValue });\n}\n","import { ParsedAttribute } from './ParsedAttribute';\n\nconst htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n};\nconst hasAlphanumeric = new RegExp(/\\w/i);\nconst regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;\nconst regexHasEscapedHtml = RegExp(regexEscapedHtml.source);\n\nfunction unescape(value: string): string {\n return value && regexHasEscapedHtml.test(value)\n ? value.replace(regexEscapedHtml, (character) => htmlEscapes[character])\n : value;\n}\n\nexport function isPartHighlighted(parts: ParsedAttribute[], i: number) {\n const current = parts[i];\n const isNextHighlighted = parts[i + 1]?.isHighlighted || true;\n const isPreviousHighlighted = parts[i - 1]?.isHighlighted || true;\n\n if (\n !hasAlphanumeric.test(unescape(current.value)) &&\n isPreviousHighlighted === isNextHighlighted\n ) {\n return isPreviousHighlighted;\n }\n\n return current.isHighlighted;\n}\n","import { isPartHighlighted } from './isPartHighlighted';\nimport { ParsedAttribute } from './ParsedAttribute';\n\nexport function reverseHighlightedParts(parts: ParsedAttribute[]) {\n // We don't want to highlight the whole word when no parts match.\n if (!parts.some((part) => part.isHighlighted)) {\n return parts.map((part) => ({ ...part, isHighlighted: false }));\n }\n\n return parts.map((part, i) => ({\n ...part,\n isHighlighted: !isPartHighlighted(parts, i),\n }));\n}\n","import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\n\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAttribute } from './parseAttribute';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { SnippetedHit } from './SnippetedHit';\n\nexport function parseAlgoliaHitSnippet>({\n hit,\n attribute,\n}: ParseAlgoliaHitParams): ParsedAttribute[] {\n const path = Array.isArray(attribute) ? attribute : ([attribute] as string[]);\n let highlightedValue = getAttributeValueByPath(hit, [\n '_snippetResult',\n ...path,\n 'value',\n ]);\n\n if (typeof highlightedValue !== 'string') {\n warn(\n false,\n `The attribute \"${path.join('.')}\" described by the path ${JSON.stringify(\n path\n )} does not exist on the hit. Did you set it in \\`attributesToSnippet\\`?` +\n '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/'\n );\n\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n\n return parseAttribute({ highlightedValue });\n}\n","import type {\n Fetcher,\n ExecuteParams,\n RequesterParams,\n RequestParams,\n RequesterDescription,\n} from '../types';\n\nexport function createRequester(fetcher: Fetcher, requesterId?: string) {\n function execute(fetcherParams: ExecuteParams) {\n return fetcher({\n searchClient: fetcherParams.searchClient,\n queries: fetcherParams.requests.map((x) => x.query),\n }).then((responses) =>\n responses.map((response, index) => {\n const { sourceId, transformResponse } = fetcherParams.requests[index];\n\n return {\n items: response,\n sourceId,\n transformResponse,\n };\n })\n );\n }\n\n return function createSpecifiedRequester(\n requesterParams: RequesterParams\n ) {\n return function requester(\n requestParams: RequestParams\n ): RequesterDescription {\n return {\n requesterId,\n execute,\n ...requesterParams,\n ...requestParams,\n };\n };\n };\n}\n","import {\n userAgents as coreUserAgents,\n UserAgent,\n invariant,\n} from '@algolia/autocomplete-shared';\n\nimport { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\nimport type {\n SearchForFacetValuesResponse,\n SearchResponse,\n SearchParams,\n} from '../types';\nimport { getAppIdAndApiKey } from '../utils';\n\nexport function fetchAlgoliaResults({\n searchClient,\n queries,\n userAgents = [],\n}: SearchParams): Promise<\n Array | SearchForFacetValuesResponse>\n> {\n if (typeof searchClient.addAlgoliaAgent === 'function') {\n const algoliaAgents: UserAgent[] = [...coreUserAgents, ...userAgents];\n\n algoliaAgents.forEach(({ segment, version }) => {\n searchClient.addAlgoliaAgent(segment, version);\n });\n }\n\n const { appId, apiKey } = getAppIdAndApiKey(searchClient);\n\n invariant(\n Boolean(appId),\n 'The Algolia `appId` was not accessible from the searchClient passed.'\n );\n invariant(\n Boolean(apiKey),\n 'The Algolia `apiKey` was not accessible from the searchClient passed.'\n );\n\n return searchClient\n .search(\n queries.map((searchParameters) => {\n const { params, ...headers } = searchParameters;\n\n return {\n ...headers,\n params: {\n hitsPerPage: 5,\n highlightPreTag: HIGHLIGHT_PRE_TAG,\n highlightPostTag: HIGHLIGHT_POST_TAG,\n ...params,\n },\n };\n })\n )\n .then((response) => {\n return response.results.map((result, resultIndex) => ({\n ...result,\n hits: result.hits?.map((hit) => ({\n ...hit,\n // Bring support for the Insights plugin.\n __autocomplete_indexName:\n result.index || queries[resultIndex].indexName,\n __autocomplete_queryID: result.queryID,\n __autocomplete_algoliaCredentials: {\n appId,\n apiKey,\n },\n })),\n }));\n });\n}\n","import type { SearchClient } from '../types';\n\nexport function getAppIdAndApiKey(searchClient: SearchClient): {\n appId: string;\n apiKey: string;\n} {\n const { headers = {}, queryParameters = {} } = searchClient.transporter || {};\n const APP_ID = 'x-algolia-application-id';\n const API_KEY = 'x-algolia-api-key';\n const appId = headers[APP_ID] || queryParameters[APP_ID];\n const apiKey = headers[API_KEY] || queryParameters[API_KEY];\n return { appId, apiKey };\n}\n","import { fetchAlgoliaResults } from '../search';\n\nimport { createRequester } from './createRequester';\n\nexport const createAlgoliaRequester = createRequester(\n fetchAlgoliaResults,\n 'algolia'\n);\n","import { invariant } from '@algolia/autocomplete-shared';\n\nimport type { MultipleQueriesQuery } from '../types';\nimport { RequestParams } from '../types';\n\nimport { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia facet hits from multiple indices.\n */\nexport function getAlgoliaFacets(requestParams: RequestParams) {\n invariant(\n typeof requestParams.searchClient === 'object',\n 'The `searchClient` parameter is required for getAlgoliaFacets({ searchClient }).'\n );\n\n const requester = createAlgoliaRequester({\n transformResponse: (response) => response.facetHits,\n });\n\n const queries = requestParams.queries.map((query) => ({\n ...query,\n type: 'facet',\n })) as MultipleQueriesQuery[];\n\n return requester({\n ...requestParams,\n queries,\n });\n}\n","import { invariant } from '@algolia/autocomplete-shared';\n\nimport { RequestParams } from '../types';\n\nimport { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia results from multiple indices.\n */\nexport function getAlgoliaResults(requestParams: RequestParams) {\n invariant(\n typeof requestParams.searchClient === 'object',\n 'The `searchClient` parameter is required for getAlgoliaResults({ searchClient }).'\n );\n\n const requester = createAlgoliaRequester({\n transformResponse: (response) => response.hits,\n });\n\n return requester(requestParams);\n}\n","import { HighlightedHit } from './HighlightedHit';\nimport { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight';\nimport { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\n\nexport function parseAlgoliaHitReverseHighlight<\n THit extends HighlightedHit\n>(props: ParseAlgoliaHitParams): ParsedAttribute[] {\n return reverseHighlightedParts(parseAlgoliaHitHighlight(props));\n}\n","import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';\nimport { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet';\nimport { ParsedAttribute } from './ParsedAttribute';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\nimport { SnippetedHit } from './SnippetedHit';\n\nexport function parseAlgoliaHitReverseSnippet<\n THit extends SnippetedHit\n>(props: ParseAlgoliaHitParams): ParsedAttribute[] {\n return reverseHighlightedParts(parseAlgoliaHitSnippet(props));\n}\n"],"names":["getAttributeValueByPath","record","path","reduce","current","key","userAgents","segment","version","HIGHLIGHT_PRE_TAG","HIGHLIGHT_POST_TAG","parseAttribute","_ref","preTagParts","highlightedValue","split","firstValue","shift","parts","value","arguments","length","undefined","get","add","part","lastPart","isHighlighted","push","createAttributeSet","forEach","postTagParts","parseAlgoliaHitHighlight","hit","attribute","Array","isArray","concat","_toConsumableArray","htmlEscapes","hasAlphanumeric","RegExp","regexEscapedHtml","regexHasEscapedHtml","source","isPartHighlighted","i","_parts","_parts2","isNextHighlighted","isPreviousHighlighted","test","replace","character","reverseHighlightedParts","some","map","_objectSpread","parseAlgoliaHitSnippet","createRequester","fetcher","requesterId","execute","fetcherParams","searchClient","queries","requests","x","query","then","responses","response","index","_fetcherParams$reques","items","sourceId","transformResponse","requesterParams","requestParams","fetchAlgoliaResults","_ref$userAgents","addAlgoliaAgent","coreUserAgents","_ref2","_getAppIdAndApiKey","transporter","_ref$headers","headers","_ref$queryParameters","queryParameters","APP_ID","API_KEY","appId","apiKey","getAppIdAndApiKey","search","searchParameters","params","_objectWithoutProperties","_excluded","hitsPerPage","highlightPreTag","highlightPostTag","results","result","resultIndex","_result$hits","hits","__autocomplete_indexName","indexName","__autocomplete_queryID","queryID","__autocomplete_algoliaCredentials","createAlgoliaRequester","_typeof","requester","facetHits","type","props"],"mappings":";6mFAAO,SAASA,EAAwBC,EAAQC,GAC9C,OAAOA,EAAKC,QAAO,SAAUC,EAASC,GACpC,OAAOD,GAAWA,EAAQC,KACzBJ,GCHE,ICCIK,EAAa,CAAC,CACvBC,QAAS,oBACTC,QDHmB,UEAd,IAAMC,EAAoB,mBACpBC,EAAqB,oBCiC3B,SAASC,EAAcC,GAEc,IACpCC,EAFUD,EAAhBE,iBAEqCC,MAAMN,GACrCO,EAAaH,EAAYI,QACzBC,EA/BR,WAAkE,IAC1DC,EADmDC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAG5D,MAAO,CACLG,IAAG,WACD,OAAOJ,GAETK,IAAG,SAACC,GACF,IAAMC,EAAwCP,EAAMA,EAAME,OAAS,IAE/DK,MAAAA,OAAAA,EAAAA,EAAUC,iBAAkBF,EAAKE,cACnCR,EAAMA,EAAME,OAAS,GAAK,CACxBF,MAAOO,EAASP,MAAQM,EAAKN,MAC7BQ,cAAeD,EAASC,eAG1BR,EAAMS,KAAKH,KAeHI,CACZb,EAAa,CAAC,CAAEG,MAAOH,EAAYW,eAAe,IAAW,IAmB/D,OAhBAd,EAAYiB,SAAQ,SAACL,GACnB,IAAMM,EAAeN,EAAKV,MAAML,GAEhCQ,EAAMM,IAAI,CACRL,MAAOY,EAAa,GACpBJ,eAAe,IAGO,KAApBI,EAAa,IACfb,EAAMM,IAAI,CACRL,MAAOY,EAAa,GACpBJ,eAAe,OAKdT,EAAMK,MCpDR,SAASS,EAAwBpB,GAGW,IAFjDqB,EAAGrB,EAAHqB,IACAC,EAAStB,EAATsB,UAEMhC,EAA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,EAALQ,MAAOC,EAAMT,EAANS,OAWf,OAAO7B,EACJ+B,OACC9B,EAAQT,KAAI,SAACwC,GACX,IAAQC,EAAuBD,EAAvBC,OAER,OAAAxC,EAAAA,EAAA,GAF0ByC,EAAKF,EAAgBG,IAGnC,GAAA,CACVF,OAAMxC,EAAA,CACJ2C,YAAa,EACbC,gBAAiB5F,EACjB6F,iBAAkB5F,GACfuF,SAKV5B,MAAK,SAACE,GACL,OAAOA,EAASgC,QAAQ/C,KAAI,SAACgD,EAAQC,GAAW,IAAAC,EAAA,OAAAjD,EAAAA,EAAA,GAC3C+C,GAAM,GAAA,CACTG,KAAiB,QAAbD,EAAEF,EAAOG,YAAI,IAAAD,OAAA,EAAXA,EAAalD,KAAI,SAACvB,GAAG,OAAAwB,EAAAA,EAAA,GACtBxB,GAAG,GAAA,CAEN2E,yBACEJ,EAAOhC,OAASP,EAAQwC,GAAaI,UACvCC,uBAAwBN,EAAOO,QAC/BC,kCAAmC,CACjCpB,MAAAA,EACAC,OAAAA,gBE/DL,IAAMoB,EAAyBtD,EACpCoB,EACA,0ECIK,SAAiCD,GAEpCoC,EAAOpC,EAAcd,cAIvB,IAAMmD,EAAYF,EAAuB,CACvCrC,kBAAmB,SAACL,GAAQ,OAAKA,EAAS6C,aAGtCnD,EAAUa,EAAcb,QAAQT,KAAI,SAACY,GAAK,OAAAX,EAAAA,EAAA,GAC3CW,GAAK,GAAA,CACRiD,KAAM,aAGR,OAAOF,EAAS1D,EAAAA,KACXqB,GAAa,GAAA,CAChBb,QAAAA,0BClBG,SAAkCa,GAUvC,OAREoC,EAAOpC,EAAcd,cAILiD,EAAuB,CACvCrC,kBAAmB,SAACL,GAAQ,OAAKA,EAASoC,OAGrCQ,CAAUrC,mECbZ,SAELwC,GACA,OAAOhE,EAAwBtB,EAA+BsF,qCCHzD,SAELA,GACA,OAAOhE,EAAwBI,EAA6B4D"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/package.json b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/package.json new file mode 100644 index 00000000..31f8d2e3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-preset-algolia/package.json @@ -0,0 +1,43 @@ +{ + "name": "@algolia/autocomplete-preset-algolia", + "description": "Presets for building autocomplete experiences with Algolia.", + "version": "1.9.3", + "license": "MIT", + "homepage": "https://github.com/algolia/autocomplete", + "repository": "algolia/autocomplete", + "author": { + "name": "Algolia, Inc.", + "url": "https://www.algolia.com" + }, + "sideEffects": false, + "files": [ + "dist/" + ], + "source": "src/index.ts", + "types": "dist/esm/index.d.ts", + "module": "dist/esm/index.js", + "main": "dist/umd/index.production.js", + "umd:main": "dist/umd/index.production.js", + "unpkg": "dist/umd/index.production.js", + "jsdelivr": "dist/umd/index.production.js", + "scripts": { + "build:clean": "rm -rf ./dist", + "build:esm": "babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/esm --ignore '**/*/__tests__/'", + "build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm", + "build:umd": "rollup --config", + "build": "yarn build:clean && yarn build:umd && yarn build:esm && yarn build:types", + "on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"", + "prepare": "yarn build:esm && yarn build:types", + "watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\"" + }, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "devDependencies": { + "algoliasearch": "4.16.0" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.d.ts new file mode 100644 index 00000000..b4c928d9 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.d.ts @@ -0,0 +1 @@ +export declare type MaybePromise = Promise | TResolution; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/MaybePromise.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.d.ts new file mode 100644 index 00000000..2f5fa9de --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.d.ts @@ -0,0 +1,4 @@ +export declare type UserAgent = { + segment: string; + version?: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/UserAgent.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.d.ts new file mode 100644 index 00000000..08e16b24 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.d.ts @@ -0,0 +1,15 @@ +import { AutocompleteNavigator } from './AutocompleteNavigator'; +import { AutocompletePropGetters } from './AutocompletePropGetters'; +import { AutocompleteSetters } from './AutocompleteSetters'; +export declare type BaseItem = Record; +export interface AutocompleteScopeApi extends AutocompleteSetters { + /** + * Triggers a search to refresh the state. + */ + refresh(): Promise; + /** + * Functions to navigate to a URL. + */ + navigator: AutocompleteNavigator; +} +export declare type AutocompleteApi = AutocompleteScopeApi & AutocompletePropGetters; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteApi.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.d.ts new file mode 100644 index 00000000..e6c3b893 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.d.ts @@ -0,0 +1,10 @@ +import { BaseItem } from './AutocompleteApi'; +import { InternalAutocompleteSource } from './AutocompleteSource'; +export interface AutocompleteCollection { + source: InternalAutocompleteSource; + items: TItem[]; +} +export interface AutocompleteCollectionItemsArray { + source: InternalAutocompleteSource; + items: TItem[][]; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteCollection.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.d.ts new file mode 100644 index 00000000..e75149ed --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.d.ts @@ -0,0 +1,3 @@ +export interface AutocompleteContext { + [key: string]: unknown; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteContext.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.d.ts new file mode 100644 index 00000000..f1f5efd2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.d.ts @@ -0,0 +1,13 @@ +export declare type AutocompleteEnvironment = Window | { + [prop: string]: unknown; + addEventListener: Window['addEventListener']; + removeEventListener: Window['removeEventListener']; + setTimeout: Window['setTimeout']; + clearTimeout: Window['clearTimeout']; + document: Window['document']; + location: { + assign: Location['assign']; + }; + open: Window['open']; + navigator?: Partial; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteEnvironment.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.d.ts new file mode 100644 index 00000000..4a327759 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.d.ts @@ -0,0 +1,28 @@ +import { BaseItem } from './AutocompleteApi'; +import { AutocompleteState } from './AutocompleteState'; +export interface AutocompleteNavigator { + /** + * Called when a URL should be open in the current page. + */ + navigate(params: { + itemUrl: string; + item: TItem; + state: AutocompleteState; + }): void; + /** + * Called when a URL should be open in a new tab. + */ + navigateNewTab(params: { + itemUrl: string; + item: TItem; + state: AutocompleteState; + }): void; + /** + * Called when a URL should be open in a new window. + */ + navigateNewWindow(params: { + itemUrl: string; + item: TItem; + state: AutocompleteState; + }): void; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteNavigator.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.d.ts new file mode 100644 index 00000000..5a5d7607 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.d.ts @@ -0,0 +1,185 @@ +import type { MaybePromise } from '../MaybePromise'; +import { AutocompleteScopeApi, BaseItem } from './AutocompleteApi'; +import { AutocompleteEnvironment } from './AutocompleteEnvironment'; +import { AutocompleteNavigator } from './AutocompleteNavigator'; +import { AutocompletePlugin } from './AutocompletePlugin'; +import { Reshape } from './AutocompleteReshape'; +import { AutocompleteSource, InternalAutocompleteSource } from './AutocompleteSource'; +import { AutocompleteState } from './AutocompleteState'; +export interface OnSubmitParams extends AutocompleteScopeApi { + state: AutocompleteState; + event: any; +} +export declare type OnResetParams = OnSubmitParams; +export interface OnInputParams extends AutocompleteScopeApi { + query: string; + state: AutocompleteState; +} +export declare type GetSourcesParams = OnInputParams; +export declare type GetSources = (params: GetSourcesParams) => MaybePromise | boolean | undefined>>; +export declare type InternalGetSources = (params: GetSourcesParams) => Promise>>; +interface OnStateChangeProps extends AutocompleteScopeApi { + /** + * The current Autocomplete state. + */ + state: AutocompleteState; + /** + * The previous Autocomplete state. + */ + prevState: AutocompleteState; +} +export interface AutocompleteOptions { + /** + * A flag to activate the debug mode. + * + * This is useful while developing because it keeps the panel open even when the blur event occurs. **Make sure to disable it in production.** + * + * See [**Debugging**](https://www.algolia.com/doc/ui-libraries/autocomplete/guides/debugging/) for more information. + * + * @default false + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-debug + */ + debug?: boolean; + /** + * An ID for the autocomplete to create accessible attributes. + * + * It is incremented by default when creating a new Autocomplete instance. + * + * @default "autocomplete-0" + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-id + */ + id?: string; + /** + * The function called when the internal state changes. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-onstatechange + */ + onStateChange?(props: OnStateChangeProps): void; + /** + * The placeholder text to show in the search input when there's no query. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-placeholder + */ + placeholder?: string; + /** + * Whether to focus the search input or not when the page is loaded. + * + * @default false + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-autofocus + */ + autoFocus?: boolean; + /** + * The default item index to pre-select. + * + * We recommend using `0` when the autocomplete is used to open links, instead of triggering a search in an application. + * + * @default null + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-defaultactiveitemid + */ + defaultActiveItemId?: number | null; + /** + * Whether to open the panel on focus when there's no query. + * + * @default false + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-openonfocus + */ + openOnFocus?: boolean; + /** + * How many milliseconds must elapse before considering the autocomplete experience [stalled](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-status). + * + * @default 300 + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-stallthreshold + */ + stallThreshold?: number; + /** + * The initial state to apply when autocomplete is created. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-initialstate + */ + initialState?: Partial>; + /** + * The [sources](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/) to get the suggestions from. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-getsources + */ + getSources?: GetSources; + /** + * The environment in which your application is running. + * + * This is useful if you're using autocomplete in a different context than `window`. + * + * @default window + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-environment + */ + environment?: AutocompleteEnvironment; + /** + * An implementation of Autocomplete's Navigator API to redirect the user when opening a link. + * + * Learn more on the [**Navigator API**](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/keyboard-navigation/) documentation. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-navigator + */ + navigator?: Partial>; + /** + * The function called to determine whether the panel should open or not. + * + * By default, the panel opens when there are items in the state. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-shouldpanelopen + */ + shouldPanelOpen?(params: { + state: AutocompleteState; + }): boolean; + /** + * The function called when submitting the Autocomplete form. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-onsubmit + */ + onSubmit?(params: OnSubmitParams): void; + /** + * The function called when resetting the Autocomplete form. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-onreset + */ + onReset?(params: OnResetParams): void; + /** + * The plugins that encapsulate and distribute custom Autocomplete behaviors. + * + * See [**Plugins**](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/plugins/) for more information. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-plugins + */ + plugins?: Array>; + /** + * The function called to reshape the sources after they're resolved. + * + * This is useful to transform sources before rendering them. You can group sources by attribute, remove duplicates, create shared limits between sources, etc. + * + * See [**Reshaping sources**](https://www.algolia.com/doc/ui-libraries/autocomplete/guides/reshaping-sources/) for more information. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-reshape + */ + reshape?: Reshape; +} +export interface InternalAutocompleteOptions extends AutocompleteOptions { + debug: boolean; + id: string; + onStateChange(props: OnStateChangeProps): void; + placeholder: string; + autoFocus: boolean; + defaultActiveItemId: number | null; + openOnFocus: boolean; + stallThreshold: number; + initialState: AutocompleteState; + getSources: InternalGetSources; + environment: AutocompleteEnvironment; + navigator: AutocompleteNavigator; + plugins: Array>; + shouldPanelOpen(params: { + state: AutocompleteState; + }): boolean; + onSubmit(params: OnSubmitParams): void; + onReset(params: OnResetParams): void; + reshape: Reshape; +} +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteOptions.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.d.ts new file mode 100644 index 00000000..f7822f85 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.d.ts @@ -0,0 +1,43 @@ +import { AutocompleteScopeApi, BaseItem } from './AutocompleteApi'; +import { AutocompleteOptions } from './AutocompleteOptions'; +import { PluginReshape } from './AutocompleteReshape'; +import { OnSelectParams, OnActiveParams, OnResolveParams } from './AutocompleteSource'; +declare type PluginSubscriber = (params: TParams) => void; +export interface PluginSubscribeParams extends AutocompleteScopeApi { + onSelect(fn: PluginSubscriber>): void; + onActive(fn: PluginSubscriber>): void; + onResolve(fn: PluginSubscriber>): void; +} +export declare type AutocompletePlugin = Partial, 'onStateChange' | 'onSubmit' | 'onReset'> & Pick, 'getSources'>> & { + /** + * The function called when Autocomplete starts. + * + * It lets you subscribe to lifecycle hooks and interact with the instance's state and context. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/plugins/#param-subscribe + */ + subscribe?(params: PluginSubscribeParams): void; + /** + * An extra plugin object to expose properties and functions as APIs. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/plugins/#param-data + */ + data?: TData; + /** + * A name to identify the plugin. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/plugins/#param-name + */ + name?: string; + /** + * A function to reshape the sources. + * + * It gets called before the user's reshape function. + */ + reshape?: PluginReshape; + /** + * @internal + */ + __autocomplete_pluginOptions?: Record; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePlugin.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.d.ts new file mode 100644 index 00000000..7f5bb4c5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.d.ts @@ -0,0 +1,100 @@ +import { BaseItem } from './AutocompleteApi'; +import { InternalAutocompleteSource } from './AutocompleteSource'; +export interface AutocompletePropGetters { + getEnvironmentProps: GetEnvironmentProps; + getRootProps: GetRootProps; + getFormProps: GetFormProps; + getLabelProps: GetLabelProps; + getInputProps: GetInputProps; + getPanelProps: GetPanelProps; + getListProps: GetListProps; + getItemProps: GetItemProps; +} +export declare type GetEnvironmentProps = (props: { + [key: string]: unknown; + formElement: HTMLElement; + inputElement: HTMLInputElement; + panelElement: HTMLElement; +}) => { + onTouchStart(event: TouchEvent): void; + onTouchMove(event: TouchEvent): void; + onMouseDown(event: MouseEvent): void; +}; +export declare type GetRootProps = (props?: { + [key: string]: unknown; +}) => { + role: 'combobox'; + 'aria-expanded': boolean; + 'aria-haspopup': boolean | 'dialog' | 'menu' | 'true' | 'false' | 'grid' | 'listbox' | 'tree' | undefined; + 'aria-owns': string | undefined; + 'aria-labelledby': string; +}; +export declare type GetFormProps = (props: { + [key: string]: unknown; + inputElement: HTMLInputElement | null; +}) => { + action: ''; + noValidate: true; + role: 'search'; + onSubmit(event: TEvent): void; + onReset(event: TEvent): void; +}; +export declare type GetLabelProps = (props?: { + [key: string]: unknown; + sourceIndex?: number; +}) => { + htmlFor: string; + id: string; +}; +export declare type GetInputProps = (props: { + [key: string]: unknown; + inputElement: HTMLInputElement | null; + maxLength?: number; +}) => { + id: string; + value: string; + autoFocus: boolean; + placeholder: string; + autoComplete: 'on' | 'off'; + autoCorrect: 'on' | 'off'; + autoCapitalize: 'on' | 'off'; + enterKeyHint: 'go' | 'search'; + spellCheck: 'false'; + maxLength: number; + type: 'search'; + 'aria-autocomplete': 'none' | 'inline' | 'list' | 'both'; + 'aria-activedescendant': string | undefined; + 'aria-controls': string | undefined; + 'aria-labelledby': string; + onChange(event: TEvent): void; + onKeyDown(event: TKeyboardEvent): void; + onFocus(event: TEvent): void; + onBlur(): void; + onClick(event: TMouseEvent): void; +}; +export declare type GetPanelProps = (props?: { + [key: string]: unknown; +}) => { + onMouseDown(event: TMouseEvent): void; + onMouseLeave(): void; +}; +export declare type GetListProps = (props?: { + [key: string]: unknown; + sourceIndex?: number; +}) => { + role: 'listbox'; + 'aria-labelledby': string; + id: string; +}; +export declare type GetItemProps = (props: { + [key: string]: unknown; + item: TItem; + source: InternalAutocompleteSource; +}) => { + id: string; + role: 'option'; + 'aria-selected': boolean; + onMouseMove(event: TMouseEvent): void; + onMouseDown(event: TMouseEvent): void; + onClick(event: TMouseEvent): void; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompletePropGetters.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.d.ts new file mode 100644 index 00000000..4be7907d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.d.ts @@ -0,0 +1,25 @@ +import { BaseItem } from './AutocompleteApi'; +import { AutocompleteSource } from './AutocompleteSource'; +import { AutocompleteState } from './AutocompleteState'; +export declare type AutocompleteReshapeSource = AutocompleteSource & { + getItems(): TItem[]; +}; +export declare type AutocompleteReshapeSourcesBySourceId = Record>; +export declare type ReshapeParams = AutocompleteState> = { + /** + * The resolved sources provided by [`getSources`](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getsources) + */ + sources: Array>; + /** + * The resolved sources grouped by [`sourceId`](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-sourceid)s + */ + sourcesBySourceId: AutocompleteReshapeSourcesBySourceId; + /** + * The current Autocomplete state. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state + */ + state: TState; +}; +export declare type Reshape = AutocompleteState> = (params: ReshapeParams) => Array>; +export declare type PluginReshape = AutocompleteState> = (params: Omit, 'sources'>) => Omit, 'sources'>; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteReshape.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.d.ts new file mode 100644 index 00000000..ecd9c148 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.d.ts @@ -0,0 +1,46 @@ +import { BaseItem } from './AutocompleteApi'; +import { AutocompleteCollection, AutocompleteCollectionItemsArray } from './AutocompleteCollection'; +import { AutocompleteState } from './AutocompleteState'; +export declare type StateUpdater = (value: TState) => void; +export interface AutocompleteSetters { + /** + * Sets the highlighted item index. + * + * Pass `null` to unselect items. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setactiveitemid + */ + setActiveItemId: StateUpdater['activeItemId']>; + /** + * Sets the query. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setquery + */ + setQuery: StateUpdater['query']>; + /** + * Sets the collections. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setcollections + */ + setCollections: StateUpdater | AutocompleteCollectionItemsArray>>; + /** + * Sets whether the panel is open or not. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setisopen + */ + setIsOpen: StateUpdater['isOpen']>; + /** + * Sets the status of the autocomplete. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setisopen + */ + setStatus: StateUpdater['status']>; + /** + * Sets the context passed to lifecycle hooks. + * + * See more in [**Context**](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/context/). + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-setcontext + */ + setContext: StateUpdater['context']>; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSetters.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.d.ts new file mode 100644 index 00000000..d6e0b69d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.d.ts @@ -0,0 +1,76 @@ +import type { FacetHit, Hit } from '@algolia/client-search'; +import type { MaybePromise } from '../MaybePromise'; +import type { SearchForFacetValuesResponse, SearchResponse } from '../preset-algolia/algoliasearch'; +import type { RequesterDescription } from '../preset-algolia/createRequester'; +import { AutocompleteScopeApi, BaseItem } from './AutocompleteApi'; +import { GetSourcesParams } from './AutocompleteOptions'; +import { AutocompleteState } from './AutocompleteState'; +export interface OnSelectParams extends AutocompleteScopeApi { + state: AutocompleteState; + event: any; + item: TItem; + itemInputValue: ReturnType['getItemInputValue']>; + itemUrl: ReturnType['getItemUrl']>; + source: InternalAutocompleteSource; +} +export declare type OnActiveParams = OnSelectParams; +export declare type OnResolveParams = { + source: AutocompleteSource; + results: SearchForFacetValuesResponse | SearchResponse | TItem[] | TItem[][]; + items: FacetHit[][] | FacetHit[] | Array> | Array | TItem[] | TItem[][]>; + state: AutocompleteState; +}; +declare type DefaultIndicator = { + /** + * Optional key on a function to indicate it's the default value of this function. + */ + __default?: boolean; +}; +export interface AutocompleteSource { + /** + * Unique identifier for the source. + */ + sourceId: string; + /** + * The function called to get the value of an item. + * + * The value is used to fill the search box. + */ + getItemInputValue?: DefaultIndicator & (({ item, state, }: { + item: TItem; + state: AutocompleteState; + }) => string); + /** + * The function called to get the URL of the item. + * + * The value is used to add [keyboard accessibility](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/keyboard-navigation/) features to let users open items in the current tab, a new tab, or a new window. + */ + getItemUrl?: DefaultIndicator & (({ item, state, }: { + item: TItem; + state: AutocompleteState; + }) => string | undefined); + /** + * The function called when the input changes. + * + * You can use this function to filter the items based on the query. + */ + getItems(params: GetSourcesParams): MaybePromise>; + /** + * The function called whenever an item is selected. + */ + onSelect?: DefaultIndicator & ((params: OnSelectParams) => void); + /** + * The function called whenever an item is active. + * + * You can trigger different behaviors if the item is active depending on the triggering event using the `event` parameter. + */ + onActive?: DefaultIndicator & ((params: OnActiveParams) => void); + /** + * The function called whenever a source resolves. + */ + onResolve?: DefaultIndicator & ((params: OnResolveParams) => void); +} +export declare type InternalAutocompleteSource = { + [KParam in keyof AutocompleteSource]-?: AutocompleteSource[KParam]; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteSource.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.d.ts new file mode 100644 index 00000000..4654b000 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.d.ts @@ -0,0 +1,12 @@ +import { BaseItem } from './AutocompleteApi'; +import { AutocompleteCollection } from './AutocompleteCollection'; +import { AutocompleteContext } from './AutocompleteContext'; +export interface AutocompleteState { + activeItemId: number | null; + query: string; + completion: string | null; + collections: Array>; + isOpen: boolean; + status: 'idle' | 'loading' | 'stalled' | 'error'; + context: AutocompleteContext; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/AutocompleteState.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.d.ts new file mode 100644 index 00000000..a25eed74 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.d.ts @@ -0,0 +1,11 @@ +export * from './AutocompleteApi'; +export * from './AutocompleteCollection'; +export * from './AutocompleteContext'; +export * from './AutocompleteEnvironment'; +export * from './AutocompleteOptions'; +export * from './AutocompleteSource'; +export * from './AutocompletePropGetters'; +export * from './AutocompletePlugin'; +export * from './AutocompleteReshape'; +export * from './AutocompleteSetters'; +export * from './AutocompleteState'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.js new file mode 100644 index 00000000..a8667beb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/core/index.js @@ -0,0 +1,11 @@ +export * from './AutocompleteApi'; +export * from './AutocompleteCollection'; +export * from './AutocompleteContext'; +export * from './AutocompleteEnvironment'; +export * from './AutocompleteOptions'; +export * from './AutocompleteSource'; +export * from './AutocompletePropGetters'; +export * from './AutocompletePlugin'; +export * from './AutocompleteReshape'; +export * from './AutocompleteSetters'; +export * from './AutocompleteState'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.d.ts new file mode 100644 index 00000000..feeb1686 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.d.ts @@ -0,0 +1,3 @@ +export declare function createRef(initialValue: TValue): { + current: TValue; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js new file mode 100644 index 00000000..c8f0f3f5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js @@ -0,0 +1,5 @@ +export function createRef(initialValue) { + return { + current: initialValue + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.d.ts new file mode 100644 index 00000000..c6440aee --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.d.ts @@ -0,0 +1 @@ +export declare function debounce(fn: (...params: TParams[]) => void, time: number): (...args: TParams[]) => void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js new file mode 100644 index 00000000..5940ffb7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js @@ -0,0 +1,14 @@ +export function debounce(fn, time) { + var timerId = undefined; + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (timerId) { + clearTimeout(timerId); + } + timerId = setTimeout(function () { + return fn.apply(void 0, args); + }, time); + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.d.ts new file mode 100644 index 00000000..df6b1d9b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.d.ts @@ -0,0 +1,5 @@ +/** + * Decycles objects with circular references. + * This is used to print cyclic structures in development environment only. + */ +export declare function decycle(obj: any, seen?: Set): any; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.js new file mode 100644 index 00000000..8b6b839a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/decycle.js @@ -0,0 +1,32 @@ +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +/** + * Decycles objects with circular references. + * This is used to print cyclic structures in development environment only. + */ +export function decycle(obj) { + var seen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set(); + if (!(process.env.NODE_ENV !== 'production') || !obj || _typeof(obj) !== 'object') { + return obj; + } + if (seen.has(obj)) { + return '[Circular]'; + } + var newSeen = seen.add(obj); + if (Array.isArray(obj)) { + return obj.map(function (x) { + return decycle(x, newSeen); + }); + } + return Object.fromEntries(Object.entries(obj).map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + key = _ref2[0], + value = _ref2[1]; + return [key, decycle(value, newSeen)]; + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.d.ts new file mode 100644 index 00000000..931dbf54 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.d.ts @@ -0,0 +1 @@ +export declare function flatten(values: Array): TType[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js new file mode 100644 index 00000000..d088bb2e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js @@ -0,0 +1,5 @@ +export function flatten(values) { + return values.reduce(function (a, b) { + return a.concat(b); + }, []); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.d.ts new file mode 100644 index 00000000..f7aa41aa --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.d.ts @@ -0,0 +1 @@ +export declare function generateAutocompleteId(): string; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js new file mode 100644 index 00000000..2e1353bf --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js @@ -0,0 +1,4 @@ +var autocompleteId = 0; +export function generateAutocompleteId() { + return "autocomplete-".concat(autocompleteId++); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.d.ts new file mode 100644 index 00000000..49c4621c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.d.ts @@ -0,0 +1 @@ +export declare function getAttributeValueByPath(record: TRecord, path: string[]): any; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.js new file mode 100644 index 00000000..851dc1fb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.js @@ -0,0 +1,5 @@ +export function getAttributeValueByPath(record, path) { + return path.reduce(function (current, key) { + return current && current[key]; + }, record); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.d.ts new file mode 100644 index 00000000..342a839f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.d.ts @@ -0,0 +1,3 @@ +export declare function getItemsCount(state: TAutocompleteState): number; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js new file mode 100644 index 00000000..f7b461aa --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js @@ -0,0 +1,8 @@ +export function getItemsCount(state) { + if (state.collections.length === 0) { + return 0; + } + return state.collections.reduce(function (sum, collection) { + return sum + collection.items.length; + }, 0); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.d.ts new file mode 100644 index 00000000..22d8f268 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.d.ts @@ -0,0 +1,17 @@ +export * from './createRef'; +export * from './debounce'; +export * from './decycle'; +export * from './flatten'; +export * from './generateAutocompleteId'; +export * from './getAttributeValueByPath'; +export * from './getItemsCount'; +export * from './invariant'; +export * from './isEqual'; +export * from './MaybePromise'; +export * from './noop'; +export * from './safelyRunOnBrowser'; +export * from './UserAgent'; +export * from './userAgents'; +export * from './version'; +export * from './warn'; +export * from './js'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.js new file mode 100644 index 00000000..6bd46156 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/index.js @@ -0,0 +1,17 @@ +export * from './createRef'; +export * from './debounce'; +export * from './decycle'; +export * from './flatten'; +export * from './generateAutocompleteId'; +export * from './getAttributeValueByPath'; +export * from './getItemsCount'; +export * from './invariant'; +export * from './isEqual'; +export * from './MaybePromise'; +export * from './noop'; +export * from './safelyRunOnBrowser'; +export * from './UserAgent'; +export * from './userAgents'; +export * from './version'; +export * from './warn'; +export * from './js'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.d.ts new file mode 100644 index 00000000..4ef4fe64 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.d.ts @@ -0,0 +1,6 @@ +/** + * Throws an error if the condition is not met in development mode. + * This is used to make development a better experience to provide guidance as + * to where the error comes from. + */ +export declare function invariant(condition: boolean, message: string | (() => string)): void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js new file mode 100644 index 00000000..c97f5133 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/invariant.js @@ -0,0 +1,13 @@ +/** + * Throws an error if the condition is not met in development mode. + * This is used to make development a better experience to provide guidance as + * to where the error comes from. + */ +export function invariant(condition, message) { + if (!(process.env.NODE_ENV !== 'production')) { + return; + } + if (!condition) { + throw new Error("[Autocomplete] ".concat(typeof message === 'function' ? message() : message)); + } +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.d.ts new file mode 100644 index 00000000..97001259 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.d.ts @@ -0,0 +1 @@ +export declare function isEqual(first: any, second: any): boolean; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js new file mode 100644 index 00000000..71935081 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js @@ -0,0 +1,24 @@ +function isPrimitive(obj) { + return obj !== Object(obj); +} +export function isEqual(first, second) { + if (first === second) { + return true; + } + if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') { + return first === second; + } + if (Object.keys(first).length !== Object.keys(second).length) { + return false; + } + for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + if (!(key in second)) { + return false; + } + if (!isEqual(first[key], second[key])) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.d.ts new file mode 100644 index 00000000..3798dee3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.d.ts @@ -0,0 +1,28 @@ +export declare type AutocompleteClassNames = { + detachedCancelButton: string; + detachedFormContainer: string; + detachedContainer: string; + detachedOverlay: string; + detachedSearchButton: string; + detachedSearchButtonIcon: string; + detachedSearchButtonPlaceholder: string; + detachedSearchButtonQuery: string; + form: string; + input: string; + inputWrapper: string; + inputWrapperPrefix: string; + inputWrapperSuffix: string; + item: string; + label: string; + list: string; + loadingIndicator: string; + panel: string; + panelLayout: string; + clearButton: string; + root: string; + source: string; + sourceFooter: string; + sourceHeader: string; + sourceNoResults: string; + submitButton: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteClassNames.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.d.ts new file mode 100644 index 00000000..ef6833ce --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.d.ts @@ -0,0 +1,6 @@ +import { BaseItem } from '../core'; +import { InternalAutocompleteSource } from './AutocompleteSource'; +export interface AutocompleteCollection { + source: InternalAutocompleteSource; + items: TItem[]; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteCollection.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.d.ts new file mode 100644 index 00000000..c2338070 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.d.ts @@ -0,0 +1,23 @@ +/// +import { HighlightHitParams } from './HighlightHitParams'; +declare type AutocompleteHighlightComponent = ({ hit, attribute, tagName, }: HighlightHitParams) => JSX.Element; +export declare type PublicAutocompleteComponents = Record JSX.Element>; +export interface AutocompleteComponents extends PublicAutocompleteComponents { + /** + * Highlight matches in an Algolia hit. + */ + Highlight: AutocompleteHighlightComponent; + /** + * Reverse-highlight matches in an Algolia hit. + */ + ReverseHighlight: AutocompleteHighlightComponent; + /** + * Reverse-highlight and snippets matches in an Algolia hit. + */ + ReverseSnippet: AutocompleteHighlightComponent; + /** + * Highlight and snippet matches in an Algolia hit. + */ + Snippet: AutocompleteHighlightComponent; +} +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteComponents.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.d.ts new file mode 100644 index 00000000..61a3cebf --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.d.ts @@ -0,0 +1,106 @@ +import { AutocompleteScopeApi, AutocompleteOptions as AutocompleteCoreOptions, BaseItem, GetSourcesParams } from '../core'; +import { MaybePromise } from '../MaybePromise'; +import { AutocompleteClassNames } from './AutocompleteClassNames'; +import { PublicAutocompleteComponents } from './AutocompleteComponents'; +import { AutocompletePlugin } from './AutocompletePlugin'; +import { AutocompletePropGetters } from './AutocompletePropGetters'; +import { AutocompleteRender } from './AutocompleteRender'; +import { AutocompleteRenderer } from './AutocompleteRenderer'; +import { AutocompleteSource } from './AutocompleteSource'; +import { AutocompleteState } from './AutocompleteState'; +import { AutocompleteTranslations } from './AutocompleteTranslations'; +export interface OnStateChangeProps extends AutocompleteScopeApi { + /** + * The current Autocomplete state. + */ + state: AutocompleteState; + /** + * The previous Autocomplete state. + */ + prevState: AutocompleteState; +} +export declare type GetSources = (params: GetSourcesParams) => MaybePromise | boolean | undefined>>; +export interface AutocompleteOptions extends AutocompleteCoreOptions, Partial> { + /** + * The container for the Autocomplete search box. + * + * You can either pass a [CSS selector](https://developer.mozilla.org/docs/Web/CSS/CSS_Selectors) or an [Element](https://developer.mozilla.org/docs/Web/API/HTMLElement). If there are several containers matching the selector, Autocomplete picks up the first one. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-container + */ + container: string | HTMLElement; + /** + * The container for the Autocomplete panel. + * + * You can either pass a [CSS selector](https://developer.mozilla.org/docs/Web/CSS/CSS_Selectors) or an [Element](https://developer.mozilla.org/docs/Web/API/HTMLElement). If there are several containers matching the selector, Autocomplete picks up the first one. + * + * @default document.body + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-panelcontainer + */ + panelContainer?: string | HTMLElement; + /** + * The Media Query to turn Autocomplete into a detached experience. + * + * @default "(max-width: 680px)" + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-detachedmediaquery + * @link https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries + */ + detachedMediaQuery?: string; + getSources?: GetSources; + /** + * The panel's horizontal position. + * + * @default "input-wrapper-width" + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-panelplacement + */ + panelPlacement?: 'start' | 'end' | 'full-width' | 'input-wrapper-width'; + /** + * Class names to inject for each created DOM element. + * + * This is useful to style your autocomplete with external CSS frameworks. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-classnames + */ + classNames?: Partial; + /** + * The function that renders the autocomplete panel. + * + * This is useful to customize the rendering, for example, using multi-row or multi-column layouts. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-render + */ + render?: AutocompleteRender; + /** + * The function that renders a no results section when there are no hits. + * + * This is useful to let the user know that the query returned no results. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-rendernoresults + */ + renderNoResults?: AutocompleteRender; + initialState?: Partial>; + onStateChange?(props: OnStateChangeProps): void; + /** + * The virtual DOM implementation to plug to Autocomplete. It defaults to Preact. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-renderer + */ + renderer?: AutocompleteRenderer; + plugins?: Array>; + /** + * Components to register in the Autocomplete rendering lifecycles. + * + * Registered components become available in [`templates`](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/templates/), [`render`](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-render), and in [`renderNoResults`](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-rendernoresults). + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-components + */ + components?: PublicAutocompleteComponents; + /** + * A mapping of translation strings. + * + * Defaults to English values. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-translations + */ + translations?: Partial; +} diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteOptions.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.d.ts new file mode 100644 index 00000000..86296711 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.d.ts @@ -0,0 +1,13 @@ +import { BaseItem } from '../core'; +import { AutocompletePlugin as AutocompleteCorePlugin } from '../core/AutocompletePlugin'; +import { AutocompleteOptions } from './AutocompleteOptions'; +export declare type AutocompletePlugin = Omit, 'getSources'> & { + /** + * The [sources](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/) to get the suggestions from. + * + * When defined, they’re merged with the sources of your Autocomplete instance. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/plugins/#param-getsources + */ + getSources?: AutocompleteOptions['getSources']; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePlugin.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.d.ts new file mode 100644 index 00000000..a0f451f3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.d.ts @@ -0,0 +1,33 @@ +import { BaseItem, AutocompleteApi as AutocompleteCoreApi, AutocompleteScopeApi } from '../core'; +import { AutocompleteState } from './AutocompleteState'; +declare type PropsGetterParams = TParam & { + state: AutocompleteState; +} & AutocompleteScopeApi; +export declare type AutocompletePropGetters = { + getEnvironmentProps(params: PropsGetterParams['getEnvironmentProps']>; + }>): ReturnType['getEnvironmentProps']>; + getFormProps(params: PropsGetterParams['getFormProps']>; + }>): ReturnType['getFormProps']>; + getInputProps(params: PropsGetterParams['getInputProps']>; + inputElement: HTMLInputElement; + }>): ReturnType['getInputProps']>; + getItemProps(params: PropsGetterParams['getItemProps']>; + }>): ReturnType['getItemProps']>; + getLabelProps(params: PropsGetterParams['getLabelProps']>; + }>): ReturnType['getLabelProps']>; + getListProps(params: PropsGetterParams['getListProps']>; + }>): ReturnType['getListProps']>; + getPanelProps(params: PropsGetterParams['getPanelProps']>; + }>): ReturnType['getPanelProps']>; + getRootProps(params: PropsGetterParams['getRootProps']>; + }>): ReturnType['getRootProps']>; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompletePropGetters.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.d.ts new file mode 100644 index 00000000..e6bb0732 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.d.ts @@ -0,0 +1,15 @@ +import { AutocompleteScopeApi, BaseItem } from '../core'; +import { AutocompleteComponents } from './AutocompleteComponents'; +import { HTMLTemplate, Pragma, PragmaFrag, Render, VNode } from './AutocompleteRenderer'; +import { AutocompleteState } from './AutocompleteState'; +export declare type AutocompleteRender = (params: AutocompleteScopeApi & { + children: VNode; + state: AutocompleteState; + sections: VNode[]; + elements: Record; + components: AutocompleteComponents; + createElement: Pragma; + Fragment: PragmaFrag; + html: HTMLTemplate; + render: Render; +}, root: HTMLElement) => void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRender.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.d.ts new file mode 100644 index 00000000..3ca05d5a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.d.ts @@ -0,0 +1,33 @@ +/// +export declare type Pragma = (type: any, props: Record | null, ...children: ComponentChildren[]) => JSX.Element; +export declare type PragmaFrag = any; +declare type ComponentChild = VNode | string | number | boolean | null | undefined; +declare type ComponentChildren = ComponentChild[] | ComponentChild; +export declare type VNode = { + type: any; + key: string | number | any; + props: TProps & { + children: ComponentChildren; + }; +}; +export declare type Render = (vnode: ComponentChild, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text | undefined) => void; +export declare type AutocompleteRenderer = { + /** + * The function to create virtual nodes. + * + * @default preact.createElement + */ + createElement: Pragma; + /** + * The component to use to create fragments. + * + * @default preact.Fragment + */ + Fragment: PragmaFrag; + /** + * The function to render children to an element. + */ + render?: Render; +}; +export declare type HTMLTemplate = (strings: TemplateStringsArray, ...values: any[]) => VNode | VNode[]; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteRenderer.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.d.ts new file mode 100644 index 00000000..de10a5eb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.d.ts @@ -0,0 +1,74 @@ +import { AutocompleteSource as AutocompleteCoreSource, InternalAutocompleteSource as InternalAutocompleteCoreSource, BaseItem } from '../core'; +import { AutocompleteComponents } from './AutocompleteComponents'; +import { AutocompleteRenderer, HTMLTemplate, VNode } from './AutocompleteRenderer'; +import { AutocompleteState } from './AutocompleteState'; +declare type Template = (params: TParams & AutocompleteRenderer & { + components: AutocompleteComponents; + html: HTMLTemplate; +}) => VNode | VNode[] | string; +/** + * Templates to display in the autocomplete panel. + * + * A template can either return a string, or perform DOM mutations (manipulating DOM elements with JavaScript and attaching events) without returning a string. + */ +export declare type SourceTemplates = { + /** + * A function that returns the template for each item of the source. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/templates/#param-item + */ + item: Template<{ + item: TItem; + state: AutocompleteState; + }>; + /** + * A function that returns the template for the header (before the list of items). + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/templates/#param-header + */ + header?: Template<{ + state: AutocompleteState; + source: AutocompleteSource; + items: TItem[]; + }>; + /** + * A function that returns the template for the footer (after the list of items). + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/templates/#param-footer + */ + footer?: Template<{ + state: AutocompleteState; + source: AutocompleteSource; + items: TItem[]; + }>; + /** + * A function that returns the template for when there are no items. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/templates/#param-noresults + */ + noResults?: Template<{ + state: AutocompleteState; + source: AutocompleteSource; + }>; +}; +declare type WithTemplates = TType & { + /** + * A set of templates to customize how sections and their items are displayed. + * + * See [**Displaying items with Templates**](templates) for more information. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-templates + */ + templates: SourceTemplates; +}; +export interface AutocompleteCoreSourceWithDocs extends AutocompleteCoreSource { + /** + * Unique identifier for the source. + * + * It is used as value for the `data-autocomplete-source-id` attribute of the source `section` container. + */ + sourceId: string; +} +export declare type AutocompleteSource = WithTemplates, TItem>; +export declare type InternalAutocompleteSource = WithTemplates, TItem>; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteSource.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.d.ts new file mode 100644 index 00000000..c5e6eb3a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.d.ts @@ -0,0 +1,10 @@ +import { AutocompleteState as AutocompleteCoreState, BaseItem } from '../core'; +import { AutocompleteCollection } from './AutocompleteCollection'; +export declare type AutocompleteState = Omit, 'collections'> & { + /** + * The collections of items. + * + * @link https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/state/#param-collections + */ + collections: Array>; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteState.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.d.ts new file mode 100644 index 00000000..4238a484 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.d.ts @@ -0,0 +1,5 @@ +export declare type AutocompleteTranslations = { + detachedCancelButtonText: string; + clearButtonTitle: string; + submitButtonTitle: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/AutocompleteTranslations.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.d.ts new file mode 100644 index 00000000..b81ec320 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.d.ts @@ -0,0 +1,18 @@ +export declare type HighlightHitParams = { + /** + * The Algolia hit whose attribute to retrieve the highlighted parts from. + */ + hit: THit; + /** + * The attribute to retrieve the highlighted parts from. + * + * You can use the array syntax to reference nested attributes. + */ + attribute: keyof THit | string[]; + /** + * The tag name to use for highlighted parts. + * + * @default "mark" + */ + tagName?: string; +}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/HighlightHitParams.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.d.ts new file mode 100644 index 00000000..c84c13b2 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.d.ts @@ -0,0 +1,12 @@ +export * from './AutocompleteClassNames'; +export * from './AutocompleteCollection'; +export * from './AutocompleteComponents'; +export * from './AutocompleteOptions'; +export * from './AutocompletePlugin'; +export * from './AutocompletePropGetters'; +export * from './AutocompleteRender'; +export * from './AutocompleteRenderer'; +export * from './AutocompleteSource'; +export * from './AutocompleteState'; +export * from './AutocompleteTranslations'; +export * from './HighlightHitParams'; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.js new file mode 100644 index 00000000..5bbbe432 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/js/index.js @@ -0,0 +1,12 @@ +export * from './AutocompleteClassNames'; +export * from './AutocompleteCollection'; +export * from './AutocompleteComponents'; +export * from './AutocompleteOptions'; +export * from './AutocompletePlugin'; +export * from './AutocompletePropGetters'; +export * from './AutocompleteRender'; +export * from './AutocompleteRenderer'; +export * from './AutocompleteSource'; +export * from './AutocompleteState'; +export * from './AutocompleteTranslations'; +export * from './HighlightHitParams'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.d.ts new file mode 100644 index 00000000..27abd08d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.d.ts @@ -0,0 +1 @@ +export declare const noop: () => void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.js new file mode 100644 index 00000000..9ef70ae8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/noop.js @@ -0,0 +1 @@ +export var noop = function noop() {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.d.ts new file mode 100644 index 00000000..ad0bcde8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.d.ts @@ -0,0 +1,54 @@ +import * as ClientSearch from '@algolia/client-search'; +import type * as AlgoliaSearch from 'algoliasearch/lite'; +declare type AnyToUnknown = (any extends TSubject ? true : false) extends true ? unknown : TSubject; +declare type SearchClientShape = { + search: unknown; +}; +declare type ClientLiteV5 = AnyToUnknown< +/** @ts-ignore */ +ReturnType>; +declare type ClientSearchV5 = AnyToUnknown< +/** @ts-ignore */ +ReturnType>; +declare type ClientV5 = ClientLiteV5 extends SearchClientShape ? ClientLiteV5 : ClientSearchV5 extends SearchClientShape ? ClientSearchV5 : unknown; +declare type PickForClient = ClientV5 extends SearchClientShape ? TMapping['v5'] : TMapping['v4']; +export declare type SearchClient = PickForClient<{ + /** @ts-ignore */ + v4: AlgoliaSearch.SearchClient; + /** @ts-ignore */ + v5: ClientV5; +}>; +export declare type MultipleQueriesQuery = PickForClient<{ + /** @ts-ignore */ + v4: ClientSearch.MultipleQueriesQuery; + /** @ts-ignore */ + v5: AlgoliaSearch.LegacySearchMethodProps[number]; +}>; +export declare type SearchForFacetValuesResponse = PickForClient<{ + /** @ts-ignore */ + v4: ClientSearch.SearchForFacetValuesResponse; + /** @ts-ignore */ + v5: AlgoliaSearch.SearchForFacetValuesResponse; +}>; +export declare type SearchResponse = PickForClient<{ + /** @ts-ignore */ + v4: ClientSearch.SearchResponse; + /** @ts-ignore */ + v5: AlgoliaSearch.SearchResponse; +}>; +export declare type HighlightResult = PickForClient<{ + /** @ts-ignore */ + v4: ClientSearch.HighlightResult; + /** @ts-ignore */ + v5: AlgoliaSearch.HighlightResult; +}>; +export declare type SnippetResult = PickForClient<{ + /** @ts-ignore */ + v4: ClientSearch.SnippetResult; + /** @ts-ignore */ + v5: AlgoliaSearch.SnippetResult; +}>; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.d.ts new file mode 100644 index 00000000..37533e90 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.d.ts @@ -0,0 +1,89 @@ +import { UserAgent } from '../UserAgent'; +import { MultipleQueriesQuery, SearchClient, SearchForFacetValuesResponse, SearchResponse } from './algoliasearch'; +export interface SearchParams { + /** + * The initialized Algolia search client. + */ + searchClient: SearchClient; + /** + * A list of queries to execute. + */ + queries: MultipleQueriesQuery[]; + /** + * A list of user agents to add to the search client. + * + * This is useful to track usage of an integration. + */ + userAgents?: UserAgent[]; +} +export declare type Fetcher = ({ searchClient, queries, userAgents, }: SearchParams) => Promise>>; +declare type FacetHit = { + label: string; + count: number; + _highlightResult: { + label: { + value: string; + }; + }; +}; +export declare type FetcherParams = Pick[0], 'searchClient' | 'queries'>; +export declare type RequesterParams = { + transformResponse(response: TransformResponseParams): TransformedRequesterResponse; +}; +declare type TransformResponseParams = { + results: Array | SearchForFacetValuesResponse>; + hits: Array['hits']>; + facetHits: FacetHit[][]; +}; +export declare type TransformedRequesterResponse = Array['hits']> | SearchResponse['hits'] | FacetHit[][] | FacetHit[]; +export declare type TransformResponse = (response: TransformResponseParams) => TransformedRequesterResponse; +declare type FetcherParamsQuery = { + query: MultipleQueriesQuery; + sourceId: string; + transformResponse: TransformResponse; +}; +export declare type ExecuteParams = { + searchClient: SearchClient; + requests: Array>; +}; +export declare type Execute = (params: ExecuteParams) => Promise>; +export declare type ExecuteResponse = Array<{ + items: SearchResponse | SearchForFacetValuesResponse; + sourceId: string; + transformResponse: TransformResponse; +}>; +export declare type RequestParams = FetcherParams & { + /** + * The function to transform the Algolia response before passing it to the Autocomplete state. You have access to the full Algolia results, as well as the pre-computed hits and facet hits. + * + * This is useful to manipulate the hits, or store data from the results in the [context](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/context/). + */ + transformResponse?: TransformResponse; +}; +export declare type RequesterDescription = { + /** + * The search client used for this request. Multiple queries with the same client are batched (if `requesterId` is also the same). + */ + searchClient: SearchClient; + /** + * Identifies requesters to confirm their queries should be batched. + * This ensures that requesters with the same client but different + * post-processing functions don't get batched. + * When falsy, batching is disabled. + * For example, the Algolia requesters use "algolia". + */ + requesterId?: string; + /** + * The search parameters used for this query. + */ + queries: MultipleQueriesQuery[]; + /** + * Transforms the response of this search before returning it to the caller. + */ + transformResponse: TransformResponse; + /** + * Post-processing function for multi-queries. + */ + execute: Execute; +}; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.d.ts new file mode 100644 index 00000000..6fd91842 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.d.ts @@ -0,0 +1,8 @@ +declare type BrowserCallback = (params: { + window: typeof window; +}) => TReturn; +/** + * Safely runs code meant for browser environments only. + */ +export declare function safelyRunOnBrowser(callback: BrowserCallback): TReturn | undefined; +export {}; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js new file mode 100644 index 00000000..f703136c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js @@ -0,0 +1,11 @@ +/** + * Safely runs code meant for browser environments only. + */ +export function safelyRunOnBrowser(callback) { + if (typeof window !== 'undefined') { + return callback({ + window: window + }); + } + return undefined; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.d.ts new file mode 100644 index 00000000..7a20313e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.d.ts @@ -0,0 +1,4 @@ +export declare const userAgents: { + segment: string; + version: string; +}[]; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js new file mode 100644 index 00000000..3744a3dc --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js @@ -0,0 +1,5 @@ +import { version } from './version'; +export var userAgents = [{ + segment: 'autocomplete-core', + version: version +}]; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.d.ts new file mode 100644 index 00000000..2441c234 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.d.ts @@ -0,0 +1 @@ +export declare const version = "1.9.3"; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.js new file mode 100644 index 00000000..7c3389a3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/version.js @@ -0,0 +1 @@ +export var version = '1.9.3'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.d.ts b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.d.ts new file mode 100644 index 00000000..5807f750 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.d.ts @@ -0,0 +1,8 @@ +export declare const warnCache: { + current: {}; +}; +/** + * Logs a warning if the condition is not met. + * This is used to log issues in development environment only. + */ +export declare function warn(condition: boolean, message: string): void; diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.js b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.js new file mode 100644 index 00000000..9e3335d4 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/dist/esm/warn.js @@ -0,0 +1,24 @@ +export var warnCache = { + current: {} +}; + +/** + * Logs a warning if the condition is not met. + * This is used to log issues in development environment only. + */ +export function warn(condition, message) { + if (!(process.env.NODE_ENV !== 'production')) { + return; + } + if (condition) { + return; + } + var sanitizedMessage = message.trim(); + var hasAlreadyPrinted = warnCache.current[sanitizedMessage]; + if (!hasAlreadyPrinted) { + warnCache.current[sanitizedMessage] = true; + + // eslint-disable-next-line no-console + console.warn("[Autocomplete] ".concat(sanitizedMessage)); + } +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@algolia/autocomplete-shared/package.json b/paperai-docs/node_modules/@algolia/autocomplete-shared/package.json new file mode 100644 index 00000000..73d67500 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/autocomplete-shared/package.json @@ -0,0 +1,37 @@ +{ + "name": "@algolia/autocomplete-shared", + "description": "Shared utils for Autocomplete packages.", + "version": "1.9.3", + "license": "MIT", + "homepage": "https://github.com/algolia/autocomplete", + "repository": "algolia/autocomplete", + "author": { + "name": "Algolia, Inc.", + "url": "https://www.algolia.com" + }, + "source": "src/index.ts", + "types": "dist/esm/index.d.ts", + "module": "dist/esm/index.js", + "main": "dist/esm/index.js", + "sideEffects": false, + "files": [ + "dist/" + ], + "scripts": { + "build:clean": "rm -rf ./dist", + "build:esm": "babel src --root-mode upward --extensions '.ts,.tsx' --out-dir dist/esm --ignore '**/*/__tests__/'", + "build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm", + "build": "yarn build:clean && yarn build:esm && yarn build:types", + "on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"", + "prepare": "yarn build:esm && yarn build:types", + "watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\"" + }, + "devDependencies": { + "@algolia/client-search": "4.16.0", + "algoliasearch": "4.16.0" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } +} diff --git a/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.cjs.js b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.cjs.js new file mode 100644 index 00000000..9179f65a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.cjs.js @@ -0,0 +1,83 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function createBrowserLocalStorageCache(options) { + const namespaceKey = `algoliasearch-client-js-${options.key}`; + // eslint-disable-next-line functional/no-let + let storage; + const getStorage = () => { + if (storage === undefined) { + storage = options.localStorage || window.localStorage; + } + return storage; + }; + const getNamespace = () => { + return JSON.parse(getStorage().getItem(namespaceKey) || '{}'); + }; + const setNamespace = (namespace) => { + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + }; + const removeOutdatedCacheItems = () => { + const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null; + const namespace = getNamespace(); + const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => { + return cacheItem.timestamp !== undefined; + })); + setNamespace(filteredNamespaceWithoutOldFormattedCacheItems); + if (!timeToLive) + return; + const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => { + const currentTimestamp = new Date().getTime(); + const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp; + return !isExpired; + })); + setNamespace(filteredNamespaceWithoutExpiredItems); + }; + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + return Promise.resolve() + .then(() => { + removeOutdatedCacheItems(); + const keyAsString = JSON.stringify(key); + return getNamespace()[keyAsString]; + }) + .then(value => { + return Promise.all([value ? value.value : defaultValue(), value !== undefined]); + }) + .then(([value, exists]) => { + return Promise.all([value, exists || events.miss(value)]); + }) + .then(([value]) => value); + }, + set(key, value) { + return Promise.resolve().then(() => { + const namespace = getNamespace(); + // eslint-disable-next-line functional/immutable-data + namespace[JSON.stringify(key)] = { + timestamp: new Date().getTime(), + value, + }; + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + return value; + }); + }, + delete(key) { + return Promise.resolve().then(() => { + const namespace = getNamespace(); + // eslint-disable-next-line functional/immutable-data + delete namespace[JSON.stringify(key)]; + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + }); + }, + clear() { + return Promise.resolve().then(() => { + getStorage().removeItem(namespaceKey); + }); + }, + }; +} + +exports.createBrowserLocalStorageCache = createBrowserLocalStorageCache; diff --git a/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.d.ts b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.d.ts new file mode 100644 index 00000000..af91e590 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.d.ts @@ -0,0 +1,31 @@ +import { Cache } from '@algolia/cache-common'; + +export declare type BrowserLocalStorageCacheItem = { + /** + * The cache item creation timestamp. + */ + readonly timestamp: number; + /** + * The cache item value + */ + readonly value: any; +}; + +export declare type BrowserLocalStorageOptions = { + /** + * The cache key. + */ + readonly key: string; + /** + * The time to live for each cached item in seconds. + */ + readonly timeToLive?: number; + /** + * The native local storage implementation. + */ + readonly localStorage?: Storage; +}; + +export declare function createBrowserLocalStorageCache(options: BrowserLocalStorageOptions): Cache; + +export { } diff --git a/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.esm.js b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.esm.js new file mode 100644 index 00000000..f9416ba4 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/dist/cache-browser-local-storage.esm.js @@ -0,0 +1,79 @@ +function createBrowserLocalStorageCache(options) { + const namespaceKey = `algoliasearch-client-js-${options.key}`; + // eslint-disable-next-line functional/no-let + let storage; + const getStorage = () => { + if (storage === undefined) { + storage = options.localStorage || window.localStorage; + } + return storage; + }; + const getNamespace = () => { + return JSON.parse(getStorage().getItem(namespaceKey) || '{}'); + }; + const setNamespace = (namespace) => { + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + }; + const removeOutdatedCacheItems = () => { + const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null; + const namespace = getNamespace(); + const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => { + return cacheItem.timestamp !== undefined; + })); + setNamespace(filteredNamespaceWithoutOldFormattedCacheItems); + if (!timeToLive) + return; + const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => { + const currentTimestamp = new Date().getTime(); + const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp; + return !isExpired; + })); + setNamespace(filteredNamespaceWithoutExpiredItems); + }; + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + return Promise.resolve() + .then(() => { + removeOutdatedCacheItems(); + const keyAsString = JSON.stringify(key); + return getNamespace()[keyAsString]; + }) + .then(value => { + return Promise.all([value ? value.value : defaultValue(), value !== undefined]); + }) + .then(([value, exists]) => { + return Promise.all([value, exists || events.miss(value)]); + }) + .then(([value]) => value); + }, + set(key, value) { + return Promise.resolve().then(() => { + const namespace = getNamespace(); + // eslint-disable-next-line functional/immutable-data + namespace[JSON.stringify(key)] = { + timestamp: new Date().getTime(), + value, + }; + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + return value; + }); + }, + delete(key) { + return Promise.resolve().then(() => { + const namespace = getNamespace(); + // eslint-disable-next-line functional/immutable-data + delete namespace[JSON.stringify(key)]; + getStorage().setItem(namespaceKey, JSON.stringify(namespace)); + }); + }, + clear() { + return Promise.resolve().then(() => { + getStorage().removeItem(namespaceKey); + }); + }, + }; +} + +export { createBrowserLocalStorageCache }; diff --git a/paperai-docs/node_modules/@algolia/cache-browser-local-storage/index.js b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/index.js new file mode 100644 index 00000000..618c0618 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/cache-browser-local-storage.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/cache-browser-local-storage/package.json b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/package.json new file mode 100644 index 00000000..3923f10f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-browser-local-storage/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/cache-browser-local-storage", + "version": "4.22.1", + "private": false, + "description": "Promise-based cache library for browser using local storage.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/cache-browser-local-storage.esm.js", + "types": "dist/cache-browser-local-storage.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/cache-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.cjs.js b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.cjs.js new file mode 100644 index 00000000..3350ea2d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.cjs.js @@ -0,0 +1,61 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +// @todo Add logger on options to debug when caches go wrong. +function createFallbackableCache(options) { + const caches = [...options.caches]; + const current = caches.shift(); // eslint-disable-line functional/immutable-data + if (current === undefined) { + return createNullCache(); + } + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + return current.get(key, defaultValue, events).catch(() => { + return createFallbackableCache({ caches }).get(key, defaultValue, events); + }); + }, + set(key, value) { + return current.set(key, value).catch(() => { + return createFallbackableCache({ caches }).set(key, value); + }); + }, + delete(key) { + return current.delete(key).catch(() => { + return createFallbackableCache({ caches }).delete(key); + }); + }, + clear() { + return current.clear().catch(() => { + return createFallbackableCache({ caches }).clear(); + }); + }, + }; +} + +function createNullCache() { + return { + get(_key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + const value = defaultValue(); + return value + .then(result => Promise.all([result, events.miss(result)])) + .then(([result]) => result); + }, + set(_key, value) { + return Promise.resolve(value); + }, + delete(_key) { + return Promise.resolve(); + }, + clear() { + return Promise.resolve(); + }, + }; +} + +exports.createFallbackableCache = createFallbackableCache; +exports.createNullCache = createNullCache; diff --git a/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.d.ts b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.d.ts new file mode 100644 index 00000000..971acff5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.d.ts @@ -0,0 +1,40 @@ +import { Cache as Cache_2 } from '@algolia/cache-common'; + +export declare type Cache = { + /** + * Gets the value of the given `key`. + */ + readonly get: (key: object | string, defaultValue: () => Readonly>, events?: CacheEvents) => Readonly>; + /** + * Sets the given value with the given `key`. + */ + readonly set: (key: object | string, value: TValue) => Readonly>; + /** + * Deletes the given `key`. + */ + readonly delete: (key: object | string) => Readonly>; + /** + * Clears the cache. + */ + readonly clear: () => Readonly>; +}; + +export declare type CacheEvents = { + /** + * The callback when the given `key` is missing from the cache. + */ + readonly miss: (value: TValue) => Readonly>; +}; + +export declare function createFallbackableCache(options: FallbackableCacheOptions): Cache; + +export declare function createNullCache(): Cache; + +export declare type FallbackableCacheOptions = { + /** + * List of caches order by priority. + */ + readonly caches: readonly Cache_2[]; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.esm.js b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.esm.js new file mode 100644 index 00000000..273b38be --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-common/dist/cache-common.esm.js @@ -0,0 +1,56 @@ +// @todo Add logger on options to debug when caches go wrong. +function createFallbackableCache(options) { + const caches = [...options.caches]; + const current = caches.shift(); // eslint-disable-line functional/immutable-data + if (current === undefined) { + return createNullCache(); + } + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + return current.get(key, defaultValue, events).catch(() => { + return createFallbackableCache({ caches }).get(key, defaultValue, events); + }); + }, + set(key, value) { + return current.set(key, value).catch(() => { + return createFallbackableCache({ caches }).set(key, value); + }); + }, + delete(key) { + return current.delete(key).catch(() => { + return createFallbackableCache({ caches }).delete(key); + }); + }, + clear() { + return current.clear().catch(() => { + return createFallbackableCache({ caches }).clear(); + }); + }, + }; +} + +function createNullCache() { + return { + get(_key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + const value = defaultValue(); + return value + .then(result => Promise.all([result, events.miss(result)])) + .then(([result]) => result); + }, + set(_key, value) { + return Promise.resolve(value); + }, + delete(_key) { + return Promise.resolve(); + }, + clear() { + return Promise.resolve(); + }, + }; +} + +export { createFallbackableCache, createNullCache }; diff --git a/paperai-docs/node_modules/@algolia/cache-common/index.js b/paperai-docs/node_modules/@algolia/cache-common/index.js new file mode 100644 index 00000000..b121ae50 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-common/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/cache-common.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/cache-common/package.json b/paperai-docs/node_modules/@algolia/cache-common/package.json new file mode 100644 index 00000000..2de76736 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-common/package.json @@ -0,0 +1,19 @@ +{ + "name": "@algolia/cache-common", + "version": "4.22.1", + "private": false, + "description": "Common interfaces for promise-based caching libraries", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-js.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/cache-common.esm.js", + "types": "dist/cache-common.d.ts", + "files": [ + "index.js", + "dist" + ] +} diff --git a/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.cjs.js b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.cjs.js new file mode 100644 index 00000000..9e9369eb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.cjs.js @@ -0,0 +1,37 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function createInMemoryCache(options = { serializable: true }) { + // eslint-disable-next-line functional/no-let + let cache = {}; + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + const keyAsString = JSON.stringify(key); + if (keyAsString in cache) { + return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]); + } + const promise = defaultValue(); + const miss = (events && events.miss) || (() => Promise.resolve()); + return promise.then((value) => miss(value)).then(() => promise); + }, + set(key, value) { + // eslint-disable-next-line functional/immutable-data + cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value; + return Promise.resolve(value); + }, + delete(key) { + // eslint-disable-next-line functional/immutable-data + delete cache[JSON.stringify(key)]; + return Promise.resolve(); + }, + clear() { + cache = {}; + return Promise.resolve(); + }, + }; +} + +exports.createInMemoryCache = createInMemoryCache; diff --git a/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.d.ts b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.d.ts new file mode 100644 index 00000000..3d45a393 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.d.ts @@ -0,0 +1,12 @@ +import { Cache } from '@algolia/cache-common'; + +export declare function createInMemoryCache(options?: InMemoryCacheOptions): Cache; + +export declare type InMemoryCacheOptions = { + /** + * If keys and values should be serialized using `JSON.stringify`. + */ + readonly serializable?: boolean; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.esm.js b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.esm.js new file mode 100644 index 00000000..520d4351 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-in-memory/dist/cache-in-memory.esm.js @@ -0,0 +1,33 @@ +function createInMemoryCache(options = { serializable: true }) { + // eslint-disable-next-line functional/no-let + let cache = {}; + return { + get(key, defaultValue, events = { + miss: () => Promise.resolve(), + }) { + const keyAsString = JSON.stringify(key); + if (keyAsString in cache) { + return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]); + } + const promise = defaultValue(); + const miss = (events && events.miss) || (() => Promise.resolve()); + return promise.then((value) => miss(value)).then(() => promise); + }, + set(key, value) { + // eslint-disable-next-line functional/immutable-data + cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value; + return Promise.resolve(value); + }, + delete(key) { + // eslint-disable-next-line functional/immutable-data + delete cache[JSON.stringify(key)]; + return Promise.resolve(); + }, + clear() { + cache = {}; + return Promise.resolve(); + }, + }; +} + +export { createInMemoryCache }; diff --git a/paperai-docs/node_modules/@algolia/cache-in-memory/index.js b/paperai-docs/node_modules/@algolia/cache-in-memory/index.js new file mode 100644 index 00000000..14ac8783 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-in-memory/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/cache-in-memory.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/cache-in-memory/package.json b/paperai-docs/node_modules/@algolia/cache-in-memory/package.json new file mode 100644 index 00000000..d8f6737e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/cache-in-memory/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/cache-in-memory", + "version": "4.22.1", + "private": false, + "description": "Promise-based cache library using memory.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/cache-in-memory.esm.js", + "types": "dist/cache-in-memory.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/cache-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/client-account/dist/client-account.cjs.js b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.cjs.js new file mode 100644 index 00000000..d71a3208 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.cjs.js @@ -0,0 +1,69 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var clientCommon = require('@algolia/client-common'); +var clientSearch = require('@algolia/client-search'); + +function createDestinationIndiceExistsError() { + return { + name: 'DestinationIndiceAlreadyExistsError', + message: 'Destination indice already exists.', + }; +} + +function createIndicesInSameAppError(appId) { + return { + name: 'IndicesInTheSameAppError', + message: 'Indices are in the same application. Use SearchClient.copyIndex instead.', + appId, + }; +} + +const accountCopyIndex = (source, destination, requestOptions) => { + // eslint-disable-next-line functional/prefer-readonly-type + const responses = []; + const promise = clientSearch.exists(destination)() + .then(res => { + if (source.appId === destination.appId) { + throw createIndicesInSameAppError(source.appId); + } + if (res) { + throw createDestinationIndiceExistsError(); + } + }) + .then(() => clientSearch.getSettings(source)()) + .then(settings => + // eslint-disable-next-line functional/immutable-data + responses.push(clientSearch.setSettings(destination)(settings, requestOptions))) + .then(() => clientSearch.browseRules(source)({ + // eslint-disable-next-line functional/immutable-data + batch: rules => responses.push(clientSearch.saveRules(destination)(rules, requestOptions)), + })) + .then(() => clientSearch.browseSynonyms(source)({ + // eslint-disable-next-line functional/immutable-data + batch: synonyms => responses.push(clientSearch.saveSynonyms(destination)(synonyms, requestOptions)), + })) + .then(() => clientSearch.browseObjects(source)({ + // eslint-disable-next-line functional/immutable-data + batch: objects => responses.push(clientSearch.saveObjects(destination)(objects, requestOptions)), + })); + return clientCommon.createWaitablePromise( + /** + * The original promise will return an array of async responses, now + * we need to resolve that array of async responses using a + * `Promise.all`, and then resolve `void` for the end-user. + */ + promise.then(() => Promise.all(responses)).then(() => undefined), + /** + * Next, if the end-user calls the `wait` method, we need to also call + * the `wait` method on each element of of async responses. + */ + (_response, waitRequestOptions) => { + return Promise.all(responses.map(response => response.wait(waitRequestOptions))); + }); +}; + +exports.accountCopyIndex = accountCopyIndex; +exports.createDestinationIndiceExistsError = createDestinationIndiceExistsError; +exports.createIndicesInSameAppError = createIndicesInSameAppError; diff --git a/paperai-docs/node_modules/@algolia/client-account/dist/client-account.d.ts b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.d.ts new file mode 100644 index 00000000..d55f2919 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.d.ts @@ -0,0 +1,18 @@ +import { RequestOptions } from '@algolia/transporter'; +import { SearchIndex } from '@algolia/client-search'; +import { WaitablePromise } from '@algolia/client-common'; + +export declare const accountCopyIndex: (source: SearchIndex, destination: SearchIndex, requestOptions?: RequestOptions | undefined) => WaitablePromise; + +export declare function createDestinationIndiceExistsError(): Error; + +export declare function createIndicesInSameAppError(appId: string): IndicesInSameAppError; + +export declare type IndicesInSameAppError = Error & { + /** + * The app id. + */ + readonly appId: string; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/client-account/dist/client-account.esm.js b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.esm.js new file mode 100644 index 00000000..36b4052a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-account/dist/client-account.esm.js @@ -0,0 +1,63 @@ +import { createWaitablePromise } from '@algolia/client-common'; +import { exists, getSettings, setSettings, browseRules, saveRules, browseSynonyms, saveSynonyms, browseObjects, saveObjects } from '@algolia/client-search'; + +function createDestinationIndiceExistsError() { + return { + name: 'DestinationIndiceAlreadyExistsError', + message: 'Destination indice already exists.', + }; +} + +function createIndicesInSameAppError(appId) { + return { + name: 'IndicesInTheSameAppError', + message: 'Indices are in the same application. Use SearchClient.copyIndex instead.', + appId, + }; +} + +const accountCopyIndex = (source, destination, requestOptions) => { + // eslint-disable-next-line functional/prefer-readonly-type + const responses = []; + const promise = exists(destination)() + .then(res => { + if (source.appId === destination.appId) { + throw createIndicesInSameAppError(source.appId); + } + if (res) { + throw createDestinationIndiceExistsError(); + } + }) + .then(() => getSettings(source)()) + .then(settings => + // eslint-disable-next-line functional/immutable-data + responses.push(setSettings(destination)(settings, requestOptions))) + .then(() => browseRules(source)({ + // eslint-disable-next-line functional/immutable-data + batch: rules => responses.push(saveRules(destination)(rules, requestOptions)), + })) + .then(() => browseSynonyms(source)({ + // eslint-disable-next-line functional/immutable-data + batch: synonyms => responses.push(saveSynonyms(destination)(synonyms, requestOptions)), + })) + .then(() => browseObjects(source)({ + // eslint-disable-next-line functional/immutable-data + batch: objects => responses.push(saveObjects(destination)(objects, requestOptions)), + })); + return createWaitablePromise( + /** + * The original promise will return an array of async responses, now + * we need to resolve that array of async responses using a + * `Promise.all`, and then resolve `void` for the end-user. + */ + promise.then(() => Promise.all(responses)).then(() => undefined), + /** + * Next, if the end-user calls the `wait` method, we need to also call + * the `wait` method on each element of of async responses. + */ + (_response, waitRequestOptions) => { + return Promise.all(responses.map(response => response.wait(waitRequestOptions))); + }); +}; + +export { accountCopyIndex, createDestinationIndiceExistsError, createIndicesInSameAppError }; diff --git a/paperai-docs/node_modules/@algolia/client-account/index.js b/paperai-docs/node_modules/@algolia/client-account/index.js new file mode 100644 index 00000000..ea5e5605 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-account/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/client-account.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/client-account/package.json b/paperai-docs/node_modules/@algolia/client-account/package.json new file mode 100644 index 00000000..5560d513 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-account/package.json @@ -0,0 +1,23 @@ +{ + "name": "@algolia/client-account", + "version": "4.22.1", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/client-account.esm.js", + "types": "dist/client-account.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/client-search": "4.22.1", + "@algolia/transporter": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.cjs.js b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.cjs.js new file mode 100644 index 00000000..ea5ead79 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.cjs.js @@ -0,0 +1,80 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var clientCommon = require('@algolia/client-common'); +var transporter = require('@algolia/transporter'); +var requesterCommon = require('@algolia/requester-common'); + +const createAnalyticsClient = options => { + const region = options.region || 'us'; + const auth = clientCommon.createAuth(clientCommon.AuthMode.WithinHeaders, options.appId, options.apiKey); + const transporter$1 = transporter.createTransporter({ + hosts: [{ url: `analytics.${region}.algolia.com` }], + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/json' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + const appId = options.appId; + return clientCommon.addMethods({ appId, transporter: transporter$1 }, options.methods); +}; + +const addABTest = (base) => { + return (abTest, requestOptions) => { + return base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '2/abtests', + data: abTest, + }, requestOptions); + }; +}; + +const deleteABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: clientCommon.encode('2/abtests/%s', abTestID), + }, requestOptions); + }; +}; + +const getABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('2/abtests/%s', abTestID), + }, requestOptions); + }; +}; + +const getABTests = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '2/abtests', + }, requestOptions); + }; +}; + +const stopABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('2/abtests/%s/stop', abTestID), + }, requestOptions); + }; +}; + +exports.addABTest = addABTest; +exports.createAnalyticsClient = createAnalyticsClient; +exports.deleteABTest = deleteABTest; +exports.getABTest = getABTest; +exports.getABTests = getABTests; +exports.stopABTest = stopABTest; diff --git a/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.d.ts b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.d.ts new file mode 100644 index 00000000..9f616be7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.d.ts @@ -0,0 +1,251 @@ +import { ClientTransporterOptions } from '@algolia/client-common'; +import { CreateClient } from '@algolia/client-common'; +import { RequestOptions } from '@algolia/transporter'; +import { SearchOptions } from '@algolia/client-search'; +import { Transporter } from '@algolia/transporter'; + +export declare type ABTest = { + /** + * The ab test name. + */ + readonly name: string; + /** + * The ab test list of variants. + */ + readonly variants: readonly Variant[]; + /** + * The ab test end date, if any. + */ + readonly endAt: string; +}; + +export declare const addABTest: (base: AnalyticsClient) => (abTest: ABTest, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type AddABTestResponse = { + /** + * The ab test unique identifier. + */ + abTestID: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The index name where the ab test is attached to. + */ + index: string; +}; + +export declare type AnalyticsClient = { + /** + * The application id. + */ + readonly appId: string; + /** + * The underlying transporter. + */ + readonly transporter: Transporter; +}; + +export declare type AnalyticsClientOptions = { + /** + * The application id. + */ + readonly appId: string; + /** + * The api key. + */ + readonly apiKey: string; + /** + * The prefered region. + */ + readonly region?: 'de' | 'us'; +}; + +export declare const createAnalyticsClient: CreateClient; + +export declare const deleteABTest: (base: AnalyticsClient) => (abTestID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type DeleteABTestResponse = { + /** + * The ab test unique identifier. + */ + abTestID: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The index name where the ab test was attached to. + */ + index: string; +}; + +export declare const getABTest: (base: AnalyticsClient) => (abTestID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetABTestResponse = { + /** + * The ab test name. + */ + name: string; + /** + * The ab test status. + */ + status: string; + /** + * The ab test list of variants. + */ + variants: VariantResponse[]; + /** + * The ab test end date, if any. + */ + endAt: string; + /** + * The ab test created date, if any. + */ + createdAt: string; + /** + * The ab test updated date. + */ + updatedAt: string; + /** + * The ab test unique identifier. + */ + abTestID: number; + /** + * The ab test significance based on click data. Should be higher than 0.95 to be considered significant - no matter which variant is winning. + */ + clickSignificance: number; + /** + * + * The ab test significance based on conversion data. Should be higher than 0.95 to be considered significant - no matter which variant is winning. + */ + conversionSignificance: number; +}; + +export declare const getABTests: (base: AnalyticsClient) => (requestOptions?: (RequestOptions & GetABTestsOptions) | undefined) => Readonly>; + +export declare type GetABTestsOptions = { + /** + * The number of ab tests to skip from the biginning of the list. + */ + readonly offset?: number; + /** + * The limit of the number of ab tests returned. + */ + readonly limit?: number; + /** + * Filters the returned ab tests by any indices starting with the + * provided prefix that are assigned to either variant of an ab test. + */ + readonly indexPrefix?: string; + /** + * Filters the returned ab tests by any indices ending with the + * provided suffix that are assigned to either variant of an ab test. + */ + readonly indexSuffix?: string; +}; + +export declare type GetABTestsResponse = { + /** + * The number of ab tests within this response. + */ + count: number; + /** + * The total of ab tests. + */ + total: number; + /** + * The list of ab tests. + */ + abtests: GetABTestResponse[] | null; +}; + +export declare const stopABTest: (base: AnalyticsClient) => (abTestID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type StopABTestResponse = { + /** + * The ab test unique identifier. + */ + abTestID: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The index name where the ab test is attached to. + */ + index: string; +}; + +export declare type Variant = { + /** + * The index name. + */ + readonly index: string; + /** + * Description of the variant. Useful when seing the results in the dashboard or via the API. + */ + readonly description?: string; + /** + * Percentage of the traffic that should be going to the variant. The sum of the percentage should be equal to 100. + */ + readonly trafficPercentage: number; + /** + * The search parameters. + */ + readonly customSearchParameters?: SearchOptions; +}; + +export declare type VariantResponse = Variant & { + /** + * Average click position for the variant. + */ + averageClickPosition?: number; + /** + * Distinct click count for the variant. + */ + clickCount?: number; + /** + * Click through rate for the variant. + */ + clickThroughRate?: number; + /** + * Click through rate for the variant. + */ + conversionCount?: number; + /** + * Distinct conversion count for the variant. + */ + conversionRate?: number; + /** + * No result count. + */ + noResultCount?: number; + /** + * Tracked search count. + */ + trackedSearchCount?: number; + /** + * Search count. + */ + searchCount?: number; + /** + * User count. + */ + userCount?: number; + /** + * Count of the tracked searches attributed to outlier traffic that were removed from the A/B test. + */ + outlierTrackedSearchesCount?: number; + /** + * Count of users attributed to outlier traffic that were removed from the A/B test. + */ + outlierUsersCount?: number; + /** + * The search parameters. + */ + customSearchParameters?: SearchOptions; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.esm.js b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.esm.js new file mode 100644 index 00000000..0a2da9cb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-analytics/dist/client-analytics.esm.js @@ -0,0 +1,71 @@ +import { createAuth, AuthMode, addMethods, encode } from '@algolia/client-common'; +import { createTransporter } from '@algolia/transporter'; +import { MethodEnum } from '@algolia/requester-common'; + +const createAnalyticsClient = options => { + const region = options.region || 'us'; + const auth = createAuth(AuthMode.WithinHeaders, options.appId, options.apiKey); + const transporter = createTransporter({ + hosts: [{ url: `analytics.${region}.algolia.com` }], + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/json' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + const appId = options.appId; + return addMethods({ appId, transporter }, options.methods); +}; + +const addABTest = (base) => { + return (abTest, requestOptions) => { + return base.transporter.write({ + method: MethodEnum.Post, + path: '2/abtests', + data: abTest, + }, requestOptions); + }; +}; + +const deleteABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.write({ + method: MethodEnum.Delete, + path: encode('2/abtests/%s', abTestID), + }, requestOptions); + }; +}; + +const getABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('2/abtests/%s', abTestID), + }, requestOptions); + }; +}; + +const getABTests = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '2/abtests', + }, requestOptions); + }; +}; + +const stopABTest = (base) => { + return (abTestID, requestOptions) => { + return base.transporter.write({ + method: MethodEnum.Post, + path: encode('2/abtests/%s/stop', abTestID), + }, requestOptions); + }; +}; + +export { addABTest, createAnalyticsClient, deleteABTest, getABTest, getABTests, stopABTest }; diff --git a/paperai-docs/node_modules/@algolia/client-analytics/index.js b/paperai-docs/node_modules/@algolia/client-analytics/index.js new file mode 100644 index 00000000..3588503a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-analytics/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/client-analytics.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/client-analytics/package.json b/paperai-docs/node_modules/@algolia/client-analytics/package.json new file mode 100644 index 00000000..7fe2de0a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-analytics/package.json @@ -0,0 +1,24 @@ +{ + "name": "@algolia/client-analytics", + "version": "4.22.1", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/client-analytics.esm.js", + "types": "dist/client-analytics.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/client-search": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/client-common/dist/client-common.cjs.js b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.cjs.js new file mode 100644 index 00000000..7250fbdf --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.cjs.js @@ -0,0 +1,101 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function createAuth(authMode, appId, apiKey) { + const credentials = { + 'x-algolia-api-key': apiKey, + 'x-algolia-application-id': appId, + }; + return { + headers() { + return authMode === AuthMode.WithinHeaders ? credentials : {}; + }, + queryParameters() { + return authMode === AuthMode.WithinQueryParameters ? credentials : {}; + }, + }; +} + +function createRetryablePromise(callback) { + let retriesCount = 0; // eslint-disable-line functional/no-let + const retry = () => { + retriesCount++; + return new Promise((resolve) => { + setTimeout(() => { + resolve(callback(retry)); + }, Math.min(100 * retriesCount, 1000)); + }); + }; + return callback(retry); +} + +function createWaitablePromise(promise, wait = (_response, _requestOptions) => { + return Promise.resolve(); +}) { + // eslint-disable-next-line functional/immutable-data + return Object.assign(promise, { + wait(requestOptions) { + return createWaitablePromise(promise + .then(response => Promise.all([wait(response, requestOptions), response])) + .then(promiseResults => promiseResults[1])); + }, + }); +} + +// eslint-disable-next-line functional/prefer-readonly-type +function shuffle(array) { + let c = array.length - 1; // eslint-disable-line functional/no-let + // eslint-disable-next-line functional/no-loop-statement + for (c; c > 0; c--) { + const b = Math.floor(Math.random() * (c + 1)); + const a = array[c]; + array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign + array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign + } + return array; +} +function addMethods(base, methods) { + if (!methods) { + return base; + } + Object.keys(methods).forEach(key => { + // eslint-disable-next-line functional/immutable-data, no-param-reassign + base[key] = methods[key](base); + }); + return base; +} +function encode(format, ...args) { + // eslint-disable-next-line functional/no-let + let i = 0; + return format.replace(/%s/g, () => encodeURIComponent(args[i++])); +} + +const version = '4.22.1'; + +const destroy = (base) => { + return () => { + return base.transporter.requester.destroy(); + }; +}; + +const AuthMode = { + /** + * If auth credentials should be in query parameters. + */ + WithinQueryParameters: 0, + /** + * If auth credentials should be in headers. + */ + WithinHeaders: 1, +}; + +exports.AuthMode = AuthMode; +exports.addMethods = addMethods; +exports.createAuth = createAuth; +exports.createRetryablePromise = createRetryablePromise; +exports.createWaitablePromise = createWaitablePromise; +exports.destroy = destroy; +exports.encode = encode; +exports.shuffle = shuffle; +exports.version = version; diff --git a/paperai-docs/node_modules/@algolia/client-common/dist/client-common.d.ts b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.d.ts new file mode 100644 index 00000000..95d23021 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.d.ts @@ -0,0 +1,102 @@ +import { Headers } from '@algolia/transporter'; +import { HostOptions } from '@algolia/transporter'; +import { QueryParameters } from '@algolia/transporter'; +import { RequestOptions } from '@algolia/transporter'; +import { Transporter } from '@algolia/transporter'; +import { TransporterOptions } from '@algolia/transporter'; + +declare type AddedMethods> = TBase & { + [TKey in keyof TMethods extends string ? keyof TMethods : never]: ReturnType; +}; + +export declare function addMethods>(base: TBase, methods?: TMethods): AddedMethods; + +export declare type Auth = { + /** + * Returns the headers related to auth. Should be + * merged to the transporter headers. + */ + readonly headers: () => Readonly>; + /** + * Returns the query parameters related to auth. Should be + * merged to the query parameters headers. + */ + readonly queryParameters: () => Readonly>; +}; + +export declare const AuthMode: Readonly>; + +export declare type AuthModeType = 0 | 1; + +export declare type ClientTransporterOptions = Pick & Exclude & Exclude> & { + /** + * The hosts used by the requester. + */ + readonly hosts?: readonly HostOptions[]; + /** + * The headers used by the requester. The transporter + * layer may add some extra headers during the request + * for the user agent, and others. + */ + readonly headers?: Headers; + /** + * The query parameters used by the requester. The transporter + * layer may add some extra headers during the request + * for the user agent, and others. + */ + readonly queryParameters?: QueryParameters; +}; + +export declare function createAuth(authMode: AuthModeType, appId: string, apiKey: string): Auth; + +export declare type CreateClient = (...args: any) => any; +}>(options: TOptions & { + readonly methods?: TMethods; +}) => TClient & { + [key in keyof TMethods extends string ? keyof TMethods : never]: ReturnType; +}; + +export declare function createRetryablePromise(callback: (retry: () => Promise) => Promise): Promise; + +export declare function createWaitablePromise(promise: Readonly>, wait?: Wait): Readonly>; + +export declare const destroy: (base: { + readonly transporter: Transporter; +}) => () => Readonly>; + +export declare function encode(format: string, ...args: readonly any[]): string; + +declare type Methods = { + readonly [key: string]: (base: TBase) => (...args: any[]) => any; +}; + +export declare function shuffle(array: TData[]): TData[]; + +export declare const version = "4.22.1"; + +export declare type Wait = ( +/** + * The original response. + */ +response: TResponse, +/** + * The custom request options. + */ +requestOptions?: RequestOptions) => Readonly>; + +export declare type WaitablePromise = Readonly> & { + /** + * Wait for a task to complete before executing the next line of code, to synchronize index updates. + * + * All write operations in Algolia are asynchronous by design. It means that when you add or + * update an object to your index, our servers will reply to your request with a taskID as + * soon as they understood the write operation. The actual insert and indexing will be + * done after replying to your code. + * + * You can wait for a task to complete by using this method. + */ + readonly wait: (requestOptions?: RequestOptions) => Readonly>; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/client-common/dist/client-common.esm.js b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.esm.js new file mode 100644 index 00000000..859b1e1e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-common/dist/client-common.esm.js @@ -0,0 +1,89 @@ +function createAuth(authMode, appId, apiKey) { + const credentials = { + 'x-algolia-api-key': apiKey, + 'x-algolia-application-id': appId, + }; + return { + headers() { + return authMode === AuthMode.WithinHeaders ? credentials : {}; + }, + queryParameters() { + return authMode === AuthMode.WithinQueryParameters ? credentials : {}; + }, + }; +} + +function createRetryablePromise(callback) { + let retriesCount = 0; // eslint-disable-line functional/no-let + const retry = () => { + retriesCount++; + return new Promise((resolve) => { + setTimeout(() => { + resolve(callback(retry)); + }, Math.min(100 * retriesCount, 1000)); + }); + }; + return callback(retry); +} + +function createWaitablePromise(promise, wait = (_response, _requestOptions) => { + return Promise.resolve(); +}) { + // eslint-disable-next-line functional/immutable-data + return Object.assign(promise, { + wait(requestOptions) { + return createWaitablePromise(promise + .then(response => Promise.all([wait(response, requestOptions), response])) + .then(promiseResults => promiseResults[1])); + }, + }); +} + +// eslint-disable-next-line functional/prefer-readonly-type +function shuffle(array) { + let c = array.length - 1; // eslint-disable-line functional/no-let + // eslint-disable-next-line functional/no-loop-statement + for (c; c > 0; c--) { + const b = Math.floor(Math.random() * (c + 1)); + const a = array[c]; + array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign + array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign + } + return array; +} +function addMethods(base, methods) { + if (!methods) { + return base; + } + Object.keys(methods).forEach(key => { + // eslint-disable-next-line functional/immutable-data, no-param-reassign + base[key] = methods[key](base); + }); + return base; +} +function encode(format, ...args) { + // eslint-disable-next-line functional/no-let + let i = 0; + return format.replace(/%s/g, () => encodeURIComponent(args[i++])); +} + +const version = '4.22.1'; + +const destroy = (base) => { + return () => { + return base.transporter.requester.destroy(); + }; +}; + +const AuthMode = { + /** + * If auth credentials should be in query parameters. + */ + WithinQueryParameters: 0, + /** + * If auth credentials should be in headers. + */ + WithinHeaders: 1, +}; + +export { AuthMode, addMethods, createAuth, createRetryablePromise, createWaitablePromise, destroy, encode, shuffle, version }; diff --git a/paperai-docs/node_modules/@algolia/client-common/index.js b/paperai-docs/node_modules/@algolia/client-common/index.js new file mode 100644 index 00000000..ddbe0e4d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-common/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/client-common.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/client-common/package.json b/paperai-docs/node_modules/@algolia/client-common/package.json new file mode 100644 index 00000000..9ef16b0f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-common/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/client-common", + "version": "4.22.1", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/client-common.esm.js", + "types": "dist/client-common.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.cjs.js b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.cjs.js new file mode 100644 index 00000000..ee8dc176 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.cjs.js @@ -0,0 +1,49 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var clientCommon = require('@algolia/client-common'); +var transporter = require('@algolia/transporter'); +var requesterCommon = require('@algolia/requester-common'); + +const createPersonalizationClient = options => { + const region = options.region || 'us'; + const auth = clientCommon.createAuth(clientCommon.AuthMode.WithinHeaders, options.appId, options.apiKey); + const transporter$1 = transporter.createTransporter({ + hosts: [{ url: `personalization.${region}.algolia.com` }], + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/json' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + return clientCommon.addMethods({ appId: options.appId, transporter: transporter$1 }, options.methods); +}; + +const getPersonalizationStrategy = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/strategies/personalization', + }, requestOptions); + }; +}; + +const setPersonalizationStrategy = (base) => { + return (personalizationStrategy, requestOptions) => { + return base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '1/strategies/personalization', + data: personalizationStrategy, + }, requestOptions); + }; +}; + +exports.createPersonalizationClient = createPersonalizationClient; +exports.getPersonalizationStrategy = getPersonalizationStrategy; +exports.setPersonalizationStrategy = setPersonalizationStrategy; diff --git a/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.d.ts b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.d.ts new file mode 100644 index 00000000..817906b1 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.d.ts @@ -0,0 +1,93 @@ +import { ClientTransporterOptions } from '@algolia/client-common'; +import { CreateClient } from '@algolia/client-common'; +import { RequestOptions } from '@algolia/transporter'; +import { Transporter } from '@algolia/transporter'; + +export declare const createPersonalizationClient: CreateClient; + +export declare const getPersonalizationStrategy: (base: PersonalizationClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetPersonalizationStrategyResponse = { + /** + * Events scoring + */ + eventsScoring: Array<{ + eventName: string; + eventType: string; + score: number; + }>; + /** + * Facets scoring + */ + facetsScoring: Array<{ + facetName: string; + score: number; + }>; + /** + * Personalization impact + */ + personalizationImpact: number; +}; + +export declare type PersonalizationClient = { + /** + * The application id. + */ + readonly appId: string; + /** + * The underlying transporter. + */ + readonly transporter: Transporter; +}; + +export declare type PersonalizationClientOptions = { + /** + * The application id. + */ + readonly appId: string; + /** + * The api key. + */ + readonly apiKey: string; + /** + * The prefered region. + */ + readonly region?: string; +}; + +export declare type PersonalizationStrategy = { + /** + * Events scoring + */ + readonly eventsScoring: ReadonlyArray<{ + readonly eventName: string; + readonly eventType: string; + readonly score: number; + }>; + /** + * Facets scoring + */ + readonly facetsScoring: ReadonlyArray<{ + readonly facetName: string; + readonly score: number; + }>; + /** + * Personalization impact + */ + readonly personalizationImpact: number; +}; + +export declare const setPersonalizationStrategy: (base: PersonalizationClient) => (personalizationStrategy: PersonalizationStrategy, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type SetPersonalizationStrategyResponse = { + /** + * The status code. + */ + status?: number; + /** + * The message. + */ + message: string; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.esm.js b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.esm.js new file mode 100644 index 00000000..a5000d05 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-personalization/dist/client-personalization.esm.js @@ -0,0 +1,43 @@ +import { createAuth, AuthMode, addMethods } from '@algolia/client-common'; +import { createTransporter } from '@algolia/transporter'; +import { MethodEnum } from '@algolia/requester-common'; + +const createPersonalizationClient = options => { + const region = options.region || 'us'; + const auth = createAuth(AuthMode.WithinHeaders, options.appId, options.apiKey); + const transporter = createTransporter({ + hosts: [{ url: `personalization.${region}.algolia.com` }], + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/json' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + return addMethods({ appId: options.appId, transporter }, options.methods); +}; + +const getPersonalizationStrategy = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/strategies/personalization', + }, requestOptions); + }; +}; + +const setPersonalizationStrategy = (base) => { + return (personalizationStrategy, requestOptions) => { + return base.transporter.write({ + method: MethodEnum.Post, + path: '1/strategies/personalization', + data: personalizationStrategy, + }, requestOptions); + }; +}; + +export { createPersonalizationClient, getPersonalizationStrategy, setPersonalizationStrategy }; diff --git a/paperai-docs/node_modules/@algolia/client-personalization/index.js b/paperai-docs/node_modules/@algolia/client-personalization/index.js new file mode 100644 index 00000000..df07d60a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-personalization/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/client-personalization.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/client-personalization/package.json b/paperai-docs/node_modules/@algolia/client-personalization/package.json new file mode 100644 index 00000000..5398bef7 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-personalization/package.json @@ -0,0 +1,23 @@ +{ + "name": "@algolia/client-personalization", + "version": "4.22.1", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/client-personalization.esm.js", + "types": "dist/client-personalization.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/client-search/dist/client-search.cjs.js b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.cjs.js new file mode 100644 index 00000000..82fdc72c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.cjs.js @@ -0,0 +1,1380 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var clientCommon = require('@algolia/client-common'); +var transporter = require('@algolia/transporter'); +var requesterCommon = require('@algolia/requester-common'); +var crypto = require('crypto'); + +function createBrowsablePromise(options) { + const browse = (data) => { + return options.request(data).then(response => { + /** + * First we send to the developer the + * batch retrieved from the API. + */ + if (options.batch !== undefined) { + options.batch(response.hits); + } + /** + * Then, we ask to the browse concrete implementation + * if we should stop browsing. As example, the `browseObjects` + * method will stop if the cursor is not present on the response. + */ + if (options.shouldStop(response)) { + return undefined; + } + /** + * Finally, if the response contains a cursor, we browse to the next + * batch using that same cursor. Otherwise, we just use the traditional + * browsing using the page element. + */ + if (response.cursor) { + return browse({ + cursor: response.cursor, + }); + } + return browse({ + page: (data.page || 0) + 1, + }); + }); + }; + return browse({}); +} + +const createSearchClient = options => { + const appId = options.appId; + const auth = clientCommon.createAuth(options.authMode !== undefined ? options.authMode : clientCommon.AuthMode.WithinHeaders, appId, options.apiKey); + const transporter$1 = transporter.createTransporter({ + hosts: [ + { url: `${appId}-dsn.algolia.net`, accept: transporter.CallEnum.Read }, + { url: `${appId}.algolia.net`, accept: transporter.CallEnum.Write }, + ].concat(clientCommon.shuffle([ + { url: `${appId}-1.algolianet.com` }, + { url: `${appId}-2.algolianet.com` }, + { url: `${appId}-3.algolianet.com` }, + ])), + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/x-www-form-urlencoded' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + const base = { + transporter: transporter$1, + appId, + addAlgoliaAgent(segment, version) { + transporter$1.userAgent.add({ segment, version }); + }, + clearCache() { + return Promise.all([ + transporter$1.requestsCache.clear(), + transporter$1.responsesCache.clear(), + ]).then(() => undefined); + }, + }; + return clientCommon.addMethods(base, options.methods); +}; + +function createMissingObjectIDError() { + return { + name: 'MissingObjectIDError', + message: 'All objects must have an unique objectID ' + + '(like a primary key) to be valid. ' + + 'Algolia is also able to generate objectIDs ' + + "automatically but *it's not recommended*. " + + "To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.", + }; +} + +function createObjectNotFoundError() { + return { + name: 'ObjectNotFoundError', + message: 'Object not found.', + }; +} + +function createValidUntilNotFoundError() { + return { + name: 'ValidUntilNotFoundError', + message: 'ValidUntil not found in given secured api key.', + }; +} + +const addApiKey = (base) => { + return (acl, requestOptions) => { + const { queryParameters, ...options } = requestOptions || {}; + const data = { + acl, + ...(queryParameters !== undefined ? { queryParameters } : {}), + }; + const wait = (response, waitRequestOptions) => { + return clientCommon.createRetryablePromise(retry => { + return getApiKey(base)(response.key, waitRequestOptions).catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + return retry(); + }); + }); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '1/keys', + data, + }, options), wait); + }; +}; + +const assignUserID = (base) => { + return (userID, clusterName, requestOptions) => { + const mappedRequestOptions = transporter.createMappedRequestOptions(requestOptions); + // eslint-disable-next-line functional/immutable-data + mappedRequestOptions.queryParameters['X-Algolia-User-ID'] = userID; + return base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '1/clusters/mapping', + data: { cluster: clusterName }, + }, mappedRequestOptions); + }; +}; + +const assignUserIDs = (base) => { + return (userIDs, clusterName, requestOptions) => { + return base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '1/clusters/mapping/batch', + data: { + users: userIDs, + cluster: clusterName, + }, + }, requestOptions); + }; +}; + +const clearDictionaryEntries = (base) => { + return (dictionary, requestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('/1/dictionaries/%s/batch', dictionary), + data: { + clearExistingDictionaryEntries: true, + requests: { action: 'addEntry', body: [] }, + }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const copyIndex = (base) => { + return (from, to, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return initIndex(base)(from, { + methods: { waitTask }, + }).waitTask(response.taskID, waitRequestOptions); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/operation', from), + data: { + operation: 'copy', + destination: to, + }, + }, requestOptions), wait); + }; +}; + +const copyRules = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Rules], + }); + }; +}; + +const copySettings = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Settings], + }); + }; +}; + +const copySynonyms = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Synonyms], + }); + }; +}; + +const customRequest = (base) => { + return (request, requestOptions) => { + if (request.method === requesterCommon.MethodEnum.Get) { + return base.transporter.read(request, requestOptions); + } + return base.transporter.write(request, requestOptions); + }; +}; + +const deleteApiKey = (base) => { + return (apiKey, requestOptions) => { + const wait = (_, waitRequestOptions) => { + return clientCommon.createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions) + .then(retry) + .catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + }); + }); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: clientCommon.encode('1/keys/%s', apiKey), + }, requestOptions), wait); + }; +}; + +const deleteDictionaryEntries = (base) => { + return (dictionary, objectIDs, requestOptions) => { + const requests = objectIDs.map(objectID => ({ + action: 'deleteEntry', + body: { objectID }, + })); + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: false, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const generateSecuredApiKey = () => { + return (parentApiKey, restrictions) => { + const queryParameters = transporter.serializeQueryParameters(restrictions); + const securedKey = crypto.createHmac('sha256', parentApiKey) + .update(queryParameters) + .digest('hex'); + return Buffer.from(securedKey + queryParameters).toString('base64'); + }; +}; + +const getApiKey = (base) => { + return (apiKey, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/keys/%s', apiKey), + }, requestOptions); + }; +}; + +const getAppTask = (base) => { + return (taskID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/task/%s', taskID.toString()), + }, requestOptions); + }; +}; + +const getDictionarySettings = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '/1/dictionaries/*/settings', + }, requestOptions); + }; +}; + +const getLogs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/logs', + }, requestOptions); + }; +}; + +const getSecuredApiKeyRemainingValidity = () => { + return (securedApiKey) => { + const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii'); + const regex = /validUntil=(\d+)/; + const match = decodedString.match(regex); + if (match === null) { + throw createValidUntilNotFoundError(); + } + return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000); + }; +}; + +const getTopUserIDs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/clusters/mapping/top', + }, requestOptions); + }; +}; + +const getUserID = (base) => { + return (userID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/clusters/mapping/%s', userID), + }, requestOptions); + }; +}; + +const hasPendingMappings = (base) => { + return (requestOptions) => { + const { retrieveMappings, ...options } = requestOptions || {}; + if (retrieveMappings === true) { + // eslint-disable-next-line functional/immutable-data + options.getClusters = true; + } + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/clusters/mapping/pending', + }, options); + }; +}; + +const initIndex = (base) => { + return (indexName, options = {}) => { + const searchIndex = { + transporter: base.transporter, + appId: base.appId, + indexName, + }; + return clientCommon.addMethods(searchIndex, options.methods); + }; +}; + +const listApiKeys = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/keys', + }, requestOptions); + }; +}; + +const listClusters = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/clusters', + }, requestOptions); + }; +}; + +const listIndices = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/indexes', + }, requestOptions); + }; +}; + +const listUserIDs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: '1/clusters/mapping', + }, requestOptions); + }; +}; + +const moveIndex = (base) => { + return (from, to, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return initIndex(base)(from, { + methods: { waitTask }, + }).waitTask(response.taskID, waitRequestOptions); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/operation', from), + data: { + operation: 'move', + destination: to, + }, + }, requestOptions), wait); + }; +}; + +const multipleBatch = (base) => { + return (requests, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return Promise.all(Object.keys(response.taskID).map(indexName => { + return initIndex(base)(indexName, { + methods: { waitTask }, + }).waitTask(response.taskID[indexName], waitRequestOptions); + })); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: '1/indexes/*/batch', + data: { + requests, + }, + }, requestOptions), wait); + }; +}; + +const multipleGetObjects = (base) => { + return (requests, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: '1/indexes/*/objects', + data: { + requests, + }, + }, requestOptions); + }; +}; + +const multipleQueries = (base) => { + return (queries, requestOptions) => { + const requests = queries.map(query => { + return { + ...query, + params: transporter.serializeQueryParameters(query.params || {}), + }; + }); + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: '1/indexes/*/queries', + data: { + requests, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const multipleSearchForFacetValues = (base) => { + return (queries, requestOptions) => { + return Promise.all(queries.map(query => { + const { facetName, facetQuery, ...params } = query.params; + return initIndex(base)(query.indexName, { + methods: { searchForFacetValues }, + }).searchForFacetValues(facetName, facetQuery, { + ...requestOptions, + ...params, + }); + })); + }; +}; + +const removeUserID = (base) => { + return (userID, requestOptions) => { + const mappedRequestOptions = transporter.createMappedRequestOptions(requestOptions); + // eslint-disable-next-line functional/immutable-data + mappedRequestOptions.queryParameters['X-Algolia-User-ID'] = userID; + return base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: '1/clusters/mapping', + }, mappedRequestOptions); + }; +}; + +const replaceDictionaryEntries = (base) => { + return (dictionary, entries, requestOptions) => { + const requests = entries.map(entry => ({ + action: 'addEntry', + body: entry, + })); + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: true, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const restoreApiKey = (base) => { + return (apiKey, requestOptions) => { + const wait = (_, waitRequestOptions) => { + return clientCommon.createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions).catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + return retry(); + }); + }); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/keys/%s/restore', apiKey), + }, requestOptions), wait); + }; +}; + +const saveDictionaryEntries = (base) => { + return (dictionary, entries, requestOptions) => { + const requests = entries.map(entry => ({ + action: 'addEntry', + body: entry, + })); + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: false, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const searchDictionaryEntries = (base) => { + return (dictionary, query, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('/1/dictionaries/%s/search', dictionary), + data: { + query, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchUserIDs = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: '1/clusters/mapping/search', + data: { + query, + }, + }, requestOptions); + }; +}; + +const setDictionarySettings = (base) => { + return (settings, requestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Put, + path: '/1/dictionaries/*/settings', + data: settings, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const updateApiKey = (base) => { + return (apiKey, requestOptions) => { + const updatedFields = Object.assign({}, requestOptions); + const { queryParameters, ...options } = requestOptions || {}; + const data = queryParameters ? { queryParameters } : {}; + const apiKeyFields = [ + 'acl', + 'indexes', + 'referers', + 'restrictSources', + 'queryParameters', + 'description', + 'maxQueriesPerIPPerHour', + 'maxHitsPerQuery', + ]; + // Check that all the fields retrieved through getApiKey are the same as the ones we wanted to update + const hasChanged = (getApiKeyResponse) => { + return Object.keys(updatedFields) + .filter((updatedField) => apiKeyFields.indexOf(updatedField) !== -1) + .every(updatedField => { + // If the field is an array, we need to check that they are the same length and that all the values are the same + if (Array.isArray(getApiKeyResponse[updatedField]) && + Array.isArray(updatedFields[updatedField])) { + const getApiKeyResponseArray = getApiKeyResponse[updatedField]; + return (getApiKeyResponseArray.length === updatedFields[updatedField].length && + getApiKeyResponseArray.every((value, index) => value === updatedFields[updatedField][index])); + } + else { + return getApiKeyResponse[updatedField] === updatedFields[updatedField]; + } + }); + }; + const wait = (_, waitRequestOptions) => clientCommon.createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions).then(getApiKeyResponse => { + return hasChanged(getApiKeyResponse) ? Promise.resolve() : retry(); + }); + }); + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Put, + path: clientCommon.encode('1/keys/%s', apiKey), + data, + }, options), wait); + }; +}; + +const waitAppTask = (base) => { + return (taskID, requestOptions) => { + return clientCommon.createRetryablePromise(retry => { + return getAppTask(base)(taskID, requestOptions).then(response => { + return response.status !== 'published' ? retry() : undefined; + }); + }); + }; +}; + +const batch = (base) => { + return (requests, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return waitTask(base)(response.taskID, waitRequestOptions); + }; + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/batch', base.indexName), + data: { + requests, + }, + }, requestOptions), wait); + }; +}; + +const browseObjects = (base) => { + return (requestOptions) => { + return createBrowsablePromise({ + shouldStop: response => response.cursor === undefined, + ...requestOptions, + request: (data) => base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/browse', base.indexName), + data, + }, requestOptions), + }); + }; +}; + +const browseRules = (base) => { + return (requestOptions) => { + const options = { + hitsPerPage: 1000, + ...requestOptions, + }; + return createBrowsablePromise({ + shouldStop: response => response.hits.length < options.hitsPerPage, + ...options, + request(data) { + return searchRules(base)('', { ...options, ...data }).then((response) => { + return { + ...response, + hits: response.hits.map(rule => { + // eslint-disable-next-line functional/immutable-data,no-param-reassign + delete rule._highlightResult; + return rule; + }), + }; + }); + }, + }); + }; +}; + +const browseSynonyms = (base) => { + return (requestOptions) => { + const options = { + hitsPerPage: 1000, + ...requestOptions, + }; + return createBrowsablePromise({ + shouldStop: response => response.hits.length < options.hitsPerPage, + ...options, + request(data) { + return searchSynonyms(base)('', { ...options, ...data }).then((response) => { + return { + ...response, + hits: response.hits.map(synonym => { + // eslint-disable-next-line functional/immutable-data,no-param-reassign + delete synonym._highlightResult; + return synonym; + }), + }; + }); + }, + }); + }; +}; + +const chunkedBatch = (base) => { + return (bodies, action, requestOptions) => { + const { batchSize, ...options } = requestOptions || {}; + const response = { + taskIDs: [], + objectIDs: [], + }; + const forEachBatch = (lastIndex = 0) => { + // eslint-disable-next-line functional/prefer-readonly-type + const bodiesChunk = []; + // eslint-disable-next-line functional/no-let + let index; + /* eslint-disable-next-line functional/no-loop-statement */ + for (index = lastIndex; index < bodies.length; index++) { + // eslint-disable-next-line functional/immutable-data + bodiesChunk.push(bodies[index]); + if (bodiesChunk.length === (batchSize || 1000)) { + break; + } + } + if (bodiesChunk.length === 0) { + return Promise.resolve(response); + } + return batch(base)(bodiesChunk.map(body => { + return { + action, + body, + }; + }), options).then(res => { + response.objectIDs = response.objectIDs.concat(res.objectIDs); // eslint-disable-line functional/immutable-data + response.taskIDs.push(res.taskID); // eslint-disable-line functional/immutable-data + index++; + return forEachBatch(index); + }); + }; + return clientCommon.createWaitablePromise(forEachBatch(), (chunkedBatchResponse, waitRequestOptions) => { + return Promise.all(chunkedBatchResponse.taskIDs.map(taskID => { + return waitTask(base)(taskID, waitRequestOptions); + })); + }); + }; +}; + +const clearObjects = (base) => { + return (requestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/clear', base.indexName), + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const clearRules = (base) => { + return (requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/rules/clear', base.indexName), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const clearSynonyms = (base) => { + return (requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/synonyms/clear', base.indexName), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteBy = (base) => { + return (filters, requestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/deleteByQuery', base.indexName), + data: filters, + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteIndex = (base) => { + return (requestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: clientCommon.encode('1/indexes/%s', base.indexName), + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteObject = (base) => { + return (objectID, requestOptions) => { + return clientCommon.createWaitablePromise(deleteObjects(base)([objectID], requestOptions).then(response => { + return { taskID: response.taskIDs[0] }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteObjects = (base) => { + return (objectIDs, requestOptions) => { + const objects = objectIDs.map(objectID => { + return { objectID }; + }); + return chunkedBatch(base)(objects, BatchActionEnum.DeleteObject, requestOptions); + }; +}; + +const deleteRule = (base) => { + return (objectID, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: clientCommon.encode('1/indexes/%s/rules/%s', base.indexName, objectID), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteSynonym = (base) => { + return (objectID, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Delete, + path: clientCommon.encode('1/indexes/%s/synonyms/%s', base.indexName, objectID), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const exists = (base) => { + return (requestOptions) => { + return getSettings(base)(requestOptions) + .then(() => true) + .catch(error => { + if (error.status !== 404) { + throw error; + } + return false; + }); + }; +}; + +const findAnswers = (base) => { + return (query, queryLanguages, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/answers/%s/prediction', base.indexName), + data: { + query, + queryLanguages, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const findObject = (base) => { + return (callback, requestOptions) => { + const { query, paginate, ...options } = requestOptions || {}; + // eslint-disable-next-line functional/no-let + let page = 0; + const forEachPage = () => { + return search(base)(query || '', { ...options, page }).then(result => { + // eslint-disable-next-line functional/no-loop-statement + for (const [position, hit] of Object.entries(result.hits)) { + // eslint-disable-next-line promise/no-callback-in-promise + if (callback(hit)) { + return { + object: hit, + position: parseInt(position, 10), + page, + }; + } + } + page++; + // paginate if option was set and has next page + if (paginate === false || page >= result.nbPages) { + throw createObjectNotFoundError(); + } + return forEachPage(); + }); + }; + return forEachPage(); + }; +}; + +const getObject = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/indexes/%s/%s', base.indexName, objectID), + }, requestOptions); + }; +}; + +const getObjectPosition = () => { + return (searchResponse, objectID) => { + // eslint-disable-next-line functional/no-loop-statement + for (const [position, hit] of Object.entries(searchResponse.hits)) { + if (hit.objectID === objectID) { + return parseInt(position, 10); + } + } + return -1; + }; +}; + +const getObjects = (base) => { + return (objectIDs, requestOptions) => { + const { attributesToRetrieve, ...options } = requestOptions || {}; + const requests = objectIDs.map(objectID => { + return { + indexName: base.indexName, + objectID, + ...(attributesToRetrieve ? { attributesToRetrieve } : {}), + }; + }); + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: '1/indexes/*/objects', + data: { + requests, + }, + }, options); + }; +}; + +const getRule = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/indexes/%s/rules/%s', base.indexName, objectID), + }, requestOptions); + }; +}; + +const getSettings = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/indexes/%s/settings', base.indexName), + data: { + getVersion: 2, + }, + }, requestOptions); + }; +}; + +const getSynonym = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode(`1/indexes/%s/synonyms/%s`, base.indexName, objectID), + }, requestOptions); + }; +}; + +const getTask = (base) => { + return (taskID, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Get, + path: clientCommon.encode('1/indexes/%s/task/%s', base.indexName, taskID.toString()), + }, requestOptions); + }; +}; + +const partialUpdateObject = (base) => { + return (object, requestOptions) => { + return clientCommon.createWaitablePromise(partialUpdateObjects(base)([object], requestOptions).then(response => { + return { + objectID: response.objectIDs[0], + taskID: response.taskIDs[0], + }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const partialUpdateObjects = (base) => { + return (objects, requestOptions) => { + const { createIfNotExists, ...options } = requestOptions || {}; + const action = createIfNotExists + ? BatchActionEnum.PartialUpdateObject + : BatchActionEnum.PartialUpdateObjectNoCreate; + return chunkedBatch(base)(objects, action, options); + }; +}; + +const replaceAllObjects = (base) => { + return (objects, requestOptions) => { + const { safe, autoGenerateObjectIDIfNotExist, batchSize, ...options } = requestOptions || {}; + const operation = (from, to, type, operationRequestOptions) => { + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/operation', from), + data: { + operation: type, + destination: to, + }, + }, operationRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; + const randomSuffix = Math.random() + .toString(36) + .substring(7); + const temporaryIndexName = `${base.indexName}_tmp_${randomSuffix}`; + const saveObjectsInTemporary = saveObjects({ + appId: base.appId, + transporter: base.transporter, + indexName: temporaryIndexName, + }); + // @ts-ignore + // eslint-disable-next-line prefer-const, functional/no-let, functional/prefer-readonly-type + let responses = []; + const copyWaitablePromise = operation(base.indexName, temporaryIndexName, 'copy', { + ...options, + scope: ['settings', 'synonyms', 'rules'], + }); + // eslint-disable-next-line functional/immutable-data + responses.push(copyWaitablePromise); + const result = (safe + ? copyWaitablePromise.wait(options) + : copyWaitablePromise) + .then(() => { + const saveObjectsWaitablePromise = saveObjectsInTemporary(objects, { + ...options, + autoGenerateObjectIDIfNotExist, + batchSize, + }); + // eslint-disable-next-line functional/immutable-data + responses.push(saveObjectsWaitablePromise); + return safe ? saveObjectsWaitablePromise.wait(options) : saveObjectsWaitablePromise; + }) + .then(() => { + const moveWaitablePromise = operation(temporaryIndexName, base.indexName, 'move', options); + // eslint-disable-next-line functional/immutable-data + responses.push(moveWaitablePromise); + return safe ? moveWaitablePromise.wait(options) : moveWaitablePromise; + }) + .then(() => Promise.all(responses)) + .then(([copyResponse, saveObjectsResponse, moveResponse]) => { + return { + objectIDs: saveObjectsResponse.objectIDs, + taskIDs: [copyResponse.taskID, ...saveObjectsResponse.taskIDs, moveResponse.taskID], + }; + }); + return clientCommon.createWaitablePromise(result, (_, waitRequestOptions) => { + return Promise.all(responses.map(response => response.wait(waitRequestOptions))); + }); + }; +}; + +const replaceAllRules = (base) => { + return (rules, requestOptions) => { + return saveRules(base)(rules, { + ...requestOptions, + clearExistingRules: true, + }); + }; +}; + +const replaceAllSynonyms = (base) => { + return (synonyms, requestOptions) => { + return saveSynonyms(base)(synonyms, { + ...requestOptions, + clearExistingSynonyms: true, + }); + }; +}; + +const saveObject = (base) => { + return (object, requestOptions) => { + return clientCommon.createWaitablePromise(saveObjects(base)([object], requestOptions).then(response => { + return { + objectID: response.objectIDs[0], + taskID: response.taskIDs[0], + }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const saveObjects = (base) => { + return (objects, requestOptions) => { + const { autoGenerateObjectIDIfNotExist, ...options } = requestOptions || {}; + const action = autoGenerateObjectIDIfNotExist + ? BatchActionEnum.AddObject + : BatchActionEnum.UpdateObject; + if (action === BatchActionEnum.UpdateObject) { + // eslint-disable-next-line functional/no-loop-statement + for (const object of objects) { + if (object.objectID === undefined) { + return clientCommon.createWaitablePromise(Promise.reject(createMissingObjectIDError())); + } + } + } + return chunkedBatch(base)(objects, action, options); + }; +}; + +const saveRule = (base) => { + return (rule, requestOptions) => { + return saveRules(base)([rule], requestOptions); + }; +}; + +const saveRules = (base) => { + return (rules, requestOptions) => { + const { forwardToReplicas, clearExistingRules, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + if (clearExistingRules) { + mappedRequestOptions.queryParameters.clearExistingRules = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/rules/batch', base.indexName), + data: rules, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const saveSynonym = (base) => { + return (synonym, requestOptions) => { + return saveSynonyms(base)([synonym], requestOptions); + }; +}; + +const saveSynonyms = (base) => { + return (synonyms, requestOptions) => { + const { forwardToReplicas, clearExistingSynonyms, replaceExistingSynonyms, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + if (replaceExistingSynonyms || clearExistingSynonyms) { + mappedRequestOptions.queryParameters.replaceExistingSynonyms = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/synonyms/batch', base.indexName), + data: synonyms, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const search = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/query', base.indexName), + data: { + query, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchForFacetValues = (base) => { + return (facetName, facetQuery, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/facets/%s/query', base.indexName, facetName), + data: { + facetQuery, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchRules = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/rules/search', base.indexName), + data: { + query, + }, + }, requestOptions); + }; +}; + +const searchSynonyms = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: requesterCommon.MethodEnum.Post, + path: clientCommon.encode('1/indexes/%s/synonyms/search', base.indexName), + data: { + query, + }, + }, requestOptions); + }; +}; + +const setSettings = (base) => { + return (settings, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = transporter.createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return clientCommon.createWaitablePromise(base.transporter.write({ + method: requesterCommon.MethodEnum.Put, + path: clientCommon.encode('1/indexes/%s/settings', base.indexName), + data: settings, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const waitTask = (base) => { + return (taskID, requestOptions) => { + return clientCommon.createRetryablePromise(retry => { + return getTask(base)(taskID, requestOptions).then(response => { + return response.status !== 'published' ? retry() : undefined; + }); + }); + }; +}; + +const ApiKeyACLEnum = { + AddObject: 'addObject', + Analytics: 'analytics', + Browser: 'browse', + DeleteIndex: 'deleteIndex', + DeleteObject: 'deleteObject', + EditSettings: 'editSettings', + Inference: 'inference', + ListIndexes: 'listIndexes', + Logs: 'logs', + Personalization: 'personalization', + Recommendation: 'recommendation', + Search: 'search', + SeeUnretrievableAttributes: 'seeUnretrievableAttributes', + Settings: 'settings', + Usage: 'usage', +}; + +const BatchActionEnum = { + AddObject: 'addObject', + UpdateObject: 'updateObject', + PartialUpdateObject: 'partialUpdateObject', + PartialUpdateObjectNoCreate: 'partialUpdateObjectNoCreate', + DeleteObject: 'deleteObject', + DeleteIndex: 'delete', + ClearIndex: 'clear', +}; + +const ScopeEnum = { + Settings: 'settings', + Synonyms: 'synonyms', + Rules: 'rules', +}; + +const StrategyEnum = { + None: 'none', + StopIfEnoughMatches: 'stopIfEnoughMatches', +}; + +const SynonymEnum = { + Synonym: 'synonym', + OneWaySynonym: 'oneWaySynonym', + AltCorrection1: 'altCorrection1', + AltCorrection2: 'altCorrection2', + Placeholder: 'placeholder', +}; + +exports.ApiKeyACLEnum = ApiKeyACLEnum; +exports.BatchActionEnum = BatchActionEnum; +exports.ScopeEnum = ScopeEnum; +exports.StrategyEnum = StrategyEnum; +exports.SynonymEnum = SynonymEnum; +exports.addApiKey = addApiKey; +exports.assignUserID = assignUserID; +exports.assignUserIDs = assignUserIDs; +exports.batch = batch; +exports.browseObjects = browseObjects; +exports.browseRules = browseRules; +exports.browseSynonyms = browseSynonyms; +exports.chunkedBatch = chunkedBatch; +exports.clearDictionaryEntries = clearDictionaryEntries; +exports.clearObjects = clearObjects; +exports.clearRules = clearRules; +exports.clearSynonyms = clearSynonyms; +exports.copyIndex = copyIndex; +exports.copyRules = copyRules; +exports.copySettings = copySettings; +exports.copySynonyms = copySynonyms; +exports.createBrowsablePromise = createBrowsablePromise; +exports.createMissingObjectIDError = createMissingObjectIDError; +exports.createObjectNotFoundError = createObjectNotFoundError; +exports.createSearchClient = createSearchClient; +exports.createValidUntilNotFoundError = createValidUntilNotFoundError; +exports.customRequest = customRequest; +exports.deleteApiKey = deleteApiKey; +exports.deleteBy = deleteBy; +exports.deleteDictionaryEntries = deleteDictionaryEntries; +exports.deleteIndex = deleteIndex; +exports.deleteObject = deleteObject; +exports.deleteObjects = deleteObjects; +exports.deleteRule = deleteRule; +exports.deleteSynonym = deleteSynonym; +exports.exists = exists; +exports.findAnswers = findAnswers; +exports.findObject = findObject; +exports.generateSecuredApiKey = generateSecuredApiKey; +exports.getApiKey = getApiKey; +exports.getAppTask = getAppTask; +exports.getDictionarySettings = getDictionarySettings; +exports.getLogs = getLogs; +exports.getObject = getObject; +exports.getObjectPosition = getObjectPosition; +exports.getObjects = getObjects; +exports.getRule = getRule; +exports.getSecuredApiKeyRemainingValidity = getSecuredApiKeyRemainingValidity; +exports.getSettings = getSettings; +exports.getSynonym = getSynonym; +exports.getTask = getTask; +exports.getTopUserIDs = getTopUserIDs; +exports.getUserID = getUserID; +exports.hasPendingMappings = hasPendingMappings; +exports.initIndex = initIndex; +exports.listApiKeys = listApiKeys; +exports.listClusters = listClusters; +exports.listIndices = listIndices; +exports.listUserIDs = listUserIDs; +exports.moveIndex = moveIndex; +exports.multipleBatch = multipleBatch; +exports.multipleGetObjects = multipleGetObjects; +exports.multipleQueries = multipleQueries; +exports.multipleSearchForFacetValues = multipleSearchForFacetValues; +exports.partialUpdateObject = partialUpdateObject; +exports.partialUpdateObjects = partialUpdateObjects; +exports.removeUserID = removeUserID; +exports.replaceAllObjects = replaceAllObjects; +exports.replaceAllRules = replaceAllRules; +exports.replaceAllSynonyms = replaceAllSynonyms; +exports.replaceDictionaryEntries = replaceDictionaryEntries; +exports.restoreApiKey = restoreApiKey; +exports.saveDictionaryEntries = saveDictionaryEntries; +exports.saveObject = saveObject; +exports.saveObjects = saveObjects; +exports.saveRule = saveRule; +exports.saveRules = saveRules; +exports.saveSynonym = saveSynonym; +exports.saveSynonyms = saveSynonyms; +exports.search = search; +exports.searchDictionaryEntries = searchDictionaryEntries; +exports.searchForFacetValues = searchForFacetValues; +exports.searchRules = searchRules; +exports.searchSynonyms = searchSynonyms; +exports.searchUserIDs = searchUserIDs; +exports.setDictionarySettings = setDictionarySettings; +exports.setSettings = setSettings; +exports.updateApiKey = updateApiKey; +exports.waitAppTask = waitAppTask; +exports.waitTask = waitTask; diff --git a/paperai-docs/node_modules/@algolia/client-search/dist/client-search.d.ts b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.d.ts new file mode 100644 index 00000000..2da59b5d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.d.ts @@ -0,0 +1,2542 @@ +import { AuthModeType } from '@algolia/client-common'; +import { ClientTransporterOptions } from '@algolia/client-common'; +import { CreateClient } from '@algolia/client-common'; +import { Request } from '@algolia/transporter'; +import { RequestOptions } from '@algolia/transporter'; +import { Transporter } from '@algolia/transporter'; +import { WaitablePromise } from '@algolia/client-common'; + +export declare const addApiKey: (base: SearchClient) => (acl: readonly ApiKeyACLType[], requestOptions?: (AddApiKeyOptions & Pick) | undefined) => Readonly>; + +export declare type AddApiKeyOptions = { + /** + * A Unix timestamp used to define the expiration date of the API key. + */ + readonly validity?: number; + /** + * Specify the maximum number of hits this API key can retrieve in one call. + * This parameter can be used to protect you from attempts at retrieving your entire index contents by massively querying the index. + */ + readonly maxHitsPerQuery?: number; + /** + * Specify the maximum number of API calls allowed from an IP address per hour. Each time an API call is performed with this key, a check is performed. + */ + readonly maxQueriesPerIPPerHour?: number; + /** + * Specify the list of targeted indices. You can target all indices starting with a prefix or ending with a suffix using the ‘*’ character. + */ + readonly indexes?: readonly string[]; + /** + * Specify the list of referers. You can target all referers starting with a prefix, ending with a suffix using the ‘*’ character. + */ + readonly referers?: readonly string[]; + /** + * Specify the list of query parameters. You can force the query parameters for a query using the url string format. + */ + readonly queryParameters?: string; + /** + * Specify a description of the API key. Used for informative purposes only. It has impact on the functionality of the API key. + */ + readonly description?: string; +}; + +export declare type AddApiKeyResponse = { + /** + * The returned api key. + */ + key: string; + /** + * Date of creation of the api key. + */ + createdAt: string; +}; + +export declare const ApiKeyACLEnum: Readonly>; + +export declare type ApiKeyACLType = 'addObject' | 'analytics' | 'browse' | 'deleteIndex' | 'deleteObject' | 'editSettings' | 'inference' | 'listIndexes' | 'logs' | 'personalization' | 'recommendation' | 'search' | 'seeUnretrievableAttributes' | 'settings' | 'usage'; + +export declare const assignUserID: (base: SearchClient) => (userID: string, clusterName: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type AssignUserIDResponse = { + /** + * Date of creation of the userId. + */ + createdAt: string; +}; + +export declare const assignUserIDs: (base: SearchClient) => (userIDs: readonly string[], clusterName: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type AssignUserIDsResponse = { + /** + * Date of creation of the userId + */ + createdAt: string; +}; + +export declare type AutomaticFacetFilter = { + /** + * Attribute to filter on. This must match a facet placeholder in the rule’s pattern. + */ + readonly facet: string; + /** + * Whether the filter is disjunctive (true) or conjunctive (false). + */ + readonly disjunctive?: boolean; + /** + * Score for the filter. Typically used for optional or disjunctive filters. + */ + readonly score?: number; +}; + +export declare const batch: (base: SearchIndex) => (requests: readonly BatchRequest[], requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const BatchActionEnum: Readonly>; + +export declare type BatchActionType = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear'; + +export declare type BatchRequest = { + /** + * The batch action. + */ + readonly action: BatchActionType; + /** + * The body of the given `action`. Note that, bodies difer + * depending of the action. + */ + readonly body: Record; +}; + +export declare type BatchResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The object ids created/updated by the batch request. + */ + objectIDs: string[]; +}; + +export declare const browseObjects: (base: SearchIndex) => (requestOptions?: (SearchOptions & BrowseOptions & RequestOptions) | undefined) => Readonly>; + +export declare type BrowseOptions = { + /** + * The callback called for each batch of objects. + */ + readonly batch?: (batch: ReadonlyArray) => any; + /** + * The callback called to determine if the browse should stop. By + * default this checks whether there's any more content to get. + */ + readonly shouldStop?: (response: BrowseResponse) => boolean; +}; + +export declare type BrowseRequestData = { + /** + * If available, should be used for browsing to the next page. + */ + readonly cursor?: string; + /** + * If cursor is not available, should be used for browsing to the next page. + */ + readonly page?: number; +}; + +export declare type BrowseResponse = { + /** + * The hits per page. + */ + hits: Array; + /** + * The cursor used for iterate on the next page. + */ + cursor?: string; +}; + +export declare const browseRules: (base: SearchIndex) => (requestOptions?: (SearchRulesOptions & BrowseOptions & RequestOptions) | undefined) => Readonly>; + +export declare const browseSynonyms: (base: SearchIndex) => (requestOptions?: (SearchSynonymsOptions & BrowseOptions & RequestOptions) | undefined) => Readonly>; + +export declare const chunkedBatch: (base: SearchIndex) => (bodies: readonly object[], action: BatchActionType, requestOptions?: (RequestOptions & ChunkOptions) | undefined) => Readonly>; + +export declare type ChunkedBatchResponse = { + /** + * The operations task ids. May be used to perform a wait task. + */ + taskIDs: number[]; + /** + * The object ids created/updated/deleted by the multiple requests. + */ + objectIDs: string[]; +}; + +export declare type ChunkOptions = { + /** + * The number of objects per batch. + */ + readonly batchSize?: number; +}; + +export declare const clearDictionaryEntries: (base: SearchClient) => (dictionary: DictionaryName, requestOptions?: (RequestOptions & DictionaryEntriesOptions) | undefined) => Readonly>; + +export declare const clearObjects: (base: SearchIndex) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const clearRules: (base: SearchIndex) => (requestOptions?: (RequestOptions & ClearRulesOptions) | undefined) => Readonly>; + +export declare type ClearRulesOptions = { + /** + * If the clear rules request should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; +}; + +export declare const clearSynonyms: (base: SearchIndex) => (requestOptions?: (ClearSynonymsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type ClearSynonymsOptions = { + /** + * If the clear synonyms request should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; +}; + +export declare type Cluster = { + /** + * The cluster name + */ + readonly clusterName: string; + /** + * Number of records in the cluster. + */ + readonly nbRecords: number; + /** + * Number of users assign to the cluster. + */ + readonly nbUserIDs: number; + /** + * Data size taken by all the users assigned to the cluster. + */ + readonly dataSize: number; +}; + +export declare type Condition = { + /** + * Query patterns are expressed as a string with a specific syntax. A pattern is a sequence of tokens. + */ + readonly pattern?: string; + /** + * Apply this rule only when the filter matches. + */ + readonly filters?: string; + /** + * is | startsWith | endsWith | contains: Whether the pattern must match the beginning or the end of the query string, or both, or none. + */ + readonly anchoring?: 'is' | 'startsWith' | 'endsWith' | 'contains'; + /** + * Rule context (format: [A-Za-z0-9_-]+). When specified, the rule is contextual and applies only when the same context is specified at query time (using the ruleContexts parameter). + * When absent, the rule is generic and always applies (provided that its other conditions are met, of course). + */ + readonly context?: string; + /** + * If set to true, alternatives make the rule to trigger on synonyms, typos and plurals. + * Note that setting ignorePlurals to false overrides this parameter. + */ + readonly alternatives?: boolean; +}; + +export declare type Consequence = { + /** + * Additional search parameters. Any valid search parameter is allowed. + */ + readonly params?: ConsequenceParams & Pick>; + /** + * Objects to promote as hits. + */ + readonly promote?: readonly ConsequencePromote[]; + /** + * Objects to hide from hits. + */ + readonly hide?: ReadonlyArray<{ + readonly objectID: string; + }>; + /** + * Whether the Query Rule should promote or not promoted items. + */ + readonly filterPromotes?: boolean; + /** + * Custom JSON object that will be appended to the userData array in the response. + * This object is not interpreted by the API. It is limited to 1kB of minified JSON. + */ + readonly userData?: any; +}; + +export declare type ConsequenceParams = { + /** + * When providing a string, it replaces the entire query string. + * When providing an object, it describes incremental edits to be made to the query string (but you can’t do both). + */ + readonly query?: ConsequenceQuery | string; + /** + * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern. + */ + readonly automaticFacetFilters?: readonly AutomaticFacetFilter[] | readonly string[]; + /** + * Same syntax as automaticFacetFilters, but the engine treats the filters as optional. + * Behaves like optionalFilters. + */ + readonly automaticOptionalFacetFilters?: readonly AutomaticFacetFilter[] | readonly string[]; + /** + * Content defining how the search interface should be rendered. + * A default value for this can be set via settings + */ + readonly renderingContent?: Settings['renderingContent']; +}; + +export declare type ConsequencePromote = { + /** + * Unique identifier of the object to promote. + */ + readonly objectID: string; + /** + * Promoted rank for the object (zero-based). + */ + readonly position: number; +} | { + /** + * List of unique identifiers for the objects to promote. + */ + readonly objectIDs: readonly string[]; + /** + * Promoted start rank for the objects (zero-based). + */ + readonly position: number; +}; + +export declare type ConsequenceQuery = { + /** + * List of removes. + */ + readonly remove?: readonly string[]; + /** + * List of edits. + */ + readonly edits?: ReadonlyArray<{ + /** + * Type of edit. + */ + readonly type?: 'remove' | 'replace'; + /** + * Text or patterns to remove from the query string. + */ + readonly delete?: string; + /** + * Text that should be inserted in place of the removed text inside the query string. + */ + readonly insert?: string; + }>; +}; + +export declare const copyIndex: (base: SearchClient) => (from: string, to: string, requestOptions?: (CopyIndexOptions & RequestOptions) | undefined) => Readonly>; + +export declare type CopyIndexOptions = { + readonly scope?: readonly ScopeType[]; +}; + +export declare const copyRules: (base: SearchClient) => (from: string, to: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const copySettings: (base: SearchClient) => (from: string, to: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const copySynonyms: (base: SearchClient) => (from: string, to: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare function createBrowsablePromise(options: { + readonly shouldStop: (response: BrowseResponse) => boolean; + readonly request: (data: BrowseRequestData) => Readonly>>; +} & BrowseOptions): Readonly>; + +export declare type CreateIndex = (...args: any) => any; +}>(indexName: string, options?: { + readonly methods?: TMethods; +}) => SearchIndex & { + [key in keyof TMethods extends string ? keyof TMethods : never]: ReturnType; +}; + +export declare function createMissingObjectIDError(): Error; + +export declare function createObjectNotFoundError(): Error; + +export declare const createSearchClient: CreateClient; + +export declare function createValidUntilNotFoundError(): Error; + +export declare const customRequest: (base: SearchClient) => (request: Request, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const deleteApiKey: (base: SearchClient) => (apiKey: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type DeleteApiKeyResponse = { + /** + * The date when the api key was deleted. + */ + deletedAt: string; +}; + +export declare const deleteBy: (base: SearchIndex) => (filters: DeleteByFiltersOptions, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type DeleteByFiltersOptions = { + /** + * Filter the query with numeric, facet and/or tag filters. + */ + readonly filters?: string; + /** + * Filter hits by facet value. + */ + readonly facetFilters?: string | readonly string[] | ReadonlyArray; + /** + * Filter on numeric attributes. + */ + readonly numericFilters?: string | readonly string[] | ReadonlyArray; + /** + * Filter hits by tags. tagFilters is a different way of filtering, which relies on the _tags + * attribute. It uses a simpler syntax than filters. You can use it when you want to do + * simple filtering based on tags. + */ + readonly tagFilters?: string | readonly string[] | ReadonlyArray; + /** + * Search for entries around a central geolocation, enabling a geo search within a circular area. + */ + readonly aroundLatLng?: string; + /** + * Search for entries around a given location automatically computed from the requester’s IP address. + */ + readonly aroundLatLngViaIP?: boolean; + /** + * Search inside a rectangular area (in geo coordinates). + */ + readonly insideBoundingBox?: ReadonlyArray | string; + /** + * Search inside a polygon (in geo coordinates). + */ + readonly insidePolygon?: ReadonlyArray; +}; + +export declare const deleteDictionaryEntries: (base: SearchClient) => (dictionary: DictionaryName, objectIDs: readonly string[], requestOptions?: (RequestOptions & DictionaryEntriesOptions) | undefined) => Readonly>; + +export declare const deleteIndex: (base: SearchIndex) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const deleteObject: (base: SearchIndex) => (objectID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const deleteObjects: (base: SearchIndex) => (objectIDs: readonly string[], requestOptions?: (RequestOptions & ChunkOptions) | undefined) => Readonly>; + +export declare type DeleteResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare const deleteRule: (base: SearchIndex) => (objectID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const deleteSynonym: (base: SearchIndex) => (objectID: string, requestOptions?: (RequestOptions & DeleteSynonymOptions) | undefined) => Readonly>; + +export declare type DeleteSynonymOptions = { + /** + * If the delete synonym request should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; +}; + +export declare type DictionaryEntriesOptions = { + /** + * Array of dictionary entries + */ + readonly dictionaryEntries: readonly DictionaryEntry[]; +}; + +export declare type DictionaryEntriesResponse = { + /** + * When the given rules got saved. + */ + updatedAt: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare type DictionaryEntry = { + /** + * Unique identifier for the rule (format: [A-Za-z0-9_-]+). + */ + readonly objectID: string; + readonly language: string; + readonly word?: string; + readonly words?: readonly string[]; + readonly decomposition?: readonly string[]; + readonly state?: 'enabled' | 'disabled'; +}; + +export declare type DictionaryName = 'plurals' | 'stopwords' | 'compounds'; + +export declare type DictionarySettings = { + /** + * Disable the builtin Algolia entries for a type of dictionary per language. + */ + readonly disableStandardEntries: RequireAtLeastOne>>; +}; + +export declare const exists: (base: SearchIndex) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type FacetHit = { + /** + * The value of the facet. + */ + readonly value: string; + /** + * The highlighted value. + */ + readonly highlighted: string; + /** + * The count. + */ + readonly count: number; +}; + +export declare const findAnswers: (base: SearchIndex) => (query: string, queryLanguages: readonly string[], requestOptions?: (RequestOptions & FindAnswersOptions) | undefined) => Readonly>>; + +export declare type FindAnswersOptions = { + /** + * Attributes to use for predictions. + * If using the default (["*"]), all attributes are used to find answers. + */ + readonly attributesForPrediction?: readonly string[]; + /** + * Maximum number of answers to retrieve from the Answers Engine. + * Cannot be greater than 1000. + */ + readonly nbHits?: number; + /** + * Threshold for the answers’ confidence score: + * only answers with extracts that score above this threshold are returned. + */ + readonly threshold?: number; + /** + * Whether the attribute name in which the answer was found should be returned. + * This option is expensive in processing time. + */ + readonly returnExtractAttribute?: boolean; + /** + * Algolia search parameters to use to fetch the hits. + * Can be any search parameter, except: + * - attributesToSnippet + * - hitsPerPage + * - queryType + * - naturalLanguages and associated parameters + * (removeStopWords, ignorePlurals, and removeWordsIfNoResults) + */ + readonly searchParameters?: Omit; +}; + +export declare type FindAnswersResponse = Omit, 'hits'> & { + /** + * The hits returned by the search. + * + * Hits are ordered according to the ranking or sorting of the index being queried. + */ + hits: Array>; +}; + +export declare const findObject: (base: SearchIndex) => (callback: (object: TObject & ObjectWithObjectID) => boolean, requestOptions?: (FindObjectOptions & RequestOptions) | undefined) => Readonly>>; + +export declare type FindObjectOptions = { + /** + * If the underlying find object options should paginate + * over a search method. + */ + readonly paginate?: boolean; + /** + * The query used by the underlying find object to + * find the object. + */ + readonly query?: string; +}; + +export declare type FindObjectResponse = { + /** + * The found object. + */ + object: TObject & ObjectWithObjectID; + /** + * The position where the object was found. + */ + position: number; + /** + * The page where the object was found. + */ + page: number; +}; + +export declare const generateSecuredApiKey: () => (parentApiKey: string, restrictions: SecuredApiKeyRestrictions) => string; + +export declare const getApiKey: (base: SearchClient) => (apiKey: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetApiKeyResponse = { + /** + * The api key value + */ + value: string; + /** + * Date of creation (Unix timestamp). + */ + createdAt: number; + /** + * List of permissions the key contains. + */ + acl: ApiKeyACLType[]; + /** + * A Unix timestamp used to define the expiration date of the API key. + */ + validity: number; + /** + * Specify the maximum number of hits this API key can retrieve in one call. + * This parameter can be used to protect you from attempts at retrieving your entire index contents by massively querying the index. + */ + maxHitsPerQuery?: number; + /** + * Specify the maximum number of API calls allowed from an IP address per hour. Each time an API call is performed with this key, a check is performed. + */ + maxQueriesPerIPPerHour?: number; + /** + * Specify the list of targeted indices. You can target all indices starting with a prefix or ending with a suffix using the ‘*’ character. + */ + indexes?: string[]; + /** + * Specify the list of referers. You can target all referers starting with a prefix, ending with a suffix using the ‘*’ character. + */ + referers?: string[]; + /** + * IPv4 network allowed to use the generated key. + * This is used for more protection against API key leaking and reuse. + * Note that you can only provide a single source, but you can specify a range of IPs (e.g., 192.168.1.0/24). + */ + restrictSources?: string; + /** + * Specify the list of query parameters. You can force the query parameters for a query using the url string format. + */ + queryParameters?: string; + /** + * Specify a description of the API key. Used for informative purposes only. It has impact on the functionality of the API key. + */ + description?: string; +}; + +export declare const getAppTask: (base: SearchClient) => (taskID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const getDictionarySettings: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetDictionarySettingsResponse = { + /** + * Disable the builtin Algolia entries for a type of dictionary per language. + */ + readonly disableStandardEntries: RequireAtLeastOne>>; +}; + +export declare const getLogs: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetLogsOptions = { + /** + * The offset. + */ + readonly offset: number; + /** + * The length size. + */ + readonly length: number; +}; + +export declare type GetLogsResponse = { + /** + * The list of logs. + */ + logs: Log[]; +}; + +export declare const getObject: (base: SearchIndex) => (objectID: string, requestOptions?: (RequestOptions & GetObjectOptions) | undefined) => Readonly>; + +export declare type GetObjectOptions = { + /** + * The attributes that should come with witch object. + */ + readonly attributesToRetrieve?: readonly string[]; +}; + +export declare const getObjectPosition: () => (searchResponse: SearchResponse, objectID: string) => number; + +export declare const getObjects: (base: SearchIndex) => (objectIDs: readonly string[], requestOptions?: (RequestOptions & GetObjectsOptions) | undefined) => Readonly>>; + +export declare type GetObjectsOptions = { + /** + * The attributes that should come with witch object. + */ + readonly attributesToRetrieve?: readonly string[]; +}; + +export declare type GetObjectsResponse = { + /** + * The list of results. + */ + results: Array<(TObject & ObjectWithObjectID) | null>; +}; + +export declare const getRule: (base: SearchIndex) => (objectID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const getSecuredApiKeyRemainingValidity: () => (securedApiKey: string) => number; + +export declare const getSettings: (base: SearchIndex) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const getSynonym: (base: SearchIndex) => (objectID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const getTask: (base: SearchIndex) => (taskID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const getTopUserIDs: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type GetTopUserIDsResponse = { + /** + * Mapping of cluster names to top users. + */ + topUsers: Record; +}; + +export declare const getUserID: (base: SearchClient) => (userID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const hasPendingMappings: (base: SearchClient) => (requestOptions?: (HasPendingMappingsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type HasPendingMappingsOptions = { + /** + * If the clusters pending mapping state should be on the response. + * + * @defaultValue false + */ + readonly retrieveMappings?: boolean; + /** + * If the clusters pending mapping state should be on the response. + * + * @defaultValue false + * + * @internal + */ + readonly getClusters?: boolean; +}; + +export declare type HasPendingMappingsResponse = { + /** + * If there is any clusters with pending mapping state. + */ + pending: boolean; + /** + * Describe cluster pending (migrating, creating, deleting) mapping state. + */ + clusters?: { + [key: string]: string[]; + }; +}; + +declare type HighlightMatch = { + readonly value: string; + readonly matchLevel: 'none' | 'partial' | 'full'; + readonly matchedWords: readonly string[]; + readonly fullyHighlighted?: boolean; +}; + +export declare type HighlightResult = THit extends string | number ? HighlightMatch : { + [KAttribute in keyof THit]?: HighlightResult; +}; + +export declare type Hit = THit & { + readonly objectID: string; + readonly _highlightResult?: HighlightResult; + readonly _snippetResult?: SnippetResult; + readonly _rankingInfo?: RankingInfo; + readonly _distinctSeqID?: number; +}; + +export declare type Index = { + /** + * Index name. + */ + readonly name: string; + /** + * Index creation date. (ISO-8601 format) + */ + readonly createdAt: string; + /** + * Date of last update. (ISO-8601 format) + */ + readonly updatedAt: string; + /** + * Number of records contained in the index + */ + readonly entries: number; + /** + * Number of bytes of the index in minified format. + */ + readonly dataSize: number; + /** + * Number of bytes of the index binary file. + */ + readonly fileSize: number; + /** + * Last build time in seconds. + */ + readonly lastBuildTimeS: number; + /** + * Number of pending indexing operations. + */ + readonly numberOfPendingTasks: number; + /** + * A boolean which says whether the index has pending tasks. + */ + readonly pendingTask: boolean; + /** + * Only present if the index is a replica. + * Contains the name of the related primary index. + */ + readonly primary?: string; + /** + * Only present if the index is a primary index with replicas. + * Contains the names of all linked replicas. + */ + readonly replicas?: readonly string[]; +}; + +export declare type IndexOperationResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +/** + * @deprecated please use `Index` instead of `Indice` + */ +export declare type Indice = Index; + +export declare const initIndex: (base: SearchClient) => CreateIndex; + +export declare const listApiKeys: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type ListApiKeysResponse = { + /** + * List of keys + */ + keys: GetApiKeyResponse[]; +}; + +export declare const listClusters: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type ListClustersResponse = { + /** + * List of clusters. + */ + clusters: Cluster[]; +}; + +export declare const listIndices: (base: SearchClient) => (requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type ListIndicesResponse = { + /** + * Number of pages + */ + nbPages: number; + /** + * List of index response + */ + items: Index[]; +}; + +export declare const listUserIDs: (base: SearchClient) => (requestOptions?: (ListUserIDsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type ListUserIDsOptions = { + /** + * Page to fetch. + */ + readonly page?: number; + /** + * Number of users to retrieve per page. + */ + readonly hitsPerPage?: number; +}; + +export declare type ListUserIDsResponse = { + /** + * List of users id. + */ + userIDs: UserIDResponse[]; +}; + +export declare type Log = { + /** + * Timestamp in ISO-8601 format. + */ + readonly timestamp: string; + /** + * Rest type of the method. + */ + readonly method: string; + /** + * Http response code. + */ + readonly answer_code: string; + /** + * Request body. It’s truncated after 1000 characters. + */ + readonly query_body: string; + /** + * Answer body. It’s truncated after 1000 characters. + */ + readonly answer: string; + /** + * Request URL. + */ + readonly url: string; + /** + * Client ip of the call. + */ + readonly ip: string; + /** + * SHA1 ID of entry. + */ + readonly sha1: string; + /** + * Request Headers (API Key is obfuscated). + */ + readonly query_headers: string; + /** + * Number Of Api Calls + */ + readonly nb_api_calls?: string; + /** + * Processing time for the query. This does not include network time. + */ + readonly processing_time_ms: string; + /** + * Number of hits returned for the query. + */ + readonly query_nb_hits?: string; + /** + * Exhaustive flags used during the query. + */ + readonly exhaustive?: boolean; + /** + * Index name of the log + */ + readonly index?: string; + /** + * Internal queries performed for this query. + */ + readonly inner_queries: ReadonlyArray<{ + /** + * Index name of the query. + */ + readonly index_name: string; + /** + * Query ID of the query. + */ + readonly query_id?: string; + /** + * The offset of the query. + */ + readonly offset?: number; + /** + * The user token of the query. + */ + readonly user_token?: string; + }>; +}; + +export declare const moveIndex: (base: SearchClient) => (from: string, to: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const multipleBatch: (base: SearchClient) => (requests: readonly MultipleBatchRequest[], requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type MultipleBatchRequest = { + /** + * The index name where the multiple batch are going to be applied. + */ + readonly indexName: string; + /** + * The action used. + */ + readonly action: BatchActionType; + /** + * The body associated with the request. + */ + readonly body: Record; +}; + +export declare type MultipleBatchResponse = { + /** + * The list of object ids. + */ + objectIDs: string[]; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: Record; +}; + +export declare type MultipleGetObject = { + /** + * The index name. + */ + readonly indexName: string; + /** + * The object id. + */ + readonly objectID: string; + /** + * The attributes that should be returned with the object. + */ + readonly attributesToRetrieve?: readonly string[]; +}; + +export declare const multipleGetObjects: (base: SearchClient) => (requests: readonly MultipleGetObject[], requestOptions?: RequestOptions | undefined) => Readonly>>; + +export declare type MultipleGetObjectsResponse = { + /** + * The list of objects. + */ + results: Array; +}; + +export declare const multipleQueries: (base: SearchClient) => (queries: readonly MultipleQueriesQuery[], requestOptions?: (RequestOptions & MultipleQueriesOptions) | undefined) => Readonly>>; + +export declare type MultipleQueriesOptions = { + readonly strategy?: StrategyType; +}; + +export declare type MultipleQueriesQuery = SharedMultipleQueriesQuery & ({ + readonly type?: 'default'; +} | { + readonly type: 'facet'; + /** + * The facet name. + */ + readonly facet: string; + /** + * The search options. + */ + readonly params?: SharedMultipleQueriesQuery['params'] & { + /** + * The search query used to search the facet attribute. Follows the same rules for an index query: a single character, a partial word, a word, or a phrase. + */ + readonly facetQuery?: string; + }; +}); + +export declare type MultipleQueriesResponse = { + /** + * The list of results. + */ + results: Array | SearchForFacetValuesResponse>; +}; + +export declare const multipleSearchForFacetValues: (base: SearchClient) => (queries: readonly { + readonly indexName: string; + readonly params: SearchForFacetValuesQueryParams & SearchOptions; +}[], requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type ObjectWithObjectID = { + /** + * The object id of the object. + */ + readonly objectID: string; +}; + +export declare const partialUpdateObject: (base: SearchIndex) => (object: Record, requestOptions?: (RequestOptions & ChunkOptions & PartialUpdateObjectsOptions) | undefined) => Readonly>; + +export declare type PartialUpdateObjectResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The object id updated. + */ + objectID: string; +}; + +export declare const partialUpdateObjects: (base: SearchIndex) => (objects: readonly Record[], requestOptions?: (RequestOptions & ChunkOptions & PartialUpdateObjectsOptions) | undefined) => Readonly>; + +export declare type PartialUpdateObjectsOptions = { + /** + * If the object should be created when does not exist. + */ + readonly createIfNotExists?: boolean; +}; + +export declare type RankingInfo = { + readonly promoted: boolean; + readonly nbTypos: number; + readonly firstMatchedWord: number; + readonly proximityDistance?: number; + readonly geoDistance: number; + readonly geoPrecision?: number; + readonly nbExactWords: number; + readonly words: number; + readonly filters: number; + readonly userScore: number; + readonly matchedGeoLocation?: { + readonly lat: number; + readonly lng: number; + readonly distance: number; + }; + readonly personalization?: { + readonly filtersScore: number; + readonly rankingScore: number; + readonly score: number; + }; + readonly promotedByReRanking?: boolean; +}; + +export declare type RedirectRuleIndexMetadata = { + /** + * Source index for the redirect rule + */ + readonly source: string; + /** + * Destination index for the redirect rule + */ + readonly dest: string; + /** + * Reason for the redirect rule + */ + readonly reason: string; + /** + * Status for the redirect rule + */ + readonly succeed: boolean; + /** + * Data for the redirect rule + */ + readonly data: { + /** + * Rule objectId + */ + readonly ruleObjectID: string; + }; +}; + +export declare const removeUserID: (base: SearchClient) => (userID: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type RemoveUserIDResponse = { + /** + * When the given `userID` got removed. + */ + deletedAt: string; +}; + +export declare const replaceAllObjects: (base: SearchIndex) => (objects: readonly Readonly>[], requestOptions?: (ReplaceAllObjectsOptions & ChunkOptions & SaveObjectsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type ReplaceAllObjectsOptions = { + /** + * If the all objects should be replaced using wait operations. Keep + * in mind that, when the `safe` option is used, the operation may + * take a little more than expected. + */ + readonly safe?: boolean; +}; + +export declare const replaceAllRules: (base: SearchIndex) => (rules: readonly Rule[], requestOptions?: (RequestOptions & SaveRulesOptions) | undefined) => Readonly>; + +export declare const replaceAllSynonyms: (base: SearchIndex) => (synonyms: readonly Synonym[], requestOptions?: (RequestOptions & Pick) | undefined) => Readonly>; + +export declare const replaceDictionaryEntries: (base: SearchClient) => (dictionary: DictionaryName, entries: readonly DictionaryEntry[], requestOptions?: (RequestOptions & DictionaryEntriesOptions) | undefined) => Readonly>; + +export declare type RequireAtLeastOne = { + [TKey in keyof TType]-?: Required> & Partial>>; +}[keyof TType]; + +export declare const restoreApiKey: (base: SearchClient) => (apiKey: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type RestoreApiKeyResponse = { + /** + * Restoration date of the API key. + */ + createdAt: string; +}; + +export declare type Rule = { + /** + * Unique identifier for the rule (format: [A-Za-z0-9_-]+). + */ + readonly objectID: string; + /** + * Condition of the rule, expressed using the following variables: pattern, anchoring, context. + * + * @deprecated This parameter is deprecated in favor of `conditions`. + */ + readonly condition?: Condition; + /** + * Conditions of the rule, expressed using the following variables: pattern, anchoring, context. + */ + readonly conditions?: readonly Condition[]; + /** + * Consequence of the rule. At least one of the following object must be used: params, promote, hide, userData. + */ + readonly consequence?: Consequence; + /** + * This field is intended for rule management purposes, in particular to ease searching for rules and presenting them to human readers. It is not interpreted by the API. + */ + readonly description?: string; + /** + * Whether the rule is enabled. Disabled rules remain in the index, but are not applied at query time. + */ + readonly enabled?: boolean; + /** + * By default, rules are permanently valid. When validity periods are specified, the rule applies only during those periods; it is ignored the rest of the time. + * The list must not be empty. + */ + readonly validity?: readonly TimeRange[]; +}; + +export declare const saveDictionaryEntries: (base: SearchClient) => (dictionary: DictionaryName, entries: readonly DictionaryEntry[], requestOptions?: (RequestOptions & DictionaryEntriesOptions) | undefined) => Readonly>; + +export declare const saveObject: (base: SearchIndex) => (object: Readonly>, requestOptions?: (RequestOptions & ChunkOptions & SaveObjectsOptions) | undefined) => Readonly>; + +export declare type SaveObjectResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * The object id saved. + */ + objectID: string; +}; + +export declare const saveObjects: (base: SearchIndex) => (objects: readonly Readonly>[], requestOptions?: (RequestOptions & ChunkOptions & SaveObjectsOptions) | undefined) => Readonly>; + +export declare type SaveObjectsOptions = { + /** + * If the object id should be generated when does not exists. + */ + readonly autoGenerateObjectIDIfNotExist?: boolean; +}; + +export declare const saveRule: (base: SearchIndex) => (rule: Rule, requestOptions?: (RequestOptions & SaveRulesOptions) | undefined) => Readonly>; + +export declare type SaveRuleResponse = { + /** + * When the given rules got saved. + */ + updatedAt: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare const saveRules: (base: SearchIndex) => (rules: readonly Rule[], requestOptions?: (RequestOptions & SaveRulesOptions) | undefined) => Readonly>; + +export declare type SaveRulesOptions = { + /** + * If the saved rules should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; + /** + * If the existing rules should be removed. + */ + readonly clearExistingRules?: boolean; +}; + +export declare type SaveRulesResponse = { + /** + * When the given rules got saved. + */ + updatedAt: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare const saveSynonym: (base: SearchIndex) => (synonym: Synonym, requestOptions?: (RequestOptions & SaveSynonymsOptions) | undefined) => Readonly>; + +export declare type SaveSynonymResponse = { + /** + * When the given synonyms got saved. + */ + updatedAt: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare const saveSynonyms: (base: SearchIndex) => (synonyms: readonly Synonym[], requestOptions?: (SaveSynonymsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type SaveSynonymsOptions = { + /** + * If the saved synonyms should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; + /** + * If the existing synonyms should be removed. + * @deprecated use clearExistingSynonyms + */ + readonly replaceExistingSynonyms?: boolean; + /** + * If the existing synonyms should be removed. + */ + readonly clearExistingSynonyms?: boolean; +}; + +export declare type SaveSynonymsResponse = { + /** + * When the given synonyms got saved. + */ + updatedAt: number; + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; +}; + +export declare const ScopeEnum: Readonly>; + +export declare type ScopeType = 'settings' | 'synonyms' | 'rules'; + +export declare const search: (base: SearchIndex) => (query: string, requestOptions?: (RequestOptions & SearchOptions) | undefined) => Readonly>>; + +export declare type SearchClient = { + /** + * The application id. + */ + readonly appId: string; + /** + * The underlying transporter. + */ + readonly transporter: Transporter; + /** + * Mutates the transporter, adding the given user agent. + */ + readonly addAlgoliaAgent: (segment: string, version?: string) => void; + /** + * Clears both requests and responses caches. + */ + readonly clearCache: () => Readonly>; +}; + +export declare type SearchClientOptions = { + /** + * The application id. + */ + readonly appId: string; + /** + * The api key. + */ + readonly apiKey: string; + /** + * The auth mode type. In browser environments credentials may + * be passed within the headers. + */ + readonly authMode?: AuthModeType; +}; + +export declare const searchDictionaryEntries: (base: SearchClient) => (dictionary: DictionaryName, query: string, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare type SearchDictionaryEntriesResponse = { + /** + * The dictionary entries returned by the search. + */ + hits: DictionaryEntry[]; + /** + * Index of the current page (zero-based). + */ + page: number; + /** + * Number of dictionary entries matched by the query. + */ + nbHits: number; + /** + * Number of pages returned. + * + * Calculation is based on the total number of hits (nbHits) divided by the + * number of hits per page (hitsPerPage), rounded up to the nearest integer. + */ + nbPages: number; +}; + +export declare const searchForFacetValues: (base: SearchIndex) => (facetName: string, facetQuery: string, requestOptions?: (RequestOptions & SearchOptions) | undefined) => Readonly>; + +export declare type SearchForFacetValuesQueryParams = { + /** + * The facet name. + */ + readonly facetName: string; + /** + * The facet query. + */ + readonly facetQuery: string; +}; + +export declare type SearchForFacetValuesResponse = { + /** + * The list of facet hits. + */ + facetHits: FacetHit[]; + /** + * The exhaustive facets count. + */ + exhaustiveFacetsCount: boolean; + /** + * The time that the API toke the process the request. + */ + processingTimeMS?: number; +}; + +export declare type SearchIndex = { + /** + * The application id. + */ + readonly appId: string; + /** + * The index name. + */ + readonly indexName: string; + /** + * The underlying transporter. + */ + readonly transporter: Transporter; +}; + +export declare type SearchOptions = { + /** + * Create a new query with an empty search query. + */ + readonly query?: string; + /** + * Allows a search for similar objects, but the query has to be constructed on your end and included alongside an empty query. + * + * The similarQuery should be made from the tags and keywords of the relevant object. + */ + readonly similarQuery?: string; + /** + * Filter hits by facet value. + */ + readonly facetFilters?: string | readonly string[] | ReadonlyArray; + /** + * Create filters for ranking purposes, where records that match the filter are ranked highest. + */ + readonly optionalFilters?: string | readonly string[] | ReadonlyArray; + /** + * Filter on numeric attributes. + */ + readonly numericFilters?: string | readonly string[] | ReadonlyArray; + /** + * Filter hits by tags. tagFilters is a different way of filtering, which relies on the _tags + * attribute. It uses a simpler syntax than filters. You can use it when you want to do + * simple filtering based on tags. + */ + readonly tagFilters?: string | readonly string[] | ReadonlyArray; + /** + * Determines how to calculate the total score for filtering. + */ + readonly sumOrFiltersScores?: boolean; + /** + * Filter the query with numeric, facet and/or tag filters. + */ + readonly filters?: string; + /** + * Specify the page to retrieve. + */ + readonly page?: number; + /** + * Set the number of hits per page. + */ + readonly hitsPerPage?: number; + /** + * Specify the offset of the first hit to return. + */ + readonly offset?: number; + /** + * Set the number of hits to retrieve (used only with offset). + */ + readonly length?: number; + /** + * List of attributes to highlight. + */ + readonly attributesToHighlight?: readonly string[]; + /** + * List of attributes to snippet, with an optional maximum number of words to snippet. + */ + readonly attributesToSnippet?: readonly string[]; + /** + * Gives control over which attributes to retrieve and which not to retrieve. + */ + readonly attributesToRetrieve?: readonly string[]; + /** + * The HTML string to insert before the highlighted parts in all highlight and snippet results. + */ + readonly highlightPreTag?: string; + /** + * The HTML string to insert after the highlighted parts in all highlight and snippet results + */ + readonly highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + */ + readonly snippetEllipsisText?: string; + /** + * Restrict highlighting and snippeting to items that matched the query. + */ + readonly restrictHighlightAndSnippetArrays?: boolean; + /** + * Facets to retrieve. + */ + readonly facets?: readonly string[]; + /** + * Maximum number of facet values to return for each facet during a regular search. + */ + readonly maxValuesPerFacet?: number; + /** + * Force faceting to be applied after de-duplication (via the Distinct setting). + */ + readonly facetingAfterDistinct?: boolean; + /** + * Minimum number of characters a word in the query string must contain to accept matches with 1 typo + */ + readonly minWordSizefor1Typo?: number; + /** + * Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + */ + readonly minWordSizefor2Typos?: number; + /** + * Whether to allow typos on numbers (“numeric tokens”) in the query string. + */ + readonly allowTyposOnNumericTokens?: boolean; + /** + * List of attributes on which you want to disable typo tolerance. + */ + readonly disableTypoToleranceOnAttributes?: readonly string[]; + /** + * Controls if and how query words are interpreted as prefixes. + */ + readonly queryType?: 'prefixLast' | 'prefixAll' | 'prefixNone'; + /** + * Selects a strategy to remove words from the query when it doesn’t match any hits. + */ + readonly removeWordsIfNoResults?: 'none' | 'lastWords' | 'firstWords' | 'allOptional'; + /** + * Enables the advanced query syntax. + */ + readonly advancedSyntax?: boolean; + /** + * AdvancedSyntaxFeatures can be exactPhrase or excludeWords + */ + readonly advancedSyntaxFeatures?: ReadonlyArray<'exactPhrase' | 'excludeWords'>; + /** + * A list of words that should be considered as optional when found in the query. + */ + readonly optionalWords?: string | readonly string[]; + /** + * List of attributes on which you want to disable the exact ranking criterion. + */ + readonly disableExactOnAttributes?: readonly string[]; + /** + * Controls how the exact ranking criterion is computed when the query contains only one word. + */ + readonly exactOnSingleWordQuery?: 'attribute' | 'none' | 'word'; + /** + * List of alternatives that should be considered an exact match by the exact ranking criterion. + */ + readonly alternativesAsExact?: ReadonlyArray<'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym'>; + /** + * Whether rules should be globally enabled. + */ + readonly enableRules?: boolean; + /** + * Enables contextual rules. + */ + readonly ruleContexts?: readonly string[]; + /** + * Enables de-duplication or grouping of results. + */ + readonly distinct?: boolean | number; + /** + * Whether the current query will be taken into account in the Analytics + */ + readonly analytics?: boolean; + /** + * List of tags to apply to the query in the analytics. + */ + readonly analyticsTags?: readonly string[]; + /** + * Whether to take into account an index’s synonyms for a particular search. + */ + readonly synonyms?: boolean; + /** + * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + */ + readonly replaceSynonymsInHighlight?: boolean; + /** + * Precision of the proximity ranking criterion. + */ + readonly minProximity?: number; + /** + * Choose which fields the response will contain. Applies to search and browse queries. + */ + readonly responseFields?: readonly string[]; + /** + * Maximum number of facet hits to return during a search for facet values. + */ + readonly maxFacetHits?: number; + /** + * Whether to include or exclude a query from the processing-time percentile computation. + */ + readonly percentileComputation?: boolean; + /** + * Enable the Click Analytics feature. + */ + readonly clickAnalytics?: boolean; + /** + * The `personalizationImpact` parameter sets the percentage of the impact that personalization has on ranking records. The + * value must be between 0 and 100 (inclusive). This parameter will not be taken into account if `enablePersonalization` + * is **false**. + */ + readonly personalizationImpact?: number; + /** + * Enable personalization for the query + */ + readonly enablePersonalization?: boolean; + /** + * Restricts a given query to look in only a subset of your searchable attributes. + */ + readonly restrictSearchableAttributes?: readonly string[]; + /** + * Controls how facet values are sorted. + */ + readonly sortFacetValuesBy?: 'count' | 'alpha'; + /** + * Controls whether typo tolerance is enabled and how it is applied. + */ + readonly typoTolerance?: boolean | 'min' | 'strict'; + /** + * Search for entries around a central geolocation, enabling a geo search within a circular area. + */ + readonly aroundLatLng?: string; + /** + * Search for entries around a given location automatically computed from the requester’s IP address. + */ + readonly aroundLatLngViaIP?: boolean; + /** + * Define the maximum radius for a geo search (in meters). + */ + readonly aroundRadius?: number | 'all'; + /** + * Precision of geo search (in meters), to add grouping by geo location to the ranking formula. + */ + readonly aroundPrecision?: number | ReadonlyArray<{ + readonly from: number; + readonly value: number; + }>; + /** + * Minimum radius (in meters) used for a geo search when aroundRadius is not set. + */ + readonly minimumAroundRadius?: number; + /** + * Search inside a rectangular area (in geo coordinates). + */ + readonly insideBoundingBox?: ReadonlyArray | string; + /** + * Search inside a polygon (in geo coordinates). + */ + readonly insidePolygon?: ReadonlyArray; + /** + * Treats singular, plurals, and other forms of declensions as matching terms. + */ + readonly ignorePlurals?: boolean | readonly string[]; + /** + * Removes stop (common) words from the query before executing it. + */ + readonly removeStopWords?: boolean | readonly string[]; + /** + * List of supported languages with their associated language ISO code. + * + * Apply a set of natural language best practices such as ignorePlurals, + * removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. + */ + readonly naturalLanguages?: readonly string[]; + /** + * When true, each hit in the response contains an additional _rankingInfo object. + */ + readonly getRankingInfo?: boolean; + /** + * A user identifier. + * Format: alpha numeric string [a-zA-Z0-9_-] + * Length: between 1 and 64 characters. + */ + readonly userToken?: string; + /** + * Can be to enable or disable A/B tests at query time. + * Engine's default: true + */ + readonly enableABTest?: boolean; + /** + * Enable word segmentation (also called decompounding) at query time for + * compatible languages. For example, this turns the Dutch query + * "spaanplaatbehang" into "spaan plaat behang" to retrieve more relevant + * results. + */ + readonly decompoundQuery?: boolean; + /** + * The relevancy threshold to apply to search in a virtual index [0-100]. A Bigger + * value means fewer, but more relevant results, smaller value means more, but + * less relevant results. + */ + readonly relevancyStrictness?: number; + /** + * Whether this search should use Dynamic Re-Ranking. + * @link https://www.algolia.com/doc/guides/algolia-ai/re-ranking/ + * + * Note: You need to turn on Dynamic Re-Ranking on your index for it to have an effect on + * your search results. You can do this through the Re-Ranking page on the dashboard. + * This parameter is only used to turn off Dynamic Re-Ranking (with false) at search time. + */ + readonly enableReRanking?: boolean; + /** + * When Dynamic Re-Ranking is enabled, only records that match these filters will be impacted by Dynamic Re-Ranking. + */ + readonly reRankingApplyFilter?: string | readonly string[] | ReadonlyArray | null; + /** + * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + */ + readonly queryLanguages?: readonly string[]; + /** + * Enriches the API’s response with meta-information as to how the query was processed. + */ + readonly explain?: readonly string[]; +}; + +export declare type SearchResponse = { + /** + * The hits returned by the search. + * + * Hits are ordered according to the ranking or sorting of the index being queried. + */ + hits: Array>; + /** + * Index of the current page (zero-based). + */ + page: number; + /** + * Number of hits returned (used only with offset) + */ + length?: number; + /** + * The offset of the first hit to returned. + */ + offset?: number; + /** + * Number of hits matched by the query. + */ + nbHits: number; + /** + * Subset of hits selected when relevancyStrictness is applied. + */ + nbSortedHits?: number; + /** + * Number of pages returned. + * + * Calculation is based on the total number of hits (nbHits) divided by the + * number of hits per page (hitsPerPage), rounded up to the nearest integer. + */ + nbPages: number; + /** + * Maximum number of hits returned per page. + */ + hitsPerPage: number; + /** + * Time the server took to process the request, in milliseconds. This does not include network time. + */ + processingTimeMS: number; + /** + * Whether the nbHits is exhaustive (true) or approximate (false). + * + * An approximation is done when the query takes more than 50ms to be + * processed (this can happen when using complex filters on millions on records). + */ + exhaustiveNbHits: boolean; + /** + * Whether the facet count is exhaustive (true) or approximate (false). + */ + exhaustiveFacetsCount?: boolean; + /** + * A mapping of each facet name to the corresponding facet counts. + */ + facets?: Record>; + /** + * Statistics for numerical facets. + */ + facets_stats?: Record; + /** + * The query used to search. Accepts every character, and every character entered will be used in the search. + * + * An empty query can be used to fetch all records. + */ + query: string; + /** + * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set. + */ + queryAfterRemoval?: string; + /** + * A url-encoded string of all search parameters. + */ + params: string; + /** + * Unique identifier of the search query, to be sent in Insights methods. This identifier links events back to the search query it represents. + * + * Returned only if clickAnalytics is true. + */ + queryID?: string; + /** + * Used to return warnings about the query. + */ + message?: string; + /** + * The computed geo location. + * + * Format: "lat,lng", where the latitude and longitude are expressed as decimal floating point number. + */ + aroundLatLng?: string; + /** + * The automatically computed radius. + */ + automaticRadius?: string; + /** + * Actual host name of the server that processed the request. + * + * Our DNS supports automatic failover and load balancing, so this may differ from the host name used in the request. + */ + serverUsed?: string; + /** + * Index name used for the query. + */ + index?: string; + /** + * Index name used for the query. In case of AB test, the index targetted isn’t always the index used by the query. + */ + indexUsed?: string; + /** + * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. + */ + abTestID?: number; + /** + * In case of AB test, reports the variant ID used. The variant ID is the position in the array of variants (starting at 1). + */ + abTestVariantID?: number; + /** + * The query string that will be searched, after normalization. + */ + parsedQuery?: string; + /** + * Custom user data. + */ + userData?: any; + /** + * Rules applied to the query. + */ + appliedRules?: Array>; + /** + * The explanation of the decompounding at query time. + */ + explain?: { + /** + * The explain query match. + */ + match: { + /** + * The explain query match alternatives. + */ + alternatives: Array<{ + /** + * The alternative type. + */ + types: string[]; + /** + * The list of alternative words. + */ + words: string[]; + /** + * The number of typos. + */ + typos: number; + /** + * The offset. + */ + offset: number; + /** + * The length. + */ + length: number; + }>; + }; + /** + * Query parameter reporting. Parameters are reported + * as a JSON object with one field per parameter. + */ + params?: Record; + /** + * This parameter is for internal use only. + */ + redirect?: { + index?: RedirectRuleIndexMetadata[]; + }; + }; + /** + * The relevancy threshold applied to search in a virtual index. + */ + appliedRelevancyStrictness?: number; + renderingContent?: Settings['renderingContent']; +}; + +export declare const searchRules: (base: SearchIndex) => (query: string, requestOptions?: (RequestOptions & SearchRulesOptions) | undefined) => Readonly>>; + +export declare type SearchRulesOptions = { + /** + * Full text query. + */ + readonly query?: string; + /** + * When specified, restricts matches to rules with a specific anchoring type. When omitted, all anchoring types may match. + */ + readonly anchoring?: string; + /** + * Restricts matches to contextual rules with a specific context (exact match). + */ + readonly context?: string; + /** + * Requested page (zero-based). + */ + readonly page?: number; + /** + * Maximum number of hits in a page. Minimum is 1, maximum is 1000. + */ + readonly hitsPerPage?: number; + /** + * When specified, restricts matches to rules with a specific enabled status. + * When absent (default), all rules are retrieved, regardless of their enabled status. + */ + readonly enabled?: boolean; +}; + +export declare const searchSynonyms: (base: SearchIndex) => (query: string, requestOptions?: (SearchSynonymsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type SearchSynonymsOptions = { + /** + * The synonym type. + */ + readonly type?: string; + /** + * Page to retrieve. + */ + readonly page?: number; + /** + * Number of hits per page. + */ + readonly hitsPerPage?: number; +}; + +export declare type SearchSynonymsResponse = { + /** + * The list of synonyms. + */ + hits: Synonym[]; + /** + * The number of synonyms on the list. + */ + nbHits: number; +}; + +export declare const searchUserIDs: (base: SearchClient) => (query: string, requestOptions?: (SearchUserIDsOptions & RequestOptions) | undefined) => Readonly>; + +export declare type SearchUserIDsOptions = { + /** + * If specified, only clusters assigned to this cluster can be returned. + * */ + readonly cluster?: string; + /** + * Page to fetch. + */ + readonly page?: number; + /** + * Number of users to return by page. + */ + readonly hitsPerPage?: number; +}; + +export declare type SearchUserIDsResponse = { + /** + * List of userID matching the query. + */ + hits: UserIDResponse[]; + /** + * Current page. + */ + page: number; + /** + * Number of userIDs matching the query. + */ + nbHits: number; + /** + * Number of hits retrieved per page. + */ + hitsPerPage: number; + /** + * Timestamp of the last update of the index. + */ + updatedAt: number; +}; + +export declare type SecuredApiKeyRestrictions = SearchOptions & { + /** + * A Unix timestamp used to define the expiration date of the API key. + */ + readonly validUntil?: number; + /** + * List of index names that can be queried. + */ + readonly restrictIndices?: readonly string[] | string; + /** + * IPv4 network allowed to use the generated key. This is used for more protection against API key leaking and reuse. + */ + readonly restrictSources?: string; + /** + * Specify a user identifier. This is often used with rate limits. + */ + readonly userToken?: string; +}; + +export declare const setDictionarySettings: (base: SearchClient) => (settings: DictionarySettings, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const setSettings: (base: SearchIndex) => (settings: Settings, requestOptions?: (RequestOptions & SetSettingsOptions) | undefined) => Readonly>; + +export declare type SetSettingsOptions = { + /** + * If the saved settings should be forward to replicas. + */ + readonly forwardToReplicas?: boolean; +}; + +export declare type SetSettingsResponse = { + /** + * The operation task id. May be used to perform a wait task. + */ + taskID: number; + /** + * When the settings got updated. + */ + updatedAt: number; +}; + +export declare type Settings = { + /** + * The complete list of attributes that will be used for searching. + */ + readonly searchableAttributes?: readonly string[]; + /** + * @deprecated Use `searchableAttributes` instead. + */ + readonly attributesToIndex?: readonly string[]; + /** + * The complete list of attributes that will be used for faceting. + */ + readonly attributesForFaceting?: readonly string[]; + /** + * List of attributes that cannot be retrieved at query time. + */ + readonly unretrievableAttributes?: readonly string[]; + /** + * Gives control over which attributes to retrieve and which not to retrieve. + */ + readonly attributesToRetrieve?: readonly string[]; + /** + * Controls the way results are sorted. + */ + readonly ranking?: readonly string[]; + /** + * Specifies the custom ranking criterion. + */ + readonly customRanking?: readonly string[]; + /** + * Creates replicas, exact copies of an index. + */ + readonly replicas?: readonly string[]; + /** + * @deprecated Use `replicas` instead. + */ + readonly slaves?: readonly string[]; + /** + * The primary parameter is automatically added to a replica's settings when the replica is created and cannot be modified. + * + * Can not be setted. + */ + readonly primary?: string; + /** + * Maximum number of facet values to return for each facet during a regular search. + */ + readonly maxValuesPerFacet?: number; + /** + * Controls how facet values are sorted. + */ + readonly sortFacetValuesBy?: 'count' | 'alpha'; + /** + * List of attributes to highlight. + */ + readonly attributesToHighlight?: readonly string[]; + /** + * List of attributes to snippet, with an optional maximum number of words to snippet. + */ + readonly attributesToSnippet?: readonly string[]; + /** + * The HTML string to insert before the highlighted parts in all highlight and snippet results. + */ + readonly highlightPreTag?: string; + /** + * The HTML string to insert after the highlighted parts in all highlight and snippet results. + */ + readonly highlightPostTag?: string; + /** + * String used as an ellipsis indicator when a snippet is truncated. + */ + readonly snippetEllipsisText?: string; + /** + * Restrict highlighting and snippeting to items that matched the query. + */ + readonly restrictHighlightAndSnippetArrays?: boolean; + /** + * Set the number of hits per page. + */ + readonly hitsPerPage?: number; + /** + * Set the maximum number of hits accessible via pagination. + */ + readonly paginationLimitedTo?: number; + /** + * Minimum number of characters a word in the query string must contain to accept matches with 1 typo. + */ + readonly minWordSizefor1Typo?: number; + /** + * Minimum number of characters a word in the query string must contain to accept matches with 2 typos. + */ + readonly minWordSizefor2Typos?: number; + /** + * Controls whether typo tolerance is enabled and how it is applied. + */ + readonly typoTolerance?: string | boolean; + /** + * hether to allow typos on numbers (“numeric tokens”) in the query string. + */ + readonly allowTyposOnNumericTokens?: boolean; + /** + * List of attributes on which you want to disable typo tolerance. + */ + readonly disableTypoToleranceOnAttributes?: readonly string[]; + /** + * List of words on which you want to disable typo tolerance. + */ + readonly disableTypoToleranceOnWords?: readonly string[]; + /** + * Control which separators are indexed. + */ + readonly separatorsToIndex?: string; + /** + * Treats singular, plurals, and other forms of declensions as matching terms. + */ + readonly ignorePlurals?: readonly string[] | boolean; + /** + * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection. + */ + readonly queryLanguages?: readonly string[]; + /** + * A list of language ISO code. + */ + readonly indexLanguages?: readonly string[]; + /** + * Whether rules should be globally enabled. + */ + readonly enableRules?: boolean; + /** + * Controls if and how query words are interpreted as prefixes. + */ + readonly queryType?: 'prefixLast' | 'prefixAll' | 'prefixNone'; + /** + * Selects a strategy to remove words from the query when it doesn’t match any hits. + */ + readonly removeWordsIfNoResults?: 'none' | 'lastWords' | 'firstWords' | 'allOptional'; + /** + * Enables the advanced query syntax. + */ + readonly advancedSyntax?: boolean; + /** + * AdvancedSyntaxFeatures can be exactPhrase or excludeWords + */ + readonly advancedSyntaxFeatures?: ReadonlyArray<'exactPhrase' | 'excludeWords'>; + /** + * A list of words that should be considered as optional when found in the query. + */ + readonly optionalWords?: readonly string[]; + /** + * List of attributes on which you want to disable prefix matching. + */ + readonly disablePrefixOnAttributes?: readonly string[]; + /** + * List of attributes on which you want to disable the exact ranking criterion. + */ + readonly disableExactOnAttributes?: readonly string[]; + /** + * Controls how the exact ranking criterion is computed when the query contains only one word. + */ + readonly exactOnSingleWordQuery?: 'attribute' | 'none' | 'word'; + /** + * List of alternatives that should be considered an exact match by the exact ranking criterion. + */ + readonly alternativesAsExact?: ReadonlyArray<'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym'>; + /** + * Removes stop (common) words from the query before executing it. + */ + readonly removeStopWords?: boolean | readonly string[]; + /** + * List of numeric attributes that can be used as numerical filters. + */ + readonly numericAttributesForFiltering?: readonly string[]; + /** + * Enables compression of large integer arrays. + */ + readonly allowCompressionOfIntegerArray?: boolean; + /** + * Name of the de-duplication attribute to be used with the distinct feature. + */ + readonly attributeForDistinct?: string; + /** + * Enables de-duplication or grouping of results. + */ + readonly distinct?: boolean | number; + /** + * Whether to highlight and snippet the original word that matches the synonym or the synonym itself. + */ + readonly replaceSynonymsInHighlight?: boolean; + /** + * Allows proximity to impact which searchable attribute is matched in the attribute ranking stage. + */ + readonly attributeCriteriaComputedByMinProximity?: boolean; + /** + * Precision of the proximity ranking criterion. + */ + readonly minProximity?: number; + /** + * Choose which fields the response will contain. Applies to search and browse queries. + */ + readonly responseFields?: readonly string[]; + /** + * Maximum number of facet hits to return during a search for facet values. + */ + readonly maxFacetHits?: number; + /** + * List of attributes on which to do a decomposition of camel case words. + */ + readonly camelCaseAttributes?: readonly string[]; + /** + * Specify on which attributes in your index Algolia should apply word-splitting (“decompounding”) + */ + readonly decompoundedAttributes?: Readonly>; + /** + * Characters that should not be automatically normalized by the search engine. + */ + readonly keepDiacriticsOnCharacters?: string; + /** + * Overrides Algolia's default normalization. + */ + readonly customNormalization?: Readonly>>>; + /** + * Enable personalization for queries by default + */ + readonly enablePersonalization?: boolean; + /** + * Custom userData that could be added to the Settings. + */ + readonly userData?: any; + /** + * Enable word segmentation (also called decompounding) at query time for + * compatible languages. For example, this turns the Dutch query + * "spaanplaatbehang" into "spaan plaat behang" to retrieve more relevant + * results. + */ + readonly decompoundQuery?: boolean; + /** + * Specify on which attributes in your index Algolia should apply Japanese + * transliteration to make words indexed in Katakana or Kanji searchable in Hiragana. + */ + readonly attributesToTransliterate?: readonly string[]; + /** + * The relevancy threshold to apply to search in a virtual index [0-100]. A Bigger + * value means fewer, but more relevant results, smaller value means more, but + * less relevant results. + */ + readonly relevancyStrictness?: number; + /** + * The search mode that the index will use to query for results. + */ + readonly mode?: 'neuralSearch' | 'keywordSearch'; + /** + * The settings relevant for configuration of the semantic search engine. + * These settings are only used when the mode is set to 'neuralSearch'. + */ + readonly semanticSearch?: { + /** + * When null, the current index / replica group will be used as the event source. + */ + readonly eventSources?: readonly string[] | null; + }; + /** + * Content defining how the search interface should be rendered. + * This is set via the settings for a default value and can be overridden via rules + */ + readonly renderingContent?: { + /** + * defining how facets should be ordered + */ + readonly facetOrdering?: { + /** + * the ordering of facets (widgets) + */ + readonly facets?: { + /** + * pinned order of facet lists + */ + readonly order?: readonly string[]; + }; + /** + * the ordering of facet values, within an individual list + */ + readonly values?: { + readonly [facet: string]: { + /** + * pinned order of facet values + */ + readonly order?: readonly string[]; + /** + * How to display the remaining items. + * - facet count (descending) + * - alphabetical (ascending) + * - hidden (show only pinned values) + */ + readonly sortRemainingBy?: 'count' | 'alpha' | 'hidden'; + }; + }; + }; + }; + /** + * Whether this index should use Dynamic Re-Ranking. + * @link https://www.algolia.com/doc/guides/algolia-ai/re-ranking/ + * + * Note: You need to turn on Dynamic Re-Ranking on your index for it to have an effect on + * your search results. You can do this through the Re-Ranking page on the dashboard. + */ + readonly enableReRanking?: boolean; + /** + * When Dynamic Re-Ranking is enabled, only records that match these filters will be impacted by Dynamic Re-Ranking. + */ + readonly reRankingApplyFilter?: string | readonly string[] | ReadonlyArray | null; +}; + +declare type SharedMultipleQueriesQuery = { + /** + * The type of query to perform. + * + * @defaultValue "default" + */ + readonly type?: 'default' | 'facet'; + /** + * The index name. + */ + readonly indexName: string; + /** + * The search options. + */ + readonly params?: SearchOptions; + /** + * The query associated with the request. + */ + readonly query?: string; +}; + +declare type SnippetMatch = { + readonly value: string; + readonly matchLevel: 'none' | 'partial' | 'full'; +}; + +export declare type SnippetResult = THit extends string | number ? SnippetMatch : { + [KAttribute in keyof THit]: SnippetResult; +}; + +export declare const StrategyEnum: Readonly>; + +export declare type StrategyType = 'none' | 'stopIfEnoughMatches'; + +export declare type Synonym = { + /** + * Synonym object ID. + */ + readonly objectID: string; + /** + * There are 4 synonym types. The parameter can be one of the following value. + */ + readonly type: SynonymType; + /** + * A list of synonyms. + */ + readonly synonyms?: readonly string[]; + /** + * Defines the synonym. A word or expression, used as the basis for the array of synonyms. + */ + readonly input?: string; + /** + * A single word, used as the basis for the below array of corrections. + */ + readonly word?: string; + /** + * An list of corrections of the word. + */ + readonly corrections?: readonly string[]; + /** + * A single word, used as the basis for the below list of replacements. + */ + readonly placeholder?: string; + /** + * An list of replacements of the placeholder. + */ + readonly replacements?: readonly string[]; +}; + +export declare const SynonymEnum: Readonly>; + +export declare type SynonymType = 'synonym' | 'oneWaySynonym' | 'altCorrection1' | 'altCorrection2' | 'placeholder'; + +export declare type TaskStatusResponse = { + /** + * The operation status. When the value is `published` the + * operation is completed. + */ + status: string; + /** + * If the operation is pending. + */ + pendingTask: boolean; +}; + +export declare type TimeRange = { + /** + * DateTime with UTC offset for Serialization/Deserialization in unix timespan. + */ + readonly from: number; + /** + * DateTime with UTC offset for Serialization/Deserialization in unix timespan. + */ + readonly until: number; +}; + +export declare const updateApiKey: (base: SearchClient) => (apiKey: string, requestOptions?: (UpdateApiKeyOptions & Pick) | undefined) => Readonly>; + +export declare type UpdateApiKeyOptions = { + /** + * List of permissions the key contains. + */ + readonly acl?: readonly ApiKeyACLType[]; + /** + * A Unix timestamp used to define the expiration date of the API key. + */ + readonly validity?: number; + /** + * Specify the maximum number of hits this API key can retrieve in one call. + * This parameter can be used to protect you from attempts at retrieving your entire index contents by massively querying the index. + */ + readonly maxHitsPerQuery?: number; + /** + * Specify the maximum number of API calls allowed from an IP address per hour. Each time an API call is performed with this key, a check is performed. + */ + readonly maxQueriesPerIPPerHour?: number; + /** + * Specify the list of targeted indices. You can target all indices starting with a prefix or ending with a suffix using the ‘*’ character. + */ + readonly indexes?: readonly string[]; + /** + * Specify the list of referers. You can target all referers starting with a prefix, ending with a suffix using the ‘*’ character. + */ + readonly referers?: readonly string[]; + /** + * Specify the list of query parameters. You can force the query parameters for a query using the url string format. + */ + readonly queryParameters?: string; + /** + * Specify a description of the API key. Used for informative purposes only. It has impact on the functionality of the API key. + */ + readonly description?: string; +}; + +export declare type UpdateApiKeyResponse = { + /** + * The api key. + */ + key: string; + /** + * Date of update + */ + updatedAt: string; +}; + +export declare type UserIDResponse = { + /** + * userID of the user. + */ + userID: string; + /** + * Cluster on which the user is assigned + */ + clusterName: string; + /** + * Number of records belonging to the user. + */ + nbRecords: number; + /** + * Data size used by the user. + */ + dataSize: number; +}; + +export declare const waitAppTask: (base: SearchClient) => (taskID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export declare const waitTask: (base: SearchIndex) => (taskID: number, requestOptions?: RequestOptions | undefined) => Readonly>; + +export { } diff --git a/paperai-docs/node_modules/@algolia/client-search/dist/client-search.esm.js b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.esm.js new file mode 100644 index 00000000..e238ea0f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-search/dist/client-search.esm.js @@ -0,0 +1,1287 @@ +import { createAuth, AuthMode, shuffle, addMethods, createWaitablePromise, createRetryablePromise, encode } from '@algolia/client-common'; +import { createTransporter, CallEnum, createMappedRequestOptions, serializeQueryParameters } from '@algolia/transporter'; +import { MethodEnum } from '@algolia/requester-common'; +import { createHmac } from 'crypto'; + +function createBrowsablePromise(options) { + const browse = (data) => { + return options.request(data).then(response => { + /** + * First we send to the developer the + * batch retrieved from the API. + */ + if (options.batch !== undefined) { + options.batch(response.hits); + } + /** + * Then, we ask to the browse concrete implementation + * if we should stop browsing. As example, the `browseObjects` + * method will stop if the cursor is not present on the response. + */ + if (options.shouldStop(response)) { + return undefined; + } + /** + * Finally, if the response contains a cursor, we browse to the next + * batch using that same cursor. Otherwise, we just use the traditional + * browsing using the page element. + */ + if (response.cursor) { + return browse({ + cursor: response.cursor, + }); + } + return browse({ + page: (data.page || 0) + 1, + }); + }); + }; + return browse({}); +} + +const createSearchClient = options => { + const appId = options.appId; + const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey); + const transporter = createTransporter({ + hosts: [ + { url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read }, + { url: `${appId}.algolia.net`, accept: CallEnum.Write }, + ].concat(shuffle([ + { url: `${appId}-1.algolianet.com` }, + { url: `${appId}-2.algolianet.com` }, + { url: `${appId}-3.algolianet.com` }, + ])), + ...options, + headers: { + ...auth.headers(), + ...{ 'content-type': 'application/x-www-form-urlencoded' }, + ...options.headers, + }, + queryParameters: { + ...auth.queryParameters(), + ...options.queryParameters, + }, + }); + const base = { + transporter, + appId, + addAlgoliaAgent(segment, version) { + transporter.userAgent.add({ segment, version }); + }, + clearCache() { + return Promise.all([ + transporter.requestsCache.clear(), + transporter.responsesCache.clear(), + ]).then(() => undefined); + }, + }; + return addMethods(base, options.methods); +}; + +function createMissingObjectIDError() { + return { + name: 'MissingObjectIDError', + message: 'All objects must have an unique objectID ' + + '(like a primary key) to be valid. ' + + 'Algolia is also able to generate objectIDs ' + + "automatically but *it's not recommended*. " + + "To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.", + }; +} + +function createObjectNotFoundError() { + return { + name: 'ObjectNotFoundError', + message: 'Object not found.', + }; +} + +function createValidUntilNotFoundError() { + return { + name: 'ValidUntilNotFoundError', + message: 'ValidUntil not found in given secured api key.', + }; +} + +const addApiKey = (base) => { + return (acl, requestOptions) => { + const { queryParameters, ...options } = requestOptions || {}; + const data = { + acl, + ...(queryParameters !== undefined ? { queryParameters } : {}), + }; + const wait = (response, waitRequestOptions) => { + return createRetryablePromise(retry => { + return getApiKey(base)(response.key, waitRequestOptions).catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + return retry(); + }); + }); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: '1/keys', + data, + }, options), wait); + }; +}; + +const assignUserID = (base) => { + return (userID, clusterName, requestOptions) => { + const mappedRequestOptions = createMappedRequestOptions(requestOptions); + // eslint-disable-next-line functional/immutable-data + mappedRequestOptions.queryParameters['X-Algolia-User-ID'] = userID; + return base.transporter.write({ + method: MethodEnum.Post, + path: '1/clusters/mapping', + data: { cluster: clusterName }, + }, mappedRequestOptions); + }; +}; + +const assignUserIDs = (base) => { + return (userIDs, clusterName, requestOptions) => { + return base.transporter.write({ + method: MethodEnum.Post, + path: '1/clusters/mapping/batch', + data: { + users: userIDs, + cluster: clusterName, + }, + }, requestOptions); + }; +}; + +const clearDictionaryEntries = (base) => { + return (dictionary, requestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('/1/dictionaries/%s/batch', dictionary), + data: { + clearExistingDictionaryEntries: true, + requests: { action: 'addEntry', body: [] }, + }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const copyIndex = (base) => { + return (from, to, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return initIndex(base)(from, { + methods: { waitTask }, + }).waitTask(response.taskID, waitRequestOptions); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/operation', from), + data: { + operation: 'copy', + destination: to, + }, + }, requestOptions), wait); + }; +}; + +const copyRules = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Rules], + }); + }; +}; + +const copySettings = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Settings], + }); + }; +}; + +const copySynonyms = (base) => { + return (from, to, requestOptions) => { + return copyIndex(base)(from, to, { + ...requestOptions, + scope: [ScopeEnum.Synonyms], + }); + }; +}; + +const customRequest = (base) => { + return (request, requestOptions) => { + if (request.method === MethodEnum.Get) { + return base.transporter.read(request, requestOptions); + } + return base.transporter.write(request, requestOptions); + }; +}; + +const deleteApiKey = (base) => { + return (apiKey, requestOptions) => { + const wait = (_, waitRequestOptions) => { + return createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions) + .then(retry) + .catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + }); + }); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Delete, + path: encode('1/keys/%s', apiKey), + }, requestOptions), wait); + }; +}; + +const deleteDictionaryEntries = (base) => { + return (dictionary, objectIDs, requestOptions) => { + const requests = objectIDs.map(objectID => ({ + action: 'deleteEntry', + body: { objectID }, + })); + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: false, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const generateSecuredApiKey = () => { + return (parentApiKey, restrictions) => { + const queryParameters = serializeQueryParameters(restrictions); + const securedKey = createHmac('sha256', parentApiKey) + .update(queryParameters) + .digest('hex'); + return Buffer.from(securedKey + queryParameters).toString('base64'); + }; +}; + +const getApiKey = (base) => { + return (apiKey, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/keys/%s', apiKey), + }, requestOptions); + }; +}; + +const getAppTask = (base) => { + return (taskID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/task/%s', taskID.toString()), + }, requestOptions); + }; +}; + +const getDictionarySettings = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '/1/dictionaries/*/settings', + }, requestOptions); + }; +}; + +const getLogs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/logs', + }, requestOptions); + }; +}; + +const getSecuredApiKeyRemainingValidity = () => { + return (securedApiKey) => { + const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii'); + const regex = /validUntil=(\d+)/; + const match = decodedString.match(regex); + if (match === null) { + throw createValidUntilNotFoundError(); + } + return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000); + }; +}; + +const getTopUserIDs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/clusters/mapping/top', + }, requestOptions); + }; +}; + +const getUserID = (base) => { + return (userID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/clusters/mapping/%s', userID), + }, requestOptions); + }; +}; + +const hasPendingMappings = (base) => { + return (requestOptions) => { + const { retrieveMappings, ...options } = requestOptions || {}; + if (retrieveMappings === true) { + // eslint-disable-next-line functional/immutable-data + options.getClusters = true; + } + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/clusters/mapping/pending', + }, options); + }; +}; + +const initIndex = (base) => { + return (indexName, options = {}) => { + const searchIndex = { + transporter: base.transporter, + appId: base.appId, + indexName, + }; + return addMethods(searchIndex, options.methods); + }; +}; + +const listApiKeys = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/keys', + }, requestOptions); + }; +}; + +const listClusters = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/clusters', + }, requestOptions); + }; +}; + +const listIndices = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/indexes', + }, requestOptions); + }; +}; + +const listUserIDs = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: '1/clusters/mapping', + }, requestOptions); + }; +}; + +const moveIndex = (base) => { + return (from, to, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return initIndex(base)(from, { + methods: { waitTask }, + }).waitTask(response.taskID, waitRequestOptions); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/operation', from), + data: { + operation: 'move', + destination: to, + }, + }, requestOptions), wait); + }; +}; + +const multipleBatch = (base) => { + return (requests, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return Promise.all(Object.keys(response.taskID).map(indexName => { + return initIndex(base)(indexName, { + methods: { waitTask }, + }).waitTask(response.taskID[indexName], waitRequestOptions); + })); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: '1/indexes/*/batch', + data: { + requests, + }, + }, requestOptions), wait); + }; +}; + +const multipleGetObjects = (base) => { + return (requests, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: '1/indexes/*/objects', + data: { + requests, + }, + }, requestOptions); + }; +}; + +const multipleQueries = (base) => { + return (queries, requestOptions) => { + const requests = queries.map(query => { + return { + ...query, + params: serializeQueryParameters(query.params || {}), + }; + }); + return base.transporter.read({ + method: MethodEnum.Post, + path: '1/indexes/*/queries', + data: { + requests, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const multipleSearchForFacetValues = (base) => { + return (queries, requestOptions) => { + return Promise.all(queries.map(query => { + const { facetName, facetQuery, ...params } = query.params; + return initIndex(base)(query.indexName, { + methods: { searchForFacetValues }, + }).searchForFacetValues(facetName, facetQuery, { + ...requestOptions, + ...params, + }); + })); + }; +}; + +const removeUserID = (base) => { + return (userID, requestOptions) => { + const mappedRequestOptions = createMappedRequestOptions(requestOptions); + // eslint-disable-next-line functional/immutable-data + mappedRequestOptions.queryParameters['X-Algolia-User-ID'] = userID; + return base.transporter.write({ + method: MethodEnum.Delete, + path: '1/clusters/mapping', + }, mappedRequestOptions); + }; +}; + +const replaceDictionaryEntries = (base) => { + return (dictionary, entries, requestOptions) => { + const requests = entries.map(entry => ({ + action: 'addEntry', + body: entry, + })); + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: true, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const restoreApiKey = (base) => { + return (apiKey, requestOptions) => { + const wait = (_, waitRequestOptions) => { + return createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions).catch((apiError) => { + if (apiError.status !== 404) { + throw apiError; + } + return retry(); + }); + }); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/keys/%s/restore', apiKey), + }, requestOptions), wait); + }; +}; + +const saveDictionaryEntries = (base) => { + return (dictionary, entries, requestOptions) => { + const requests = entries.map(entry => ({ + action: 'addEntry', + body: entry, + })); + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('/1/dictionaries/%s/batch', dictionary), + data: { clearExistingDictionaryEntries: false, requests }, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const searchDictionaryEntries = (base) => { + return (dictionary, query, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('/1/dictionaries/%s/search', dictionary), + data: { + query, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchUserIDs = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: '1/clusters/mapping/search', + data: { + query, + }, + }, requestOptions); + }; +}; + +const setDictionarySettings = (base) => { + return (settings, requestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Put, + path: '/1/dictionaries/*/settings', + data: settings, + }, requestOptions), (response, waitRequestOptions) => waitAppTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const updateApiKey = (base) => { + return (apiKey, requestOptions) => { + const updatedFields = Object.assign({}, requestOptions); + const { queryParameters, ...options } = requestOptions || {}; + const data = queryParameters ? { queryParameters } : {}; + const apiKeyFields = [ + 'acl', + 'indexes', + 'referers', + 'restrictSources', + 'queryParameters', + 'description', + 'maxQueriesPerIPPerHour', + 'maxHitsPerQuery', + ]; + // Check that all the fields retrieved through getApiKey are the same as the ones we wanted to update + const hasChanged = (getApiKeyResponse) => { + return Object.keys(updatedFields) + .filter((updatedField) => apiKeyFields.indexOf(updatedField) !== -1) + .every(updatedField => { + // If the field is an array, we need to check that they are the same length and that all the values are the same + if (Array.isArray(getApiKeyResponse[updatedField]) && + Array.isArray(updatedFields[updatedField])) { + const getApiKeyResponseArray = getApiKeyResponse[updatedField]; + return (getApiKeyResponseArray.length === updatedFields[updatedField].length && + getApiKeyResponseArray.every((value, index) => value === updatedFields[updatedField][index])); + } + else { + return getApiKeyResponse[updatedField] === updatedFields[updatedField]; + } + }); + }; + const wait = (_, waitRequestOptions) => createRetryablePromise(retry => { + return getApiKey(base)(apiKey, waitRequestOptions).then(getApiKeyResponse => { + return hasChanged(getApiKeyResponse) ? Promise.resolve() : retry(); + }); + }); + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Put, + path: encode('1/keys/%s', apiKey), + data, + }, options), wait); + }; +}; + +const waitAppTask = (base) => { + return (taskID, requestOptions) => { + return createRetryablePromise(retry => { + return getAppTask(base)(taskID, requestOptions).then(response => { + return response.status !== 'published' ? retry() : undefined; + }); + }); + }; +}; + +const batch = (base) => { + return (requests, requestOptions) => { + const wait = (response, waitRequestOptions) => { + return waitTask(base)(response.taskID, waitRequestOptions); + }; + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/batch', base.indexName), + data: { + requests, + }, + }, requestOptions), wait); + }; +}; + +const browseObjects = (base) => { + return (requestOptions) => { + return createBrowsablePromise({ + shouldStop: response => response.cursor === undefined, + ...requestOptions, + request: (data) => base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/browse', base.indexName), + data, + }, requestOptions), + }); + }; +}; + +const browseRules = (base) => { + return (requestOptions) => { + const options = { + hitsPerPage: 1000, + ...requestOptions, + }; + return createBrowsablePromise({ + shouldStop: response => response.hits.length < options.hitsPerPage, + ...options, + request(data) { + return searchRules(base)('', { ...options, ...data }).then((response) => { + return { + ...response, + hits: response.hits.map(rule => { + // eslint-disable-next-line functional/immutable-data,no-param-reassign + delete rule._highlightResult; + return rule; + }), + }; + }); + }, + }); + }; +}; + +const browseSynonyms = (base) => { + return (requestOptions) => { + const options = { + hitsPerPage: 1000, + ...requestOptions, + }; + return createBrowsablePromise({ + shouldStop: response => response.hits.length < options.hitsPerPage, + ...options, + request(data) { + return searchSynonyms(base)('', { ...options, ...data }).then((response) => { + return { + ...response, + hits: response.hits.map(synonym => { + // eslint-disable-next-line functional/immutable-data,no-param-reassign + delete synonym._highlightResult; + return synonym; + }), + }; + }); + }, + }); + }; +}; + +const chunkedBatch = (base) => { + return (bodies, action, requestOptions) => { + const { batchSize, ...options } = requestOptions || {}; + const response = { + taskIDs: [], + objectIDs: [], + }; + const forEachBatch = (lastIndex = 0) => { + // eslint-disable-next-line functional/prefer-readonly-type + const bodiesChunk = []; + // eslint-disable-next-line functional/no-let + let index; + /* eslint-disable-next-line functional/no-loop-statement */ + for (index = lastIndex; index < bodies.length; index++) { + // eslint-disable-next-line functional/immutable-data + bodiesChunk.push(bodies[index]); + if (bodiesChunk.length === (batchSize || 1000)) { + break; + } + } + if (bodiesChunk.length === 0) { + return Promise.resolve(response); + } + return batch(base)(bodiesChunk.map(body => { + return { + action, + body, + }; + }), options).then(res => { + response.objectIDs = response.objectIDs.concat(res.objectIDs); // eslint-disable-line functional/immutable-data + response.taskIDs.push(res.taskID); // eslint-disable-line functional/immutable-data + index++; + return forEachBatch(index); + }); + }; + return createWaitablePromise(forEachBatch(), (chunkedBatchResponse, waitRequestOptions) => { + return Promise.all(chunkedBatchResponse.taskIDs.map(taskID => { + return waitTask(base)(taskID, waitRequestOptions); + })); + }); + }; +}; + +const clearObjects = (base) => { + return (requestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/clear', base.indexName), + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const clearRules = (base) => { + return (requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/rules/clear', base.indexName), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const clearSynonyms = (base) => { + return (requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/synonyms/clear', base.indexName), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteBy = (base) => { + return (filters, requestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/deleteByQuery', base.indexName), + data: filters, + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteIndex = (base) => { + return (requestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Delete, + path: encode('1/indexes/%s', base.indexName), + }, requestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteObject = (base) => { + return (objectID, requestOptions) => { + return createWaitablePromise(deleteObjects(base)([objectID], requestOptions).then(response => { + return { taskID: response.taskIDs[0] }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteObjects = (base) => { + return (objectIDs, requestOptions) => { + const objects = objectIDs.map(objectID => { + return { objectID }; + }); + return chunkedBatch(base)(objects, BatchActionEnum.DeleteObject, requestOptions); + }; +}; + +const deleteRule = (base) => { + return (objectID, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Delete, + path: encode('1/indexes/%s/rules/%s', base.indexName, objectID), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const deleteSynonym = (base) => { + return (objectID, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Delete, + path: encode('1/indexes/%s/synonyms/%s', base.indexName, objectID), + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const exists = (base) => { + return (requestOptions) => { + return getSettings(base)(requestOptions) + .then(() => true) + .catch(error => { + if (error.status !== 404) { + throw error; + } + return false; + }); + }; +}; + +const findAnswers = (base) => { + return (query, queryLanguages, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/answers/%s/prediction', base.indexName), + data: { + query, + queryLanguages, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const findObject = (base) => { + return (callback, requestOptions) => { + const { query, paginate, ...options } = requestOptions || {}; + // eslint-disable-next-line functional/no-let + let page = 0; + const forEachPage = () => { + return search(base)(query || '', { ...options, page }).then(result => { + // eslint-disable-next-line functional/no-loop-statement + for (const [position, hit] of Object.entries(result.hits)) { + // eslint-disable-next-line promise/no-callback-in-promise + if (callback(hit)) { + return { + object: hit, + position: parseInt(position, 10), + page, + }; + } + } + page++; + // paginate if option was set and has next page + if (paginate === false || page >= result.nbPages) { + throw createObjectNotFoundError(); + } + return forEachPage(); + }); + }; + return forEachPage(); + }; +}; + +const getObject = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/indexes/%s/%s', base.indexName, objectID), + }, requestOptions); + }; +}; + +const getObjectPosition = () => { + return (searchResponse, objectID) => { + // eslint-disable-next-line functional/no-loop-statement + for (const [position, hit] of Object.entries(searchResponse.hits)) { + if (hit.objectID === objectID) { + return parseInt(position, 10); + } + } + return -1; + }; +}; + +const getObjects = (base) => { + return (objectIDs, requestOptions) => { + const { attributesToRetrieve, ...options } = requestOptions || {}; + const requests = objectIDs.map(objectID => { + return { + indexName: base.indexName, + objectID, + ...(attributesToRetrieve ? { attributesToRetrieve } : {}), + }; + }); + return base.transporter.read({ + method: MethodEnum.Post, + path: '1/indexes/*/objects', + data: { + requests, + }, + }, options); + }; +}; + +const getRule = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/indexes/%s/rules/%s', base.indexName, objectID), + }, requestOptions); + }; +}; + +const getSettings = (base) => { + return (requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/indexes/%s/settings', base.indexName), + data: { + getVersion: 2, + }, + }, requestOptions); + }; +}; + +const getSynonym = (base) => { + return (objectID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode(`1/indexes/%s/synonyms/%s`, base.indexName, objectID), + }, requestOptions); + }; +}; + +const getTask = (base) => { + return (taskID, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Get, + path: encode('1/indexes/%s/task/%s', base.indexName, taskID.toString()), + }, requestOptions); + }; +}; + +const partialUpdateObject = (base) => { + return (object, requestOptions) => { + return createWaitablePromise(partialUpdateObjects(base)([object], requestOptions).then(response => { + return { + objectID: response.objectIDs[0], + taskID: response.taskIDs[0], + }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const partialUpdateObjects = (base) => { + return (objects, requestOptions) => { + const { createIfNotExists, ...options } = requestOptions || {}; + const action = createIfNotExists + ? BatchActionEnum.PartialUpdateObject + : BatchActionEnum.PartialUpdateObjectNoCreate; + return chunkedBatch(base)(objects, action, options); + }; +}; + +const replaceAllObjects = (base) => { + return (objects, requestOptions) => { + const { safe, autoGenerateObjectIDIfNotExist, batchSize, ...options } = requestOptions || {}; + const operation = (from, to, type, operationRequestOptions) => { + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/operation', from), + data: { + operation: type, + destination: to, + }, + }, operationRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; + const randomSuffix = Math.random() + .toString(36) + .substring(7); + const temporaryIndexName = `${base.indexName}_tmp_${randomSuffix}`; + const saveObjectsInTemporary = saveObjects({ + appId: base.appId, + transporter: base.transporter, + indexName: temporaryIndexName, + }); + // @ts-ignore + // eslint-disable-next-line prefer-const, functional/no-let, functional/prefer-readonly-type + let responses = []; + const copyWaitablePromise = operation(base.indexName, temporaryIndexName, 'copy', { + ...options, + scope: ['settings', 'synonyms', 'rules'], + }); + // eslint-disable-next-line functional/immutable-data + responses.push(copyWaitablePromise); + const result = (safe + ? copyWaitablePromise.wait(options) + : copyWaitablePromise) + .then(() => { + const saveObjectsWaitablePromise = saveObjectsInTemporary(objects, { + ...options, + autoGenerateObjectIDIfNotExist, + batchSize, + }); + // eslint-disable-next-line functional/immutable-data + responses.push(saveObjectsWaitablePromise); + return safe ? saveObjectsWaitablePromise.wait(options) : saveObjectsWaitablePromise; + }) + .then(() => { + const moveWaitablePromise = operation(temporaryIndexName, base.indexName, 'move', options); + // eslint-disable-next-line functional/immutable-data + responses.push(moveWaitablePromise); + return safe ? moveWaitablePromise.wait(options) : moveWaitablePromise; + }) + .then(() => Promise.all(responses)) + .then(([copyResponse, saveObjectsResponse, moveResponse]) => { + return { + objectIDs: saveObjectsResponse.objectIDs, + taskIDs: [copyResponse.taskID, ...saveObjectsResponse.taskIDs, moveResponse.taskID], + }; + }); + return createWaitablePromise(result, (_, waitRequestOptions) => { + return Promise.all(responses.map(response => response.wait(waitRequestOptions))); + }); + }; +}; + +const replaceAllRules = (base) => { + return (rules, requestOptions) => { + return saveRules(base)(rules, { + ...requestOptions, + clearExistingRules: true, + }); + }; +}; + +const replaceAllSynonyms = (base) => { + return (synonyms, requestOptions) => { + return saveSynonyms(base)(synonyms, { + ...requestOptions, + clearExistingSynonyms: true, + }); + }; +}; + +const saveObject = (base) => { + return (object, requestOptions) => { + return createWaitablePromise(saveObjects(base)([object], requestOptions).then(response => { + return { + objectID: response.objectIDs[0], + taskID: response.taskIDs[0], + }; + }), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const saveObjects = (base) => { + return (objects, requestOptions) => { + const { autoGenerateObjectIDIfNotExist, ...options } = requestOptions || {}; + const action = autoGenerateObjectIDIfNotExist + ? BatchActionEnum.AddObject + : BatchActionEnum.UpdateObject; + if (action === BatchActionEnum.UpdateObject) { + // eslint-disable-next-line functional/no-loop-statement + for (const object of objects) { + if (object.objectID === undefined) { + return createWaitablePromise(Promise.reject(createMissingObjectIDError())); + } + } + } + return chunkedBatch(base)(objects, action, options); + }; +}; + +const saveRule = (base) => { + return (rule, requestOptions) => { + return saveRules(base)([rule], requestOptions); + }; +}; + +const saveRules = (base) => { + return (rules, requestOptions) => { + const { forwardToReplicas, clearExistingRules, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + if (clearExistingRules) { + mappedRequestOptions.queryParameters.clearExistingRules = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/rules/batch', base.indexName), + data: rules, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const saveSynonym = (base) => { + return (synonym, requestOptions) => { + return saveSynonyms(base)([synonym], requestOptions); + }; +}; + +const saveSynonyms = (base) => { + return (synonyms, requestOptions) => { + const { forwardToReplicas, clearExistingSynonyms, replaceExistingSynonyms, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + if (replaceExistingSynonyms || clearExistingSynonyms) { + mappedRequestOptions.queryParameters.replaceExistingSynonyms = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/synonyms/batch', base.indexName), + data: synonyms, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const search = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/query', base.indexName), + data: { + query, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchForFacetValues = (base) => { + return (facetName, facetQuery, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName), + data: { + facetQuery, + }, + cacheable: true, + }, requestOptions); + }; +}; + +const searchRules = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/rules/search', base.indexName), + data: { + query, + }, + }, requestOptions); + }; +}; + +const searchSynonyms = (base) => { + return (query, requestOptions) => { + return base.transporter.read({ + method: MethodEnum.Post, + path: encode('1/indexes/%s/synonyms/search', base.indexName), + data: { + query, + }, + }, requestOptions); + }; +}; + +const setSettings = (base) => { + return (settings, requestOptions) => { + const { forwardToReplicas, ...options } = requestOptions || {}; + const mappedRequestOptions = createMappedRequestOptions(options); + if (forwardToReplicas) { + mappedRequestOptions.queryParameters.forwardToReplicas = 1; // eslint-disable-line functional/immutable-data + } + return createWaitablePromise(base.transporter.write({ + method: MethodEnum.Put, + path: encode('1/indexes/%s/settings', base.indexName), + data: settings, + }, mappedRequestOptions), (response, waitRequestOptions) => waitTask(base)(response.taskID, waitRequestOptions)); + }; +}; + +const waitTask = (base) => { + return (taskID, requestOptions) => { + return createRetryablePromise(retry => { + return getTask(base)(taskID, requestOptions).then(response => { + return response.status !== 'published' ? retry() : undefined; + }); + }); + }; +}; + +const ApiKeyACLEnum = { + AddObject: 'addObject', + Analytics: 'analytics', + Browser: 'browse', + DeleteIndex: 'deleteIndex', + DeleteObject: 'deleteObject', + EditSettings: 'editSettings', + Inference: 'inference', + ListIndexes: 'listIndexes', + Logs: 'logs', + Personalization: 'personalization', + Recommendation: 'recommendation', + Search: 'search', + SeeUnretrievableAttributes: 'seeUnretrievableAttributes', + Settings: 'settings', + Usage: 'usage', +}; + +const BatchActionEnum = { + AddObject: 'addObject', + UpdateObject: 'updateObject', + PartialUpdateObject: 'partialUpdateObject', + PartialUpdateObjectNoCreate: 'partialUpdateObjectNoCreate', + DeleteObject: 'deleteObject', + DeleteIndex: 'delete', + ClearIndex: 'clear', +}; + +const ScopeEnum = { + Settings: 'settings', + Synonyms: 'synonyms', + Rules: 'rules', +}; + +const StrategyEnum = { + None: 'none', + StopIfEnoughMatches: 'stopIfEnoughMatches', +}; + +const SynonymEnum = { + Synonym: 'synonym', + OneWaySynonym: 'oneWaySynonym', + AltCorrection1: 'altCorrection1', + AltCorrection2: 'altCorrection2', + Placeholder: 'placeholder', +}; + +export { ApiKeyACLEnum, BatchActionEnum, ScopeEnum, StrategyEnum, SynonymEnum, addApiKey, assignUserID, assignUserIDs, batch, browseObjects, browseRules, browseSynonyms, chunkedBatch, clearDictionaryEntries, clearObjects, clearRules, clearSynonyms, copyIndex, copyRules, copySettings, copySynonyms, createBrowsablePromise, createMissingObjectIDError, createObjectNotFoundError, createSearchClient, createValidUntilNotFoundError, customRequest, deleteApiKey, deleteBy, deleteDictionaryEntries, deleteIndex, deleteObject, deleteObjects, deleteRule, deleteSynonym, exists, findAnswers, findObject, generateSecuredApiKey, getApiKey, getAppTask, getDictionarySettings, getLogs, getObject, getObjectPosition, getObjects, getRule, getSecuredApiKeyRemainingValidity, getSettings, getSynonym, getTask, getTopUserIDs, getUserID, hasPendingMappings, initIndex, listApiKeys, listClusters, listIndices, listUserIDs, moveIndex, multipleBatch, multipleGetObjects, multipleQueries, multipleSearchForFacetValues, partialUpdateObject, partialUpdateObjects, removeUserID, replaceAllObjects, replaceAllRules, replaceAllSynonyms, replaceDictionaryEntries, restoreApiKey, saveDictionaryEntries, saveObject, saveObjects, saveRule, saveRules, saveSynonym, saveSynonyms, search, searchDictionaryEntries, searchForFacetValues, searchRules, searchSynonyms, searchUserIDs, setDictionarySettings, setSettings, updateApiKey, waitAppTask, waitTask }; diff --git a/paperai-docs/node_modules/@algolia/client-search/index.js b/paperai-docs/node_modules/@algolia/client-search/index.js new file mode 100644 index 00000000..eebe74cb --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-search/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/client-search.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/client-search/package.json b/paperai-docs/node_modules/@algolia/client-search/package.json new file mode 100644 index 00000000..40e10414 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/client-search/package.json @@ -0,0 +1,23 @@ +{ + "name": "@algolia/client-search", + "version": "4.22.1", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/client-search.esm.js", + "types": "dist/client-search.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/client-common": "4.22.1", + "@algolia/requester-common": "4.22.1", + "@algolia/transporter": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.cjs.js b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.cjs.js new file mode 100644 index 00000000..6df9f4e9 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.cjs.js @@ -0,0 +1,26 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function createNullLogger() { + return { + debug(_message, _args) { + return Promise.resolve(); + }, + info(_message, _args) { + return Promise.resolve(); + }, + error(_message, _args) { + return Promise.resolve(); + }, + }; +} + +const LogLevelEnum = { + Debug: 1, + Info: 2, + Error: 3, +}; + +exports.LogLevelEnum = LogLevelEnum; +exports.createNullLogger = createNullLogger; diff --git a/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.d.ts b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.d.ts new file mode 100644 index 00000000..6c08ae21 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.d.ts @@ -0,0 +1,23 @@ + +export declare function createNullLogger(): Logger; + +export declare type Logger = { + /** + * Logs debug messages. + */ + readonly debug: (message: string, args?: any) => Readonly>; + /** + * Logs info messages. + */ + readonly info: (message: string, args?: any) => Readonly>; + /** + * Logs error messages. + */ + readonly error: (message: string, args?: any) => Readonly>; +}; + +export declare const LogLevelEnum: Readonly>; + +export declare type LogLevelType = 1 | 2 | 3; + +export { } diff --git a/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.esm.js b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.esm.js new file mode 100644 index 00000000..20229226 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-common/dist/logger-common.esm.js @@ -0,0 +1,21 @@ +function createNullLogger() { + return { + debug(_message, _args) { + return Promise.resolve(); + }, + info(_message, _args) { + return Promise.resolve(); + }, + error(_message, _args) { + return Promise.resolve(); + }, + }; +} + +const LogLevelEnum = { + Debug: 1, + Info: 2, + Error: 3, +}; + +export { LogLevelEnum, createNullLogger }; diff --git a/paperai-docs/node_modules/@algolia/logger-common/index.js b/paperai-docs/node_modules/@algolia/logger-common/index.js new file mode 100644 index 00000000..56c0010e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-common/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/logger-common.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/logger-common/package.json b/paperai-docs/node_modules/@algolia/logger-common/package.json new file mode 100644 index 00000000..52f23ce0 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-common/package.json @@ -0,0 +1,19 @@ +{ + "name": "@algolia/logger-common", + "version": "4.22.1", + "private": false, + "description": "Common interfaces for promise-based log libraries", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-js.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/logger-common.esm.js", + "types": "dist/logger-common.d.ts", + "files": [ + "index.js", + "dist" + ] +} diff --git a/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.cjs.js b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.cjs.js new file mode 100644 index 00000000..1b39210d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.cjs.js @@ -0,0 +1,29 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var loggerCommon = require('@algolia/logger-common'); + +/* eslint no-console: 0 */ +function createConsoleLogger(logLevel) { + return { + debug(message, args) { + if (loggerCommon.LogLevelEnum.Debug >= logLevel) { + console.debug(message, args); + } + return Promise.resolve(); + }, + info(message, args) { + if (loggerCommon.LogLevelEnum.Info >= logLevel) { + console.info(message, args); + } + return Promise.resolve(); + }, + error(message, args) { + console.error(message, args); + return Promise.resolve(); + }, + }; +} + +exports.createConsoleLogger = createConsoleLogger; diff --git a/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.d.ts b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.d.ts new file mode 100644 index 00000000..70af1d4e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.d.ts @@ -0,0 +1,6 @@ +import { Logger } from '@algolia/logger-common'; +import { LogLevelType } from '@algolia/logger-common'; + +export declare function createConsoleLogger(logLevel: LogLevelType): Logger; + +export { } diff --git a/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.esm.js b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.esm.js new file mode 100644 index 00000000..94e459f5 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-console/dist/logger-console.esm.js @@ -0,0 +1,25 @@ +import { LogLevelEnum } from '@algolia/logger-common'; + +/* eslint no-console: 0 */ +function createConsoleLogger(logLevel) { + return { + debug(message, args) { + if (LogLevelEnum.Debug >= logLevel) { + console.debug(message, args); + } + return Promise.resolve(); + }, + info(message, args) { + if (LogLevelEnum.Info >= logLevel) { + console.info(message, args); + } + return Promise.resolve(); + }, + error(message, args) { + console.error(message, args); + return Promise.resolve(); + }, + }; +} + +export { createConsoleLogger }; diff --git a/paperai-docs/node_modules/@algolia/logger-console/index.js b/paperai-docs/node_modules/@algolia/logger-console/index.js new file mode 100644 index 00000000..1a8f955b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-console/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/logger-console.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/logger-console/package.json b/paperai-docs/node_modules/@algolia/logger-console/package.json new file mode 100644 index 00000000..3273ba9f --- /dev/null +++ b/paperai-docs/node_modules/@algolia/logger-console/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/logger-console", + "version": "4.22.1", + "private": false, + "description": "Promise-based log library using console log.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/logger-console.esm.js", + "types": "dist/logger-console.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/logger-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.cjs.js b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.cjs.js new file mode 100644 index 00000000..680fb197 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.cjs.js @@ -0,0 +1,61 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function createBrowserXhrRequester() { + return { + send(request) { + return new Promise((resolve) => { + const baseRequester = new XMLHttpRequest(); + baseRequester.open(request.method, request.url, true); + Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key])); + const createTimeout = (timeout, content) => { + return setTimeout(() => { + baseRequester.abort(); + resolve({ + status: 0, + content, + isTimedOut: true, + }); + }, timeout * 1000); + }; + const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout'); + // eslint-disable-next-line functional/no-let + let responseTimeout; + // eslint-disable-next-line functional/immutable-data + baseRequester.onreadystatechange = () => { + if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) { + clearTimeout(connectTimeout); + responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); + } + }; + // eslint-disable-next-line functional/immutable-data + baseRequester.onerror = () => { + // istanbul ignore next + if (baseRequester.status === 0) { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ + content: baseRequester.responseText || 'Network request failed', + status: baseRequester.status, + isTimedOut: false, + }); + } + }; + // eslint-disable-next-line functional/immutable-data + baseRequester.onload = () => { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ + content: baseRequester.responseText, + status: baseRequester.status, + isTimedOut: false, + }); + }; + baseRequester.send(request.data); + }); + }, + }; +} + +exports.createBrowserXhrRequester = createBrowserXhrRequester; diff --git a/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.d.ts b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.d.ts new file mode 100644 index 00000000..5871edff --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.d.ts @@ -0,0 +1,5 @@ +import { Requester } from '@algolia/requester-common'; + +export declare function createBrowserXhrRequester(): Requester; + +export { } diff --git a/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.esm.js b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.esm.js new file mode 100644 index 00000000..869dd22b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-browser-xhr/dist/requester-browser-xhr.esm.js @@ -0,0 +1,57 @@ +function createBrowserXhrRequester() { + return { + send(request) { + return new Promise((resolve) => { + const baseRequester = new XMLHttpRequest(); + baseRequester.open(request.method, request.url, true); + Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key])); + const createTimeout = (timeout, content) => { + return setTimeout(() => { + baseRequester.abort(); + resolve({ + status: 0, + content, + isTimedOut: true, + }); + }, timeout * 1000); + }; + const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout'); + // eslint-disable-next-line functional/no-let + let responseTimeout; + // eslint-disable-next-line functional/immutable-data + baseRequester.onreadystatechange = () => { + if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) { + clearTimeout(connectTimeout); + responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); + } + }; + // eslint-disable-next-line functional/immutable-data + baseRequester.onerror = () => { + // istanbul ignore next + if (baseRequester.status === 0) { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ + content: baseRequester.responseText || 'Network request failed', + status: baseRequester.status, + isTimedOut: false, + }); + } + }; + // eslint-disable-next-line functional/immutable-data + baseRequester.onload = () => { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ + content: baseRequester.responseText, + status: baseRequester.status, + isTimedOut: false, + }); + }; + baseRequester.send(request.data); + }); + }, + }; +} + +export { createBrowserXhrRequester }; diff --git a/paperai-docs/node_modules/@algolia/requester-browser-xhr/index.js b/paperai-docs/node_modules/@algolia/requester-browser-xhr/index.js new file mode 100644 index 00000000..bc56b326 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-browser-xhr/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/requester-browser-xhr.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/requester-browser-xhr/package.json b/paperai-docs/node_modules/@algolia/requester-browser-xhr/package.json new file mode 100644 index 00000000..b5139c01 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-browser-xhr/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/requester-browser-xhr", + "version": "4.22.1", + "private": false, + "description": "Promise-based request library for browser using xhr.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/requester-browser-xhr.esm.js", + "types": "dist/requester-browser-xhr.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/requester-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.cjs.js b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.cjs.js new file mode 100644 index 00000000..38e17851 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.cjs.js @@ -0,0 +1,12 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const MethodEnum = { + Delete: 'DELETE', + Get: 'GET', + Post: 'POST', + Put: 'PUT', +}; + +exports.MethodEnum = MethodEnum; diff --git a/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.d.ts b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.d.ts new file mode 100644 index 00000000..deba11f3 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.d.ts @@ -0,0 +1,66 @@ + +export declare type Destroyable = { + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an agent with keepAlive enabled, then + * it is best to explicitly shut down the agent when it will no longer be used. Otherwise, sockets + * may hang open for quite a long time before the server terminates them. + */ + readonly destroy: () => Readonly>; +}; + +export declare const MethodEnum: Readonly>; + +export declare type MethodType = 'DELETE' | 'GET' | 'POST' | 'PUT'; + +export declare type Request = { + /** + * The headers of the request. + */ + readonly headers: Readonly>; + /** + * The method of the request. `GET`, etc. + */ + readonly method: MethodType; + /** + * The complete url of the request, with the protocol. + */ + readonly url: string; + /** + * The timeout to stablish a connection with the server. + */ + readonly connectTimeout: number; + /** + * The timeout to receive the response. + */ + readonly responseTimeout: number; + /** + * The data to be transfered to the server. + */ + readonly data: string | undefined; +}; + +export declare type Requester = { + /** + * Sends the given `request` to the server. + */ + readonly send: (request: Request) => Readonly>; +}; + +export declare type Response = { + /** + * The raw response from the server. + */ + content: string; + /** + * If the request timeouted. + */ + isTimedOut: boolean; + /** + * The http status code. + */ + status: number; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.esm.js b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.esm.js new file mode 100644 index 00000000..e0b5a165 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-common/dist/requester-common.esm.js @@ -0,0 +1,8 @@ +const MethodEnum = { + Delete: 'DELETE', + Get: 'GET', + Post: 'POST', + Put: 'PUT', +}; + +export { MethodEnum }; diff --git a/paperai-docs/node_modules/@algolia/requester-common/index.js b/paperai-docs/node_modules/@algolia/requester-common/index.js new file mode 100644 index 00000000..0ced494c --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-common/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/requester-common.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/requester-common/package.json b/paperai-docs/node_modules/@algolia/requester-common/package.json new file mode 100644 index 00000000..6fcda40d --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-common/package.json @@ -0,0 +1,19 @@ +{ + "name": "@algolia/requester-common", + "version": "4.22.1", + "private": false, + "description": "Common interfaces for promise-based request libraries", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-js.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/requester-common.esm.js", + "types": "dist/requester-common.d.ts", + "files": [ + "index.js", + "dist" + ] +} diff --git a/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.cjs.js b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.cjs.js new file mode 100644 index 00000000..fa2d4e6e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.cjs.js @@ -0,0 +1,87 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var http = require('http'); +var https = require('https'); +var URL = require('url'); + +/* eslint functional/prefer-readonly-type: 0 */ +const agentOptions = { keepAlive: true }; +const defaultHttpAgent = new http.Agent(agentOptions); +const defaultHttpsAgent = new https.Agent(agentOptions); +function createNodeHttpRequester({ agent: userGlobalAgent, httpAgent: userHttpAgent, httpsAgent: userHttpsAgent, requesterOptions = {}, } = {}) { + const httpAgent = userHttpAgent || userGlobalAgent || defaultHttpAgent; + const httpsAgent = userHttpsAgent || userGlobalAgent || defaultHttpsAgent; + return { + send(request) { + return new Promise(resolve => { + const url = URL.parse(request.url); + const path = url.query === null ? url.pathname : `${url.pathname}?${url.query}`; + const options = { + ...requesterOptions, + agent: url.protocol === 'https:' ? httpsAgent : httpAgent, + hostname: url.hostname, + path, + method: request.method, + headers: { + ...(requesterOptions && requesterOptions.headers ? requesterOptions.headers : {}), + ...request.headers, + }, + ...(url.port !== undefined ? { port: url.port || '' } : {}), + }; + const req = (url.protocol === 'https:' ? https : http).request(options, response => { + // eslint-disable-next-line functional/no-let + let contentBuffers = []; + response.on('data', chunk => { + contentBuffers = contentBuffers.concat(chunk); + }); + response.on('end', () => { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + clearTimeout(connectTimeout); + // eslint-disable-next-line @typescript-eslint/no-use-before-define + clearTimeout(responseTimeout); + resolve({ + status: response.statusCode || 0, + content: Buffer.concat(contentBuffers).toString(), + isTimedOut: false, + }); + }); + }); + const createTimeout = (timeout, content) => { + return setTimeout(() => { + req.abort(); + resolve({ + status: 0, + content, + isTimedOut: true, + }); + }, timeout * 1000); + }; + const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout'); + // eslint-disable-next-line functional/no-let + let responseTimeout; + req.on('error', error => { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ status: 0, content: error.message, isTimedOut: false }); + }); + req.once('response', () => { + clearTimeout(connectTimeout); + responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); + }); + if (request.data !== undefined) { + req.write(request.data); + } + req.end(); + }); + }, + destroy() { + httpAgent.destroy(); + httpsAgent.destroy(); + return Promise.resolve(); + }, + }; +} + +exports.createNodeHttpRequester = createNodeHttpRequester; diff --git a/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.d.ts b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.d.ts new file mode 100644 index 00000000..97f7534a --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.d.ts @@ -0,0 +1,16 @@ +/// +import { Destroyable } from '@algolia/requester-common'; +import * as http from 'http'; +import * as https from 'https'; +import { Requester } from '@algolia/requester-common'; + +export declare function createNodeHttpRequester({ agent: userGlobalAgent, httpAgent: userHttpAgent, httpsAgent: userHttpsAgent, requesterOptions, }?: NodeHttpRequesterOptions): Requester & Destroyable; + +export declare type NodeHttpRequesterOptions = { + agent?: https.Agent | http.Agent; + httpAgent?: http.Agent; + httpsAgent?: https.Agent; + requesterOptions?: https.RequestOptions; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.esm.js b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.esm.js new file mode 100644 index 00000000..6d3e3c32 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-node-http/dist/requester-node-http.esm.js @@ -0,0 +1,85 @@ +import * as http from 'http'; +import { Agent } from 'http'; +import * as https from 'https'; +import { Agent as Agent$1 } from 'https'; +import { parse } from 'url'; + +/* eslint functional/prefer-readonly-type: 0 */ +const agentOptions = { keepAlive: true }; +const defaultHttpAgent = new Agent(agentOptions); +const defaultHttpsAgent = new Agent$1(agentOptions); +function createNodeHttpRequester({ agent: userGlobalAgent, httpAgent: userHttpAgent, httpsAgent: userHttpsAgent, requesterOptions = {}, } = {}) { + const httpAgent = userHttpAgent || userGlobalAgent || defaultHttpAgent; + const httpsAgent = userHttpsAgent || userGlobalAgent || defaultHttpsAgent; + return { + send(request) { + return new Promise(resolve => { + const url = parse(request.url); + const path = url.query === null ? url.pathname : `${url.pathname}?${url.query}`; + const options = { + ...requesterOptions, + agent: url.protocol === 'https:' ? httpsAgent : httpAgent, + hostname: url.hostname, + path, + method: request.method, + headers: { + ...(requesterOptions && requesterOptions.headers ? requesterOptions.headers : {}), + ...request.headers, + }, + ...(url.port !== undefined ? { port: url.port || '' } : {}), + }; + const req = (url.protocol === 'https:' ? https : http).request(options, response => { + // eslint-disable-next-line functional/no-let + let contentBuffers = []; + response.on('data', chunk => { + contentBuffers = contentBuffers.concat(chunk); + }); + response.on('end', () => { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + clearTimeout(connectTimeout); + // eslint-disable-next-line @typescript-eslint/no-use-before-define + clearTimeout(responseTimeout); + resolve({ + status: response.statusCode || 0, + content: Buffer.concat(contentBuffers).toString(), + isTimedOut: false, + }); + }); + }); + const createTimeout = (timeout, content) => { + return setTimeout(() => { + req.abort(); + resolve({ + status: 0, + content, + isTimedOut: true, + }); + }, timeout * 1000); + }; + const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout'); + // eslint-disable-next-line functional/no-let + let responseTimeout; + req.on('error', error => { + clearTimeout(connectTimeout); + clearTimeout(responseTimeout); + resolve({ status: 0, content: error.message, isTimedOut: false }); + }); + req.once('response', () => { + clearTimeout(connectTimeout); + responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout'); + }); + if (request.data !== undefined) { + req.write(request.data); + } + req.end(); + }); + }, + destroy() { + httpAgent.destroy(); + httpsAgent.destroy(); + return Promise.resolve(); + }, + }; +} + +export { createNodeHttpRequester }; diff --git a/paperai-docs/node_modules/@algolia/requester-node-http/index.js b/paperai-docs/node_modules/@algolia/requester-node-http/index.js new file mode 100644 index 00000000..fb864517 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-node-http/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/requester-node-http.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/requester-node-http/package.json b/paperai-docs/node_modules/@algolia/requester-node-http/package.json new file mode 100644 index 00000000..37d2c0e8 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/requester-node-http/package.json @@ -0,0 +1,22 @@ +{ + "name": "@algolia/requester-node-http", + "version": "4.22.1", + "private": false, + "description": "Promise-based request library for node using the native http module.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/requester-node-http.esm.js", + "types": "dist/requester-node-http.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/requester-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@algolia/transporter/dist/transporter.cjs.js b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.cjs.js new file mode 100644 index 00000000..8709a39e --- /dev/null +++ b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.cjs.js @@ -0,0 +1,483 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var requesterCommon = require('@algolia/requester-common'); + +function createMappedRequestOptions(requestOptions, timeout) { + const options = requestOptions || {}; + const data = options.data || {}; + Object.keys(options).forEach(key => { + if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) { + data[key] = options[key]; // eslint-disable-line functional/immutable-data + } + }); + return { + data: Object.entries(data).length > 0 ? data : undefined, + timeout: options.timeout || timeout, + headers: options.headers || {}, + queryParameters: options.queryParameters || {}, + cacheable: options.cacheable, + }; +} + +const CallEnum = { + /** + * If the host is read only. + */ + Read: 1, + /** + * If the host is write only. + */ + Write: 2, + /** + * If the host is both read and write. + */ + Any: 3, +}; + +const HostStatusEnum = { + Up: 1, + Down: 2, + Timeouted: 3, +}; + +// By default, API Clients at Algolia have expiration delay +// of 5 mins. In the JavaScript client, we have 2 mins. +const EXPIRATION_DELAY = 2 * 60 * 1000; +function createStatefulHost(host, status = HostStatusEnum.Up) { + return { + ...host, + status, + lastUpdate: Date.now(), + }; +} +function isStatefulHostUp(host) { + return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY; +} +function isStatefulHostTimeouted(host) { + return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY); +} + +function createStatelessHost(options) { + if (typeof options === 'string') { + return { + protocol: 'https', + url: options, + accept: CallEnum.Any, + }; + } + return { + protocol: options.protocol || 'https', + url: options.url, + accept: options.accept || CallEnum.Any, + }; +} + +function createRetryableOptions(hostsCache, statelessHosts) { + return Promise.all(statelessHosts.map(statelessHost => { + return hostsCache.get(statelessHost, () => { + return Promise.resolve(createStatefulHost(statelessHost)); + }); + })).then(statefulHosts => { + const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host)); + const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host)); + /** + * Note, we put the hosts that previously timeouted on the end of the list. + */ + const hostsAvailable = [...hostsUp, ...hostsTimeouted]; + const statelessHostsAvailable = hostsAvailable.length > 0 + ? hostsAvailable.map(host => createStatelessHost(host)) + : statelessHosts; + return { + getTimeout(timeoutsCount, baseTimeout) { + /** + * Imagine that you have 4 hosts, if timeouts will increase + * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200) + * + * Note that, the very next request, we start from the previous timeout + * + * 5 (timeouted) > 6 (timeouted) > 7 ... + * + * This strategy may need to be reviewed, but is the strategy on the our + * current v3 version. + */ + const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0 + ? 1 + : hostsTimeouted.length + 3 + timeoutsCount; + return timeoutMultiplier * baseTimeout; + }, + statelessHosts: statelessHostsAvailable, + }; + }); +} + +const isNetworkError = ({ isTimedOut, status }) => { + return !isTimedOut && ~~status === 0; +}; +const isRetryable = (response) => { + const status = response.status; + const isTimedOut = response.isTimedOut; + return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4)); +}; +const isSuccess = ({ status }) => { + return ~~(status / 100) === 2; +}; +const retryDecision = (response, outcomes) => { + if (isRetryable(response)) { + return outcomes.onRetry(response); + } + if (isSuccess(response)) { + return outcomes.onSuccess(response); + } + return outcomes.onFail(response); +}; + +function retryableRequest(transporter, statelessHosts, request, requestOptions) { + const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type + /** + * First we prepare the payload that do not depend from hosts. + */ + const data = serializeData(request, requestOptions); + const headers = serializeHeaders(transporter, requestOptions); + const method = request.method; + // On `GET`, the data is proxied to query parameters. + const dataQueryParameters = request.method !== requesterCommon.MethodEnum.Get + ? {} + : { + ...request.data, + ...requestOptions.data, + }; + const queryParameters = { + 'x-algolia-agent': transporter.userAgent.value, + ...transporter.queryParameters, + ...dataQueryParameters, + ...requestOptions.queryParameters, + }; + let timeoutsCount = 0; // eslint-disable-line functional/no-let + const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type + getTimeout) => { + /** + * We iterate on each host, until there is no host left. + */ + const host = hosts.pop(); // eslint-disable-line functional/immutable-data + if (host === undefined) { + throw createRetryError(stackTraceWithoutCredentials(stackTrace)); + } + const payload = { + data, + headers, + method, + url: serializeUrl(host, request.path, queryParameters), + connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect), + responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout), + }; + /** + * The stackFrame is pushed to the stackTrace so we + * can have information about onRetry and onFailure + * decisions. + */ + const pushToStackTrace = (response) => { + const stackFrame = { + request: payload, + response, + host, + triesLeft: hosts.length, + }; + // eslint-disable-next-line functional/immutable-data + stackTrace.push(stackFrame); + return stackFrame; + }; + const decisions = { + onSuccess: response => deserializeSuccess(response), + onRetry(response) { + const stackFrame = pushToStackTrace(response); + /** + * If response is a timeout, we increaset the number of + * timeouts so we can increase the timeout later. + */ + if (response.isTimedOut) { + timeoutsCount++; + } + return Promise.all([ + /** + * Failures are individually send the logger, allowing + * the end user to debug / store stack frames even + * when a retry error does not happen. + */ + transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)), + /** + * We also store the state of the host in failure cases. If the host, is + * down it will remain down for the next 2 minutes. In a timeout situation, + * this host will be added end of the list of hosts on the next request. + */ + transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)), + ]).then(() => retry(hosts, getTimeout)); + }, + onFail(response) { + pushToStackTrace(response); + throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace)); + }, + }; + return transporter.requester.send(payload).then(response => { + return retryDecision(response, decisions); + }); + }; + /** + * Finally, for each retryable host perform request until we got a non + * retryable response. Some notes here: + * + * 1. The reverse here is applied so we can apply a `pop` later on => more performant. + * 2. We also get from the retryable options a timeout multiplier that is tailored + * for the current context. + */ + return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => { + return retry([...options.statelessHosts].reverse(), options.getTimeout); + }); +} + +function createTransporter(options) { + const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options; + const transporter = { + hostsCache, + logger, + requester, + requestsCache, + responsesCache, + timeouts, + userAgent, + headers, + queryParameters, + hosts: hosts.map(host => createStatelessHost(host)), + read(request, requestOptions) { + /** + * First, we compute the user request options. Now, keep in mind, + * that using request options the user is able to modified the intire + * payload of the request. Such as headers, query parameters, and others. + */ + const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read); + const createRetryableRequest = () => { + /** + * Then, we prepare a function factory that contains the construction of + * the retryable request. At this point, we may *not* perform the actual + * request. But we want to have the function factory ready. + */ + return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions); + }; + /** + * Once we have the function factory ready, we need to determine of the + * request is "cacheable" - should be cached. Note that, once again, + * the user can force this option. + */ + const cacheable = mappedRequestOptions.cacheable !== undefined + ? mappedRequestOptions.cacheable + : request.cacheable; + /** + * If is not "cacheable", we immediatly trigger the retryable request, no + * need to check cache implementations. + */ + if (cacheable !== true) { + return createRetryableRequest(); + } + /** + * If the request is "cacheable", we need to first compute the key to ask + * the cache implementations if this request is on progress or if the + * response already exists on the cache. + */ + const key = { + request, + mappedRequestOptions, + transporter: { + queryParameters: transporter.queryParameters, + headers: transporter.headers, + }, + }; + /** + * With the computed key, we first ask the responses cache + * implemention if this request was been resolved before. + */ + return transporter.responsesCache.get(key, () => { + /** + * If the request has never resolved before, we actually ask if there + * is a current request with the same key on progress. + */ + return transporter.requestsCache.get(key, () => { + return (transporter.requestsCache + /** + * Finally, if there is no request in progress with the same key, + * this `createRetryableRequest()` will actually trigger the + * retryable request. + */ + .set(key, createRetryableRequest()) + .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)])) + .then(([_, response]) => response)); + }); + }, { + /** + * Of course, once we get this response back from the server, we + * tell response cache to actually store the received response + * to be used later. + */ + miss: response => transporter.responsesCache.set(key, response), + }); + }, + write(request, requestOptions) { + /** + * On write requests, no cache mechanisms are applied, and we + * proxy the request immediately to the requester. + */ + return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write)); + }, + }; + return transporter; +} + +function createUserAgent(version) { + const userAgent = { + value: `Algolia for JavaScript (${version})`, + add(options) { + const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`; + if (userAgent.value.indexOf(addedUserAgent) === -1) { + // eslint-disable-next-line functional/immutable-data + userAgent.value = `${userAgent.value}${addedUserAgent}`; + } + return userAgent; + }, + }; + return userAgent; +} + +function deserializeSuccess(response) { + // eslint-disable-next-line functional/no-try-statement + try { + return JSON.parse(response.content); + } + catch (e) { + throw createDeserializationError(e.message, response); + } +} +function deserializeFailure({ content, status }, stackFrame) { + // eslint-disable-next-line functional/no-let + let message = content; + // eslint-disable-next-line functional/no-try-statement + try { + message = JSON.parse(content).message; + } + catch (e) { + // .. + } + return createApiError(message, status, stackFrame); +} + +// eslint-disable-next-line functional/prefer-readonly-type +function encode(format, ...args) { + // eslint-disable-next-line functional/no-let + let i = 0; + return format.replace(/%s/g, () => encodeURIComponent(args[i++])); +} + +function serializeUrl(host, path, queryParameters) { + const queryParametersAsString = serializeQueryParameters(queryParameters); + // eslint-disable-next-line functional/no-let + let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`; + if (queryParametersAsString.length) { + url += `?${queryParametersAsString}`; + } + return url; +} +function serializeQueryParameters(parameters) { + const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' || + Object.prototype.toString.call(value) === '[object Array]'; + return Object.keys(parameters) + .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])) + .join('&'); +} +function serializeData(request, requestOptions) { + if (request.method === requesterCommon.MethodEnum.Get || + (request.data === undefined && requestOptions.data === undefined)) { + return undefined; + } + const data = Array.isArray(request.data) + ? request.data + : { ...request.data, ...requestOptions.data }; + return JSON.stringify(data); +} +function serializeHeaders(transporter, requestOptions) { + const headers = { + ...transporter.headers, + ...requestOptions.headers, + }; + const serializedHeaders = {}; + Object.keys(headers).forEach(header => { + const value = headers[header]; + // @ts-ignore + // eslint-disable-next-line functional/immutable-data + serializedHeaders[header.toLowerCase()] = value; + }); + return serializedHeaders; +} + +function stackTraceWithoutCredentials(stackTrace) { + return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame)); +} +function stackFrameWithoutCredentials(stackFrame) { + const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key'] + ? { 'x-algolia-api-key': '*****' } + : {}; + return { + ...stackFrame, + request: { + ...stackFrame.request, + headers: { + ...stackFrame.request.headers, + ...modifiedHeaders, + }, + }, + }; +} + +function createApiError(message, status, transporterStackTrace) { + return { + name: 'ApiError', + message, + status, + transporterStackTrace, + }; +} + +function createDeserializationError(message, response) { + return { + name: 'DeserializationError', + message, + response, + }; +} + +function createRetryError(transporterStackTrace) { + return { + name: 'RetryError', + message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.', + transporterStackTrace, + }; +} + +exports.CallEnum = CallEnum; +exports.HostStatusEnum = HostStatusEnum; +exports.createApiError = createApiError; +exports.createDeserializationError = createDeserializationError; +exports.createMappedRequestOptions = createMappedRequestOptions; +exports.createRetryError = createRetryError; +exports.createStatefulHost = createStatefulHost; +exports.createStatelessHost = createStatelessHost; +exports.createTransporter = createTransporter; +exports.createUserAgent = createUserAgent; +exports.deserializeFailure = deserializeFailure; +exports.deserializeSuccess = deserializeSuccess; +exports.isStatefulHostTimeouted = isStatefulHostTimeouted; +exports.isStatefulHostUp = isStatefulHostUp; +exports.serializeData = serializeData; +exports.serializeHeaders = serializeHeaders; +exports.serializeQueryParameters = serializeQueryParameters; +exports.serializeUrl = serializeUrl; +exports.stackFrameWithoutCredentials = stackFrameWithoutCredentials; +exports.stackTraceWithoutCredentials = stackTraceWithoutCredentials; diff --git a/paperai-docs/node_modules/@algolia/transporter/dist/transporter.d.ts b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.d.ts new file mode 100644 index 00000000..81a7bc11 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.d.ts @@ -0,0 +1,381 @@ +import { Cache } from '@algolia/cache-common'; +import { Logger } from '@algolia/logger-common'; +import { MethodType } from '@algolia/requester-common'; +import { Request as Request_2 } from '@algolia/requester-common'; +import { Requester } from '@algolia/requester-common'; +import { Response } from '@algolia/requester-common'; + +export declare type ApiError = Error & { + /** + * The http status code. + */ + readonly status: number; + /** + * Contains report of stack frames of the + * execution of a certain request. + */ + readonly transporterStackTrace: readonly StackFrame[]; +}; + +export declare const CallEnum: Readonly>; + +export declare type CallType = 1 | 2 | 3; + +export declare function createApiError(message: string, status: number, transporterStackTrace: readonly StackFrame[]): ApiError; + +export declare function createDeserializationError(message: string, response: Response): DeserializationError; + +export declare function createMappedRequestOptions(requestOptions?: RequestOptions, timeout?: number): MappedRequestOptions; + +export declare function createRetryError(transporterStackTrace: readonly StackFrame[]): RetryError; + +export declare function createStatefulHost(host: StatelessHost, status?: HostStatusType): StatefulHost; + +export declare function createStatelessHost(options: HostOptions): StatelessHost; + +export declare function createTransporter(options: TransporterOptions): Transporter; + +export declare function createUserAgent(version: string): UserAgent; + +export declare type DeserializationError = Error & { + /** + * The raw response from the server. + */ + readonly response: Response; +}; + +export declare function deserializeFailure({ content, status }: Response, stackFrame: readonly StackFrame[]): Error; + +export declare function deserializeSuccess(response: Response): TObject; + +export declare type Headers = Readonly>; + +export declare type HostOptions = string | { + /** + * The url of the server, without the protocol. + */ + readonly url: string; + /** + * The type of host. Defaults to `Any`. + */ + readonly accept?: CallType; + /** + * The protocol. Defaults to `https`. + */ + readonly protocol?: string; +}; + +export declare const HostStatusEnum: Readonly>; + +export declare type HostStatusType = 1 | 2 | 3; + +export declare function isStatefulHostTimeouted(host: StatefulHost): boolean; + +export declare function isStatefulHostUp(host: StatefulHost): boolean; + +export declare type MappedRequestOptions = { + /** + * If the request should be cached. + */ + readonly cacheable: boolean | undefined; + /** + * The `read` or `write` timeout of the request. + */ + readonly timeout: number | undefined; + /** + * The headers of the request. + */ + readonly headers: Record; + /** + * The query parameters of the request. + */ + readonly queryParameters: Record; + /** + * The data to be transfered to the server. + */ + readonly data?: Record; +}; + +export declare type QueryParameters = Readonly>; + +export declare type Request = { + /** + * The method of the request. `GET`, etc. + */ + readonly method: MethodType; + /** + * The path of the request. i.e: `/1/indexes`. + */ + readonly path: string; + /** + * The data to transfer to the server. + */ + readonly data?: Record | ReadonlyArray>; + /** + * If the response should persist on cache. + */ + readonly cacheable?: boolean; +}; + +export declare type RequestOptions = { + /** + * If the given request should persist on the cache. Keep in mind, + * that some methods may have this option enabled by default. + */ + readonly cacheable?: boolean; + /** + * Custom timeout for the request. Note that, in normal situacions + * the given timeout will be applied. But the transporter layer may + * increase this timeout if there is need for it. + */ + readonly timeout?: number; + /** + * Custom headers for the request. This headers are + * going to be merged the transporter headers. + */ + readonly headers?: Readonly>; + /** + * Custom query parameters for the request. This query parameters are + * going to be merged the transporter query parameters. + */ + readonly queryParameters?: Record; + /** + * Custom data for the request. This data are + * going to be merged the transporter data. + */ + readonly data?: Record; + /** + * Additional request body values. It's only taken in + * consideration in `POST` and `PUT` requests. + */ + [key: string]: any; +}; + +export declare type RetryError = Error & { + /** + * Contains report of stack frames of the + * execution of a certain request. + */ + readonly transporterStackTrace: readonly StackFrame[]; +}; + +export declare function serializeData(request: Request, requestOptions: RequestOptions): string | undefined; + +export declare function serializeHeaders(transporter: Transporter, requestOptions: RequestOptions): Headers; + +export declare function serializeQueryParameters(parameters: Readonly>): string; + +export declare function serializeUrl(host: StatelessHost, path: string, queryParameters: Readonly>): string; + +export declare type StackFrame = { + /** + * The request made. + */ + readonly request: Request_2; + /** + * The received response. + */ + readonly response: Response; + /** + * The host associated with the `request` and the `response`. + */ + readonly host: StatelessHost; + /** + * The number of tries left. + */ + readonly triesLeft: number; +}; + +export declare function stackFrameWithoutCredentials(stackFrame: StackFrame): StackFrame; + +export declare function stackTraceWithoutCredentials(stackTrace: readonly StackFrame[]): readonly StackFrame[]; + +export declare type StatefulHost = StatelessHost & { + /** + * Holds the last time this host failed in milliseconds elapsed + * since the UNIX epoch. This failure can be because of an + * timeout error or a because the host is not available. + */ + readonly lastUpdate: number; + /** + * Holds the host status. Note that, depending of the `lastUpdate` + * an host may be considered as `Up` on the transporter layer. + */ + readonly status: HostStatusType; +}; + +export declare type StatelessHost = { + /** + * The protocol of the stateless host. Between `http` and `https`. + */ + readonly protocol: string; + /** + * The url, without protocol. + */ + readonly url: string; + /** + * The type of the host. + */ + readonly accept: CallType; +}; + +export declare type Timeouts = { + /** + * The timeout to stablish a connection with the server. + */ + readonly connect: number; + /** + * The timeout to receive the response on read requests. + */ + readonly read: number; + /** + * The timeout to receive the response on write requests. + */ + readonly write: number; +}; + +export declare type Transporter = { + /** + * The cache of the hosts. Usually used to persist + * the state of the host when its down. + */ + readonly hostsCache: Cache; + /** + * The logger instance to send events of the transporter. + */ + readonly logger: Logger; + /** + * The underlying requester used. Should differ + * depending of the enviroment where the client + * will be used. + */ + readonly requester: Requester; + /** + * The cache of the requests. When requests are + * `cacheable`, the returned promised persists + * in this cache to shared in similar resquests + * before being resolved. + */ + readonly requestsCache: Cache; + /** + * The cache of the responses. When requests are + * `cacheable`, the returned responses persists + * in this cache to shared in similar resquests. + */ + readonly responsesCache: Cache; + /** + * The timeouts used by the requester. The transporter + * layer may increase this timeouts as defined on the + * retry strategy. + */ + readonly timeouts: Timeouts; + /** + * The user agent used. Sent on query parameters. + */ + readonly userAgent: UserAgent; + /** + * The headers used on each request. + */ + readonly headers: Headers; + /** + * The query parameters used on each request. + */ + readonly queryParameters: QueryParameters; + /** + * The hosts used by the retry strategy. + * + * @readonly + */ + hosts: readonly StatelessHost[]; + /** + * Performs a read request using read hosts. + */ + readonly read: (request: Request, requestOptions?: RequestOptions) => Readonly>; + /** + * Performs a write request using write hosts. + */ + readonly write: (request: Request, requestOptions?: RequestOptions) => Readonly>; +}; + +export declare type TransporterOptions = { + /** + * The cache of the hosts. Usually used to persist + * the state of the host when its down. + */ + readonly hostsCache: Cache; + /** + * The logger instance to send events of the transporter. + */ + readonly logger: Logger; + /** + * The underlying requester used. Should differ + * depending of the enviroment where the client + * will be used. + */ + readonly requester: Requester; + /** + * The cache of the requests. When requests are + * `cacheable`, the returned promised persists + * in this cache to shared in similar resquests + * before being resolved. + */ + readonly requestsCache: Cache; + /** + * The cache of the responses. When requests are + * `cacheable`, the returned responses persists + * in this cache to shared in similar resquests. + */ + readonly responsesCache: Cache; + /** + * The timeouts used by the requester. The transporter + * layer may increase this timeouts as defined on the + * retry strategy. + */ + readonly timeouts: Timeouts; + /** + * The hosts used by the requester. + */ + readonly hosts: readonly HostOptions[]; + /** + * The headers used by the requester. The transporter + * layer may add some extra headers during the request + * for the user agent, and others. + */ + readonly headers: Headers; + /** + * The query parameters used by the requester. The transporter + * layer may add some extra headers during the request + * for the user agent, and others. + */ + readonly queryParameters: QueryParameters; + /** + * The user agent used. Sent on query parameters. + */ + readonly userAgent: UserAgent; +}; + +export declare type UserAgent = { + /** + * The raw value of the user agent. + * + * @readonly + */ + value: string; + /** + * Mutates the current user agent ading the given user agent options. + */ + readonly add: (options: UserAgentOptions) => UserAgent; +}; + +export declare type UserAgentOptions = { + /** + * The segment. Usually the integration name. + */ + readonly segment: string; + /** + * The version. Usually the integration version. + */ + readonly version?: string; +}; + +export { } diff --git a/paperai-docs/node_modules/@algolia/transporter/dist/transporter.esm.js b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.esm.js new file mode 100644 index 00000000..89ba4c53 --- /dev/null +++ b/paperai-docs/node_modules/@algolia/transporter/dist/transporter.esm.js @@ -0,0 +1,460 @@ +import { MethodEnum } from '@algolia/requester-common'; + +function createMappedRequestOptions(requestOptions, timeout) { + const options = requestOptions || {}; + const data = options.data || {}; + Object.keys(options).forEach(key => { + if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) { + data[key] = options[key]; // eslint-disable-line functional/immutable-data + } + }); + return { + data: Object.entries(data).length > 0 ? data : undefined, + timeout: options.timeout || timeout, + headers: options.headers || {}, + queryParameters: options.queryParameters || {}, + cacheable: options.cacheable, + }; +} + +const CallEnum = { + /** + * If the host is read only. + */ + Read: 1, + /** + * If the host is write only. + */ + Write: 2, + /** + * If the host is both read and write. + */ + Any: 3, +}; + +const HostStatusEnum = { + Up: 1, + Down: 2, + Timeouted: 3, +}; + +// By default, API Clients at Algolia have expiration delay +// of 5 mins. In the JavaScript client, we have 2 mins. +const EXPIRATION_DELAY = 2 * 60 * 1000; +function createStatefulHost(host, status = HostStatusEnum.Up) { + return { + ...host, + status, + lastUpdate: Date.now(), + }; +} +function isStatefulHostUp(host) { + return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY; +} +function isStatefulHostTimeouted(host) { + return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY); +} + +function createStatelessHost(options) { + if (typeof options === 'string') { + return { + protocol: 'https', + url: options, + accept: CallEnum.Any, + }; + } + return { + protocol: options.protocol || 'https', + url: options.url, + accept: options.accept || CallEnum.Any, + }; +} + +function createRetryableOptions(hostsCache, statelessHosts) { + return Promise.all(statelessHosts.map(statelessHost => { + return hostsCache.get(statelessHost, () => { + return Promise.resolve(createStatefulHost(statelessHost)); + }); + })).then(statefulHosts => { + const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host)); + const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host)); + /** + * Note, we put the hosts that previously timeouted on the end of the list. + */ + const hostsAvailable = [...hostsUp, ...hostsTimeouted]; + const statelessHostsAvailable = hostsAvailable.length > 0 + ? hostsAvailable.map(host => createStatelessHost(host)) + : statelessHosts; + return { + getTimeout(timeoutsCount, baseTimeout) { + /** + * Imagine that you have 4 hosts, if timeouts will increase + * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200) + * + * Note that, the very next request, we start from the previous timeout + * + * 5 (timeouted) > 6 (timeouted) > 7 ... + * + * This strategy may need to be reviewed, but is the strategy on the our + * current v3 version. + */ + const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0 + ? 1 + : hostsTimeouted.length + 3 + timeoutsCount; + return timeoutMultiplier * baseTimeout; + }, + statelessHosts: statelessHostsAvailable, + }; + }); +} + +const isNetworkError = ({ isTimedOut, status }) => { + return !isTimedOut && ~~status === 0; +}; +const isRetryable = (response) => { + const status = response.status; + const isTimedOut = response.isTimedOut; + return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4)); +}; +const isSuccess = ({ status }) => { + return ~~(status / 100) === 2; +}; +const retryDecision = (response, outcomes) => { + if (isRetryable(response)) { + return outcomes.onRetry(response); + } + if (isSuccess(response)) { + return outcomes.onSuccess(response); + } + return outcomes.onFail(response); +}; + +function retryableRequest(transporter, statelessHosts, request, requestOptions) { + const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type + /** + * First we prepare the payload that do not depend from hosts. + */ + const data = serializeData(request, requestOptions); + const headers = serializeHeaders(transporter, requestOptions); + const method = request.method; + // On `GET`, the data is proxied to query parameters. + const dataQueryParameters = request.method !== MethodEnum.Get + ? {} + : { + ...request.data, + ...requestOptions.data, + }; + const queryParameters = { + 'x-algolia-agent': transporter.userAgent.value, + ...transporter.queryParameters, + ...dataQueryParameters, + ...requestOptions.queryParameters, + }; + let timeoutsCount = 0; // eslint-disable-line functional/no-let + const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type + getTimeout) => { + /** + * We iterate on each host, until there is no host left. + */ + const host = hosts.pop(); // eslint-disable-line functional/immutable-data + if (host === undefined) { + throw createRetryError(stackTraceWithoutCredentials(stackTrace)); + } + const payload = { + data, + headers, + method, + url: serializeUrl(host, request.path, queryParameters), + connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect), + responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout), + }; + /** + * The stackFrame is pushed to the stackTrace so we + * can have information about onRetry and onFailure + * decisions. + */ + const pushToStackTrace = (response) => { + const stackFrame = { + request: payload, + response, + host, + triesLeft: hosts.length, + }; + // eslint-disable-next-line functional/immutable-data + stackTrace.push(stackFrame); + return stackFrame; + }; + const decisions = { + onSuccess: response => deserializeSuccess(response), + onRetry(response) { + const stackFrame = pushToStackTrace(response); + /** + * If response is a timeout, we increaset the number of + * timeouts so we can increase the timeout later. + */ + if (response.isTimedOut) { + timeoutsCount++; + } + return Promise.all([ + /** + * Failures are individually send the logger, allowing + * the end user to debug / store stack frames even + * when a retry error does not happen. + */ + transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)), + /** + * We also store the state of the host in failure cases. If the host, is + * down it will remain down for the next 2 minutes. In a timeout situation, + * this host will be added end of the list of hosts on the next request. + */ + transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)), + ]).then(() => retry(hosts, getTimeout)); + }, + onFail(response) { + pushToStackTrace(response); + throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace)); + }, + }; + return transporter.requester.send(payload).then(response => { + return retryDecision(response, decisions); + }); + }; + /** + * Finally, for each retryable host perform request until we got a non + * retryable response. Some notes here: + * + * 1. The reverse here is applied so we can apply a `pop` later on => more performant. + * 2. We also get from the retryable options a timeout multiplier that is tailored + * for the current context. + */ + return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => { + return retry([...options.statelessHosts].reverse(), options.getTimeout); + }); +} + +function createTransporter(options) { + const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options; + const transporter = { + hostsCache, + logger, + requester, + requestsCache, + responsesCache, + timeouts, + userAgent, + headers, + queryParameters, + hosts: hosts.map(host => createStatelessHost(host)), + read(request, requestOptions) { + /** + * First, we compute the user request options. Now, keep in mind, + * that using request options the user is able to modified the intire + * payload of the request. Such as headers, query parameters, and others. + */ + const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read); + const createRetryableRequest = () => { + /** + * Then, we prepare a function factory that contains the construction of + * the retryable request. At this point, we may *not* perform the actual + * request. But we want to have the function factory ready. + */ + return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions); + }; + /** + * Once we have the function factory ready, we need to determine of the + * request is "cacheable" - should be cached. Note that, once again, + * the user can force this option. + */ + const cacheable = mappedRequestOptions.cacheable !== undefined + ? mappedRequestOptions.cacheable + : request.cacheable; + /** + * If is not "cacheable", we immediatly trigger the retryable request, no + * need to check cache implementations. + */ + if (cacheable !== true) { + return createRetryableRequest(); + } + /** + * If the request is "cacheable", we need to first compute the key to ask + * the cache implementations if this request is on progress or if the + * response already exists on the cache. + */ + const key = { + request, + mappedRequestOptions, + transporter: { + queryParameters: transporter.queryParameters, + headers: transporter.headers, + }, + }; + /** + * With the computed key, we first ask the responses cache + * implemention if this request was been resolved before. + */ + return transporter.responsesCache.get(key, () => { + /** + * If the request has never resolved before, we actually ask if there + * is a current request with the same key on progress. + */ + return transporter.requestsCache.get(key, () => { + return (transporter.requestsCache + /** + * Finally, if there is no request in progress with the same key, + * this `createRetryableRequest()` will actually trigger the + * retryable request. + */ + .set(key, createRetryableRequest()) + .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)])) + .then(([_, response]) => response)); + }); + }, { + /** + * Of course, once we get this response back from the server, we + * tell response cache to actually store the received response + * to be used later. + */ + miss: response => transporter.responsesCache.set(key, response), + }); + }, + write(request, requestOptions) { + /** + * On write requests, no cache mechanisms are applied, and we + * proxy the request immediately to the requester. + */ + return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write)); + }, + }; + return transporter; +} + +function createUserAgent(version) { + const userAgent = { + value: `Algolia for JavaScript (${version})`, + add(options) { + const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`; + if (userAgent.value.indexOf(addedUserAgent) === -1) { + // eslint-disable-next-line functional/immutable-data + userAgent.value = `${userAgent.value}${addedUserAgent}`; + } + return userAgent; + }, + }; + return userAgent; +} + +function deserializeSuccess(response) { + // eslint-disable-next-line functional/no-try-statement + try { + return JSON.parse(response.content); + } + catch (e) { + throw createDeserializationError(e.message, response); + } +} +function deserializeFailure({ content, status }, stackFrame) { + // eslint-disable-next-line functional/no-let + let message = content; + // eslint-disable-next-line functional/no-try-statement + try { + message = JSON.parse(content).message; + } + catch (e) { + // .. + } + return createApiError(message, status, stackFrame); +} + +// eslint-disable-next-line functional/prefer-readonly-type +function encode(format, ...args) { + // eslint-disable-next-line functional/no-let + let i = 0; + return format.replace(/%s/g, () => encodeURIComponent(args[i++])); +} + +function serializeUrl(host, path, queryParameters) { + const queryParametersAsString = serializeQueryParameters(queryParameters); + // eslint-disable-next-line functional/no-let + let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`; + if (queryParametersAsString.length) { + url += `?${queryParametersAsString}`; + } + return url; +} +function serializeQueryParameters(parameters) { + const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' || + Object.prototype.toString.call(value) === '[object Array]'; + return Object.keys(parameters) + .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])) + .join('&'); +} +function serializeData(request, requestOptions) { + if (request.method === MethodEnum.Get || + (request.data === undefined && requestOptions.data === undefined)) { + return undefined; + } + const data = Array.isArray(request.data) + ? request.data + : { ...request.data, ...requestOptions.data }; + return JSON.stringify(data); +} +function serializeHeaders(transporter, requestOptions) { + const headers = { + ...transporter.headers, + ...requestOptions.headers, + }; + const serializedHeaders = {}; + Object.keys(headers).forEach(header => { + const value = headers[header]; + // @ts-ignore + // eslint-disable-next-line functional/immutable-data + serializedHeaders[header.toLowerCase()] = value; + }); + return serializedHeaders; +} + +function stackTraceWithoutCredentials(stackTrace) { + return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame)); +} +function stackFrameWithoutCredentials(stackFrame) { + const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key'] + ? { 'x-algolia-api-key': '*****' } + : {}; + return { + ...stackFrame, + request: { + ...stackFrame.request, + headers: { + ...stackFrame.request.headers, + ...modifiedHeaders, + }, + }, + }; +} + +function createApiError(message, status, transporterStackTrace) { + return { + name: 'ApiError', + message, + status, + transporterStackTrace, + }; +} + +function createDeserializationError(message, response) { + return { + name: 'DeserializationError', + message, + response, + }; +} + +function createRetryError(transporterStackTrace) { + return { + name: 'RetryError', + message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.', + transporterStackTrace, + }; +} + +export { CallEnum, HostStatusEnum, createApiError, createDeserializationError, createMappedRequestOptions, createRetryError, createStatefulHost, createStatelessHost, createTransporter, createUserAgent, deserializeFailure, deserializeSuccess, isStatefulHostTimeouted, isStatefulHostUp, serializeData, serializeHeaders, serializeQueryParameters, serializeUrl, stackFrameWithoutCredentials, stackTraceWithoutCredentials }; diff --git a/paperai-docs/node_modules/@algolia/transporter/index.js b/paperai-docs/node_modules/@algolia/transporter/index.js new file mode 100644 index 00000000..e254eb1b --- /dev/null +++ b/paperai-docs/node_modules/@algolia/transporter/index.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line functional/immutable-data, import/no-commonjs +module.exports = require('./dist/transporter.cjs.js'); diff --git a/paperai-docs/node_modules/@algolia/transporter/package.json b/paperai-docs/node_modules/@algolia/transporter/package.json new file mode 100644 index 00000000..7f571aee --- /dev/null +++ b/paperai-docs/node_modules/@algolia/transporter/package.json @@ -0,0 +1,24 @@ +{ + "name": "@algolia/transporter", + "version": "4.22.1", + "private": false, + "description": "Promise-based transporter layer with embedded retry strategy.", + "repository": { + "type": "git", + "url": "git://github.com/algolia/algoliasearch-client-javascript.git" + }, + "license": "MIT", + "sideEffects": false, + "main": "index.js", + "module": "dist/transporter.esm.js", + "types": "dist/transporter.d.ts", + "files": [ + "index.js", + "dist" + ], + "dependencies": { + "@algolia/cache-common": "4.22.1", + "@algolia/logger-common": "4.22.1", + "@algolia/requester-common": "4.22.1" + } +} diff --git a/paperai-docs/node_modules/@babel/parser/CHANGELOG.md b/paperai-docs/node_modules/@babel/parser/CHANGELOG.md new file mode 100644 index 00000000..b3840ac8 --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/CHANGELOG.md @@ -0,0 +1,1073 @@ +# Changelog + +> **Tags:** +> - :boom: [Breaking Change] +> - :eyeglasses: [Spec Compliance] +> - :rocket: [New Feature] +> - :bug: [Bug Fix] +> - :memo: [Documentation] +> - :house: [Internal] +> - :nail_care: [Polish] + +> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver + +_Note: Gaps between patch versions are faulty, broken or test releases._ + +See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog. + +## 6.17.1 (2017-05-10) + +### :bug: Bug Fix + * Fix typo in flow spread operator error (Brian Ng) + * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) + * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) + * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) + * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) + * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) + * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) + +## 6.17.0 (2017-04-20) + +### :bug: Bug Fix + * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) + * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) + * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) + * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) + * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) + * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) + +## 7.0.0-beta.8 (2017-04-04) + +### New Feature +* Add support for flow type spread (#418) (Conrad Buck) +* Allow statics in flow interfaces (#427) (Brian Ng) + +### Bug Fix +* Fix predicate attachment to match flow parser (#428) (Brian Ng) +* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) +* Fix rest parameters with array and objects (#424) (Brian Ng) +* Fix number parser (#433) (Alex Kuzmenko) + +### Docs +* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) + +### Internal +* Use babel-register script when running babel smoke tests (#442) (Brian Ng) + +## 7.0.0-beta.7 (2017-03-22) + +### Spec Compliance +* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) + +### Bug Fix + +* Fix push-pop logic in flow (#405) (Daniel Tschinder) + +## 7.0.0-beta.6 (2017-03-21) + +### New Feature +* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) + +### Polish +* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) + +### Docs + +* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) + +## 7.0.0-beta.5 (2017-03-21) + +### Bug Fix +* Throw error if new.target is used outside of a function (#402) (Brian Ng) +* Fix parsing of class properties (#351) (Kevin Gibbons) + +### Other + * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) + * Optimize travis builds (#419) (Daniel Tschinder) + * Update codecov to 2.0 (#412) (Daniel Tschinder) + * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) + * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) + * Upgrade flow to 0.41 (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * Update yarn lock (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) + * Add estree test for correct order of directives (Daniel Tschinder) + * Add DoExpression to spec (#364) (Alex Kuzmenko) + * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) + * Explain how to run only one test (#389) [skip ci] (Aaron Ang) + + ## 7.0.0-beta.4 (2017-03-01) + +* Don't consume async when checking for async func decl (#377) (Brian Ng) +* add `ranges` option [skip ci] (Henry Zhu) +* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) + +## 7.0.0-beta.3 (2017-02-28) + +- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) +- Merge changes from 6.x + +## 7.0.0-beta.2 (2017-02-20) + +- estree: correctly change literals in all cases (#368) (Daniel Tschinder) + +## 7.0.0-beta.1 (2017-02-20) + +- Fix negative number literal typeannotations (#366) (Daniel Tschinder) +- Update contributing with more test info [skip ci] (#355) (Brian Ng) + +## 7.0.0-beta.0 (2017-02-15) + +- Reintroduce Variance node (#333) (Daniel Tschinder) +- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) +- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) +- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) +- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) +- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) +- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) +- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) +- Remove classConstructorCall plugin (#291) (Brian Ng) +- Update yarn.lock (Daniel Tschinder) +- Update cross-env to 3.x (Daniel Tschinder) +- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) +- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) + +## 6.16.1 (2017-02-23) + +### :bug: Regression + +- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) + +Need to modify Babel for this AST node change, so moving to 7.0. + +- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) + +[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. + +## 6.16.0 (2017-02-23) + +### :rocket: New Feature + +***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) + +We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) + +We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. + +To enable `estree` mode simply add the plugin in the config: +```json +{ + "plugins": [ "estree" ] +} +``` + +If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. + +Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) + +Babylon exports a new function to parse a single expression + +```js +import { parseExpression } from 'babylon'; + +const ast = parseExpression('x || y && z', options); +``` + +The returned AST will only consist of the expression. The options are the same as for `parse()` + +Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) + +A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`. +Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... + +Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) + +Added support for function predicates which flow introduced in version 0.33.0 + +```js +declare function is_number(x: mixed): boolean %checks(typeof x === "number"); +``` + +Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) + +Added support for imports within module declarations which flow introduced in version 0.37.0 + +```js +declare module "C" { + import type { DT } from "D"; + declare export type CT = { D: DT }; +} +``` + +### :eyeglasses: Spec Compliance + +Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) + +This example now correctly throws an error when there is a semicolon after the decorator: + +```js +class A { +@a; +foo(){} +} +``` + +Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) + +Using keywords in imports is not allowed anymore: + +```js +import { default } from "foo"; +import { a as debugger } from "foo"; +``` + +Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) + +In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. + +Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) + +The following code now correctly throws an error + +```js +import type { type a } from "foo"; +``` + +Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) + +Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. + +If you enable the flow plugin you can only define the type of the class properties, but not initialize them. + +Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) + +Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. + +```js +export default async function bar() {}; +``` + +### :nail_care: Polish + +Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) + +### :bug: Bug Fix + +Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) + +Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) + +ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) + +Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) + +Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) + +Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) + +Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) + +Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) + + +### :house: Internal + +Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) + +Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) + +Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) + +chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) + +Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) + +Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) + +Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) + +devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) + +Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) + +Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) + +### :memo: Documentation + +Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) + +Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) + +Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) + +AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) + +## 6.15.0 (2017-01-10) + +### :eyeglasses: Spec Compliance + +Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) + +This change implements flows new shorthand import syntax +and where previously you had to write this code: + +```js +import {someValue} from "blah"; +import type {someType} from "blah"; +import typeof {someOtherValue} from "blah"; +``` + +you can now write it like this: + +```js +import { + someValue, + type someType, + typeof someOtherValue, +} from "blah"; +``` + +For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. + +flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) + +This change now allows a leading pipe everywhere types can be used: +```js +var f = (x): | 1 | 2 => 1; +``` + +Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) + +Previously babylon parsed the following exports, although they are not valid: +```js +export typeof foo; +export new Foo(); +export function() {}; +export for (;;); +export while(foo); +``` + +### :bug: Bug Fix + +Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) + +This fixes parsing of this case: + +```js +const map = { + [age <= 17] : 'Too young' +}; +``` + +Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) + +The following case produced an invalid AST +```js +
{/* foo */}
+``` + +Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) + +When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. + +Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) + +Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) + +### :house: Internal + +User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) + +Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) + +Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) + +Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) + +Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) + +Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) + +Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) + +chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) + +chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) + +## 6.14.1 (2016-11-17) + +### :bug: Bug Fix + +Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) + +```js +{ + "plugins": ["*"] +} +``` + +Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. + +## 6.14.0 (2016-11-16) + +### :eyeglasses: Spec Compliance + +Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) + +[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) + +Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). + +``` +class enum {} // throws +class await {} // throws in strict mode (module) +``` + +Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) + +So where you used to have to write + +```js +type A = (x: string, y: boolean) => number; +type B = (z: string) => number; +type C = { [key: string]: number }; +``` + +you can now write (with flow 0.34.0) + +```js +type A = (string, boolean) => number; +type B = string => number; +type C = { [string]: number }; +``` + +Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) + +Supports these form now of specifying array types: + +```js +var a: number[][][][]; +var b: string[][]; +``` + +### :bug: Bug Fix + +Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) + +``` +declare module "foo" { declare module.exports: number } +declare module "foo" { declare module.exports: number; } // also allowed now +``` + +### :house: Internal + + * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) + * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) + * Add node 7 (Daniel Tschinder) + * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) + +## v6.13.1 (2016-10-26) + +### :nail_care: Polish + +- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) + +```js +const babylon = require('babylon'); +const ast = babylon.parse('var foo = "lol";'); +``` + +With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. + +**Without bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) + +**With bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) + +- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) +- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) + +## v6.13.0 (2016-10-21) + +### :eyeglasses: Spec Compliance + +Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) + +> See https://flowtype.org/docs/variance.html for more information + +```js +type T = { +p: T }; +interface T { -p: T }; +declare class T { +[k:K]: V }; +class T { -[k:K]: V }; +class C2 { +p: T = e }; +``` + +Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) + +```js +({ __proto__: 1, __proto__: 2 }) // Throws an error now +``` + +### :bug: Bug Fix + +Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) + +```js +declare class A { + static: T; +} +``` + +Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) + +```js +var foo = { async, bar }; +``` + +### :nail_care: Polish + +Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) + +> This improves the performance slightly (because of hidden classes) + +### :house: Internal + +Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) + +Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) + +Readd missin .eslinignore for IDEs (Daniel Tschinder) + +Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) + +Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) + +Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) + +## v6.12.0 (2016-10-14) + +### :eyeglasses: Spec Compliance + +Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) + +#### Dynamic Import + +- Proposal Repo: https://github.com/domenic/proposal-dynamic-import +- Championed by [@domenic](https://github.com/domenic) +- stage-2 +- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) + +> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript + +```js +import(`./section-modules/${link.dataset.entryModule}.js`) +.then(module => { + module.loadPageInto(main); +}) +``` + +Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) + +#### EmptyTypeAnnotation + +Just wasn't covered before. + +```js +type T = empty; +``` + +### :bug: Bug Fix + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing due to sparse array +export const { foo: [ ,, qux7 ] } = bar; +``` + +Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) + +```js +declare class X { + foobar(): void; + static foobar(): void; +} +``` + +Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) + +```js +class Foo { + delete(item: T): T { + return item; + } +} +``` + +Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) + +```js +function *foo() { + const x = (yield 5: any); +} +``` + +### :nail_care: Polish + +Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) + +```js +// Unexpected token, expected ; (1:6) +{ set 1 } +``` + +### :house: Internal + +Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) + +Also run flow, linting, babel tests on separate instances (add back node 0.10) + +## v6.11.6 (2016-10-12) + +### :bug: Bug Fix/Regression + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing with `Cannot read property 'type' of null` because of null identifiers +export const { foo: [ ,, qux7 ] } = bar; +``` + +## v6.11.5 (2016-10-12) + +### :eyeglasses: Spec Compliance + +Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:20) +export function foo() {}; +export const { a: [{foo}] } = bar; +``` + +Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:22) +export const foo = 1; +export const [bar, ...foo] = baz; +``` + +### :bug: Bug Fix + +Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) + +```js +// this is ok now +const test = ({async = true}) => {}; +``` + +### :nail_care: Polish + +Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) + +```bash +# So in the case of a missing ending curly (`}`) +Module build failed: SyntaxError: Unexpected token, expected } (30:0) + 28 | } + 29 | +> 30 | + | ^ +``` + +## v6.11.4 (2016-10-03) + +Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) + +## v6.11.3 (2016-10-01) + +### :eyeglasses: Spec Compliance + +Add static errors for object rest (#149) ([@danez](https://github.com/danez)) + +> https://github.com/sebmarkbage/ecmascript-rest-spread + +Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. + +```js +let { x, y, ...z } = { x: 1, y: 2, z: 3 }; +// x = 1 +// y = 2 +// z = { z: 3 } +``` + +#### New Syntax Errors: + +**SyntaxError**: The rest element has to be the last element when destructuring (1:10) +```bash +> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = { x: 1, y: 2, z: 3 } +# y = 2 +# z = 3 +``` + +Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. + +**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) + +```bash +> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = 1 +# y = { y: 2, z: 3 } +# z = { y: 2, z: 3 } +``` + +Before y and z would just be the same value anyway so there is no reason to need to have both. + +**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) + +```js +let { x, y, ...z, } = obj; +``` + +The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. + +--- + +get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) + +```js +// valid +function something({ set = null, get = null }) {} +``` + +## v6.11.2 (2016-09-23) + +### Bug Fix + +- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo + +```js +// regression with duplicate export check +SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) + 20 | + 21 | export const { rhythm } = typography; +> 22 | export const { TypographyStyle } = typography +``` + +Bail out for now, and make a change to account for destructuring in the next release. + +## 6.11.1 (2016-09-22) + +### Bug Fix +- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez + +```javascript +export toString from './toString'; +``` + +```bash +`toString` has already been exported. Exported identifiers must be unique. (1:7) +> 1 | export toString from './toString'; + | ^ + 2 | +``` + +## 6.11.0 (2016-09-22) + +### Spec Compliance (will break CI) + +- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo + +```js +// Only one default export allowed per module. (2:9) +export default function() {}; +export { foo as default }; + +// Only one default export allowed per module. (2:0) +export default {}; +export default function() {}; + +// `Foo` has already been exported. Exported identifiers must be unique. (2:0) +export { Foo }; +export class Foo {}; +``` + +### New Feature (Syntax) + +- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 + +```js +// AST +interface ClassProperty <: Node { + type: "ClassProperty"; + key: Identifier; + value: Expression; + computed: boolean; // added +} +``` + +```js +// with "plugins": ["classProperties"] +class Foo { + [x] + ['y'] +} + +class Bar { + [p] + [m] () {} +} + ``` + +### Bug Fix + +- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper + +```js +declare class X { + a: number; + static b: number; // static + c: number; // this was being marked as static in the AST as well +} +``` + +### Polish + +- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 + +```js +// Used to error with: +// SyntaxError: Assigning to rvalue (1:0) + +// Now: +// Invalid left-hand side in assignment expression (1:0) +3 = 4 + +// Invalid left-hand side in for-in statement (1:5) +for (+i in {}); +``` + +### Internal + +- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez +- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo + +## 6.10.0 (2016-09-19) + +> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue. + +### Spec Compliance + +* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) + +> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors + +More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) + +For example: + +```js +// this errors because it uses destructuring and default parameters +// in a function with a "use strict" directive +function a([ option1, option2 ] = []) { + "use strict"; +} + ``` + +The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. + +### New Feature + +* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) + +Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 + +Looks like: + +```js +var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; +``` + +### Bug Fixes + +* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) +* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) +* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) + +### Misc + +* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) +* Fix Contributing guidelines [skip ci] (Daniel Tschinder) + +## 6.9.2 (2016-09-09) + +The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. + +## 6.9.1 (2016-08-23) + +This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. + +### Bug Fixes + +- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez +- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez +- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper +- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez +- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez + +## 6.9.0 (2016-08-16) + +### New syntax support + +- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer + +(Be aware that React is not going to support this syntax) + +```js +
+ {...todos.map(todo => )} +
+``` + +- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez + +```js +declare module "foo" { + declare module.exports: {} +} +``` + +### New Features + +- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain +- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens + +### Bug Fixes + +- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez +- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez +- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi +- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez +- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi +- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez +- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez + +### Internal + +- Add codecoverage to tests @danez +- Fix tests to not save expected output if we expect the test to fail @danez +- Make a shallow clone of babel for testing @danez +- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot +- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot +- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot +- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot + +## 6.8.4 (2016-07-06) + +### Bug Fixes + +- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez + +## 6.8.3 (2016-07-02) + +### Bug Fixes + +- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez + +## 6.8.2 (2016-06-24) + +### Bug Fixes + +- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal +- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez +- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez +- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez +- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez +- Support negative numeric type literals @kittens +- Remove line terminator restriction after await keyword @kittens +- Remove grouped type arrow restriction as it seems flow no longer has it @kittens +- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin +- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi + +### Documentation + +- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene +- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo + +### Internal + +- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez +- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez +- Upgrade test runner ava @kittens +- Add missing generate-identifier-regex script @kittens +- Rename parser context types @kittens +- Add node v6 to travis testing @hzoo +- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens + +## 6.8.1 (2016-06-06) + +### New Feature + +- Parse type parameter declarations with defaults like `type Foo = T` + +### Bug Fixes +- Type parameter declarations need 1 or more type parameters. +- The existential type `*` is not a valid type parameter. +- The existential type `*` is a primary type + +### Spec Compliance +- The param list for type parameter declarations now consists of `TypeParameter` nodes +- New `TypeParameter` AST Node (replaces using the `Identifier` node before) + +``` +interface TypeParameter <: Node { + bound: TypeAnnotation; + default: TypeAnnotation; + name: string; + variance: "plus" | "minus"; +} +``` + +## 6.8.0 (2016-05-02) + +#### New Feature + +##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) + +> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). + +Examples: + +```js +class Foo { + constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} +} + +export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} + +var obj = { + method(@foo() x, @bar({ a: 123 }) @baz() y) {} +}; +``` + +##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) + +There is also a new node type, `ForAwaitStatement`. + +> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). + +Example: + +```js +async function f() { + for await (let x of y); +} +``` diff --git a/paperai-docs/node_modules/@babel/parser/LICENSE b/paperai-docs/node_modules/@babel/parser/LICENSE new file mode 100644 index 00000000..d4c7fc58 --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/paperai-docs/node_modules/@babel/parser/README.md b/paperai-docs/node_modules/@babel/parser/README.md new file mode 100644 index 00000000..a9463e81 --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/README.md @@ -0,0 +1,19 @@ +# @babel/parser + +> A JavaScript parser + +See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/parser +``` + +or using yarn: + +```sh +yarn add @babel/parser --dev +``` diff --git a/paperai-docs/node_modules/@babel/parser/bin/babel-parser.js b/paperai-docs/node_modules/@babel/parser/bin/babel-parser.js new file mode 100644 index 00000000..3aca3145 --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/bin/babel-parser.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +/* eslint no-var: 0 */ + +var parser = require(".."); +var fs = require("fs"); + +var filename = process.argv[2]; +if (!filename) { + console.error("no filename specified"); +} else { + var file = fs.readFileSync(filename, "utf8"); + var ast = parser.parse(file); + + console.log(JSON.stringify(ast, null, " ")); +} diff --git a/paperai-docs/node_modules/@babel/parser/index.cjs b/paperai-docs/node_modules/@babel/parser/index.cjs new file mode 100644 index 00000000..89863a9f --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/index.cjs @@ -0,0 +1,5 @@ +try { + module.exports = require("./lib/index.cjs"); +} catch { + module.exports = require("./lib/index.js"); +} diff --git a/paperai-docs/node_modules/@babel/parser/lib/index.js b/paperai-docs/node_modules/@babel/parser/lib/index.js new file mode 100644 index 00000000..58a13f92 --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/lib/index.js @@ -0,0 +1,13980 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; +} +class Position { + constructor(line, col, index) { + this.line = void 0; + this.column = void 0; + this.index = void 0; + this.line = line; + this.column = col; + this.index = index; + } +} +class SourceLocation { + constructor(start, end) { + this.start = void 0; + this.end = void 0; + this.filename = void 0; + this.identifierName = void 0; + this.start = start; + this.end = end; + } +} +function createPositionWithColumnOffset(position, columnOffset) { + const { + line, + column, + index + } = position; + return new Position(line, column + columnOffset, index + columnOffset); +} +const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; +var ModuleErrors = { + ImportMetaOutsideModule: { + message: `import.meta may appear only with 'sourceType: "module"'`, + code + }, + ImportOutsideModule: { + message: `'import' and 'export' may appear only with 'sourceType: "module"'`, + code + } +}; +const NodeDescriptions = { + ArrayPattern: "array destructuring pattern", + AssignmentExpression: "assignment expression", + AssignmentPattern: "assignment expression", + ArrowFunctionExpression: "arrow function expression", + ConditionalExpression: "conditional expression", + CatchClause: "catch clause", + ForOfStatement: "for-of statement", + ForInStatement: "for-in statement", + ForStatement: "for-loop", + FormalParameters: "function parameter list", + Identifier: "identifier", + ImportSpecifier: "import specifier", + ImportDefaultSpecifier: "import default specifier", + ImportNamespaceSpecifier: "import namespace specifier", + ObjectPattern: "object destructuring pattern", + ParenthesizedExpression: "parenthesized expression", + RestElement: "rest element", + UpdateExpression: { + true: "prefix operation", + false: "postfix operation" + }, + VariableDeclarator: "variable declaration", + YieldExpression: "yield expression" +}; +const toNodeDescription = ({ + type, + prefix +}) => type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[String(prefix)] : NodeDescriptions[type]; +var StandardErrors = { + AccessorIsGenerator: ({ + kind + }) => `A ${kind}ter cannot be a generator.`, + ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", + AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", + AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", + AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", + AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", + AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", + BadGetterArity: "A 'get' accessor must not have any formal parameters.", + BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", + BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", + ConstructorClassField: "Classes may not have a field named 'constructor'.", + ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", + ConstructorIsAccessor: "Class constructor may not be an accessor.", + ConstructorIsAsync: "Constructor can't be an async function.", + ConstructorIsGenerator: "Constructor can't be a generator.", + DeclarationMissingInitializer: ({ + kind + }) => `Missing initializer in ${kind} declaration.`, + DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", + DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", + DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", + DecoratorSemicolon: "Decorators must not be followed by a semicolon.", + DecoratorStaticBlock: "Decorators can't be used with a static block.", + DeferImportRequiresNamespace: 'Only `import defer * as x from "./module"` is valid.', + DeletePrivateField: "Deleting a private field is not allowed.", + DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + DuplicateConstructor: "Duplicate constructor in the same class.", + DuplicateDefaultExport: "Only one default export allowed per module.", + DuplicateExport: ({ + exportName + }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, + DuplicateProto: "Redefinition of __proto__ property.", + DuplicateRegExpFlags: "Duplicate regular expression flag.", + DynamicImportPhaseRequiresImportExpressions: ({ + phase + }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, + ElementAfterRest: "Rest element must be last element.", + EscapedCharNotAnIdentifier: "Invalid Unicode escape.", + ExportBindingIsString: ({ + localName, + exportName + }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, + ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", + ForInOfLoopInitializer: ({ + type + }) => `'${type === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, + ForInUsing: "For-in loop may not start with 'using' declaration.", + ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", + ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", + GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", + IllegalBreakContinue: ({ + type + }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", + IllegalReturn: "'return' outside of function.", + ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.", + ImportBindingIsString: ({ + importName + }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, + ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", + ImportCallArity: ({ + maxArgumentCount + }) => `\`import()\` requires exactly ${maxArgumentCount === 1 ? "one argument" : "one or two arguments"}.`, + ImportCallNotNewExpression: "Cannot use new with import(...).", + ImportCallSpreadArgument: "`...` is not allowed in `import()`.", + ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", + ImportReflectionHasAssertion: "`import module x` cannot have assertions.", + ImportReflectionNotBinding: 'Only `import module x from "./module"` is valid.', + IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", + InvalidBigIntLiteral: "Invalid BigIntLiteral.", + InvalidCodePoint: "Code point out of bounds.", + InvalidCoverInitializedName: "Invalid shorthand property initializer.", + InvalidDecimal: "Invalid decimal.", + InvalidDigit: ({ + radix + }) => `Expected number in radix ${radix}.`, + InvalidEscapeSequence: "Bad character escape sequence.", + InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", + InvalidEscapedReservedWord: ({ + reservedWord + }) => `Escape sequence in keyword ${reservedWord}.`, + InvalidIdentifier: ({ + identifierName + }) => `Invalid identifier ${identifierName}.`, + InvalidLhs: ({ + ancestor + }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsBinding: ({ + ancestor + }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsOptionalChaining: ({ + ancestor + }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, + InvalidNumber: "Invalid number.", + InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", + InvalidOrUnexpectedToken: ({ + unexpected + }) => `Unexpected character '${unexpected}'.`, + InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", + InvalidPrivateFieldResolution: ({ + identifierName + }) => `Private name #${identifierName} is not defined.`, + InvalidPropertyBindingPattern: "Binding member expression.", + InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", + InvalidRestAssignmentPattern: "Invalid rest operator's argument.", + LabelRedeclaration: ({ + labelName + }) => `Label '${labelName}' is already declared.`, + LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", + LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", + MalformedRegExpFlags: "Invalid regular expression flag.", + MissingClassName: "A class name is required.", + MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", + MissingSemicolon: "Missing semicolon.", + MissingPlugin: ({ + missingPlugin + }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingOneOfPlugins: ({ + missingPlugin + }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", + MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", + ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", + ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", + ModuleAttributesWithDuplicateKeys: ({ + key + }) => `Duplicate key "${key}" is not allowed in module attributes.`, + ModuleExportNameHasLoneSurrogate: ({ + surrogateCharCode + }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, + ModuleExportUndefined: ({ + localName + }) => `Export '${localName}' is not defined.`, + MultipleDefaultsInSwitch: "Multiple default clauses.", + NewlineAfterThrow: "Illegal newline after throw.", + NoCatchOrFinally: "Missing catch or finally clause.", + NumberIdentifier: "Identifier directly after number.", + NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", + ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", + OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", + OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", + OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", + ParamDupe: "Argument name clash.", + PatternHasAccessor: "Object pattern can't contain getter or setter.", + PatternHasMethod: "Object pattern can't contain methods.", + PrivateInExpectedIn: ({ + identifierName + }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, + PrivateNameRedeclaration: ({ + identifierName + }) => `Duplicate private name #${identifierName}.`, + RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + RecordNoProto: "'__proto__' is not allowed in Record expressions.", + RestTrailingComma: "Unexpected trailing comma after rest element.", + SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", + SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", + SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.', + StaticPrototype: "Classes may not have static property named prototype.", + SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", + SuperPrivateField: "Private fields can't be accessed on super.", + TrailingDecorator: "Decorators must be attached to a class element.", + TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", + UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', + UnexpectedDigitAfterHash: "Unexpected digit after hash token.", + UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", + UnexpectedKeyword: ({ + keyword + }) => `Unexpected keyword '${keyword}'.`, + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", + UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", + UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", + UnexpectedPrivateField: "Unexpected private name.", + UnexpectedReservedWord: ({ + reservedWord + }) => `Unexpected reserved word '${reservedWord}'.`, + UnexpectedSuper: "'super' is only allowed in object methods and classes.", + UnexpectedToken: ({ + expected, + unexpected + }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, + UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", + UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script`.", + UnsupportedBind: "Binding should be performed on object property.", + UnsupportedDecoratorExport: "A decorated export must export a class declaration.", + UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", + UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", + UnsupportedMetaProperty: ({ + target, + onlyValidPropertyName + }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, + UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", + UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", + UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", + UnterminatedComment: "Unterminated comment.", + UnterminatedRegExp: "Unterminated regular expression.", + UnterminatedString: "Unterminated string constant.", + UnterminatedTemplate: "Unterminated template.", + UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", + VarRedeclaration: ({ + identifierName + }) => `Identifier '${identifierName}' has already been declared.`, + YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", + YieldInParameter: "Yield expression is not allowed in formal parameters.", + ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." +}; +var StrictModeErrors = { + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: ({ + referenceName + }) => `Assigning to '${referenceName}' in strict mode.`, + StrictEvalArgumentsBinding: ({ + bindingName + }) => `Binding '${bindingName}' in strict mode.`, + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", + StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", + StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", + StrictWith: "'with' in strict mode." +}; +const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); +var PipelineOperatorErrors = { + PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", + PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', + PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", + PipeTopicUnconfiguredToken: ({ + token + }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: ({ + type + }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ + type + })}; please wrap it in parentheses.`, + PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', + PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", + PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", + PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", + PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", + PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.' +}; +const _excluded = ["toMessage"], + _excluded2 = ["message"]; +function defineHidden(obj, key, value) { + Object.defineProperty(obj, key, { + enumerable: false, + configurable: true, + value + }); +} +function toParseErrorConstructor(_ref) { + let { + toMessage + } = _ref, + properties = _objectWithoutPropertiesLoose(_ref, _excluded); + return function constructor(loc, details) { + const error = new SyntaxError(); + Object.assign(error, properties, { + loc, + pos: loc.index + }); + if ("missingPlugin" in details) { + Object.assign(error, { + missingPlugin: details.missingPlugin + }); + } + defineHidden(error, "clone", function clone(overrides = {}) { + var _overrides$loc; + const { + line, + column, + index + } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; + return constructor(new Position(line, column, index), Object.assign({}, details, overrides.details)); + }); + defineHidden(error, "details", details); + Object.defineProperty(error, "message", { + configurable: true, + get() { + const message = `${toMessage(details)} (${loc.line}:${loc.column})`; + this.message = message; + return message; + }, + set(value) { + Object.defineProperty(this, "message", { + value, + writable: true + }); + } + }); + return error; + }; +} +function ParseErrorEnum(argument, syntaxPlugin) { + if (Array.isArray(argument)) { + return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); + } + const ParseErrorConstructors = {}; + for (const reasonCode of Object.keys(argument)) { + const template = argument[reasonCode]; + const _ref2 = typeof template === "string" ? { + message: () => template + } : typeof template === "function" ? { + message: template + } : template, + { + message + } = _ref2, + rest = _objectWithoutPropertiesLoose(_ref2, _excluded2); + const toMessage = typeof message === "string" ? () => message : message; + ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ + code: "BABEL_PARSER_SYNTAX_ERROR", + reasonCode, + toMessage + }, syntaxPlugin ? { + syntaxPlugin + } : {}, rest)); + } + return ParseErrorConstructors; +} +const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); +const { + defineProperty +} = Object; +const toUnenumerable = (object, key) => defineProperty(object, key, { + enumerable: false, + value: object[key] +}); +function toESTreeLocation(node) { + node.loc.start && toUnenumerable(node.loc.start, "index"); + node.loc.end && toUnenumerable(node.loc.end, "index"); + return node; +} +var estree = superClass => class ESTreeParserMixin extends superClass { + parse() { + const file = toESTreeLocation(super.parse()); + if (this.options.tokens) { + file.tokens = file.tokens.map(toESTreeLocation); + } + return file; + } + parseRegExpLiteral({ + pattern, + flags + }) { + let regex = null; + try { + regex = new RegExp(pattern, flags); + } catch (e) {} + const node = this.estreeParseLiteral(regex); + node.regex = { + pattern, + flags + }; + return node; + } + parseBigIntLiteral(value) { + let bigInt; + try { + bigInt = BigInt(value); + } catch (_unused) { + bigInt = null; + } + const node = this.estreeParseLiteral(bigInt); + node.bigint = String(node.value || value); + return node; + } + parseDecimalLiteral(value) { + const decimal = null; + const node = this.estreeParseLiteral(decimal); + node.decimal = String(node.value || value); + return node; + } + estreeParseLiteral(value) { + return this.parseLiteral(value, "Literal"); + } + parseStringLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNumericLiteral(value) { + return this.estreeParseLiteral(value); + } + parseNullLiteral() { + return this.estreeParseLiteral(null); + } + parseBooleanLiteral(value) { + return this.estreeParseLiteral(value); + } + directiveToStmt(directive) { + const expression = directive.value; + delete directive.value; + expression.type = "Literal"; + expression.raw = expression.extra.raw; + expression.value = expression.extra.expressionValue; + const stmt = directive; + stmt.type = "ExpressionStatement"; + stmt.expression = expression; + stmt.directive = expression.extra.rawValue; + delete expression.extra; + return stmt; + } + initFunction(node, isAsync) { + super.initFunction(node, isAsync); + node.expression = false; + } + checkDeclaration(node) { + if (node != null && this.isObjectProperty(node)) { + this.checkDeclaration(node.value); + } else { + super.checkDeclaration(node); + } + } + getObjectOrClassMethodParams(method) { + return method.value.params; + } + isValidDirective(stmt) { + var _stmt$expression$extr; + return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); + const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); + node.body = directiveStatements.concat(node.body); + delete node.directives; + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); + if (method.typeParameters) { + method.value.typeParameters = method.typeParameters; + delete method.typeParameters; + } + classBody.body.push(method); + } + parsePrivateName() { + const node = super.parsePrivateName(); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return node; + } + } + return this.convertPrivateNameToPrivateIdentifier(node); + } + convertPrivateNameToPrivateIdentifier(node) { + const name = super.getPrivateNameSV(node); + node = node; + delete node.id; + node.name = name; + node.type = "PrivateIdentifier"; + return node; + } + isPrivateName(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.isPrivateName(node); + } + } + return node.type === "PrivateIdentifier"; + } + getPrivateNameSV(node) { + { + if (!this.getPluginOption("estree", "classFeatures")) { + return super.getPrivateNameSV(node); + } + } + return node.name; + } + parseLiteral(value, type) { + const node = super.parseLiteral(value, type); + node.raw = node.extra.raw; + delete node.extra; + return node; + } + parseFunctionBody(node, allowExpression, isMethod = false) { + super.parseFunctionBody(node, allowExpression, isMethod); + node.expression = node.body.type !== "BlockStatement"; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + let funcNode = this.startNode(); + funcNode.kind = node.kind; + funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + funcNode.type = "FunctionExpression"; + delete funcNode.kind; + node.value = funcNode; + if (type === "ClassPrivateMethod") { + node.computed = false; + } + return this.finishNode(node, "MethodDefinition"); + } + parseClassProperty(...args) { + const propertyNode = super.parseClassProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + propertyNode.type = "PropertyDefinition"; + return propertyNode; + } + parseClassPrivateProperty(...args) { + const propertyNode = super.parseClassPrivateProperty(...args); + { + if (!this.getPluginOption("estree", "classFeatures")) { + return propertyNode; + } + } + propertyNode.type = "PropertyDefinition"; + propertyNode.computed = false; + return propertyNode; + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); + if (node) { + node.type = "Property"; + if (node.kind === "method") { + node.kind = "init"; + } + node.shorthand = false; + } + return node; + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (node) { + node.kind = "init"; + node.type = "Property"; + } + return node; + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + isAssignable(node, isBinding) { + if (node != null && this.isObjectProperty(node)) { + return this.isAssignable(node.value, isBinding); + } + return super.isAssignable(node, isBinding); + } + toAssignable(node, isLHS = false) { + if (node != null && this.isObjectProperty(node)) { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + } else { + super.toAssignable(node, isLHS); + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.kind === "get" || prop.kind === "set") { + this.raise(Errors.PatternHasAccessor, prop.key); + } else if (prop.method) { + this.raise(Errors.PatternHasMethod, prop.key); + } else { + super.toAssignableObjectExpressionProp(prop, isLast, isLHS); + } + } + finishCallExpression(unfinished, optional) { + const node = super.finishCallExpression(unfinished, optional); + if (node.callee.type === "Import") { + node.type = "ImportExpression"; + node.source = node.arguments[0]; + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + var _node$arguments$, _node$arguments$2; + node.options = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null; + node.attributes = (_node$arguments$2 = node.arguments[1]) != null ? _node$arguments$2 : null; + } + delete node.arguments; + delete node.callee; + } + return node; + } + toReferencedArguments(node) { + if (node.type === "ImportExpression") { + return; + } + super.toReferencedArguments(node); + } + parseExport(unfinished, decorators) { + const exportStartLoc = this.state.lastTokStartLoc; + const node = super.parseExport(unfinished, decorators); + switch (node.type) { + case "ExportAllDeclaration": + node.exported = null; + break; + case "ExportNamedDeclaration": + if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { + node.type = "ExportAllDeclaration"; + node.exported = node.specifiers[0].exported; + delete node.specifiers; + } + case "ExportDefaultDeclaration": + { + var _declaration$decorato; + const { + declaration + } = node; + if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { + this.resetStartLocation(node, exportStartLoc); + } + } + break; + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + const node = super.parseSubscript(base, startLoc, noCalls, state); + if (state.optionalChainMember) { + if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { + node.type = node.type.substring(8); + } + if (state.stop) { + const chain = this.startNodeAtNode(node); + chain.expression = node; + return this.finishNode(chain, "ChainExpression"); + } + } else if (node.type === "MemberExpression" || node.type === "CallExpression") { + node.optional = false; + } + return node; + } + isOptionalMemberExpression(node) { + if (node.type === "ChainExpression") { + return node.expression.type === "MemberExpression"; + } + return super.isOptionalMemberExpression(node); + } + hasPropertyAsPrivateName(node) { + if (node.type === "ChainExpression") { + node = node.expression; + } + return super.hasPropertyAsPrivateName(node); + } + isObjectProperty(node) { + return node.type === "Property" && node.kind === "init" && !node.method; + } + isObjectMethod(node) { + return node.method || node.kind === "get" || node.kind === "set"; + } + finishNodeAt(node, type, endLoc) { + return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); + } + resetStartLocation(node, startLoc) { + super.resetStartLocation(node, startLoc); + toESTreeLocation(node); + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + super.resetEndLocation(node, endLoc); + toESTreeLocation(node); + } +}; +class TokContext { + constructor(token, preserveSpace) { + this.token = void 0; + this.preserveSpace = void 0; + this.token = token; + this.preserveSpace = !!preserveSpace; + } +} +const types = { + brace: new TokContext("{"), + j_oTag: new TokContext("...", true) +}; +{ + types.template = new TokContext("`", true); +} +const beforeExpr = true; +const startsExpr = true; +const isLoop = true; +const isAssign = true; +const prefix = true; +const postfix = true; +class ExportedTokenType { + constructor(label, conf = {}) { + this.label = void 0; + this.keyword = void 0; + this.beforeExpr = void 0; + this.startsExpr = void 0; + this.rightAssociative = void 0; + this.isLoop = void 0; + this.isAssign = void 0; + this.prefix = void 0; + this.postfix = void 0; + this.binop = void 0; + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop != null ? conf.binop : null; + { + this.updateContext = null; + } + } +} +const keywords$1 = new Map(); +function createKeyword(name, options = {}) { + options.keyword = name; + const token = createToken(name, options); + keywords$1.set(name, token); + return token; +} +function createBinop(name, binop) { + return createToken(name, { + beforeExpr, + binop + }); +} +let tokenTypeCounter = -1; +const tokenTypes = []; +const tokenLabels = []; +const tokenBinops = []; +const tokenBeforeExprs = []; +const tokenStartsExprs = []; +const tokenPrefixes = []; +function createToken(name, options = {}) { + var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; + ++tokenTypeCounter; + tokenLabels.push(name); + tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); + tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); + tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); + tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); + tokenTypes.push(new ExportedTokenType(name, options)); + return tokenTypeCounter; +} +function createKeywordLike(name, options = {}) { + var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; + ++tokenTypeCounter; + keywords$1.set(name, tokenTypeCounter); + tokenLabels.push(name); + tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); + tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); + tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); + tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); + tokenTypes.push(new ExportedTokenType("name", options)); + return tokenTypeCounter; +} +const tt = { + bracketL: createToken("[", { + beforeExpr, + startsExpr + }), + bracketHashL: createToken("#[", { + beforeExpr, + startsExpr + }), + bracketBarL: createToken("[|", { + beforeExpr, + startsExpr + }), + bracketR: createToken("]"), + bracketBarR: createToken("|]"), + braceL: createToken("{", { + beforeExpr, + startsExpr + }), + braceBarL: createToken("{|", { + beforeExpr, + startsExpr + }), + braceHashL: createToken("#{", { + beforeExpr, + startsExpr + }), + braceR: createToken("}"), + braceBarR: createToken("|}"), + parenL: createToken("(", { + beforeExpr, + startsExpr + }), + parenR: createToken(")"), + comma: createToken(",", { + beforeExpr + }), + semi: createToken(";", { + beforeExpr + }), + colon: createToken(":", { + beforeExpr + }), + doubleColon: createToken("::", { + beforeExpr + }), + dot: createToken("."), + question: createToken("?", { + beforeExpr + }), + questionDot: createToken("?."), + arrow: createToken("=>", { + beforeExpr + }), + template: createToken("template"), + ellipsis: createToken("...", { + beforeExpr + }), + backQuote: createToken("`", { + startsExpr + }), + dollarBraceL: createToken("${", { + beforeExpr, + startsExpr + }), + templateTail: createToken("...`", { + startsExpr + }), + templateNonTail: createToken("...${", { + beforeExpr, + startsExpr + }), + at: createToken("@"), + hash: createToken("#", { + startsExpr + }), + interpreterDirective: createToken("#!..."), + eq: createToken("=", { + beforeExpr, + isAssign + }), + assign: createToken("_=", { + beforeExpr, + isAssign + }), + slashAssign: createToken("_=", { + beforeExpr, + isAssign + }), + xorAssign: createToken("_=", { + beforeExpr, + isAssign + }), + moduloAssign: createToken("_=", { + beforeExpr, + isAssign + }), + incDec: createToken("++/--", { + prefix, + postfix, + startsExpr + }), + bang: createToken("!", { + beforeExpr, + prefix, + startsExpr + }), + tilde: createToken("~", { + beforeExpr, + prefix, + startsExpr + }), + doubleCaret: createToken("^^", { + startsExpr + }), + doubleAt: createToken("@@", { + startsExpr + }), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=/===/!==", 6), + lt: createBinop("/<=/>=", 7), + gt: createBinop("/<=/>=", 7), + relational: createBinop("/<=/>=", 7), + bitShift: createBinop("<>/>>>", 8), + bitShiftL: createBinop("<>/>>>", 8), + bitShiftR: createBinop("<>/>>>", 8), + plusMin: createToken("+/-", { + beforeExpr, + binop: 9, + prefix, + startsExpr + }), + modulo: createToken("%", { + binop: 10, + startsExpr + }), + star: createToken("*", { + binop: 10 + }), + slash: createBinop("/", 10), + exponent: createToken("**", { + beforeExpr, + binop: 11, + rightAssociative: true + }), + _in: createKeyword("in", { + beforeExpr, + binop: 7 + }), + _instanceof: createKeyword("instanceof", { + beforeExpr, + binop: 7 + }), + _break: createKeyword("break"), + _case: createKeyword("case", { + beforeExpr + }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { + beforeExpr + }), + _else: createKeyword("else", { + beforeExpr + }), + _finally: createKeyword("finally"), + _function: createKeyword("function", { + startsExpr + }), + _if: createKeyword("if"), + _return: createKeyword("return", { + beforeExpr + }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { + beforeExpr, + prefix, + startsExpr + }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _with: createKeyword("with"), + _new: createKeyword("new", { + beforeExpr, + startsExpr + }), + _this: createKeyword("this", { + startsExpr + }), + _super: createKeyword("super", { + startsExpr + }), + _class: createKeyword("class", { + startsExpr + }), + _extends: createKeyword("extends", { + beforeExpr + }), + _export: createKeyword("export"), + _import: createKeyword("import", { + startsExpr + }), + _null: createKeyword("null", { + startsExpr + }), + _true: createKeyword("true", { + startsExpr + }), + _false: createKeyword("false", { + startsExpr + }), + _typeof: createKeyword("typeof", { + beforeExpr, + prefix, + startsExpr + }), + _void: createKeyword("void", { + beforeExpr, + prefix, + startsExpr + }), + _delete: createKeyword("delete", { + beforeExpr, + prefix, + startsExpr + }), + _do: createKeyword("do", { + isLoop, + beforeExpr + }), + _for: createKeyword("for", { + isLoop + }), + _while: createKeyword("while", { + isLoop + }), + _as: createKeywordLike("as", { + startsExpr + }), + _assert: createKeywordLike("assert", { + startsExpr + }), + _async: createKeywordLike("async", { + startsExpr + }), + _await: createKeywordLike("await", { + startsExpr + }), + _defer: createKeywordLike("defer", { + startsExpr + }), + _from: createKeywordLike("from", { + startsExpr + }), + _get: createKeywordLike("get", { + startsExpr + }), + _let: createKeywordLike("let", { + startsExpr + }), + _meta: createKeywordLike("meta", { + startsExpr + }), + _of: createKeywordLike("of", { + startsExpr + }), + _sent: createKeywordLike("sent", { + startsExpr + }), + _set: createKeywordLike("set", { + startsExpr + }), + _source: createKeywordLike("source", { + startsExpr + }), + _static: createKeywordLike("static", { + startsExpr + }), + _using: createKeywordLike("using", { + startsExpr + }), + _yield: createKeywordLike("yield", { + startsExpr + }), + _asserts: createKeywordLike("asserts", { + startsExpr + }), + _checks: createKeywordLike("checks", { + startsExpr + }), + _exports: createKeywordLike("exports", { + startsExpr + }), + _global: createKeywordLike("global", { + startsExpr + }), + _implements: createKeywordLike("implements", { + startsExpr + }), + _intrinsic: createKeywordLike("intrinsic", { + startsExpr + }), + _infer: createKeywordLike("infer", { + startsExpr + }), + _is: createKeywordLike("is", { + startsExpr + }), + _mixins: createKeywordLike("mixins", { + startsExpr + }), + _proto: createKeywordLike("proto", { + startsExpr + }), + _require: createKeywordLike("require", { + startsExpr + }), + _satisfies: createKeywordLike("satisfies", { + startsExpr + }), + _keyof: createKeywordLike("keyof", { + startsExpr + }), + _readonly: createKeywordLike("readonly", { + startsExpr + }), + _unique: createKeywordLike("unique", { + startsExpr + }), + _abstract: createKeywordLike("abstract", { + startsExpr + }), + _declare: createKeywordLike("declare", { + startsExpr + }), + _enum: createKeywordLike("enum", { + startsExpr + }), + _module: createKeywordLike("module", { + startsExpr + }), + _namespace: createKeywordLike("namespace", { + startsExpr + }), + _interface: createKeywordLike("interface", { + startsExpr + }), + _type: createKeywordLike("type", { + startsExpr + }), + _opaque: createKeywordLike("opaque", { + startsExpr + }), + name: createToken("name", { + startsExpr + }), + string: createToken("string", { + startsExpr + }), + num: createToken("num", { + startsExpr + }), + bigint: createToken("bigint", { + startsExpr + }), + decimal: createToken("decimal", { + startsExpr + }), + regexp: createToken("regexp", { + startsExpr + }), + privateName: createToken("#name", { + startsExpr + }), + eof: createToken("eof"), + jsxName: createToken("jsxName"), + jsxText: createToken("jsxText", { + beforeExpr: true + }), + jsxTagStart: createToken("jsxTagStart", { + startsExpr: true + }), + jsxTagEnd: createToken("jsxTagEnd"), + placeholder: createToken("%%", { + startsExpr: true + }) +}; +function tokenIsIdentifier(token) { + return token >= 93 && token <= 132; +} +function tokenKeywordOrIdentifierIsKeyword(token) { + return token <= 92; +} +function tokenIsKeywordOrIdentifier(token) { + return token >= 58 && token <= 132; +} +function tokenIsLiteralPropertyName(token) { + return token >= 58 && token <= 136; +} +function tokenComesBeforeExpression(token) { + return tokenBeforeExprs[token]; +} +function tokenCanStartExpression(token) { + return tokenStartsExprs[token]; +} +function tokenIsAssignment(token) { + return token >= 29 && token <= 33; +} +function tokenIsFlowInterfaceOrTypeOrOpaque(token) { + return token >= 129 && token <= 131; +} +function tokenIsLoop(token) { + return token >= 90 && token <= 92; +} +function tokenIsKeyword(token) { + return token >= 58 && token <= 92; +} +function tokenIsOperator(token) { + return token >= 39 && token <= 59; +} +function tokenIsPostfix(token) { + return token === 34; +} +function tokenIsPrefix(token) { + return tokenPrefixes[token]; +} +function tokenIsTSTypeOperator(token) { + return token >= 121 && token <= 123; +} +function tokenIsTSDeclarationStart(token) { + return token >= 124 && token <= 130; +} +function tokenLabelName(token) { + return tokenLabels[token]; +} +function tokenOperatorPrecedence(token) { + return tokenBinops[token]; +} +function tokenIsRightAssociative(token) { + return token === 57; +} +function tokenIsTemplate(token) { + return token >= 24 && token <= 25; +} +function getExportedToken(token) { + return tokenTypes[token]; +} +{ + tokenTypes[8].updateContext = context => { + context.pop(); + }; + tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { + context.push(types.brace); + }; + tokenTypes[22].updateContext = context => { + if (context[context.length - 1] === types.template) { + context.pop(); + } else { + context.push(types.template); + } + }; + tokenTypes[142].updateContext = context => { + context.push(types.j_expr, types.j_oTag); + }; +} +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; +function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; +} +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} +function isKeyword(word) { + return keywords.has(word); +} +function isIteratorStart(current, next, next2) { + return current === 64 && next === 64 && isIdentifierStart(next2); +} +const reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]); +function canBeReservedWord(word) { + return reservedWordLikeSet.has(word); +} +class Scope { + constructor(flags) { + this.flags = 0; + this.names = new Map(); + this.firstLexicalName = ""; + this.flags = flags; + } +} +class ScopeHandler { + constructor(parser, inModule) { + this.parser = void 0; + this.scopeStack = []; + this.inModule = void 0; + this.undefinedExports = new Map(); + this.parser = parser; + this.inModule = inModule; + } + get inTopLevel() { + return (this.currentScope().flags & 1) > 0; + } + get inFunction() { + return (this.currentVarScopeFlags() & 2) > 0; + } + get allowSuper() { + return (this.currentThisScopeFlags() & 16) > 0; + } + get allowDirectSuper() { + return (this.currentThisScopeFlags() & 32) > 0; + } + get inClass() { + return (this.currentThisScopeFlags() & 64) > 0; + } + get inClassAndNotInNonArrowFunction() { + const flags = this.currentThisScopeFlags(); + return (flags & 64) > 0 && (flags & 2) === 0; + } + get inStaticBlock() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 128) { + return true; + } + if (flags & (387 | 64)) { + return false; + } + } + } + get inNonArrowFunction() { + return (this.currentThisScopeFlags() & 2) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + createScope(flags) { + return new Scope(flags); + } + enter(flags) { + this.scopeStack.push(this.createScope(flags)); + } + exit() { + const scope = this.scopeStack.pop(); + return scope.flags; + } + treatFunctionsAsVarInScope(scope) { + return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); + } + declareName(name, bindingType, loc) { + let scope = this.currentScope(); + if (bindingType & 8 || bindingType & 16) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + let type = scope.names.get(name) || 0; + if (bindingType & 16) { + type = type | 4; + } else { + if (!scope.firstLexicalName) { + scope.firstLexicalName = name; + } + type = type | 2; + } + scope.names.set(name, type); + if (bindingType & 8) { + this.maybeExportDefined(scope, name); + } + } else if (bindingType & 4) { + for (let i = this.scopeStack.length - 1; i >= 0; --i) { + scope = this.scopeStack[i]; + this.checkRedeclarationInScope(scope, name, bindingType, loc); + scope.names.set(name, (scope.names.get(name) || 0) | 1); + this.maybeExportDefined(scope, name); + if (scope.flags & 387) break; + } + } + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + maybeExportDefined(scope, name) { + if (this.parser.inModule && scope.flags & 1) { + this.undefinedExports.delete(name); + } + } + checkRedeclarationInScope(scope, name, bindingType, loc) { + if (this.isRedeclaredInScope(scope, name, bindingType)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + } + isRedeclaredInScope(scope, name, bindingType) { + if (!(bindingType & 1)) return false; + if (bindingType & 8) { + return scope.names.has(name); + } + const type = scope.names.get(name); + if (bindingType & 16) { + return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0; + } + return (type & 2) > 0 && !(scope.flags & 8 && scope.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope) && (type & 4) > 0; + } + checkLocalExport(id) { + const { + name + } = id; + const topLevelScope = this.scopeStack[0]; + if (!topLevelScope.names.has(name)) { + this.undefinedExports.set(name, id.loc.start); + } + } + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + currentVarScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & 387) { + return flags; + } + } + } + currentThisScopeFlags() { + for (let i = this.scopeStack.length - 1;; i--) { + const { + flags + } = this.scopeStack[i]; + if (flags & (387 | 64) && !(flags & 4)) { + return flags; + } + } + } +} +class FlowScope extends Scope { + constructor(...args) { + super(...args); + this.declareFunctions = new Set(); + } +} +class FlowScopeHandler extends ScopeHandler { + createScope(flags) { + return new FlowScope(flags); + } + declareName(name, bindingType, loc) { + const scope = this.currentScope(); + if (bindingType & 2048) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + scope.declareFunctions.add(name); + return; + } + super.declareName(name, bindingType, loc); + } + isRedeclaredInScope(scope, name, bindingType) { + if (super.isRedeclaredInScope(scope, name, bindingType)) return true; + if (bindingType & 2048 && !scope.declareFunctions.has(name)) { + const type = scope.names.get(name); + return (type & 4) > 0 || (type & 2) > 0; + } + return false; + } + checkLocalExport(id) { + if (!this.scopeStack[0].declareFunctions.has(id.name)) { + super.checkLocalExport(id); + } + } +} +class BaseParser { + constructor() { + this.sawUnambiguousESM = false; + this.ambiguousScriptDifferentAst = false; + } + hasPlugin(pluginConfig) { + if (typeof pluginConfig === "string") { + return this.plugins.has(pluginConfig); + } else { + const [pluginName, pluginOptions] = pluginConfig; + if (!this.hasPlugin(pluginName)) { + return false; + } + const actualOptions = this.plugins.get(pluginName); + for (const key of Object.keys(pluginOptions)) { + if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { + return false; + } + } + return true; + } + } + getPluginOption(plugin, name) { + var _this$plugins$get; + return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; + } +} +function setTrailingComments(node, comments) { + if (node.trailingComments === undefined) { + node.trailingComments = comments; + } else { + node.trailingComments.unshift(...comments); + } +} +function setLeadingComments(node, comments) { + if (node.leadingComments === undefined) { + node.leadingComments = comments; + } else { + node.leadingComments.unshift(...comments); + } +} +function setInnerComments(node, comments) { + if (node.innerComments === undefined) { + node.innerComments = comments; + } else { + node.innerComments.unshift(...comments); + } +} +function adjustInnerComments(node, elements, commentWS) { + let lastElement = null; + let i = elements.length; + while (lastElement === null && i > 0) { + lastElement = elements[--i]; + } + if (lastElement === null || lastElement.start > commentWS.start) { + setInnerComments(node, commentWS.comments); + } else { + setTrailingComments(lastElement, commentWS.comments); + } +} +class CommentsParser extends BaseParser { + addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + const { + commentsLen + } = this.state; + if (this.comments.length != commentsLen) this.comments.length = commentsLen; + this.comments.push(comment); + this.state.commentsLen++; + } + processComment(node) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + const lastCommentWS = commentStack[i]; + if (lastCommentWS.start === node.end) { + lastCommentWS.leadingNode = node; + i--; + } + const { + start: nodeStart + } = node; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + if (commentEnd > nodeStart) { + commentWS.containingNode = node; + this.finalizeComment(commentWS); + commentStack.splice(i, 1); + } else { + if (commentEnd === nodeStart) { + commentWS.trailingNode = node; + } + break; + } + } + } + finalizeComment(commentWS) { + const { + comments + } = commentWS; + if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { + if (commentWS.leadingNode !== null) { + setTrailingComments(commentWS.leadingNode, comments); + } + if (commentWS.trailingNode !== null) { + setLeadingComments(commentWS.trailingNode, comments); + } + } else { + const { + containingNode: node, + start: commentStart + } = commentWS; + if (this.input.charCodeAt(commentStart - 1) === 44) { + switch (node.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + adjustInnerComments(node, node.properties, commentWS); + break; + case "CallExpression": + case "OptionalCallExpression": + adjustInnerComments(node, node.arguments, commentWS); + break; + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + adjustInnerComments(node, node.params, commentWS); + break; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + adjustInnerComments(node, node.elements, commentWS); + break; + case "ExportNamedDeclaration": + case "ImportDeclaration": + adjustInnerComments(node, node.specifiers, commentWS); + break; + default: + { + setInnerComments(node, comments); + } + } + } else { + setInnerComments(node, comments); + } + } + } + finalizeRemainingComments() { + const { + commentStack + } = this.state; + for (let i = commentStack.length - 1; i >= 0; i--) { + this.finalizeComment(commentStack[i]); + } + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + const commentWS = commentStack[length - 1]; + if (commentWS.leadingNode === node) { + commentWS.leadingNode = null; + } + } + resetPreviousIdentifierLeadingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + if (commentStack[length - 1].trailingNode === node) { + commentStack[length - 1].trailingNode = null; + } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { + commentStack[length - 2].trailingNode = null; + } + } + takeSurroundingComments(node, start, end) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + const commentStart = commentWS.start; + if (commentStart === end) { + commentWS.leadingNode = node; + } else if (commentEnd === start) { + commentWS.trailingNode = node; + } else if (commentEnd < start) { + break; + } + } + } +} +const lineBreak = /\r\n?|[\n\u2028\u2029]/; +const lineBreakG = new RegExp(lineBreak.source, "g"); +function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + default: + return false; + } +} +const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; +const skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"); +function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + default: + return false; + } +} +class State { + constructor() { + this.flags = 1024; + this.curLine = void 0; + this.lineStart = void 0; + this.startLoc = void 0; + this.endLoc = void 0; + this.errors = []; + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.labels = []; + this.commentsLen = 0; + this.commentStack = []; + this.pos = 0; + this.type = 139; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.context = [types.brace]; + this.firstInvalidTemplateEscapePos = null; + this.strictErrors = new Map(); + this.tokensLength = 0; + } + get strict() { + return (this.flags & 1) > 0; + } + set strict(value) { + if (value) { + this.flags |= 1; + } else { + this.flags &= ~1; + } + } + init({ + strictMode, + sourceType, + startLine, + startColumn + }) { + this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; + this.curLine = startLine; + this.lineStart = -startColumn; + this.startLoc = this.endLoc = new Position(startLine, startColumn, 0); + } + get maybeInArrowParameters() { + return (this.flags & 2) > 0; + } + set maybeInArrowParameters(value) { + if (value) { + this.flags |= 2; + } else { + this.flags &= ~2; + } + } + get inType() { + return (this.flags & 4) > 0; + } + set inType(value) { + if (value) { + this.flags |= 4; + } else { + this.flags &= ~4; + } + } + get noAnonFunctionType() { + return (this.flags & 8) > 0; + } + set noAnonFunctionType(value) { + if (value) { + this.flags |= 8; + } else { + this.flags &= ~8; + } + } + get hasFlowComment() { + return (this.flags & 16) > 0; + } + set hasFlowComment(value) { + if (value) { + this.flags |= 16; + } else { + this.flags &= ~16; + } + } + get isAmbientContext() { + return (this.flags & 32) > 0; + } + set isAmbientContext(value) { + if (value) { + this.flags |= 32; + } else { + this.flags &= ~32; + } + } + get inAbstractClass() { + return (this.flags & 64) > 0; + } + set inAbstractClass(value) { + if (value) { + this.flags |= 64; + } else { + this.flags &= ~64; + } + } + get inDisallowConditionalTypesContext() { + return (this.flags & 128) > 0; + } + set inDisallowConditionalTypesContext(value) { + if (value) { + this.flags |= 128; + } else { + this.flags &= ~128; + } + } + get soloAwait() { + return (this.flags & 256) > 0; + } + set soloAwait(value) { + if (value) { + this.flags |= 256; + } else { + this.flags &= ~256; + } + } + get inFSharpPipelineDirectBody() { + return (this.flags & 512) > 0; + } + set inFSharpPipelineDirectBody(value) { + if (value) { + this.flags |= 512; + } else { + this.flags &= ~512; + } + } + get canStartJSXElement() { + return (this.flags & 1024) > 0; + } + set canStartJSXElement(value) { + if (value) { + this.flags |= 1024; + } else { + this.flags &= ~1024; + } + } + get containsEsc() { + return (this.flags & 2048) > 0; + } + set containsEsc(value) { + if (value) { + this.flags |= 2048; + } else { + this.flags &= ~2048; + } + } + curPosition() { + return new Position(this.curLine, this.pos - this.lineStart, this.pos); + } + clone() { + const state = new State(); + state.flags = this.flags; + state.curLine = this.curLine; + state.lineStart = this.lineStart; + state.startLoc = this.startLoc; + state.endLoc = this.endLoc; + state.errors = this.errors.slice(); + state.potentialArrowAt = this.potentialArrowAt; + state.noArrowAt = this.noArrowAt.slice(); + state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(); + state.topicContext = this.topicContext; + state.labels = this.labels.slice(); + state.commentsLen = this.commentsLen; + state.commentStack = this.commentStack.slice(); + state.pos = this.pos; + state.type = this.type; + state.value = this.value; + state.start = this.start; + state.end = this.end; + state.lastTokEndLoc = this.lastTokEndLoc; + state.lastTokStartLoc = this.lastTokStartLoc; + state.context = this.context.slice(); + state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos; + state.strictErrors = this.strictErrors; + state.tokensLength = this.tokensLength; + return state; + } +} +var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; +}; +const forbiddenNumericSeparatorSiblings = { + decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), + hex: new Set([46, 88, 95, 120]) +}; +const isAllowedNumericSeparatorSibling = { + bin: ch => ch === 48 || ch === 49, + oct: ch => ch >= 48 && ch <= 55, + dec: ch => ch >= 48 && ch <= 57, + hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 +}; +function readStringContents(type, input, pos, lineStart, curLine, errors) { + const initialPos = pos; + const initialLineStart = lineStart; + const initialCurLine = curLine; + let out = ""; + let firstInvalidLoc = null; + let chunkStart = pos; + const { + length + } = input; + for (;;) { + if (pos >= length) { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + out += input.slice(chunkStart, pos); + break; + } + const ch = input.charCodeAt(pos); + if (isStringEnd(type, ch, input, pos)) { + out += input.slice(chunkStart, pos); + break; + } + if (ch === 92) { + out += input.slice(chunkStart, pos); + const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); + if (res.ch === null && !firstInvalidLoc) { + firstInvalidLoc = { + pos, + lineStart, + curLine + }; + } else { + out += res.ch; + } + ({ + pos, + lineStart, + curLine + } = res); + chunkStart = pos; + } else if (ch === 8232 || ch === 8233) { + ++pos; + ++curLine; + lineStart = pos; + } else if (ch === 10 || ch === 13) { + if (type === "template") { + out += input.slice(chunkStart, pos) + "\n"; + ++pos; + if (ch === 13 && input.charCodeAt(pos) === 10) { + ++pos; + } + ++curLine; + chunkStart = lineStart = pos; + } else { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + } + } else { + ++pos; + } + } + return { + pos, + str: out, + firstInvalidLoc, + lineStart, + curLine, + containsInvalid: !!firstInvalidLoc + }; +} +function isStringEnd(type, ch, input, pos) { + if (type === "template") { + return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; + } + return ch === (type === "double" ? 34 : 39); +} +function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { + const throwOnInvalid = !inTemplate; + pos++; + const res = ch => ({ + pos, + ch, + lineStart, + curLine + }); + const ch = input.charCodeAt(pos++); + switch (ch) { + case 110: + return res("\n"); + case 114: + return res("\r"); + case 120: + { + let code; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCharCode(code)); + } + case 117: + { + let code; + ({ + code, + pos + } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCodePoint(code)); + } + case 116: + return res("\t"); + case 98: + return res("\b"); + case 118: + return res("\u000b"); + case 102: + return res("\f"); + case 13: + if (input.charCodeAt(pos) === 10) { + ++pos; + } + case 10: + lineStart = pos; + ++curLine; + case 8232: + case 8233: + return res(""); + case 56: + case 57: + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(pos - 1, lineStart, curLine); + } + default: + if (ch >= 48 && ch <= 55) { + const startPos = pos - 1; + const match = input.slice(startPos, pos + 2).match(/^[0-7]+/); + let octalStr = match[0]; + let octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + pos += octalStr.length - 1; + const next = input.charCodeAt(pos); + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(startPos, lineStart, curLine); + } + } + return res(String.fromCharCode(octal)); + } + return res(String.fromCharCode(ch)); + } +} +function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { + const initialPos = pos; + let n; + ({ + n, + pos + } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); + if (n === null) { + if (throwOnInvalid) { + errors.invalidEscapeSequence(initialPos, lineStart, curLine); + } else { + pos = initialPos - 1; + } + } + return { + code: n, + pos + }; +} +function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { + const start = pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; + let invalid = false; + let total = 0; + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = input.charCodeAt(pos); + let val; + if (code === 95 && allowNumSeparator !== "bail") { + const prev = input.charCodeAt(pos - 1); + const next = input.charCodeAt(pos + 1); + if (!allowNumSeparator) { + if (bailOnError) return { + n: null, + pos + }; + errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); + } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { + if (bailOnError) return { + n: null, + pos + }; + errors.unexpectedNumericSeparator(pos, lineStart, curLine); + } + ++pos; + continue; + } + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + if (val >= radix) { + if (val <= 9 && bailOnError) { + return { + n: null, + pos + }; + } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { + val = 0; + } else if (forceLen) { + val = 0; + invalid = true; + } else { + break; + } + } + ++pos; + total = total * radix + val; + } + if (pos === start || len != null && pos - start !== len || invalid) { + return { + n: null, + pos + }; + } + return { + n: total, + pos + }; +} +function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { + const ch = input.charCodeAt(pos); + let code; + if (ch === 123) { + ++pos; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); + ++pos; + if (code !== null && code > 0x10ffff) { + if (throwOnInvalid) { + errors.invalidCodePoint(pos, lineStart, curLine); + } else { + return { + code: null, + pos + }; + } + } + } else { + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); + } + return { + code, + pos + }; +} +function buildPosition(pos, lineStart, curLine) { + return new Position(curLine, pos - lineStart, pos); +} +const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); +class Token { + constructor(state) { + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); + } +} +class Tokenizer extends CommentsParser { + constructor(options, input) { + super(); + this.isLookahead = void 0; + this.tokens = []; + this.errorHandlers_readInt = { + invalidDigit: (pos, lineStart, curLine, radix) => { + if (!this.options.errorRecovery) return false; + this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), { + radix + }); + return true; + }, + numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), + unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) + }; + this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { + invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), + invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) + }); + this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: (pos, lineStart, curLine) => { + this.recordStrictModeErrors(Errors.StrictNumericEscape, buildPosition(pos, lineStart, curLine)); + }, + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedString, buildPosition(pos - 1, lineStart, curLine)); + } + }); + this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedTemplate, buildPosition(pos, lineStart, curLine)); + } + }); + this.state = new State(); + this.state.init(options); + this.input = input; + this.length = input.length; + this.comments = []; + this.isLookahead = false; + } + pushToken(token) { + this.tokens.length = this.state.tokensLength; + this.tokens.push(token); + ++this.state.tokensLength; + } + next() { + this.checkKeywordEscapes(); + if (this.options.tokens) { + this.pushToken(new Token(this.state)); + } + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + } + eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + } + match(type) { + return this.state.type === type; + } + createLookaheadState(state) { + return { + pos: state.pos, + value: null, + type: state.type, + start: state.start, + end: state.end, + context: [this.curContext()], + inType: state.inType, + startLoc: state.startLoc, + lastTokEndLoc: state.lastTokEndLoc, + curLine: state.curLine, + lineStart: state.lineStart, + curPosition: state.curPosition + }; + } + lookahead() { + const old = this.state; + this.state = this.createLookaheadState(old); + this.isLookahead = true; + this.nextToken(); + this.isLookahead = false; + const curr = this.state; + this.state = old; + return curr; + } + nextTokenStart() { + return this.nextTokenStartSince(this.state.pos); + } + nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + nextTokenInLineStart() { + return this.nextTokenInLineStartSince(this.state.pos); + } + nextTokenInLineStartSince(pos) { + skipWhiteSpaceInLine.lastIndex = pos; + return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; + } + lookaheadInLineCharCode() { + return this.input.charCodeAt(this.nextTokenInLineStart()); + } + codePointAtPos(pos) { + let cp = this.input.charCodeAt(pos); + if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { + const trail = this.input.charCodeAt(pos); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + return cp; + } + setStrict(strict) { + this.state.strict = strict; + if (strict) { + this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, at)); + this.state.strictErrors.clear(); + } + } + curContext() { + return this.state.context[this.state.context.length - 1]; + } + nextToken() { + this.skipSpace(); + this.state.start = this.state.pos; + if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); + if (this.state.pos >= this.length) { + this.finishToken(139); + return; + } + this.getTokenFromCode(this.codePointAtPos(this.state.pos)); + } + skipBlockComment(commentEnd) { + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + const start = this.state.pos; + const end = this.input.indexOf(commentEnd, start + 2); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + this.state.pos = end + commentEnd.length; + lineBreakG.lastIndex = start + 2; + while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { + ++this.state.curLine; + this.state.lineStart = lineBreakG.lastIndex; + } + if (this.isLookahead) return; + const comment = { + type: "CommentBlock", + value: this.input.slice(start + 2, end), + start, + end: end + commentEnd.length, + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.options.tokens) this.pushToken(comment); + return comment; + } + skipLineComment(startSkip) { + const start = this.state.pos; + let startLoc; + if (!this.isLookahead) startLoc = this.state.curPosition(); + let ch = this.input.charCodeAt(this.state.pos += startSkip); + if (this.state.pos < this.length) { + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + } + if (this.isLookahead) return; + const end = this.state.pos; + const value = this.input.slice(start + startSkip, end); + const comment = { + type: "CommentLine", + value, + start, + end, + loc: new SourceLocation(startLoc, this.state.curPosition()) + }; + if (this.options.tokens) this.pushToken(comment); + return comment; + } + skipSpace() { + const spaceStart = this.state.pos; + const comments = []; + loop: while (this.state.pos < this.length) { + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + { + const comment = this.skipBlockComment("*/"); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + break; + } + case 47: + { + const comment = this.skipLineComment(2); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + break; + } + default: + break loop; + } + break; + default: + if (isWhitespace(ch)) { + ++this.state.pos; + } else if (ch === 45 && !this.inModule && this.options.annexB) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { + const comment = this.skipLineComment(3); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + } else { + break loop; + } + } else if (ch === 60 && !this.inModule && this.options.annexB) { + const pos = this.state.pos; + if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { + const comment = this.skipLineComment(4); + if (comment !== undefined) { + this.addComment(comment); + if (this.options.attachComment) comments.push(comment); + } + } else { + break loop; + } + } else { + break loop; + } + } + } + if (comments.length > 0) { + const end = this.state.pos; + const commentWhitespace = { + start: spaceStart, + end, + comments, + leadingNode: null, + trailingNode: null, + containingNode: null + }; + this.state.commentStack.push(commentWhitespace); + } + } + finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + const prevType = this.state.type; + this.state.type = type; + this.state.value = val; + if (!this.isLookahead) { + this.updateContext(prevType); + } + } + replaceToken(type) { + this.state.type = type; + this.updateContext(); + } + readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + const nextPos = this.state.pos + 1; + const next = this.codePointAtPos(nextPos); + if (next >= 48 && next <= 57) { + throw this.raise(Errors.UnexpectedDigitAfterHash, this.state.curPosition()); + } + if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { + this.expectPlugin("recordAndTuple"); + if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { + throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + if (next === 123) { + this.finishToken(7); + } else { + this.finishToken(1); + } + } else if (isIdentifierStart(next)) { + ++this.state.pos; + this.finishToken(138, this.readWord1(next)); + } else if (next === 92) { + ++this.state.pos; + this.finishToken(138, this.readWord1()); + } else { + this.finishOp(27, 1); + } + } + readToken_dot() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next >= 48 && next <= 57) { + this.readNumber(true); + return; + } + if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { + this.state.pos += 3; + this.finishToken(21); + } else { + ++this.state.pos; + this.finishToken(16); + } + } + readToken_slash() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(31, 2); + } else { + this.finishOp(56, 1); + } + } + readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return false; + let ch = this.input.charCodeAt(this.state.pos + 1); + if (ch !== 33) return false; + const start = this.state.pos; + this.state.pos += 1; + while (!isNewLine(ch) && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + const value = this.input.slice(start + 2, this.state.pos); + this.finishToken(28, value); + return true; + } + readToken_mult_modulo(code) { + let type = code === 42 ? 55 : 54; + let width = 1; + let next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 42) { + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = 57; + } + if (next === 61 && !this.state.inType) { + width++; + type = code === 37 ? 33 : 30; + } + this.finishOp(type, width); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + if (this.input.charCodeAt(this.state.pos + 2) === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(code === 124 ? 41 : 42, 2); + } + return; + } + if (code === 124) { + if (next === 62) { + this.finishOp(39, 2); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 125) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(9); + return; + } + if (this.hasPlugin("recordAndTuple") && next === 93) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(4); + return; + } + } + if (next === 61) { + this.finishOp(30, 2); + return; + } + this.finishOp(code === 124 ? 43 : 45, 1); + } + readToken_caret() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61 && !this.state.inType) { + this.finishOp(32, 2); + } else if (next === 94 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "^^" + }])) { + this.finishOp(37, 2); + const lookaheadCh = this.input.codePointAt(this.state.pos); + if (lookaheadCh === 94) { + this.unexpected(); + } + } else { + this.finishOp(44, 1); + } + } + readToken_atSign() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 64 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "@@" + }])) { + this.finishOp(38, 2); + } else { + this.finishOp(26, 1); + } + } + readToken_plus_min(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === code) { + this.finishOp(34, 2); + return; + } + if (next === 61) { + this.finishOp(30, 2); + } else { + this.finishOp(53, 1); + } + } + readToken_lt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 60) { + if (this.input.charCodeAt(pos + 2) === 61) { + this.finishOp(30, 3); + return; + } + this.finishOp(51, 2); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(47, 1); + } + readToken_gt() { + const { + pos + } = this.state; + const next = this.input.charCodeAt(pos + 1); + if (next === 62) { + const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(pos + size) === 61) { + this.finishOp(30, size + 1); + return; + } + this.finishOp(52, size); + return; + } + if (next === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(48, 1); + } + readToken_eq_excl(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 61) { + this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + if (code === 61 && next === 62) { + this.state.pos += 2; + this.finishToken(19); + return; + } + this.finishOp(code === 61 ? 29 : 35, 1); + } + readToken_question() { + const next = this.input.charCodeAt(this.state.pos + 1); + const next2 = this.input.charCodeAt(this.state.pos + 2); + if (next === 63) { + if (next2 === 61) { + this.finishOp(30, 3); + } else { + this.finishOp(40, 2); + } + } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { + this.state.pos += 2; + this.finishToken(18); + } else { + ++this.state.pos; + this.finishToken(17); + } + } + getTokenFromCode(code) { + switch (code) { + case 46: + this.readToken_dot(); + return; + case 40: + ++this.state.pos; + this.finishToken(10); + return; + case 41: + ++this.state.pos; + this.finishToken(11); + return; + case 59: + ++this.state.pos; + this.finishToken(13); + return; + case 44: + ++this.state.pos; + this.finishToken(12); + return; + case 91: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(2); + } else { + ++this.state.pos; + this.finishToken(0); + } + return; + case 93: + ++this.state.pos; + this.finishToken(3); + return; + case 123: + if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) { + if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { + throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition()); + } + this.state.pos += 2; + this.finishToken(6); + } else { + ++this.state.pos; + this.finishToken(5); + } + return; + case 125: + ++this.state.pos; + this.finishToken(8); + return; + case 58: + if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { + this.finishOp(15, 2); + } else { + ++this.state.pos; + this.finishToken(14); + } + return; + case 63: + this.readToken_question(); + return; + case 96: + this.readTemplateToken(); + return; + case 48: + { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 120 || next === 88) { + this.readRadixNumber(16); + return; + } + if (next === 111 || next === 79) { + this.readRadixNumber(8); + return; + } + if (next === 98 || next === 66) { + this.readRadixNumber(2); + return; + } + } + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(false); + return; + case 34: + case 39: + this.readString(code); + return; + case 47: + this.readToken_slash(); + return; + case 37: + case 42: + this.readToken_mult_modulo(code); + return; + case 124: + case 38: + this.readToken_pipe_amp(code); + return; + case 94: + this.readToken_caret(); + return; + case 43: + case 45: + this.readToken_plus_min(code); + return; + case 60: + this.readToken_lt(); + return; + case 62: + this.readToken_gt(); + return; + case 61: + case 33: + this.readToken_eq_excl(code); + return; + case 126: + this.finishOp(36, 1); + return; + case 64: + this.readToken_atSign(); + return; + case 35: + this.readToken_numberSign(); + return; + case 92: + this.readWord(); + return; + default: + if (isIdentifierStart(code)) { + this.readWord(code); + return; + } + } + throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), { + unexpected: String.fromCodePoint(code) + }); + } + finishOp(type, size) { + const str = this.input.slice(this.state.pos, this.state.pos + size); + this.state.pos += size; + this.finishToken(type, str); + } + readRegexp() { + const startLoc = this.state.startLoc; + const start = this.state.start + 1; + let escaped, inClass; + let { + pos + } = this.state; + for (;; ++pos) { + if (pos >= this.length) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + const ch = this.input.charCodeAt(pos); + if (isNewLine(ch)) { + throw this.raise(Errors.UnterminatedRegExp, createPositionWithColumnOffset(startLoc, 1)); + } + if (escaped) { + escaped = false; + } else { + if (ch === 91) { + inClass = true; + } else if (ch === 93 && inClass) { + inClass = false; + } else if (ch === 47 && !inClass) { + break; + } + escaped = ch === 92; + } + } + const content = this.input.slice(start, pos); + ++pos; + let mods = ""; + const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); + while (pos < this.length) { + const cp = this.codePointAtPos(pos); + const char = String.fromCharCode(cp); + if (VALID_REGEX_FLAGS.has(cp)) { + if (cp === 118) { + if (mods.includes("u")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } else if (cp === 117) { + if (mods.includes("v")) { + this.raise(Errors.IncompatibleRegExpUVFlags, nextPos()); + } + } + if (mods.includes(char)) { + this.raise(Errors.DuplicateRegExpFlags, nextPos()); + } + } else if (isIdentifierChar(cp) || cp === 92) { + this.raise(Errors.MalformedRegExpFlags, nextPos()); + } else { + break; + } + ++pos; + mods += char; + } + this.state.pos = pos; + this.finishToken(137, { + pattern: content, + flags: mods + }); + } + readInt(radix, len, forceLen = false, allowNumSeparator = true) { + const { + n, + pos + } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); + this.state.pos = pos; + return n; + } + readRadixNumber(radix) { + const startLoc = this.state.curPosition(); + let isBigInt = false; + this.state.pos += 2; + const val = this.readInt(radix); + if (val == null) { + this.raise(Errors.InvalidDigit, createPositionWithColumnOffset(startLoc, 2), { + radix + }); + } + const next = this.input.charCodeAt(this.state.pos); + if (next === 110) { + ++this.state.pos; + isBigInt = true; + } else if (next === 109) { + throw this.raise(Errors.InvalidDecimal, startLoc); + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + if (isBigInt) { + const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(135, str); + return; + } + this.finishToken(134, val); + } + readNumber(startsWithDot) { + const start = this.state.pos; + const startLoc = this.state.curPosition(); + let isFloat = false; + let isBigInt = false; + let isDecimal = false; + let hasExponent = false; + let isOctal = false; + if (!startsWithDot && this.readInt(10) === null) { + this.raise(Errors.InvalidNumber, this.state.curPosition()); + } + const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; + if (hasLeadingZero) { + const integer = this.input.slice(start, this.state.pos); + this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc); + if (!this.state.strict) { + const underscorePos = integer.indexOf("_"); + if (underscorePos > 0) { + this.raise(Errors.ZeroDigitNumericSeparator, createPositionWithColumnOffset(startLoc, underscorePos)); + } + } + isOctal = hasLeadingZero && !/[89]/.test(integer); + } + let next = this.input.charCodeAt(this.state.pos); + if (next === 46 && !isOctal) { + ++this.state.pos; + this.readInt(10); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + if ((next === 69 || next === 101) && !isOctal) { + next = this.input.charCodeAt(++this.state.pos); + if (next === 43 || next === 45) { + ++this.state.pos; + } + if (this.readInt(10) === null) { + this.raise(Errors.InvalidOrMissingExponent, startLoc); + } + isFloat = true; + hasExponent = true; + next = this.input.charCodeAt(this.state.pos); + } + if (next === 110) { + if (isFloat || hasLeadingZero) { + this.raise(Errors.InvalidBigIntLiteral, startLoc); + } + ++this.state.pos; + isBigInt = true; + } + if (next === 109) { + this.expectPlugin("decimal", this.state.curPosition()); + if (hasExponent || hasLeadingZero) { + this.raise(Errors.InvalidDecimal, startLoc); + } + ++this.state.pos; + isDecimal = true; + } + if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { + throw this.raise(Errors.NumberIdentifier, this.state.curPosition()); + } + const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); + if (isBigInt) { + this.finishToken(135, str); + return; + } + if (isDecimal) { + this.finishToken(136, str); + return; + } + const val = isOctal ? parseInt(str, 8) : parseFloat(str); + this.finishToken(134, val); + } + readCodePoint(throwOnInvalid) { + const { + code, + pos + } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); + this.state.pos = pos; + return code; + } + readString(quote) { + const { + str, + pos, + curLine, + lineStart + } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + this.finishToken(133, str); + } + readTemplateContinuation() { + if (!this.match(8)) { + this.unexpected(null, 8); + } + this.state.pos--; + this.readTemplateToken(); + } + readTemplateToken() { + const opening = this.input[this.state.pos]; + const { + str, + firstInvalidLoc, + pos, + curLine, + lineStart + } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + if (firstInvalidLoc) { + this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos); + } + if (this.input.codePointAt(pos) === 96) { + this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); + } else { + this.state.pos++; + this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); + } + } + recordStrictModeErrors(toParseError, at) { + const index = at.index; + if (this.state.strict && !this.state.strictErrors.has(index)) { + this.raise(toParseError, at); + } else { + this.state.strictErrors.set(index, [toParseError, at]); + } + } + readWord1(firstCode) { + this.state.containsEsc = false; + let word = ""; + const start = this.state.pos; + let chunkStart = this.state.pos; + if (firstCode !== undefined) { + this.state.pos += firstCode <= 0xffff ? 1 : 2; + } + while (this.state.pos < this.length) { + const ch = this.codePointAtPos(this.state.pos); + if (isIdentifierChar(ch)) { + this.state.pos += ch <= 0xffff ? 1 : 2; + } else if (ch === 92) { + this.state.containsEsc = true; + word += this.input.slice(chunkStart, this.state.pos); + const escStart = this.state.curPosition(); + const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(Errors.MissingUnicodeEscape, this.state.curPosition()); + chunkStart = this.state.pos - 1; + continue; + } + ++this.state.pos; + const esc = this.readCodePoint(true); + if (esc !== null) { + if (!identifierCheck(esc)) { + this.raise(Errors.EscapedCharNotAnIdentifier, escStart); + } + word += String.fromCodePoint(esc); + } + chunkStart = this.state.pos; + } else { + break; + } + } + return word + this.input.slice(chunkStart, this.state.pos); + } + readWord(firstCode) { + const word = this.readWord1(firstCode); + const type = keywords$1.get(word); + if (type !== undefined) { + this.finishToken(type, tokenLabelName(type)); + } else { + this.finishToken(132, word); + } + } + checkKeywordEscapes() { + const { + type + } = this.state; + if (tokenIsKeyword(type) && this.state.containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, { + reservedWord: tokenLabelName(type) + }); + } + } + raise(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const error = toParseError(loc, details); + if (!this.options.errorRecovery) throw error; + if (!this.isLookahead) this.state.errors.push(error); + return error; + } + raiseOverwrite(toParseError, at, details = {}) { + const loc = at instanceof Position ? at : at.loc.start; + const pos = loc.index; + const errors = this.state.errors; + for (let i = errors.length - 1; i >= 0; i--) { + const error = errors[i]; + if (error.loc.index === pos) { + return errors[i] = toParseError(loc, details); + } + if (error.loc.index < pos) break; + } + return this.raise(toParseError, at, details); + } + updateContext(prevType) {} + unexpected(loc, type) { + throw this.raise(Errors.UnexpectedToken, loc != null ? loc : this.state.startLoc, { + expected: type ? tokenLabelName(type) : null + }); + } + expectPlugin(pluginName, loc) { + if (this.hasPlugin(pluginName)) { + return true; + } + throw this.raise(Errors.MissingPlugin, loc != null ? loc : this.state.startLoc, { + missingPlugin: [pluginName] + }); + } + expectOnePlugin(pluginNames) { + if (!pluginNames.some(name => this.hasPlugin(name))) { + throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, { + missingPlugin: pluginNames + }); + } + } + errorBuilder(error) { + return (pos, lineStart, curLine) => { + this.raise(error, buildPosition(pos, lineStart, curLine)); + }; + } +} +class ClassScope { + constructor() { + this.privateNames = new Set(); + this.loneAccessors = new Map(); + this.undefinedPrivateNames = new Map(); + } +} +class ClassScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = []; + this.undefinedPrivateNames = new Map(); + this.parser = parser; + } + current() { + return this.stack[this.stack.length - 1]; + } + enter() { + this.stack.push(new ClassScope()); + } + exit() { + const oldClassScope = this.stack.pop(); + const current = this.current(); + for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { + if (current) { + if (!current.undefinedPrivateNames.has(name)) { + current.undefinedPrivateNames.set(name, loc); + } + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } + } + declarePrivateName(name, elementType, loc) { + const { + privateNames, + loneAccessors, + undefinedPrivateNames + } = this.current(); + let redefined = privateNames.has(name); + if (elementType & 3) { + const accessor = redefined && loneAccessors.get(name); + if (accessor) { + const oldStatic = accessor & 4; + const newStatic = elementType & 4; + const oldKind = accessor & 3; + const newKind = elementType & 3; + redefined = oldKind === newKind || oldStatic !== newStatic; + if (!redefined) loneAccessors.delete(name); + } else if (!redefined) { + loneAccessors.set(name, elementType); + } + } + if (redefined) { + this.parser.raise(Errors.PrivateNameRedeclaration, loc, { + identifierName: name + }); + } + privateNames.add(name); + undefinedPrivateNames.delete(name); + } + usePrivateName(name, loc) { + let classScope; + for (classScope of this.stack) { + if (classScope.privateNames.has(name)) return; + } + if (classScope) { + classScope.undefinedPrivateNames.set(name, loc); + } else { + this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, { + identifierName: name + }); + } + } +} +class ExpressionScope { + constructor(type = 0) { + this.type = type; + } + canBeArrowParameterDeclaration() { + return this.type === 2 || this.type === 1; + } + isCertainlyParameterDeclaration() { + return this.type === 3; + } +} +class ArrowHeadParsingScope extends ExpressionScope { + constructor(type) { + super(type); + this.declarationErrors = new Map(); + } + recordDeclarationError(ParsingErrorClass, at) { + const index = at.index; + this.declarationErrors.set(index, [ParsingErrorClass, at]); + } + clearDeclarationError(index) { + this.declarationErrors.delete(index); + } + iterateErrors(iterator) { + this.declarationErrors.forEach(iterator); + } +} +class ExpressionScopeHandler { + constructor(parser) { + this.parser = void 0; + this.stack = [new ExpressionScope()]; + this.parser = parser; + } + enter(scope) { + this.stack.push(scope); + } + exit() { + this.stack.pop(); + } + recordParameterInitializerError(toParseError, node) { + const origin = node.loc.start; + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (!scope.isCertainlyParameterDeclaration()) { + if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(toParseError, origin); + } else { + return; + } + scope = stack[--i]; + } + this.parser.raise(toParseError, origin); + } + recordArrowParameterBindingError(error, node) { + const { + stack + } = this; + const scope = stack[stack.length - 1]; + const origin = node.loc.start; + if (scope.isCertainlyParameterDeclaration()) { + this.parser.raise(error, origin); + } else if (scope.canBeArrowParameterDeclaration()) { + scope.recordDeclarationError(error, origin); + } else { + return; + } + } + recordAsyncArrowParametersError(at) { + const { + stack + } = this; + let i = stack.length - 1; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + if (scope.type === 2) { + scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at); + } + scope = stack[--i]; + } + } + validateAsPattern() { + const { + stack + } = this; + const currentScope = stack[stack.length - 1]; + if (!currentScope.canBeArrowParameterDeclaration()) return; + currentScope.iterateErrors(([toParseError, loc]) => { + this.parser.raise(toParseError, loc); + let i = stack.length - 2; + let scope = stack[i]; + while (scope.canBeArrowParameterDeclaration()) { + scope.clearDeclarationError(loc.index); + scope = stack[--i]; + } + }); + } +} +function newParameterDeclarationScope() { + return new ExpressionScope(3); +} +function newArrowHeadScope() { + return new ArrowHeadParsingScope(1); +} +function newAsyncArrowScope() { + return new ArrowHeadParsingScope(2); +} +function newExpressionScope() { + return new ExpressionScope(); +} +class ProductionParameterHandler { + constructor() { + this.stacks = []; + } + enter(flags) { + this.stacks.push(flags); + } + exit() { + this.stacks.pop(); + } + currentFlags() { + return this.stacks[this.stacks.length - 1]; + } + get hasAwait() { + return (this.currentFlags() & 2) > 0; + } + get hasYield() { + return (this.currentFlags() & 1) > 0; + } + get hasReturn() { + return (this.currentFlags() & 4) > 0; + } + get hasIn() { + return (this.currentFlags() & 8) > 0; + } +} +function functionFlags(isAsync, isGenerator) { + return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); +} +class UtilParser extends Tokenizer { + addExtra(node, key, value, enumerable = true) { + if (!node) return; + const extra = node.extra = node.extra || {}; + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { + enumerable, + value + }); + } + } + isContextual(token) { + return this.state.type === token && !this.state.containsEsc; + } + isUnparsedContextual(nameStart, name) { + const nameEnd = nameStart + name.length; + if (this.input.slice(nameStart, nameEnd) === name) { + const nextCh = this.input.charCodeAt(nameEnd); + return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); + } + return false; + } + isLookaheadContextual(name) { + const next = this.nextTokenStart(); + return this.isUnparsedContextual(next, name); + } + eatContextual(token) { + if (this.isContextual(token)) { + this.next(); + return true; + } + return false; + } + expectContextual(token, toParseError) { + if (!this.eatContextual(token)) { + if (toParseError != null) { + throw this.raise(toParseError, this.state.startLoc); + } + this.unexpected(null, token); + } + } + canInsertSemicolon() { + return this.match(139) || this.match(8) || this.hasPrecedingLineBreak(); + } + hasPrecedingLineBreak() { + return lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start)); + } + hasFollowingLineBreak() { + skipWhiteSpaceToLineBreak.lastIndex = this.state.end; + return skipWhiteSpaceToLineBreak.test(this.input); + } + isLineTerminator() { + return this.eat(13) || this.canInsertSemicolon(); + } + semicolon(allowAsi = true) { + if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; + this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc); + } + expect(type, loc) { + this.eat(type) || this.unexpected(loc, type); + } + tryParse(fn, oldState = this.state.clone()) { + const abortSignal = { + node: null + }; + try { + const node = fn((node = null) => { + abortSignal.node = node; + throw abortSignal; + }); + if (this.state.errors.length > oldState.errors.length) { + const failState = this.state; + this.state = oldState; + this.state.tokensLength = failState.tokensLength; + return { + node, + error: failState.errors[oldState.errors.length], + thrown: false, + aborted: false, + failState + }; + } + return { + node, + error: null, + thrown: false, + aborted: false, + failState: null + }; + } catch (error) { + const failState = this.state; + this.state = oldState; + if (error instanceof SyntaxError) { + return { + node: null, + error, + thrown: true, + aborted: false, + failState + }; + } + if (error === abortSignal) { + return { + node: abortSignal.node, + error: null, + thrown: false, + aborted: true, + failState + }; + } + throw error; + } + } + checkExpressionErrors(refExpressionErrors, andThrow) { + if (!refExpressionErrors) return false; + const { + shorthandAssignLoc, + doubleProtoLoc, + privateKeyLoc, + optionalParametersLoc + } = refExpressionErrors; + const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; + if (!andThrow) { + return hasErrors; + } + if (shorthandAssignLoc != null) { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + if (doubleProtoLoc != null) { + this.raise(Errors.DuplicateProto, doubleProtoLoc); + } + if (privateKeyLoc != null) { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + if (optionalParametersLoc != null) { + this.unexpected(optionalParametersLoc); + } + } + isLiteralPropertyName() { + return tokenIsLiteralPropertyName(this.state.type); + } + isPrivateName(node) { + return node.type === "PrivateName"; + } + getPrivateNameSV(node) { + return node.id.name; + } + hasPropertyAsPrivateName(node) { + return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); + } + isObjectProperty(node) { + return node.type === "ObjectProperty"; + } + isObjectMethod(node) { + return node.type === "ObjectMethod"; + } + initializeScopes(inModule = this.options.sourceType === "module") { + const oldLabels = this.state.labels; + this.state.labels = []; + const oldExportedIdentifiers = this.exportedIdentifiers; + this.exportedIdentifiers = new Set(); + const oldInModule = this.inModule; + this.inModule = inModule; + const oldScope = this.scope; + const ScopeHandler = this.getScopeHandler(); + this.scope = new ScopeHandler(this, inModule); + const oldProdParam = this.prodParam; + this.prodParam = new ProductionParameterHandler(); + const oldClassScope = this.classScope; + this.classScope = new ClassScopeHandler(this); + const oldExpressionScope = this.expressionScope; + this.expressionScope = new ExpressionScopeHandler(this); + return () => { + this.state.labels = oldLabels; + this.exportedIdentifiers = oldExportedIdentifiers; + this.inModule = oldInModule; + this.scope = oldScope; + this.prodParam = oldProdParam; + this.classScope = oldClassScope; + this.expressionScope = oldExpressionScope; + }; + } + enterInitialScopes() { + let paramFlags = 0; + if (this.inModule) { + paramFlags |= 2; + } + this.scope.enter(1); + this.prodParam.enter(paramFlags); + } + checkDestructuringPrivate(refExpressionErrors) { + const { + privateKeyLoc + } = refExpressionErrors; + if (privateKeyLoc !== null) { + this.expectPlugin("destructuringPrivate", privateKeyLoc); + } + } +} +class ExpressionErrors { + constructor() { + this.shorthandAssignLoc = null; + this.doubleProtoLoc = null; + this.privateKeyLoc = null; + this.optionalParametersLoc = null; + } +} +class Node { + constructor(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + this.loc = new SourceLocation(loc); + if (parser != null && parser.options.ranges) this.range = [pos, 0]; + if (parser != null && parser.filename) this.loc.filename = parser.filename; + } +} +const NodePrototype = Node.prototype; +{ + NodePrototype.__clone = function () { + const newNode = new Node(undefined, this.start, this.loc.start); + const keys = Object.keys(this); + for (let i = 0, length = keys.length; i < length; i++) { + const key = keys[i]; + if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { + newNode[key] = this[key]; + } + } + return newNode; + }; +} +function clonePlaceholder(node) { + return cloneIdentifier(node); +} +function cloneIdentifier(node) { + const { + type, + start, + end, + loc, + range, + extra, + name + } = node; + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + cloned.extra = extra; + cloned.name = name; + if (type === "Placeholder") { + cloned.expectedNode = node.expectedNode; + } + return cloned; +} +function cloneStringLiteral(node) { + const { + type, + start, + end, + loc, + range, + extra + } = node; + if (type === "Placeholder") { + return clonePlaceholder(node); + } + const cloned = Object.create(NodePrototype); + cloned.type = type; + cloned.start = start; + cloned.end = end; + cloned.loc = loc; + cloned.range = range; + if (node.raw !== undefined) { + cloned.raw = node.raw; + } else { + cloned.extra = extra; + } + cloned.value = node.value; + return cloned; +} +class NodeUtils extends UtilParser { + startNode() { + const loc = this.state.startLoc; + return new Node(this, loc.index, loc); + } + startNodeAt(loc) { + return new Node(this, loc.index, loc); + } + startNodeAtNode(type) { + return this.startNodeAt(type.loc.start); + } + finishNode(node, type) { + return this.finishNodeAt(node, type, this.state.lastTokEndLoc); + } + finishNodeAt(node, type, endLoc) { + node.type = type; + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endLoc.index; + if (this.options.attachComment) this.processComment(node); + return node; + } + resetStartLocation(node, startLoc) { + node.start = startLoc.index; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = startLoc.index; + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endLoc.index; + } + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.loc.start); + } +} +const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); +const FlowErrors = ParseErrorEnum`flow`({ + AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", + AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", + AssignReservedType: ({ + reservedType + }) => `Cannot overwrite reserved type ${reservedType}.`, + DeclareClassElement: "The `declare` modifier can only appear on class fields.", + DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", + DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", + EnumBooleanMemberNotInitialized: ({ + memberName, + enumName + }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, + EnumDuplicateMemberName: ({ + memberName, + enumName + }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, + EnumInconsistentMemberValues: ({ + enumName + }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, + EnumInvalidExplicitType: ({ + invalidEnumType, + enumName + }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidExplicitTypeUnknownSupplied: ({ + enumName + }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerPrimaryType: ({ + enumName, + memberName, + explicitType + }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, + EnumInvalidMemberInitializerSymbolType: ({ + enumName, + memberName + }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerUnknownType: ({ + enumName, + memberName + }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, + EnumInvalidMemberName: ({ + enumName, + memberName, + suggestion + }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, + EnumNumberMemberNotInitialized: ({ + enumName, + memberName + }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, + EnumStringMemberInconsistentlyInitialized: ({ + enumName + }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, + GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", + ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", + InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", + InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", + InexactVariance: "Explicit inexact syntax cannot have variance.", + InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", + MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", + NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", + NestedFlowComment: "Cannot have a flow comment inside another flow comment.", + PatternIsOptional: Object.assign({ + message: "A binding pattern parameter cannot be optional in an implementation signature." + }, { + reasonCode: "OptionalBindingPattern" + }), + SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", + SpreadVariance: "Spread properties cannot have variance.", + ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", + ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", + ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", + ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", + ThisParamNoDefault: "The `this` parameter may not have a default value.", + TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", + UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", + UnexpectedReservedType: ({ + reservedType + }) => `Unexpected reserved type ${reservedType}.`, + UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", + UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", + UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", + UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', + UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", + UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.", + UnsupportedDeclareExportKind: ({ + unsupportedExportKind, + suggestion + }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, + UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", + UnterminatedFlowComment: "Unterminated flow-comment." +}); +function isEsModuleType(bodyElement) { + return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); +} +function hasTypeImportKind(node) { + return node.importKind === "type" || node.importKind === "typeof"; +} +const exportSuggestions = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" +}; +function partition(list, test) { + const list1 = []; + const list2 = []; + for (let i = 0; i < list.length; i++) { + (test(list[i], i, list) ? list1 : list2).push(list[i]); + } + return [list1, list2]; +} +const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; +var flow = superClass => class FlowParserMixin extends superClass { + constructor(...args) { + super(...args); + this.flowPragma = undefined; + } + getScopeHandler() { + return FlowScopeHandler; + } + shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + } + shouldParseEnums() { + return !!this.getPluginOption("flow", "enums"); + } + finishToken(type, val) { + if (type !== 133 && type !== 13 && type !== 28) { + if (this.flowPragma === undefined) { + this.flowPragma = null; + } + } + super.finishToken(type, val); + } + addComment(comment) { + if (this.flowPragma === undefined) { + const matches = FLOW_PRAGMA_REGEX.exec(comment.value); + if (!matches) ;else if (matches[1] === "flow") { + this.flowPragma = "flow"; + } else if (matches[1] === "noflow") { + this.flowPragma = "noflow"; + } else { + throw new Error("Unexpected flow pragma"); + } + } + super.addComment(comment); + } + flowParseTypeInitialiser(tok) { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(tok || 14); + const type = this.flowParseType(); + this.state.inType = oldInType; + return type; + } + flowParsePredicate() { + const node = this.startNode(); + const moduloLoc = this.state.startLoc; + this.next(); + this.expectContextual(110); + if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) { + this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc); + } + if (this.eat(10)) { + node.value = super.parseExpression(); + this.expect(11); + return this.finishNode(node, "DeclaredPredicate"); + } else { + return this.finishNode(node, "InferredPredicate"); + } + } + flowParseTypeAndPredicateInitialiser() { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(14); + let type = null; + let predicate = null; + if (this.match(54)) { + this.state.inType = oldInType; + predicate = this.flowParsePredicate(); + } else { + type = this.flowParseType(); + this.state.inType = oldInType; + if (this.match(54)) { + predicate = this.flowParsePredicate(); + } + } + return [type, predicate]; + } + flowParseDeclareClass(node) { + this.next(); + this.flowParseInterfaceish(node, true); + return this.finishNode(node, "DeclareClass"); + } + flowParseDeclareFunction(node) { + this.next(); + const id = node.id = this.parseIdentifier(); + const typeNode = this.startNode(); + const typeContainer = this.startNode(); + if (this.match(47)) { + typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + typeNode.typeParameters = null; + } + this.expect(10); + const tmp = this.flowParseFunctionTypeParams(); + typeNode.params = tmp.params; + typeNode.rest = tmp.rest; + typeNode.this = tmp._this; + this.expect(11); + [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); + id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + this.resetEndLocation(id); + this.semicolon(); + this.scope.declareName(node.id.name, 2048, node.id.loc.start); + return this.finishNode(node, "DeclareFunction"); + } + flowParseDeclare(node, insideModule) { + if (this.match(80)) { + return this.flowParseDeclareClass(node); + } else if (this.match(68)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(74)) { + return this.flowParseDeclareVariable(node); + } else if (this.eatContextual(127)) { + if (this.match(16)) { + return this.flowParseDeclareModuleExports(node); + } else { + if (insideModule) { + this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc); + } + return this.flowParseDeclareModule(node); + } + } else if (this.isContextual(130)) { + return this.flowParseDeclareTypeAlias(node); + } else if (this.isContextual(131)) { + return this.flowParseDeclareOpaqueType(node); + } else if (this.isContextual(129)) { + return this.flowParseDeclareInterface(node); + } else if (this.match(82)) { + return this.flowParseDeclareExportDeclaration(node, insideModule); + } else { + this.unexpected(); + } + } + flowParseDeclareVariable(node) { + this.next(); + node.id = this.flowParseTypeAnnotatableIdentifier(true); + this.scope.declareName(node.id.name, 5, node.id.loc.start); + this.semicolon(); + return this.finishNode(node, "DeclareVariable"); + } + flowParseDeclareModule(node) { + this.scope.enter(0); + if (this.match(133)) { + node.id = super.parseExprAtom(); + } else { + node.id = this.parseIdentifier(); + } + const bodyNode = node.body = this.startNode(); + const body = bodyNode.body = []; + this.expect(5); + while (!this.match(8)) { + let bodyNode = this.startNode(); + if (this.match(83)) { + this.next(); + if (!this.isContextual(130) && !this.match(87)) { + this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc); + } + super.parseImport(bodyNode); + } else { + this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); + bodyNode = this.flowParseDeclare(bodyNode, true); + } + body.push(bodyNode); + } + this.scope.exit(); + this.expect(8); + this.finishNode(bodyNode, "BlockStatement"); + let kind = null; + let hasModuleExport = false; + body.forEach(bodyElement => { + if (isEsModuleType(bodyElement)) { + if (kind === "CommonJS") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "ES"; + } else if (bodyElement.type === "DeclareModuleExports") { + if (hasModuleExport) { + this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement); + } + if (kind === "ES") { + this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement); + } + kind = "CommonJS"; + hasModuleExport = true; + } + }); + node.kind = kind || "CommonJS"; + return this.finishNode(node, "DeclareModule"); + } + flowParseDeclareExportDeclaration(node, insideModule) { + this.expect(82); + if (this.eat(65)) { + if (this.match(68) || this.match(80)) { + node.declaration = this.flowParseDeclare(this.startNode()); + } else { + node.declaration = this.flowParseType(); + this.semicolon(); + } + node.default = true; + return this.finishNode(node, "DeclareExportDeclaration"); + } else { + if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { + const label = this.state.value; + throw this.raise(FlowErrors.UnsupportedDeclareExportKind, this.state.startLoc, { + unsupportedExportKind: label, + suggestion: exportSuggestions[label] + }); + } + if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { + node.declaration = this.flowParseDeclare(this.startNode()); + node.default = false; + return this.finishNode(node, "DeclareExportDeclaration"); + } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { + node = this.parseExport(node, null); + if (node.type === "ExportNamedDeclaration") { + node.type = "ExportDeclaration"; + node.default = false; + delete node.exportKind; + } + node.type = "Declare" + node.type; + return node; + } + } + this.unexpected(); + } + flowParseDeclareModuleExports(node) { + this.next(); + this.expectContextual(111); + node.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(node, "DeclareModuleExports"); + } + flowParseDeclareTypeAlias(node) { + this.next(); + const finished = this.flowParseTypeAlias(node); + finished.type = "DeclareTypeAlias"; + return finished; + } + flowParseDeclareOpaqueType(node) { + this.next(); + const finished = this.flowParseOpaqueType(node, true); + finished.type = "DeclareOpaqueType"; + return finished; + } + flowParseDeclareInterface(node) { + this.next(); + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "DeclareInterface"); + } + flowParseInterfaceish(node, isClass) { + node.id = this.flowParseRestrictedIdentifier(!isClass, true); + this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (!isClass && this.eat(12)); + } + if (isClass) { + node.implements = []; + node.mixins = []; + if (this.eatContextual(117)) { + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + if (this.eatContextual(113)) { + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + } + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false + }); + } + flowParseInterfaceExtends() { + const node = this.startNode(); + node.id = this.flowParseQualifiedTypeIdentifier(); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + return this.finishNode(node, "InterfaceExtends"); + } + flowParseInterface(node) { + this.flowParseInterfaceish(node, false); + return this.finishNode(node, "InterfaceDeclaration"); + } + checkNotUnderscore(word) { + if (word === "_") { + this.raise(FlowErrors.UnexpectedReservedUnderscore, this.state.startLoc); + } + } + checkReservedType(word, startLoc, declaration) { + if (!reservedTypes.has(word)) return; + this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { + reservedType: word + }); + } + flowParseRestrictedIdentifier(liberal, declaration) { + this.checkReservedType(this.state.value, this.state.startLoc, declaration); + return this.parseIdentifier(liberal); + } + flowParseTypeAlias(node) { + node.id = this.flowParseRestrictedIdentifier(false, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.right = this.flowParseTypeInitialiser(29); + this.semicolon(); + return this.finishNode(node, "TypeAlias"); + } + flowParseOpaqueType(node, declare) { + this.expectContextual(130); + node.id = this.flowParseRestrictedIdentifier(true, true); + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + node.supertype = null; + if (this.match(14)) { + node.supertype = this.flowParseTypeInitialiser(14); + } + node.impltype = null; + if (!declare) { + node.impltype = this.flowParseTypeInitialiser(29); + } + this.semicolon(); + return this.finishNode(node, "OpaqueType"); + } + flowParseTypeParameter(requireDefault = false) { + const nodeStartLoc = this.state.startLoc; + const node = this.startNode(); + const variance = this.flowParseVariance(); + const ident = this.flowParseTypeAnnotatableIdentifier(); + node.name = ident.name; + node.variance = variance; + node.bound = ident.typeAnnotation; + if (this.match(29)) { + this.eat(29); + node.default = this.flowParseType(); + } else { + if (requireDefault) { + this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc); + } + } + return this.finishNode(node, "TypeParameter"); + } + flowParseTypeParameterDeclaration() { + const oldInType = this.state.inType; + const node = this.startNode(); + node.params = []; + this.state.inType = true; + if (this.match(47) || this.match(142)) { + this.next(); + } else { + this.unexpected(); + } + let defaultRequired = false; + do { + const typeParameter = this.flowParseTypeParameter(defaultRequired); + node.params.push(typeParameter); + if (typeParameter.default) { + defaultRequired = true; + } + if (!this.match(48)) { + this.expect(12); + } + } while (!this.match(48)); + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterDeclaration"); + } + flowParseTypeParameterInstantiation() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expect(47); + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; + while (!this.match(48)) { + node.params.push(this.flowParseType()); + if (!this.match(48)) { + this.expect(12); + } + } + this.state.noAnonFunctionType = oldNoAnonFunctionType; + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseTypeParameterInstantiationCallOrNew() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expect(47); + while (!this.match(48)) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + if (!this.match(48)) { + this.expect(12); + } + } + this.expect(48); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseInterfaceType() { + const node = this.startNode(); + this.expectContextual(129); + node.extends = []; + if (this.eat(81)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false + }); + return this.finishNode(node, "InterfaceTypeAnnotation"); + } + flowParseObjectPropertyKey() { + return this.match(134) || this.match(133) ? super.parseExprAtom() : this.parseIdentifier(true); + } + flowParseObjectTypeIndexer(node, isStatic, variance) { + node.static = isStatic; + if (this.lookahead().type === 14) { + node.id = this.flowParseObjectPropertyKey(); + node.key = this.flowParseTypeInitialiser(); + } else { + node.id = null; + node.key = this.flowParseType(); + } + this.expect(3); + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + return this.finishNode(node, "ObjectTypeIndexer"); + } + flowParseObjectTypeInternalSlot(node, isStatic) { + node.static = isStatic; + node.id = this.flowParseObjectPropertyKey(); + this.expect(3); + this.expect(3); + if (this.match(47) || this.match(10)) { + node.method = true; + node.optional = false; + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + } else { + node.method = false; + if (this.eat(17)) { + node.optional = true; + } + node.value = this.flowParseTypeInitialiser(); + } + return this.finishNode(node, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish(node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + node.this = null; + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + this.expect(10); + if (this.match(78)) { + node.this = this.flowParseFunctionTypeParam(true); + node.this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + node.params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + node.rest = this.flowParseFunctionTypeParam(false); + } + this.expect(11); + node.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + flowParseObjectTypeCallProperty(node, isStatic) { + const valueNode = this.startNode(); + node.static = isStatic; + node.value = this.flowParseObjectTypeMethodish(valueNode); + return this.finishNode(node, "ObjectTypeCallProperty"); + } + flowParseObjectType({ + allowStatic, + allowExact, + allowSpread, + allowProto, + allowInexact + }) { + const oldInType = this.state.inType; + this.state.inType = true; + const nodeStart = this.startNode(); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + nodeStart.internalSlots = []; + let endDelim; + let exact; + let inexact = false; + if (allowExact && this.match(6)) { + this.expect(6); + endDelim = 9; + exact = true; + } else { + this.expect(5); + endDelim = 8; + exact = false; + } + nodeStart.exact = exact; + while (!this.match(endDelim)) { + let isStatic = false; + let protoStartLoc = null; + let inexactStartLoc = null; + const node = this.startNode(); + if (allowProto && this.isContextual(118)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + protoStartLoc = this.state.startLoc; + allowStatic = false; + } + } + if (allowStatic && this.isContextual(106)) { + const lookahead = this.lookahead(); + if (lookahead.type !== 14 && lookahead.type !== 17) { + this.next(); + isStatic = true; + } + } + const variance = this.flowParseVariance(); + if (this.eat(0)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (this.eat(0)) { + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); + } else { + nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); + } + } else if (this.match(10) || this.match(47)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); + } else { + let kind = "init"; + if (this.isContextual(99) || this.isContextual(104)) { + const lookahead = this.lookahead(); + if (tokenIsLiteralPropertyName(lookahead.type)) { + kind = this.state.value; + this.next(); + } + } + const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); + if (propOrInexact === null) { + inexact = true; + inexactStartLoc = this.state.lastTokStartLoc; + } else { + nodeStart.properties.push(propOrInexact); + } + } + this.flowObjectTypeSemicolon(); + if (inexactStartLoc && !this.match(8) && !this.match(9)) { + this.raise(FlowErrors.UnexpectedExplicitInexactInObject, inexactStartLoc); + } + } + this.expect(endDelim); + if (allowSpread) { + nodeStart.inexact = inexact; + } + const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); + this.state.inType = oldInType; + return out; + } + flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { + if (this.eat(21)) { + const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); + if (isInexactToken) { + if (!allowSpread) { + this.raise(FlowErrors.InexactInsideNonObject, this.state.lastTokStartLoc); + } else if (!allowInexact) { + this.raise(FlowErrors.InexactInsideExact, this.state.lastTokStartLoc); + } + if (variance) { + this.raise(FlowErrors.InexactVariance, variance); + } + return null; + } + if (!allowSpread) { + this.raise(FlowErrors.UnexpectedSpreadType, this.state.lastTokStartLoc); + } + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.raise(FlowErrors.SpreadVariance, variance); + } + node.argument = this.flowParseType(); + return this.finishNode(node, "ObjectTypeSpreadProperty"); + } else { + node.key = this.flowParseObjectPropertyKey(); + node.static = isStatic; + node.proto = protoStartLoc != null; + node.kind = kind; + let optional = false; + if (this.match(47) || this.match(10)) { + node.method = true; + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); + } + if (variance) { + this.unexpected(variance.loc.start); + } + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); + if (kind === "get" || kind === "set") { + this.flowCheckGetterSetterParams(node); + } + if (!allowSpread && node.key.name === "constructor" && node.value.this) { + this.raise(FlowErrors.ThisParamBannedInConstructor, node.value.this); + } + } else { + if (kind !== "init") this.unexpected(); + node.method = false; + if (this.eat(17)) { + optional = true; + } + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + } + node.optional = optional; + return this.finishNode(node, "ObjectTypeProperty"); + } + } + flowCheckGetterSetterParams(property) { + const paramCount = property.kind === "get" ? 0 : 1; + const length = property.value.params.length + (property.value.rest ? 1 : 0); + if (property.value.this) { + this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, property.value.this); + } + if (length !== paramCount) { + this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, property); + } + if (property.kind === "set" && property.value.rest) { + this.raise(Errors.BadSetterRestParameter, property); + } + } + flowObjectTypeSemicolon() { + if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { + this.unexpected(); + } + } + flowParseQualifiedTypeIdentifier(startLoc, id) { + var _startLoc; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + let node = id || this.flowParseRestrictedIdentifier(true); + while (this.eat(16)) { + const node2 = this.startNodeAt(startLoc); + node2.qualification = node; + node2.id = this.flowParseRestrictedIdentifier(true); + node = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + return node; + } + flowParseGenericType(startLoc, id) { + const node = this.startNodeAt(startLoc); + node.typeParameters = null; + node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } + return this.finishNode(node, "GenericTypeAnnotation"); + } + flowParseTypeofType() { + const node = this.startNode(); + this.expect(87); + node.argument = this.flowParsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + } + flowParseTupleType() { + const node = this.startNode(); + node.types = []; + this.expect(0); + while (this.state.pos < this.length && !this.match(3)) { + node.types.push(this.flowParseType()); + if (this.match(3)) break; + this.expect(12); + } + this.expect(3); + return this.finishNode(node, "TupleTypeAnnotation"); + } + flowParseFunctionTypeParam(first) { + let name = null; + let optional = false; + let typeAnnotation = null; + const node = this.startNode(); + const lh = this.lookahead(); + const isThis = this.state.type === 78; + if (lh.type === 14 || lh.type === 17) { + if (isThis && !first) { + this.raise(FlowErrors.ThisParamMustBeFirst, node); + } + name = this.parseIdentifier(isThis); + if (this.eat(17)) { + optional = true; + if (isThis) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, node); + } + } + typeAnnotation = this.flowParseTypeInitialiser(); + } else { + typeAnnotation = this.flowParseType(); + } + node.name = name; + node.optional = optional; + node.typeAnnotation = typeAnnotation; + return this.finishNode(node, "FunctionTypeParam"); + } + reinterpretTypeAsFunctionTypeParam(type) { + const node = this.startNodeAt(type.loc.start); + node.name = null; + node.optional = false; + node.typeAnnotation = type; + return this.finishNode(node, "FunctionTypeParam"); + } + flowParseFunctionTypeParams(params = []) { + let rest = null; + let _this = null; + if (this.match(78)) { + _this = this.flowParseFunctionTypeParam(true); + _this.name = null; + if (!this.match(11)) { + this.expect(12); + } + } + while (!this.match(11) && !this.match(21)) { + params.push(this.flowParseFunctionTypeParam(false)); + if (!this.match(11)) { + this.expect(12); + } + } + if (this.eat(21)) { + rest = this.flowParseFunctionTypeParam(false); + } + return { + params, + rest, + _this + }; + } + flowIdentToTypeAnnotation(startLoc, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + case "empty": + return this.finishNode(node, "EmptyTypeAnnotation"); + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + case "symbol": + return this.finishNode(node, "SymbolTypeAnnotation"); + default: + this.checkNotUnderscore(id.name); + return this.flowParseGenericType(startLoc, id); + } + } + flowParsePrimaryType() { + const startLoc = this.state.startLoc; + const node = this.startNode(); + let tmp; + let type; + let isGroupedType = false; + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + switch (this.state.type) { + case 5: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true + }); + case 6: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false + }); + case 0: + this.state.noAnonFunctionType = false; + type = this.flowParseTupleType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + return type; + case 47: + node.typeParameters = this.flowParseTypeParameterDeclaration(); + this.expect(10); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + case 10: + this.next(); + if (!this.match(11) && !this.match(21)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + const token = this.lookahead().type; + isGroupedType = token !== 17 && token !== 14; + } else { + isGroupedType = true; + } + } + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { + this.expect(11); + return type; + } else { + this.eat(12); + } + } + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); + } else { + tmp = this.flowParseFunctionTypeParams(); + } + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + case 133: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + case 85: + case 86: + node.value = this.match(85); + this.next(); + return this.finishNode(node, "BooleanLiteralTypeAnnotation"); + case 53: + if (this.state.value === "-") { + this.next(); + if (this.match(134)) { + return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); + } + if (this.match(135)) { + return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); + } + throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc); + } + this.unexpected(); + return; + case 134: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + case 135: + return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); + case 88: + this.next(); + return this.finishNode(node, "VoidTypeAnnotation"); + case 84: + this.next(); + return this.finishNode(node, "NullLiteralTypeAnnotation"); + case 78: + this.next(); + return this.finishNode(node, "ThisTypeAnnotation"); + case 55: + this.next(); + return this.finishNode(node, "ExistsTypeAnnotation"); + case 87: + return this.flowParseTypeofType(); + default: + if (tokenIsKeyword(this.state.type)) { + const label = tokenLabelName(this.state.type); + this.next(); + return super.createIdentifier(node, label); + } else if (tokenIsIdentifier(this.state.type)) { + if (this.isContextual(129)) { + return this.flowParseInterfaceType(); + } + return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); + } + } + this.unexpected(); + } + flowParsePostfixType() { + const startLoc = this.state.startLoc; + let type = this.flowParsePrimaryType(); + let seenOptionalIndexedAccess = false; + while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + const optional = this.eat(18); + seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; + this.expect(0); + if (!optional && this.match(3)) { + node.elementType = type; + this.next(); + type = this.finishNode(node, "ArrayTypeAnnotation"); + } else { + node.objectType = type; + node.indexType = this.flowParseType(); + this.expect(3); + if (seenOptionalIndexedAccess) { + node.optional = optional; + type = this.finishNode(node, "OptionalIndexedAccessType"); + } else { + type = this.finishNode(node, "IndexedAccessType"); + } + } + } + return type; + } + flowParsePrefixType() { + const node = this.startNode(); + if (this.eat(17)) { + node.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } else { + return this.flowParsePostfixType(); + } + } + flowParseAnonFunctionWithoutParens() { + const param = this.flowParsePrefixType(); + if (!this.state.noAnonFunctionType && this.eat(19)) { + const node = this.startNodeAt(param.loc.start); + node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; + node.rest = null; + node.this = null; + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + return param; + } + flowParseIntersectionType() { + const node = this.startNode(); + this.eat(45); + const type = this.flowParseAnonFunctionWithoutParens(); + node.types = [type]; + while (this.eat(45)) { + node.types.push(this.flowParseAnonFunctionWithoutParens()); + } + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + } + flowParseUnionType() { + const node = this.startNode(); + this.eat(43); + const type = this.flowParseIntersectionType(); + node.types = [type]; + while (this.eat(43)) { + node.types.push(this.flowParseIntersectionType()); + } + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + } + flowParseType() { + const oldInType = this.state.inType; + this.state.inType = true; + const type = this.flowParseUnionType(); + this.state.inType = oldInType; + return type; + } + flowParseTypeOrImplicitInstantiation() { + if (this.state.type === 132 && this.state.value === "_") { + const startLoc = this.state.startLoc; + const node = this.parseIdentifier(); + return this.flowParseGenericType(startLoc, node); + } else { + return this.flowParseType(); + } + } + flowParseTypeAnnotation() { + const node = this.startNode(); + node.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(node, "TypeAnnotation"); + } + flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { + const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + if (this.match(14)) { + ident.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(ident); + } + return ident; + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + flowParseVariance() { + let variance = null; + if (this.match(53)) { + variance = this.startNode(); + if (this.state.value === "+") { + variance.kind = "plus"; + } else { + variance.kind = "minus"; + } + this.next(); + return this.finishNode(variance, "Variance"); + } + return variance; + } + parseFunctionBody(node, allowExpressionBody, isMethod = false) { + if (allowExpressionBody) { + this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + return; + } + super.parseFunctionBody(node, false, isMethod); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + parseStatementLike(flags) { + if (this.state.strict && this.isContextual(129)) { + const lookahead = this.lookahead(); + if (tokenIsKeywordOrIdentifier(lookahead.type)) { + const node = this.startNode(); + this.next(); + return this.flowParseInterface(node); + } + } else if (this.shouldParseEnums() && this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + const stmt = super.parseStatementLike(flags); + if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { + this.flowPragma = null; + } + return stmt; + } + parseExpressionStatement(node, expr, decorators) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { + return this.flowParseDeclare(node); + } + } else if (tokenIsIdentifier(this.state.type)) { + if (expr.name === "interface") { + return this.flowParseInterface(node); + } else if (expr.name === "type") { + return this.flowParseTypeAlias(node); + } else if (expr.name === "opaque") { + return this.flowParseOpaqueType(node, false); + } + } + } + return super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { + return !this.state.containsEsc; + } + return super.shouldParseExportDeclaration(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { + return this.state.containsEsc; + } + return super.isExportDefaultSpecifier(); + } + parseExportDefaultExpression() { + if (this.shouldParseEnums() && this.isContextual(126)) { + const node = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(node); + } + return super.parseExportDefaultExpression(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.match(17)) return expr; + if (this.state.maybeInArrowParameters) { + const nextCh = this.lookaheadCharCode(); + if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { + this.setOptionalParametersError(refExpressionErrors); + return expr; + } + } + this.expect(17); + const state = this.state.clone(); + const originalNoArrowAt = this.state.noArrowAt; + const node = this.startNodeAt(startLoc); + let { + consequent, + failed + } = this.tryParseConditionalConsequent(); + let [valid, invalid] = this.getArrowLikeExpressions(consequent); + if (failed || invalid.length > 0) { + const noArrowAt = [...originalNoArrowAt]; + if (invalid.length > 0) { + this.state = state; + this.state.noArrowAt = noArrowAt; + for (let i = 0; i < invalid.length; i++) { + noArrowAt.push(invalid[i].start); + } + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + [valid, invalid] = this.getArrowLikeExpressions(consequent); + } + if (failed && valid.length > 1) { + this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc); + } + if (failed && valid.length === 1) { + this.state = state; + noArrowAt.push(valid[0].start); + this.state.noArrowAt = noArrowAt; + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + } + } + this.getArrowLikeExpressions(consequent, true); + this.state.noArrowAt = originalNoArrowAt; + this.expect(14); + node.test = expr; + node.consequent = consequent; + node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); + return this.finishNode(node, "ConditionalExpression"); + } + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + const consequent = this.parseMaybeAssignAllowIn(); + const failed = !this.match(14); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent, + failed + }; + } + getArrowLikeExpressions(node, disallowInvalid) { + const stack = [node]; + const arrows = []; + while (stack.length !== 0) { + const node = stack.pop(); + if (node.type === "ArrowFunctionExpression") { + if (node.typeParameters || !node.returnType) { + this.finishArrowValidation(node); + } else { + arrows.push(node); + } + stack.push(node.body); + } else if (node.type === "ConditionalExpression") { + stack.push(node.consequent); + stack.push(node.alternate); + } + } + if (disallowInvalid) { + arrows.forEach(node => this.finishArrowValidation(node)); + return [arrows, []]; + } + return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); + } + finishArrowValidation(node) { + var _node$extra; + this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); + this.scope.enter(2 | 4); + super.checkParams(node, false, true); + this.scope.exit(); + } + forwardNoArrowParamsConversionAt(node, parse) { + let result; + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + this.state.noArrowParamsConversionAt.push(this.state.start); + result = parse(); + this.state.noArrowParamsConversionAt.pop(); + } else { + result = parse(); + } + return result; + } + parseParenItem(node, startLoc) { + node = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + node.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } + return node; + } + assertModuleNodeAllowed(node) { + if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { + return; + } + super.assertModuleNodeAllowed(node); + } + parseExportDeclaration(node) { + if (this.isContextual(130)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + if (this.match(5)) { + node.specifiers = this.parseExportSpecifiers(true); + super.parseExportFrom(node); + return null; + } else { + return this.flowParseTypeAlias(declarationNode); + } + } else if (this.isContextual(131)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseOpaqueType(declarationNode, false); + } else if (this.isContextual(129)) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseInterface(declarationNode); + } else if (this.shouldParseEnums() && this.isContextual(126)) { + node.exportKind = "value"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(declarationNode); + } else { + return super.parseExportDeclaration(node); + } + } + eatExportStar(node) { + if (super.eatExportStar(node)) return true; + if (this.isContextual(130) && this.lookahead().type === 55) { + node.exportKind = "type"; + this.next(); + this.next(); + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + const { + startLoc + } = this.state; + const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); + if (hasNamespace && node.exportKind === "type") { + this.unexpected(startLoc); + } + return hasNamespace; + } + parseClassId(node, isStatement, optionalId) { + super.parseClassId(node, isStatement, optionalId); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + } + parseClassMember(classBody, member, state) { + const { + startLoc + } = this.state; + if (this.isContextual(125)) { + if (super.parseClassMemberFromModifier(classBody, member)) { + return; + } + member.declare = true; + } + super.parseClassMember(classBody, member, state); + if (member.declare) { + if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { + this.raise(FlowErrors.DeclareClassElement, startLoc); + } else if (member.value) { + this.raise(FlowErrors.DeclareClassFieldInitializer, member.value); + } + } + } + isIterator(word) { + return word === "iterator" || word === "asyncIterator"; + } + readIterator() { + const word = super.readWord1(); + const fullWord = "@@" + word; + if (!this.isIterator(word) || !this.state.inType) { + this.raise(Errors.InvalidIdentifier, this.state.curPosition(), { + identifierName: fullWord + }); + } + this.finishToken(132, fullWord); + } + getTokenFromCode(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 123 && next === 124) { + this.finishOp(6, 2); + } else if (this.state.inType && (code === 62 || code === 60)) { + this.finishOp(code === 62 ? 48 : 47, 1); + } else if (this.state.inType && code === 63) { + if (next === 46) { + this.finishOp(18, 2); + } else { + this.finishOp(17, 1); + } + } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { + this.state.pos += 2; + this.readIterator(); + } else { + super.getTokenFromCode(code); + } + } + isAssignable(node, isBinding) { + if (node.type === "TypeCastExpression") { + return this.isAssignable(node.expression, isBinding); + } else { + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + super.toAssignable(node, isLHS); + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + toReferencedList(exprList, isParenthesizedExpr) { + for (let i = 0; i < exprList.length; i++) { + var _expr$extra; + const expr = exprList[i]; + if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { + this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation); + } + } + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (canBePattern && !this.state.maybeInArrowParameters) { + this.toReferencedList(node.elements); + } + return node; + } + isValidLVal(type, isParenthesized, binding) { + return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); + } + parseClassProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (this.match(14)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + return super.parseClassPrivateProperty(node); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(14) || super.isClassProperty(); + } + isNonstaticConstructor(method) { + return !this.match(14) && super.isNonstaticConstructor(method); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + if (method.params && isConstructor) { + const params = method.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { + const params = method.value.params; + if (params.length > 0 && this.isThisParam(params[0])) { + this.raise(FlowErrors.ThisParamBannedInConstructor, method); + } + } + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + if (method.variance) { + this.unexpected(method.variance.loc.start); + } + delete method.variance; + if (this.match(47)) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && this.match(47)) { + node.superTypeParameters = this.flowParseTypeParameterInstantiation(); + } + if (this.isContextual(113)) { + this.next(); + const implemented = node.implements = []; + do { + const node = this.startNode(); + node.id = this.flowParseRestrictedIdentifier(true); + if (this.match(47)) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(12)); + } + } + checkGetterSetterParams(method) { + super.checkGetterSetterParams(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length > 0) { + const param = params[0]; + if (this.isThisParam(param) && method.kind === "get") { + this.raise(FlowErrors.GetterMayNotHaveThisParam, param); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.SetterMayNotHaveThisParam, param); + } + } + } + parsePropertyNamePrefixOperator(node) { + node.variance = this.flowParseVariance(); + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + if (prop.variance) { + this.unexpected(prop.variance.loc.start); + } + delete prop.variance; + let typeParameters; + if (this.match(47) && !isAccessor) { + typeParameters = this.flowParseTypeParameterDeclaration(); + if (!this.match(10)) this.unexpected(); + } + const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + if (typeParameters) { + (result.value || result).typeParameters = typeParameters; + } + return result; + } + parseAssignableListItemTypes(param) { + if (this.eat(17)) { + if (param.type !== "Identifier") { + this.raise(FlowErrors.PatternIsOptional, param); + } + if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamMayNotBeOptional, param); + } + param.optional = true; + } + if (this.match(14)) { + param.typeAnnotation = this.flowParseTypeAnnotation(); + } else if (this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamAnnotationRequired, param); + } + if (this.match(29) && this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamNoDefault, param); + } + this.resetEndLocation(param); + return param; + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation); + } + return node; + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(FlowErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + if (!isExport) return true; + const ch = this.lookaheadCharCode(); + return ch === 123 || ch === 42; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + if (!phase && this.match(65)) { + return; + } + node.exportKind = phase === "type" ? phase : "value"; + } else { + if (phase === "type" && this.match(55)) this.unexpected(); + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + const firstIdent = specifier.imported; + let specifierTypeKind = null; + if (firstIdent.type === "Identifier") { + if (firstIdent.name === "type") { + specifierTypeKind = "type"; + } else if (firstIdent.name === "typeof") { + specifierTypeKind = "typeof"; + } + } + let isBinding = false; + if (this.isContextual(93) && !this.isLookaheadContextual("as")) { + const as_ident = this.parseIdentifier(true); + if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = as_ident; + specifier.importKind = specifierTypeKind; + specifier.local = cloneIdentifier(as_ident); + } else { + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = this.parseIdentifier(); + } + } else { + if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { + specifier.imported = this.parseIdentifier(true); + specifier.importKind = specifierTypeKind; + } else { + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: firstIdent.value + }); + } + specifier.imported = firstIdent; + specifier.importKind = null; + } + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + isBinding = true; + specifier.local = cloneIdentifier(specifier.imported); + } + } + const specifierIsTypeImport = hasTypeImportKind(specifier); + if (isInTypeOnlyImport && specifierIsTypeImport) { + this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier); + } + if (isInTypeOnlyImport || specifierIsTypeImport) { + this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); + } + if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { + this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); + } + return this.finishImportSpecifier(specifier, "ImportSpecifier"); + } + parseBindingAtom() { + switch (this.state.type) { + case 78: + return this.parseIdentifier(true); + default: + return super.parseBindingAtom(); + } + } + parseFunctionParams(node, isConstructor) { + const kind = node.kind; + if (kind !== "get" && kind !== "set" && this.match(47)) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (this.match(14)) { + decl.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + node.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx; + let state = null; + let jsx; + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { + var _jsx2, _jsx3; + state = state || this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _arrowExpression$extr; + typeParameters = this.flowParseTypeParameterDeclaration(); + const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { + const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + this.resetStartLocationFromNode(result, typeParameters); + return result; + }); + if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort(); + const expr = this.maybeUnwrapTypeCastExpression(arrowExpression); + if (expr.type !== "ArrowFunctionExpression") abort(); + expr.typeParameters = typeParameters; + this.resetStartLocationFromNode(expr, typeParameters); + return arrowExpression; + }, state); + let arrowExpression = null; + if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { + if (!arrow.error && !arrow.aborted) { + if (arrow.node.async) { + this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, typeParameters); + } + return arrow.node; + } + arrowExpression = arrow.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrowExpression) { + this.state = arrow.failState; + return arrowExpression; + } + if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; + if (arrow.thrown) throw arrow.error; + throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters); + } + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(() => { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(19)) this.unexpected(); + return typeNode; + }); + if (result.thrown) return null; + if (result.error) this.state = result.failState; + node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; + } + return super.parseArrow(node); + } + shouldParseArrow(params) { + return this.match(14) || super.shouldParseArrow(params); + } + setArrowFunctionParameters(node, params) { + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + node.params = params; + } else { + super.setArrowFunctionParameters(node, params); + } + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + return; + } + for (let i = 0; i < node.params.length; i++) { + if (this.isThisParam(node.params[i]) && i > 0) { + this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]); + } + } + super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); + } + parseParenAndDistinguishExpression(canBeArrow) { + return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); + } + parseSubscripts(base, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startLoc.index) !== -1) { + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = super.parseCallExpressionArguments(11, false); + base = this.finishNode(node, "CallExpression"); + } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { + const state = this.state.clone(); + const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); + if (!arrow.error && !arrow.aborted) return arrow.node; + const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); + if (result.node && !result.error) return result.node; + if (arrow.node) { + this.state = arrow.failState; + return arrow.node; + } + if (result.node) { + this.state = result.failState; + return result.node; + } + throw arrow.error || result.error; + } + return super.parseSubscripts(base, startLoc, noCalls); + } + parseSubscript(base, startLoc, noCalls, subscriptState) { + if (this.match(18) && this.isLookaheadToken_lt()) { + subscriptState.optionalChainMember = true; + if (noCalls) { + subscriptState.stop = true; + return base; + } + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + node.typeArguments = this.flowParseTypeParameterInstantiation(); + this.expect(10); + node.arguments = this.parseCallExpressionArguments(11, false); + node.optional = true; + return this.finishCallExpression(node, true); + } else if (!noCalls && this.shouldParseTypes() && this.match(47)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + const result = this.tryParse(() => { + node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(10); + node.arguments = super.parseCallExpressionArguments(11, false); + if (subscriptState.optionalChainMember) { + node.optional = false; + } + return this.finishCallExpression(node, subscriptState.optionalChainMember); + }); + if (result.node) { + if (result.error) this.state = result.failState; + return result.node; + } + } + return super.parseSubscript(base, startLoc, noCalls, subscriptState); + } + parseNewCallee(node) { + super.parseNewCallee(node); + let targs = null; + if (this.shouldParseTypes() && this.match(47)) { + targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; + } + node.typeArguments = targs; + } + parseAsyncArrowWithTypeParameters(startLoc) { + const node = this.startNodeAt(startLoc); + this.parseFunctionParams(node, false); + if (!this.parseArrow(node)) return; + return super.parseArrowExpression(node, undefined, true); + } + readToken_mult_modulo(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 42 && next === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = false; + this.state.pos += 2; + this.nextToken(); + return; + } + super.readToken_mult_modulo(code); + } + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + if (code === 124 && next === 125) { + this.finishOp(9, 2); + return; + } + super.readToken_pipe_amp(code); + } + parseTopLevel(file, program) { + const fileNode = super.parseTopLevel(file, program); + if (this.state.hasFlowComment) { + this.raise(FlowErrors.UnterminatedFlowComment, this.state.curPosition()); + } + return fileNode; + } + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) { + throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc); + } + this.hasFlowCommentCompletion(); + const commentSkip = this.skipFlowComment(); + if (commentSkip) { + this.state.pos += commentSkip; + this.state.hasFlowComment = true; + } + return; + } + return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); + } + skipFlowComment() { + const { + pos + } = this.state; + let shiftToFirstNonWhiteSpace = 2; + while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { + shiftToFirstNonWhiteSpace++; + } + const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + if (ch2 === 58 && ch3 === 58) { + return shiftToFirstNonWhiteSpace + 2; + } + if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { + return shiftToFirstNonWhiteSpace + 12; + } + if (ch2 === 58 && ch3 !== 58) { + return shiftToFirstNonWhiteSpace; + } + return false; + } + hasFlowCommentCompletion() { + const end = this.input.indexOf("*/", this.state.pos); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, this.state.curPosition()); + } + } + flowEnumErrorBooleanMemberNotInitialized(loc, { + enumName, + memberName + }) { + this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, { + memberName, + enumName + }); + } + flowEnumErrorInvalidMemberInitializer(loc, enumContext) { + return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, loc, enumContext); + } + flowEnumErrorNumberMemberNotInitialized(loc, details) { + this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details); + } + flowEnumErrorStringMemberInconsistentlyInitialized(node, details) { + this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, node, details); + } + flowEnumMemberInit() { + const startLoc = this.state.startLoc; + const endOfInit = () => this.match(12) || this.match(8); + switch (this.state.type) { + case 134: + { + const literal = this.parseNumericLiteral(this.state.value); + if (endOfInit()) { + return { + type: "number", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 133: + { + const literal = this.parseStringLiteral(this.state.value); + if (endOfInit()) { + return { + type: "string", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + case 85: + case 86: + { + const literal = this.parseBooleanLiteral(this.match(85)); + if (endOfInit()) { + return { + type: "boolean", + loc: literal.loc.start, + value: literal + }; + } + return { + type: "invalid", + loc: startLoc + }; + } + default: + return { + type: "invalid", + loc: startLoc + }; + } + } + flowEnumMemberRaw() { + const loc = this.state.startLoc; + const id = this.parseIdentifier(true); + const init = this.eat(29) ? this.flowEnumMemberInit() : { + type: "none", + loc + }; + return { + id, + init + }; + } + flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { + const { + explicitType + } = context; + if (explicitType === null) { + return; + } + if (explicitType !== expectedType) { + this.flowEnumErrorInvalidMemberInitializer(loc, context); + } + } + flowEnumMembers({ + enumName, + explicitType + }) { + const seenNames = new Set(); + const members = { + booleanMembers: [], + numberMembers: [], + stringMembers: [], + defaultedMembers: [] + }; + let hasUnknownMembers = false; + while (!this.match(8)) { + if (this.eat(21)) { + hasUnknownMembers = true; + break; + } + const memberNode = this.startNode(); + const { + id, + init + } = this.flowEnumMemberRaw(); + const memberName = id.name; + if (memberName === "") { + continue; + } + if (/^[a-z]/.test(memberName)) { + this.raise(FlowErrors.EnumInvalidMemberName, id, { + memberName, + suggestion: memberName[0].toUpperCase() + memberName.slice(1), + enumName + }); + } + if (seenNames.has(memberName)) { + this.raise(FlowErrors.EnumDuplicateMemberName, id, { + memberName, + enumName + }); + } + seenNames.add(memberName); + const context = { + enumName, + explicitType, + memberName + }; + memberNode.id = id; + switch (init.type) { + case "boolean": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); + memberNode.init = init.value; + members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); + break; + } + case "number": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); + memberNode.init = init.value; + members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); + break; + } + case "string": + { + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); + memberNode.init = init.value; + members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); + break; + } + case "invalid": + { + throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); + } + case "none": + { + switch (explicitType) { + case "boolean": + this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); + break; + case "number": + this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); + break; + default: + members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); + } + } + } + if (!this.match(8)) { + this.expect(12); + } + } + return { + members, + hasUnknownMembers + }; + } + flowEnumStringMembers(initializedMembers, defaultedMembers, { + enumName + }) { + if (initializedMembers.length === 0) { + return defaultedMembers; + } else if (defaultedMembers.length === 0) { + return initializedMembers; + } else if (defaultedMembers.length > initializedMembers.length) { + for (const member of initializedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return defaultedMembers; + } else { + for (const member of defaultedMembers) { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { + enumName + }); + } + return initializedMembers; + } + } + flowEnumParseExplicitType({ + enumName + }) { + if (!this.eatContextual(102)) return null; + if (!tokenIsIdentifier(this.state.type)) { + throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { + enumName + }); + } + const { + value + } = this.state; + this.next(); + if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { + this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, { + enumName, + invalidEnumType: value + }); + } + return value; + } + flowEnumBody(node, id) { + const enumName = id.name; + const nameLoc = id.loc.start; + const explicitType = this.flowEnumParseExplicitType({ + enumName + }); + this.expect(5); + const { + members, + hasUnknownMembers + } = this.flowEnumMembers({ + enumName, + explicitType + }); + node.hasUnknownMembers = hasUnknownMembers; + switch (explicitType) { + case "boolean": + node.explicitType = true; + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + case "number": + node.explicitType = true; + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + case "string": + node.explicitType = true; + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + case "symbol": + node.members = members.defaultedMembers; + this.expect(8); + return this.finishNode(node, "EnumSymbolBody"); + default: + { + const empty = () => { + node.members = []; + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + }; + node.explicitType = false; + const boolsLen = members.booleanMembers.length; + const numsLen = members.numberMembers.length; + const strsLen = members.stringMembers.length; + const defaultedLen = members.defaultedMembers.length; + if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { + return empty(); + } else if (!boolsLen && !numsLen) { + node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { + enumName + }); + this.expect(8); + return this.finishNode(node, "EnumStringBody"); + } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.booleanMembers; + this.expect(8); + return this.finishNode(node, "EnumBooleanBody"); + } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { + for (const member of members.defaultedMembers) { + this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { + enumName, + memberName: member.id.name + }); + } + node.members = members.numberMembers; + this.expect(8); + return this.finishNode(node, "EnumNumberBody"); + } else { + this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, { + enumName + }); + return empty(); + } + } + } + } + flowParseEnumDeclaration(node) { + const id = this.parseIdentifier(); + node.id = id; + node.body = this.flowEnumBody(this.startNode(), id); + return this.finishNode(node, "EnumDeclaration"); + } + isLookaheadToken_lt() { + const next = this.nextTokenStart(); + if (this.input.charCodeAt(next) === 60) { + const afterNext = this.input.charCodeAt(next + 1); + return afterNext !== 60 && afterNext !== 61; + } + return false; + } + maybeUnwrapTypeCastExpression(node) { + return node.type === "TypeCastExpression" ? node.expression : node; + } +}; +const entities = { + __proto__: null, + quot: "\u0022", + amp: "&", + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; +const JsxErrors = ParseErrorEnum`jsx`({ + AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", + MissingClosingTagElement: ({ + openingTagName + }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, + MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", + UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", + UnexpectedToken: ({ + unexpected, + HTMLEntity + }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, + UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", + UnterminatedJsxContent: "Unterminated JSX contents.", + UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?" +}); +function isFragment(object) { + return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; +} +function getQualifiedJSXName(object) { + if (object.type === "JSXIdentifier") { + return object.name; + } + if (object.type === "JSXNamespacedName") { + return object.namespace.name + ":" + object.name.name; + } + if (object.type === "JSXMemberExpression") { + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + throw new Error("Node had unexpected type: " + object.type); +} +var jsx = superClass => class JSXParserMixin extends superClass { + jsxReadToken() { + let out = ""; + let chunkStart = this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(JsxErrors.UnterminatedJsxContent, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + switch (ch) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (ch === 60 && this.state.canStartJSXElement) { + ++this.state.pos; + this.finishToken(142); + } else { + super.getTokenFromCode(ch); + } + return; + } + out += this.input.slice(chunkStart, this.state.pos); + this.finishToken(141, out); + return; + case 38: + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + break; + case 62: + case 125: + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(true); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + } + } + jsxReadNewLine(normalizeCRLF) { + const ch = this.input.charCodeAt(this.state.pos); + let out; + ++this.state.pos; + if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return out; + } + jsxReadString(quote) { + let out = ""; + let chunkStart = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) { + throw this.raise(Errors.UnterminatedString, this.state.startLoc); + } + const ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(false); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + out += this.input.slice(chunkStart, this.state.pos++); + this.finishToken(133, out); + } + jsxReadEntity() { + const startPos = ++this.state.pos; + if (this.codePointAtPos(this.state.pos) === 35) { + ++this.state.pos; + let radix = 10; + if (this.codePointAtPos(this.state.pos) === 120) { + radix = 16; + ++this.state.pos; + } + const codePoint = this.readInt(radix, undefined, false, "bail"); + if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { + ++this.state.pos; + return String.fromCodePoint(codePoint); + } + } else { + let count = 0; + let semi = false; + while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) == 59)) { + ++this.state.pos; + } + if (semi) { + const desc = this.input.slice(startPos, this.state.pos); + const entity = entities[desc]; + ++this.state.pos; + if (entity) { + return entity; + } + } + } + this.state.pos = startPos; + return "&"; + } + jsxReadWord() { + let ch; + const start = this.state.pos; + do { + ch = this.input.charCodeAt(++this.state.pos); + } while (isIdentifierChar(ch) || ch === 45); + this.finishToken(140, this.input.slice(start, this.state.pos)); + } + jsxParseIdentifier() { + const node = this.startNode(); + if (this.match(140)) { + node.name = this.state.value; + } else if (tokenIsKeyword(this.state.type)) { + node.name = tokenLabelName(this.state.type); + } else { + this.unexpected(); + } + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + jsxParseNamespacedName() { + const startLoc = this.state.startLoc; + const name = this.jsxParseIdentifier(); + if (!this.eat(14)) return name; + const node = this.startNodeAt(startLoc); + node.namespace = name; + node.name = this.jsxParseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + jsxParseElementName() { + const startLoc = this.state.startLoc; + let node = this.jsxParseNamespacedName(); + if (node.type === "JSXNamespacedName") { + return node; + } + while (this.eat(16)) { + const newNode = this.startNodeAt(startLoc); + newNode.object = node; + newNode.property = this.jsxParseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + return node; + } + jsxParseAttributeValue() { + let node; + switch (this.state.type) { + case 5: + node = this.startNode(); + this.setContext(types.brace); + this.next(); + node = this.jsxParseExpressionContainer(node, types.j_oTag); + if (node.expression.type === "JSXEmptyExpression") { + this.raise(JsxErrors.AttributeIsEmpty, node); + } + return node; + case 142: + case 133: + return this.parseExprAtom(); + default: + throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc); + } + } + jsxParseEmptyExpression() { + const node = this.startNodeAt(this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); + } + jsxParseSpreadChild(node) { + this.next(); + node.expression = this.parseExpression(); + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadChild"); + } + jsxParseExpressionContainer(node, previousContext) { + if (this.match(8)) { + node.expression = this.jsxParseEmptyExpression(); + } else { + const expression = this.parseExpression(); + node.expression = expression; + } + this.setContext(previousContext); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXExpressionContainer"); + } + jsxParseAttribute() { + const node = this.startNode(); + if (this.match(5)) { + this.setContext(types.brace); + this.next(); + this.expect(21); + node.argument = this.parseMaybeAssignAllowIn(); + this.setContext(types.j_oTag); + this.state.canStartJSXElement = true; + this.expect(8); + return this.finishNode(node, "JSXSpreadAttribute"); + } + node.name = this.jsxParseNamespacedName(); + node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + jsxParseOpeningElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { + return this.finishNode(node, "JSXOpeningFragment"); + } + node.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(node); + } + jsxParseOpeningElementAfterName(node) { + const attributes = []; + while (!this.match(56) && !this.match(143)) { + attributes.push(this.jsxParseAttribute()); + } + node.attributes = attributes; + node.selfClosing = this.eat(56); + this.expect(143); + return this.finishNode(node, "JSXOpeningElement"); + } + jsxParseClosingElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { + return this.finishNode(node, "JSXClosingFragment"); + } + node.name = this.jsxParseElementName(); + this.expect(143); + return this.finishNode(node, "JSXClosingElement"); + } + jsxParseElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + const children = []; + const openingElement = this.jsxParseOpeningElementAt(startLoc); + let closingElement = null; + if (!openingElement.selfClosing) { + contents: for (;;) { + switch (this.state.type) { + case 142: + startLoc = this.state.startLoc; + this.next(); + if (this.eat(56)) { + closingElement = this.jsxParseClosingElementAt(startLoc); + break contents; + } + children.push(this.jsxParseElementAt(startLoc)); + break; + case 141: + children.push(this.parseExprAtom()); + break; + case 5: + { + const node = this.startNode(); + this.setContext(types.brace); + this.next(); + if (this.match(21)) { + children.push(this.jsxParseSpreadChild(node)); + } else { + children.push(this.jsxParseExpressionContainer(node, types.j_expr)); + } + break; + } + default: + this.unexpected(); + } + } + if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { + this.raise(JsxErrors.MissingClosingTagFragment, closingElement); + } else if (!isFragment(openingElement) && isFragment(closingElement)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } else if (!isFragment(openingElement) && !isFragment(closingElement)) { + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + this.raise(JsxErrors.MissingClosingTagElement, closingElement, { + openingTagName: getQualifiedJSXName(openingElement.name) + }); + } + } + } + if (isFragment(openingElement)) { + node.openingFragment = openingElement; + node.closingFragment = closingElement; + } else { + node.openingElement = openingElement; + node.closingElement = closingElement; + } + node.children = children; + if (this.match(47)) { + throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, this.state.startLoc); + } + return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); + } + jsxParseElement() { + const startLoc = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(startLoc); + } + setContext(newContext) { + const { + context + } = this.state; + context[context.length - 1] = newContext; + } + parseExprAtom(refExpressionErrors) { + if (this.match(141)) { + return this.parseLiteral(this.state.value, "JSXText"); + } else if (this.match(142)) { + return this.jsxParseElement(); + } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { + this.replaceToken(142); + return this.jsxParseElement(); + } else { + return super.parseExprAtom(refExpressionErrors); + } + } + skipSpace() { + const curContext = this.curContext(); + if (!curContext.preserveSpace) super.skipSpace(); + } + getTokenFromCode(code) { + const context = this.curContext(); + if (context === types.j_expr) { + this.jsxReadToken(); + return; + } + if (context === types.j_oTag || context === types.j_cTag) { + if (isIdentifierStart(code)) { + this.jsxReadWord(); + return; + } + if (code === 62) { + ++this.state.pos; + this.finishToken(143); + return; + } + if ((code === 34 || code === 39) && context === types.j_oTag) { + this.jsxReadString(code); + return; + } + } + if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos; + this.finishToken(142); + return; + } + super.getTokenFromCode(code); + } + updateContext(prevType) { + const { + context, + type + } = this.state; + if (type === 56 && prevType === 142) { + context.splice(-2, 2, types.j_cTag); + this.state.canStartJSXElement = false; + } else if (type === 142) { + context.push(types.j_oTag); + } else if (type === 143) { + const out = context[context.length - 1]; + if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { + context.pop(); + this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; + } else { + this.setContext(types.j_expr); + this.state.canStartJSXElement = true; + } + } else { + this.state.canStartJSXElement = tokenComesBeforeExpression(type); + } + } +}; +class TypeScriptScope extends Scope { + constructor(...args) { + super(...args); + this.tsNames = new Map(); + } +} +class TypeScriptScopeHandler extends ScopeHandler { + constructor(...args) { + super(...args); + this.importsStack = []; + } + createScope(flags) { + this.importsStack.push(new Set()); + return new TypeScriptScope(flags); + } + enter(flags) { + if (flags == 256) { + this.importsStack.push(new Set()); + } + super.enter(flags); + } + exit() { + const flags = super.exit(); + if (flags == 256) { + this.importsStack.pop(); + } + return flags; + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].has(name)) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].has(name)) return true; + } + } + return false; + } + declareName(name, bindingType, loc) { + if (bindingType & 4096) { + if (this.hasImport(name, true)) { + this.parser.raise(Errors.VarRedeclaration, loc, { + identifierName: name + }); + } + this.importsStack[this.importsStack.length - 1].add(name); + return; + } + const scope = this.currentScope(); + let type = scope.tsNames.get(name) || 0; + if (bindingType & 1024) { + this.maybeExportDefined(scope, name); + scope.tsNames.set(name, type | 16); + return; + } + super.declareName(name, bindingType, loc); + if (bindingType & 2) { + if (!(bindingType & 1)) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + this.maybeExportDefined(scope, name); + } + type = type | 1; + } + if (bindingType & 256) { + type = type | 2; + } + if (bindingType & 512) { + type = type | 4; + } + if (bindingType & 128) { + type = type | 8; + } + if (type) scope.tsNames.set(name, type); + } + isRedeclaredInScope(scope, name, bindingType) { + const type = scope.tsNames.get(name); + if ((type & 2) > 0) { + if (bindingType & 256) { + const isConst = !!(bindingType & 512); + const wasConst = (type & 4) > 0; + return isConst !== wasConst; + } + return true; + } + if (bindingType & 128 && (type & 8) > 0) { + if (scope.names.get(name) & 2) { + return !!(bindingType & 1); + } else { + return false; + } + } + if (bindingType & 2 && (type & 1) > 0) { + return true; + } + return super.isRedeclaredInScope(scope, name, bindingType); + } + checkLocalExport(id) { + const { + name + } = id; + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + const type = scope.tsNames.get(name); + if ((type & 1) > 0 || (type & 16) > 0) { + return; + } + } + super.checkLocalExport(id); + } +} +const getOwn$1 = (object, key) => Object.hasOwnProperty.call(object, key) && object[key]; +const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; +}; +class LValParser extends NodeUtils { + toAssignable(node, isLHS = false) { + var _node$extra, _node$extra3; + let parenthesized = undefined; + if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { + parenthesized = unwrapParenthesizedExpression(node); + if (isLHS) { + if (parenthesized.type === "Identifier") { + this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node); + } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } else { + this.raise(Errors.InvalidParenthesizedAssignment, node); + } + } + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + case "ObjectExpression": + node.type = "ObjectPattern"; + for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { + var _node$extra2; + const prop = node.properties[i]; + const isLast = i === last; + this.toAssignableObjectExpressionProp(prop, isLast, isLHS); + if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc); + } + } + break; + case "ObjectProperty": + { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + break; + } + case "SpreadElement": + { + throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); + } + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); + break; + case "AssignmentExpression": + if (node.operator !== "=") { + this.raise(Errors.MissingEqInAssignment, node.left.loc.end); + } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isLHS); + break; + case "ParenthesizedExpression": + this.toAssignable(parenthesized, isLHS); + break; + } + } + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "ObjectMethod") { + this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, prop.key); + } else if (prop.type === "SpreadElement") { + prop.type = "RestElement"; + const arg = prop.argument; + this.checkToRestConversion(arg, false); + this.toAssignable(arg, isLHS); + if (!isLast) { + this.raise(Errors.RestTrailingComma, prop); + } + } else { + this.toAssignable(prop, isLHS); + } + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + const end = exprList.length - 1; + for (let i = 0; i <= end; i++) { + const elt = exprList[i]; + if (!elt) continue; + if (elt.type === "SpreadElement") { + elt.type = "RestElement"; + const arg = elt.argument; + this.checkToRestConversion(arg, true); + this.toAssignable(arg, isLHS); + } else { + this.toAssignable(elt, isLHS); + } + if (elt.type === "RestElement") { + if (i < end) { + this.raise(Errors.RestTrailingComma, elt); + } else if (trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, trailingCommaLoc); + } + } + } + } + isAssignable(node, isBinding) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": + { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every(element => element === null || this.isAssignable(element)); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + } + toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + for (const expr of exprList) { + if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + } + parseSpread(refExpressionErrors) { + const node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); + return this.finishNode(node, "SpreadElement"); + } + parseRestBinding() { + const node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 0: + { + const node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(3, 93, 1); + return this.finishNode(node, "ArrayPattern"); + } + case 5: + return this.parseObjectLike(8, true); + } + return this.parseIdentifier(); + } + parseBindingList(close, closeCharCode, flags) { + const allowEmpty = flags & 1; + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + } + if (allowEmpty && this.match(12)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(21)) { + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding(), flags)); + if (!this.checkCommaAfterRest(closeCharCode)) { + this.expect(close); + break; + } + } else { + const decorators = []; + if (this.match(26) && this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedParameterDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + elts.push(this.parseAssignableListItem(flags, decorators)); + } + } + return elts; + } + parseBindingRestProperty(prop) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(125); + return this.finishNode(prop, "RestElement"); + } + parseBindingProperty() { + const prop = this.startNode(); + const { + type, + startLoc + } = this.state; + if (type === 21) { + return this.parseBindingRestProperty(prop); + } else if (type === 138) { + this.expectPlugin("destructuringPrivate", startLoc); + this.classScope.usePrivateName(this.state.value, startLoc); + prop.key = this.parsePrivateName(); + } else { + this.parsePropertyName(prop); + } + prop.method = false; + return this.parseObjPropValue(prop, startLoc, false, false, true, false); + } + parseAssignableListItem(flags, decorators) { + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + parseAssignableListItemTypes(param, flags) { + return param; + } + parseMaybeDefault(startLoc, left) { + var _startLoc, _left; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + left = (_left = left) != null ? _left : this.parseBindingAtom(); + if (!this.eat(29)) return left; + const node = this.startNodeAt(startLoc); + node.left = left; + node.right = this.parseMaybeAssignAllowIn(); + return this.finishNode(node, "AssignmentPattern"); + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return getOwn$1({ + AssignmentPattern: "left", + RestElement: "argument", + ObjectProperty: "value", + ParenthesizedExpression: "expression", + ArrayPattern: "elements", + ObjectPattern: "properties" + }, type); + } + isOptionalMemberExpression(expression) { + return expression.type === "OptionalMemberExpression"; + } + checkLVal(expression, { + in: ancestor, + binding = 64, + checkClashes = false, + strictModeChanged = false, + hasParenthesizedAncestor = false + }) { + var _expression$extra; + const type = expression.type; + if (this.isObjectMethod(expression)) return; + const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); + if (isOptionalMemberExpression || type === "MemberExpression") { + if (isOptionalMemberExpression) { + this.expectPlugin("optionalChainingAssign", expression.loc.start); + if (ancestor.type !== "AssignmentExpression") { + this.raise(Errors.InvalidLhsOptionalChaining, expression, { + ancestor + }); + } + } + if (binding !== 64) { + this.raise(Errors.InvalidPropertyBindingPattern, expression); + } + return; + } + if (type === "Identifier") { + this.checkIdentifier(expression, binding, strictModeChanged); + const { + name + } = expression; + if (checkClashes) { + if (checkClashes.has(name)) { + this.raise(Errors.ParamDupe, expression); + } else { + checkClashes.add(name); + } + } + return; + } + const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); + if (validity === true) return; + if (validity === false) { + const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; + this.raise(ParseErrorClass, expression, { + ancestor + }); + return; + } + const [key, isParenthesizedExpression] = Array.isArray(validity) ? validity : [validity, type === "ParenthesizedExpression"]; + const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { + type + } : ancestor; + for (const child of [].concat(expression[key])) { + if (child) { + this.checkLVal(child, { + in: nextAncestor, + binding, + checkClashes, + strictModeChanged, + hasParenthesizedAncestor: isParenthesizedExpression + }); + } + } + } + checkIdentifier(at, bindingType, strictModeChanged = false) { + if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { + if (bindingType === 64) { + this.raise(Errors.StrictEvalArguments, at, { + referenceName: at.name + }); + } else { + this.raise(Errors.StrictEvalArgumentsBinding, at, { + bindingName: at.name + }); + } + } + if (bindingType & 8192 && at.name === "let") { + this.raise(Errors.LetInLexicalBinding, at); + } + if (!(bindingType & 64)) { + this.declareNameFromIdentifier(at, bindingType); + } + } + declareNameFromIdentifier(identifier, binding) { + this.scope.declareName(identifier.name, binding, identifier.loc.start); + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "ParenthesizedExpression": + this.checkToRestConversion(node.expression, allowPattern); + break; + case "Identifier": + case "MemberExpression": + break; + case "ArrayExpression": + case "ObjectExpression": + if (allowPattern) break; + default: + this.raise(Errors.InvalidRestAssignmentPattern, node); + } + } + checkCommaAfterRest(close) { + if (!this.match(12)) { + return false; + } + this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc); + return true; + } +} +const getOwn = (object, key) => Object.hasOwnProperty.call(object, key) && object[key]; +function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + return x; +} +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} +const TSErrors = ParseErrorEnum`typescript`({ + AbstractMethodHasImplementation: ({ + methodName + }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ + propertyName + }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, + AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ + kind + }) => `'declare' is not allowed in ${kind}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ({ + modifier + }) => `Accessibility modifier already seen.`, + DuplicateModifier: ({ + modifier + }) => `Duplicate modifier: '${modifier}'.`, + EmptyHeritageClauseType: ({ + token + }) => `'${token}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", + IncompatibleModifiers: ({ + modifiers + }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ + modifier + }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ + modifier + }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ + orderedModifiers + }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. " + "You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ + modifier + }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ + typeParameterName + }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ + type + }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` +}); +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + case "boolean": + return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; + case "never": + return "TSNeverKeyword"; + case "number": + return "TSNumberKeyword"; + case "object": + return "TSObjectKeyword"; + case "string": + return "TSStringKeyword"; + case "symbol": + return "TSSymbolKeyword"; + case "undefined": + return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; + default: + return undefined; + } +} +function tsIsAccessModifier(modifier) { + return modifier === "private" || modifier === "public" || modifier === "protected"; +} +function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; +} +var typescript = superClass => class TypeScriptParserMixin extends superClass { + constructor(...args) { + super(...args); + this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out"], + disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + this.tsParseConstModifier = this.tsParseModifiers.bind(this, { + allowedModifiers: ["const"], + disallowedModifiers: ["in", "out"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }); + this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out", "const"], + disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + } + getScopeHandler() { + return TypeScriptScopeHandler; + } + tsIsIdentifier() { + return tokenIsIdentifier(this.state.type); + } + tsTokenCanFollowModifier() { + return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + } + tsNextTokenCanFollowModifier() { + this.next(); + return this.tsTokenCanFollowModifier(); + } + tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { + if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { + return undefined; + } + const modifier = this.state.value; + if (allowedModifiers.indexOf(modifier) !== -1) { + if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { + return undefined; + } + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + } + return undefined; + } + tsParseModifiers({ + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TSErrors.InvalidModifierOnTypeMember + }, modified) { + const enforceOrder = (loc, modifier, before, after) => { + if (modifier === before && modified[after]) { + this.raise(TSErrors.InvalidModifiersOrder, loc, { + orderedModifiers: [before, after] + }); + } + }; + const incompatible = (loc, modifier, mod1, mod2) => { + if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { + this.raise(TSErrors.IncompatibleModifiers, loc, { + modifiers: [mod1, mod2] + }); + } + }; + for (;;) { + const { + startLoc + } = this.state; + const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); + if (!modifier) break; + if (tsIsAccessModifier(modifier)) { + if (modified.accessibility) { + this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); + modified.accessibility = modifier; + } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } + modified[modifier] = true; + enforceOrder(startLoc, modifier, "in", "out"); + } else { + if (Object.hasOwnProperty.call(modified, modifier)) { + this.raise(TSErrors.DuplicateModifier, startLoc, { + modifier + }); + } else { + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); + } + modified[modifier] = true; + } + if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { + this.raise(errorTemplate, startLoc, { + modifier + }); + } + } + } + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(8); + case "HeritageClauseElement": + return this.match(5); + case "TupleElementTypes": + return this.match(3); + case "TypeParametersOrArguments": + return this.match(48); + } + } + tsParseList(kind, parseElement) { + const result = []; + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + return result; + } + tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { + return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); + } + tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { + const result = []; + let trailingCommaPos = -1; + for (;;) { + if (this.tsIsListTerminator(kind)) { + break; + } + trailingCommaPos = -1; + const element = parseElement(); + if (element == null) { + return undefined; + } + result.push(element); + if (this.eat(12)) { + trailingCommaPos = this.state.lastTokStartLoc.index; + continue; + } + if (this.tsIsListTerminator(kind)) { + break; + } + if (expectSuccess) { + this.expect(12); + } + return undefined; + } + if (refTrailingCommaPos) { + refTrailingCommaPos.value = trailingCommaPos; + } + return result; + } + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { + if (!skipFirstToken) { + if (bracket) { + this.expect(0); + } else { + this.expect(47); + } + } + const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); + if (bracket) { + this.expect(3); + } else { + this.expect(48); + } + return result; + } + tsParseImportType() { + const node = this.startNode(); + this.expect(83); + this.expect(10); + if (!this.match(133)) { + this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc); + } + node.argument = super.parseExprAtom(); + this.expect(11); + if (this.eat(16)) { + node.qualifier = this.tsParseEntityName(); + } + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSImportType"); + } + tsParseEntityName(allowReservedWords = true) { + let entity = this.parseIdentifier(allowReservedWords); + while (this.eat(16)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdentifier(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + return entity; + } + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(); + if (!this.hasPrecedingLineBreak() && this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeReference"); + } + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation(false); + node.asserts = false; + return this.finishNode(node, "TSTypePredicate"); + } + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(87); + if (this.match(83)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(); + } + if (!this.hasPrecedingLineBreak() && this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeQuery"); + } + tsParseTypeParameter(parseModifiers) { + const node = this.startNode(); + parseModifiers(node); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsEatThenParseType(81); + node.default = this.tsEatThenParseType(29); + return this.finishNode(node, "TSTypeParameter"); + } + tsTryParseTypeParameters(parseModifiers) { + if (this.match(47)) { + return this.tsParseTypeParameters(parseModifiers); + } + } + tsParseTypeParameters(parseModifiers) { + const node = this.startNode(); + if (this.match(47) || this.match(142)) { + this.next(); + } else { + this.unexpected(); + } + const refTrailingCommaPos = { + value: -1 + }; + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeParameters, node); + } + if (refTrailingCommaPos.value !== -1) { + this.addExtra(node, "trailingComma", refTrailingCommaPos.value); + } + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === 19; + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + this.expect(10); + signature[paramsKey] = this.tsParseBindingListForSignature(); + if (returnTokenRequired) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + tsParseBindingListForSignature() { + const list = super.parseBindingList(11, 41, 2); + for (const pattern of list) { + const { + type + } = pattern; + if (type === "AssignmentPattern" || type === "TSParameterProperty") { + this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, { + type + }); + } + } + return list; + } + tsParseTypeMemberSemicolon() { + if (!this.eat(12) && !this.isLineTerminator()) { + this.expect(13); + } + } + tsParseSignatureMember(kind, node) { + this.tsFillSignature(14, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + if (tokenIsIdentifier(this.state.type)) { + this.next(); + return this.match(14); + } + return false; + } + tsTryParseIndexSignature(node) { + if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return; + } + this.expect(0); + const id = this.parseIdentifier(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(3); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(17)) node.optional = true; + const nodeAny = node; + if (this.match(10) || this.match(47)) { + if (readonly) { + this.raise(TSErrors.ReadonlyForMethodSignature, node); + } + const method = nodeAny; + if (method.kind && this.match(47)) { + this.raise(TSErrors.AccesorCannotHaveTypeParameters, this.state.curPosition()); + } + this.tsFillSignature(14, method); + this.tsParseTypeMemberSemicolon(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + if (method.kind === "get") { + if (method[paramsKey].length > 0) { + this.raise(Errors.BadGetterArity, this.state.curPosition()); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + } + } + } else if (method.kind === "set") { + if (method[paramsKey].length !== 1) { + this.raise(Errors.BadSetterArity, this.state.curPosition()); + } else { + const firstParameter = method[paramsKey][0]; + if (this.isThisParam(firstParameter)) { + this.raise(TSErrors.AccesorCannotDeclareThisParameter, this.state.curPosition()); + } + if (firstParameter.type === "Identifier" && firstParameter.optional) { + this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, this.state.curPosition()); + } + if (firstParameter.type === "RestElement") { + this.raise(TSErrors.SetAccesorCannotHaveRestParameter, this.state.curPosition()); + } + } + if (method[returnTypeKey]) { + this.raise(TSErrors.SetAccesorCannotHaveReturnType, method[returnTypeKey]); + } + } else { + method.kind = "method"; + } + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const node = this.startNode(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + if (this.match(77)) { + const id = this.startNode(); + this.next(); + if (this.match(10) || this.match(47)) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + this.tsParseModifiers({ + allowedModifiers: ["readonly"], + disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] + }, node); + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + return idx; + } + super.parsePropertyName(node); + if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { + node.kind = node.key.name; + super.parsePropertyName(node); + } + return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); + } + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + tsParseObjectTypeMembers() { + this.expect(5); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(8); + return members; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(53)) { + return this.isContextual(122); + } + if (this.isContextual(122)) { + this.next(); + } + if (!this.match(0)) { + return false; + } + this.next(); + if (!this.tsIsIdentifier()) { + return false; + } + this.next(); + return this.match(58); + } + tsParseMappedTypeParameter() { + const node = this.startNode(); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsExpectThenParseType(58); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseMappedType() { + const node = this.startNode(); + this.expect(5); + if (this.match(53)) { + node.readonly = this.state.value; + this.next(); + this.expectContextual(122); + } else if (this.eatContextual(122)) { + node.readonly = true; + } + this.expect(0); + node.typeParameter = this.tsParseMappedTypeParameter(); + node.nameType = this.eatContextual(93) ? this.tsParseType() : null; + this.expect(3); + if (this.match(53)) { + node.optional = this.state.value; + this.next(); + this.expect(17); + } else if (this.eat(17)) { + node.optional = true; + } + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(8); + return this.finishNode(node, "TSMappedType"); + } + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); + let seenOptionalElement = false; + node.elementTypes.forEach(elementNode => { + const { + type + } = elementNode; + if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { + this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode); + } + seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); + }); + return this.finishNode(node, "TSTupleType"); + } + tsParseTupleElementType() { + const { + startLoc + } = this.state; + const rest = this.eat(21); + let labeled; + let label; + let optional; + let type; + const isWord = tokenIsKeywordOrIdentifier(this.state.type); + const chAfterWord = isWord ? this.lookaheadCharCode() : null; + if (chAfterWord === 58) { + labeled = true; + optional = false; + label = this.parseIdentifier(true); + this.expect(14); + type = this.tsParseType(); + } else if (chAfterWord === 63) { + optional = true; + const startLoc = this.state.startLoc; + const wordName = this.state.value; + const typeOrLabel = this.tsParseNonArrayType(); + if (this.lookaheadCharCode() === 58) { + labeled = true; + label = this.createIdentifier(this.startNodeAt(startLoc), wordName); + this.expect(17); + this.expect(14); + type = this.tsParseType(); + } else { + labeled = false; + type = typeOrLabel; + this.expect(17); + } + } else { + type = this.tsParseType(); + optional = this.eat(17); + labeled = this.eat(14); + } + if (labeled) { + let labeledNode; + if (label) { + labeledNode = this.startNodeAtNode(label); + labeledNode.optional = optional; + labeledNode.label = label; + labeledNode.elementType = type; + if (this.eat(17)) { + labeledNode.optional = true; + this.raise(TSErrors.TupleOptionalAfterType, this.state.lastTokStartLoc); + } + } else { + labeledNode = this.startNodeAtNode(type); + labeledNode.optional = optional; + this.raise(TSErrors.InvalidTupleMemberLabel, type); + labeledNode.label = type; + labeledNode.elementType = this.tsParseType(); + } + type = this.finishNode(labeledNode, "TSNamedTupleMember"); + } else if (optional) { + const optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + type = this.finishNode(optionalTypeNode, "TSOptionalType"); + } + if (rest) { + const restNode = this.startNodeAt(startLoc); + restNode.typeAnnotation = type; + type = this.finishNode(restNode, "TSRestType"); + } + return type; + } + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(10); + node.typeAnnotation = this.tsParseType(); + this.expect(11); + return this.finishNode(node, "TSParenthesizedType"); + } + tsParseFunctionOrConstructorType(type, abstract) { + const node = this.startNode(); + if (type === "TSConstructorType") { + node.abstract = !!abstract; + if (abstract) this.next(); + this.next(); + } + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); + return this.finishNode(node, type); + } + tsParseLiteralTypeNode() { + const node = this.startNode(); + switch (this.state.type) { + case 134: + case 135: + case 133: + case 85: + case 86: + node.literal = super.parseExprAtom(); + break; + default: + this.unexpected(); + } + return this.finishNode(node, "TSLiteralType"); + } + tsParseTemplateLiteralType() { + const node = this.startNode(); + node.literal = super.parseTemplate(false); + return this.finishNode(node, "TSLiteralType"); + } + parseTemplateSubstitution() { + if (this.state.inType) return this.tsParseType(); + return super.parseTemplateSubstitution(); + } + tsParseThisTypeOrThisTypePredicate() { + const thisKeyword = this.tsParseThisTypeNode(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + tsParseNonArrayType() { + switch (this.state.type) { + case 133: + case 134: + case 135: + case 85: + case 86: + return this.tsParseLiteralTypeNode(); + case 53: + if (this.state.value === "-") { + const node = this.startNode(); + const nextToken = this.lookahead(); + if (nextToken.type !== 134 && nextToken.type !== 135) { + this.unexpected(); + } + node.literal = this.parseMaybeUnary(); + return this.finishNode(node, "TSLiteralType"); + } + break; + case 78: + return this.tsParseThisTypeOrThisTypePredicate(); + case 87: + return this.tsParseTypeQuery(); + case 83: + return this.tsParseImportType(); + case 5: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case 0: + return this.tsParseTupleType(); + case 10: + return this.tsParseParenthesizedType(); + case 25: + case 24: + return this.tsParseTemplateLiteralType(); + default: + { + const { + type + } = this.state; + if (tokenIsIdentifier(type) || type === 88 || type === 84) { + const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); + if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, nodeType); + } + return this.tsParseTypeReference(); + } + } + } + this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let type = this.tsParseNonArrayType(); + while (!this.hasPrecedingLineBreak() && this.eat(0)) { + if (this.match(3)) { + const node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(3); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAtNode(type); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(3); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + return type; + } + tsParseTypeOperator() { + const node = this.startNode(); + const operator = this.state.value; + this.next(); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + return this.finishNode(node, "TSTypeOperator"); + } + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + default: + this.raise(TSErrors.UnexpectedReadonly, node); + } + } + tsParseInferType() { + const node = this.startNode(); + this.expectContextual(115); + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + tsParseConstraintForInferType() { + if (this.eat(81)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { + return constraint; + } + } + } + tsParseTypeOperatorOrHigher() { + const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + const node = this.startNode(); + const hasLeadingOperator = this.eat(operator); + const types = []; + do { + types.push(parseConstituentType()); + } while (this.eat(operator)); + if (types.length === 1 && !hasLeadingOperator) { + return types[0]; + } + node.types = types; + return this.finishNode(node, kind); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); + } + tsIsStartOfFunctionType() { + if (this.match(47)) { + return true; + } + return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsSkipParameterStart() { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + this.next(); + return true; + } + if (this.match(5)) { + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + this.parseObjectLike(8, true); + return errors.length === previousErrorCount; + } catch (_unused) { + return false; + } + } + if (this.match(0)) { + this.next(); + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + super.parseBindingList(3, 93, 1); + return errors.length === previousErrorCount; + } catch (_unused2) { + return false; + } + } + return false; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(11) || this.match(21)) { + return true; + } + if (this.tsSkipParameterStart()) { + if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { + return true; + } + if (this.match(11)) { + this.next(); + if (this.match(19)) { + return true; + } + } + } + return false; + } + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const node = this.startNode(); + const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (asserts && this.match(78)) { + let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); + if (thisTypePredicate.type === "TSThisType") { + node.parameterName = thisTypePredicate; + node.asserts = true; + node.typeAnnotation = null; + thisTypePredicate = this.finishNode(node, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(thisTypePredicate, node); + thisTypePredicate.asserts = true; + } + t.typeAnnotation = thisTypePredicate; + return this.finishNode(t, "TSTypeAnnotation"); + } + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!typePredicateVariable) { + if (!asserts) { + return this.tsParseTypeAnnotation(false, t); + } + node.parameterName = this.parseIdentifier(); + node.asserts = asserts; + node.typeAnnotation = null; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const type = this.tsParseTypeAnnotation(false); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + node.asserts = asserts; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + tsTryParseTypeOrTypePredicateAnnotation() { + if (this.match(14)) { + return this.tsParseTypeOrTypePredicateAnnotation(14); + } + } + tsTryParseTypeAnnotation() { + if (this.match(14)) { + return this.tsParseTypeAnnotation(); + } + } + tsTryParseType() { + return this.tsEatThenParseType(14); + } + tsParseTypePredicatePrefix() { + const id = this.parseIdentifier(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + tsParseTypePredicateAsserts() { + if (this.state.type !== 109) { + return false; + } + const containsEsc = this.state.containsEsc; + this.next(); + if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { + return false; + } + if (containsEsc) { + this.raise(Errors.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { + reservedWord: "asserts" + }); + } + return true; + } + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(14); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseType() { + assert(this.state.inType); + const type = this.tsParseNonConditionalType(); + if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { + return type; + } + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); + this.expect(17); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + this.expect(14); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + return this.finishNode(node, "TSConditionalType"); + } + isAbstractConstructorSignature() { + return this.isContextual(124) && this.lookahead().type === 77; + } + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + if (this.match(77)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } else if (this.isAbstractConstructorSignature()) { + return this.tsParseFunctionOrConstructorType("TSConstructorType", true); + } + return this.tsParseUnionTypeOrHigher(); + } + tsParseTypeAssertion() { + if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc); + } + const node = this.startNode(); + node.typeAnnotation = this.tsInType(() => { + this.next(); + return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); + }); + this.expect(48); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + } + tsParseHeritageClause(token) { + const originalStartLoc = this.state.startLoc; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + node.expression = this.tsParseEntityName(); + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }); + if (!delimitedList.length) { + this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, { + token + }); + } + return delimitedList; + } + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual(129); + if (properties.declare) node.declare = true; + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 130); + } else { + node.id = null; + this.raise(TSErrors.MissingInterfaceName, this.state.startLoc); + } + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (this.eat(81)) { + node.extends = this.tsParseHeritageClause("extends"); + } + const body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, 2); + node.typeAnnotation = this.tsInType(() => { + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); + this.expect(29); + if (this.isContextual(114) && this.lookahead().type !== 16) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + tsInNoContext(cb) { + const oldContext = this.state.context; + this.state.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.state.context = oldContext; + } + } + tsInType(cb) { + const oldInType = this.state.inType; + this.state.inType = true; + try { + return cb(); + } finally { + this.state.inType = oldInType; + } + } + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsEatThenParseType(token) { + if (this.match(token)) { + return this.tsNextThenParseType(); + } + } + tsExpectThenParseType(token) { + return this.tsInType(() => { + this.expect(token); + return this.tsParseType(); + }); + } + tsNextThenParseType() { + return this.tsInType(() => { + this.next(); + return this.tsParseType(); + }); + } + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(133) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); + if (this.eat(29)) { + node.initializer = super.parseMaybeAssignAllowIn(); + } + return this.finishNode(node, "TSEnumMember"); + } + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual(126); + node.id = this.parseIdentifier(); + this.checkIdentifier(node.id, node.const ? 8971 : 8459); + this.expect(5); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(8); + return this.finishNode(node, "TSEnumDeclaration"); + } + tsParseModuleBlock() { + const node = this.startNode(); + this.scope.enter(0); + this.expect(5); + super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); + this.scope.exit(); + return this.finishNode(node, "TSModuleBlock"); + } + tsParseModuleOrNamespaceDeclaration(node, nested = false) { + node.id = this.parseIdentifier(); + if (!nested) { + this.checkIdentifier(node.id, 1024); + } + if (this.eat(16)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseAmbientExternalModuleDeclaration(node) { + if (this.isContextual(112)) { + node.global = true; + node.id = this.parseIdentifier(); + } else if (this.match(133)) { + node.id = super.parseStringLiteral(this.state.value); + } else { + this.unexpected(); + } + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + node.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } else { + this.semicolon(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { + node.isExport = isExport || false; + node.id = maybeDefaultIdentifier || this.parseIdentifier(); + this.checkIdentifier(node.id, 4096); + this.expect(29); + const moduleReference = this.tsParseModuleReference(); + if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { + this.raise(TSErrors.ImportAliasHasImportType, moduleReference); + } + node.moduleReference = moduleReference; + this.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + tsIsExternalModuleReference() { + return this.isContextual(119) && this.lookaheadCharCode() === 40; + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); + } + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual(119); + this.expect(10); + if (!this.match(133)) { + this.unexpected(); + } + node.expression = super.parseExprAtom(); + this.expect(11); + this.sawUnambiguousESM = true; + return this.finishNode(node, "TSExternalModuleReference"); + } + tsLookAhead(f) { + const state = this.state.clone(); + const res = f(); + this.state = state; + return res; + } + tsTryParseAndCatch(f) { + const result = this.tryParse(abort => f() || abort()); + if (result.aborted || !result.node) return; + if (result.error) this.state = result.failState; + return result.node; + } + tsTryParse(f) { + const state = this.state.clone(); + const result = f(); + if (result !== undefined && result !== false) { + return result; + } + this.state = state; + } + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + let startType = this.state.type; + let kind; + if (this.isContextual(100)) { + startType = 74; + kind = "let"; + } + return this.tsInAmbientContext(() => { + switch (startType) { + case 68: + nany.declare = true; + return super.parseFunctionStatement(nany, false, false); + case 80: + nany.declare = true; + return this.parseClass(nany, true, false); + case 126: + return this.tsParseEnumDeclaration(nany, { + declare: true + }); + case 112: + return this.tsParseAmbientExternalModuleDeclaration(nany); + case 75: + case 74: + if (!this.match(75) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.state.value, true); + } + this.expect(75); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + case 129: + { + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + default: + if (tokenIsIdentifier(startType)) { + return this.tsParseDeclaration(nany, this.state.value, true, null); + } + } + }); + } + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); + } + tsParseExpressionStatement(node, expr, decorators) { + switch (expr.name) { + case "declare": + { + const declaration = this.tsTryParseDeclare(node); + if (declaration) { + declaration.declare = true; + } + return declaration; + } + case "global": + if (this.match(5)) { + this.scope.enter(256); + this.prodParam.enter(0); + const mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + this.scope.exit(); + this.prodParam.exit(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + break; + default: + return this.tsParseDeclaration(node, expr.name, false, decorators); + } + } + tsParseDeclaration(node, value, next, decorators) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { + return this.tsParseAbstractDeclaration(node, decorators); + } + break; + case "module": + if (this.tsCheckLineTerminator(next)) { + if (this.match(133)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (tokenIsIdentifier(this.state.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + } + break; + case "namespace": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + break; + case "type": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { + return this.tsParseTypeAliasDeclaration(node); + } + break; + } + } + tsCheckLineTerminator(next) { + if (next) { + if (this.hasFollowingLineBreak()) return false; + this.next(); + return true; + } + return !this.isLineTerminator(); + } + tsTryParseGenericAsyncArrowFunction(startLoc) { + if (!this.match(47)) return; + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = true; + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(19); + return node; + }); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + if (!res) return; + return super.parseArrowExpression(res, null, true); + } + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== 47) return; + return this.tsParseTypeArguments(); + } + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType(() => this.tsInNoContext(() => { + this.expect(47); + return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); + })); + if (node.params.length === 0) { + this.raise(TSErrors.EmptyTypeArguments, node); + } else if (!this.state.inType && this.curContext() === types.brace) { + this.reScan_lt_gt(); + } + this.expect(48); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + tsIsDeclarationStart() { + return tokenIsTSDeclarationStart(this.state.type); + } + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + return super.isExportDefaultSpecifier(); + } + parseAssignableListItem(flags, decorators) { + const startLoc = this.state.startLoc; + const modified = {}; + this.tsParseModifiers({ + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }, modified); + const accessibility = modified.accessibility; + const override = modified.override; + const readonly = modified.readonly; + if (!(flags & 4) && (accessibility || readonly || override)) { + this.raise(TSErrors.UnexpectedParameterModifier, startLoc); + } + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); + if (accessibility || readonly || override) { + const pp = this.startNodeAt(startLoc); + if (decorators.length) { + pp.decorators = decorators; + } + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + if (override) pp.override = override; + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + this.raise(TSErrors.UnsupportedParameterPropertyKind, pp); + } + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + isSimpleParameter(node) { + return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); + } + tsDisallowOptionalPattern(node) { + for (const param of node.params) { + if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { + this.raise(TSErrors.PatternIsOptional, param); + } + } + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + super.setArrowFunctionParameters(node, params, trailingCommaLoc); + this.tsDisallowOptionalPattern(node); + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(14)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + } + const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; + if (bodilessType && !this.match(5) && this.isLineTerminator()) { + return this.finishNode(node, bodilessType); + } + if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { + this.raise(TSErrors.DeclareFunctionHasImplementation, node); + if (node.declare) { + return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); + } + } + this.tsDisallowOptionalPattern(node); + return super.parseFunctionBodyAndFinish(node, type, isMethod); + } + registerFunctionStatementId(node) { + if (!node.body && node.id) { + this.checkIdentifier(node.id, 1024); + } else { + super.registerFunctionStatementId(node); + } + } + tsCheckForInvalidTypeCasts(items) { + items.forEach(node => { + if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { + this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation); + } + }); + } + toReferencedList(exprList, isInParens) { + this.tsCheckForInvalidTypeCasts(exprList); + return exprList; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); + if (node.type === "ArrayExpression") { + this.tsCheckForInvalidTypeCasts(node.elements); + } + return node; + } + parseSubscript(base, startLoc, noCalls, state) { + if (!this.hasPrecedingLineBreak() && this.match(35)) { + this.state.canStartJSXElement = false; + this.next(); + const nonNullExpression = this.startNodeAt(startLoc); + nonNullExpression.expression = base; + return this.finishNode(nonNullExpression, "TSNonNullExpression"); + } + let isOptionalCall = false; + if (this.match(18) && this.lookaheadCharCode() === 60) { + if (noCalls) { + state.stop = true; + return base; + } + state.optionalChainMember = isOptionalCall = true; + this.next(); + } + if (this.match(47) || this.match(51)) { + let missingParenErrorLoc; + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsyncArrow(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); + if (asyncArrowFn) { + return asyncArrowFn; + } + } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return; + if (isOptionalCall && !this.match(10)) { + missingParenErrorLoc = this.state.curPosition(); + return; + } + if (tokenIsTemplate(this.state.type)) { + const result = super.parseTaggedTemplateExpression(base, startLoc, state); + result.typeParameters = typeArguments; + return result; + } + if (!noCalls && this.eat(10)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(11, false); + this.tsCheckForInvalidTypeCasts(node.arguments); + node.typeParameters = typeArguments; + if (state.optionalChainMember) { + node.optional = isOptionalCall; + } + return this.finishCallExpression(node, state.optionalChainMember); + } + const tokenType = this.state.type; + if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { + return; + } + const node = this.startNodeAt(startLoc); + node.expression = base; + node.typeParameters = typeArguments; + return this.finishNode(node, "TSInstantiationExpression"); + }); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc, 10); + } + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { + this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc); + } + return result; + } + } + return super.parseSubscript(base, startLoc, noCalls, state); + } + parseNewCallee(node) { + var _callee$extra; + super.parseNewCallee(node); + const { + callee + } = node; + if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { + node.typeParameters = callee.typeParameters; + node.callee = callee.expression; + } + } + parseExprOp(left, leftStartLoc, minPrec) { + let isSatisfies; + if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { + const node = this.startNodeAt(leftStartLoc); + node.expression = left; + node.typeAnnotation = this.tsInType(() => { + this.next(); + if (this.match(75)) { + if (isSatisfies) { + this.raise(Errors.UnexpectedKeyword, this.state.startLoc, { + keyword: "const" + }); + } + return this.tsParseTypeReference(); + } + return this.tsParseType(); + }); + this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartLoc, minPrec); + } + return super.parseExprOp(left, leftStartLoc, minPrec); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (!this.state.isAmbientContext) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(TSErrors.ImportReflectionHasImportType, node.specifiers[0].loc.start); + } + } + checkDuplicateExports() {} + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + const ch = this.lookaheadCharCode(); + return isExport ? ch === 123 || ch === 42 : ch !== 61; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + node.exportKind = phase === "type" ? "type" : "value"; + } else { + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImport(node) { + if (this.match(133)) { + node.importKind = "value"; + return super.parseImport(node); + } + let importNode; + if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { + node.importKind = "value"; + return this.tsParseImportEqualsDeclaration(node); + } else if (this.isContextual(130)) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + if (this.lookaheadCharCode() === 61) { + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); + } else { + importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); + } + } else { + importNode = super.parseImport(node); + } + if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { + this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode); + } + return importNode; + } + parseExport(node, decorators) { + if (this.match(83)) { + this.next(); + let maybeDefaultIdentifier = null; + if (this.isContextual(130) && this.isPotentialImportPhase(false)) { + maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + } else { + node.importKind = "value"; + } + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, true); + } else if (this.eat(29)) { + const assign = node; + assign.expression = super.parseExpression(); + this.semicolon(); + this.sawUnambiguousESM = true; + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.eatContextual(93)) { + const decl = node; + this.expectContextual(128); + decl.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + return super.parseExport(node, decorators); + } + } + isAbstractClass() { + return this.isContextual(124) && this.lookahead().type === 80; + } + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + cls.abstract = true; + return this.parseClass(cls, true, true); + } + if (this.match(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseExportDefaultExpression(); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { + isAmbientContext + } = this.state; + const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); + if (!isAmbientContext) return declaration; + for (const { + id, + init + } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init); + } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { + this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, init); + } + } + return declaration; + } + parseStatementContent(flags, decorators) { + if (this.match(75) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(75); + return this.tsParseEnumDeclaration(node, { + const: true + }); + } + if (this.isContextual(126)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.isContextual(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatementContent(flags, decorators); + } + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + tsHasSomeModifiers(member, modifiers) { + return modifiers.some(modifier => { + if (tsIsAccessModifier(modifier)) { + return member.accessibility === modifier; + } + return !!member[modifier]; + }); + } + tsIsStartOfStaticBlocks() { + return this.isContextual(106) && this.lookaheadCharCode() === 123; + } + parseClassMember(classBody, member, state) { + const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; + this.tsParseModifiers({ + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }, member); + const callParseClassMemberWithIsStatic = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + if (this.tsHasSomeModifiers(member, modifiers)) { + this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition()); + } + super.parseClassStaticBlock(classBody, member); + } else { + this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); + } + }; + if (member.declare) { + this.tsInAmbientContext(callParseClassMemberWithIsStatic); + } else { + callParseClassMemberWithIsStatic(); + } + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const idx = this.tsTryParseIndexSignature(member); + if (idx) { + classBody.body.push(idx); + if (member.abstract) { + this.raise(TSErrors.IndexSignatureHasAbstract, member); + } + if (member.accessibility) { + this.raise(TSErrors.IndexSignatureHasAccessibility, member, { + modifier: member.accessibility + }); + } + if (member.declare) { + this.raise(TSErrors.IndexSignatureHasDeclare, member); + } + if (member.override) { + this.raise(TSErrors.IndexSignatureHasOverride, member); + } + return; + } + if (!this.state.inAbstractClass && member.abstract) { + this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member); + } + if (member.override) { + if (!state.hadSuperClass) { + this.raise(TSErrors.OverrideNotInSubClass, member); + } + } + super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(17); + if (optional) methodOrProp.optional = true; + if (methodOrProp.readonly && this.match(10)) { + this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp); + } + if (methodOrProp.declare && this.match(10)) { + this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp); + } + } + parseExpressionStatement(node, expr, decorators) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; + return decl || super.parseExpressionStatement(node, expr, decorators); + } + shouldParseExportDeclaration() { + if (this.tsIsDeclarationStart()) return true; + return super.shouldParseExportDeclaration(); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (!this.state.maybeInArrowParameters || !this.match(17)) { + return super.parseConditional(expr, startLoc, refExpressionErrors); + } + const result = this.tryParse(() => super.parseConditional(expr, startLoc)); + if (!result.node) { + if (result.error) { + super.setOptionalParametersError(refExpressionErrors, result.error); + } + return expr; + } + if (result.error) this.state = result.failState; + return result.node; + } + parseParenItem(node, startLoc) { + node = super.parseParenItem(node, startLoc); + if (this.eat(17)) { + node.optional = true; + this.resetEndLocation(node); + } + if (this.match(14)) { + const typeCastNode = this.startNodeAt(startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + return node; + } + parseExportDeclaration(node) { + if (!this.state.isAmbientContext && this.isContextual(125)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } + const startLoc = this.state.startLoc; + const isDeclare = this.eatContextual(125); + if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { + throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, this.state.startLoc); + } + const isIdentifier = tokenIsIdentifier(this.state.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { + node.exportKind = "type"; + } + if (isDeclare) { + this.resetStartLocation(declaration, startLoc); + declaration.declare = true; + } + return declaration; + } + parseClassId(node, isStatement, optionalId, bindingType) { + if ((!isStatement || optionalId) && this.isContextual(113)) { + return; + } + super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (typeParameters) node.typeParameters = typeParameters; + } + parseClassPropertyAnnotation(node) { + if (!node.optional) { + if (this.eat(35)) { + node.definite = true; + } else if (this.eat(17)) { + node.optional = true; + } + } + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + } + parseClassProperty(node) { + this.parseClassPropertyAnnotation(node); + if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { + this.raise(TSErrors.DeclareClassFieldHasInitializer, this.state.startLoc); + } + if (node.abstract && this.match(29)) { + const { + key + } = node; + this.raise(TSErrors.AbstractPropertyHasInitializer, this.state.startLoc, { + propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); + } + return super.parseClassProperty(node); + } + parseClassPrivateProperty(node) { + if (node.abstract) { + this.raise(TSErrors.PrivateElementHasAbstract, node); + } + if (node.accessibility) { + this.raise(TSErrors.PrivateElementHasAccessibility, node, { + modifier: node.accessibility + }); + } + this.parseClassPropertyAnnotation(node); + return super.parseClassPrivateProperty(node); + } + parseClassAccessorProperty(node) { + this.parseClassPropertyAnnotation(node); + if (node.optional) { + this.raise(TSErrors.AccessorCannotBeOptional, node); + } + return super.parseClassAccessorProperty(node); + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters && isConstructor) { + this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters); + } + const { + declare = false, + kind + } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(TSErrors.DeclareAccessor, method, { + kind + }); + } + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + declareClassPrivateMethodInScope(node, kind) { + if (node.type === "TSDeclareMethod") return; + if (node.type === "MethodDefinition" && !node.value.body) return; + super.declareClassPrivateMethodInScope(node, kind); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.match(47) || this.match(51))) { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); + } + if (this.eatContextual(113)) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) prop.typeParameters = typeParameters; + return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); + } + parseFunctionParams(node, isConstructor) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node, isConstructor); + } + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { + decl.definite = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + } + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(14)) { + node.returnType = this.tsParseTypeAnnotation(); + } + return super.parseAsyncArrowFromCallExpression(node, call); + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; + let state; + let jsx; + let typeCast; + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { + state = this.state.clone(); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!jsx.error) return jsx.node; + const { + context + } = this.state; + const currentContext = context[context.length - 1]; + if (currentContext === types.j_oTag || currentContext === types.j_expr) { + context.pop(); + } + } + if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + } + if (!state || state === this.state) state = this.state.clone(); + let typeParameters; + const arrow = this.tryParse(abort => { + var _expr$extra, _typeParameters; + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); + if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + abort(); + } + if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { + this.resetStartLocationFromNode(expr, typeParameters); + } + expr.typeParameters = typeParameters; + return expr; + }, state); + if (!arrow.error && !arrow.aborted) { + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (!jsx) { + assert(!this.hasPlugin("jsx")); + typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); + if (!typeCast.error) return typeCast.node; + } + if ((_jsx2 = jsx) != null && _jsx2.node) { + this.state = jsx.failState; + return jsx.node; + } + if (arrow.node) { + this.state = arrow.failState; + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if ((_typeCast = typeCast) != null && _typeCast.node) { + this.state = typeCast.failState; + return typeCast.node; + } + throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); + } + reportReservedArrowTypeParam(node) { + var _node$extra; + if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedArrowTypeParam, node); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + if (!this.hasPlugin("jsx") && this.match(47)) { + return this.tsParseTypeAssertion(); + } + return super.parseMaybeUnary(refExpressionErrors, sawUnary); + } + parseArrow(node) { + if (this.match(14)) { + const result = this.tryParse(abort => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); + if (this.canInsertSemicolon() || !this.match(19)) abort(); + return returnType; + }); + if (result.aborted) return; + if (!result.thrown) { + if (result.error) this.state = result.failState; + node.returnType = result.node; + } + } + return super.parseArrow(node); + } + parseAssignableListItemTypes(param, flags) { + if (!(flags & 2)) return param; + if (this.eat(17)) { + param.optional = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + } + isAssignable(node, isBinding) { + switch (node.type) { + case "TSTypeCastExpression": + return this.isAssignable(node.expression, isBinding); + case "TSParameterProperty": + return true; + default: + return super.isAssignable(node, isBinding); + } + } + toAssignable(node, isLHS = false) { + switch (node.type) { + case "ParenthesizedExpression": + this.toAssignableParenthesizedExpression(node, isLHS); + break; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + if (isLHS) { + this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, node); + } else { + this.raise(TSErrors.UnexpectedTypeCastInParameter, node); + } + this.toAssignable(node.expression, isLHS); + break; + case "AssignmentExpression": + if (!isLHS && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + default: + super.toAssignable(node, isLHS); + } + } + toAssignableParenthesizedExpression(node, isLHS) { + switch (node.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + this.toAssignable(node.expression, isLHS); + break; + default: + super.toAssignable(node, isLHS); + } + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + this.checkToRestConversion(node.expression, false); + break; + default: + super.checkToRestConversion(node, allowPattern); + } + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return getOwn({ + TSTypeCastExpression: true, + TSParameterProperty: "parameter", + TSNonNullExpression: "expression", + TSAsExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], + TSSatisfiesExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], + TSTypeAssertion: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true] + }, type) || super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } + parseBindingAtom() { + if (this.state.type === 78) { + return this.parseIdentifier(true); + } + return super.parseBindingAtom(); + } + parseMaybeDecoratorArguments(expr) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (this.match(10)) { + const call = super.parseMaybeDecoratorArguments(expr); + call.typeParameters = typeArguments; + return call; + } + this.unexpected(null, 10); + } + return super.parseMaybeDecoratorArguments(expr); + } + checkCommaAfterRest(close) { + if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { + this.next(); + return false; + } + return super.checkCommaAfterRest(close); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(35) || this.match(14) || super.isClassProperty(); + } + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation); + } + return node; + } + getTokenFromCode(code) { + if (this.state.inType) { + if (code === 62) { + this.finishOp(48, 1); + return; + } + if (code === 60) { + this.finishOp(47, 1); + return; + } + } + super.getTokenFromCode(code); + } + reScan_lt_gt() { + const { + type + } = this.state; + if (type === 47) { + this.state.pos -= 1; + this.readToken_lt(); + } else if (type === 48) { + this.state.pos -= 1; + this.readToken_gt(); + } + } + reScan_lt() { + const { + type + } = this.state; + if (type === 51) { + this.state.pos -= 2; + this.finishOp(47, 1); + return 47; + } + return type; + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + super.toAssignableList(exprList, trailingCommaLoc, isLHS); + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); + return node.expression; + } + shouldParseArrow(params) { + if (this.match(14)) { + return params.every(expr => this.isAssignable(expr, true)); + } + return super.shouldParseArrow(params); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + jsxParseOpeningElementAfterName(node) { + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); + if (typeArguments) node.typeParameters = typeArguments; + } + return super.jsxParseOpeningElementAfterName(node); + } + getGetterSetterExpectedParamCount(method) { + const baseCount = super.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + const firstParam = params[0]; + const hasContextParam = firstParam && this.isThisParam(firstParam); + return hasContextParam ? baseCount + 1 : baseCount; + } + parseCatchClauseParam() { + const param = super.parseCatchClauseParam(); + const type = this.tsTryParseTypeAnnotation(); + if (type) { + param.typeAnnotation = type; + this.resetEndLocation(param); + } + return param; + } + tsInAmbientContext(cb) { + const oldIsAmbientContext = this.state.isAmbientContext; + this.state.isAmbientContext = true; + try { + return cb(); + } finally { + this.state.isAmbientContext = oldIsAmbientContext; + } + } + parseClass(node, isStatement, optionalId) { + const oldInAbstractClass = this.state.inAbstractClass; + this.state.inAbstractClass = !!node.abstract; + try { + return super.parseClass(node, isStatement, optionalId); + } finally { + this.state.inAbstractClass = oldInAbstractClass; + } + } + tsParseAbstractDeclaration(node, decorators) { + if (this.match(80)) { + node.abstract = true; + return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); + } else if (this.isContextual(129)) { + if (!this.hasFollowingLineBreak()) { + node.abstract = true; + this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, node); + return this.tsParseInterfaceDeclaration(node); + } + } else { + this.unexpected(null, 80); + } + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); + if (method.abstract) { + const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body; + if (hasBody) { + const { + key + } = method; + this.raise(TSErrors.AbstractMethodHasImplementation, method, { + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); + } + } + return method; + } + tsParseTypeParameterName() { + const typeName = this.parseIdentifier(); + return typeName.name; + } + shouldParseAsAmbientContext() { + return !!this.getPluginOption("typescript", "dts"); + } + parse() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.parse(); + } + getExpression() { + if (this.shouldParseAsAmbientContext()) { + this.state.isAmbientContext = true; + } + return super.getExpression(); + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (!isString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); + return this.finishNode(node, "ExportSpecifier"); + } + node.exportKind = "value"; + return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (!importedIsString && isMaybeTypeOnly) { + this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); + return this.finishNode(specifier, "ImportSpecifier"); + } + specifier.importKind = "value"; + return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); + } + parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { + const leftOfAsKey = isImport ? "imported" : "local"; + const rightOfAsKey = isImport ? "local" : "exported"; + let leftOfAs = node[leftOfAsKey]; + let rightOfAs; + let hasTypeSpecifier = false; + let canParseAsKeyword = true; + const loc = leftOfAs.loc.start; + if (this.isContextual(93)) { + const firstAs = this.parseIdentifier(); + if (this.isContextual(93)) { + const secondAs = this.parseIdentifier(); + if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + leftOfAs = firstAs; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + canParseAsKeyword = false; + } else { + rightOfAs = secondAs; + canParseAsKeyword = false; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + canParseAsKeyword = false; + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } else { + hasTypeSpecifier = true; + leftOfAs = firstAs; + } + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + hasTypeSpecifier = true; + if (isImport) { + leftOfAs = this.parseIdentifier(true); + if (!this.isContextual(93)) { + this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); + } + } else { + leftOfAs = this.parseModuleExportName(); + } + } + if (hasTypeSpecifier && isInTypeOnlyImportExport) { + this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, loc); + } + node[leftOfAsKey] = leftOfAs; + node[rightOfAsKey] = rightOfAs; + const kindKey = isImport ? "importKind" : "exportKind"; + node[kindKey] = hasTypeSpecifier ? "type" : "value"; + if (canParseAsKeyword && this.eatContextual(93)) { + node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); + } + if (!node[rightOfAsKey]) { + node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); + } + if (isImport) { + this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); + } + } +}; +function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { + computed, + property + } = expression; + if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +function isValidAmbientConstInitializer(expression, estree) { + var _expression$extra; + const { + type + } = expression; + if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { + return false; + } + if (estree) { + if (type === "Literal") { + const { + value + } = expression; + if (typeof value === "string" || typeof value === "boolean") { + return true; + } + } + } else { + if (type === "StringLiteral" || type === "BooleanLiteral") { + return true; + } + } + if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) { + return true; + } + if (type === "TemplateLiteral" && expression.expressions.length === 0) { + return true; + } + if (isPossiblyLiteralEnum(expression)) { + return true; + } + return false; +} +function isNumber(expression, estree) { + if (estree) { + return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); + } + return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; +} +function isNegativeNumber(expression, estree) { + if (expression.type === "UnaryExpression") { + const { + operator, + argument + } = expression; + if (operator === "-" && isNumber(argument, estree)) { + return true; + } + } + return false; +} +function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression" || expression.computed) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +const PlaceholderErrors = ParseErrorEnum`placeholders`({ + ClassNameIsRequired: "A class name is required.", + UnexpectedSpace: "Unexpected space in placeholder." +}); +var placeholders = superClass => class PlaceholdersParserMixin extends superClass { + parsePlaceholder(expectedNode) { + if (this.match(144)) { + const node = this.startNode(); + this.next(); + this.assertNoSpace(); + node.name = super.parseIdentifier(true); + this.assertNoSpace(); + this.expect(144); + return this.finishPlaceholder(node, expectedNode); + } + } + finishPlaceholder(node, expectedNode) { + const isFinished = !!(node.expectedNode && node.type === "Placeholder"); + node.expectedNode = expectedNode; + return isFinished ? node : this.finishNode(node, "Placeholder"); + } + getTokenFromCode(code) { + if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { + this.finishOp(144, 2); + } else { + super.getTokenFromCode(code); + } + } + parseExprAtom(refExpressionErrors) { + return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); + } + parseIdentifier(liberal) { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word !== undefined) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); + } + isValidLVal(type, isParenthesized, binding) { + return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); + } + toAssignable(node, isLHS) { + if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { + node.expectedNode = "Pattern"; + } else { + super.toAssignable(node, isLHS); + } + } + chStartsBindingIdentifier(ch, pos) { + if (super.chStartsBindingIdentifier(ch, pos)) { + return true; + } + const nextToken = this.lookahead(); + if (nextToken.type === 144) { + return true; + } + return false; + } + verifyBreakContinue(node, isBreak) { + if (node.label && node.label.type === "Placeholder") return; + super.verifyBreakContinue(node, isBreak); + } + parseExpressionStatement(node, expr) { + var _expr$extra; + if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + return super.parseExpressionStatement(node, expr); + } + if (this.match(14)) { + const stmt = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); + return this.finishNode(stmt, "LabeledStatement"); + } + this.semicolon(); + node.name = expr.name; + return this.finishPlaceholder(node, "Statement"); + } + parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); + } + parseFunctionId(requireId) { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); + } + parseClass(node, isStatement, optionalId) { + const type = isStatement ? "ClassDeclaration" : "ClassExpression"; + this.next(); + const oldStrict = this.state.strict; + const placeholder = this.parsePlaceholder("Identifier"); + if (placeholder) { + if (this.match(81) || this.match(144) || this.match(5)) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + super.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, type); + } + parseExport(node, decorators) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseExport(node, decorators); + if (!this.isContextual(98) && !this.match(12)) { + node.specifiers = []; + node.source = null; + node.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node, "ExportNamedDeclaration"); + } + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = placeholder; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return super.parseExport(node, decorators); + } + isExportDefaultSpecifier() { + if (this.match(65)) { + const next = this.nextTokenStart(); + if (this.isUnparsedContextual(next, "from")) { + if (this.input.startsWith(tokenLabelName(144), this.nextTokenStartSince(next + 4))) { + return true; + } + } + } + return super.isExportDefaultSpecifier(); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + var _specifiers; + if ((_specifiers = node.specifiers) != null && _specifiers.length) { + return true; + } + return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + } + checkExport(node) { + const { + specifiers + } = node; + if (specifiers != null && specifiers.length) { + node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); + } + super.checkExport(node); + node.specifiers = specifiers; + } + parseImport(node) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseImport(node); + node.specifiers = []; + if (!this.isContextual(98) && !this.match(12)) { + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + const specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); + if (this.eat(12)) { + const hasStarImport = this.maybeParseStarImportSpecifier(node); + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + this.expectContextual(98); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); + } + assertNoSpace() { + if (this.state.start > this.state.lastTokEndLoc.index) { + this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc); + } + } +}; +var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { + parseV8Intrinsic() { + if (this.match(54)) { + const v8IntrinsicStartLoc = this.state.startLoc; + const node = this.startNode(); + this.next(); + if (tokenIsIdentifier(this.state.type)) { + const name = this.parseIdentifierName(); + const identifier = this.createIdentifier(node, name); + identifier.type = "V8IntrinsicIdentifier"; + if (this.match(10)) { + return identifier; + } + } + this.unexpected(v8IntrinsicStartLoc); + } + } + parseExprAtom(refExpressionErrors) { + return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); + } +}; +function hasPlugin(plugins, expectedConfig) { + const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig; + const expectedKeys = Object.keys(expectedOptions); + const expectedOptionsIsEmpty = expectedKeys.length === 0; + return plugins.some(p => { + if (typeof p === "string") { + return expectedOptionsIsEmpty && p === expectedName; + } else { + const [pluginName, pluginOptions] = p; + if (pluginName !== expectedName) { + return false; + } + for (const key of expectedKeys) { + if (pluginOptions[key] !== expectedOptions[key]) { + return false; + } + } + return true; + } + }); +} +function getPluginOption(plugins, name, option) { + const plugin = plugins.find(plugin => { + if (Array.isArray(plugin)) { + return plugin[0] === name; + } else { + return plugin === name; + } + }); + if (plugin && Array.isArray(plugin) && plugin.length > 1) { + return plugin[1][option]; + } + return null; +} +const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; +const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; +const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; +function validatePlugins(plugins) { + if (hasPlugin(plugins, "decorators")) { + if (hasPlugin(plugins, "decorators-legacy")) { + throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + } + const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); + if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); + } + const allowCallParenthesized = getPluginOption(plugins, "decorators", "allowCallParenthesized"); + if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { + throw new Error("'allowCallParenthesized' must be a boolean."); + } + } + if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { + throw new Error("Cannot combine flow and typescript plugins."); + } + if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) { + throw new Error("Cannot combine placeholders and v8intrinsic plugins."); + } + if (hasPlugin(plugins, "pipelineOperator")) { + const proposal = getPluginOption(plugins, "pipelineOperator", "proposal"); + if (!PIPELINE_PROPOSALS.includes(proposal)) { + const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); + throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); + } + const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", { + syntaxType: "hash" + }]); + if (proposal === "hack") { + if (hasPlugin(plugins, "placeholders")) { + throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); + } + if (hasPlugin(plugins, "v8intrinsic")) { + throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); + } + const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken"); + if (!TOPIC_TOKENS.includes(topicToken)) { + const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); + throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); + } + if (topicToken === "#" && tupleSyntaxIsHash) { + throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); + } + } else if (proposal === "smart" && tupleSyntaxIsHash) { + throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); + } + } + if (hasPlugin(plugins, "moduleAttributes")) { + { + if (hasPlugin(plugins, "importAssertions") || hasPlugin(plugins, "importAttributes")) { + throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins."); + } + const moduleAttributesVersionPluginOption = getPluginOption(plugins, "moduleAttributes", "version"); + if (moduleAttributesVersionPluginOption !== "may-2020") { + throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); + } + } + } + if (hasPlugin(plugins, "importAssertions") && hasPlugin(plugins, "importAttributes")) { + throw new Error("Cannot combine importAssertions and importAttributes plugins."); + } + if (hasPlugin(plugins, "recordAndTuple") && getPluginOption(plugins, "recordAndTuple", "syntaxType") != null && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) { + throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); + } + if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) { + const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); + error.missingPlugins = "doExpressions"; + throw error; + } + if (hasPlugin(plugins, "optionalChainingAssign") && getPluginOption(plugins, "optionalChainingAssign", "version") !== "2023-07") { + throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); + } +} +const mixinPlugins = { + estree, + jsx, + flow, + typescript, + v8intrinsic, + placeholders +}; +const mixinPluginNames = Object.keys(mixinPlugins); +const defaultOptions = { + sourceType: "script", + sourceFilename: undefined, + startColumn: 0, + startLine: 1, + allowAwaitOutsideFunction: false, + allowReturnOutsideFunction: false, + allowNewTargetOutsideFunction: false, + allowImportExportEverywhere: false, + allowSuperOutsideMethod: false, + allowUndeclaredExports: false, + plugins: [], + strictMode: null, + ranges: false, + tokens: false, + createImportExpressions: false, + createParenthesizedExpressions: false, + errorRecovery: false, + attachComment: true, + annexB: true +}; +function getOptions(opts) { + if (opts == null) { + return Object.assign({}, defaultOptions); + } + if (opts.annexB != null && opts.annexB !== false) { + throw new Error("The `annexB` option can only be set to `false`."); + } + const options = {}; + for (const key of Object.keys(defaultOptions)) { + var _opts$key; + options[key] = (_opts$key = opts[key]) != null ? _opts$key : defaultOptions[key]; + } + return options; +} +class ExpressionParser extends LValParser { + checkProto(prop, isRecord, protoRef, refExpressionErrors) { + if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { + return; + } + const key = prop.key; + const name = key.type === "Identifier" ? key.name : key.value; + if (name === "__proto__") { + if (isRecord) { + this.raise(Errors.RecordNoProto, key); + return; + } + if (protoRef.used) { + if (refExpressionErrors) { + if (refExpressionErrors.doubleProtoLoc === null) { + refExpressionErrors.doubleProtoLoc = key.loc.start; + } + } else { + this.raise(Errors.DuplicateProto, key); + } + } + protoRef.used = true; + } + } + shouldExitDescending(expr, potentialArrowAt) { + return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt; + } + getExpression() { + this.enterInitialScopes(); + this.nextToken(); + const expr = this.parseExpression(); + if (!this.match(139)) { + this.unexpected(); + } + this.finalizeRemainingComments(); + expr.comments = this.comments; + expr.errors = this.state.errors; + if (this.options.tokens) { + expr.tokens = this.tokens; + } + return expr; + } + parseExpression(disallowIn, refExpressionErrors) { + if (disallowIn) { + return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); + } + parseExpressionBase(refExpressionErrors) { + const startLoc = this.state.startLoc; + const expr = this.parseMaybeAssign(refExpressionErrors); + if (this.match(12)) { + const node = this.startNodeAt(startLoc); + node.expressions = [expr]; + while (this.eat(12)) { + node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); + } + this.toReferencedList(node.expressions); + return this.finishNode(node, "SequenceExpression"); + } + return expr; + } + parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { + return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { + return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); + } + setOptionalParametersError(refExpressionErrors, resultError) { + var _resultError$loc; + refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; + } + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + const startLoc = this.state.startLoc; + if (this.isContextual(108)) { + if (this.prodParam.hasYield) { + let left = this.parseYield(); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + return left; + } + } + let ownExpressionErrors; + if (refExpressionErrors) { + ownExpressionErrors = false; + } else { + refExpressionErrors = new ExpressionErrors(); + ownExpressionErrors = true; + } + const { + type + } = this.state; + if (type === 10 || tokenIsIdentifier(type)) { + this.state.potentialArrowAt = this.state.start; + } + let left = this.parseMaybeConditional(refExpressionErrors); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startLoc); + } + if (tokenIsAssignment(this.state.type)) { + const node = this.startNodeAt(startLoc); + const operator = this.state.value; + node.operator = operator; + if (this.match(29)) { + this.toAssignable(left, true); + node.left = left; + const startIndex = startLoc.index; + if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { + refExpressionErrors.doubleProtoLoc = null; + } + if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { + refExpressionErrors.shorthandAssignLoc = null; + } + if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { + this.checkDestructuringPrivate(refExpressionErrors); + refExpressionErrors.privateKeyLoc = null; + } + } else { + node.left = left; + } + this.next(); + node.right = this.parseMaybeAssign(); + this.checkLVal(left, { + in: this.finishNode(node, "AssignmentExpression") + }); + return node; + } else if (ownExpressionErrors) { + this.checkExpressionErrors(refExpressionErrors, true); + } + return left; + } + parseMaybeConditional(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprOps(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseConditional(expr, startLoc, refExpressionErrors); + } + parseConditional(expr, startLoc, refExpressionErrors) { + if (this.eat(17)) { + const node = this.startNodeAt(startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssignAllowIn(); + this.expect(14); + node.alternate = this.parseMaybeAssign(); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; + } + parseMaybeUnaryOrPrivate(refExpressionErrors) { + return this.match(138) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); + } + parseExprOps(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseExprOp(expr, startLoc, -1); + } + parseExprOp(left, leftStartLoc, minPrec) { + if (this.isPrivateName(left)) { + const value = this.getPrivateNameSV(left); + if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { + this.raise(Errors.PrivateInExpectedIn, left, { + identifierName: value + }); + } + this.classScope.usePrivateName(value, left.loc.start); + } + const op = this.state.type; + if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { + let prec = tokenOperatorPrecedence(op); + if (prec > minPrec) { + if (op === 39) { + this.expectPlugin("pipelineOperator"); + if (this.state.inFSharpPipelineDirectBody) { + return left; + } + this.checkPipelineAtInfixOperator(left, leftStartLoc); + } + const node = this.startNodeAt(leftStartLoc); + node.left = left; + node.operator = this.state.value; + const logical = op === 41 || op === 42; + const coalesce = op === 40; + if (coalesce) { + prec = tokenOperatorPrecedence(42); + } + this.next(); + if (op === 39 && this.hasPlugin(["pipelineOperator", { + proposal: "minimal" + }])) { + if (this.state.type === 96 && this.prodParam.hasAwait) { + throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, this.state.startLoc); + } + } + node.right = this.parseExprOpRightExpr(op, prec); + const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); + const nextOp = this.state.type; + if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { + throw this.raise(Errors.MixingCoalesceWithLogical, this.state.startLoc); + } + return this.parseExprOp(finishedNode, leftStartLoc, minPrec); + } + } + return left; + } + parseExprOpRightExpr(op, prec) { + const startLoc = this.state.startLoc; + switch (op) { + case 39: + switch (this.getPluginOption("pipelineOperator", "proposal")) { + case "hack": + return this.withTopicBindingContext(() => { + return this.parseHackPipeBody(); + }); + case "smart": + return this.withTopicBindingContext(() => { + if (this.prodParam.hasYield && this.isContextual(108)) { + throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc); + } + return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); + }); + case "fsharp": + return this.withSoloAwaitPermittingContext(() => { + return this.parseFSharpPipelineBody(prec); + }); + } + default: + return this.parseExprOpBaseRightExpr(op, prec); + } + } + parseExprOpBaseRightExpr(op, prec) { + const startLoc = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); + } + parseHackPipeBody() { + var _body$extra; + const { + startLoc + } = this.state; + const body = this.parseMaybeAssign(); + const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); + if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { + this.raise(Errors.PipeUnparenthesizedBody, startLoc, { + type: body.type + }); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipeTopicUnused, startLoc); + } + return body; + } + checkExponentialAfterUnary(node) { + if (this.match(57)) { + this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument); + } + } + parseMaybeUnary(refExpressionErrors, sawUnary) { + const startLoc = this.state.startLoc; + const isAwait = this.isContextual(96); + if (isAwait && this.isAwaitAllowed()) { + this.next(); + const expr = this.parseAwait(startLoc); + if (!sawUnary) this.checkExponentialAfterUnary(expr); + return expr; + } + const update = this.match(34); + const node = this.startNode(); + if (tokenIsPrefix(this.state.type)) { + node.operator = this.state.value; + node.prefix = true; + if (this.match(72)) { + this.expectPlugin("throwExpressions"); + } + const isDelete = this.match(89); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refExpressionErrors, true); + if (this.state.strict && isDelete) { + const arg = node.argument; + if (arg.type === "Identifier") { + this.raise(Errors.StrictDelete, node); + } else if (this.hasPropertyAsPrivateName(arg)) { + this.raise(Errors.DeletePrivateField, node); + } + } + if (!update) { + if (!sawUnary) { + this.checkExponentialAfterUnary(node); + } + return this.finishNode(node, "UnaryExpression"); + } + } + const expr = this.parseUpdate(node, update, refExpressionErrors); + if (isAwait) { + const { + type + } = this.state; + const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); + if (startsExpr && !this.isAmbiguousAwait()) { + this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc); + return this.parseAwait(startLoc); + } + } + return expr; + } + parseUpdate(node, update, refExpressionErrors) { + if (update) { + const updateExpressionNode = node; + this.checkLVal(updateExpressionNode.argument, { + in: this.finishNode(updateExpressionNode, "UpdateExpression") + }); + return node; + } + const startLoc = this.state.startLoc; + let expr = this.parseExprSubscripts(refExpressionErrors); + if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; + while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startLoc); + node.operator = this.state.value; + node.prefix = false; + node.argument = expr; + this.next(); + this.checkLVal(expr, { + in: expr = this.finishNode(node, "UpdateExpression") + }); + } + return expr; + } + parseExprSubscripts(refExpressionErrors) { + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprAtom(refExpressionErrors); + if (this.shouldExitDescending(expr, potentialArrowAt)) { + return expr; + } + return this.parseSubscripts(expr, startLoc); + } + parseSubscripts(base, startLoc, noCalls) { + const state = { + optionalChainMember: false, + maybeAsyncArrow: this.atPossibleAsyncArrow(base), + stop: false + }; + do { + base = this.parseSubscript(base, startLoc, noCalls, state); + state.maybeAsyncArrow = false; + } while (!state.stop); + return base; + } + parseSubscript(base, startLoc, noCalls, state) { + const { + type + } = this.state; + if (!noCalls && type === 15) { + return this.parseBind(base, startLoc, noCalls, state); + } else if (tokenIsTemplate(type)) { + return this.parseTaggedTemplateExpression(base, startLoc, state); + } + let optional = false; + if (type === 18) { + if (noCalls) { + this.raise(Errors.OptionalChainingNoNew, this.state.startLoc); + if (this.lookaheadCharCode() === 40) { + state.stop = true; + return base; + } + } + state.optionalChainMember = optional = true; + this.next(); + } + if (!noCalls && this.match(10)) { + return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); + } else { + const computed = this.eat(0); + if (computed || optional || this.eat(16)) { + return this.parseMember(base, startLoc, state, computed, optional); + } else { + state.stop = true; + return base; + } + } + } + parseMember(base, startLoc, state, computed, optional) { + const node = this.startNodeAt(startLoc); + node.object = base; + node.computed = computed; + if (computed) { + node.property = this.parseExpression(); + this.expect(3); + } else if (this.match(138)) { + if (base.type === "Super") { + this.raise(Errors.SuperPrivateField, startLoc); + } + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + if (state.optionalChainMember) { + node.optional = optional; + return this.finishNode(node, "OptionalMemberExpression"); + } else { + return this.finishNode(node, "MemberExpression"); + } + } + parseBind(base, startLoc, noCalls, state) { + const node = this.startNodeAt(startLoc); + node.object = base; + this.next(); + node.callee = this.parseNoCallExpr(); + state.stop = true; + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); + } + parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + let refExpressionErrors = null; + this.state.maybeInArrowParameters = true; + this.next(); + const node = this.startNodeAt(startLoc); + node.callee = base; + const { + maybeAsyncArrow, + optionalChainMember + } = state; + if (maybeAsyncArrow) { + this.expressionScope.enter(newAsyncArrowScope()); + refExpressionErrors = new ExpressionErrors(); + } + if (optionalChainMember) { + node.optional = optional; + } + if (optional) { + node.arguments = this.parseCallExpressionArguments(11); + } else { + node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors); + } + let finishedNode = this.finishCallExpression(node, optionalChainMember); + if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { + state.stop = true; + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); + } else { + if (maybeAsyncArrow) { + this.checkExpressionErrors(refExpressionErrors, true); + this.expressionScope.exit(); + } + this.toReferencedArguments(finishedNode); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return finishedNode; + } + toReferencedArguments(node, isParenthesizedExpr) { + this.toReferencedListDeep(node.arguments, isParenthesizedExpr); + } + parseTaggedTemplateExpression(base, startLoc, state) { + const node = this.startNodeAt(startLoc); + node.tag = base; + node.quasi = this.parseTemplate(true); + if (state.optionalChainMember) { + this.raise(Errors.OptionalChainingNoTemplate, startLoc); + } + return this.finishNode(node, "TaggedTemplateExpression"); + } + atPossibleAsyncArrow(base) { + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; + } + expectImportAttributesPlugin() { + if (!this.hasPlugin("importAssertions")) { + this.expectPlugin("importAttributes"); + } + } + finishCallExpression(node, optional) { + if (node.callee.type === "Import") { + if (node.arguments.length === 2) { + { + if (!this.hasPlugin("moduleAttributes")) { + this.expectImportAttributesPlugin(); + } + } + } + if (node.arguments.length === 0 || node.arguments.length > 2) { + this.raise(Errors.ImportCallArity, node, { + maxArgumentCount: this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1 + }); + } else { + for (const arg of node.arguments) { + if (arg.type === "SpreadElement") { + this.raise(Errors.ImportCallSpreadArgument, arg); + } + } + } + } + return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); + } + parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) { + const elts = []; + let first = true; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (dynamicImport && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { + this.raise(Errors.ImportCallArgumentTrailingComma, this.state.lastTokStartLoc); + } + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); + } + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return elts; + } + shouldParseAsyncArrow() { + return this.match(19) && !this.canInsertSemicolon(); + } + parseAsyncArrowFromCallExpression(node, call) { + var _call$extra; + this.resetPreviousNodeTrailingComments(call); + this.expect(19); + this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); + if (call.innerComments) { + setInnerComments(node, call.innerComments); + } + if (call.callee.trailingComments) { + setInnerComments(node, call.callee.trailingComments); + } + return node; + } + parseNoCallExpr() { + const startLoc = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), startLoc, true); + } + parseExprAtom(refExpressionErrors) { + let node; + let decorators = null; + const { + type + } = this.state; + switch (type) { + case 79: + return this.parseSuper(); + case 83: + node = this.startNode(); + this.next(); + if (this.match(16)) { + return this.parseImportMetaProperty(node); + } + if (this.match(10)) { + if (this.options.createImportExpressions) { + return this.parseImportCall(node); + } else { + return this.finishNode(node, "Import"); + } + } else { + this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc); + return this.finishNode(node, "Import"); + } + case 78: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression"); + case 90: + { + return this.parseDo(this.startNode(), false); + } + case 56: + case 31: + { + this.readRegexp(); + return this.parseRegExpLiteral(this.state.value); + } + case 134: + return this.parseNumericLiteral(this.state.value); + case 135: + return this.parseBigIntLiteral(this.state.value); + case 136: + return this.parseDecimalLiteral(this.state.value); + case 133: + return this.parseStringLiteral(this.state.value); + case 84: + return this.parseNullLiteral(); + case 85: + return this.parseBooleanLiteral(true); + case 86: + return this.parseBooleanLiteral(false); + case 10: + { + const canBeArrow = this.state.potentialArrowAt === this.state.start; + return this.parseParenAndDistinguishExpression(canBeArrow); + } + case 2: + case 1: + { + return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); + } + case 0: + { + return this.parseArrayLike(3, true, false, refExpressionErrors); + } + case 6: + case 7: + { + return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); + } + case 5: + { + return this.parseObjectLike(8, false, false, refExpressionErrors); + } + case 68: + return this.parseFunctionOrFunctionSent(); + case 26: + decorators = this.parseDecorators(); + case 80: + return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); + case 77: + return this.parseNewOrNewTarget(); + case 25: + case 24: + return this.parseTemplate(false); + case 15: + { + node = this.startNode(); + this.next(); + node.object = null; + const callee = node.callee = this.parseNoCallExpr(); + if (callee.type === "MemberExpression") { + return this.finishNode(node, "BindExpression"); + } else { + throw this.raise(Errors.UnsupportedBind, callee); + } + } + case 138: + { + this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, { + identifierName: this.state.value + }); + return this.parsePrivateName(); + } + case 33: + { + return this.parseTopicReferenceThenEqualsSign(54, "%"); + } + case 32: + { + return this.parseTopicReferenceThenEqualsSign(44, "^"); + } + case 37: + case 38: + { + return this.parseTopicReference("hack"); + } + case 44: + case 54: + case 27: + { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + return this.parseTopicReference(pipeProposal); + } + this.unexpected(); + break; + } + case 47: + { + const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); + if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { + this.expectOnePlugin(["jsx", "flow", "typescript"]); + } else { + this.unexpected(); + } + break; + } + default: + if (tokenIsIdentifier(type)) { + if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { + return this.parseModuleExpression(); + } + const canBeArrow = this.state.potentialArrowAt === this.state.start; + const containsEsc = this.state.containsEsc; + const id = this.parseIdentifier(); + if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { + const { + type + } = this.state; + if (type === 68) { + this.resetPreviousNodeTrailingComments(id); + this.next(); + return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); + } else if (tokenIsIdentifier(type)) { + if (this.lookaheadCharCode() === 61) { + return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); + } else { + return id; + } + } else if (type === 90) { + this.resetPreviousNodeTrailingComments(id); + return this.parseDo(this.startNodeAtNode(id), true); + } + } + if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); + } + return id; + } else { + this.unexpected(); + } + } + } + parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { + const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); + if (pipeProposal) { + this.state.type = topicTokenType; + this.state.value = topicTokenValue; + this.state.pos--; + this.state.end--; + this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); + return this.parseTopicReference(pipeProposal); + } else { + this.unexpected(); + } + } + parseTopicReference(pipeProposal) { + const node = this.startNode(); + const startLoc = this.state.startLoc; + const tokenType = this.state.type; + this.next(); + return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); + } + finishTopicReference(node, startLoc, pipeProposal, tokenType) { + if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { + const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference"; + if (!this.topicReferenceIsAllowedInCurrentContext()) { + this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, startLoc); + } + this.registerTopicReference(); + return this.finishNode(node, nodeType); + } else { + throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, { + token: tokenLabelName(tokenType) + }); + } + } + testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { + switch (pipeProposal) { + case "hack": + { + return this.hasPlugin(["pipelineOperator", { + topicToken: tokenLabelName(tokenType) + }]); + } + case "smart": + return tokenType === 27; + default: + throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc); + } + } + parseAsyncArrowUnaryFunction(node) { + this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); + const params = [this.parseIdentifier()]; + this.prodParam.exit(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition()); + } + this.expect(19); + return this.parseArrowExpression(node, params, true); + } + parseDo(node, isAsync) { + this.expectPlugin("doExpressions"); + if (isAsync) { + this.expectPlugin("asyncDoExpressions"); + } + node.async = isAsync; + this.next(); + const oldLabels = this.state.labels; + this.state.labels = []; + if (isAsync) { + this.prodParam.enter(2); + node.body = this.parseBlock(); + this.prodParam.exit(); + } else { + node.body = this.parseBlock(); + } + this.state.labels = oldLabels; + return this.finishNode(node, "DoExpression"); + } + parseSuper() { + const node = this.startNode(); + this.next(); + if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { + this.raise(Errors.SuperNotAllowed, node); + } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { + this.raise(Errors.UnexpectedSuper, node); + } + if (!this.match(10) && !this.match(0) && !this.match(16)) { + this.raise(Errors.UnsupportedSuper, node); + } + return this.finishNode(node, "Super"); + } + parsePrivateName() { + const node = this.startNode(); + const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); + const name = this.state.value; + this.next(); + node.id = this.createIdentifier(id, name); + return this.finishNode(node, "PrivateName"); + } + parseFunctionOrFunctionSent() { + const node = this.startNode(); + this.next(); + if (this.prodParam.hasYield && this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); + this.next(); + if (this.match(103)) { + this.expectPlugin("functionSent"); + } else if (!this.hasPlugin("functionSent")) { + this.unexpected(); + } + return this.parseMetaProperty(node, meta, "sent"); + } + return this.parseFunction(node); + } + parseMetaProperty(node, meta, propertyName) { + node.meta = meta; + const containsEsc = this.state.containsEsc; + node.property = this.parseIdentifier(true); + if (node.property.name !== propertyName || containsEsc) { + this.raise(Errors.UnsupportedMetaProperty, node.property, { + target: meta.name, + onlyValidPropertyName: propertyName + }); + } + return this.finishNode(node, "MetaProperty"); + } + parseImportMetaProperty(node) { + const id = this.createIdentifier(this.startNodeAtNode(node), "import"); + this.next(); + if (this.isContextual(101)) { + if (!this.inModule) { + this.raise(Errors.ImportMetaOutsideModule, id); + } + this.sawUnambiguousESM = true; + } else if (this.isContextual(105) || this.isContextual(97)) { + const isSource = this.isContextual(105); + if (!isSource) this.unexpected(); + this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); + if (!this.options.createImportExpressions) { + throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, this.state.startLoc, { + phase: this.state.value + }); + } + this.next(); + node.phase = isSource ? "source" : "defer"; + return this.parseImportCall(node); + } + return this.parseMetaProperty(node, id, "meta"); + } + parseLiteralAtNode(value, type, node) { + this.addExtra(node, "rawValue", value); + this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); + node.value = value; + this.next(); + return this.finishNode(node, type); + } + parseLiteral(value, type) { + const node = this.startNode(); + return this.parseLiteralAtNode(value, type, node); + } + parseStringLiteral(value) { + return this.parseLiteral(value, "StringLiteral"); + } + parseNumericLiteral(value) { + return this.parseLiteral(value, "NumericLiteral"); + } + parseBigIntLiteral(value) { + return this.parseLiteral(value, "BigIntLiteral"); + } + parseDecimalLiteral(value) { + return this.parseLiteral(value, "DecimalLiteral"); + } + parseRegExpLiteral(value) { + const node = this.parseLiteral(value.value, "RegExpLiteral"); + node.pattern = value.pattern; + node.flags = value.flags; + return node; + } + parseBooleanLiteral(value) { + const node = this.startNode(); + node.value = value; + this.next(); + return this.finishNode(node, "BooleanLiteral"); + } + parseNullLiteral() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "NullLiteral"); + } + parseParenAndDistinguishExpression(canBeArrow) { + const startLoc = this.state.startLoc; + let val; + this.next(); + this.expressionScope.enter(newArrowHeadScope()); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.maybeInArrowParameters = true; + this.state.inFSharpPipelineDirectBody = false; + const innerStartLoc = this.state.startLoc; + const exprList = []; + const refExpressionErrors = new ExpressionErrors(); + let first = true; + let spreadStartLoc; + let optionalCommaStartLoc; + while (!this.match(11)) { + if (first) { + first = false; + } else { + this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); + if (this.match(11)) { + optionalCommaStartLoc = this.state.startLoc; + break; + } + } + if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + spreadStartLoc = this.state.startLoc; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); + if (!this.checkCommaAfterRest(41)) { + break; + } + } else { + exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); + } + } + const innerEndLoc = this.state.lastTokEndLoc; + this.expect(11); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let arrowNode = this.startNodeAt(startLoc); + if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { + this.checkDestructuringPrivate(refExpressionErrors); + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + this.parseArrowExpression(arrowNode, exprList, false); + return arrowNode; + } + this.expressionScope.exit(); + if (!exprList.length) { + this.unexpected(this.state.lastTokStartLoc); + } + if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); + if (spreadStartLoc) this.unexpected(spreadStartLoc); + this.checkExpressionErrors(refExpressionErrors, true); + this.toReferencedListDeep(exprList, true); + if (exprList.length > 1) { + val = this.startNodeAt(innerStartLoc); + val.expressions = exprList; + this.finishNode(val, "SequenceExpression"); + this.resetEndLocation(val, innerEndLoc); + } else { + val = exprList[0]; + } + return this.wrapParenthesis(startLoc, val); + } + wrapParenthesis(startLoc, expression) { + if (!this.options.createParenthesizedExpressions) { + this.addExtra(expression, "parenthesized", true); + this.addExtra(expression, "parenStart", startLoc.index); + this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); + return expression; + } + const parenExpression = this.startNodeAt(startLoc); + parenExpression.expression = expression; + return this.finishNode(parenExpression, "ParenthesizedExpression"); + } + shouldParseArrow(params) { + return !this.canInsertSemicolon(); + } + parseArrow(node) { + if (this.eat(19)) { + return node; + } + } + parseParenItem(node, startLoc) { + return node; + } + parseNewOrNewTarget() { + const node = this.startNode(); + this.next(); + if (this.match(16)) { + const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); + this.next(); + const metaProp = this.parseMetaProperty(node, meta, "target"); + if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) { + this.raise(Errors.UnexpectedNewTarget, metaProp); + } + return metaProp; + } + return this.parseNew(node); + } + parseNew(node) { + this.parseNewCallee(node); + if (this.eat(10)) { + const args = this.parseExprList(11); + this.toReferencedList(args); + node.arguments = args; + } else { + node.arguments = []; + } + return this.finishNode(node, "NewExpression"); + } + parseNewCallee(node) { + const isImport = this.match(83); + const callee = this.parseNoCallExpr(); + node.callee = callee; + if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { + this.raise(Errors.ImportCallNotNewExpression, callee); + } + } + parseTemplateElement(isTagged) { + const { + start, + startLoc, + end, + value + } = this.state; + const elemStart = start + 1; + const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); + if (value === null) { + if (!isTagged) { + this.raise(Errors.InvalidEscapeSequenceTemplate, createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1)); + } + } + const isTail = this.match(24); + const endOffset = isTail ? -1 : -2; + const elemEnd = end + endOffset; + elem.value = { + raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), + cooked: value === null ? null : value.slice(1, endOffset) + }; + elem.tail = isTail; + this.next(); + const finishedNode = this.finishNode(elem, "TemplateElement"); + this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); + return finishedNode; + } + parseTemplate(isTagged) { + const node = this.startNode(); + node.expressions = []; + let curElt = this.parseTemplateElement(isTagged); + node.quasis = [curElt]; + while (!curElt.tail) { + node.expressions.push(this.parseTemplateSubstitution()); + this.readTemplateContinuation(); + node.quasis.push(curElt = this.parseTemplateElement(isTagged)); + } + return this.finishNode(node, "TemplateLiteral"); + } + parseTemplateSubstitution() { + return this.parseExpression(); + } + parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { + if (isRecord) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const propHash = Object.create(null); + let first = true; + const node = this.startNode(); + node.properties = []; + this.next(); + while (!this.match(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + this.addTrailingCommaExtraToNode(node); + break; + } + } + let prop; + if (isPattern) { + prop = this.parseBindingProperty(); + } else { + prop = this.parsePropertyDefinition(refExpressionErrors); + this.checkProto(prop, isRecord, propHash, refExpressionErrors); + } + if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { + this.raise(Errors.InvalidRecordProperty, prop); + } + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); + } + node.properties.push(prop); + } + this.next(); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + let type = "ObjectExpression"; + if (isPattern) { + type = "ObjectPattern"; + } else if (isRecord) { + type = "RecordExpression"; + } + return this.finishNode(node, type); + } + addTrailingCommaExtraToNode(node) { + this.addExtra(node, "trailingComma", this.state.lastTokStartLoc.index); + this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); + } + maybeAsyncOrAccessorProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); + } + parsePropertyDefinition(refExpressionErrors) { + let decorators = []; + if (this.match(26)) { + if (this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + } + const prop = this.startNode(); + let isAsync = false; + let isAccessor = false; + let startLoc; + if (this.match(21)) { + if (decorators.length) this.unexpected(); + return this.parseSpread(); + } + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + prop.method = false; + if (refExpressionErrors) { + startLoc = this.state.startLoc; + } + let isGenerator = this.eat(55); + this.parsePropertyNamePrefixOperator(prop); + const containsEsc = this.state.containsEsc; + const key = this.parsePropertyName(prop, refExpressionErrors); + if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { + const keyName = key.name; + if (keyName === "async" && !this.hasPrecedingLineBreak()) { + isAsync = true; + this.resetPreviousNodeTrailingComments(key); + isGenerator = this.eat(55); + this.parsePropertyName(prop); + } + if (keyName === "get" || keyName === "set") { + isAccessor = true; + this.resetPreviousNodeTrailingComments(key); + prop.kind = keyName; + if (this.match(55)) { + isGenerator = true; + this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), { + kind: keyName + }); + this.next(); + } + this.parsePropertyName(prop); + } + } + return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); + } + getGetterSetterExpectedParamCount(method) { + return method.kind === "get" ? 0 : 1; + } + getObjectOrClassMethodParams(method) { + return method.params; + } + checkGetterSetterParams(method) { + var _params; + const paramCount = this.getGetterSetterExpectedParamCount(method); + const params = this.getObjectOrClassMethodParams(method); + if (params.length !== paramCount) { + this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, method); + } + if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { + this.raise(Errors.BadSetterRestParameter, method); + } + } + parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { + if (isAccessor) { + const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(finishedProp); + return finishedProp; + } + if (isAsync || isGenerator || this.match(10)) { + if (isPattern) this.unexpected(); + prop.kind = "method"; + prop.method = true; + return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); + } + } + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + prop.shorthand = false; + if (this.eat(14)) { + prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); + return this.finishNode(prop, "ObjectProperty"); + } + if (!prop.computed && prop.key.type === "Identifier") { + this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); + if (isPattern) { + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else if (this.match(29)) { + const shorthandAssignLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.shorthandAssignLoc === null) { + refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; + } + } else { + this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc); + } + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else { + prop.value = cloneIdentifier(prop.key); + } + prop.shorthand = true; + return this.finishNode(prop, "ObjectProperty"); + } + } + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); + if (!node) this.unexpected(); + return node; + } + parsePropertyName(prop, refExpressionErrors) { + if (this.eat(0)) { + prop.computed = true; + prop.key = this.parseMaybeAssignAllowIn(); + this.expect(3); + } else { + const { + type, + value + } = this.state; + let key; + if (tokenIsKeywordOrIdentifier(type)) { + key = this.parseIdentifier(true); + } else { + switch (type) { + case 134: + key = this.parseNumericLiteral(value); + break; + case 133: + key = this.parseStringLiteral(value); + break; + case 135: + key = this.parseBigIntLiteral(value); + break; + case 136: + key = this.parseDecimalLiteral(value); + break; + case 138: + { + const privateKeyLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.privateKeyLoc === null) { + refExpressionErrors.privateKeyLoc = privateKeyLoc; + } + } else { + this.raise(Errors.UnexpectedPrivateField, privateKeyLoc); + } + key = this.parsePrivateName(); + break; + } + default: + this.unexpected(); + } + } + prop.key = key; + if (type !== 138) { + prop.computed = false; + } + } + return prop.key; + } + initFunction(node, isAsync) { + node.id = null; + node.generator = false; + node.async = isAsync; + } + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + this.initFunction(node, isAsync); + node.generator = isGenerator; + this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + this.parseFunctionParams(node, isConstructor); + const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); + this.prodParam.exit(); + this.scope.exit(); + return finishedNode; + } + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + if (isTuple) { + this.expectPlugin("recordAndTuple"); + } + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = false; + const node = this.startNode(); + this.next(); + node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); + } + parseArrowExpression(node, params, isAsync, trailingCommaLoc) { + this.scope.enter(2 | 4); + let flags = functionFlags(isAsync, false); + if (!this.match(5) && this.prodParam.hasIn) { + flags |= 8; + } + this.prodParam.enter(flags); + this.initFunction(node, isAsync); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + if (params) { + this.state.maybeInArrowParameters = true; + this.setArrowFunctionParameters(node, params, trailingCommaLoc); + } + this.state.maybeInArrowParameters = false; + this.parseFunctionBody(node, true); + this.prodParam.exit(); + this.scope.exit(); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, "ArrowFunctionExpression"); + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + this.toAssignableList(params, trailingCommaLoc, false); + node.params = params; + } + parseFunctionBodyAndFinish(node, type, isMethod = false) { + this.parseFunctionBody(node, false, isMethod); + return this.finishNode(node, type); + } + parseFunctionBody(node, allowExpression, isMethod = false) { + const isExpression = allowExpression && !this.match(5); + this.expressionScope.enter(newExpressionScope()); + if (isExpression) { + node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression, false); + } else { + const oldStrict = this.state.strict; + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(this.prodParam.currentFlags() | 4); + node.body = this.parseBlock(true, false, hasStrictModeDirective => { + const nonSimple = !this.isSimpleParamList(node.params); + if (hasStrictModeDirective && nonSimple) { + this.raise(Errors.IllegalLanguageModeDirective, (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node); + } + const strictModeChanged = !oldStrict && this.state.strict; + this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); + if (this.state.strict && node.id) { + this.checkIdentifier(node.id, 65, strictModeChanged); + } + }); + this.prodParam.exit(); + this.state.labels = oldLabels; + } + this.expressionScope.exit(); + } + isSimpleParameter(node) { + return node.type === "Identifier"; + } + isSimpleParamList(params) { + for (let i = 0, len = params.length; i < len; i++) { + if (!this.isSimpleParameter(params[i])) return false; + } + return true; + } + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { + const checkClashes = !allowDuplicates && new Set(); + const formalParameters = { + type: "FormalParameters" + }; + for (const param of node.params) { + this.checkLVal(param, { + in: formalParameters, + binding: 5, + checkClashes, + strictModeChanged + }); + } + } + parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.match(close)) { + if (nodeForExtra) { + this.addTrailingCommaExtraToNode(nodeForExtra); + } + this.next(); + break; + } + } + elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); + } + return elts; + } + parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { + let elt; + if (this.match(12)) { + if (!allowEmpty) { + this.raise(Errors.UnexpectedToken, this.state.curPosition(), { + unexpected: "," + }); + } + elt = null; + } else if (this.match(21)) { + const spreadNodeStartLoc = this.state.startLoc; + elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); + } else if (this.match(17)) { + this.expectPlugin("partialApplication"); + if (!allowPlaceholder) { + this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc); + } + const node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); + } else { + elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); + } + return elt; + } + parseIdentifier(liberal) { + const node = this.startNode(); + const name = this.parseIdentifierName(liberal); + return this.createIdentifier(node, name); + } + createIdentifier(node, name) { + node.name = name; + node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); + } + parseIdentifierName(liberal) { + let name; + const { + startLoc, + type + } = this.state; + if (tokenIsKeywordOrIdentifier(type)) { + name = this.state.value; + } else { + this.unexpected(); + } + const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); + if (liberal) { + if (tokenIsKeyword) { + this.replaceToken(132); + } + } else { + this.checkReservedWord(name, startLoc, tokenIsKeyword, false); + } + this.next(); + return name; + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word.length > 10) { + return; + } + if (!canBeReservedWord(word)) { + return; + } + if (checkKeywords && isKeyword(word)) { + this.raise(Errors.UnexpectedKeyword, startLoc, { + keyword: word + }); + return; + } + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + if (reservedTest(word, this.inModule)) { + this.raise(Errors.UnexpectedReservedWord, startLoc, { + reservedWord: word + }); + return; + } else if (word === "yield") { + if (this.prodParam.hasYield) { + this.raise(Errors.YieldBindingIdentifier, startLoc); + return; + } + } else if (word === "await") { + if (this.prodParam.hasAwait) { + this.raise(Errors.AwaitBindingIdentifier, startLoc); + return; + } + if (this.scope.inStaticBlock) { + this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc); + return; + } + this.expressionScope.recordAsyncArrowParametersError(startLoc); + } else if (word === "arguments") { + if (this.scope.inClassAndNotInNonArrowFunction) { + this.raise(Errors.ArgumentsInClass, startLoc); + return; + } + } + } + isAwaitAllowed() { + if (this.prodParam.hasAwait) return true; + if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) { + return true; + } + return false; + } + parseAwait(startLoc) { + const node = this.startNodeAt(startLoc); + this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node); + if (this.eat(55)) { + this.raise(Errors.ObsoleteAwaitStar, node); + } + if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) { + if (this.isAmbiguousAwait()) { + this.ambiguousScriptDifferentAst = true; + } else { + this.sawUnambiguousESM = true; + } + } + if (!this.state.soloAwait) { + node.argument = this.parseMaybeUnary(null, true); + } + return this.finishNode(node, "AwaitExpression"); + } + isAmbiguousAwait() { + if (this.hasPrecedingLineBreak()) return true; + const { + type + } = this.state; + return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 137 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; + } + parseYield() { + const node = this.startNode(); + this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, node); + this.next(); + let delegating = false; + let argument = null; + if (!this.hasPrecedingLineBreak()) { + delegating = this.eat(55); + switch (this.state.type) { + case 13: + case 139: + case 8: + case 11: + case 3: + case 9: + case 14: + case 12: + if (!delegating) break; + default: + argument = this.parseMaybeAssign(); + } + } + node.delegate = delegating; + node.argument = argument; + return this.finishNode(node, "YieldExpression"); + } + parseImportCall(node) { + this.next(); + node.source = this.parseMaybeAssignAllowIn(); + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + node.options = null; + } + if (this.eat(12)) { + this.expectImportAttributesPlugin(); + if (!this.match(11)) { + node.options = this.parseMaybeAssignAllowIn(); + this.eat(12); + } + } + this.expect(11); + return this.finishNode(node, "ImportExpression"); + } + checkPipelineAtInfixOperator(left, leftStartLoc) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + if (left.type === "SequenceExpression") { + this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc); + } + } + } + parseSmartPipelineBodyInStyle(childExpr, startLoc) { + if (this.isSimpleReference(childExpr)) { + const bodyNode = this.startNodeAt(startLoc); + bodyNode.callee = childExpr; + return this.finishNode(bodyNode, "PipelineBareFunction"); + } else { + const bodyNode = this.startNodeAt(startLoc); + this.checkSmartPipeTopicBodyEarlyErrors(startLoc); + bodyNode.expression = childExpr; + return this.finishNode(bodyNode, "PipelineTopicExpression"); + } + } + isSimpleReference(expression) { + switch (expression.type) { + case "MemberExpression": + return !expression.computed && this.isSimpleReference(expression.object); + case "Identifier": + return true; + default: + return false; + } + } + checkSmartPipeTopicBodyEarlyErrors(startLoc) { + if (this.match(19)) { + throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipelineTopicUnused, startLoc); + } + } + withTopicBindingContext(callback) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } + withSmartMixTopicForbiddingContext(callback) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } else { + return callback(); + } + } + withSoloAwaitPermittingContext(callback) { + const outerContextSoloAwaitState = this.state.soloAwait; + this.state.soloAwait = true; + try { + return callback(); + } finally { + this.state.soloAwait = outerContextSoloAwaitState; + } + } + allowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToSet = 8 & ~flags; + if (prodParamToSet) { + this.prodParam.enter(flags | 8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + disallowInAnd(callback) { + const flags = this.prodParam.currentFlags(); + const prodParamToClear = 8 & flags; + if (prodParamToClear) { + this.prodParam.enter(flags & ~8); + try { + return callback(); + } finally { + this.prodParam.exit(); + } + } + return callback(); + } + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + topicReferenceIsAllowedInCurrentContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + topicReferenceWasUsedInCurrentContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + } + parseFSharpPipelineBody(prec) { + const startLoc = this.state.startLoc; + this.state.potentialArrowAt = this.state.start; + const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = true; + const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); + this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; + return ret; + } + parseModuleExpression() { + this.expectPlugin("moduleBlocks"); + const node = this.startNode(); + this.next(); + if (!this.match(5)) { + this.unexpected(null, 5); + } + const program = this.startNodeAt(this.state.endLoc); + this.next(); + const revertScopes = this.initializeScopes(true); + this.enterInitialScopes(); + try { + node.body = this.parseProgram(program, 8, "module"); + } finally { + revertScopes(); + } + return this.finishNode(node, "ModuleExpression"); + } + parsePropertyNamePrefixOperator(prop) {} +} +const loopLabel = { + kind: 1 + }, + switchLabel = { + kind: 2 + }; +const loneSurrogate = /[\uD800-\uDFFF]/u; +const keywordRelationalOperator = /in(?:stanceof)?/y; +function babel7CompatTokens(tokens, input) { + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + const { + type + } = token; + if (typeof type === "number") { + { + if (type === 138) { + const { + loc, + start, + value, + end + } = token; + const hashEndPos = start + 1; + const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); + tokens.splice(i, 1, new Token({ + type: getExportedToken(27), + value: "#", + start: start, + end: hashEndPos, + startLoc: loc.start, + endLoc: hashEndLoc + }), new Token({ + type: getExportedToken(132), + value: value, + start: hashEndPos, + end: end, + startLoc: hashEndLoc, + endLoc: loc.end + })); + i++; + continue; + } + if (tokenIsTemplate(type)) { + const { + loc, + start, + value, + end + } = token; + const backquoteEnd = start + 1; + const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); + let startToken; + if (input.charCodeAt(start) === 96) { + startToken = new Token({ + type: getExportedToken(22), + value: "`", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } else { + startToken = new Token({ + type: getExportedToken(8), + value: "}", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } + let templateValue, templateElementEnd, templateElementEndLoc, endToken; + if (type === 24) { + templateElementEnd = end - 1; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); + templateValue = value === null ? null : value.slice(1, -1); + endToken = new Token({ + type: getExportedToken(22), + value: "`", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } else { + templateElementEnd = end - 2; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); + templateValue = value === null ? null : value.slice(1, -2); + endToken = new Token({ + type: getExportedToken(23), + value: "${", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } + tokens.splice(i, 1, startToken, new Token({ + type: getExportedToken(20), + value: templateValue, + start: backquoteEnd, + end: templateElementEnd, + startLoc: backquoteEndLoc, + endLoc: templateElementEndLoc + }), endToken); + i += 2; + continue; + } + } + token.type = getExportedToken(type); + } + } + return tokens; +} +class StatementParser extends ExpressionParser { + parseTopLevel(file, program) { + file.program = this.parseProgram(program); + file.comments = this.comments; + if (this.options.tokens) { + file.tokens = babel7CompatTokens(this.tokens, this.input); + } + return this.finishNode(file, "File"); + } + parseProgram(program, end = 139, sourceType = this.options.sourceType) { + program.sourceType = sourceType; + program.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(program, true, true, end); + if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { + for (const [localName, at] of Array.from(this.scope.undefinedExports)) { + this.raise(Errors.ModuleExportUndefined, at, { + localName + }); + } + } + let finishedProgram; + if (end === 139) { + finishedProgram = this.finishNode(program, "Program"); + } else { + finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); + } + return finishedProgram; + } + stmtToDirective(stmt) { + const directive = stmt; + directive.type = "Directive"; + directive.value = directive.expression; + delete directive.expression; + const directiveLiteral = directive.value; + const expressionValue = directiveLiteral.value; + const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end); + const val = directiveLiteral.value = raw.slice(1, -1); + this.addExtra(directiveLiteral, "raw", raw); + this.addExtra(directiveLiteral, "rawValue", val); + this.addExtra(directiveLiteral, "expressionValue", expressionValue); + directiveLiteral.type = "DirectiveLiteral"; + return directive; + } + parseInterpreterDirective() { + if (!this.match(28)) { + return null; + } + const node = this.startNode(); + node.value = this.state.value; + this.next(); + return this.finishNode(node, "InterpreterDirective"); + } + isLet() { + if (!this.isContextual(100)) { + return false; + } + return this.hasFollowingBindingAtom(); + } + chStartsBindingIdentifier(ch, pos) { + if (isIdentifierStart(ch)) { + keywordRelationalOperator.lastIndex = pos; + if (keywordRelationalOperator.test(this.input)) { + const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); + if (!isIdentifierChar(endCh) && endCh !== 92) { + return false; + } + } + return true; + } else if (ch === 92) { + return true; + } else { + return false; + } + } + chStartsBindingPattern(ch) { + return ch === 91 || ch === 123; + } + hasFollowingBindingAtom() { + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); + } + hasInLineFollowingBindingIdentifier() { + const next = this.nextTokenInLineStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingIdentifier(nextCh, next); + } + startsUsingForOf() { + const { + type, + containsEsc + } = this.lookahead(); + if (type === 102 && !containsEsc) { + return false; + } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + startsAwaitUsing() { + let next = this.nextTokenInLineStart(); + if (this.isUnparsedContextual(next, "using")) { + next = this.nextTokenInLineStartSince(next + 5); + const nextCh = this.codePointAtPos(next); + if (this.chStartsBindingIdentifier(nextCh, next)) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } + return false; + } + parseModuleItem() { + return this.parseStatementLike(1 | 2 | 4 | 8); + } + parseStatementListItem() { + return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); + } + parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { + let flags = 0; + if (this.options.annexB && !this.state.strict) { + flags |= 4; + if (allowLabeledFunction) { + flags |= 8; + } + } + return this.parseStatementLike(flags); + } + parseStatement() { + return this.parseStatementLike(0); + } + parseStatementLike(flags) { + let decorators = null; + if (this.match(26)) { + decorators = this.parseDecorators(true); + } + return this.parseStatementContent(flags, decorators); + } + parseStatementContent(flags, decorators) { + const starttype = this.state.type; + const node = this.startNode(); + const allowDeclaration = !!(flags & 2); + const allowFunctionDeclaration = !!(flags & 4); + const topLevel = flags & 1; + switch (starttype) { + case 60: + return this.parseBreakContinueStatement(node, true); + case 63: + return this.parseBreakContinueStatement(node, false); + case 64: + return this.parseDebuggerStatement(node); + case 90: + return this.parseDoWhileStatement(node); + case 91: + return this.parseForStatement(node); + case 68: + if (this.lookaheadCharCode() === 46) break; + if (!allowFunctionDeclaration) { + this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, this.state.startLoc); + } + return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); + case 80: + if (!allowDeclaration) this.unexpected(); + return this.parseClass(this.maybeTakeDecorators(decorators, node), true); + case 69: + return this.parseIfStatement(node); + case 70: + return this.parseReturnStatement(node); + case 71: + return this.parseSwitchStatement(node); + case 72: + return this.parseThrowStatement(node); + case 73: + return this.parseTryStatement(node); + case 96: + if (!this.state.containsEsc && this.startsAwaitUsing()) { + if (!this.isAwaitAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, node); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, node); + } + this.next(); + return this.parseVarStatement(node, "await using"); + } + break; + case 107: + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifier()) { + break; + } + this.expectPlugin("explicitResourceManagement"); + if (!this.scope.inModule && this.scope.inTopLevel) { + this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + return this.parseVarStatement(node, "using"); + case 100: + { + if (this.state.containsEsc) { + break; + } + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + if (nextCh !== 91) { + if (!allowDeclaration && this.hasFollowingLineBreak()) break; + if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { + break; + } + } + } + case 75: + { + if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc); + } + } + case 74: + { + const kind = this.state.value; + return this.parseVarStatement(node, kind); + } + case 92: + return this.parseWhileStatement(node); + case 76: + return this.parseWithStatement(node); + case 5: + return this.parseBlock(); + case 13: + return this.parseEmptyStatement(node); + case 83: + { + const nextTokenCharCode = this.lookaheadCharCode(); + if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { + break; + } + } + case 82: + { + if (!this.options.allowImportExportEverywhere && !topLevel) { + this.raise(Errors.UnexpectedImportExport, this.state.startLoc); + } + this.next(); + let result; + if (starttype === 83) { + result = this.parseImport(node); + if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { + this.sawUnambiguousESM = true; + } + } else { + result = this.parseExport(node, decorators); + if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { + this.sawUnambiguousESM = true; + } + } + this.assertModuleNodeAllowed(result); + return result; + } + default: + { + if (this.isAsyncFunction()) { + if (!allowDeclaration) { + this.raise(Errors.AsyncFunctionInSingleStatementContext, this.state.startLoc); + } + this.next(); + return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); + } + } + } + const maybeName = this.state.value; + const expr = this.parseExpression(); + if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) { + return this.parseLabeledStatement(node, maybeName, expr, flags); + } else { + return this.parseExpressionStatement(node, expr, decorators); + } + } + assertModuleNodeAllowed(node) { + if (!this.options.allowImportExportEverywhere && !this.inModule) { + this.raise(Errors.ImportOutsideModule, node); + } + } + decoratorsEnabledBeforeExport() { + if (this.hasPlugin("decorators-legacy")) return true; + return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; + } + maybeTakeDecorators(maybeDecorators, classNode, exportNode) { + if (maybeDecorators) { + if (classNode.decorators && classNode.decorators.length > 0) { + if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { + this.raise(Errors.DecoratorsBeforeAfterExport, classNode.decorators[0]); + } + classNode.decorators.unshift(...maybeDecorators); + } else { + classNode.decorators = maybeDecorators; + } + this.resetStartLocationFromNode(classNode, maybeDecorators[0]); + if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); + } + return classNode; + } + canHaveLeadingDecorator() { + return this.match(80); + } + parseDecorators(allowExport) { + const decorators = []; + do { + decorators.push(this.parseDecorator()); + } while (this.match(26)); + if (this.match(82)) { + if (!allowExport) { + this.unexpected(); + } + if (!this.decoratorsEnabledBeforeExport()) { + this.raise(Errors.DecoratorExportClass, this.state.startLoc); + } + } else if (!this.canHaveLeadingDecorator()) { + throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); + } + return decorators; + } + parseDecorator() { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + const node = this.startNode(); + this.next(); + if (this.hasPlugin("decorators")) { + const startLoc = this.state.startLoc; + let expr; + if (this.match(10)) { + const startLoc = this.state.startLoc; + this.next(); + expr = this.parseExpression(); + this.expect(11); + expr = this.wrapParenthesis(startLoc, expr); + const paramsStartLoc = this.state.startLoc; + node.expression = this.parseMaybeDecoratorArguments(expr); + if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { + this.raise(Errors.DecoratorArgumentsOutsideParentheses, paramsStartLoc); + } + } else { + expr = this.parseIdentifier(false); + while (this.eat(16)) { + const node = this.startNodeAt(startLoc); + node.object = expr; + if (this.match(138)) { + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } + node.computed = false; + expr = this.finishNode(node, "MemberExpression"); + } + node.expression = this.parseMaybeDecoratorArguments(expr); + } + } else { + node.expression = this.parseExprSubscripts(); + } + return this.finishNode(node, "Decorator"); + } + parseMaybeDecoratorArguments(expr) { + if (this.eat(10)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(11, false); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + return expr; + } + parseBreakContinueStatement(node, isBreak) { + this.next(); + if (this.isLineTerminator()) { + node.label = null; + } else { + node.label = this.parseIdentifier(); + this.semicolon(); + } + this.verifyBreakContinue(node, isBreak); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + } + verifyBreakContinue(node, isBreak) { + let i; + for (i = 0; i < this.state.labels.length; ++i) { + const lab = this.state.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === 1)) { + break; + } + if (node.label && isBreak) break; + } + } + if (i === this.state.labels.length) { + const type = isBreak ? "BreakStatement" : "ContinueStatement"; + this.raise(Errors.IllegalBreakContinue, node, { + type + }); + } + } + parseDebuggerStatement(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); + } + parseHeaderExpression() { + this.expect(10); + const val = this.parseExpression(); + this.expect(11); + return val; + } + parseDoWhileStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + this.expect(92); + node.test = this.parseHeaderExpression(); + this.eat(13); + return this.finishNode(node, "DoWhileStatement"); + } + parseForStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + let awaitAt = null; + if (this.isAwaitAllowed() && this.eatContextual(96)) { + awaitAt = this.state.lastTokStartLoc; + } + this.scope.enter(0); + this.expect(10); + if (this.match(13)) { + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, null); + } + const startsWithLet = this.isContextual(100); + { + const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); + const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); + const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; + if (this.match(74) || this.match(75) || isLetOrUsing) { + const initNode = this.startNode(); + let kind; + if (startsWithAwaitUsing) { + kind = "await using"; + if (!this.isAwaitAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc); + } + this.next(); + } else { + kind = this.state.value; + } + this.next(); + this.parseVar(initNode, true, kind); + const init = this.finishNode(initNode, "VariableDeclaration"); + const isForIn = this.match(58); + if (isForIn && starsWithUsingDeclaration) { + this.raise(Errors.ForInUsing, init); + } + if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { + return this.parseForIn(node, init, awaitAt); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + } + const startsWithAsync = this.isContextual(95); + const refExpressionErrors = new ExpressionErrors(); + const init = this.parseExpression(true, refExpressionErrors); + const isForOf = this.isContextual(102); + if (isForOf) { + if (startsWithLet) { + this.raise(Errors.ForOfLet, init); + } + if (awaitAt === null && startsWithAsync && init.type === "Identifier") { + this.raise(Errors.ForOfAsync, init); + } + } + if (isForOf || this.match(58)) { + this.checkDestructuringPrivate(refExpressionErrors); + this.toAssignable(init, true); + const type = isForOf ? "ForOfStatement" : "ForInStatement"; + this.checkLVal(init, { + in: { + type + } + }); + return this.parseForIn(node, init, awaitAt); + } else { + this.checkExpressionErrors(refExpressionErrors, true); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); + } + parseFunctionStatement(node, isAsync, isHangingDeclaration) { + this.next(); + return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); + } + parseIfStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); + node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; + return this.finishNode(node, "IfStatement"); + } + parseReturnStatement(node) { + if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) { + this.raise(Errors.IllegalReturn, this.state.startLoc); + } + this.next(); + if (this.isLineTerminator()) { + node.argument = null; + } else { + node.argument = this.parseExpression(); + this.semicolon(); + } + return this.finishNode(node, "ReturnStatement"); + } + parseSwitchStatement(node) { + this.next(); + node.discriminant = this.parseHeaderExpression(); + const cases = node.cases = []; + this.expect(5); + this.state.labels.push(switchLabel); + this.scope.enter(0); + let cur; + for (let sawDefault; !this.match(8);) { + if (this.match(61) || this.match(65)) { + const isCase = this.match(61); + if (cur) this.finishNode(cur, "SwitchCase"); + cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raise(Errors.MultipleDefaultsInSwitch, this.state.lastTokStartLoc); + } + sawDefault = true; + cur.test = null; + } + this.expect(14); + } else { + if (cur) { + cur.consequent.push(this.parseStatementListItem()); + } else { + this.unexpected(); + } + } + } + this.scope.exit(); + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(node, "SwitchStatement"); + } + parseThrowStatement(node) { + this.next(); + if (this.hasPrecedingLineBreak()) { + this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc); + } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); + } + parseCatchClauseParam() { + const param = this.parseBindingAtom(); + this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); + this.checkLVal(param, { + in: { + type: "CatchClause" + }, + binding: 9 + }); + return param; + } + parseTryStatement(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.match(62)) { + const clause = this.startNode(); + this.next(); + if (this.match(10)) { + this.expect(10); + clause.param = this.parseCatchClauseParam(); + this.expect(11); + } else { + clause.param = null; + this.scope.enter(0); + } + clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); + this.scope.exit(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(67) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) { + this.raise(Errors.NoCatchOrFinally, node); + } + return this.finishNode(node, "TryStatement"); + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); + } + parseWhileStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + this.state.labels.push(loopLabel); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); + } + parseWithStatement(node) { + if (this.state.strict) { + this.raise(Errors.StrictWith, this.state.startLoc); + } + this.next(); + node.object = this.parseHeaderExpression(); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + return this.finishNode(node, "WithStatement"); + } + parseEmptyStatement(node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); + } + parseLabeledStatement(node, maybeName, expr, flags) { + for (const label of this.state.labels) { + if (label.name === maybeName) { + this.raise(Errors.LabelRedeclaration, expr, { + labelName: maybeName + }); + } + } + const kind = tokenIsLoop(this.state.type) ? 1 : this.match(71) ? 2 : null; + for (let i = this.state.labels.length - 1; i >= 0; i--) { + const label = this.state.labels[i]; + if (label.statementStart === node.start) { + label.statementStart = this.state.start; + label.kind = kind; + } else { + break; + } + } + this.state.labels.push({ + name: maybeName, + kind: kind, + statementStart: this.state.start + }); + node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); + this.state.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); + } + parseExpressionStatement(node, expr, decorators) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); + } + parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { + const node = this.startNode(); + if (allowDirectives) { + this.state.strictErrors.clear(); + } + this.expect(5); + if (createNewLexicalScope) { + this.scope.enter(0); + } + this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); + if (createNewLexicalScope) { + this.scope.exit(); + } + return this.finishNode(node, "BlockStatement"); + } + isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; + } + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + const body = node.body = []; + const directives = node.directives = []; + this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); + } + parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { + const oldStrict = this.state.strict; + let hasStrictModeDirective = false; + let parsedNonDirective = false; + while (!this.match(end)) { + const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); + if (directives && !parsedNonDirective) { + if (this.isValidDirective(stmt)) { + const directive = this.stmtToDirective(stmt); + directives.push(directive); + if (!hasStrictModeDirective && directive.value.value === "use strict") { + hasStrictModeDirective = true; + this.setStrict(true); + } + continue; + } + parsedNonDirective = true; + this.state.strictErrors.clear(); + } + body.push(stmt); + } + afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); + if (!oldStrict) { + this.setStrict(false); + } + this.next(); + } + parseFor(node, init) { + node.init = init; + this.semicolon(false); + node.test = this.match(13) ? null : this.parseExpression(); + this.semicolon(false); + node.update = this.match(11) ? null : this.parseExpression(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); + } + parseForIn(node, init, awaitAt) { + const isForIn = this.match(58); + this.next(); + if (isForIn) { + if (awaitAt !== null) this.unexpected(awaitAt); + } else { + node.await = awaitAt !== null; + } + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { + this.raise(Errors.ForInOfLoopInitializer, init, { + type: isForIn ? "ForInStatement" : "ForOfStatement" + }); + } + if (init.type === "AssignmentPattern") { + this.raise(Errors.InvalidLhs, init, { + ancestor: { + type: "ForStatement" + } + }); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); + this.expect(11); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); + } + parseVar(node, isFor, kind, allowMissingInitializer = false) { + const declarations = node.declarations = []; + node.kind = kind; + for (;;) { + const decl = this.startNode(); + this.parseVarId(decl, kind); + decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); + if (decl.init === null && !allowMissingInitializer) { + if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind: "destructuring" + }); + } else if (kind === "const" && !(this.match(58) || this.isContextual(102))) { + this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { + kind: "const" + }); + } + } + declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(12)) break; + } + return node; + } + parseVarId(decl, kind) { + const id = this.parseBindingAtom(); + this.checkLVal(id, { + in: { + type: "VariableDeclarator" + }, + binding: kind === "var" ? 5 : 8201 + }); + decl.id = id; + } + parseAsyncFunctionExpression(node) { + return this.parseFunction(node, 8); + } + parseFunction(node, flags = 0) { + const hangingDeclaration = flags & 2; + const isDeclaration = !!(flags & 1); + const requireId = isDeclaration && !(flags & 4); + const isAsync = !!(flags & 8); + this.initFunction(node, isAsync); + if (this.match(55)) { + if (hangingDeclaration) { + this.raise(Errors.GeneratorInSingleStatementContext, this.state.startLoc); + } + this.next(); + node.generator = true; + } + if (isDeclaration) { + node.id = this.parseFunctionId(requireId); + } + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = false; + this.scope.enter(2); + this.prodParam.enter(functionFlags(isAsync, node.generator)); + if (!isDeclaration) { + node.id = this.parseFunctionId(); + } + this.parseFunctionParams(node, false); + this.withSmartMixTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.prodParam.exit(); + this.scope.exit(); + if (isDeclaration && !hangingDeclaration) { + this.registerFunctionStatementId(node); + } + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return node; + } + parseFunctionId(requireId) { + return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; + } + parseFunctionParams(node, isConstructor) { + this.expect(10); + this.expressionScope.enter(newParameterDeclarationScope()); + node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); + this.expressionScope.exit(); + } + registerFunctionStatementId(node) { + if (!node.id) return; + this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); + } + parseClass(node, isStatement, optionalId) { + this.next(); + const oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassId(node, isStatement, optionalId); + this.parseClassSuper(node); + node.body = this.parseClassBody(!!node.superClass, oldStrict); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } + isClassProperty() { + return this.match(29) || this.match(13) || this.match(8); + } + isClassMethod() { + return this.match(10); + } + isNonstaticConstructor(method) { + return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); + } + parseClassBody(hadSuperClass, oldStrict) { + this.classScope.enter(); + const state = { + hadConstructor: false, + hadSuperClass + }; + let decorators = []; + const classBody = this.startNode(); + classBody.body = []; + this.expect(5); + this.withSmartMixTopicForbiddingContext(() => { + while (!this.match(8)) { + if (this.eat(13)) { + if (decorators.length > 0) { + throw this.raise(Errors.DecoratorSemicolon, this.state.lastTokEndLoc); + } + continue; + } + if (this.match(26)) { + decorators.push(this.parseDecorator()); + continue; + } + const member = this.startNode(); + if (decorators.length) { + member.decorators = decorators; + this.resetStartLocationFromNode(member, decorators[0]); + decorators = []; + } + this.parseClassMember(classBody, member, state); + if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { + this.raise(Errors.DecoratorConstructor, member); + } + } + }); + this.state.strict = oldStrict; + this.next(); + if (decorators.length) { + throw this.raise(Errors.TrailingDecorator, this.state.startLoc); + } + this.classScope.exit(); + return this.finishNode(classBody, "ClassBody"); + } + parseClassMemberFromModifier(classBody, member) { + const key = this.parseIdentifier(true); + if (this.isClassMethod()) { + const method = member; + method.kind = "method"; + method.computed = false; + method.key = key; + method.static = false; + this.pushClassMethod(classBody, method, false, false, false, false); + return true; + } else if (this.isClassProperty()) { + const prop = member; + prop.computed = false; + prop.key = key; + prop.static = false; + classBody.body.push(this.parseClassProperty(prop)); + return true; + } + this.resetPreviousNodeTrailingComments(key); + return false; + } + parseClassMember(classBody, member, state) { + const isStatic = this.isContextual(106); + if (isStatic) { + if (this.parseClassMemberFromModifier(classBody, member)) { + return; + } + if (this.eat(5)) { + this.parseClassStaticBlock(classBody, member); + return; + } + } + this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + } + parseClassMemberWithIsStatic(classBody, member, state, isStatic) { + const publicMethod = member; + const privateMethod = member; + const publicProp = member; + const privateProp = member; + const accessorProp = member; + const method = publicMethod; + const publicMember = publicMethod; + member.static = isStatic; + this.parsePropertyNamePrefixOperator(member); + if (this.eat(55)) { + method.kind = "method"; + const isPrivateName = this.match(138); + this.parseClassElementName(method); + if (isPrivateName) { + this.pushClassPrivateMethod(classBody, privateMethod, true, false); + return; + } + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsGenerator, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, true, false, false, false); + return; + } + const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc; + const isPrivate = this.match(138); + const key = this.parseClassElementName(member); + const maybeQuestionTokenStartLoc = this.state.startLoc; + this.parsePostMemberNameModifiers(publicMember); + if (this.isClassMethod()) { + method.kind = "method"; + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + return; + } + const isConstructor = this.isNonstaticConstructor(publicMethod); + let allowsDirectSuper = false; + if (isConstructor) { + publicMethod.kind = "constructor"; + if (state.hadConstructor && !this.hasPlugin("typescript")) { + this.raise(Errors.DuplicateConstructor, key); + } + if (isConstructor && this.hasPlugin("typescript") && member.override) { + this.raise(Errors.OverrideOnConstructor, key); + } + state.hadConstructor = true; + allowsDirectSuper = state.hadSuperClass; + } + this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); + } else if (this.isClassProperty()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else if (isContextual && key.name === "async" && !this.isLineTerminator()) { + this.resetPreviousNodeTrailingComments(key); + const isGenerator = this.eat(55); + if (publicMember.optional) { + this.unexpected(maybeQuestionTokenStartLoc); + } + method.kind = "method"; + const isPrivate = this.match(138); + this.parseClassElementName(method); + this.parsePostMemberNameModifiers(publicMember); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAsync, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); + } + } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(55) && this.isLineTerminator())) { + this.resetPreviousNodeTrailingComments(key); + method.kind = key.name; + const isPrivate = this.match(138); + this.parseClassElementName(publicMethod); + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(Errors.ConstructorIsAccessor, publicMethod.key); + } + this.pushClassMethod(classBody, publicMethod, false, false, false, false); + } + this.checkGetterSetterParams(publicMethod); + } else if (isContextual && key.name === "accessor" && !this.isLineTerminator()) { + this.expectPlugin("decoratorAutoAccessors"); + this.resetPreviousNodeTrailingComments(key); + const isPrivate = this.match(138); + this.parseClassElementName(publicProp); + this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); + } else if (this.isLineTerminator()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else { + this.unexpected(); + } + } + parseClassElementName(member) { + const { + type, + value + } = this.state; + if ((type === 132 || type === 133) && member.static && value === "prototype") { + this.raise(Errors.StaticPrototype, this.state.startLoc); + } + if (type === 138) { + if (value === "constructor") { + this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc); + } + const key = this.parsePrivateName(); + member.key = key; + return key; + } + return this.parsePropertyName(member); + } + parseClassStaticBlock(classBody, member) { + var _member$decorators; + this.scope.enter(64 | 128 | 16); + const oldLabels = this.state.labels; + this.state.labels = []; + this.prodParam.enter(0); + const body = member.body = []; + this.parseBlockOrModuleBlockBody(body, undefined, false, 8); + this.prodParam.exit(); + this.scope.exit(); + this.state.labels = oldLabels; + classBody.body.push(this.finishNode(member, "StaticBlock")); + if ((_member$decorators = member.decorators) != null && _member$decorators.length) { + this.raise(Errors.DecoratorStaticBlock, member); + } + } + pushClassProperty(classBody, prop) { + if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) { + this.raise(Errors.ConstructorClassField, prop.key); + } + classBody.body.push(this.parseClassProperty(prop)); + } + pushClassPrivateProperty(classBody, prop) { + const node = this.parseClassPrivateProperty(prop); + classBody.body.push(node); + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + pushClassAccessorProperty(classBody, prop, isPrivate) { + if (!isPrivate && !prop.computed) { + const key = prop.key; + if (key.name === "constructor" || key.value === "constructor") { + this.raise(Errors.ConstructorClassField, key); + } + } + const node = this.parseClassAccessorProperty(prop); + classBody.body.push(node); + if (isPrivate) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + } + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); + } + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); + classBody.body.push(node); + const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; + this.declareClassPrivateMethodInScope(node, kind); + } + declareClassPrivateMethodInScope(node, kind) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); + } + parsePostMemberNameModifiers(methodOrProp) {} + parseClassPrivateProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassPrivateProperty"); + } + parseClassProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassProperty"); + } + parseClassAccessorProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassAccessorProperty"); + } + parseInitializer(node) { + this.scope.enter(64 | 16); + this.expressionScope.enter(newExpressionScope()); + this.prodParam.enter(0); + node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; + this.expressionScope.exit(); + this.prodParam.exit(); + this.scope.exit(); + } + parseClassId(node, isStatement, optionalId, bindingType = 8331) { + if (tokenIsIdentifier(this.state.type)) { + node.id = this.parseIdentifier(); + if (isStatement) { + this.declareNameFromIdentifier(node.id, bindingType); + } + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + throw this.raise(Errors.MissingClassName, this.state.startLoc); + } + } + } + parseClassSuper(node) { + node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; + } + parseExport(node, decorators) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); + const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); + const parseAfterDefault = !hasDefault || this.eat(12); + const hasStar = parseAfterDefault && this.eatExportStar(node); + const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); + const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); + const isFromRequired = hasDefault || hasStar; + if (hasStar && !hasNamespace) { + if (hasDefault) this.unexpected(); + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); + } + const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { + this.unexpected(null, 5); + } + if (hasNamespace && parseAfterNamespace) { + this.unexpected(null, 98); + } + let hasDeclaration; + if (isFromRequired || hasSpecifiers) { + hasDeclaration = false; + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.parseExportFrom(node, isFromRequired); + } else { + hasDeclaration = this.maybeParseExportDeclaration(node); + } + if (isFromRequired || hasSpecifiers || hasDeclaration) { + var _node2$declaration; + const node2 = node; + this.checkExport(node2, true, false, !!node2.source); + if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, node2.declaration, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + return this.finishNode(node2, "ExportNamedDeclaration"); + } + if (this.eat(65)) { + const node2 = node; + const decl = this.parseExportDefaultExpression(); + node2.declaration = decl; + if (decl.type === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, decl, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, node); + } + this.checkExport(node2, true, true); + return this.finishNode(node2, "ExportDefaultDeclaration"); + } + this.unexpected(null, 5); + } + eatExportStar(node) { + return this.eat(55); + } + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); + const id = maybeDefaultIdentifier || this.parseIdentifier(true); + const specifier = this.startNodeAtNode(id); + specifier.exported = id; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return true; + } + return false; + } + maybeParseExportNamespaceSpecifier(node) { + if (this.isContextual(93)) { + if (!node.specifiers) node.specifiers = []; + const specifier = this.startNodeAt(this.state.lastTokStartLoc); + this.next(); + specifier.exported = this.parseModuleExportName(); + node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); + return true; + } + return false; + } + maybeParseExportNamedSpecifiers(node) { + if (this.match(5)) { + if (!node.specifiers) node.specifiers = []; + const isTypeExport = node.exportKind === "type"; + node.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); + node.source = null; + node.declaration = null; + if (this.hasPlugin("importAssertions")) { + node.assertions = []; + } + return true; + } + return false; + } + maybeParseExportDeclaration(node) { + if (this.shouldParseExportDeclaration()) { + node.specifiers = []; + node.source = null; + if (this.hasPlugin("importAssertions")) { + node.assertions = []; + } + node.declaration = this.parseExportDeclaration(node); + return true; + } + return false; + } + isAsyncFunction() { + if (!this.isContextual(95)) return false; + const next = this.nextTokenInLineStart(); + return this.isUnparsedContextual(next, "function"); + } + parseExportDefaultExpression() { + const expr = this.startNode(); + if (this.match(68)) { + this.next(); + return this.parseFunction(expr, 1 | 4); + } else if (this.isAsyncFunction()) { + this.next(); + this.next(); + return this.parseFunction(expr, 1 | 4 | 8); + } + if (this.match(80)) { + return this.parseClass(expr, true, true); + } + if (this.match(26)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); + } + if (this.match(75) || this.match(74) || this.isLet()) { + throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc); + } + const res = this.parseMaybeAssignAllowIn(); + this.semicolon(); + return res; + } + parseExportDeclaration(node) { + if (this.match(80)) { + const node = this.parseClass(this.startNode(), true, false); + return node; + } + return this.parseStatementListItem(); + } + isExportDefaultSpecifier() { + const { + type + } = this.state; + if (tokenIsIdentifier(type)) { + if (type === 95 && !this.state.containsEsc || type === 100) { + return false; + } + if ((type === 130 || type === 129) && !this.state.containsEsc) { + const { + type: nextType + } = this.lookahead(); + if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { + this.expectOnePlugin(["flow", "typescript"]); + return false; + } + } + } else if (!this.match(65)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { + return true; + } + if (this.match(65) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + parseExportFrom(node, expect) { + if (this.eatContextual(98)) { + node.source = this.parseImportSource(); + this.checkExport(node); + this.maybeParseImportAttributes(node); + this.checkJSONModuleImport(node); + } else if (expect) { + this.unexpected(); + } + this.semicolon(); + } + shouldParseExportDeclaration() { + const { + type + } = this.state; + if (type === 26) { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + if (this.hasPlugin("decorators")) { + if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, this.state.startLoc); + } + return true; + } + } + return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); + } + checkExport(node, checkNames, isDefault, isFrom) { + if (checkNames) { + var _node$specifiers; + if (isDefault) { + this.checkDuplicateExports(node, "default"); + if (this.hasPlugin("exportDefaultFrom")) { + var _declaration$extra; + const declaration = node.declaration; + if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { + this.raise(Errors.ExportDefaultFromAsIdentifier, declaration); + } + } + } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { + for (const specifier of node.specifiers) { + const { + exported + } = specifier; + const exportName = exported.type === "Identifier" ? exported.name : exported.value; + this.checkDuplicateExports(specifier, exportName); + if (!isFrom && specifier.local) { + const { + local + } = specifier; + if (local.type !== "Identifier") { + this.raise(Errors.ExportBindingIsString, specifier, { + localName: local.value, + exportName + }); + } else { + this.checkReservedWord(local.name, local.loc.start, true, false); + this.scope.checkLocalExport(local); + } + } + } + } else if (node.declaration) { + if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { + const id = node.declaration.id; + if (!id) throw new Error("Assertion failure"); + this.checkDuplicateExports(node, id.name); + } else if (node.declaration.type === "VariableDeclaration") { + for (const declaration of node.declaration.declarations) { + this.checkDeclaration(declaration.id); + } + } + } + } + } + checkDeclaration(node) { + if (node.type === "Identifier") { + this.checkDuplicateExports(node, node.name); + } else if (node.type === "ObjectPattern") { + for (const prop of node.properties) { + this.checkDeclaration(prop); + } + } else if (node.type === "ArrayPattern") { + for (const elem of node.elements) { + if (elem) { + this.checkDeclaration(elem); + } + } + } else if (node.type === "ObjectProperty") { + this.checkDeclaration(node.value); + } else if (node.type === "RestElement") { + this.checkDeclaration(node.argument); + } else if (node.type === "AssignmentPattern") { + this.checkDeclaration(node.left); + } + } + checkDuplicateExports(node, exportName) { + if (this.exportedIdentifiers.has(exportName)) { + if (exportName === "default") { + this.raise(Errors.DuplicateDefaultExport, node); + } else { + this.raise(Errors.DuplicateExport, node, { + exportName + }); + } + } + this.exportedIdentifiers.add(exportName); + } + parseExportSpecifiers(isInTypeExport) { + const nodes = []; + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + this.expect(12); + if (this.eat(8)) break; + } + const isMaybeTypeOnly = this.isContextual(130); + const isString = this.match(133); + const node = this.startNode(); + node.local = this.parseModuleExportName(); + nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); + } + return nodes; + } + parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { + if (this.eatContextual(93)) { + node.exported = this.parseModuleExportName(); + } else if (isString) { + node.exported = cloneStringLiteral(node.local); + } else if (!node.exported) { + node.exported = cloneIdentifier(node.local); + } + return this.finishNode(node, "ExportSpecifier"); + } + parseModuleExportName() { + if (this.match(133)) { + const result = this.parseStringLiteral(this.state.value); + const surrogate = result.value.match(loneSurrogate); + if (surrogate) { + this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, { + surrogateCharCode: surrogate[0].charCodeAt(0) + }); + } + return result; + } + return this.parseIdentifier(true); + } + isJSONModuleImport(node) { + if (node.assertions != null) { + return node.assertions.some(({ + key, + value + }) => { + return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); + }); + } + return false; + } + checkImportReflection(node) { + const { + specifiers + } = node; + const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; + if (node.phase === "source") { + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.SourcePhaseImportRequiresDefault, specifiers[0].loc.start); + } + } else if (node.phase === "defer") { + if (singleBindingType !== "ImportNamespaceSpecifier") { + this.raise(Errors.DeferImportRequiresNamespace, specifiers[0].loc.start); + } + } else if (node.module) { + var _node$assertions; + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); + } + if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { + this.raise(Errors.ImportReflectionHasAssertion, specifiers[0].loc.start); + } + } + } + checkJSONModuleImport(node) { + if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { + const { + specifiers + } = node; + if (specifiers != null) { + const nonDefaultNamedSpecifier = specifiers.find(specifier => { + let imported; + if (specifier.type === "ExportSpecifier") { + imported = specifier.local; + } else if (specifier.type === "ImportSpecifier") { + imported = specifier.imported; + } + if (imported !== undefined) { + return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; + } + }); + if (nonDefaultNamedSpecifier !== undefined) { + this.raise(Errors.ImportJSONBindingNotDefault, nonDefaultNamedSpecifier.loc.start); + } + } + } + } + isPotentialImportPhase(isExport) { + if (isExport) return false; + return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); + } + applyImportPhase(node, isExport, phase, loc) { + if (isExport) { + return; + } + if (phase === "module") { + this.expectPlugin("importReflection", loc); + node.module = true; + } else if (this.hasPlugin("importReflection")) { + node.module = false; + } + if (phase === "source") { + this.expectPlugin("sourcePhaseImports", loc); + node.phase = "source"; + } else if (phase === "defer") { + this.expectPlugin("deferredImportEvaluation", loc); + node.phase = "defer"; + } else if (this.hasPlugin("sourcePhaseImports")) { + node.phase = null; + } + } + parseMaybeImportPhase(node, isExport) { + if (!this.isPotentialImportPhase(isExport)) { + this.applyImportPhase(node, isExport, null); + return null; + } + const phaseIdentifier = this.parseIdentifier(true); + const { + type + } = this.state; + const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + if (isImportPhase) { + this.resetPreviousIdentifierLeadingComments(phaseIdentifier); + this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); + return null; + } else { + this.applyImportPhase(node, isExport, null); + return phaseIdentifier; + } + } + isPrecedingIdImportPhase(phase) { + const { + type + } = this.state; + return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + } + parseImport(node) { + if (this.match(133)) { + return this.parseImportSourceAndAttributes(node); + } + return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); + } + parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { + node.specifiers = []; + const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); + const parseNext = !hasDefault || this.eat(12); + const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual(98); + return this.parseImportSourceAndAttributes(node); + } + parseImportSourceAndAttributes(node) { + var _node$specifiers2; + (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; + node.source = this.parseImportSource(); + this.maybeParseImportAttributes(node); + this.checkImportReflection(node); + this.checkJSONModuleImport(node); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + parseImportSource() { + if (!this.match(133)) this.unexpected(); + return this.parseExprAtom(); + } + parseImportSpecifierLocal(node, specifier, type) { + specifier.local = this.parseIdentifier(); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); + } + finishImportSpecifier(specifier, type, bindingType = 8201) { + this.checkLVal(specifier.local, { + in: { + type + }, + binding: bindingType + }); + return this.finishNode(specifier, type); + } + parseImportAttributes() { + this.expect(5); + const attrs = []; + const attrNames = new Set(); + do { + if (this.match(8)) { + break; + } + const node = this.startNode(); + const keyName = this.state.value; + if (attrNames.has(keyName)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { + key: keyName + }); + } + attrNames.add(keyName); + if (this.match(133)) { + node.key = this.parseStringLiteral(keyName); + } else { + node.key = this.parseIdentifier(true); + } + this.expect(14); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + this.expect(8); + return attrs; + } + parseModuleAttributes() { + const attrs = []; + const attributes = new Set(); + do { + const node = this.startNode(); + node.key = this.parseIdentifier(true); + if (node.key.name !== "type") { + this.raise(Errors.ModuleAttributeDifferentFromType, node.key); + } + if (attributes.has(node.key.name)) { + this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, { + key: node.key.name + }); + } + attributes.add(node.key.name); + this.expect(14); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc); + } + node.value = this.parseStringLiteral(this.state.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(12)); + return attrs; + } + maybeParseImportAttributes(node) { + let attributes; + let useWith = false; + if (this.match(76)) { + if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { + return; + } + this.next(); + { + if (this.hasPlugin("moduleAttributes")) { + attributes = this.parseModuleAttributes(); + } else { + this.expectImportAttributesPlugin(); + attributes = this.parseImportAttributes(); + } + } + useWith = true; + } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { + if (this.hasPlugin("importAttributes")) { + if (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !== true) { + this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc); + } + this.addExtra(node, "deprecatedAssertSyntax", true); + } else { + this.expectOnePlugin(["importAttributes", "importAssertions"]); + } + this.next(); + attributes = this.parseImportAttributes(); + } else if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + attributes = []; + } else { + if (this.hasPlugin("moduleAttributes")) { + attributes = []; + } else return; + } + if (!useWith && this.hasPlugin("importAssertions")) { + node.assertions = attributes; + } else { + node.attributes = attributes; + } + } + maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier) { + const specifier = this.startNodeAtNode(maybeDefaultIdentifier); + specifier.local = maybeDefaultIdentifier; + node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); + return true; + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); + return true; + } + return false; + } + maybeParseStarImportSpecifier(node) { + if (this.match(55)) { + const specifier = this.startNode(); + this.next(); + this.expectContextual(93); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); + return true; + } + return false; + } + parseNamedImportSpecifiers(node) { + let first = true; + this.expect(5); + while (!this.eat(8)) { + if (first) { + first = false; + } else { + if (this.eat(14)) { + throw this.raise(Errors.DestructureNamedImport, this.state.startLoc); + } + this.expect(12); + if (this.eat(8)) break; + } + const specifier = this.startNode(); + const importedIsString = this.match(133); + const isMaybeTypeOnly = this.isContextual(130); + specifier.imported = this.parseModuleExportName(); + const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); + node.specifiers.push(importSpecifier); + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (this.eatContextual(93)) { + specifier.local = this.parseIdentifier(); + } else { + const { + imported + } = specifier; + if (importedIsString) { + throw this.raise(Errors.ImportBindingIsString, specifier, { + importName: imported.value + }); + } + this.checkReservedWord(imported.name, specifier.loc.start, true, true); + if (!specifier.local) { + specifier.local = cloneIdentifier(imported); + } + } + return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); + } + isThisParam(param) { + return param.type === "Identifier" && param.name === "this"; + } +} +class Parser extends StatementParser { + constructor(options, input) { + options = getOptions(options); + super(options, input); + this.options = options; + this.initializeScopes(); + this.plugins = pluginsMap(this.options.plugins); + this.filename = options.sourceFilename; + } + getScopeHandler() { + return ScopeHandler; + } + parse() { + this.enterInitialScopes(); + const file = this.startNode(); + const program = this.startNode(); + this.nextToken(); + file.errors = null; + this.parseTopLevel(file, program); + file.errors = this.state.errors; + file.comments.length = this.state.commentsLen; + return file; + } +} +function pluginsMap(plugins) { + const pluginMap = new Map(); + for (const plugin of plugins) { + const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; + if (!pluginMap.has(name)) pluginMap.set(name, options || {}); + } + return pluginMap; +} +function parse(input, options) { + var _options; + if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { + options = Object.assign({}, options); + try { + options.sourceType = "module"; + const parser = getParser(options, input); + const ast = parser.parse(); + if (parser.sawUnambiguousESM) { + return ast; + } + if (parser.ambiguousScriptDifferentAst) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused) {} + } else { + ast.program.sourceType = "script"; + } + return ast; + } catch (moduleError) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (_unused2) {} + throw moduleError; + } + } else { + return getParser(options, input).parse(); + } +} +function parseExpression(input, options) { + const parser = getParser(options, input); + if (parser.options.strictMode) { + parser.state.strict = true; + } + return parser.getExpression(); +} +function generateExportedTokenTypes(internalTokenTypes) { + const tokenTypes = {}; + for (const typeName of Object.keys(internalTokenTypes)) { + tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); + } + return tokenTypes; +} +const tokTypes = generateExportedTokenTypes(tt); +function getParser(options, input) { + let cls = Parser; + if (options != null && options.plugins) { + validatePlugins(options.plugins); + cls = getParserClass(options.plugins); + } + return new cls(options, input); +} +const parserClassCache = {}; +function getParserClass(pluginsFromOptions) { + const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); + const key = pluginList.join("/"); + let cls = parserClassCache[key]; + if (!cls) { + cls = Parser; + for (const plugin of pluginList) { + cls = mixinPlugins[plugin](cls); + } + parserClassCache[key] = cls; + } + return cls; +} +exports.parse = parse; +exports.parseExpression = parseExpression; +exports.tokTypes = tokTypes; +//# sourceMappingURL=index.js.map diff --git a/paperai-docs/node_modules/@babel/parser/lib/index.js.map b/paperai-docs/node_modules/@babel/parser/lib/index.js.map new file mode 100644 index 00000000..0063886b --- /dev/null +++ b/paperai-docs/node_modules/@babel/parser/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/util/location.ts","../src/parse-error/module-errors.ts","../src/parse-error/to-node-description.ts","../src/parse-error/standard-errors.ts","../src/parse-error/strict-mode-errors.ts","../src/parse-error/pipeline-operator-errors.ts","../src/parse-error.ts","../src/plugins/estree.ts","../src/tokenizer/context.ts","../src/tokenizer/types.ts","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.ts","../src/util/scope.ts","../src/plugins/flow/scope.ts","../src/parser/base.ts","../src/parser/comments.ts","../src/util/whitespace.ts","../src/tokenizer/state.ts","../../babel-helper-string-parser/src/index.ts","../src/tokenizer/index.ts","../src/util/class-scope.ts","../src/util/expression-scope.ts","../src/util/production-parameter.ts","../src/parser/util.ts","../src/parser/node.ts","../src/plugins/flow/index.ts","../src/plugins/jsx/xhtml.ts","../src/plugins/jsx/index.ts","../src/plugins/typescript/scope.ts","../src/parser/lval.ts","../src/plugins/typescript/index.ts","../src/plugins/placeholders.ts","../src/plugins/v8intrinsic.ts","../src/plugin-utils.ts","../src/options.ts","../src/parser/expression.ts","../src/parser/statement.ts","../src/parser/index.ts","../src/index.ts"],"sourcesContent":["export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\n// @ts-expect-error prefix is specified only when type is UpdateExpression\n// eslint-disable-next-line no-confusing-arrow\nconst toNodeDescription = ({ type, prefix }: NodeWithDescription) =>\n type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[String(prefix) as \"true\" | \"false\"]\n : NodeDescriptions[type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"const\" | \"destructuring\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeferImportRequiresNamespace:\n 'Only `import defer * as x from \"./module\"` is valid.',\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n DynamicImportPhaseRequiresImportExpressions: ({ phase }: { phase: string }) =>\n `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`,\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n\n IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: ({ maxArgumentCount }: { maxArgumentCount: 1 | 2 }) =>\n `\\`import()\\` requires exactly ${\n maxArgumentCount === 1 ? \"one argument\" : \"one or two arguments\"\n }.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n ancestor,\n )}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n SourcePhaseImportRequiresDefault:\n 'Only `import source x from \"./module\"` is valid.',\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n StrictDelete: \"Deleting local variable in strict mode.\",\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n `Assigning to '${referenceName}' in strict mode.`,\n\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType> = T extends Set\n ? M\n : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\ntype ParseErrorCode =\n | \"BABEL_PARSER_SYNTAX_ERROR\"\n | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n missingPlugin?: string | string[];\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n // pos: number;\n}\n\nexport type ParseError = SyntaxError &\n ParseErrorSpecification;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor = (\n loc: Position,\n details: ErrorDetails,\n) => ParseError;\n\ntype ToMessage = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials = {\n code: string;\n reasonCode: string;\n syntaxPlugin?: SyntaxPlugin;\n toMessage: ToMessage;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n Object.defineProperty(obj, key, {\n enumerable: false,\n configurable: true,\n value,\n });\n}\n\nfunction toParseErrorConstructor({\n toMessage,\n ...properties\n}: ParseErrorCredentials): ParseErrorConstructor {\n return function constructor(loc: Position, details: ErrorDetails) {\n const error = new SyntaxError();\n Object.assign(error, properties, { loc, pos: loc.index });\n if (\"missingPlugin\" in details) {\n Object.assign(error, { missingPlugin: details.missingPlugin });\n }\n\n type Overrides = {\n loc?: Position;\n details?: ErrorDetails;\n };\n defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n const { line, column, index } = overrides.loc ?? loc;\n return constructor(new Position(line, column, index), {\n ...details,\n ...overrides.details,\n });\n });\n\n defineHidden(error, \"details\", details);\n\n Object.defineProperty(error, \"message\", {\n configurable: true,\n get(this: ParseError): string {\n const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n this.message = message;\n return message;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value, writable: true });\n },\n });\n\n return error as ParseError;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage\n | { message: string | ToMessage; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : {}\n : T[K] extends ToMessage\n ? Parameters[0]\n : {}\n >;\n};\n\nexport function ParseErrorEnum(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage }\n ? T[K][\"message\"] extends ToMessage\n ? Parameters[0]\n : {}\n : T[K] extends ToMessage\n ? Parameters[0]\n : {}\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: \"AN_ERROR_CODE\",\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: \"BABEL_PARSER_SYNTAX_ERROR\",\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) =>\n defineProperty(object, key, { enumerable: false, value: object[key] });\n\nfunction toESTreeLocation(node: any) {\n node.loc.start && toUnenumerable(node.loc.start, \"index\");\n node.loc.end && toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.options.tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (e) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: BigInt | null;\n try {\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal: null = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n // @ts-expect-error ESTree plugin changes node types\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n return this.estreeParseLiteral(value);\n }\n\n // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as any as N.EstreeProperty | N.EstreeMethodDefinition)\n .value.params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // @ts-expect-error mutate AST types\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = node as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\n }\n\n isPrivateName(node: N.Node): boolean {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n getPrivateNameSV(node: N.Node): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node);\n }\n }\n return node.name;\n }\n\n // @ts-expect-error plugin may override interfaces\n parseLiteral(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral(value, type);\n // @ts-expect-error mutating AST types\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression?: boolean | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone,\n \"MethodDefinition\",\n );\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingFlag,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): void {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (prop.kind === \"get\" || prop.kind === \"set\") {\n this.raise(Errors.PatternHasAccessor, prop.key);\n } else if (prop.method) {\n this.raise(Errors.PatternHasMethod, prop.key);\n } else {\n super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n }\n }\n\n finishCallExpression(\n unfinished: Undone,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node.arguments[0];\n if (\n this.hasPlugin(\"importAttributes\") ||\n this.hasPlugin(\"importAssertions\")\n ) {\n (node as N.Node as N.EstreeImportExpression).options =\n node.arguments[1] ?? null;\n // compatibility with previous ESTree AST\n (node as N.Node as N.EstreeImportExpression).attributes =\n node.arguments[1] ?? null;\n }\n // arguments isn't optional in the type definition\n delete node.arguments;\n // callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(\n unfinished: Undone,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n // @ts-expect-error mutating AST types\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ) {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n node.type = node.type.substring(8); // strip Optional prefix\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n node.optional = false;\n }\n\n return node;\n }\n\n isOptionalMemberExpression(node: N.Node) {\n if (node.type === \"ChainExpression\") {\n return node.expression.type === \"MemberExpression\";\n }\n return super.isOptionalMemberExpression(node);\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n // @ts-expect-error override interfaces\n isObjectProperty(node: N.Node): boolean {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n isObjectMethod(node: N.Node): boolean {\n return node.method || node.kind === \"get\" || node.kind === \"set\";\n }\n\n finishNodeAt(\n node: Undone,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext;\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"...\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string;\n beforeExpr?: boolean;\n startsExpr?: boolean;\n rightAssociative?: boolean;\n isLoop?: boolean;\n isAssign?: boolean;\n prefix?: boolean;\n postfix?: boolean;\n binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: string | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array) => void)\n | undefined\n | null;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\"),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"/<=/>=\", 7),\n gt: createBinop(\"/<=/>=\", 7),\n relational: createBinop(\"/<=/>=\", 7),\n bitShift: createBinop(\"<>/>>>\", 8),\n bitShiftL: createBinop(\"<>/>>>\", 8),\n bitShiftR: createBinop(\"<>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _defer: createKeywordLike(\"defer\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _source: createKeywordLike(\"source\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _using: createKeywordLike(\"using\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.name;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.name;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","import * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0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10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n // var-declared names in the current lexical scope\n Var = 1 << 0,\n // lexically-declared names in the current lexical scope\n Lexical = 1 << 1,\n // lexically-declared FunctionDeclaration names in the current lexical scope\n Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n flags: ScopeFlag = 0;\n names: Map = new Map();\n firstLexicalName = \"\";\n\n constructor(flags: ScopeFlag) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler {\n parser: Tokenizer;\n scopeStack: Array = [];\n inModule: boolean;\n undefinedExports: Map = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\n this.inModule = inModule;\n }\n\n get inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n let type = scope.names.get(name) || 0;\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n type = type | NameType.Function;\n } else {\n if (!scope.firstLexicalName) {\n scope.firstLexicalName = name;\n }\n type = type | NameType.Lexical;\n }\n\n scope.names.set(name, type);\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, loc, {\n identifierName: name,\n });\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n return scope.names.has(name);\n }\n\n const type = scope.names.get(name);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n return (\n (type & NameType.Lexical) > 0 ||\n (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n );\n }\n\n return (\n ((type & NameType.Lexical) > 0 &&\n // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.SIMPLE_CATCH &&\n scope.firstLexicalName === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) &&\n (type & NameType.Function) > 0)\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (!topLevelScope.names.has(name)) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler {\n createScope(flags: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingFlag, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingFlag,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (\n bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n !scope.declareFunctions.has(name)\n ) {\n const type = scope.names.get(name);\n return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare inModule: boolean;\n declare scope: ScopeHandler;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n // Comment store for Program.comments\n declare comments: Array;\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions)?.[\n name\n ];\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node, Identifier } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\n containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone, comments: Array) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone, comments: Array) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n node: Undone,\n comments?: Array,\n) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n node: Undone,\n elements: Array,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n const { commentsLen } = this.state;\n if (this.comments.length != commentsLen) this.comments.length = commentsLen;\n this.comments.push(comment);\n this.state.commentsLen++;\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (this.input.charCodeAt(commentStart - 1) === charCodes.comma) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaining commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterpret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * async /* 1 *​/ function f() {}\n * ```\n * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark `/* 1 *​/` as\n * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 *​/ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 *​/` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 *​/` as\n * inner comments of the ImportDeclaration. So `/* 1 *​/` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n?|[\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// Skip whitespace and single-line comments, including /* no newline here */.\n// After this RegExp matches, its lastIndex points to a line terminator, or\n// the start of multi-line comment (which is effectively a line terminator),\n// or the end of string.\nexport const skipWhiteSpaceToLineBreak = new RegExp(\n // Unfortunately JS doesn't support Perl's atomic /(?>pattern)/ or\n // possessive quantifiers, so we use a trick to prevent backtracking\n // when the look-ahead for line terminator fails.\n \"(?=(\" +\n // Capture the whitespace and comments that should be skipped inside\n // a look-ahead assertion, and then re-match the group as a unit.\n skipWhiteSpaceInLine.source +\n \"))\\\\1\" +\n // Look-ahead for either line terminator, start of multi-line comment,\n // or end of string.\n /(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)/.source,\n \"y\", // sticky\n);\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number;\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0;\n};\n\nconst enum StateFlags {\n None = 0,\n Strict = 1 << 0,\n maybeInArrowParameters = 1 << 1,\n inType = 1 << 2,\n noAnonFunctionType = 1 << 3,\n hasFlowComment = 1 << 4,\n isAmbientContext = 1 << 5,\n inAbstractClass = 1 << 6,\n inDisallowConditionalTypesContext = 1 << 7,\n soloAwait = 1 << 8,\n inFSharpPipelineDirectBody = 1 << 9,\n canStartJSXElement = 1 << 10,\n containsEsc = 1 << 11,\n}\n\nexport const enum LoopLabelKind {\n Loop = 1,\n Switch = 2,\n}\n\nexport default class State {\n flags: number = StateFlags.canStartJSXElement;\n\n get strict(): boolean {\n return (this.flags & StateFlags.Strict) > 0;\n }\n set strict(value: boolean) {\n if (value) {\n this.flags |= StateFlags.Strict;\n } else {\n this.flags &= ~StateFlags.Strict;\n }\n }\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({ strictMode, sourceType, startLine, startColumn }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);\n }\n\n errors: ParseError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n get maybeInArrowParameters(): boolean {\n return (this.flags & StateFlags.maybeInArrowParameters) > 0;\n }\n set maybeInArrowParameters(value: boolean) {\n if (value) {\n this.flags |= StateFlags.maybeInArrowParameters;\n } else {\n this.flags &= ~StateFlags.maybeInArrowParameters;\n }\n }\n get inType(): boolean {\n return (this.flags & StateFlags.inType) > 0;\n }\n set inType(value: boolean) {\n if (value) {\n this.flags |= StateFlags.inType;\n } else {\n this.flags &= ~StateFlags.inType;\n }\n }\n get noAnonFunctionType(): boolean {\n return (this.flags & StateFlags.noAnonFunctionType) > 0;\n }\n set noAnonFunctionType(value: boolean) {\n if (value) {\n this.flags |= StateFlags.noAnonFunctionType;\n } else {\n this.flags &= ~StateFlags.noAnonFunctionType;\n }\n }\n get hasFlowComment(): boolean {\n return (this.flags & StateFlags.hasFlowComment) > 0;\n }\n set hasFlowComment(value: boolean) {\n if (value) {\n this.flags |= StateFlags.hasFlowComment;\n } else {\n this.flags &= ~StateFlags.hasFlowComment;\n }\n }\n get isAmbientContext(): boolean {\n return (this.flags & StateFlags.isAmbientContext) > 0;\n }\n set isAmbientContext(value: boolean) {\n if (value) {\n this.flags |= StateFlags.isAmbientContext;\n } else {\n this.flags &= ~StateFlags.isAmbientContext;\n }\n }\n get inAbstractClass(): boolean {\n return (this.flags & StateFlags.inAbstractClass) > 0;\n }\n set inAbstractClass(value: boolean) {\n if (value) {\n this.flags |= StateFlags.inAbstractClass;\n } else {\n this.flags &= ~StateFlags.inAbstractClass;\n }\n }\n get inDisallowConditionalTypesContext(): boolean {\n return (this.flags & StateFlags.inDisallowConditionalTypesContext) > 0;\n }\n set inDisallowConditionalTypesContext(value: boolean) {\n if (value) {\n this.flags |= StateFlags.inDisallowConditionalTypesContext;\n } else {\n this.flags &= ~StateFlags.inDisallowConditionalTypesContext;\n }\n }\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n get soloAwait(): boolean {\n return (this.flags & StateFlags.soloAwait) > 0;\n }\n set soloAwait(value: boolean) {\n if (value) {\n this.flags |= StateFlags.soloAwait;\n } else {\n this.flags &= ~StateFlags.soloAwait;\n }\n }\n get inFSharpPipelineDirectBody(): boolean {\n return (this.flags & StateFlags.inFSharpPipelineDirectBody) > 0;\n }\n set inFSharpPipelineDirectBody(value: boolean) {\n if (value) {\n this.flags |= StateFlags.inFSharpPipelineDirectBody;\n } else {\n this.flags &= ~StateFlags.inFSharpPipelineDirectBody;\n }\n }\n\n // Labels in scope.\n labels: Array<{\n kind: LoopLabelKind;\n name?: string | null;\n statementStart?: number;\n }> = [];\n\n commentsLen = 0;\n // Comment attachment store\n commentStack: Array = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array = [ct.brace];\n // Used to track whether a JSX element is allowed to form\n get canStartJSXElement(): boolean {\n return (this.flags & StateFlags.canStartJSXElement) > 0;\n }\n set canStartJSXElement(value: boolean) {\n if (value) {\n this.flags |= StateFlags.canStartJSXElement;\n } else {\n this.flags &= ~StateFlags.canStartJSXElement;\n }\n }\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n get containsEsc(): boolean {\n return (this.flags & StateFlags.containsEsc) > 0;\n }\n set containsEsc(value: boolean) {\n if (value) {\n this.flags |= StateFlags.containsEsc;\n } else {\n this.flags &= ~StateFlags.containsEsc;\n }\n }\n\n // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n /**\n * When we add a new property, we must manually update the `clone` method\n * @see State#clone\n */\n\n curPosition(): Position {\n return new Position(this.curLine, this.pos - this.lineStart, this.pos);\n }\n\n clone(): State {\n const state = new State();\n state.flags = this.flags;\n state.curLine = this.curLine;\n state.lineStart = this.lineStart;\n state.startLoc = this.startLoc;\n state.endLoc = this.endLoc;\n state.errors = this.errors.slice();\n state.potentialArrowAt = this.potentialArrowAt;\n state.noArrowAt = this.noArrowAt.slice();\n state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n state.topicContext = this.topicContext;\n state.labels = this.labels.slice();\n state.commentsLen = this.commentsLen;\n state.commentStack = this.commentStack.slice();\n state.pos = this.pos;\n state.type = this.type;\n state.value = this.value;\n state.start = this.start;\n state.end = this.end;\n state.lastTokEndLoc = this.lastTokEndLoc;\n state.lastTokStartLoc = this.lastTokStartLoc;\n state.context = this.context.slice();\n state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n state.strictErrors = this.strictErrors;\n state.tokensLength = this.tokensLength;\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number;\n value: any;\n type: TokenType;\n start: number;\n end: number;\n context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: () => Position;\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","import * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = input.slice(startPos, pos + 2).match(/^[0-7]+/)!;\n\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","/*:: declare var invariant; */\n\nimport type { Options } from \"../options.ts\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n this.type = state.type;\n this.value = state.value;\n this.start = state.start;\n this.end = state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n isLookahead: boolean;\n\n // Token store.\n tokens: Array = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.comments = [];\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.options.tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(([toParseError, at]) =>\n this.raise(toParseError, at),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related properties.\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n }\n\n this.state.pos = end + commentEnd.length;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment: N.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + commentEnd.length,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | undefined {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment: N.CommentLine = {\n type: \"CommentLine\",\n value,\n start,\n end,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments = [];\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment(\"*/\");\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (\n ch === charCodes.dash &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.options.annexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // ` R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var nodeItem = props.environment.document.getElementById(\"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"sourceIndex\"],\n _excluded6 = [\"sourceIndex\"],\n _excluded7 = [\"item\", \"source\", \"sourceIndex\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\")\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref2 = providedProps || {},\n inputElement = _ref2.inputElement,\n _ref2$maxLength = _ref2.maxLength,\n maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,\n rest = _objectWithoutProperties(_ref2, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? \"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId) : undefined,\n 'aria-controls': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\"),\n value: store.getState().completion || store.getState().query,\n id: \"\".concat(props.id, \"-input\"),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {\n return typeof sourceId !== 'undefined' ? \"\".concat(instanceId, \"-\").concat(sourceId) : instanceId;\n };\n var getLabelProps = function getLabelProps(providedProps) {\n var _ref3 = providedProps || {},\n sourceIndex = _ref3.sourceIndex,\n rest = _objectWithoutProperties(_ref3, _excluded5);\n return _objectSpread({\n htmlFor: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-input\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\")\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref4 = providedProps || {},\n sourceIndex = _ref4.sourceIndex,\n rest = _objectWithoutProperties(_ref4, _excluded6);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-list\")\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n sourceIndex = providedProps.sourceIndex,\n rest = _objectWithoutProperties(providedProps, _excluded7);\n return _objectSpread({\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-item-\").concat(item.__autocomplete_id),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n if (options.insights && !props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n })) {\n var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n props.plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","import React from 'react';\nexport function AlgoliaLogo(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://www.algolia.com/ref/docsearch/?utm_source=\".concat(window.location.hostname, \"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch\"),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, searchByText), /*#__PURE__*/React.createElement(\"svg\", {\n width: \"77\",\n height: \"19\",\n \"aria-label\": \"Algolia\",\n role: \"img\",\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 2196.2 500\"\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}\")), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"rect\", {\n className: \"cls-1\",\n x: \"1845.88\",\n y: \"104.73\",\n width: \"62.58\",\n height: \"277.9\",\n rx: \"5.9\",\n ry: \"5.9\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-1\",\n d: \"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z\"\n })));\n}","import React from 'react';\nimport { AlgoliaLogo } from './AlgoliaLogo';\n\nfunction CommandIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n \"aria-label\": props.ariaLabel,\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"1.2\"\n }, props.children));\n}\n\nexport function Footer(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$selectT = translations.selectText,\n selectText = _translations$selectT === void 0 ? 'to select' : _translations$selectT,\n _translations$selectK = translations.selectKeyAriaLabel,\n selectKeyAriaLabel = _translations$selectK === void 0 ? 'Enter key' : _translations$selectK,\n _translations$navigat = translations.navigateText,\n navigateText = _translations$navigat === void 0 ? 'to navigate' : _translations$navigat,\n _translations$navigat2 = translations.navigateUpKeyAriaLabel,\n navigateUpKeyAriaLabel = _translations$navigat2 === void 0 ? 'Arrow up' : _translations$navigat2,\n _translations$navigat3 = translations.navigateDownKeyAriaLabel,\n navigateDownKeyAriaLabel = _translations$navigat3 === void 0 ? 'Arrow down' : _translations$navigat3,\n _translations$closeTe = translations.closeText,\n closeText = _translations$closeTe === void 0 ? 'to close' : _translations$closeTe,\n _translations$closeKe = translations.closeKeyAriaLabel,\n closeKeyAriaLabel = _translations$closeKe === void 0 ? 'Escape key' : _translations$closeKe,\n _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Logo\"\n }, /*#__PURE__*/React.createElement(AlgoliaLogo, {\n translations: {\n searchByText: searchByText\n }\n })), /*#__PURE__*/React.createElement(\"ul\", {\n className: \"DocSearch-Commands\"\n }, /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: selectKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, selectText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateDownKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 3.5v8M10.5 8.5l-3 3-3-3\"\n }))), /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateUpKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 11.5v-8M10.5 6.5l-3-3-3 3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, navigateText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: closeKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, closeText))));\n}","import React from 'react';\nexport function Hit(_ref) {\n var hit = _ref.hit,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: hit.url\n }, children);\n}","import React from 'react';\nexport function LoadingIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: \"0 0 38 38\",\n stroke: \"currentColor\",\n strokeOpacity: \".5\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n strokeOpacity: \".3\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}","import React from 'react';\nexport function RecentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13\"\n })));\n}","import React from 'react';\nexport function ResetIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function SelectIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Select-Icon\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 3v4c0 2-2 4-4 4H2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 17l-6-6 6-6\"\n })));\n}","import React from 'react';\n\nvar LvlIcon = function LvlIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n};\n\nexport function SourceIcon(props) {\n switch (props.type) {\n case 'lvl1':\n return /*#__PURE__*/React.createElement(LvlIcon, null);\n\n case 'content':\n return /*#__PURE__*/React.createElement(ContentIcon, null);\n\n default:\n return /*#__PURE__*/React.createElement(AnchorIcon, null);\n }\n}\n\nfunction AnchorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}\n\nfunction ContentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 5H3h14zm0 5H3h14zm0 5H3h14z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function StarIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function ErrorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0\"\n }));\n}","import React from 'react';\nexport function NoResultsIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2\"\n }));\n}","import React from 'react';\nimport { ErrorIcon } from './icons';\nexport function ErrorScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$titleTe = translations.titleText,\n titleText = _translations$titleTe === void 0 ? 'Unable to fetch results' : _translations$titleTe,\n _translations$helpTex = translations.helpText,\n helpText = _translations$helpTex === void 0 ? 'You might want to check your network connection.' : _translations$helpTex;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-ErrorScreen\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, titleText), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, helpText));\n}","var _excluded = [\"translations\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { NoResultsIcon } from './icons';\nexport function NoResultsScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$noResul = translations.noResultsText,\n noResultsText = _translations$noResul === void 0 ? 'No results for' : _translations$noResul,\n _translations$suggest = translations.suggestedQueryText,\n suggestedQueryText = _translations$suggest === void 0 ? 'Try searching for' : _translations$suggest,\n _translations$reportM = translations.reportMissingResultsText,\n reportMissingResultsText = _translations$reportM === void 0 ? 'Believe this query should return results?' : _translations$reportM,\n _translations$reportM2 = translations.reportMissingResultsLinkText,\n reportMissingResultsLinkText = _translations$reportM2 === void 0 ? 'Let us know.' : _translations$reportM2;\n var searchSuggestions = props.state.context.searchSuggestions;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(NoResultsIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, noResultsText, \" \\\"\", /*#__PURE__*/React.createElement(\"strong\", null, props.state.query), \"\\\"\"), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults-Prefill-List\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, suggestedQueryText, \":\"), /*#__PURE__*/React.createElement(\"ul\", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) {\n return [].concat(_toConsumableArray(acc), [/*#__PURE__*/React.createElement(\"li\", {\n key: search\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Prefill\",\n key: search,\n type: \"button\",\n onClick: function onClick() {\n props.setQuery(search.toLowerCase() + ' ');\n props.refresh();\n props.inputRef.current.focus();\n }\n }, search))]);\n }, []))), props.getMissingResultsUrl && /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, \"\".concat(reportMissingResultsText, \" \"), /*#__PURE__*/React.createElement(\"a\", {\n href: props.getMissingResultsUrl({\n query: props.state.query\n }),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, reportMissingResultsLinkText)));\n}","var _excluded = [\"hit\", \"attribute\", \"tagName\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createElement } from 'react';\n\nfunction getPropertyByPath(object, path) {\n var parts = path.split('.');\n return parts.reduce(function (prev, current) {\n if (prev !== null && prev !== void 0 && prev[current]) return prev[current];\n return null;\n }, object);\n}\n\nexport function Snippet(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute,\n _ref$tagName = _ref.tagName,\n tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n return createElement(tagName, _objectSpread(_objectSpread({}, rest), {}, {\n dangerouslySetInnerHTML: {\n __html: getPropertyByPath(hit, \"_snippetResult.\".concat(attribute, \".value\")) || getPropertyByPath(hit, attribute)\n }\n }));\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { Snippet } from './Snippet';\nexport function Results(props) {\n if (!props.collection || props.collection.items.length === 0) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-Hits\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-source\"\n }, props.title), /*#__PURE__*/React.createElement(\"ul\", props.getListProps(), props.collection.items.map(function (item, index) {\n return /*#__PURE__*/React.createElement(Result, _extends({\n key: [props.title, item.objectID].join(':'),\n item: item,\n index: index\n }, props));\n })));\n}\n\nfunction Result(_ref) {\n var item = _ref.item,\n index = _ref.index,\n renderIcon = _ref.renderIcon,\n renderAction = _ref.renderAction,\n getItemProps = _ref.getItemProps,\n onItemClick = _ref.onItemClick,\n collection = _ref.collection,\n hitComponent = _ref.hitComponent;\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isDeleting = _React$useState2[0],\n setIsDeleting = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n isFavoriting = _React$useState4[0],\n setIsFavoriting = _React$useState4[1];\n\n var action = React.useRef(null);\n var Hit = hitComponent;\n\n function runDeleteTransition(cb) {\n setIsDeleting(true);\n action.current = cb;\n }\n\n function runFavoriteTransition(cb) {\n setIsFavoriting(true);\n action.current = cb;\n }\n\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '),\n onTransitionEnd: function onTransitionEnd() {\n if (action.current) {\n action.current();\n }\n }\n }, getItemProps({\n item: item,\n source: collection.source,\n onClick: function onClick(event) {\n onItemClick(item, event);\n }\n })), /*#__PURE__*/React.createElement(Hit, {\n hit: item\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-Container\"\n }, renderIcon({\n item: item,\n index: index\n }), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n }), item.content && /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"content\"\n })), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.\".concat(item.type)\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), item.type === 'content' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"content\"\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), renderAction({\n item: item,\n runDeleteTransition: runDeleteTransition,\n runFavoriteTransition: runFavoriteTransition\n }))));\n}","export function groupBy(values, predicate, maxResultsPerGroup) {\n return values.reduce(function (acc, item) {\n var key = predicate(item);\n\n if (!acc.hasOwnProperty(key)) {\n acc[key] = [];\n } // We limit each section to show 5 hits maximum.\n // This acts as a frontend alternative to `distinct`.\n\n\n if (acc[key].length < (maxResultsPerGroup || 5)) {\n acc[key].push(item);\n }\n\n return acc;\n }, {});\n}","export function identity(x) {\n return x;\n}","/**\n * Detect when an event is modified with a special key to let the browser\n * trigger its default behavior.\n */\nexport function isModifierEvent(event) {\n var isMiddleClick = event.button === 1;\n return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n}","export function noop() {}","var regexHighlightTags = /(|<\\/mark>)/g;\nvar regexHasHighlightTags = RegExp(regexHighlightTags.source);\nexport function removeHighlightTags(hit) {\n var _internalDocSearchHit, _hit$_highlightResult;\n\n var internalDocSearchHit = hit;\n\n if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {\n return hit.hierarchy.lvl0;\n }\n\n var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit.hierarchy) === null || _internalDocSearchHit === void 0 ? void 0 : _internalDocSearchHit.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 || (_hit$_highlightResult = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult === void 0 ? void 0 : _hit$_highlightResult.lvl0) || {},\n value = _ref.value;\n\n return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { SelectIcon, SourceIcon } from './icons';\nimport { Results } from './Results';\nimport { removeHighlightTags } from './utils';\nexport function ResultsScreen(props) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, props.state.collections.map(function (collection) {\n if (collection.items.length === 0) {\n return null;\n }\n\n var title = removeHighlightTags(collection.items[0]);\n return /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n key: collection.source.sourceId,\n title: title,\n collection: collection,\n renderIcon: function renderIcon(_ref) {\n var _collection$items;\n\n var item = _ref.item,\n index = _ref.index;\n return /*#__PURE__*/React.createElement(React.Fragment, null, item.__docsearch_parent && /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Tree\",\n viewBox: \"0 0 24 54\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v21M20 27H8.3\"\n }) : /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v42M20 27H8.3\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(SourceIcon, {\n type: item.type\n })));\n },\n renderAction: function renderAction() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(SelectIcon, null));\n }\n }));\n }), props.resultsFooterComponent && /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-HitsFooter\"\n }, /*#__PURE__*/React.createElement(props.resultsFooterComponent, {\n state: props.state\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { RecentIcon, ResetIcon, StarIcon } from './icons';\nimport { Results } from './Results';\nexport function StartScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$recentS = translations.recentSearchesTitle,\n recentSearchesTitle = _translations$recentS === void 0 ? 'Recent' : _translations$recentS,\n _translations$noRecen = translations.noRecentSearchesText,\n noRecentSearchesText = _translations$noRecen === void 0 ? 'No recent searches' : _translations$noRecen,\n _translations$saveRec = translations.saveRecentSearchButtonTitle,\n saveRecentSearchButtonTitle = _translations$saveRec === void 0 ? 'Save this search' : _translations$saveRec,\n _translations$removeR = translations.removeRecentSearchButtonTitle,\n removeRecentSearchButtonTitle = _translations$removeR === void 0 ? 'Remove this search from history' : _translations$removeR,\n _translations$favorit = translations.favoriteSearchesTitle,\n favoriteSearchesTitle = _translations$favorit === void 0 ? 'Favorite' : _translations$favorit,\n _translations$removeF = translations.removeFavoriteSearchButtonTitle,\n removeFavoriteSearchButtonTitle = _translations$removeF === void 0 ? 'Remove this search from favorites' : _translations$removeF;\n\n if (props.state.status === 'idle' && props.hasCollections === false) {\n if (props.disableUserPersonalization) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-StartScreen\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, noRecentSearchesText));\n }\n\n if (props.hasCollections === false) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: recentSearchesTitle,\n collection: props.state.collections[0],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(RecentIcon, null));\n },\n renderAction: function renderAction(_ref2) {\n var item = _ref2.item,\n runFavoriteTransition = _ref2.runFavoriteTransition,\n runDeleteTransition = _ref2.runDeleteTransition;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: saveRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runFavoriteTransition(function () {\n props.favoriteSearches.add(item);\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(StarIcon, null))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null))));\n }\n })), /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: favoriteSearchesTitle,\n collection: props.state.collections[1],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(StarIcon, null));\n },\n renderAction: function renderAction(_ref3) {\n var item = _ref3.item,\n runDeleteTransition = _ref3.runDeleteTransition;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeFavoriteSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.favoriteSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null)));\n }\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { ErrorScreen } from './ErrorScreen';\nimport { NoResultsScreen } from './NoResultsScreen';\nimport { ResultsScreen } from './ResultsScreen';\nimport { StartScreen } from './StartScreen';\nexport var ScreenState = React.memo(function (_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n if (props.state.status === 'error') {\n return /*#__PURE__*/React.createElement(ErrorScreen, {\n translations: translations === null || translations === void 0 ? void 0 : translations.errorScreen\n });\n }\n\n var hasCollections = props.state.collections.some(function (collection) {\n return collection.items.length > 0;\n });\n\n if (!props.state.query) {\n return /*#__PURE__*/React.createElement(StartScreen, _extends({}, props, {\n hasCollections: hasCollections,\n translations: translations === null || translations === void 0 ? void 0 : translations.startScreen\n }));\n }\n\n if (hasCollections === false) {\n return /*#__PURE__*/React.createElement(NoResultsScreen, _extends({}, props, {\n translations: translations === null || translations === void 0 ? void 0 : translations.noResultsScreen\n }));\n }\n\n return /*#__PURE__*/React.createElement(ResultsScreen, props);\n}, function areEqual(_prevProps, nextProps) {\n // We don't update the screen when Autocomplete is loading or stalled to\n // avoid UI flashes:\n // - Empty screen → Results screen\n // - NoResults screen → NoResults screen with another query\n return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled';\n});","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { LoadingIcon } from './icons/LoadingIcon';\nimport { ResetIcon } from './icons/ResetIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nexport function SearchBox(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$resetBu = translations.resetButtonTitle,\n resetButtonTitle = _translations$resetBu === void 0 ? 'Clear the query' : _translations$resetBu,\n _translations$resetBu2 = translations.resetButtonAriaLabel,\n resetButtonAriaLabel = _translations$resetBu2 === void 0 ? 'Clear the query' : _translations$resetBu2,\n _translations$cancelB = translations.cancelButtonText,\n cancelButtonText = _translations$cancelB === void 0 ? 'Cancel' : _translations$cancelB,\n _translations$cancelB2 = translations.cancelButtonAriaLabel,\n cancelButtonAriaLabel = _translations$cancelB2 === void 0 ? 'Cancel' : _translations$cancelB2;\n\n var _props$getFormProps = props.getFormProps({\n inputElement: props.inputRef.current\n }),\n onReset = _props$getFormProps.onReset;\n\n React.useEffect(function () {\n if (props.autoFocus && props.inputRef.current) {\n props.inputRef.current.focus();\n }\n }, [props.autoFocus, props.inputRef]);\n React.useEffect(function () {\n if (props.isFromSelection && props.inputRef.current) {\n props.inputRef.current.select();\n }\n }, [props.isFromSelection, props.inputRef]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"form\", {\n className: \"DocSearch-Form\",\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n },\n onReset: onReset\n }, /*#__PURE__*/React.createElement(\"label\", _extends({\n className: \"DocSearch-MagnifierLabel\"\n }, props.getLabelProps()), /*#__PURE__*/React.createElement(SearchIcon, null)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-LoadingIndicator\"\n }, /*#__PURE__*/React.createElement(LoadingIcon, null)), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"DocSearch-Input\",\n ref: props.inputRef\n }, props.getInputProps({\n inputElement: props.inputRef.current,\n autoFocus: props.autoFocus,\n maxLength: MAX_QUERY_SIZE\n }))), /*#__PURE__*/React.createElement(\"button\", {\n type: \"reset\",\n title: resetButtonTitle,\n className: \"DocSearch-Reset\",\n \"aria-label\": resetButtonAriaLabel,\n hidden: !props.state.query\n }, /*#__PURE__*/React.createElement(ResetIcon, null))), /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Cancel\",\n type: \"reset\",\n \"aria-label\": cancelButtonAriaLabel,\n onClick: props.onClose\n }, cancelButtonText));\n}","export var MAX_QUERY_SIZE = 64;","var _excluded = [\"_highlightResult\", \"_snippetResult\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction isLocalStorageSupported() {\n var key = '__TEST_KEY__';\n\n try {\n localStorage.setItem(key, '');\n localStorage.removeItem(key);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction createStorage(key) {\n if (isLocalStorageSupported() === false) {\n return {\n setItem: function setItem() {},\n getItem: function getItem() {\n return [];\n }\n };\n }\n\n return {\n setItem: function setItem(item) {\n return window.localStorage.setItem(key, JSON.stringify(item));\n },\n getItem: function getItem() {\n var item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : [];\n }\n };\n}\n\nexport function createStoredSearches(_ref) {\n var key = _ref.key,\n _ref$limit = _ref.limit,\n limit = _ref$limit === void 0 ? 5 : _ref$limit;\n var storage = createStorage(key);\n var items = storage.getItem().slice(0, limit);\n return {\n add: function add(item) {\n var _ref2 = item,\n _highlightResult = _ref2._highlightResult,\n _snippetResult = _ref2._snippetResult,\n hit = _objectWithoutProperties(_ref2, _excluded);\n\n var isQueryAlreadySaved = items.findIndex(function (x) {\n return x.objectID === hit.objectID;\n });\n\n if (isQueryAlreadySaved > -1) {\n items.splice(isQueryAlreadySaved, 1);\n }\n\n items.unshift(hit);\n items = items.slice(0, limit);\n storage.setItem(items);\n },\n remove: function remove(item) {\n items = items.filter(function (x) {\n return x.objectID !== item.objectID;\n });\n storage.setItem(items);\n },\n getAll: function getAll() {\n return items;\n }\n };\n}","function createBrowserLocalStorageCache(options) {\r\n const namespaceKey = `algoliasearch-client-js-${options.key}`;\r\n // eslint-disable-next-line functional/no-let\r\n let storage;\r\n const getStorage = () => {\r\n if (storage === undefined) {\r\n storage = options.localStorage || window.localStorage;\r\n }\r\n return storage;\r\n };\r\n const getNamespace = () => {\r\n return JSON.parse(getStorage().getItem(namespaceKey) || '{}');\r\n };\r\n const setNamespace = (namespace) => {\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n };\r\n const removeOutdatedCacheItems = () => {\r\n const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;\r\n const namespace = getNamespace();\r\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {\r\n return cacheItem.timestamp !== undefined;\r\n }));\r\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\r\n if (!timeToLive)\r\n return;\r\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\r\n const currentTimestamp = new Date().getTime();\r\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\r\n return !isExpired;\r\n }));\r\n setNamespace(filteredNamespaceWithoutExpiredItems);\r\n };\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return Promise.resolve()\r\n .then(() => {\r\n removeOutdatedCacheItems();\r\n const keyAsString = JSON.stringify(key);\r\n return getNamespace()[keyAsString];\r\n })\r\n .then(value => {\r\n return Promise.all([value ? value.value : defaultValue(), value !== undefined]);\r\n })\r\n .then(([value, exists]) => {\r\n return Promise.all([value, exists || events.miss(value)]);\r\n })\r\n .then(([value]) => value);\r\n },\r\n set(key, value) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n namespace[JSON.stringify(key)] = {\r\n timestamp: new Date().getTime(),\r\n value,\r\n };\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n return value;\r\n });\r\n },\r\n delete(key) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n delete namespace[JSON.stringify(key)];\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n });\r\n },\r\n clear() {\r\n return Promise.resolve().then(() => {\r\n getStorage().removeItem(namespaceKey);\r\n });\r\n },\r\n };\r\n}\n\n// @todo Add logger on options to debug when caches go wrong.\r\nfunction createFallbackableCache(options) {\r\n const caches = [...options.caches];\r\n const current = caches.shift(); // eslint-disable-line functional/immutable-data\r\n if (current === undefined) {\r\n return createNullCache();\r\n }\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return current.get(key, defaultValue, events).catch(() => {\r\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\r\n });\r\n },\r\n set(key, value) {\r\n return current.set(key, value).catch(() => {\r\n return createFallbackableCache({ caches }).set(key, value);\r\n });\r\n },\r\n delete(key) {\r\n return current.delete(key).catch(() => {\r\n return createFallbackableCache({ caches }).delete(key);\r\n });\r\n },\r\n clear() {\r\n return current.clear().catch(() => {\r\n return createFallbackableCache({ caches }).clear();\r\n });\r\n },\r\n };\r\n}\n\nfunction createNullCache() {\r\n return {\r\n get(_key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const value = defaultValue();\r\n return value\r\n .then(result => Promise.all([result, events.miss(result)]))\r\n .then(([result]) => result);\r\n },\r\n set(_key, value) {\r\n return Promise.resolve(value);\r\n },\r\n delete(_key) {\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createInMemoryCache(options = { serializable: true }) {\r\n // eslint-disable-next-line functional/no-let\r\n let cache = {};\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const keyAsString = JSON.stringify(key);\r\n if (keyAsString in cache) {\r\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\r\n }\r\n const promise = defaultValue();\r\n const miss = (events && events.miss) || (() => Promise.resolve());\r\n return promise.then((value) => miss(value)).then(() => promise);\r\n },\r\n set(key, value) {\r\n // eslint-disable-next-line functional/immutable-data\r\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\r\n return Promise.resolve(value);\r\n },\r\n delete(key) {\r\n // eslint-disable-next-line functional/immutable-data\r\n delete cache[JSON.stringify(key)];\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n cache = {};\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createAuth(authMode, appId, apiKey) {\r\n const credentials = {\r\n 'x-algolia-api-key': apiKey,\r\n 'x-algolia-application-id': appId,\r\n };\r\n return {\r\n headers() {\r\n return authMode === AuthMode.WithinHeaders ? credentials : {};\r\n },\r\n queryParameters() {\r\n return authMode === AuthMode.WithinQueryParameters ? credentials : {};\r\n },\r\n };\r\n}\n\n// eslint-disable-next-line functional/prefer-readonly-type\r\nfunction shuffle(array) {\r\n let c = array.length - 1; // eslint-disable-line functional/no-let\r\n // eslint-disable-next-line functional/no-loop-statement\r\n for (c; c > 0; c--) {\r\n const b = Math.floor(Math.random() * (c + 1));\r\n const a = array[c];\r\n array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n }\r\n return array;\r\n}\r\nfunction addMethods(base, methods) {\r\n if (!methods) {\r\n return base;\r\n }\r\n Object.keys(methods).forEach(key => {\r\n // eslint-disable-next-line functional/immutable-data, no-param-reassign\r\n base[key] = methods[key](base);\r\n });\r\n return base;\r\n}\r\nfunction encode(format, ...args) {\r\n // eslint-disable-next-line functional/no-let\r\n let i = 0;\r\n return format.replace(/%s/g, () => encodeURIComponent(args[i++]));\r\n}\n\nconst version = '4.19.1';\n\nconst AuthMode = {\r\n /**\r\n * If auth credentials should be in query parameters.\r\n */\r\n WithinQueryParameters: 0,\r\n /**\r\n * If auth credentials should be in headers.\r\n */\r\n WithinHeaders: 1,\r\n};\n\nfunction createMappedRequestOptions(requestOptions, timeout) {\r\n const options = requestOptions || {};\r\n const data = options.data || {};\r\n Object.keys(options).forEach(key => {\r\n if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) {\r\n data[key] = options[key]; // eslint-disable-line functional/immutable-data\r\n }\r\n });\r\n return {\r\n data: Object.entries(data).length > 0 ? data : undefined,\r\n timeout: options.timeout || timeout,\r\n headers: options.headers || {},\r\n queryParameters: options.queryParameters || {},\r\n cacheable: options.cacheable,\r\n };\r\n}\n\nconst CallEnum = {\r\n /**\r\n * If the host is read only.\r\n */\r\n Read: 1,\r\n /**\r\n * If the host is write only.\r\n */\r\n Write: 2,\r\n /**\r\n * If the host is both read and write.\r\n */\r\n Any: 3,\r\n};\n\nconst HostStatusEnum = {\r\n Up: 1,\r\n Down: 2,\r\n Timeouted: 3,\r\n};\n\n// By default, API Clients at Algolia have expiration delay\r\n// of 5 mins. In the JavaScript client, we have 2 mins.\r\nconst EXPIRATION_DELAY = 2 * 60 * 1000;\r\nfunction createStatefulHost(host, status = HostStatusEnum.Up) {\r\n return {\r\n ...host,\r\n status,\r\n lastUpdate: Date.now(),\r\n };\r\n}\r\nfunction isStatefulHostUp(host) {\r\n return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY;\r\n}\r\nfunction isStatefulHostTimeouted(host) {\r\n return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY);\r\n}\n\nfunction createStatelessHost(options) {\r\n if (typeof options === 'string') {\r\n return {\r\n protocol: 'https',\r\n url: options,\r\n accept: CallEnum.Any,\r\n };\r\n }\r\n return {\r\n protocol: options.protocol || 'https',\r\n url: options.url,\r\n accept: options.accept || CallEnum.Any,\r\n };\r\n}\n\nconst MethodEnum = {\r\n Delete: 'DELETE',\r\n Get: 'GET',\r\n Post: 'POST',\r\n Put: 'PUT',\r\n};\n\nfunction createRetryableOptions(hostsCache, statelessHosts) {\r\n return Promise.all(statelessHosts.map(statelessHost => {\r\n return hostsCache.get(statelessHost, () => {\r\n return Promise.resolve(createStatefulHost(statelessHost));\r\n });\r\n })).then(statefulHosts => {\r\n const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host));\r\n const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host));\r\n /**\r\n * Note, we put the hosts that previously timeouted on the end of the list.\r\n */\r\n const hostsAvailable = [...hostsUp, ...hostsTimeouted];\r\n const statelessHostsAvailable = hostsAvailable.length > 0\r\n ? hostsAvailable.map(host => createStatelessHost(host))\r\n : statelessHosts;\r\n return {\r\n getTimeout(timeoutsCount, baseTimeout) {\r\n /**\r\n * Imagine that you have 4 hosts, if timeouts will increase\r\n * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200)\r\n *\r\n * Note that, the very next request, we start from the previous timeout\r\n *\r\n * 5 (timeouted) > 6 (timeouted) > 7 ...\r\n *\r\n * This strategy may need to be reviewed, but is the strategy on the our\r\n * current v3 version.\r\n */\r\n const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0\r\n ? 1\r\n : hostsTimeouted.length + 3 + timeoutsCount;\r\n return timeoutMultiplier * baseTimeout;\r\n },\r\n statelessHosts: statelessHostsAvailable,\r\n };\r\n });\r\n}\n\nconst isNetworkError = ({ isTimedOut, status }) => {\r\n return !isTimedOut && ~~status === 0;\r\n};\r\nconst isRetryable = (response) => {\r\n const status = response.status;\r\n const isTimedOut = response.isTimedOut;\r\n return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4));\r\n};\r\nconst isSuccess = ({ status }) => {\r\n return ~~(status / 100) === 2;\r\n};\r\nconst retryDecision = (response, outcomes) => {\r\n if (isRetryable(response)) {\r\n return outcomes.onRetry(response);\r\n }\r\n if (isSuccess(response)) {\r\n return outcomes.onSuccess(response);\r\n }\r\n return outcomes.onFail(response);\r\n};\n\nfunction retryableRequest(transporter, statelessHosts, request, requestOptions) {\r\n const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type\r\n /**\r\n * First we prepare the payload that do not depend from hosts.\r\n */\r\n const data = serializeData(request, requestOptions);\r\n const headers = serializeHeaders(transporter, requestOptions);\r\n const method = request.method;\r\n // On `GET`, the data is proxied to query parameters.\r\n const dataQueryParameters = request.method !== MethodEnum.Get\r\n ? {}\r\n : {\r\n ...request.data,\r\n ...requestOptions.data,\r\n };\r\n const queryParameters = {\r\n 'x-algolia-agent': transporter.userAgent.value,\r\n ...transporter.queryParameters,\r\n ...dataQueryParameters,\r\n ...requestOptions.queryParameters,\r\n };\r\n let timeoutsCount = 0; // eslint-disable-line functional/no-let\r\n const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type\r\n getTimeout) => {\r\n /**\r\n * We iterate on each host, until there is no host left.\r\n */\r\n const host = hosts.pop(); // eslint-disable-line functional/immutable-data\r\n if (host === undefined) {\r\n throw createRetryError(stackTraceWithoutCredentials(stackTrace));\r\n }\r\n const payload = {\r\n data,\r\n headers,\r\n method,\r\n url: serializeUrl(host, request.path, queryParameters),\r\n connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect),\r\n responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout),\r\n };\r\n /**\r\n * The stackFrame is pushed to the stackTrace so we\r\n * can have information about onRetry and onFailure\r\n * decisions.\r\n */\r\n const pushToStackTrace = (response) => {\r\n const stackFrame = {\r\n request: payload,\r\n response,\r\n host,\r\n triesLeft: hosts.length,\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n stackTrace.push(stackFrame);\r\n return stackFrame;\r\n };\r\n const decisions = {\r\n onSuccess: response => deserializeSuccess(response),\r\n onRetry(response) {\r\n const stackFrame = pushToStackTrace(response);\r\n /**\r\n * If response is a timeout, we increaset the number of\r\n * timeouts so we can increase the timeout later.\r\n */\r\n if (response.isTimedOut) {\r\n timeoutsCount++;\r\n }\r\n return Promise.all([\r\n /**\r\n * Failures are individually send the logger, allowing\r\n * the end user to debug / store stack frames even\r\n * when a retry error does not happen.\r\n */\r\n transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)),\r\n /**\r\n * We also store the state of the host in failure cases. If the host, is\r\n * down it will remain down for the next 2 minutes. In a timeout situation,\r\n * this host will be added end of the list of hosts on the next request.\r\n */\r\n transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)),\r\n ]).then(() => retry(hosts, getTimeout));\r\n },\r\n onFail(response) {\r\n pushToStackTrace(response);\r\n throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace));\r\n },\r\n };\r\n return transporter.requester.send(payload).then(response => {\r\n return retryDecision(response, decisions);\r\n });\r\n };\r\n /**\r\n * Finally, for each retryable host perform request until we got a non\r\n * retryable response. Some notes here:\r\n *\r\n * 1. The reverse here is applied so we can apply a `pop` later on => more performant.\r\n * 2. We also get from the retryable options a timeout multiplier that is tailored\r\n * for the current context.\r\n */\r\n return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => {\r\n return retry([...options.statelessHosts].reverse(), options.getTimeout);\r\n });\r\n}\n\nfunction createTransporter(options) {\r\n const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options;\r\n const transporter = {\r\n hostsCache,\r\n logger,\r\n requester,\r\n requestsCache,\r\n responsesCache,\r\n timeouts,\r\n userAgent,\r\n headers,\r\n queryParameters,\r\n hosts: hosts.map(host => createStatelessHost(host)),\r\n read(request, requestOptions) {\r\n /**\r\n * First, we compute the user request options. Now, keep in mind,\r\n * that using request options the user is able to modified the intire\r\n * payload of the request. Such as headers, query parameters, and others.\r\n */\r\n const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read);\r\n const createRetryableRequest = () => {\r\n /**\r\n * Then, we prepare a function factory that contains the construction of\r\n * the retryable request. At this point, we may *not* perform the actual\r\n * request. But we want to have the function factory ready.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions);\r\n };\r\n /**\r\n * Once we have the function factory ready, we need to determine of the\r\n * request is \"cacheable\" - should be cached. Note that, once again,\r\n * the user can force this option.\r\n */\r\n const cacheable = mappedRequestOptions.cacheable !== undefined\r\n ? mappedRequestOptions.cacheable\r\n : request.cacheable;\r\n /**\r\n * If is not \"cacheable\", we immediatly trigger the retryable request, no\r\n * need to check cache implementations.\r\n */\r\n if (cacheable !== true) {\r\n return createRetryableRequest();\r\n }\r\n /**\r\n * If the request is \"cacheable\", we need to first compute the key to ask\r\n * the cache implementations if this request is on progress or if the\r\n * response already exists on the cache.\r\n */\r\n const key = {\r\n request,\r\n mappedRequestOptions,\r\n transporter: {\r\n queryParameters: transporter.queryParameters,\r\n headers: transporter.headers,\r\n },\r\n };\r\n /**\r\n * With the computed key, we first ask the responses cache\r\n * implemention if this request was been resolved before.\r\n */\r\n return transporter.responsesCache.get(key, () => {\r\n /**\r\n * If the request has never resolved before, we actually ask if there\r\n * is a current request with the same key on progress.\r\n */\r\n return transporter.requestsCache.get(key, () => {\r\n return (transporter.requestsCache\r\n /**\r\n * Finally, if there is no request in progress with the same key,\r\n * this `createRetryableRequest()` will actually trigger the\r\n * retryable request.\r\n */\r\n .set(key, createRetryableRequest())\r\n .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)]))\r\n .then(([_, response]) => response));\r\n });\r\n }, {\r\n /**\r\n * Of course, once we get this response back from the server, we\r\n * tell response cache to actually store the received response\r\n * to be used later.\r\n */\r\n miss: response => transporter.responsesCache.set(key, response),\r\n });\r\n },\r\n write(request, requestOptions) {\r\n /**\r\n * On write requests, no cache mechanisms are applied, and we\r\n * proxy the request immediately to the requester.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write));\r\n },\r\n };\r\n return transporter;\r\n}\n\nfunction createUserAgent(version) {\r\n const userAgent = {\r\n value: `Algolia for JavaScript (${version})`,\r\n add(options) {\r\n const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;\r\n if (userAgent.value.indexOf(addedUserAgent) === -1) {\r\n // eslint-disable-next-line functional/immutable-data\r\n userAgent.value = `${userAgent.value}${addedUserAgent}`;\r\n }\r\n return userAgent;\r\n },\r\n };\r\n return userAgent;\r\n}\n\nfunction deserializeSuccess(response) {\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n return JSON.parse(response.content);\r\n }\r\n catch (e) {\r\n throw createDeserializationError(e.message, response);\r\n }\r\n}\r\nfunction deserializeFailure({ content, status }, stackFrame) {\r\n // eslint-disable-next-line functional/no-let\r\n let message = content;\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n message = JSON.parse(content).message;\r\n }\r\n catch (e) {\r\n // ..\r\n }\r\n return createApiError(message, status, stackFrame);\r\n}\n\nfunction serializeUrl(host, path, queryParameters) {\r\n const queryParametersAsString = serializeQueryParameters(queryParameters);\r\n // eslint-disable-next-line functional/no-let\r\n let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;\r\n if (queryParametersAsString.length) {\r\n url += `?${queryParametersAsString}`;\r\n }\r\n return url;\r\n}\r\nfunction serializeQueryParameters(parameters) {\r\n const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' ||\r\n Object.prototype.toString.call(value) === '[object Array]';\r\n return Object.keys(parameters)\r\n .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]))\r\n .join('&');\r\n}\r\nfunction serializeData(request, requestOptions) {\r\n if (request.method === MethodEnum.Get ||\r\n (request.data === undefined && requestOptions.data === undefined)) {\r\n return undefined;\r\n }\r\n const data = Array.isArray(request.data)\r\n ? request.data\r\n : { ...request.data, ...requestOptions.data };\r\n return JSON.stringify(data);\r\n}\r\nfunction serializeHeaders(transporter, requestOptions) {\r\n const headers = {\r\n ...transporter.headers,\r\n ...requestOptions.headers,\r\n };\r\n const serializedHeaders = {};\r\n Object.keys(headers).forEach(header => {\r\n const value = headers[header];\r\n // @ts-ignore\r\n // eslint-disable-next-line functional/immutable-data\r\n serializedHeaders[header.toLowerCase()] = value;\r\n });\r\n return serializedHeaders;\r\n}\n\nfunction stackTraceWithoutCredentials(stackTrace) {\r\n return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame));\r\n}\r\nfunction stackFrameWithoutCredentials(stackFrame) {\r\n const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key']\r\n ? { 'x-algolia-api-key': '*****' }\r\n : {};\r\n return {\r\n ...stackFrame,\r\n request: {\r\n ...stackFrame.request,\r\n headers: {\r\n ...stackFrame.request.headers,\r\n ...modifiedHeaders,\r\n },\r\n },\r\n };\r\n}\n\nfunction createApiError(message, status, transporterStackTrace) {\r\n return {\r\n name: 'ApiError',\r\n message,\r\n status,\r\n transporterStackTrace,\r\n };\r\n}\n\nfunction createDeserializationError(message, response) {\r\n return {\r\n name: 'DeserializationError',\r\n message,\r\n response,\r\n };\r\n}\n\nfunction createRetryError(transporterStackTrace) {\r\n return {\r\n name: 'RetryError',\r\n message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',\r\n transporterStackTrace,\r\n };\r\n}\n\nconst createSearchClient = options => {\r\n const appId = options.appId;\r\n const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey);\r\n const transporter = createTransporter({\r\n hosts: [\r\n { url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read },\r\n { url: `${appId}.algolia.net`, accept: CallEnum.Write },\r\n ].concat(shuffle([\r\n { url: `${appId}-1.algolianet.com` },\r\n { url: `${appId}-2.algolianet.com` },\r\n { url: `${appId}-3.algolianet.com` },\r\n ])),\r\n ...options,\r\n headers: {\r\n ...auth.headers(),\r\n ...{ 'content-type': 'application/x-www-form-urlencoded' },\r\n ...options.headers,\r\n },\r\n queryParameters: {\r\n ...auth.queryParameters(),\r\n ...options.queryParameters,\r\n },\r\n });\r\n const base = {\r\n transporter,\r\n appId,\r\n addAlgoliaAgent(segment, version) {\r\n transporter.userAgent.add({ segment, version });\r\n },\r\n clearCache() {\r\n return Promise.all([\r\n transporter.requestsCache.clear(),\r\n transporter.responsesCache.clear(),\r\n ]).then(() => undefined);\r\n },\r\n };\r\n return addMethods(base, options.methods);\r\n};\n\nconst customRequest = (base) => {\r\n return (request, requestOptions) => {\r\n if (request.method === MethodEnum.Get) {\r\n return base.transporter.read(request, requestOptions);\r\n }\r\n return base.transporter.write(request, requestOptions);\r\n };\r\n};\n\nconst initIndex = (base) => {\r\n return (indexName, options = {}) => {\r\n const searchIndex = {\r\n transporter: base.transporter,\r\n appId: base.appId,\r\n indexName,\r\n };\r\n return addMethods(searchIndex, options.methods);\r\n };\r\n};\n\nconst multipleQueries = (base) => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => {\r\n return {\r\n ...query,\r\n params: serializeQueryParameters(query.params || {}),\r\n };\r\n });\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/queries',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst multipleSearchForFacetValues = (base) => {\r\n return (queries, requestOptions) => {\r\n return Promise.all(queries.map(query => {\r\n const { facetName, facetQuery, ...params } = query.params;\r\n return initIndex(base)(query.indexName, {\r\n methods: { searchForFacetValues },\r\n }).searchForFacetValues(facetName, facetQuery, {\r\n ...requestOptions,\r\n ...params,\r\n });\r\n }));\r\n };\r\n};\n\nconst findAnswers = (base) => {\r\n return (query, queryLanguages, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/answers/%s/prediction', base.indexName),\r\n data: {\r\n query,\r\n queryLanguages,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst search = (base) => {\r\n return (query, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/query', base.indexName),\r\n data: {\r\n query,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst searchForFacetValues = (base) => {\r\n return (facetName, facetQuery, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName),\r\n data: {\r\n facetQuery,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst LogLevelEnum = {\r\n Debug: 1,\r\n Info: 2,\r\n Error: 3,\r\n};\n\n/* eslint no-console: 0 */\r\nfunction createConsoleLogger(logLevel) {\r\n return {\r\n debug(message, args) {\r\n if (LogLevelEnum.Debug >= logLevel) {\r\n console.debug(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n info(message, args) {\r\n if (LogLevelEnum.Info >= logLevel) {\r\n console.info(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n error(message, args) {\r\n console.error(message, args);\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createBrowserXhrRequester() {\r\n return {\r\n send(request) {\r\n return new Promise((resolve) => {\r\n const baseRequester = new XMLHttpRequest();\r\n baseRequester.open(request.method, request.url, true);\r\n Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key]));\r\n const createTimeout = (timeout, content) => {\r\n return setTimeout(() => {\r\n baseRequester.abort();\r\n resolve({\r\n status: 0,\r\n content,\r\n isTimedOut: true,\r\n });\r\n }, timeout * 1000);\r\n };\r\n const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');\r\n // eslint-disable-next-line functional/no-let\r\n let responseTimeout;\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onreadystatechange = () => {\r\n if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {\r\n clearTimeout(connectTimeout);\r\n responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onerror = () => {\r\n // istanbul ignore next\r\n if (baseRequester.status === 0) {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText || 'Network request failed',\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onload = () => {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText,\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n };\r\n baseRequester.send(request.data);\r\n });\r\n },\r\n };\r\n}\n\nfunction algoliasearch(appId, apiKey, options) {\r\n const commonOptions = {\r\n appId,\r\n apiKey,\r\n timeouts: {\r\n connect: 1,\r\n read: 2,\r\n write: 30,\r\n },\r\n requester: createBrowserXhrRequester(),\r\n logger: createConsoleLogger(LogLevelEnum.Error),\r\n responsesCache: createInMemoryCache(),\r\n requestsCache: createInMemoryCache({ serializable: false }),\r\n hostsCache: createFallbackableCache({\r\n caches: [\r\n createBrowserLocalStorageCache({ key: `${version}-${appId}` }),\r\n createInMemoryCache(),\r\n ],\r\n }),\r\n userAgent: createUserAgent(version).add({\r\n segment: 'Browser',\r\n version: 'lite',\r\n }),\r\n authMode: AuthMode.WithinQueryParameters,\r\n };\r\n return createSearchClient({\r\n ...commonOptions,\r\n ...options,\r\n methods: {\r\n search: multipleQueries,\r\n searchForFacetValues: multipleSearchForFacetValues,\r\n multipleQueries,\r\n multipleSearchForFacetValues,\r\n customRequest,\r\n initIndex: base => (indexName) => {\r\n return initIndex(base)(indexName, {\r\n methods: { search, searchForFacetValues, findAnswers },\r\n });\r\n },\r\n },\r\n });\r\n}\r\n// eslint-disable-next-line functional/immutable-data\r\nalgoliasearch.version = version;\n\nexport default algoliasearch;\n","var _excluded = [\"footer\", \"searchBox\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createAutocomplete } from '@algolia/autocomplete-core';\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { Footer } from './Footer';\nimport { Hit } from './Hit';\nimport { ScreenState } from './ScreenState';\nimport { SearchBox } from './SearchBox';\nimport { createStoredSearches } from './stored-searches';\nimport { useSearchClient } from './useSearchClient';\nimport { useTouchEvents } from './useTouchEvents';\nimport { useTrapFocus } from './useTrapFocus';\nimport { groupBy, identity, noop, removeHighlightTags, isModifierEvent } from './utils';\nexport function DocSearchModal(_ref) {\n var appId = _ref.appId,\n apiKey = _ref.apiKey,\n indexName = _ref.indexName,\n _ref$placeholder = _ref.placeholder,\n placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder,\n searchParameters = _ref.searchParameters,\n maxResultsPerGroup = _ref.maxResultsPerGroup,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? noop : _ref$onClose,\n _ref$transformItems = _ref.transformItems,\n transformItems = _ref$transformItems === void 0 ? identity : _ref$transformItems,\n _ref$hitComponent = _ref.hitComponent,\n hitComponent = _ref$hitComponent === void 0 ? Hit : _ref$hitComponent,\n _ref$resultsFooterCom = _ref.resultsFooterComponent,\n resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () {\n return null;\n } : _ref$resultsFooterCom,\n navigator = _ref.navigator,\n _ref$initialScrollY = _ref.initialScrollY,\n initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,\n _ref$transformSearchC = _ref.transformSearchClient,\n transformSearchClient = _ref$transformSearchC === void 0 ? identity : _ref$transformSearchC,\n _ref$disableUserPerso = _ref.disableUserPersonalization,\n disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso,\n _ref$initialQuery = _ref.initialQuery,\n initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery,\n _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n getMissingResultsUrl = _ref.getMissingResultsUrl,\n _ref$insights = _ref.insights,\n insights = _ref$insights === void 0 ? false : _ref$insights;\n\n var footerTranslations = translations.footer,\n searchBoxTranslations = translations.searchBox,\n screenStateTranslations = _objectWithoutProperties(translations, _excluded);\n\n var _React$useState = React.useState({\n query: '',\n collections: [],\n completion: null,\n context: {},\n isOpen: false,\n activeItemId: null,\n status: 'idle'\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n state = _React$useState2[0],\n setState = _React$useState2[1];\n\n var containerRef = React.useRef(null);\n var modalRef = React.useRef(null);\n var formElementRef = React.useRef(null);\n var dropdownRef = React.useRef(null);\n var inputRef = React.useRef(null);\n var snippetLength = React.useRef(10);\n var initialQueryFromSelection = React.useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, MAX_QUERY_SIZE) : '').current;\n var initialQuery = React.useRef(initialQueryFromProp || initialQueryFromSelection).current;\n var searchClient = useSearchClient(appId, apiKey, transformSearchClient);\n var favoriteSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_FAVORITE_SEARCHES__\".concat(indexName),\n limit: 10\n })).current;\n var recentSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_RECENT_SEARCHES__\".concat(indexName),\n // We display 7 recent searches and there's no favorites, but only\n // 4 when there are favorites.\n limit: favoriteSearches.getAll().length === 0 ? 7 : 4\n })).current;\n var saveRecentSearch = React.useCallback(function saveRecentSearch(item) {\n if (disableUserPersonalization) {\n return;\n } // We don't store `content` record, but their parent if available.\n\n\n var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited.\n\n if (search && favoriteSearches.getAll().findIndex(function (x) {\n return x.objectID === search.objectID;\n }) === -1) {\n recentSearches.add(search);\n }\n }, [favoriteSearches, recentSearches, disableUserPersonalization]);\n var sendItemClickEvent = React.useCallback(function (item) {\n if (!state.context.algoliaInsightsPlugin || !item.__autocomplete_id) return;\n var insightsItem = item;\n var insightsClickParams = {\n eventName: 'Item Selected',\n index: insightsItem.__autocomplete_indexName,\n items: [insightsItem],\n positions: [item.__autocomplete_id],\n queryID: insightsItem.__autocomplete_queryID\n };\n state.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(insightsClickParams);\n }, [state.context.algoliaInsightsPlugin]);\n var autocomplete = React.useMemo(function () {\n return createAutocomplete({\n id: 'docsearch',\n defaultActiveItemId: 0,\n placeholder: placeholder,\n openOnFocus: true,\n initialState: {\n query: initialQuery,\n context: {\n searchSuggestions: []\n }\n },\n insights: insights,\n navigator: navigator,\n onStateChange: function onStateChange(props) {\n setState(props.state);\n },\n getSources: function getSources(_ref2) {\n var query = _ref2.query,\n sourcesState = _ref2.state,\n setContext = _ref2.setContext,\n setStatus = _ref2.setStatus;\n\n if (!query) {\n if (disableUserPersonalization) {\n return [];\n }\n\n return [{\n sourceId: 'recentSearches',\n onSelect: function onSelect(_ref3) {\n var item = _ref3.item,\n event = _ref3.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref4) {\n var item = _ref4.item;\n return item.url;\n },\n getItems: function getItems() {\n return recentSearches.getAll();\n }\n }, {\n sourceId: 'favoriteSearches',\n onSelect: function onSelect(_ref5) {\n var item = _ref5.item,\n event = _ref5.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref6) {\n var item = _ref6.item;\n return item.url;\n },\n getItems: function getItems() {\n return favoriteSearches.getAll();\n }\n }];\n }\n\n var insightsActive = Boolean(insights);\n return searchClient.search([{\n query: query,\n indexName: indexName,\n params: _objectSpread({\n attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'],\n attributesToSnippet: [\"hierarchy.lvl1:\".concat(snippetLength.current), \"hierarchy.lvl2:\".concat(snippetLength.current), \"hierarchy.lvl3:\".concat(snippetLength.current), \"hierarchy.lvl4:\".concat(snippetLength.current), \"hierarchy.lvl5:\".concat(snippetLength.current), \"hierarchy.lvl6:\".concat(snippetLength.current), \"content:\".concat(snippetLength.current)],\n snippetEllipsisText: '…',\n highlightPreTag: '',\n highlightPostTag: '',\n hitsPerPage: 20,\n clickAnalytics: insightsActive\n }, searchParameters)\n }]).catch(function (error) {\n // The Algolia `RetryError` happens when all the servers have\n // failed, meaning that there's no chance the response comes\n // back. This is the right time to display an error.\n // See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5\n if (error.name === 'RetryError') {\n setStatus('error');\n }\n\n throw error;\n }).then(function (_ref7) {\n var results = _ref7.results;\n var firstResult = results[0];\n var hits = firstResult.hits,\n nbHits = firstResult.nbHits;\n var sources = groupBy(hits, function (hit) {\n return removeHighlightTags(hit);\n }, maxResultsPerGroup); // We store the `lvl0`s to display them as search suggestions\n // in the \"no results\" screen.\n\n if (sourcesState.context.searchSuggestions.length < Object.keys(sources).length) {\n setContext({\n searchSuggestions: Object.keys(sources)\n });\n }\n\n setContext({\n nbHits: nbHits\n });\n var insightsParams = {};\n\n if (insightsActive) {\n insightsParams = {\n __autocomplete_indexName: indexName,\n __autocomplete_queryID: firstResult.queryID,\n __autocomplete_algoliaCredentials: {\n appId: appId,\n apiKey: apiKey\n }\n };\n }\n\n return Object.values(sources).map(function (items, index) {\n return {\n sourceId: \"hits\".concat(index),\n onSelect: function onSelect(_ref8) {\n var item = _ref8.item,\n event = _ref8.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref9) {\n var item = _ref9.item;\n return item.url;\n },\n getItems: function getItems() {\n return Object.values(groupBy(items, function (item) {\n return item.hierarchy.lvl1;\n }, maxResultsPerGroup)).map(transformItems).map(function (groupedHits) {\n return groupedHits.map(function (item) {\n var parent = null;\n var potentialParent = groupedHits.find(function (siblingItem) {\n return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1;\n });\n\n if (item.type !== 'lvl1' && potentialParent) {\n parent = potentialParent;\n }\n\n return _objectSpread(_objectSpread({}, item), {}, {\n __docsearch_parent: parent\n }, insightsParams);\n });\n }).flat();\n }\n };\n });\n });\n }\n });\n }, [indexName, searchParameters, maxResultsPerGroup, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization, insights, appId, apiKey]);\n var getEnvironmentProps = autocomplete.getEnvironmentProps,\n getRootProps = autocomplete.getRootProps,\n refresh = autocomplete.refresh;\n useTouchEvents({\n getEnvironmentProps: getEnvironmentProps,\n panelElement: dropdownRef.current,\n formElement: formElementRef.current,\n inputElement: inputRef.current\n });\n useTrapFocus({\n container: containerRef.current\n });\n React.useEffect(function () {\n document.body.classList.add('DocSearch--active');\n return function () {\n var _window$scrollTo, _window;\n\n document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists\n // first.\n\n (_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 ? void 0 : _window$scrollTo.call(_window, 0, initialScrollY);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n var isMobileMediaQuery = window.matchMedia('(max-width: 768px)');\n\n if (isMobileMediaQuery.matches) {\n snippetLength.current = 5;\n }\n }, []);\n React.useEffect(function () {\n if (dropdownRef.current) {\n dropdownRef.current.scrollTop = 0;\n }\n }, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection\n // Search) because users rather want to see the results directly, without the\n // keyboard appearing.\n // We therefore need to refresh the autocomplete instance to load all the\n // results, which is usually triggered on focus.\n\n React.useEffect(function () {\n if (initialQuery.length > 0) {\n refresh();\n\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n }, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height\n // because all mobile browsers don't compute their height the same way.\n // See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/\n\n React.useEffect(function () {\n function setFullViewportHeight() {\n if (modalRef.current) {\n var vh = window.innerHeight * 0.01;\n modalRef.current.style.setProperty('--docsearch-vh', \"\".concat(vh, \"px\"));\n }\n }\n\n setFullViewportHeight();\n window.addEventListener('resize', setFullViewportHeight);\n return function () {\n window.removeEventListener('resize', setFullViewportHeight);\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: containerRef\n }, getRootProps({\n 'aria-expanded': true\n }), {\n className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '),\n role: \"button\",\n tabIndex: 0,\n onMouseDown: function onMouseDown(event) {\n if (event.target === event.currentTarget) {\n onClose();\n }\n }\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Modal\",\n ref: modalRef\n }, /*#__PURE__*/React.createElement(\"header\", {\n className: \"DocSearch-SearchBar\",\n ref: formElementRef\n }, /*#__PURE__*/React.createElement(SearchBox, _extends({}, autocomplete, {\n state: state,\n autoFocus: initialQuery.length === 0,\n inputRef: inputRef,\n isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection,\n translations: searchBoxTranslations,\n onClose: onClose\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown\",\n ref: dropdownRef\n }, /*#__PURE__*/React.createElement(ScreenState, _extends({}, autocomplete, {\n indexName: indexName,\n state: state,\n hitComponent: hitComponent,\n resultsFooterComponent: resultsFooterComponent,\n disableUserPersonalization: disableUserPersonalization,\n recentSearches: recentSearches,\n favoriteSearches: favoriteSearches,\n inputRef: inputRef,\n translations: screenStateTranslations,\n getMissingResultsUrl: getMissingResultsUrl,\n onItemClick: function onItemClick(item, event) {\n // If insights is active, send insights click event\n sendItemClickEvent(item);\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n }\n }))), /*#__PURE__*/React.createElement(\"footer\", {\n className: \"DocSearch-Footer\"\n }, /*#__PURE__*/React.createElement(Footer, {\n translations: footerTranslations\n }))));\n}","import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';\nimport React from 'react';\nimport { version } from './version';\nexport function useSearchClient(appId, apiKey, transformSearchClient) {\n var searchClient = React.useMemo(function () {\n var client = algoliasearch(appId, apiKey);\n client.addAlgoliaAgent('docsearch', version); // Since DocSearch.js relies on DocSearch React with an alias to Preact,\n // we cannot add the `docsearch-react` user agent by default, otherwise\n // it would also be sent on a DocSearch.js integration.\n // We therefore only add the `docsearch-react` user agent if `docsearch.js`\n // is not present.\n\n if (/docsearch.js \\(.*\\)/.test(client.transporter.userAgent.value) === false) {\n client.addAlgoliaAgent('docsearch-react', version);\n }\n\n return transformSearchClient(client);\n }, [appId, apiKey, transformSearchClient]);\n return searchClient;\n}","export var version = '3.5.2';","import React from 'react';\nexport function useTouchEvents(_ref) {\n var getEnvironmentProps = _ref.getEnvironmentProps,\n panelElement = _ref.panelElement,\n formElement = _ref.formElement,\n inputElement = _ref.inputElement;\n React.useEffect(function () {\n if (!(panelElement && formElement && inputElement)) {\n return undefined;\n }\n\n var _getEnvironmentProps = getEnvironmentProps({\n panelElement: panelElement,\n formElement: formElement,\n inputElement: inputElement\n }),\n onTouchStart = _getEnvironmentProps.onTouchStart,\n onTouchMove = _getEnvironmentProps.onTouchMove;\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchmove', onTouchMove);\n return function () {\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchmove', onTouchMove);\n };\n }, [getEnvironmentProps, panelElement, formElement, inputElement]);\n}","import React from 'react';\nexport function useTrapFocus(_ref) {\n var container = _ref.container;\n React.useEffect(function () {\n if (!container) {\n return undefined;\n }\n\n var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])');\n var firstElement = focusableElements[0];\n var lastElement = focusableElements[focusableElements.length - 1];\n\n function trapFocus(event) {\n if (event.key !== 'Tab') {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n\n container.addEventListener('keydown', trapFocus);\n return function () {\n container.removeEventListener('keydown', trapFocus);\n };\n }, [container]);\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport React from 'react';\nimport { createPortal } from 'react-dom';\nimport { DocSearchButton } from './DocSearchButton';\nimport { DocSearchModal } from './DocSearchModal';\nimport { useDocSearchKeyboardEvents } from './useDocSearchKeyboardEvents';\nexport function DocSearch(props) {\n var _props$translations, _props$translations2;\n\n var searchButtonRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isOpen = _React$useState2[0],\n setIsOpen = _React$useState2[1];\n\n var _React$useState3 = React.useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n initialQuery = _React$useState4[0],\n setInitialQuery = _React$useState4[1];\n\n var onOpen = React.useCallback(function () {\n setIsOpen(true);\n }, [setIsOpen]);\n var onClose = React.useCallback(function () {\n setIsOpen(false);\n }, [setIsOpen]);\n var onInput = React.useCallback(function (event) {\n setIsOpen(true);\n setInitialQuery(event.key);\n }, [setIsOpen, setInitialQuery]);\n useDocSearchKeyboardEvents({\n isOpen: isOpen,\n onOpen: onOpen,\n onClose: onClose,\n onInput: onInput,\n searchButtonRef: searchButtonRef\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButton, {\n ref: searchButtonRef,\n translations: props === null || props === void 0 || (_props$translations = props.translations) === null || _props$translations === void 0 ? void 0 : _props$translations.button,\n onClick: onOpen\n }), isOpen && createPortal( /*#__PURE__*/React.createElement(DocSearchModal, _extends({}, props, {\n initialScrollY: window.scrollY,\n initialQuery: initialQuery,\n translations: props === null || props === void 0 || (_props$translations2 = props.translations) === null || _props$translations2 === void 0 ? void 0 : _props$translations2.modal,\n onClose: onClose\n })), document.body));\n}","import React from 'react';\n\nfunction isEditingContent(event) {\n var element = event.target;\n var tagName = element.tagName;\n return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';\n}\n\nexport function useDocSearchKeyboardEvents(_ref) {\n var isOpen = _ref.isOpen,\n onOpen = _ref.onOpen,\n onClose = _ref.onClose,\n onInput = _ref.onInput,\n searchButtonRef = _ref.searchButtonRef;\n React.useEffect(function () {\n function onKeyDown(event) {\n var _event$key;\n\n function open() {\n // We check that no other DocSearch modal is showing before opening\n // another one.\n if (!document.body.classList.contains('DocSearch--active')) {\n onOpen();\n }\n }\n\n if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal.\n // We need to check for `event.key` because it can be `undefined` with\n // Chrome's autofill feature.\n // See https://github.com/paperjs/paper.js/issues/1398\n ((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's\n // a character.\n !isEditingContent(event) && event.key === '/' && !isOpen) {\n event.preventDefault();\n\n if (isOpen) {\n onClose();\n } else if (!document.body.classList.contains('DocSearch--active')) {\n open();\n }\n }\n\n if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {\n if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {\n onInput(event);\n }\n }\n }\n\n window.addEventListener('keydown', onKeyDown);\n return function () {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [isOpen, onOpen, onClose, onInput, searchButtonRef]);\n}","import type { DocSearchProps as DocSearchComponentProps } from '@docsearch/react';\nimport { DocSearch, version } from '@docsearch/react';\nimport React, { render } from 'preact/compat';\n\nfunction getHTMLElement(\n value: HTMLElement | string,\n environment: DocSearchProps['environment'] = window\n): HTMLElement {\n if (typeof value === 'string') {\n return environment.document.querySelector(value)!;\n }\n\n return value;\n}\n\ninterface DocSearchProps extends DocSearchComponentProps {\n container: HTMLElement | string;\n environment?: typeof window;\n}\n\nexport function docsearch(props: DocSearchProps) {\n render(\n {\n searchClient.addAlgoliaAgent('docsearch.js', version);\n\n return props.transformSearchClient\n ? props.transformSearchClient(searchClient)\n : searchClient;\n }}\n />,\n getHTMLElement(props.container, props.environment)\n );\n}\n"],"names":["EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","currentIndex","currentComponent","prevRaf","currentHook","afterPaintEffects","oldBeforeDiff","options","oldBeforeRender","oldAfterDiff","diffed","oldCommit","oldBeforeUnmount","unmount","getHookState","index","type","hooks","__","__h","length","push","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","n","nextValue","action","setState","useEffect","callback","args","state","argsChanged","useLayoutEffect","useMemo","factory","flushAfterPaintEffects","forEach","t","component","invokeCleanup","invokeEffect","e","vnode","c","requestAnimationFrame","raf","done","clearTimeout","timeout","HAS_RAF","cancelAnimationFrame","setTimeout","commitQueue","some","filter","cb","hook","comp","oldArgs","newArgs","arg","f","assign","obj","props","i","shallowDiffers","a","b","initialValue","current","ref","createHandle","concat","context","provider","sub","value","formatter","useDebugValue","ControlKeyIcon","React","createElement","width","height","className","d","strokeWidth","stroke","fill","strokeLinecap","SearchIcon","viewBox","fillRule","strokeLinejoin","_excluded","_extends","Object","target","arguments","source","key","prototype","hasOwnProperty","call","apply","this","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","DocSearchButton","forwardRef","_ref","_ref$translations","translations","_translations$buttonT","buttonText","_translations$buttonA","buttonAriaLabel","_useState2","setKey","navigator","platform","Fragment","debounce","fn","time","timerId","undefined","_len","_key","_x","_r","return","_typeof","decycle","seen","Set","process","env","NODE_ENV","has","newSeen","add","map","x","fromEntries","entries","_ref2","flatten","values","reduce","autocompleteId","getItemsCount","collections","sum","collection","items","invariant","condition","message","Error","isPrimitive","isEqual","first","second","_Object$keys","noop","userAgents","segment","version","warnCache","createClickedEvent","item","__autocomplete_indexName","positions","findIndex","objectID","queryID","__autocomplete_queryID","algoliaSource","_excluded2","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","ownKeys","object","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","param","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","window","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","checkOptions","sanitizedMessage","trim","warn","debug","createInternalCancelablePromise","promise","then","onfulfilled","onrejected","createCallback","catch","finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getActiveItem","collectionIndex","collectionsCount","activeItemId","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","getItemInputValue","itemUrl","getItemUrl","regex","createStore","onStoreStateChange","list","getState","dispatch","prevState","pendingRequests","cancelablePromise","cancelAll","isEmpty","getDefaultProps","pluginSubscribers","_props$id","plugins","openOnFocus","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","sources","id","query","completion","status","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","JSON","stringify","maybeSource","sourceId","includes","defaultSource","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigate","location","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","every","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","_request","getItems","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","contextNode","parent","child","contains","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","getLabelProps","sourceIndex","htmlFor","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","_onKeyDown","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","stateReducer","_nextState","createAutocomplete","subscribers","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","AlgoliaLogo","_translations$searchB","searchByText","href","hostname","rel","xmlns","y","rx","ry","CommandIcon","ariaLabel","children","Footer","_translations$selectT","selectText","_translations$selectK","selectKeyAriaLabel","_translations$navigat","navigateText","_translations$navigat2","navigateUpKeyAriaLabel","_translations$navigat3","navigateDownKeyAriaLabel","_translations$closeTe","closeText","_translations$closeKe","closeKeyAriaLabel","Hit","url","LoadingIcon","strokeOpacity","cx","cy","r","attributeName","to","dur","repeatCount","RecentIcon","ResetIcon","SelectIcon","LvlIcon","SourceIcon","ContentIcon","AnchorIcon","StarIcon","ErrorIcon","NoResultsIcon","ErrorScreen","_translations$titleTe","titleText","_translations$helpTex","helpText","NoResultsScreen","_translations$noResul","noResultsText","_translations$suggest","suggestedQueryText","_translations$reportM","reportMissingResultsText","_translations$reportM2","reportMissingResultsLinkText","searchSuggestions","search","toLowerCase","inputRef","getMissingResultsUrl","getPropertyByPath","path","prev","Snippet","attribute","_ref$tagName","tagName","dangerouslySetInnerHTML","__html","Results","title","Result","join","renderIcon","renderAction","onItemClick","hitComponent","_React$useState2","isDeleting","setIsDeleting","_React$useState4","isFavoriting","setIsFavoriting","useRef","__docsearch_parent","onTransitionEnd","hierarchy","runDeleteTransition","runFavoriteTransition","groupBy","predicate","maxResultsPerGroup","identity","isModifierEvent","button","regexHighlightTags","regexHasHighlightTags","RegExp","removeHighlightTags","_internalDocSearchHit","_hit$_highlightResult","internalDocSearchHit","lvl0","replace","ResultsScreen","_collection$items","resultsFooterComponent","StartScreen","_translations$recentS","recentSearchesTitle","_translations$noRecen","noRecentSearchesText","_translations$saveRec","saveRecentSearchButtonTitle","_translations$removeR","removeRecentSearchButtonTitle","_translations$favorit","favoriteSearchesTitle","_translations$removeF","removeFavoriteSearchButtonTitle","hasCollections","disableUserPersonalization","stopPropagation","favoriteSearches","recentSearches","remove","ScreenState","memo","errorScreen","noResultsScreen","startScreen","_prevProps","nextProps","SearchBox","_translations$resetBu","resetButtonTitle","_translations$resetBu2","resetButtonAriaLabel","_translations$cancelB","cancelButtonText","_translations$cancelB2","cancelButtonAriaLabel","isFromSelection","select","hidden","onClose","createStorage","localStorage","setItem","removeItem","isLocalStorageSupported","getItem","parse","createStoredSearches","_ref$limit","limit","storage","_snippetResult","isQueryAlreadySaved","splice","unshift","getAll","createBrowserLocalStorageCache","namespaceKey","getStorage","getNamespace","setNamespace","namespace","removeOutdatedCacheItems","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","timestamp","filteredNamespaceWithoutExpiredItems","cacheItem","currentTimestamp","Date","getTime","get","defaultValue","events","miss","keyAsString","exists","set","delete","clear","createFallbackableCache","caches","shift","createInMemoryCache","serializable","cache","shuffle","array","Math","floor","random","addMethods","base","methods","encode","format","encodeURIComponent","AuthMode","WithinQueryParameters","WithinHeaders","createMappedRequestOptions","requestOptions","data","queryParameters","cacheable","CallEnum","Read","Write","Any","HostStatusEnum","createStatefulHost","host","lastUpdate","now","createStatelessHost","protocol","accept","MethodEnum","createRetryableOptions","hostsCache","statelessHosts","statelessHost","statefulHosts","hostsUp","isStatefulHostUp","hostsTimeouted","isStatefulHostTimeouted","hostsAvailable","getTimeout","timeoutsCount","baseTimeout","retryableRequest","transporter","stackTrace","serializeData","serializedHeaders","header","serializeHeaders","dataQueryParameters","retry","hosts","pop","transporterStackTrace","stackTraceWithoutCredentials","serializeUrl","connectTimeout","timeouts","connect","responseTimeout","pushToStackTrace","stackFrame","triesLeft","decisions","onSuccess","createDeserializationError","deserializeSuccess","onRetry","isTimedOut","logger","info","stackFrameWithoutCredentials","onFail","createApiError","deserializeFailure","requester","send","outcomes","isNetworkError","isRetryable","retryDecision","reverse","createUserAgent","addedUserAgent","queryParametersAsString","serializeQueryParameters","charAt","substr","parameters","modifiedHeaders","createSearchClient","auth","authMode","credentials","createAuth","requestsCache","responsesCache","read","mappedRequestOptions","createRetryableRequest","reject","write","createTransporter","addAlgoliaAgent","clearCache","customRequest","initIndex","searchIndex","multipleQueries","multipleSearchForFacetValues","facetName","facetQuery","searchForFacetValues","findAnswers","queryLanguages","LogLevelEnum","algoliasearch","logLevel","commonOptions","baseRequester","XMLHttpRequest","setRequestHeader","createTimeout","abort","onreadystatechange","readyState","OPENED","responseText","onload","DocSearchModal","_ref$placeholder","searchParameters","_ref$onClose","_ref$transformItems","transformItems","_ref$hitComponent","_ref$resultsFooterCom","_ref$initialScrollY","initialScrollY","_ref$transformSearchC","transformSearchClient","_ref$disableUserPerso","_ref$initialQuery","initialQuery","initialQueryFromProp","_ref$insights","footerTranslations","footer","searchBoxTranslations","searchBox","screenStateTranslations","containerRef","modalRef","formElementRef","dropdownRef","snippetLength","initialQueryFromSelection","getSelection","client","useSearchClient","saveRecentSearch","useCallback","sendItemClickEvent","insightsItem","insightsClickParams","autocomplete","sourcesState","insightsActive","attributesToRetrieve","attributesToSnippet","snippetEllipsisText","highlightPreTag","highlightPostTag","hitsPerPage","firstResult","nbHits","lvl1","groupedHits","potentialParent","siblingItem","flat","_getEnvironmentProps","addEventListener","removeEventListener","useTouchEvents","focusableElements","querySelectorAll","firstElement","lastElement","trapFocus","useTrapFocus","classList","_window$scrollTo","_window","scrollTo","matchMedia","scrollTop","setFullViewportHeight","vh","innerHeight","style","setProperty","tabIndex","DocSearch","_props$translations","_props$translations2","searchButtonRef","setInitialQuery","onOpen","_event$key","keyCode","element","isContentEditable","isEditingContent","fromCharCode","useDocSearchKeyboardEvents","createPortal","scrollY","modal","docsearch","render","getHTMLElement"],"mappings":";gyFAAaA,EAAY,GACZC,EAAY,GACZC,EAAqB,6+RCClC,IAAIC,EAGAC,EAsBAC,EAZAC,EAAc,EAGdC,EAAoB,GAEpBC,EAAgBC,EAAAA,IAChBC,EAAkBD,EAAAA,IAClBE,EAAeF,EAAQG,OACvBC,EAAYJ,EAAAA,IACZK,GAAmBL,EAAQM,QAwE/B,SAASC,GAAaC,EAAOC,GACxBT,EAAAA,KACHA,EAAAA,IAAcL,EAAkBa,EAAOX,GAAeY,GAEvDZ,EAAc,MAORa,EACLf,EAAAA,MACCA,EAAAA,IAA2B,CAAAgB,GACpB,GAAAC,IACU,YAGfJ,GAASE,EAAAA,GAAYG,QACxBH,EAAAA,GAAYI,KAAK,IAEXJ,EAAAA,GAAYF,GAMb,SAASO,GAASC,UACxBnB,EAAc,EACPoB,GAAWC,GAAgBF,GASnC,SAAgBC,GAAWE,EAASH,EAAcI,OAE3CC,EAAYd,GAAab,IAAgB,UAC/C2B,EAAUC,EAAWH,EAChBE,EAAAA,MACJA,EAAAA,GAAmB,CACjBD,EAAiDA,EAAKJ,GAA/CE,QAAAA,EAA0BF,GAElC,SAAAO,OACOC,EAAYH,EAAUC,EAASD,EAAAA,GAAiB,GAAII,GACtDJ,EAAAA,GAAiB,KAAOG,IAC3BH,EAAAA,GAAmB,CAACG,EAAWH,EAAAA,GAAiB,IAChDA,EAAAA,IAAqBK,SAAS,OAKjCL,EAAAA,IAAuB1B,GAGjB0B,EAAAA,GAOD,SAASM,GAAUC,EAAUC,OAE7BC,EAAQvB,GAAab,IAAgB,IACtCM,EAAAA,KAAwB+B,GAAYD,EAAAA,IAAaD,KACrDC,EAAAA,GAAeF,EACfE,EAAAA,IAAcD,EAEdlC,EAAAA,IAAAA,IAAyCmB,KAAKgB,IAQzC,SAASE,GAAgBJ,EAAUC,OAEnCC,EAAQv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,MAEvC,CAAC/N,EAAQ+qB,EAAQlQ,EAASlR,EAASkhB,IDTtCS,CAA2B,CACzBtrB,OAAQA,EACR+qB,OAAQA,EACRlQ,QAASA,EACTlR,QARY/Z,GAAMo4B,aAAY,SAAUjqB,GACxCmI,GAAU,GACV4kB,EAAgB/sB,EAAM/M,OACrB,CAACkV,EAAW4kB,IAMbD,gBAAiBA,IAECj7B,GAAMC,cAAcD,GAAM8E,SAAU,KAAmB9E,GAAMC,cAAcgE,GAAiB,CAC9G3E,IAAK27B,EACL52B,aAActF,MAAAA,GAAqF,QAA9Cg8B,EAAsBh8B,EAAMsF,oBAAkD,IAAxB02B,OAAiC,EAASA,EAAoBjT,OACzK7I,QAASkc,IACP/qB,GAAUurB,GAA2B37B,GAAMC,cAAcm2B,GAAgBr1B,GAAS,GAAIhC,EAAO,CAC/F83B,eAAgB7nB,OAAO4sB,QACvB1E,aAAcA,EACd7yB,aAActF,MAAAA,GAAsF,QAA/Ci8B,EAAuBj8B,EAAMsF,oBAAmD,IAAzB22B,OAAkC,EAASA,EAAqBa,MAC5K5Q,QAASA,KACNzb,SAASM,OExCT,SAASgsB,GAAU/8B,GACxBg9B,GACE/7B,iBAAC86B,QACK/7B,GACJg4B,sBAAuB,SAAC9e,UACtBA,EAAayc,gBAAgB,eLzBhB,SK2BN31B,EAAMg4B,sBACTh4B,EAAMg4B,sBAAsB9e,GAC5BA,MAzBZ,SACErY,OACAyP,yDAA6CL,aAExB,iBAAVpP,EACFyP,EAAYG,SAAS6R,cAA2BzhB,GAGlDA,EAoBLo8B,CAAej9B,EAAMmZ,UAAWnZ,EAAMsQ"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js b/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js new file mode 100644 index 00000000..f6c4bc63 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js @@ -0,0 +1,3 @@ +/*! @docsearch/js 3.5.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).docsearch=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3)for(n=[n],i=3;i0?O(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=g[s])||p&&m.key==p.key&&m.type===p.type)g[s]=void 0;else for(f=0;f<_;f++){if((p=g[f])&&m.key==p.key&&m.type===p.type){g[f]=void 0;break}p=null}q(e,m,p=p||d,o,i,c,a,u,l),v=m.__e,(f=m.ref)&&p.ref!=f&&(b||(b=[]),p.ref&&b.push(p.ref,null,m),b.push(f,m.__c||v,m)),null!=v?(null==y&&(y=v),"function"==typeof m.type&&null!=m.__k&&m.__k===p.__k?m.__d=u=k(m,u,e):u=C(e,m,p,g,v,u),l||"option"!==n.type?"function"==typeof n.type&&(n.__d=u):e.value=""):u&&p.__e==u&&u.parentNode!=e&&(u=w(p))}for(n.__e=y,s=_;s--;)null!=g[s]&&("function"==typeof n.type&&null!=g[s].__e&&g[s].__e==n.__d&&(n.__d=w(r,s+1)),U(g[s],g[s]));if(b)for(s=0;s3)for(n=[n],i=3;i=n.__.length&&n.__.push({}),n.__[e]}function ne(e){return $=1,re(pe,e)}function re(e,t,n){var r=te(K++,2);return r.t=e,r.__c||(r.__=[n?n(t):pe(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=z),r.__}function oe(e,t){var n=te(K++,3);!s.__s&&fe(n.__H,t)&&(n.__=e,n.__H=t,z.__H.__h.push(n))}function ie(e,t){var n=te(K++,4);!s.__s&&fe(n.__H,t)&&(n.__=e,n.__H=t,z.__h.push(n))}function ce(e,t){var n=te(K++,7);return fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ae(){Q.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(se),e.__H.__h=[]}catch(t){e.__H.__h=[],s.__e(t,e.__v)}})),Q=[]}s.__b=function(e){z=null,Z&&Z(e)},s.__r=function(e){Y&&Y(e),K=0;var t=(z=e.__c).__H;t&&(t.__h.forEach(le),t.__h.forEach(se),t.__h=[])},s.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==Q.push(t)&&J===s.requestAnimationFrame||((J=s.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))})(ae)),z=void 0},s.__c=function(e,t){t.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||se(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],s.__e(n,e.__v)}})),X&&X(e,t)},s.unmount=function(e){ee&&ee(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(le)}catch(e){s.__e(e,t.__v)}};var ue="function"==typeof requestAnimationFrame;function le(e){var t=z;"function"==typeof e.__c&&e.__c(),z=t}function se(e){var t=z;e.__c=e.__(),z=t}function fe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function pe(e,t){return"function"==typeof t?t(e):t}function me(e,t){for(var n in t)e[n]=t[n];return e}function ve(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function de(e){this.props=e}(de.prototype=new j).isPureReactComponent=!0,de.prototype.shouldComponentUpdate=function(e,t){return ve(this.props,e)||ve(this.state,t)};var he=s.__b;s.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),he&&he(e)};var ye="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var be=function(e,t){return null==e?null:A(A(e).map(t))},ge={map:be,forEach:be,count:function(e){return e?A(e).length:0},only:function(e){var t=A(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:A},_e=s.__e;function Oe(){this.__u=0,this.t=null,this.__b=null}function Se(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function je(){this.u=null,this.o=null}s.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);_e(e,t,n)},(Oe.prototype=new j).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Se(r.__v),i=!1,c=function(){i||(i=!0,n.componentWillUnmount=n.__c,o?o(a):a())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){c(),n.__c&&n.__c()};var a=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},u=!0===t.__h;r.__u++||u||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(c,c)},Oe.prototype.componentWillUnmount=function(){this.t=[]},Oe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=me({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&_(S,null,e.fallback);return o&&(o.__h=null),[_(S,null,t.__e?null:e.children),o]};var we=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),B(_(Ee,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){return _(Pe,{__v:e,i:t})}(je.prototype=new j).__e=function(e){var t=this,n=Se(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),we(t,e,r)):o()};n?n(i):i()}},je.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){we(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ke=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ae=function(e){return("undefined"!=typeof Symbol&&"symbol"==n(Symbol())?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ce(e,t,n){return null==t.__k&&(t.textContent=""),B(e,t),"function"==typeof n&&n(),e?e.__c:null}j.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(j.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var xe=s.event;function Ne(){}function Te(){return this.cancelBubble}function Re(){return this.defaultPrevented}s.event=function(e){return xe&&(e=xe(e)),e.persist=Ne,e.isPropagationStopped=Te,e.isDefaultPrevented=Re,e.nativeEvent=e};var qe,Le={configurable:!0,get:function(){return this.class}},Me=s.vnode;s.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){for(var o in r={},n){var i=n[o];"value"===o&&"defaultValue"in n&&null==i||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!Ae(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():ke.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===i&&(i=void 0),r[o]=i)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=A(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=A(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r}t&&n.class!=n.className&&(Le.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Le)),e.$$typeof=De,Me&&Me(e)};var He=s.__r;s.__r=function(e){He&&He(e),qe=e.__c};var Ue={ReactCurrentDispatcher:{current:{readContext:function(e){return qe.__n[e.__c].props.value}}}};"object"==("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now&&performance.now.bind(performance);function Fe(e){return!!e&&e.$$typeof===De}var Be={useState:ne,useReducer:re,useEffect:oe,useLayoutEffect:ie,useRef:function(e){return $=5,ce((function(){return{current:e}}),[])},useImperativeHandle:function(e,t,n){$=6,ie((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:ce,useCallback:function(e,t){return $=8,ce((function(){return e}),t)},useContext:function(e){var t=z.context[e.__c],n=te(K++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__},useDebugValue:function(e,t){s.useDebugValue&&s.useDebugValue(t?t(e):e)},version:"16.8.0",Children:ge,render:Ce,hydrate:function(e,t,n){return V(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(B(null,e),!0)},createPortal:Ie,createElement:_,createContext:function(e,t){var n={__c:t="__cC"+v++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(P)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return _.bind(null,e)},cloneElement:function(e){return Fe(e)?W.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:S,isValidElement:Fe,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:j,PureComponent:de,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:ve(this.props,e)}function r(t){return this.shouldComponentUpdate=n,_(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t,r){var o=me({},t);return delete o.ref,e(o,(r=t.ref||r)&&("object"!=n(r)||"current"in r)?r:null)}return t.$$typeof=ye,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:S,Suspense:Oe,SuspenseList:je,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return _(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ue};function Ve(){return Be.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},Be.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function We(){return Be.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},Be.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Ke=["translations"];function ze(){return ze=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ze="Ctrl";var Ye=Be.forwardRef((function(e,t){var n=e.translations,r=void 0===n?{}:n,o=Qe(e,Ke),i=r.buttonText,c=void 0===i?"Search":i,a=r.buttonAriaLabel,u=void 0===a?"Search":a,l=Je(ne(null),2),s=l[0],f=l[1];return oe((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("⌘"):f(Ze))}),[]),Be.createElement("button",ze({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},o,{ref:t}),Be.createElement("span",{className:"DocSearch-Button-Container"},Be.createElement(We,null),Be.createElement("span",{className:"DocSearch-Button-Placeholder"},c)),Be.createElement("span",{className:"DocSearch-Button-Keys"},null!==s&&Be.createElement(Be.Fragment,null,Be.createElement("kbd",{className:"DocSearch-Button-Key"},s===Ze?Be.createElement(Ve,null):s),Be.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))}));function Ge(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r=3||2===n&&r>=4||1===n&&r>=10);function i(t,n,r){if(o&&void 0!==r){var i=r[0].__autocomplete_algoliaCredentials,c={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(pt(n),[{headers:c}]))}else e.apply(void 0,[t].concat(pt(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDsAfterSearch",gt(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDs",gt(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDsAfterSearch",gt(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDs",gt(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=vt(t,st);return[].concat(pt(e),pt(bt(ht(ht({},r),{},{objectIDs:(null==n?void 0:n.map((function(e){return e.objectID})))||r.objectIDs})).map((function(e){return{items:n,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return i("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Ot(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function St(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function jt(e){return jt="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},jt(e)}function wt(e){return function(e){if(Array.isArray(e))return Et(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Et(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&Ct({onItemsChange:r,items:n,insights:a,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;c("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:a}}),n((function(e){var t=e.item,n=e.state,r=e.event;St(t)&&o({state:n,event:r,insights:a,item:t,insightsEvents:[It({eventName:"Item Selected"},ct({item:t,items:u.current}))]})})),r((function(e){var t=e.item,n=e.state,r=e.event;St(t)&&i({state:n,event:r,insights:a,item:t,insightsEvents:[It({eventName:"Item Active"},ct({item:t,items:u.current}))]})}))},onStateChange:function(e){var t=e.state;l({state:t})},__autocomplete_pluginOptions:e}}function Nt(e,t){var n=t;return{then:function(t,r){return Nt(e.then(Rt(t,n,e),Rt(r,n,e)),n)},catch:function(t){return Nt(e.catch(Rt(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Nt(e.finally(Rt(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function Tt(e){return Nt(e,{isCanceled:!1,onCancelList:[]})}function Rt(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function qt(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(et++),plugins:o,initialState:tn({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(Gt(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:ot,onResolve:ot};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=Mt(Mt({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return Xe(e)})).then((function(e){return e.map((function(e){return tn(tn({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:tn({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function on(e){return on="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},on(e)}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var En,Pn,In,Dn=null,kn=(En=-1,Pn=-1,In=void 0,function(e){var t=++En;return Promise.resolve(e).then((function(e){return In&&t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ln(e){return Ln="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},Ln(e)}var Mn=["props","refresh","store"],Hn=["inputElement","formElement","panelElement"],Un=["inputElement"],Fn=["inputElement","maxLength"],Bn=["sourceIndex"],Vn=["sourceIndex"],Wn=["item","source","sourceIndex"];function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Qn(e){var t=e.props,n=e.refresh,r=e.store,o=$n(e,Mn),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,i=e.panelElement;function c(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,i].some((function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return zn({onTouchStart:c,onMouseDown:c,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},$n(e,Hn))},getRootProps:function(e){return zn({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return zn({action:"",noValidate:!0,role:"search",onSubmit:function(i){var c;i.preventDefault(),t.onSubmit(zn({event:i,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(c=e.inputElement)||void 0===c||c.blur()},onReset:function(i){var c;i.preventDefault(),t.onReset(zn({event:i,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(c=e.inputElement)||void 0===c||c.focus()}},$n(e,Un))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,o=$n(n,Bn);return zn({htmlFor:"".concat(i(t.id,r),"-input"),id:"".concat(i(t.id,r),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(r.getState().query))&&An(zn({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var a=e||{},u=(a.inputElement,a.maxLength),l=void 0===u?512:u,s=$n(a,Fn),f=Ft(r.getState()),p=function(e){return Boolean(e&&e.match(Bt))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),m=null!=f&&f.itemUrl&&!p?"go":"search";return zn({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:m,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(e){An(zn({event:e,props:t,query:e.currentTarget.value.slice(0,l),refresh:n,store:r},o))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,i=qn(e,xn);if("ArrowUp"===t.key||"ArrowDown"===t.key){var c=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},a=function(){var e=Ft(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,c=e.itemInputValue,a=e.itemUrl,u=e.source;u.onActive(Tn({event:t,item:n,itemInputValue:c,itemUrl:a,refresh:r,source:u,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?An(Tn({event:t,props:n,query:o.getState().query,refresh:r,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),a(),setTimeout(c,0)})):(o.dispatch(t.key,{}),a(),c())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var u=Ft(o.getState()),l=u.item,s=u.itemInputValue,f=u.itemUrl,p=u.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(p.onSelect(Tn({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),n.navigator.navigateNewTab({itemUrl:f,item:l,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(p.onSelect(Tn({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),n.navigator.navigateNewWindow({itemUrl:f,item:l,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return p.onSelect(Tn({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),void n.navigator.navigate({itemUrl:f,item:l,state:o.getState()});An(Tn({event:t,nextState:{isOpen:!1},props:n,query:s,refresh:r,store:o},i)).then((function(){p.onSelect(Tn({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i))}))}}}(zn({event:e,props:t,refresh:n,store:r},o))},onFocus:c,onBlur:ot,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||c(n)}},s)},getPanelProps:function(e){return zn({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,o=$n(n,Vn);return zn({role:"listbox","aria-labelledby":"".concat(i(t.id,r),"-label"),id:"".concat(i(t.id,r),"-list")},o)},getItemProps:function(e){var c=e.item,a=e.source,u=e.sourceIndex,l=$n(e,Wn);return zn({id:"".concat(i(t.id,u),"-item-").concat(c.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===c.__autocomplete_id,onMouseMove:function(e){if(c.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",c.__autocomplete_id);var t=Ft(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,a=t.itemInputValue,u=t.itemUrl,l=t.source;l.onActive(zn({event:e,item:i,itemInputValue:a,itemUrl:u,refresh:n,source:l,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=a.getItemInputValue({item:c,state:r.getState()}),u=a.getItemUrl({item:c,state:r.getState()});(u?Promise.resolve():An(zn({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:n,store:r},o))).then((function(){a.onSelect(zn({event:e,item:c,itemInputValue:i,itemUrl:u,refresh:n,source:a,state:r.getState()},o))}))}},l)}}}function Zn(e){return Zn="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},Zn(e)}function Yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xr(e){var t=e.translations,n=void 0===t?{}:t,r=Cr(e,Dr),o=n.noResultsText,i=void 0===o?"No results for":o,c=n.suggestedQueryText,a=void 0===c?"Try searching for":c,u=n.reportMissingResultsText,l=void 0===u?"Believe this query should return results?":u,s=n.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,p=r.state.context.searchSuggestions;return Be.createElement("div",{className:"DocSearch-NoResults"},Be.createElement("div",{className:"DocSearch-Screen-Icon"},Be.createElement(Pr,null)),Be.createElement("p",{className:"DocSearch-Title"},i,' "',Be.createElement("strong",null,r.state.query),'"'),p&&p.length>0&&Be.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},Be.createElement("p",{className:"DocSearch-Help"},a,":"),Be.createElement("ul",null,p.slice(0,3).reduce((function(e,t){return[].concat(kr(e),[Be.createElement("li",{key:t},Be.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){r.setQuery(t.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},t))])}),[]))),r.getMissingResultsUrl&&Be.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),Be.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var Nr=["hit","attribute","tagName"];function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rr(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Mr(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Hr(e){var t=e.hit,n=e.attribute,r=e.tagName;return _(void 0===r?"span":r,Rr(Rr({},Lr(e,Nr)),{},{dangerouslySetInnerHTML:{__html:Mr(t,"_snippetResult.".concat(n,".value"))||Mr(t,n)}}))}function Ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n|<\/mark>)/g,Zr=RegExp(Qr.source);function Yr(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0)||{}).value;return o&&Zr.test(o)?o.replace(Qr,""):o}function Gr(){return Gr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ro(e){var t=e.translations,n=void 0===t?{}:t,r=no(e,eo),o=n.recentSearchesTitle,i=void 0===o?"Recent":o,c=n.noRecentSearchesText,a=void 0===c?"No recent searches":c,u=n.saveRecentSearchButtonTitle,l=void 0===u?"Save this search":u,s=n.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,p=n.favoriteSearchesTitle,m=void 0===p?"Favorite":p,v=n.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===r.state.status&&!1===r.hasCollections?r.disableUserPersonalization?null:Be.createElement("div",{className:"DocSearch-StartScreen"},Be.createElement("p",{className:"DocSearch-Help"},a)):!1===r.hasCollections?null:Be.createElement("div",{className:"DocSearch-Dropdown-Container"},Be.createElement(Vr,to({},r,{title:i,collection:r.state.collections[0],renderIcon:function(){return Be.createElement("div",{className:"DocSearch-Hit-icon"},Be.createElement(yr,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,o=e.runDeleteTransition;return Be.createElement(Be.Fragment,null,Be.createElement("div",{className:"DocSearch-Hit-action"},Be.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()}))}},Be.createElement(wr,null))),Be.createElement("div",{className:"DocSearch-Hit-action"},Be.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){r.recentSearches.remove(t),r.refresh()}))}},Be.createElement(br,null))))}})),Be.createElement(Vr,to({},r,{title:m,collection:r.state.collections[1],renderIcon:function(){return Be.createElement("div",{className:"DocSearch-Hit-icon"},Be.createElement(wr,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return Be.createElement("div",{className:"DocSearch-Hit-action"},Be.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.remove(t),r.refresh()}))}},Be.createElement(br,null)))}})))}var oo=["translations"];function io(){return io=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ao=Be.memo((function(e){var t=e.translations,n=void 0===t?{}:t,r=co(e,oo);if("error"===r.state.status)return Be.createElement(Ir,{translations:null==n?void 0:n.errorScreen});var o=r.state.collections.some((function(e){return e.items.length>0}));return r.state.query?!1===o?Be.createElement(xr,io({},r,{translations:null==n?void 0:n.noResultsScreen})):Be.createElement(Xr,r):Be.createElement(ro,io({},r,{hasCollections:o,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),uo=["translations"];function lo(){return lo=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fo(e){var t=e.translations,n=void 0===t?{}:t,r=so(e,uo),o=n.resetButtonTitle,i=void 0===o?"Clear the query":o,c=n.resetButtonAriaLabel,a=void 0===c?"Clear the query":c,u=n.cancelButtonText,l=void 0===u?"Cancel":u,s=n.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,p=r.getFormProps({inputElement:r.inputRef.current}).onReset;return Be.useEffect((function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.autoFocus,r.inputRef]),Be.useEffect((function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()}),[r.isFromSelection,r.inputRef]),Be.createElement(Be.Fragment,null,Be.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:p},Be.createElement("label",lo({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),Be.createElement(We,null)),Be.createElement("div",{className:"DocSearch-LoadingIndicator"},Be.createElement(hr,null)),Be.createElement("input",lo({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),Be.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":a,hidden:!r.state.query},Be.createElement(br,null))),Be.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:r.onClose},l))}var po=["_highlightResult","_snippetResult"];function mo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vo(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function ho(e){var t=e.key,n=e.limit,r=void 0===n?5:n,o=vo(t),i=o.getItem().slice(0,r);return{add:function(e){var t=e,n=(t._highlightResult,t._snippetResult,mo(t,po)),c=i.findIndex((function(e){return e.objectID===n.objectID}));c>-1&&i.splice(c,1),i.unshift(n),i=i.slice(0,r),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}var yo=["facetName","facetQuery"];function bo(e){var t,n="algoliasearch-client-js-".concat(e.key),r=function(){return void 0===t&&(t=e.localStorage||window.localStorage),t},o=function(){return JSON.parse(r().getItem(n)||"{}")},i=function(e){r().setItem(n,JSON.stringify(e))},a=function(){var t=e.timeToLive?1e3*e.timeToLive:null,n=o(),r=Object.fromEntries(Object.entries(n).filter((function(e){return void 0!==c(e,2)[1].timestamp})));if(i(r),t){var a=Object.fromEntries(Object.entries(r).filter((function(e){var n=c(e,2)[1],r=(new Date).getTime();return!(n.timestamp+t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){a();var t=JSON.stringify(e);return o()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=c(e,2),r=t[0],o=t[1];return Promise.all([r,o||n.miss(r)])})).then((function(e){return c(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function go(e){var t=a(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return c(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return go({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return go({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return go({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return go({caches:t}).clear()}))}}}function _o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(n);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);var c=r(),a=o&&o.miss||function(){return Promise.resolve()};return c.then((function(e){return a(e)})).then((function(){return c}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Oo(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function So(e,t){return t?(Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e):e}function jo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var Io={Read:1,Write:2,Any:3},Do=1,ko=2,Ao=3,Co=12e4;function xo(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Do;return t(t({},e),{},{status:n,lastUpdate:Date.now()})}function No(e){return"string"==typeof e?{protocol:"https",url:e,accept:Io.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Io.Any}}var To="GET",Ro="POST";function qo(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(xo(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===Do||Date.now()-e.lastUpdate>Co}(e)})),r=e.filter((function(e){return function(e){return e.status===Ao&&Date.now()-e.lastUpdate<=Co}(e)})),o=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(0===r.length&&0===e?1:r.length+3+e)*t},statelessHosts:o.length>0?o.map((function(e){return No(e)})):t}}))}function Lo(e,n,r,o){var i=[],c=function(e,n){if(e.method===To||void 0===e.data&&void 0===n.data)return;var r=Array.isArray(e.data)?e.data:t(t({},e.data),n.data);return JSON.stringify(r)}(r,o),u=function(e,n){var r=t(t({},e.headers),n.headers),o={};return Object.keys(r).forEach((function(e){var t=r[e];o[e.toLowerCase()]=t})),o}(e,o),l=r.method,s=r.method!==To?{}:t(t({},r.data),o.data),f=t(t(t({"x-algolia-agent":e.userAgent.value},e.queryParameters),s),o.queryParameters),p=0,m=function t(n,a){var s=n.pop();if(void 0===s)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fo(i)};var m={data:c,headers:u,method:l,url:Ho(s,r.path,f),connectTimeout:a(p,e.timeouts.connect),responseTimeout:a(p,o.timeout)},v=function(e){var t={request:m,response:e,host:s,triesLeft:n.length};return i.push(t),t},d={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var o=v(r);return r.isTimedOut&&p++,Promise.all([e.logger.info("Retryable failure",Bo(o)),e.hostsCache.set(s,xo(s,r.isTimedOut?Ao:ko))]).then((function(){return t(n,a)}))},onFail:function(e){throw v(e),function(e,t){var n=e.content,r=e.status,o=n;try{o=JSON.parse(n).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(o,r,t)}(e,Fo(i))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&0==~~n}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,d)}))};return qo(e.hostsCache,n).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function Mo(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}function Ho(e,t,n){var r=Uo(n),o="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return r.length&&(o+="?".concat(r)),o}function Uo(e){return Object.keys(e).map((function(t){return jo("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function Fo(e){return e.map((function(e){return Bo(e)}))}function Bo(e){var n=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return t(t({},e),{},{request:t(t({},e.request),{},{headers:t(t({},e.request.headers),n)})})}var Vo=function(e){var n=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===Eo.WithinHeaders?r:{}},queryParameters:function(){return e===Eo.WithinQueryParameters?r:{}}}}(void 0!==e.authMode?e.authMode:Eo.WithinHeaders,n,e.apiKey),o=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,o=e.requestsCache,i=e.responsesCache,a=e.timeouts,u=e.userAgent,l=e.hosts,s=e.queryParameters,f={hostsCache:t,logger:n,requester:r,requestsCache:o,responsesCache:i,timeouts:a,userAgent:u,headers:e.headers,queryParameters:s,hosts:l.map((function(e){return No(e)})),read:function(e,t){var n=Po(t,f.timeouts.read),r=function(){return Lo(f,f.hosts.filter((function(e){return 0!=(e.accept&Io.Read)})),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();var o={request:e,mappedRequestOptions:n,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(function(){return f.requestsCache.get(o,(function(){return f.requestsCache.set(o,r()).then((function(e){return Promise.all([f.requestsCache.delete(o),e])}),(function(e){return Promise.all([f.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=c(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(o,e)}})},write:function(e,t){return Lo(f,f.hosts.filter((function(e){return 0!=(e.accept&Io.Write)})),e,Po(t,f.timeouts.write))}};return f}(t(t({hosts:[{url:"".concat(n,"-dsn.algolia.net"),accept:Io.Read},{url:"".concat(n,".algolia.net"),accept:Io.Write}].concat(Oo([{url:"".concat(n,"-1.algolianet.com")},{url:"".concat(n,"-2.algolianet.com")},{url:"".concat(n,"-3.algolianet.com")}]))},e),{},{headers:t(t(t({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:t(t({},r.queryParameters()),e.queryParameters)})),i={transporter:o,appId:n,addAlgoliaAgent:function(e,t){o.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))}};return So(i,e.methods)},Wo=function(e){return function(t,n){return t.method===To?e.transporter.read(t,n):e.transporter.write(t,n)}},Ko=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={transporter:e.transporter,appId:e.appId,indexName:t};return So(r,n.methods)}},zo=function(e){return function(n,r){var o=n.map((function(e){return t(t({},e),{},{params:Uo(e.params||{})})}));return e.transporter.read({method:Ro,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},r)}},Jo=function(e){return function(n,r){return Promise.all(n.map((function(n){var o=n.params,c=o.facetName,a=o.facetQuery,u=i(o,yo);return Ko(e)(n.indexName,{methods:{searchForFacetValues:Zo}}).searchForFacetValues(c,a,t(t({},r),u))})))}},$o=function(e){return function(t,n,r){return e.transporter.read({method:Ro,path:jo("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},Qo=function(e){return function(t,n){return e.transporter.read({method:Ro,path:jo("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},Zo=function(e){return function(t,n,r){return e.transporter.read({method:Ro,path:jo("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},Yo=1,Go=2,Xo=3;function ei(e,n,r){var o,i={appId:e,apiKey:n,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},i=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(i),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(i),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(i),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(o=Xo,{debug:function(e,t){return Yo>=o&&console.debug(e,t),Promise.resolve()},info:function(e,t){return Go>=o&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:_o(),requestsCache:_o({serializable:!1}),hostsCache:go({caches:[bo({key:"".concat(wo,"-").concat(e)}),_o()]}),userAgent:Mo(wo).add({segment:"Browser",version:"lite"}),authMode:Eo.WithinQueryParameters};return Vo(t(t(t({},i),r),{},{methods:{search:zo,searchForFacetValues:Jo,multipleQueries:zo,multipleSearchForFacetValues:Jo,customRequest:Wo,initIndex:function(e){return function(t){return Ko(e)(t,{methods:{search:Qo,searchForFacetValues:Zo,findAnswers:$o}})}}}}))}ei.version=wo;var ti="3.5.2";var ni=["footer","searchBox"];function ri(){return ri=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function si(e){var t=e.appId,n=e.apiKey,r=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,c=e.searchParameters,a=e.maxResultsPerGroup,u=e.onClose,l=void 0===u?$r:u,s=e.transformItems,f=void 0===s?zr:s,p=e.hitComponent,m=void 0===p?dr:p,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,h=e.navigator,y=e.initialScrollY,b=void 0===y?0:y,g=e.transformSearchClient,_=void 0===g?zr:g,O=e.disableUserPersonalization,S=void 0!==O&&O,j=e.initialQuery,w=void 0===j?"":j,E=e.translations,P=void 0===E?{}:E,I=e.getMissingResultsUrl,D=e.insights,k=void 0!==D&&D,A=P.footer,C=P.searchBox,x=li(P,ni),N=ai(Be.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],R=N[1],q=Be.useRef(null),L=Be.useRef(null),M=Be.useRef(null),H=Be.useRef(null),U=Be.useRef(null),F=Be.useRef(10),B=Be.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,V=Be.useRef(w||B).current,W=function(e,t,n){return Be.useMemo((function(){var r=ei(e,t);return r.addAlgoliaAgent("docsearch",ti),!1===/docsearch.js \(.*\)/.test(r.transporter.userAgent.value)&&r.addAlgoliaAgent("docsearch-react",ti),n(r)}),[e,t,n])}(t,n,_),K=Be.useRef(ho({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,z=Be.useRef(ho({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:0===K.getAll().length?7:4})).current,J=Be.useCallback((function(e){if(!S){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===K.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&z.add(t)}}),[K,z,S]),$=Be.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[T.context.algoliaInsightsPlugin]),Q=Be.useMemo((function(){return fr({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:h,onStateChange:function(e){R(e.state)},getSources:function(e){var o=e.query,i=e.state,u=e.setContext,s=e.setStatus;if(!o)return S?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),Jr(n)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),Jr(n)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return K.getAll()}}];var p=Boolean(k);return W.search([{query:o,indexName:r,params:ii({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(F.current),"hierarchy.lvl2:".concat(F.current),"hierarchy.lvl3:".concat(F.current),"hierarchy.lvl4:".concat(F.current),"hierarchy.lvl5:".concat(F.current),"hierarchy.lvl6:".concat(F.current),"content:".concat(F.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:p},c)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],c=o.hits,s=o.nbHits,m=Kr(c,(function(e){return Yr(e)}),a);i.context.searchSuggestions.length0&&(G(),U.current&&U.current.focus())}),[V,G]),Be.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Be.createElement("div",ri({ref:q},Y({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&l()}}),Be.createElement("div",{className:"DocSearch-Modal",ref:L},Be.createElement("header",{className:"DocSearch-SearchBar",ref:M},Be.createElement(fo,ri({},Q,{state:T,autoFocus:0===V.length,inputRef:U,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:l}))),Be.createElement("div",{className:"DocSearch-Dropdown",ref:H},Be.createElement(ao,ri({},Q,{indexName:r,state:T,hitComponent:m,resultsFooterComponent:d,disableUserPersonalization:S,recentSearches:z,favoriteSearches:K,inputRef:U,translations:x,getMissingResultsUrl:I,onItemClick:function(e,t){$(e),J(e),Jr(t)||l()}}))),Be.createElement("footer",{className:"DocSearch-Footer"},Be.createElement(vr,{translations:A}))))}function fi(){return fi=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(e.container,e.environment))}})); +//# sourceMappingURL=index.js.map diff --git a/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js.map b/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js.map new file mode 100644 index 00000000..3aac2014 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/js/dist/umd/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../node_modules/preact/dist/preact.module.js","../../../../node_modules/preact/hooks/dist/hooks.module.js","../../../../node_modules/preact/compat/dist/compat.module.js","../../../docsearch-react/dist/esm/icons/ControlKeyIcon.js","../../../docsearch-react/dist/esm/icons/SearchIcon.js","../../../docsearch-react/dist/esm/DocSearchButton.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/noop.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/version.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createStore.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/reshape.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/resolve.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onInput.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/metadata.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js","../../../docsearch-react/dist/esm/AlgoliaLogo.js","../../../docsearch-react/dist/esm/Footer.js","../../../docsearch-react/dist/esm/Hit.js","../../../docsearch-react/dist/esm/icons/LoadingIcon.js","../../../docsearch-react/dist/esm/icons/RecentIcon.js","../../../docsearch-react/dist/esm/icons/ResetIcon.js","../../../docsearch-react/dist/esm/icons/SelectIcon.js","../../../docsearch-react/dist/esm/icons/SourceIcon.js","../../../docsearch-react/dist/esm/icons/StarIcon.js","../../../docsearch-react/dist/esm/icons/ErrorIcon.js","../../../docsearch-react/dist/esm/icons/NoResultsIcon.js","../../../docsearch-react/dist/esm/ErrorScreen.js","../../../docsearch-react/dist/esm/NoResultsScreen.js","../../../docsearch-react/dist/esm/Snippet.js","../../../docsearch-react/dist/esm/Results.js","../../../docsearch-react/dist/esm/utils/groupBy.js","../../../docsearch-react/dist/esm/utils/identity.js","../../../docsearch-react/dist/esm/utils/isModifierEvent.js","../../../docsearch-react/dist/esm/utils/noop.js","../../../docsearch-react/dist/esm/utils/removeHighlightTags.js","../../../docsearch-react/dist/esm/ResultsScreen.js","../../../docsearch-react/dist/esm/StartScreen.js","../../../docsearch-react/dist/esm/ScreenState.js","../../../docsearch-react/dist/esm/SearchBox.js","../../../docsearch-react/dist/esm/constants.js","../../../docsearch-react/dist/esm/stored-searches.js","../../../docsearch-react/node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js","../../../docsearch-react/dist/esm/version.js","../../../docsearch-react/dist/esm/DocSearchModal.js","../../../docsearch-react/dist/esm/useSearchClient.js","../../../docsearch-react/dist/esm/useTouchEvents.js","../../../docsearch-react/dist/esm/useTrapFocus.js","../../../docsearch-react/dist/esm/DocSearch.js","../../../docsearch-react/dist/esm/useDocSearchKeyboardEvents.js","../../src/docsearch.tsx"],"sourcesContent":["var n,l,u,i,t,r,o={},f=[],e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(n,l){for(var u in l)n[u]=l[u];return n}function s(n){var l=n.parentNode;l&&l.removeChild(n)}function a(n,l,u){var i,t,r,o=arguments,f={};for(r in l)\"key\"==r?i=l[r]:\"ref\"==r?t=l[r]:f[r]=l[r];if(arguments.length>3)for(u=[u],r=3;r0?v(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p3)for(u=[u],r=3;r=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function h(r,o){var i=m(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function s(n){return o=5,d(function(){return{current:n}},[])}function _(n,t,u){o=6,h(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,d(function(){return n},t)}function F(n){var r=u.context[n.__c],o=m(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function q(n){var r=m(t++,10),o=l();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function x(){i.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[]}catch(u){t.__H.__h=[],n.__e(u,t.__v)}}),i=[]}n.__b=function(n){u=null,c&&c(n)},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[])},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u))})(x)),u=void 0},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return!n.__||j(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),a&&a(t,u)},n.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g)}catch(t){n.__e(t,u.__v)}};var b=\"function\"==typeof requestAnimationFrame;function g(n){var t=u;\"function\"==typeof n.__c&&n.__c(),u=t}function j(n){var t=u;n.__c=n.__(),u=t}function k(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return\"function\"==typeof t?t(n):t}export{l as useState,p as useReducer,y as useEffect,h as useLayoutEffect,s as useRef,_ as useImperativeHandle,d as useMemo,A as useCallback,F as useContext,T as useDebugValue,q as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as l,useContext as f,useDebugValue as c}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as p,Fragment as v,render as d,hydrate as m,cloneElement as y,createRef as b,createContext as _}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function C(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function E(n){this.props=n}function g(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(E.prototype=new a).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var w=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),w&&w(n)};var R=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function x(n){function t(t,e){var r=C({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=R,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var N=function(n,t){return null==n?null:p(p(n).map(t))},k={map:N,forEach:N,count:function(n){return n?p(n).length:0},only:function(n){var t=p(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:p},A=h.__e;function O(){this.__u=0,this.t=null,this.__b=null}function L(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function U(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);A(n,t,e)},(O.prototype=new a).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=L(r.__v),o=!1,i=function(){o||(o=!0,e.componentWillUnmount=e.__c,u?u(l):l())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},f=!0===t.__h;r.__u++||f||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},O.prototype.componentWillUnmount=function(){this.t=[]},O.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement(\"div\"),r=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=C({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)})),t}(this.__b,e,r.__O=r.__P)}this.__b=null}var u=t.__e&&s(v,null,n.fallback);return u&&(u.__h=null),[s(v,null,t.__e?null:n.children),u]};var F=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]>>1,1),t.i.removeChild(n)}}),d(s(M,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount()}function j(n,t){return s(T,{__v:n,i:t})}(D.prototype=new a).__e=function(n){var t=this,e=L(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),F(t,n,r)):u()};e?e(o):o()}},D.prototype.render=function(n){this.u=null,this.o=new Map;var t=p(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},D.prototype.componentDidUpdate=D.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){F(n,e,t)})};var I=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,W=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,P=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function V(n,t,e){return null==t.__k&&(t.textContent=\"\"),d(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function z(n,t,e){return m(n,t),\"function\"==typeof e&&e(),n?n.__c:null}a.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(n){Object.defineProperty(a.prototype,n,{configurable:!0,get:function(){return this[\"UNSAFE_\"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var B=h.event;function H(){}function Z(){return this.cancelBubble}function Y(){return this.defaultPrevented}h.event=function(n){return B&&(n=B(n)),n.persist=H,n.isPropagationStopped=Z,n.isDefaultPrevented=Y,n.nativeEvent=n};var $,q={configurable:!0,get:function(){return this.class}},G=h.vnode;h.vnode=function(n){var t=n.type,e=n.props,r=e;if(\"string\"==typeof t){for(var u in r={},e){var o=e[u];\"value\"===u&&\"defaultValue\"in e&&null==o||(\"defaultValue\"===u&&\"value\"in e&&null==e.value?u=\"value\":\"download\"===u&&!0===o?o=\"\":/ondoubleclick/i.test(u)?u=\"ondblclick\":/^onchange(textarea|input)/i.test(u+t)&&!P(e.type)?u=\"oninput\":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():W.test(u)?u=u.replace(/[A-Z0-9]/,\"-$&\").toLowerCase():null===o&&(o=void 0),r[u]=o)}\"select\"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=p(e.children).forEach(function(n){n.props.selected=-1!=r.value.indexOf(n.props.value)})),\"select\"==t&&null!=r.defaultValue&&(r.value=p(e.children).forEach(function(n){n.props.selected=r.multiple?-1!=r.defaultValue.indexOf(n.props.value):r.defaultValue==n.props.value})),n.props=r}t&&e.class!=e.className&&(q.enumerable=\"className\"in e,null!=e.className&&(r.class=e.className),Object.defineProperty(r,\"className\",q)),n.$$typeof=I,G&&G(n)};var J=h.__r;h.__r=function(n){J&&J(n),$=n.__c};var K={ReactCurrentDispatcher:{current:{readContext:function(n){return $.__n[n.__c].props.value}}}},Q=1,X=2,nn=3,tn=4,en=5;function rn(n,t){return t()}var un=\"object\"==typeof performance&&\"function\"==typeof performance.now?performance.now.bind(performance):function(){return Date.now()},on=\"16.8.0\";function ln(n){return s.bind(null,n)}function fn(n){return!!n&&n.$$typeof===I}function cn(n){return fn(n)?y.apply(null,arguments):n}function an(n){return!!n.__k&&(d(null,n),!0)}function sn(n){return n&&(n.base||1===n.nodeType&&n)||null}var hn=function(n,t){return n(t)},pn=v;export default{useState:n,useReducer:t,useEffect:e,useLayoutEffect:r,useRef:u,useImperativeHandle:o,useMemo:i,useCallback:l,useContext:f,useDebugValue:c,version:\"16.8.0\",Children:k,render:V,hydrate:z,unmountComponentAtNode:an,createPortal:j,createElement:s,createContext:_,createFactory:ln,cloneElement:cn,createRef:b,Fragment:v,isValidElement:fn,findDOMNode:sn,Component:a,PureComponent:E,memo:g,forwardRef:x,unstable_batchedUpdates:hn,StrictMode:v,Suspense:O,SuspenseList:D,lazy:U,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:K};export{on as version,k as Children,V as render,z as hydrate,an as unmountComponentAtNode,j as createPortal,ln as createFactory,cn as cloneElement,fn as isValidElement,sn as findDOMNode,E as PureComponent,g as memo,x as forwardRef,hn as unstable_batchedUpdates,pn as StrictMode,O as Suspense,D as SuspenseList,U as lazy,K as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q as unstable_ImmediatePriority,X as unstable_UserBlockingPriority,nn as unstable_NormalPriority,tn as unstable_LowPriority,en as unstable_IdlePriority,rn as unstable_runWithPriority,un as unstable_now};\n//# sourceMappingURL=compat.module.js.map\n","import React from 'react';\nexport function ControlKeyIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n className: \"DocSearch-Control-Key-Icon\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953\",\n strokeWidth: \"1.2\",\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"square\"\n }));\n}","import React from 'react';\nexport function SearchIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n className: \"DocSearch-Search-Icon\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useEffect, useState } from 'react';\nimport { ControlKeyIcon } from './icons/ControlKeyIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nvar ACTION_KEY_DEFAULT = 'Ctrl';\nvar ACTION_KEY_APPLE = '⌘';\n\nfunction isAppleDevice() {\n return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n}\n\nexport var DocSearchButton = React.forwardRef(function (_ref, ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$buttonT = translations.buttonText,\n buttonText = _translations$buttonT === void 0 ? 'Search' : _translations$buttonT,\n _translations$buttonA = translations.buttonAriaLabel,\n buttonAriaLabel = _translations$buttonA === void 0 ? 'Search' : _translations$buttonA;\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n key = _useState2[0],\n setKey = _useState2[1];\n\n useEffect(function () {\n if (typeof navigator !== 'undefined') {\n isAppleDevice() ? setKey(ACTION_KEY_APPLE) : setKey(ACTION_KEY_DEFAULT);\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n type: \"button\",\n className: \"DocSearch DocSearch-Button\",\n \"aria-label\": buttonAriaLabel\n }, props, {\n ref: ref\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Container\"\n }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Placeholder\"\n }, buttonText)), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Button-Keys\"\n }, key !== null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Button-Key\"\n }, key === ACTION_KEY_DEFAULT ? /*#__PURE__*/React.createElement(ControlKeyIcon, null) : key), /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Button-Key\"\n }, \"K\"))));\n});","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export var version = '1.9.3';","export function createClickedEvent(_ref) {\n var item = _ref.item,\n items = _ref.items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","function createInternalCancelablePromise(promise, initialState) {\n var state = initialState;\n return {\n then: function then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state);\n },\n catch: function _catch(onrejected) {\n return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state);\n },\n finally: function _finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () {\n state.onCancelList = [];\n return onfinally();\n }, state, promise)), state);\n },\n cancel: function cancel() {\n state.isCanceled = true;\n var callbacks = state.onCancelList;\n state.onCancelList = [];\n callbacks.forEach(function (callback) {\n callback();\n });\n },\n isCanceled: function isCanceled() {\n return state.isCanceled === true;\n }\n };\n}\nexport function createCancelablePromise(executor) {\n return createInternalCancelablePromise(new Promise(function (resolve, reject) {\n return executor(resolve, reject);\n }), {\n isCanceled: false,\n onCancelList: []\n });\n}\ncreateCancelablePromise.resolve = function (value) {\n return cancelable(Promise.resolve(value));\n};\ncreateCancelablePromise.reject = function (reason) {\n return cancelable(Promise.reject(reason));\n};\nexport function cancelable(promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: []\n });\n}\nfunction createCallback(onResult, state, fallback) {\n if (!onResult) {\n return fallback;\n }\n return function callback(arg) {\n if (state.isCanceled) {\n return arg;\n }\n return onResult(arg);\n };\n}","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {\n if (!itemCount) {\n return null;\n }\n if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {\n return itemCount + moveAmount;\n }\n var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n return numericIndex;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { invariant, decycle, noop } from '@algolia/autocomplete-shared';\nexport function getNormalizedSources(getSources, params) {\n var seenSourceIds = [];\n return Promise.resolve(getSources(params)).then(function (sources) {\n invariant(Array.isArray(sources), function () {\n return \"The `getSources` function must return an array of sources but returned type \".concat(JSON.stringify(_typeof(sources)), \":\\n\\n\").concat(JSON.stringify(decycle(sources), null, 2));\n });\n return Promise.all(sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter(function (maybeSource) {\n return Boolean(maybeSource);\n }).map(function (source) {\n invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\"[Autocomplete] The `sourceId` \".concat(JSON.stringify(source.sourceId), \" is not unique.\"));\n }\n seenSourceIds.push(source.sourceId);\n var defaultSource = {\n getItemInputValue: function getItemInputValue(_ref) {\n var state = _ref.state;\n return state.query;\n },\n getItemUrl: function getItemUrl() {\n return undefined;\n },\n onSelect: function onSelect(_ref2) {\n var setIsOpen = _ref2.setIsOpen;\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop\n };\n Object.keys(defaultSource).forEach(function (key) {\n defaultSource[key].__default = true;\n });\n var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source);\n return Promise.resolve(normalizedSource);\n }));\n });\n}","// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(state) {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n var accumulatedCollectionsCount = state.collections.map(function (collections) {\n return collections.items.length;\n }).reduce(function (acc, collectionsCount, index) {\n var previousValue = acc[index - 1] || 0;\n var nextValue = previousValue + collectionsCount;\n acc.push(nextValue);\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {\n if (current <= state.activeItemId) {\n return acc + 1;\n }\n return acc;\n }, 0);\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId(_ref) {\n var state = _ref.state,\n collection = _ref.collection;\n var isOffsetFound = false;\n var counter = 0;\n var previousItemsOffset = 0;\n while (isOffsetFound === false) {\n var currentCollection = state.collections[counter];\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n previousItemsOffset += currentCollection.items.length;\n counter++;\n }\n return state.activeItemId - previousItemsOffset;\n}\nexport function getActiveItem(state) {\n var collection = getCollectionFromActiveItemId(state);\n if (!collection) {\n return null;\n }\n var item = collection.items[getRelativeActiveItemId({\n state: state,\n collection: collection\n })];\n var source = collection.source;\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: state\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: state\n });\n return {\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n source: source\n };\n}","var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\nexport function isSamsung(userAgent) {\n return Boolean(userAgent && userAgent.match(regex));\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createCancelablePromiseList } from './utils';\nexport function createStore(reducer, props, onStoreStateChange) {\n var state = props.initialState;\n return {\n getState: function getState() {\n return state;\n },\n dispatch: function dispatch(action, payload) {\n var prevState = _objectSpread({}, state);\n state = reducer(state, {\n type: action,\n props: props,\n payload: payload\n });\n onStoreStateChange({\n state: state,\n prevState: prevState\n });\n },\n pendingRequests: createCancelablePromiseList()\n };\n}","export function createCancelablePromiseList() {\n var list = [];\n return {\n add: function add(cancelablePromise) {\n list.push(cancelablePromise);\n return cancelablePromise.finally(function () {\n list = list.filter(function (item) {\n return item !== cancelablePromise;\n });\n });\n },\n cancelAll: function cancelAll() {\n list.forEach(function (promise) {\n return promise.cancel();\n });\n },\n isEmpty: function isEmpty() {\n return list.length === 0;\n }\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function getAutocompleteSetters(_ref) {\n var store = _ref.store;\n var setActiveItemId = function setActiveItemId(value) {\n store.dispatch('setActiveItemId', value);\n };\n var setQuery = function setQuery(value) {\n store.dispatch('setQuery', value);\n };\n var setCollections = function setCollections(rawValue) {\n var baseItemId = 0;\n var value = rawValue.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items).map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n __autocomplete_id: baseItemId++\n });\n })\n });\n });\n store.dispatch('setCollections', value);\n };\n var setIsOpen = function setIsOpen(value) {\n store.dispatch('setIsOpen', value);\n };\n var setStatus = function setStatus(value) {\n store.dispatch('setStatus', value);\n };\n var setContext = function setContext(value) {\n store.dispatch('setContext', value);\n };\n return {\n setActiveItemId: setActiveItemId,\n setQuery: setQuery,\n setCollections: setCollections,\n setIsOpen: setIsOpen,\n setStatus: setStatus,\n setContext: setContext\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared';\nimport { getNormalizedSources } from './utils';\nexport function getDefaultProps(props, pluginSubscribers) {\n var _props$id;\n /* eslint-disable no-restricted-globals */\n var environment = typeof window !== 'undefined' ? window : {};\n /* eslint-enable no-restricted-globals */\n var plugins = props.plugins || [];\n return _objectSpread(_objectSpread({\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment: environment,\n shouldPanelOpen: function shouldPanelOpen(_ref) {\n var state = _ref.state;\n return getItemsCount(state) > 0;\n },\n reshape: function reshape(_ref2) {\n var sources = _ref2.sources;\n return sources;\n }\n }, props), {}, {\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(),\n plugins: plugins,\n // The following props need to be deeply defaulted.\n initialState: _objectSpread({\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {}\n }, props.initialState),\n onStateChange: function onStateChange(params) {\n var _props$onStateChange;\n (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);\n plugins.forEach(function (x) {\n var _x$onStateChange;\n return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);\n });\n },\n onSubmit: function onSubmit(params) {\n var _props$onSubmit;\n (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);\n plugins.forEach(function (x) {\n var _x$onSubmit;\n return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);\n });\n },\n onReset: function onReset(params) {\n var _props$onReset;\n (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);\n plugins.forEach(function (x) {\n var _x$onReset;\n return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);\n });\n },\n getSources: function getSources(params) {\n return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {\n return plugin.getSources;\n })), [props.getSources]).filter(Boolean).map(function (getSources) {\n return getNormalizedSources(getSources, params);\n })).then(function (nested) {\n return flatten(nested);\n }).then(function (sources) {\n return sources.map(function (source) {\n return _objectSpread(_objectSpread({}, source), {}, {\n onSelect: function onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onSelect;\n return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);\n });\n },\n onActive: function onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onActive;\n return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);\n });\n },\n onResolve: function onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onResolve;\n return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params);\n });\n }\n });\n });\n });\n },\n navigator: _objectSpread({\n navigate: function navigate(_ref3) {\n var itemUrl = _ref3.itemUrl;\n environment.location.assign(itemUrl);\n },\n navigateNewTab: function navigateNewTab(_ref4) {\n var itemUrl = _ref4.itemUrl;\n var windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();\n },\n navigateNewWindow: function navigateNewWindow(_ref5) {\n var itemUrl = _ref5.itemUrl;\n environment.open(itemUrl, '_blank', 'noopener');\n }\n }, props.navigator)\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function reshape(_ref) {\n var collections = _ref.collections,\n props = _ref.props,\n state = _ref.state;\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n var originalSourcesBySourceId = collections.reduce(function (acc, collection) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, {\n getItems: function getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n }\n })));\n }, {});\n var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n }, {\n sourcesBySourceId: originalSourcesBySourceId,\n state: state\n }),\n sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId;\n var reshapeSources = props.reshape({\n sourcesBySourceId: sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state: state\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources).filter(Boolean).map(function (source) {\n return {\n source: source,\n items: source.getItems()\n };\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport { mapToAlgoliaResponse } from './utils';\nfunction isDescription(item) {\n return Boolean(item.execute);\n}\nfunction isRequesterDescription(description) {\n return Boolean(description === null || description === void 0 ? void 0 : description.execute);\n}\nexport function preResolve(itemsOrDescription, sourceId, state) {\n if (isRequesterDescription(itemsOrDescription)) {\n var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) {\n var _state$context$key;\n return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters;\n })))) : {};\n return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {\n requests: itemsOrDescription.queries.map(function (query) {\n return {\n query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, {\n params: _objectSpread(_objectSpread({}, contextParameters), query.params)\n }) : query,\n sourceId: sourceId,\n transformResponse: itemsOrDescription.transformResponse\n };\n })\n });\n }\n return {\n items: itemsOrDescription,\n sourceId: sourceId\n };\n}\nexport function resolve(items) {\n var packed = items.reduce(function (acc, current) {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n var searchClient = current.searchClient,\n execute = current.execute,\n requesterId = current.requesterId,\n requests = current.requests;\n var container = acc.find(function (item) {\n return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId;\n });\n if (container) {\n var _container$items;\n (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));\n } else {\n var request = {\n execute: execute,\n requesterId: requesterId,\n items: requests,\n searchClient: searchClient\n };\n acc.push(request);\n }\n return acc;\n }, []);\n var values = packed.map(function (maybeDescription) {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(maybeDescription);\n }\n var _ref = maybeDescription,\n execute = _ref.execute,\n items = _ref.items,\n searchClient = _ref.searchClient;\n return execute({\n searchClient: searchClient,\n requests: items\n });\n });\n return Promise.all(values).then(function (responses) {\n return flatten(responses);\n });\n}\nexport function postResolve(responses, sources, store) {\n return sources.map(function (source) {\n var matches = responses.filter(function (response) {\n return response.sourceId === source.sourceId;\n });\n var results = matches.map(function (_ref2) {\n var items = _ref2.items;\n return items;\n });\n var transform = matches[0].transformResponse;\n var items = transform ? transform(mapToAlgoliaResponse(results)) : results;\n source.onResolve({\n source: source,\n results: results,\n items: items,\n state: store.getState()\n });\n invariant(Array.isArray(items), function () {\n return \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned type \").concat(JSON.stringify(_typeof(items)), \":\\n\\n\").concat(JSON.stringify(decycle(items), null, 2), \".\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\");\n });\n invariant(items.every(Boolean), \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned \").concat(JSON.stringify(undefined), \".\\n\\nDid you forget to return items?\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\"));\n return {\n source: source,\n items: items\n };\n });\n}","export function mapToAlgoliaResponse(rawResults) {\n return {\n results: rawResults,\n hits: rawResults.map(function (result) {\n return result.hits;\n }).filter(Boolean),\n facetHits: rawResults.map(function (result) {\n var _facetHits;\n return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted\n }\n }\n };\n });\n }).filter(Boolean)\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"nextState\", \"props\", \"query\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport { cancelable, createConcurrentSafePromise, getActiveItem } from './utils';\nvar lastStalledId = null;\nvar runConcurrentSafePromise = createConcurrentSafePromise();\nexport function onInput(_ref) {\n var event = _ref.event,\n _ref$nextState = _ref.nextState,\n nextState = _ref$nextState === void 0 ? {} : _ref$nextState,\n props = _ref.props,\n query = _ref.query,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n var setCollections = setters.setCollections,\n setIsOpen = setters.setIsOpen,\n setQuery = setters.setQuery,\n setActiveItemId = setters.setActiveItemId,\n setStatus = setters.setStatus;\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n if (!query && props.openOnFocus === false) {\n var _nextState$isOpen;\n var collections = store.getState().collections.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n items: []\n });\n });\n setStatus('idle');\n setCollections(collections);\n setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({\n state: store.getState()\n }));\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n var _request = cancelable(runConcurrentSafePromise(collections).then(function () {\n return Promise.resolve();\n }));\n return store.pendingRequests.add(_request);\n }\n setStatus('loading');\n lastStalledId = props.environment.setTimeout(function () {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters)).then(function (sources) {\n return Promise.all(sources.map(function (source) {\n return Promise.resolve(source.getItems(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters))).then(function (itemsOrDescription) {\n return preResolve(itemsOrDescription, source.sourceId, store.getState());\n });\n })).then(resolve).then(function (responses) {\n return postResolve(responses, sources, store);\n }).then(function (collections) {\n return reshape({\n collections: collections,\n props: props,\n state: store.getState()\n });\n });\n }))).then(function (collections) {\n var _nextState$isOpen2;\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n setCollections(collections);\n var isPanelOpen = props.shouldPanelOpen({\n state: store.getState()\n });\n setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }).finally(function () {\n setStatus('idle');\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n return store.pendingRequests.add(request);\n}","/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n var basePromiseId = -1;\n var latestResolvedId = -1;\n var latestResolvedValue = undefined;\n return function runConcurrentSafePromise(promise) {\n basePromiseId++;\n var currentPromiseId = basePromiseId;\n return Promise.resolve(promise).then(function (x) {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var nodeItem = props.environment.document.getElementById(\"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"sourceIndex\"],\n _excluded6 = [\"sourceIndex\"],\n _excluded7 = [\"item\", \"source\", \"sourceIndex\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\")\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref2 = providedProps || {},\n inputElement = _ref2.inputElement,\n _ref2$maxLength = _ref2.maxLength,\n maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,\n rest = _objectWithoutProperties(_ref2, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? \"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId) : undefined,\n 'aria-controls': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\"),\n value: store.getState().completion || store.getState().query,\n id: \"\".concat(props.id, \"-input\"),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {\n return typeof sourceId !== 'undefined' ? \"\".concat(instanceId, \"-\").concat(sourceId) : instanceId;\n };\n var getLabelProps = function getLabelProps(providedProps) {\n var _ref3 = providedProps || {},\n sourceIndex = _ref3.sourceIndex,\n rest = _objectWithoutProperties(_ref3, _excluded5);\n return _objectSpread({\n htmlFor: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-input\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\")\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref4 = providedProps || {},\n sourceIndex = _ref4.sourceIndex,\n rest = _objectWithoutProperties(_ref4, _excluded6);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-list\")\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n sourceIndex = providedProps.sourceIndex,\n rest = _objectWithoutProperties(providedProps, _excluded7);\n return _objectSpread({\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-item-\").concat(item.__autocomplete_id),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n if (options.insights && !props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n })) {\n var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n props.plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","import React from 'react';\nexport function AlgoliaLogo(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: \"https://www.algolia.com/ref/docsearch/?utm_source=\".concat(window.location.hostname, \"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch\"),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, searchByText), /*#__PURE__*/React.createElement(\"svg\", {\n width: \"77\",\n height: \"19\",\n \"aria-label\": \"Algolia\",\n role: \"img\",\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 2196.2 500\"\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"style\", null, \".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}\")), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"rect\", {\n className: \"cls-1\",\n x: \"1845.88\",\n y: \"104.73\",\n width: \"62.58\",\n height: \"277.9\",\n rx: \"5.9\",\n ry: \"5.9\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-2\",\n d: \"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n className: \"cls-1\",\n d: \"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z\"\n })));\n}","import React from 'react';\nimport { AlgoliaLogo } from './AlgoliaLogo';\n\nfunction CommandIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"15\",\n height: \"15\",\n \"aria-label\": props.ariaLabel,\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: \"1.2\"\n }, props.children));\n}\n\nexport function Footer(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$selectT = translations.selectText,\n selectText = _translations$selectT === void 0 ? 'to select' : _translations$selectT,\n _translations$selectK = translations.selectKeyAriaLabel,\n selectKeyAriaLabel = _translations$selectK === void 0 ? 'Enter key' : _translations$selectK,\n _translations$navigat = translations.navigateText,\n navigateText = _translations$navigat === void 0 ? 'to navigate' : _translations$navigat,\n _translations$navigat2 = translations.navigateUpKeyAriaLabel,\n navigateUpKeyAriaLabel = _translations$navigat2 === void 0 ? 'Arrow up' : _translations$navigat2,\n _translations$navigat3 = translations.navigateDownKeyAriaLabel,\n navigateDownKeyAriaLabel = _translations$navigat3 === void 0 ? 'Arrow down' : _translations$navigat3,\n _translations$closeTe = translations.closeText,\n closeText = _translations$closeTe === void 0 ? 'to close' : _translations$closeTe,\n _translations$closeKe = translations.closeKeyAriaLabel,\n closeKeyAriaLabel = _translations$closeKe === void 0 ? 'Escape key' : _translations$closeKe,\n _translations$searchB = translations.searchByText,\n searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Logo\"\n }, /*#__PURE__*/React.createElement(AlgoliaLogo, {\n translations: {\n searchByText: searchByText\n }\n })), /*#__PURE__*/React.createElement(\"ul\", {\n className: \"DocSearch-Commands\"\n }, /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: selectKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, selectText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateDownKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 3.5v8M10.5 8.5l-3 3-3-3\"\n }))), /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: navigateUpKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5 11.5v-8M10.5 6.5l-3-3-3 3\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, navigateText)), /*#__PURE__*/React.createElement(\"li\", null, /*#__PURE__*/React.createElement(\"kbd\", {\n className: \"DocSearch-Commands-Key\"\n }, /*#__PURE__*/React.createElement(CommandIcon, {\n ariaLabel: closeKeyAriaLabel\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956\"\n }))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"DocSearch-Label\"\n }, closeText))));\n}","import React from 'react';\nexport function Hit(_ref) {\n var hit = _ref.hit,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(\"a\", {\n href: hit.url\n }, children);\n}","import React from 'react';\nexport function LoadingIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n viewBox: \"0 0 38 38\",\n stroke: \"currentColor\",\n strokeOpacity: \".5\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n strokeOpacity: \".3\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}","import React from 'react';\nexport function RecentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13\"\n })));\n}","import React from 'react';\nexport function ResetIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function SelectIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Select-Icon\",\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 3v4c0 2-2 4-4 4H2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 17l-6-6 6-6\"\n })));\n}","import React from 'react';\n\nvar LvlIcon = function LvlIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n};\n\nexport function SourceIcon(props) {\n switch (props.type) {\n case 'lvl1':\n return /*#__PURE__*/React.createElement(LvlIcon, null);\n\n case 'content':\n return /*#__PURE__*/React.createElement(ContentIcon, null);\n\n default:\n return /*#__PURE__*/React.createElement(AnchorIcon, null);\n }\n}\n\nfunction AnchorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n}\n\nfunction ContentIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 5H3h14zm0 5H3h14zm0 5H3h14z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function StarIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"20\",\n height: \"20\",\n viewBox: \"0 0 20 20\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z\",\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinejoin: \"round\"\n }));\n}","import React from 'react';\nexport function ErrorIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0\"\n }));\n}","import React from 'react';\nexport function NoResultsIcon() {\n return /*#__PURE__*/React.createElement(\"svg\", {\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n fillRule: \"evenodd\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2\"\n }));\n}","import React from 'react';\nimport { ErrorIcon } from './icons';\nexport function ErrorScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations;\n var _translations$titleTe = translations.titleText,\n titleText = _translations$titleTe === void 0 ? 'Unable to fetch results' : _translations$titleTe,\n _translations$helpTex = translations.helpText,\n helpText = _translations$helpTex === void 0 ? 'You might want to check your network connection.' : _translations$helpTex;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-ErrorScreen\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, titleText), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, helpText));\n}","var _excluded = [\"translations\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { NoResultsIcon } from './icons';\nexport function NoResultsScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$noResul = translations.noResultsText,\n noResultsText = _translations$noResul === void 0 ? 'No results for' : _translations$noResul,\n _translations$suggest = translations.suggestedQueryText,\n suggestedQueryText = _translations$suggest === void 0 ? 'Try searching for' : _translations$suggest,\n _translations$reportM = translations.reportMissingResultsText,\n reportMissingResultsText = _translations$reportM === void 0 ? 'Believe this query should return results?' : _translations$reportM,\n _translations$reportM2 = translations.reportMissingResultsLinkText,\n reportMissingResultsLinkText = _translations$reportM2 === void 0 ? 'Let us know.' : _translations$reportM2;\n var searchSuggestions = props.state.context.searchSuggestions;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Screen-Icon\"\n }, /*#__PURE__*/React.createElement(NoResultsIcon, null)), /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Title\"\n }, noResultsText, \" \\\"\", /*#__PURE__*/React.createElement(\"strong\", null, props.state.query), \"\\\"\"), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-NoResults-Prefill-List\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, suggestedQueryText, \":\"), /*#__PURE__*/React.createElement(\"ul\", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) {\n return [].concat(_toConsumableArray(acc), [/*#__PURE__*/React.createElement(\"li\", {\n key: search\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Prefill\",\n key: search,\n type: \"button\",\n onClick: function onClick() {\n props.setQuery(search.toLowerCase() + ' ');\n props.refresh();\n props.inputRef.current.focus();\n }\n }, search))]);\n }, []))), props.getMissingResultsUrl && /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, \"\".concat(reportMissingResultsText, \" \"), /*#__PURE__*/React.createElement(\"a\", {\n href: props.getMissingResultsUrl({\n query: props.state.query\n }),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, reportMissingResultsLinkText)));\n}","var _excluded = [\"hit\", \"attribute\", \"tagName\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createElement } from 'react';\n\nfunction getPropertyByPath(object, path) {\n var parts = path.split('.');\n return parts.reduce(function (prev, current) {\n if (prev !== null && prev !== void 0 && prev[current]) return prev[current];\n return null;\n }, object);\n}\n\nexport function Snippet(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute,\n _ref$tagName = _ref.tagName,\n tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n return createElement(tagName, _objectSpread(_objectSpread({}, rest), {}, {\n dangerouslySetInnerHTML: {\n __html: getPropertyByPath(hit, \"_snippetResult.\".concat(attribute, \".value\")) || getPropertyByPath(hit, attribute)\n }\n }));\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { Snippet } from './Snippet';\nexport function Results(props) {\n if (!props.collection || props.collection.items.length === 0) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-Hits\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-source\"\n }, props.title), /*#__PURE__*/React.createElement(\"ul\", props.getListProps(), props.collection.items.map(function (item, index) {\n return /*#__PURE__*/React.createElement(Result, _extends({\n key: [props.title, item.objectID].join(':'),\n item: item,\n index: index\n }, props));\n })));\n}\n\nfunction Result(_ref) {\n var item = _ref.item,\n index = _ref.index,\n renderIcon = _ref.renderIcon,\n renderAction = _ref.renderAction,\n getItemProps = _ref.getItemProps,\n onItemClick = _ref.onItemClick,\n collection = _ref.collection,\n hitComponent = _ref.hitComponent;\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isDeleting = _React$useState2[0],\n setIsDeleting = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n isFavoriting = _React$useState4[0],\n setIsFavoriting = _React$useState4[1];\n\n var action = React.useRef(null);\n var Hit = hitComponent;\n\n function runDeleteTransition(cb) {\n setIsDeleting(true);\n action.current = cb;\n }\n\n function runFavoriteTransition(cb) {\n setIsFavoriting(true);\n action.current = cb;\n }\n\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '),\n onTransitionEnd: function onTransitionEnd() {\n if (action.current) {\n action.current();\n }\n }\n }, getItemProps({\n item: item,\n source: collection.source,\n onClick: function onClick(event) {\n onItemClick(item, event);\n }\n })), /*#__PURE__*/React.createElement(Hit, {\n hit: item\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-Container\"\n }, renderIcon({\n item: item,\n index: index\n }), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n }), item.content && /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"content\"\n })), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"hierarchy.\".concat(item.type)\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), item.type === 'content' && /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-content-wrapper\"\n }, /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-title\",\n hit: item,\n attribute: \"content\"\n }), /*#__PURE__*/React.createElement(Snippet, {\n className: \"DocSearch-Hit-path\",\n hit: item,\n attribute: \"hierarchy.lvl1\"\n })), renderAction({\n item: item,\n runDeleteTransition: runDeleteTransition,\n runFavoriteTransition: runFavoriteTransition\n }))));\n}","export function groupBy(values, predicate, maxResultsPerGroup) {\n return values.reduce(function (acc, item) {\n var key = predicate(item);\n\n if (!acc.hasOwnProperty(key)) {\n acc[key] = [];\n } // We limit each section to show 5 hits maximum.\n // This acts as a frontend alternative to `distinct`.\n\n\n if (acc[key].length < (maxResultsPerGroup || 5)) {\n acc[key].push(item);\n }\n\n return acc;\n }, {});\n}","export function identity(x) {\n return x;\n}","/**\n * Detect when an event is modified with a special key to let the browser\n * trigger its default behavior.\n */\nexport function isModifierEvent(event) {\n var isMiddleClick = event.button === 1;\n return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n}","export function noop() {}","var regexHighlightTags = /(|<\\/mark>)/g;\nvar regexHasHighlightTags = RegExp(regexHighlightTags.source);\nexport function removeHighlightTags(hit) {\n var _internalDocSearchHit, _hit$_highlightResult;\n\n var internalDocSearchHit = hit;\n\n if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {\n return hit.hierarchy.lvl0;\n }\n\n var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit.hierarchy) === null || _internalDocSearchHit === void 0 ? void 0 : _internalDocSearchHit.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 || (_hit$_highlightResult = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult === void 0 ? void 0 : _hit$_highlightResult.lvl0) || {},\n value = _ref.value;\n\n return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport React from 'react';\nimport { SelectIcon, SourceIcon } from './icons';\nimport { Results } from './Results';\nimport { removeHighlightTags } from './utils';\nexport function ResultsScreen(props) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, props.state.collections.map(function (collection) {\n if (collection.items.length === 0) {\n return null;\n }\n\n var title = removeHighlightTags(collection.items[0]);\n return /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n key: collection.source.sourceId,\n title: title,\n collection: collection,\n renderIcon: function renderIcon(_ref) {\n var _collection$items;\n\n var item = _ref.item,\n index = _ref.index;\n return /*#__PURE__*/React.createElement(React.Fragment, null, item.__docsearch_parent && /*#__PURE__*/React.createElement(\"svg\", {\n className: \"DocSearch-Hit-Tree\",\n viewBox: \"0 0 24 54\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n fill: \"none\",\n fillRule: \"evenodd\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v21M20 27H8.3\"\n }) : /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 6v42M20 27H8.3\"\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(SourceIcon, {\n type: item.type\n })));\n },\n renderAction: function renderAction() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(SelectIcon, null));\n }\n }));\n }), props.resultsFooterComponent && /*#__PURE__*/React.createElement(\"section\", {\n className: \"DocSearch-HitsFooter\"\n }, /*#__PURE__*/React.createElement(props.resultsFooterComponent, {\n state: props.state\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { RecentIcon, ResetIcon, StarIcon } from './icons';\nimport { Results } from './Results';\nexport function StartScreen(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$recentS = translations.recentSearchesTitle,\n recentSearchesTitle = _translations$recentS === void 0 ? 'Recent' : _translations$recentS,\n _translations$noRecen = translations.noRecentSearchesText,\n noRecentSearchesText = _translations$noRecen === void 0 ? 'No recent searches' : _translations$noRecen,\n _translations$saveRec = translations.saveRecentSearchButtonTitle,\n saveRecentSearchButtonTitle = _translations$saveRec === void 0 ? 'Save this search' : _translations$saveRec,\n _translations$removeR = translations.removeRecentSearchButtonTitle,\n removeRecentSearchButtonTitle = _translations$removeR === void 0 ? 'Remove this search from history' : _translations$removeR,\n _translations$favorit = translations.favoriteSearchesTitle,\n favoriteSearchesTitle = _translations$favorit === void 0 ? 'Favorite' : _translations$favorit,\n _translations$removeF = translations.removeFavoriteSearchButtonTitle,\n removeFavoriteSearchButtonTitle = _translations$removeF === void 0 ? 'Remove this search from favorites' : _translations$removeF;\n\n if (props.state.status === 'idle' && props.hasCollections === false) {\n if (props.disableUserPersonalization) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-StartScreen\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"DocSearch-Help\"\n }, noRecentSearchesText));\n }\n\n if (props.hasCollections === false) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown-Container\"\n }, /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: recentSearchesTitle,\n collection: props.state.collections[0],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(RecentIcon, null));\n },\n renderAction: function renderAction(_ref2) {\n var item = _ref2.item,\n runFavoriteTransition = _ref2.runFavoriteTransition,\n runDeleteTransition = _ref2.runDeleteTransition;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: saveRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runFavoriteTransition(function () {\n props.favoriteSearches.add(item);\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(StarIcon, null))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeRecentSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.recentSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null))));\n }\n })), /*#__PURE__*/React.createElement(Results, _extends({}, props, {\n title: favoriteSearchesTitle,\n collection: props.state.collections[1],\n renderIcon: function renderIcon() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-icon\"\n }, /*#__PURE__*/React.createElement(StarIcon, null));\n },\n renderAction: function renderAction(_ref3) {\n var item = _ref3.item,\n runDeleteTransition = _ref3.runDeleteTransition;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Hit-action\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Hit-action-button\",\n title: removeFavoriteSearchButtonTitle,\n type: \"submit\",\n onClick: function onClick(event) {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(function () {\n props.favoriteSearches.remove(item);\n props.refresh();\n });\n }\n }, /*#__PURE__*/React.createElement(ResetIcon, null)));\n }\n })));\n}","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { ErrorScreen } from './ErrorScreen';\nimport { NoResultsScreen } from './NoResultsScreen';\nimport { ResultsScreen } from './ResultsScreen';\nimport { StartScreen } from './StartScreen';\nexport var ScreenState = React.memo(function (_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n if (props.state.status === 'error') {\n return /*#__PURE__*/React.createElement(ErrorScreen, {\n translations: translations === null || translations === void 0 ? void 0 : translations.errorScreen\n });\n }\n\n var hasCollections = props.state.collections.some(function (collection) {\n return collection.items.length > 0;\n });\n\n if (!props.state.query) {\n return /*#__PURE__*/React.createElement(StartScreen, _extends({}, props, {\n hasCollections: hasCollections,\n translations: translations === null || translations === void 0 ? void 0 : translations.startScreen\n }));\n }\n\n if (hasCollections === false) {\n return /*#__PURE__*/React.createElement(NoResultsScreen, _extends({}, props, {\n translations: translations === null || translations === void 0 ? void 0 : translations.noResultsScreen\n }));\n }\n\n return /*#__PURE__*/React.createElement(ResultsScreen, props);\n}, function areEqual(_prevProps, nextProps) {\n // We don't update the screen when Autocomplete is loading or stalled to\n // avoid UI flashes:\n // - Empty screen → Results screen\n // - NoResults screen → NoResults screen with another query\n return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled';\n});","var _excluded = [\"translations\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { LoadingIcon } from './icons/LoadingIcon';\nimport { ResetIcon } from './icons/ResetIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nexport function SearchBox(_ref) {\n var _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _translations$resetBu = translations.resetButtonTitle,\n resetButtonTitle = _translations$resetBu === void 0 ? 'Clear the query' : _translations$resetBu,\n _translations$resetBu2 = translations.resetButtonAriaLabel,\n resetButtonAriaLabel = _translations$resetBu2 === void 0 ? 'Clear the query' : _translations$resetBu2,\n _translations$cancelB = translations.cancelButtonText,\n cancelButtonText = _translations$cancelB === void 0 ? 'Cancel' : _translations$cancelB,\n _translations$cancelB2 = translations.cancelButtonAriaLabel,\n cancelButtonAriaLabel = _translations$cancelB2 === void 0 ? 'Cancel' : _translations$cancelB2;\n\n var _props$getFormProps = props.getFormProps({\n inputElement: props.inputRef.current\n }),\n onReset = _props$getFormProps.onReset;\n\n React.useEffect(function () {\n if (props.autoFocus && props.inputRef.current) {\n props.inputRef.current.focus();\n }\n }, [props.autoFocus, props.inputRef]);\n React.useEffect(function () {\n if (props.isFromSelection && props.inputRef.current) {\n props.inputRef.current.select();\n }\n }, [props.isFromSelection, props.inputRef]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"form\", {\n className: \"DocSearch-Form\",\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n },\n onReset: onReset\n }, /*#__PURE__*/React.createElement(\"label\", _extends({\n className: \"DocSearch-MagnifierLabel\"\n }, props.getLabelProps()), /*#__PURE__*/React.createElement(SearchIcon, null)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-LoadingIndicator\"\n }, /*#__PURE__*/React.createElement(LoadingIcon, null)), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"DocSearch-Input\",\n ref: props.inputRef\n }, props.getInputProps({\n inputElement: props.inputRef.current,\n autoFocus: props.autoFocus,\n maxLength: MAX_QUERY_SIZE\n }))), /*#__PURE__*/React.createElement(\"button\", {\n type: \"reset\",\n title: resetButtonTitle,\n className: \"DocSearch-Reset\",\n \"aria-label\": resetButtonAriaLabel,\n hidden: !props.state.query\n }, /*#__PURE__*/React.createElement(ResetIcon, null))), /*#__PURE__*/React.createElement(\"button\", {\n className: \"DocSearch-Cancel\",\n type: \"reset\",\n \"aria-label\": cancelButtonAriaLabel,\n onClick: props.onClose\n }, cancelButtonText));\n}","export var MAX_QUERY_SIZE = 64;","var _excluded = [\"_highlightResult\", \"_snippetResult\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction isLocalStorageSupported() {\n var key = '__TEST_KEY__';\n\n try {\n localStorage.setItem(key, '');\n localStorage.removeItem(key);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction createStorage(key) {\n if (isLocalStorageSupported() === false) {\n return {\n setItem: function setItem() {},\n getItem: function getItem() {\n return [];\n }\n };\n }\n\n return {\n setItem: function setItem(item) {\n return window.localStorage.setItem(key, JSON.stringify(item));\n },\n getItem: function getItem() {\n var item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : [];\n }\n };\n}\n\nexport function createStoredSearches(_ref) {\n var key = _ref.key,\n _ref$limit = _ref.limit,\n limit = _ref$limit === void 0 ? 5 : _ref$limit;\n var storage = createStorage(key);\n var items = storage.getItem().slice(0, limit);\n return {\n add: function add(item) {\n var _ref2 = item,\n _highlightResult = _ref2._highlightResult,\n _snippetResult = _ref2._snippetResult,\n hit = _objectWithoutProperties(_ref2, _excluded);\n\n var isQueryAlreadySaved = items.findIndex(function (x) {\n return x.objectID === hit.objectID;\n });\n\n if (isQueryAlreadySaved > -1) {\n items.splice(isQueryAlreadySaved, 1);\n }\n\n items.unshift(hit);\n items = items.slice(0, limit);\n storage.setItem(items);\n },\n remove: function remove(item) {\n items = items.filter(function (x) {\n return x.objectID !== item.objectID;\n });\n storage.setItem(items);\n },\n getAll: function getAll() {\n return items;\n }\n };\n}","function createBrowserLocalStorageCache(options) {\r\n const namespaceKey = `algoliasearch-client-js-${options.key}`;\r\n // eslint-disable-next-line functional/no-let\r\n let storage;\r\n const getStorage = () => {\r\n if (storage === undefined) {\r\n storage = options.localStorage || window.localStorage;\r\n }\r\n return storage;\r\n };\r\n const getNamespace = () => {\r\n return JSON.parse(getStorage().getItem(namespaceKey) || '{}');\r\n };\r\n const setNamespace = (namespace) => {\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n };\r\n const removeOutdatedCacheItems = () => {\r\n const timeToLive = options.timeToLive ? options.timeToLive * 1000 : null;\r\n const namespace = getNamespace();\r\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(Object.entries(namespace).filter(([, cacheItem]) => {\r\n return cacheItem.timestamp !== undefined;\r\n }));\r\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\r\n if (!timeToLive)\r\n return;\r\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\r\n const currentTimestamp = new Date().getTime();\r\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\r\n return !isExpired;\r\n }));\r\n setNamespace(filteredNamespaceWithoutExpiredItems);\r\n };\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return Promise.resolve()\r\n .then(() => {\r\n removeOutdatedCacheItems();\r\n const keyAsString = JSON.stringify(key);\r\n return getNamespace()[keyAsString];\r\n })\r\n .then(value => {\r\n return Promise.all([value ? value.value : defaultValue(), value !== undefined]);\r\n })\r\n .then(([value, exists]) => {\r\n return Promise.all([value, exists || events.miss(value)]);\r\n })\r\n .then(([value]) => value);\r\n },\r\n set(key, value) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n namespace[JSON.stringify(key)] = {\r\n timestamp: new Date().getTime(),\r\n value,\r\n };\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n return value;\r\n });\r\n },\r\n delete(key) {\r\n return Promise.resolve().then(() => {\r\n const namespace = getNamespace();\r\n // eslint-disable-next-line functional/immutable-data\r\n delete namespace[JSON.stringify(key)];\r\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\r\n });\r\n },\r\n clear() {\r\n return Promise.resolve().then(() => {\r\n getStorage().removeItem(namespaceKey);\r\n });\r\n },\r\n };\r\n}\n\n// @todo Add logger on options to debug when caches go wrong.\r\nfunction createFallbackableCache(options) {\r\n const caches = [...options.caches];\r\n const current = caches.shift(); // eslint-disable-line functional/immutable-data\r\n if (current === undefined) {\r\n return createNullCache();\r\n }\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n return current.get(key, defaultValue, events).catch(() => {\r\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\r\n });\r\n },\r\n set(key, value) {\r\n return current.set(key, value).catch(() => {\r\n return createFallbackableCache({ caches }).set(key, value);\r\n });\r\n },\r\n delete(key) {\r\n return current.delete(key).catch(() => {\r\n return createFallbackableCache({ caches }).delete(key);\r\n });\r\n },\r\n clear() {\r\n return current.clear().catch(() => {\r\n return createFallbackableCache({ caches }).clear();\r\n });\r\n },\r\n };\r\n}\n\nfunction createNullCache() {\r\n return {\r\n get(_key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const value = defaultValue();\r\n return value\r\n .then(result => Promise.all([result, events.miss(result)]))\r\n .then(([result]) => result);\r\n },\r\n set(_key, value) {\r\n return Promise.resolve(value);\r\n },\r\n delete(_key) {\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createInMemoryCache(options = { serializable: true }) {\r\n // eslint-disable-next-line functional/no-let\r\n let cache = {};\r\n return {\r\n get(key, defaultValue, events = {\r\n miss: () => Promise.resolve(),\r\n }) {\r\n const keyAsString = JSON.stringify(key);\r\n if (keyAsString in cache) {\r\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\r\n }\r\n const promise = defaultValue();\r\n const miss = (events && events.miss) || (() => Promise.resolve());\r\n return promise.then((value) => miss(value)).then(() => promise);\r\n },\r\n set(key, value) {\r\n // eslint-disable-next-line functional/immutable-data\r\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\r\n return Promise.resolve(value);\r\n },\r\n delete(key) {\r\n // eslint-disable-next-line functional/immutable-data\r\n delete cache[JSON.stringify(key)];\r\n return Promise.resolve();\r\n },\r\n clear() {\r\n cache = {};\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createAuth(authMode, appId, apiKey) {\r\n const credentials = {\r\n 'x-algolia-api-key': apiKey,\r\n 'x-algolia-application-id': appId,\r\n };\r\n return {\r\n headers() {\r\n return authMode === AuthMode.WithinHeaders ? credentials : {};\r\n },\r\n queryParameters() {\r\n return authMode === AuthMode.WithinQueryParameters ? credentials : {};\r\n },\r\n };\r\n}\n\n// eslint-disable-next-line functional/prefer-readonly-type\r\nfunction shuffle(array) {\r\n let c = array.length - 1; // eslint-disable-line functional/no-let\r\n // eslint-disable-next-line functional/no-loop-statement\r\n for (c; c > 0; c--) {\r\n const b = Math.floor(Math.random() * (c + 1));\r\n const a = array[c];\r\n array[c] = array[b]; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n array[b] = a; // eslint-disable-line functional/immutable-data, no-param-reassign\r\n }\r\n return array;\r\n}\r\nfunction addMethods(base, methods) {\r\n if (!methods) {\r\n return base;\r\n }\r\n Object.keys(methods).forEach(key => {\r\n // eslint-disable-next-line functional/immutable-data, no-param-reassign\r\n base[key] = methods[key](base);\r\n });\r\n return base;\r\n}\r\nfunction encode(format, ...args) {\r\n // eslint-disable-next-line functional/no-let\r\n let i = 0;\r\n return format.replace(/%s/g, () => encodeURIComponent(args[i++]));\r\n}\n\nconst version = '4.19.1';\n\nconst AuthMode = {\r\n /**\r\n * If auth credentials should be in query parameters.\r\n */\r\n WithinQueryParameters: 0,\r\n /**\r\n * If auth credentials should be in headers.\r\n */\r\n WithinHeaders: 1,\r\n};\n\nfunction createMappedRequestOptions(requestOptions, timeout) {\r\n const options = requestOptions || {};\r\n const data = options.data || {};\r\n Object.keys(options).forEach(key => {\r\n if (['timeout', 'headers', 'queryParameters', 'data', 'cacheable'].indexOf(key) === -1) {\r\n data[key] = options[key]; // eslint-disable-line functional/immutable-data\r\n }\r\n });\r\n return {\r\n data: Object.entries(data).length > 0 ? data : undefined,\r\n timeout: options.timeout || timeout,\r\n headers: options.headers || {},\r\n queryParameters: options.queryParameters || {},\r\n cacheable: options.cacheable,\r\n };\r\n}\n\nconst CallEnum = {\r\n /**\r\n * If the host is read only.\r\n */\r\n Read: 1,\r\n /**\r\n * If the host is write only.\r\n */\r\n Write: 2,\r\n /**\r\n * If the host is both read and write.\r\n */\r\n Any: 3,\r\n};\n\nconst HostStatusEnum = {\r\n Up: 1,\r\n Down: 2,\r\n Timeouted: 3,\r\n};\n\n// By default, API Clients at Algolia have expiration delay\r\n// of 5 mins. In the JavaScript client, we have 2 mins.\r\nconst EXPIRATION_DELAY = 2 * 60 * 1000;\r\nfunction createStatefulHost(host, status = HostStatusEnum.Up) {\r\n return {\r\n ...host,\r\n status,\r\n lastUpdate: Date.now(),\r\n };\r\n}\r\nfunction isStatefulHostUp(host) {\r\n return host.status === HostStatusEnum.Up || Date.now() - host.lastUpdate > EXPIRATION_DELAY;\r\n}\r\nfunction isStatefulHostTimeouted(host) {\r\n return (host.status === HostStatusEnum.Timeouted && Date.now() - host.lastUpdate <= EXPIRATION_DELAY);\r\n}\n\nfunction createStatelessHost(options) {\r\n if (typeof options === 'string') {\r\n return {\r\n protocol: 'https',\r\n url: options,\r\n accept: CallEnum.Any,\r\n };\r\n }\r\n return {\r\n protocol: options.protocol || 'https',\r\n url: options.url,\r\n accept: options.accept || CallEnum.Any,\r\n };\r\n}\n\nconst MethodEnum = {\r\n Delete: 'DELETE',\r\n Get: 'GET',\r\n Post: 'POST',\r\n Put: 'PUT',\r\n};\n\nfunction createRetryableOptions(hostsCache, statelessHosts) {\r\n return Promise.all(statelessHosts.map(statelessHost => {\r\n return hostsCache.get(statelessHost, () => {\r\n return Promise.resolve(createStatefulHost(statelessHost));\r\n });\r\n })).then(statefulHosts => {\r\n const hostsUp = statefulHosts.filter(host => isStatefulHostUp(host));\r\n const hostsTimeouted = statefulHosts.filter(host => isStatefulHostTimeouted(host));\r\n /**\r\n * Note, we put the hosts that previously timeouted on the end of the list.\r\n */\r\n const hostsAvailable = [...hostsUp, ...hostsTimeouted];\r\n const statelessHostsAvailable = hostsAvailable.length > 0\r\n ? hostsAvailable.map(host => createStatelessHost(host))\r\n : statelessHosts;\r\n return {\r\n getTimeout(timeoutsCount, baseTimeout) {\r\n /**\r\n * Imagine that you have 4 hosts, if timeouts will increase\r\n * on the following way: 1 (timeouted) > 4 (timeouted) > 5 (200)\r\n *\r\n * Note that, the very next request, we start from the previous timeout\r\n *\r\n * 5 (timeouted) > 6 (timeouted) > 7 ...\r\n *\r\n * This strategy may need to be reviewed, but is the strategy on the our\r\n * current v3 version.\r\n */\r\n const timeoutMultiplier = hostsTimeouted.length === 0 && timeoutsCount === 0\r\n ? 1\r\n : hostsTimeouted.length + 3 + timeoutsCount;\r\n return timeoutMultiplier * baseTimeout;\r\n },\r\n statelessHosts: statelessHostsAvailable,\r\n };\r\n });\r\n}\n\nconst isNetworkError = ({ isTimedOut, status }) => {\r\n return !isTimedOut && ~~status === 0;\r\n};\r\nconst isRetryable = (response) => {\r\n const status = response.status;\r\n const isTimedOut = response.isTimedOut;\r\n return (isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4));\r\n};\r\nconst isSuccess = ({ status }) => {\r\n return ~~(status / 100) === 2;\r\n};\r\nconst retryDecision = (response, outcomes) => {\r\n if (isRetryable(response)) {\r\n return outcomes.onRetry(response);\r\n }\r\n if (isSuccess(response)) {\r\n return outcomes.onSuccess(response);\r\n }\r\n return outcomes.onFail(response);\r\n};\n\nfunction retryableRequest(transporter, statelessHosts, request, requestOptions) {\r\n const stackTrace = []; // eslint-disable-line functional/prefer-readonly-type\r\n /**\r\n * First we prepare the payload that do not depend from hosts.\r\n */\r\n const data = serializeData(request, requestOptions);\r\n const headers = serializeHeaders(transporter, requestOptions);\r\n const method = request.method;\r\n // On `GET`, the data is proxied to query parameters.\r\n const dataQueryParameters = request.method !== MethodEnum.Get\r\n ? {}\r\n : {\r\n ...request.data,\r\n ...requestOptions.data,\r\n };\r\n const queryParameters = {\r\n 'x-algolia-agent': transporter.userAgent.value,\r\n ...transporter.queryParameters,\r\n ...dataQueryParameters,\r\n ...requestOptions.queryParameters,\r\n };\r\n let timeoutsCount = 0; // eslint-disable-line functional/no-let\r\n const retry = (hosts, // eslint-disable-line functional/prefer-readonly-type\r\n getTimeout) => {\r\n /**\r\n * We iterate on each host, until there is no host left.\r\n */\r\n const host = hosts.pop(); // eslint-disable-line functional/immutable-data\r\n if (host === undefined) {\r\n throw createRetryError(stackTraceWithoutCredentials(stackTrace));\r\n }\r\n const payload = {\r\n data,\r\n headers,\r\n method,\r\n url: serializeUrl(host, request.path, queryParameters),\r\n connectTimeout: getTimeout(timeoutsCount, transporter.timeouts.connect),\r\n responseTimeout: getTimeout(timeoutsCount, requestOptions.timeout),\r\n };\r\n /**\r\n * The stackFrame is pushed to the stackTrace so we\r\n * can have information about onRetry and onFailure\r\n * decisions.\r\n */\r\n const pushToStackTrace = (response) => {\r\n const stackFrame = {\r\n request: payload,\r\n response,\r\n host,\r\n triesLeft: hosts.length,\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n stackTrace.push(stackFrame);\r\n return stackFrame;\r\n };\r\n const decisions = {\r\n onSuccess: response => deserializeSuccess(response),\r\n onRetry(response) {\r\n const stackFrame = pushToStackTrace(response);\r\n /**\r\n * If response is a timeout, we increaset the number of\r\n * timeouts so we can increase the timeout later.\r\n */\r\n if (response.isTimedOut) {\r\n timeoutsCount++;\r\n }\r\n return Promise.all([\r\n /**\r\n * Failures are individually send the logger, allowing\r\n * the end user to debug / store stack frames even\r\n * when a retry error does not happen.\r\n */\r\n transporter.logger.info('Retryable failure', stackFrameWithoutCredentials(stackFrame)),\r\n /**\r\n * We also store the state of the host in failure cases. If the host, is\r\n * down it will remain down for the next 2 minutes. In a timeout situation,\r\n * this host will be added end of the list of hosts on the next request.\r\n */\r\n transporter.hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? HostStatusEnum.Timeouted : HostStatusEnum.Down)),\r\n ]).then(() => retry(hosts, getTimeout));\r\n },\r\n onFail(response) {\r\n pushToStackTrace(response);\r\n throw deserializeFailure(response, stackTraceWithoutCredentials(stackTrace));\r\n },\r\n };\r\n return transporter.requester.send(payload).then(response => {\r\n return retryDecision(response, decisions);\r\n });\r\n };\r\n /**\r\n * Finally, for each retryable host perform request until we got a non\r\n * retryable response. Some notes here:\r\n *\r\n * 1. The reverse here is applied so we can apply a `pop` later on => more performant.\r\n * 2. We also get from the retryable options a timeout multiplier that is tailored\r\n * for the current context.\r\n */\r\n return createRetryableOptions(transporter.hostsCache, statelessHosts).then(options => {\r\n return retry([...options.statelessHosts].reverse(), options.getTimeout);\r\n });\r\n}\n\nfunction createTransporter(options) {\r\n const { hostsCache, logger, requester, requestsCache, responsesCache, timeouts, userAgent, hosts, queryParameters, headers, } = options;\r\n const transporter = {\r\n hostsCache,\r\n logger,\r\n requester,\r\n requestsCache,\r\n responsesCache,\r\n timeouts,\r\n userAgent,\r\n headers,\r\n queryParameters,\r\n hosts: hosts.map(host => createStatelessHost(host)),\r\n read(request, requestOptions) {\r\n /**\r\n * First, we compute the user request options. Now, keep in mind,\r\n * that using request options the user is able to modified the intire\r\n * payload of the request. Such as headers, query parameters, and others.\r\n */\r\n const mappedRequestOptions = createMappedRequestOptions(requestOptions, transporter.timeouts.read);\r\n const createRetryableRequest = () => {\r\n /**\r\n * Then, we prepare a function factory that contains the construction of\r\n * the retryable request. At this point, we may *not* perform the actual\r\n * request. But we want to have the function factory ready.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Read) !== 0), request, mappedRequestOptions);\r\n };\r\n /**\r\n * Once we have the function factory ready, we need to determine of the\r\n * request is \"cacheable\" - should be cached. Note that, once again,\r\n * the user can force this option.\r\n */\r\n const cacheable = mappedRequestOptions.cacheable !== undefined\r\n ? mappedRequestOptions.cacheable\r\n : request.cacheable;\r\n /**\r\n * If is not \"cacheable\", we immediatly trigger the retryable request, no\r\n * need to check cache implementations.\r\n */\r\n if (cacheable !== true) {\r\n return createRetryableRequest();\r\n }\r\n /**\r\n * If the request is \"cacheable\", we need to first compute the key to ask\r\n * the cache implementations if this request is on progress or if the\r\n * response already exists on the cache.\r\n */\r\n const key = {\r\n request,\r\n mappedRequestOptions,\r\n transporter: {\r\n queryParameters: transporter.queryParameters,\r\n headers: transporter.headers,\r\n },\r\n };\r\n /**\r\n * With the computed key, we first ask the responses cache\r\n * implemention if this request was been resolved before.\r\n */\r\n return transporter.responsesCache.get(key, () => {\r\n /**\r\n * If the request has never resolved before, we actually ask if there\r\n * is a current request with the same key on progress.\r\n */\r\n return transporter.requestsCache.get(key, () => {\r\n return (transporter.requestsCache\r\n /**\r\n * Finally, if there is no request in progress with the same key,\r\n * this `createRetryableRequest()` will actually trigger the\r\n * retryable request.\r\n */\r\n .set(key, createRetryableRequest())\r\n .then(response => Promise.all([transporter.requestsCache.delete(key), response]), err => Promise.all([transporter.requestsCache.delete(key), Promise.reject(err)]))\r\n .then(([_, response]) => response));\r\n });\r\n }, {\r\n /**\r\n * Of course, once we get this response back from the server, we\r\n * tell response cache to actually store the received response\r\n * to be used later.\r\n */\r\n miss: response => transporter.responsesCache.set(key, response),\r\n });\r\n },\r\n write(request, requestOptions) {\r\n /**\r\n * On write requests, no cache mechanisms are applied, and we\r\n * proxy the request immediately to the requester.\r\n */\r\n return retryableRequest(transporter, transporter.hosts.filter(host => (host.accept & CallEnum.Write) !== 0), request, createMappedRequestOptions(requestOptions, transporter.timeouts.write));\r\n },\r\n };\r\n return transporter;\r\n}\n\nfunction createUserAgent(version) {\r\n const userAgent = {\r\n value: `Algolia for JavaScript (${version})`,\r\n add(options) {\r\n const addedUserAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;\r\n if (userAgent.value.indexOf(addedUserAgent) === -1) {\r\n // eslint-disable-next-line functional/immutable-data\r\n userAgent.value = `${userAgent.value}${addedUserAgent}`;\r\n }\r\n return userAgent;\r\n },\r\n };\r\n return userAgent;\r\n}\n\nfunction deserializeSuccess(response) {\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n return JSON.parse(response.content);\r\n }\r\n catch (e) {\r\n throw createDeserializationError(e.message, response);\r\n }\r\n}\r\nfunction deserializeFailure({ content, status }, stackFrame) {\r\n // eslint-disable-next-line functional/no-let\r\n let message = content;\r\n // eslint-disable-next-line functional/no-try-statement\r\n try {\r\n message = JSON.parse(content).message;\r\n }\r\n catch (e) {\r\n // ..\r\n }\r\n return createApiError(message, status, stackFrame);\r\n}\n\nfunction serializeUrl(host, path, queryParameters) {\r\n const queryParametersAsString = serializeQueryParameters(queryParameters);\r\n // eslint-disable-next-line functional/no-let\r\n let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;\r\n if (queryParametersAsString.length) {\r\n url += `?${queryParametersAsString}`;\r\n }\r\n return url;\r\n}\r\nfunction serializeQueryParameters(parameters) {\r\n const isObjectOrArray = (value) => Object.prototype.toString.call(value) === '[object Object]' ||\r\n Object.prototype.toString.call(value) === '[object Array]';\r\n return Object.keys(parameters)\r\n .map(key => encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]))\r\n .join('&');\r\n}\r\nfunction serializeData(request, requestOptions) {\r\n if (request.method === MethodEnum.Get ||\r\n (request.data === undefined && requestOptions.data === undefined)) {\r\n return undefined;\r\n }\r\n const data = Array.isArray(request.data)\r\n ? request.data\r\n : { ...request.data, ...requestOptions.data };\r\n return JSON.stringify(data);\r\n}\r\nfunction serializeHeaders(transporter, requestOptions) {\r\n const headers = {\r\n ...transporter.headers,\r\n ...requestOptions.headers,\r\n };\r\n const serializedHeaders = {};\r\n Object.keys(headers).forEach(header => {\r\n const value = headers[header];\r\n // @ts-ignore\r\n // eslint-disable-next-line functional/immutable-data\r\n serializedHeaders[header.toLowerCase()] = value;\r\n });\r\n return serializedHeaders;\r\n}\n\nfunction stackTraceWithoutCredentials(stackTrace) {\r\n return stackTrace.map(stackFrame => stackFrameWithoutCredentials(stackFrame));\r\n}\r\nfunction stackFrameWithoutCredentials(stackFrame) {\r\n const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key']\r\n ? { 'x-algolia-api-key': '*****' }\r\n : {};\r\n return {\r\n ...stackFrame,\r\n request: {\r\n ...stackFrame.request,\r\n headers: {\r\n ...stackFrame.request.headers,\r\n ...modifiedHeaders,\r\n },\r\n },\r\n };\r\n}\n\nfunction createApiError(message, status, transporterStackTrace) {\r\n return {\r\n name: 'ApiError',\r\n message,\r\n status,\r\n transporterStackTrace,\r\n };\r\n}\n\nfunction createDeserializationError(message, response) {\r\n return {\r\n name: 'DeserializationError',\r\n message,\r\n response,\r\n };\r\n}\n\nfunction createRetryError(transporterStackTrace) {\r\n return {\r\n name: 'RetryError',\r\n message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',\r\n transporterStackTrace,\r\n };\r\n}\n\nconst createSearchClient = options => {\r\n const appId = options.appId;\r\n const auth = createAuth(options.authMode !== undefined ? options.authMode : AuthMode.WithinHeaders, appId, options.apiKey);\r\n const transporter = createTransporter({\r\n hosts: [\r\n { url: `${appId}-dsn.algolia.net`, accept: CallEnum.Read },\r\n { url: `${appId}.algolia.net`, accept: CallEnum.Write },\r\n ].concat(shuffle([\r\n { url: `${appId}-1.algolianet.com` },\r\n { url: `${appId}-2.algolianet.com` },\r\n { url: `${appId}-3.algolianet.com` },\r\n ])),\r\n ...options,\r\n headers: {\r\n ...auth.headers(),\r\n ...{ 'content-type': 'application/x-www-form-urlencoded' },\r\n ...options.headers,\r\n },\r\n queryParameters: {\r\n ...auth.queryParameters(),\r\n ...options.queryParameters,\r\n },\r\n });\r\n const base = {\r\n transporter,\r\n appId,\r\n addAlgoliaAgent(segment, version) {\r\n transporter.userAgent.add({ segment, version });\r\n },\r\n clearCache() {\r\n return Promise.all([\r\n transporter.requestsCache.clear(),\r\n transporter.responsesCache.clear(),\r\n ]).then(() => undefined);\r\n },\r\n };\r\n return addMethods(base, options.methods);\r\n};\n\nconst customRequest = (base) => {\r\n return (request, requestOptions) => {\r\n if (request.method === MethodEnum.Get) {\r\n return base.transporter.read(request, requestOptions);\r\n }\r\n return base.transporter.write(request, requestOptions);\r\n };\r\n};\n\nconst initIndex = (base) => {\r\n return (indexName, options = {}) => {\r\n const searchIndex = {\r\n transporter: base.transporter,\r\n appId: base.appId,\r\n indexName,\r\n };\r\n return addMethods(searchIndex, options.methods);\r\n };\r\n};\n\nconst multipleQueries = (base) => {\r\n return (queries, requestOptions) => {\r\n const requests = queries.map(query => {\r\n return {\r\n ...query,\r\n params: serializeQueryParameters(query.params || {}),\r\n };\r\n });\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: '1/indexes/*/queries',\r\n data: {\r\n requests,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst multipleSearchForFacetValues = (base) => {\r\n return (queries, requestOptions) => {\r\n return Promise.all(queries.map(query => {\r\n const { facetName, facetQuery, ...params } = query.params;\r\n return initIndex(base)(query.indexName, {\r\n methods: { searchForFacetValues },\r\n }).searchForFacetValues(facetName, facetQuery, {\r\n ...requestOptions,\r\n ...params,\r\n });\r\n }));\r\n };\r\n};\n\nconst findAnswers = (base) => {\r\n return (query, queryLanguages, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/answers/%s/prediction', base.indexName),\r\n data: {\r\n query,\r\n queryLanguages,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst search = (base) => {\r\n return (query, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/query', base.indexName),\r\n data: {\r\n query,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst searchForFacetValues = (base) => {\r\n return (facetName, facetQuery, requestOptions) => {\r\n return base.transporter.read({\r\n method: MethodEnum.Post,\r\n path: encode('1/indexes/%s/facets/%s/query', base.indexName, facetName),\r\n data: {\r\n facetQuery,\r\n },\r\n cacheable: true,\r\n }, requestOptions);\r\n };\r\n};\n\nconst LogLevelEnum = {\r\n Debug: 1,\r\n Info: 2,\r\n Error: 3,\r\n};\n\n/* eslint no-console: 0 */\r\nfunction createConsoleLogger(logLevel) {\r\n return {\r\n debug(message, args) {\r\n if (LogLevelEnum.Debug >= logLevel) {\r\n console.debug(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n info(message, args) {\r\n if (LogLevelEnum.Info >= logLevel) {\r\n console.info(message, args);\r\n }\r\n return Promise.resolve();\r\n },\r\n error(message, args) {\r\n console.error(message, args);\r\n return Promise.resolve();\r\n },\r\n };\r\n}\n\nfunction createBrowserXhrRequester() {\r\n return {\r\n send(request) {\r\n return new Promise((resolve) => {\r\n const baseRequester = new XMLHttpRequest();\r\n baseRequester.open(request.method, request.url, true);\r\n Object.keys(request.headers).forEach(key => baseRequester.setRequestHeader(key, request.headers[key]));\r\n const createTimeout = (timeout, content) => {\r\n return setTimeout(() => {\r\n baseRequester.abort();\r\n resolve({\r\n status: 0,\r\n content,\r\n isTimedOut: true,\r\n });\r\n }, timeout * 1000);\r\n };\r\n const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');\r\n // eslint-disable-next-line functional/no-let\r\n let responseTimeout;\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onreadystatechange = () => {\r\n if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {\r\n clearTimeout(connectTimeout);\r\n responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onerror = () => {\r\n // istanbul ignore next\r\n if (baseRequester.status === 0) {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText || 'Network request failed',\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n }\r\n };\r\n // eslint-disable-next-line functional/immutable-data\r\n baseRequester.onload = () => {\r\n clearTimeout(connectTimeout);\r\n clearTimeout(responseTimeout);\r\n resolve({\r\n content: baseRequester.responseText,\r\n status: baseRequester.status,\r\n isTimedOut: false,\r\n });\r\n };\r\n baseRequester.send(request.data);\r\n });\r\n },\r\n };\r\n}\n\nfunction algoliasearch(appId, apiKey, options) {\r\n const commonOptions = {\r\n appId,\r\n apiKey,\r\n timeouts: {\r\n connect: 1,\r\n read: 2,\r\n write: 30,\r\n },\r\n requester: createBrowserXhrRequester(),\r\n logger: createConsoleLogger(LogLevelEnum.Error),\r\n responsesCache: createInMemoryCache(),\r\n requestsCache: createInMemoryCache({ serializable: false }),\r\n hostsCache: createFallbackableCache({\r\n caches: [\r\n createBrowserLocalStorageCache({ key: `${version}-${appId}` }),\r\n createInMemoryCache(),\r\n ],\r\n }),\r\n userAgent: createUserAgent(version).add({\r\n segment: 'Browser',\r\n version: 'lite',\r\n }),\r\n authMode: AuthMode.WithinQueryParameters,\r\n };\r\n return createSearchClient({\r\n ...commonOptions,\r\n ...options,\r\n methods: {\r\n search: multipleQueries,\r\n searchForFacetValues: multipleSearchForFacetValues,\r\n multipleQueries,\r\n multipleSearchForFacetValues,\r\n customRequest,\r\n initIndex: base => (indexName) => {\r\n return initIndex(base)(indexName, {\r\n methods: { search, searchForFacetValues, findAnswers },\r\n });\r\n },\r\n },\r\n });\r\n}\r\n// eslint-disable-next-line functional/immutable-data\r\nalgoliasearch.version = version;\n\nexport default algoliasearch;\n","export var version = '3.5.2';","var _excluded = [\"footer\", \"searchBox\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport { createAutocomplete } from '@algolia/autocomplete-core';\nimport React from 'react';\nimport { MAX_QUERY_SIZE } from './constants';\nimport { Footer } from './Footer';\nimport { Hit } from './Hit';\nimport { ScreenState } from './ScreenState';\nimport { SearchBox } from './SearchBox';\nimport { createStoredSearches } from './stored-searches';\nimport { useSearchClient } from './useSearchClient';\nimport { useTouchEvents } from './useTouchEvents';\nimport { useTrapFocus } from './useTrapFocus';\nimport { groupBy, identity, noop, removeHighlightTags, isModifierEvent } from './utils';\nexport function DocSearchModal(_ref) {\n var appId = _ref.appId,\n apiKey = _ref.apiKey,\n indexName = _ref.indexName,\n _ref$placeholder = _ref.placeholder,\n placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder,\n searchParameters = _ref.searchParameters,\n maxResultsPerGroup = _ref.maxResultsPerGroup,\n _ref$onClose = _ref.onClose,\n onClose = _ref$onClose === void 0 ? noop : _ref$onClose,\n _ref$transformItems = _ref.transformItems,\n transformItems = _ref$transformItems === void 0 ? identity : _ref$transformItems,\n _ref$hitComponent = _ref.hitComponent,\n hitComponent = _ref$hitComponent === void 0 ? Hit : _ref$hitComponent,\n _ref$resultsFooterCom = _ref.resultsFooterComponent,\n resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () {\n return null;\n } : _ref$resultsFooterCom,\n navigator = _ref.navigator,\n _ref$initialScrollY = _ref.initialScrollY,\n initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,\n _ref$transformSearchC = _ref.transformSearchClient,\n transformSearchClient = _ref$transformSearchC === void 0 ? identity : _ref$transformSearchC,\n _ref$disableUserPerso = _ref.disableUserPersonalization,\n disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso,\n _ref$initialQuery = _ref.initialQuery,\n initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery,\n _ref$translations = _ref.translations,\n translations = _ref$translations === void 0 ? {} : _ref$translations,\n getMissingResultsUrl = _ref.getMissingResultsUrl,\n _ref$insights = _ref.insights,\n insights = _ref$insights === void 0 ? false : _ref$insights;\n\n var footerTranslations = translations.footer,\n searchBoxTranslations = translations.searchBox,\n screenStateTranslations = _objectWithoutProperties(translations, _excluded);\n\n var _React$useState = React.useState({\n query: '',\n collections: [],\n completion: null,\n context: {},\n isOpen: false,\n activeItemId: null,\n status: 'idle'\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n state = _React$useState2[0],\n setState = _React$useState2[1];\n\n var containerRef = React.useRef(null);\n var modalRef = React.useRef(null);\n var formElementRef = React.useRef(null);\n var dropdownRef = React.useRef(null);\n var inputRef = React.useRef(null);\n var snippetLength = React.useRef(10);\n var initialQueryFromSelection = React.useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, MAX_QUERY_SIZE) : '').current;\n var initialQuery = React.useRef(initialQueryFromProp || initialQueryFromSelection).current;\n var searchClient = useSearchClient(appId, apiKey, transformSearchClient);\n var favoriteSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_FAVORITE_SEARCHES__\".concat(indexName),\n limit: 10\n })).current;\n var recentSearches = React.useRef(createStoredSearches({\n key: \"__DOCSEARCH_RECENT_SEARCHES__\".concat(indexName),\n // We display 7 recent searches and there's no favorites, but only\n // 4 when there are favorites.\n limit: favoriteSearches.getAll().length === 0 ? 7 : 4\n })).current;\n var saveRecentSearch = React.useCallback(function saveRecentSearch(item) {\n if (disableUserPersonalization) {\n return;\n } // We don't store `content` record, but their parent if available.\n\n\n var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited.\n\n if (search && favoriteSearches.getAll().findIndex(function (x) {\n return x.objectID === search.objectID;\n }) === -1) {\n recentSearches.add(search);\n }\n }, [favoriteSearches, recentSearches, disableUserPersonalization]);\n var sendItemClickEvent = React.useCallback(function (item) {\n if (!state.context.algoliaInsightsPlugin || !item.__autocomplete_id) return;\n var insightsItem = item;\n var insightsClickParams = {\n eventName: 'Item Selected',\n index: insightsItem.__autocomplete_indexName,\n items: [insightsItem],\n positions: [item.__autocomplete_id],\n queryID: insightsItem.__autocomplete_queryID\n };\n state.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(insightsClickParams);\n }, [state.context.algoliaInsightsPlugin]);\n var autocomplete = React.useMemo(function () {\n return createAutocomplete({\n id: 'docsearch',\n defaultActiveItemId: 0,\n placeholder: placeholder,\n openOnFocus: true,\n initialState: {\n query: initialQuery,\n context: {\n searchSuggestions: []\n }\n },\n insights: insights,\n navigator: navigator,\n onStateChange: function onStateChange(props) {\n setState(props.state);\n },\n getSources: function getSources(_ref2) {\n var query = _ref2.query,\n sourcesState = _ref2.state,\n setContext = _ref2.setContext,\n setStatus = _ref2.setStatus;\n\n if (!query) {\n if (disableUserPersonalization) {\n return [];\n }\n\n return [{\n sourceId: 'recentSearches',\n onSelect: function onSelect(_ref3) {\n var item = _ref3.item,\n event = _ref3.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref4) {\n var item = _ref4.item;\n return item.url;\n },\n getItems: function getItems() {\n return recentSearches.getAll();\n }\n }, {\n sourceId: 'favoriteSearches',\n onSelect: function onSelect(_ref5) {\n var item = _ref5.item,\n event = _ref5.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref6) {\n var item = _ref6.item;\n return item.url;\n },\n getItems: function getItems() {\n return favoriteSearches.getAll();\n }\n }];\n }\n\n var insightsActive = Boolean(insights);\n return searchClient.search([{\n query: query,\n indexName: indexName,\n params: _objectSpread({\n attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'],\n attributesToSnippet: [\"hierarchy.lvl1:\".concat(snippetLength.current), \"hierarchy.lvl2:\".concat(snippetLength.current), \"hierarchy.lvl3:\".concat(snippetLength.current), \"hierarchy.lvl4:\".concat(snippetLength.current), \"hierarchy.lvl5:\".concat(snippetLength.current), \"hierarchy.lvl6:\".concat(snippetLength.current), \"content:\".concat(snippetLength.current)],\n snippetEllipsisText: '…',\n highlightPreTag: '',\n highlightPostTag: '',\n hitsPerPage: 20,\n clickAnalytics: insightsActive\n }, searchParameters)\n }]).catch(function (error) {\n // The Algolia `RetryError` happens when all the servers have\n // failed, meaning that there's no chance the response comes\n // back. This is the right time to display an error.\n // See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5\n if (error.name === 'RetryError') {\n setStatus('error');\n }\n\n throw error;\n }).then(function (_ref7) {\n var results = _ref7.results;\n var firstResult = results[0];\n var hits = firstResult.hits,\n nbHits = firstResult.nbHits;\n var sources = groupBy(hits, function (hit) {\n return removeHighlightTags(hit);\n }, maxResultsPerGroup); // We store the `lvl0`s to display them as search suggestions\n // in the \"no results\" screen.\n\n if (sourcesState.context.searchSuggestions.length < Object.keys(sources).length) {\n setContext({\n searchSuggestions: Object.keys(sources)\n });\n }\n\n setContext({\n nbHits: nbHits\n });\n var insightsParams = {};\n\n if (insightsActive) {\n insightsParams = {\n __autocomplete_indexName: indexName,\n __autocomplete_queryID: firstResult.queryID,\n __autocomplete_algoliaCredentials: {\n appId: appId,\n apiKey: apiKey\n }\n };\n }\n\n return Object.values(sources).map(function (items, index) {\n return {\n sourceId: \"hits\".concat(index),\n onSelect: function onSelect(_ref8) {\n var item = _ref8.item,\n event = _ref8.event;\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n },\n getItemUrl: function getItemUrl(_ref9) {\n var item = _ref9.item;\n return item.url;\n },\n getItems: function getItems() {\n return Object.values(groupBy(items, function (item) {\n return item.hierarchy.lvl1;\n }, maxResultsPerGroup)).map(transformItems).map(function (groupedHits) {\n return groupedHits.map(function (item) {\n var parent = null;\n var potentialParent = groupedHits.find(function (siblingItem) {\n return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1;\n });\n\n if (item.type !== 'lvl1' && potentialParent) {\n parent = potentialParent;\n }\n\n return _objectSpread(_objectSpread({}, item), {}, {\n __docsearch_parent: parent\n }, insightsParams);\n });\n }).flat();\n }\n };\n });\n });\n }\n });\n }, [indexName, searchParameters, maxResultsPerGroup, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization, insights, appId, apiKey]);\n var getEnvironmentProps = autocomplete.getEnvironmentProps,\n getRootProps = autocomplete.getRootProps,\n refresh = autocomplete.refresh;\n useTouchEvents({\n getEnvironmentProps: getEnvironmentProps,\n panelElement: dropdownRef.current,\n formElement: formElementRef.current,\n inputElement: inputRef.current\n });\n useTrapFocus({\n container: containerRef.current\n });\n React.useEffect(function () {\n document.body.classList.add('DocSearch--active');\n return function () {\n var _window$scrollTo, _window;\n\n document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists\n // first.\n\n (_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 ? void 0 : _window$scrollTo.call(_window, 0, initialScrollY);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n var isMobileMediaQuery = window.matchMedia('(max-width: 768px)');\n\n if (isMobileMediaQuery.matches) {\n snippetLength.current = 5;\n }\n }, []);\n React.useEffect(function () {\n if (dropdownRef.current) {\n dropdownRef.current.scrollTop = 0;\n }\n }, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection\n // Search) because users rather want to see the results directly, without the\n // keyboard appearing.\n // We therefore need to refresh the autocomplete instance to load all the\n // results, which is usually triggered on focus.\n\n React.useEffect(function () {\n if (initialQuery.length > 0) {\n refresh();\n\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n }, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height\n // because all mobile browsers don't compute their height the same way.\n // See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/\n\n React.useEffect(function () {\n function setFullViewportHeight() {\n if (modalRef.current) {\n var vh = window.innerHeight * 0.01;\n modalRef.current.style.setProperty('--docsearch-vh', \"\".concat(vh, \"px\"));\n }\n }\n\n setFullViewportHeight();\n window.addEventListener('resize', setFullViewportHeight);\n return function () {\n window.removeEventListener('resize', setFullViewportHeight);\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: containerRef\n }, getRootProps({\n 'aria-expanded': true\n }), {\n className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '),\n role: \"button\",\n tabIndex: 0,\n onMouseDown: function onMouseDown(event) {\n if (event.target === event.currentTarget) {\n onClose();\n }\n }\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Modal\",\n ref: modalRef\n }, /*#__PURE__*/React.createElement(\"header\", {\n className: \"DocSearch-SearchBar\",\n ref: formElementRef\n }, /*#__PURE__*/React.createElement(SearchBox, _extends({}, autocomplete, {\n state: state,\n autoFocus: initialQuery.length === 0,\n inputRef: inputRef,\n isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection,\n translations: searchBoxTranslations,\n onClose: onClose\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"DocSearch-Dropdown\",\n ref: dropdownRef\n }, /*#__PURE__*/React.createElement(ScreenState, _extends({}, autocomplete, {\n indexName: indexName,\n state: state,\n hitComponent: hitComponent,\n resultsFooterComponent: resultsFooterComponent,\n disableUserPersonalization: disableUserPersonalization,\n recentSearches: recentSearches,\n favoriteSearches: favoriteSearches,\n inputRef: inputRef,\n translations: screenStateTranslations,\n getMissingResultsUrl: getMissingResultsUrl,\n onItemClick: function onItemClick(item, event) {\n // If insights is active, send insights click event\n sendItemClickEvent(item);\n saveRecentSearch(item);\n\n if (!isModifierEvent(event)) {\n onClose();\n }\n }\n }))), /*#__PURE__*/React.createElement(\"footer\", {\n className: \"DocSearch-Footer\"\n }, /*#__PURE__*/React.createElement(Footer, {\n translations: footerTranslations\n }))));\n}","import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';\nimport React from 'react';\nimport { version } from './version';\nexport function useSearchClient(appId, apiKey, transformSearchClient) {\n var searchClient = React.useMemo(function () {\n var client = algoliasearch(appId, apiKey);\n client.addAlgoliaAgent('docsearch', version); // Since DocSearch.js relies on DocSearch React with an alias to Preact,\n // we cannot add the `docsearch-react` user agent by default, otherwise\n // it would also be sent on a DocSearch.js integration.\n // We therefore only add the `docsearch-react` user agent if `docsearch.js`\n // is not present.\n\n if (/docsearch.js \\(.*\\)/.test(client.transporter.userAgent.value) === false) {\n client.addAlgoliaAgent('docsearch-react', version);\n }\n\n return transformSearchClient(client);\n }, [appId, apiKey, transformSearchClient]);\n return searchClient;\n}","import React from 'react';\nexport function useTouchEvents(_ref) {\n var getEnvironmentProps = _ref.getEnvironmentProps,\n panelElement = _ref.panelElement,\n formElement = _ref.formElement,\n inputElement = _ref.inputElement;\n React.useEffect(function () {\n if (!(panelElement && formElement && inputElement)) {\n return undefined;\n }\n\n var _getEnvironmentProps = getEnvironmentProps({\n panelElement: panelElement,\n formElement: formElement,\n inputElement: inputElement\n }),\n onTouchStart = _getEnvironmentProps.onTouchStart,\n onTouchMove = _getEnvironmentProps.onTouchMove;\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchmove', onTouchMove);\n return function () {\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchmove', onTouchMove);\n };\n }, [getEnvironmentProps, panelElement, formElement, inputElement]);\n}","import React from 'react';\nexport function useTrapFocus(_ref) {\n var container = _ref.container;\n React.useEffect(function () {\n if (!container) {\n return undefined;\n }\n\n var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])');\n var firstElement = focusableElements[0];\n var lastElement = focusableElements[focusableElements.length - 1];\n\n function trapFocus(event) {\n if (event.key !== 'Tab') {\n return;\n }\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n } else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n }\n\n container.addEventListener('keydown', trapFocus);\n return function () {\n container.removeEventListener('keydown', trapFocus);\n };\n }, [container]);\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport React from 'react';\nimport { createPortal } from 'react-dom';\nimport { DocSearchButton } from './DocSearchButton';\nimport { DocSearchModal } from './DocSearchModal';\nimport { useDocSearchKeyboardEvents } from './useDocSearchKeyboardEvents';\nexport function DocSearch(props) {\n var _props$translations, _props$translations2;\n\n var searchButtonRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isOpen = _React$useState2[0],\n setIsOpen = _React$useState2[1];\n\n var _React$useState3 = React.useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n initialQuery = _React$useState4[0],\n setInitialQuery = _React$useState4[1];\n\n var onOpen = React.useCallback(function () {\n setIsOpen(true);\n }, [setIsOpen]);\n var onClose = React.useCallback(function () {\n setIsOpen(false);\n }, [setIsOpen]);\n var onInput = React.useCallback(function (event) {\n setIsOpen(true);\n setInitialQuery(event.key);\n }, [setIsOpen, setInitialQuery]);\n useDocSearchKeyboardEvents({\n isOpen: isOpen,\n onOpen: onOpen,\n onClose: onClose,\n onInput: onInput,\n searchButtonRef: searchButtonRef\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButton, {\n ref: searchButtonRef,\n translations: props === null || props === void 0 || (_props$translations = props.translations) === null || _props$translations === void 0 ? void 0 : _props$translations.button,\n onClick: onOpen\n }), isOpen && createPortal( /*#__PURE__*/React.createElement(DocSearchModal, _extends({}, props, {\n initialScrollY: window.scrollY,\n initialQuery: initialQuery,\n translations: props === null || props === void 0 || (_props$translations2 = props.translations) === null || _props$translations2 === void 0 ? void 0 : _props$translations2.modal,\n onClose: onClose\n })), document.body));\n}","import React from 'react';\n\nfunction isEditingContent(event) {\n var element = event.target;\n var tagName = element.tagName;\n return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA';\n}\n\nexport function useDocSearchKeyboardEvents(_ref) {\n var isOpen = _ref.isOpen,\n onOpen = _ref.onOpen,\n onClose = _ref.onClose,\n onInput = _ref.onInput,\n searchButtonRef = _ref.searchButtonRef;\n React.useEffect(function () {\n function onKeyDown(event) {\n var _event$key;\n\n function open() {\n // We check that no other DocSearch modal is showing before opening\n // another one.\n if (!document.body.classList.contains('DocSearch--active')) {\n onOpen();\n }\n }\n\n if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal.\n // We need to check for `event.key` because it can be `undefined` with\n // Chrome's autofill feature.\n // See https://github.com/paperjs/paper.js/issues/1398\n ((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's\n // a character.\n !isEditingContent(event) && event.key === '/' && !isOpen) {\n event.preventDefault();\n\n if (isOpen) {\n onClose();\n } else if (!document.body.classList.contains('DocSearch--active')) {\n open();\n }\n }\n\n if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) {\n if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) {\n onInput(event);\n }\n }\n }\n\n window.addEventListener('keydown', onKeyDown);\n return function () {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [isOpen, onOpen, onClose, onInput, searchButtonRef]);\n}","import type { DocSearchProps as DocSearchComponentProps } from '@docsearch/react';\nimport { DocSearch, version } from '@docsearch/react';\nimport React, { render } from 'preact/compat';\n\nfunction getHTMLElement(\n value: HTMLElement | string,\n environment: DocSearchProps['environment'] = window\n): HTMLElement {\n if (typeof value === 'string') {\n return environment.document.querySelector(value)!;\n }\n\n return value;\n}\n\ninterface DocSearchProps extends DocSearchComponentProps {\n container: HTMLElement | string;\n environment?: typeof window;\n}\n\nexport function docsearch(props: DocSearchProps) {\n render(\n {\n searchClient.addAlgoliaAgent('docsearch.js', version);\n\n return props.transformSearchClient\n ? props.transformSearchClient(searchClient)\n : searchClient;\n }}\n />,\n getHTMLElement(props.container, props.environment)\n );\n}\n"],"names":["EMPTY_OBJ","EMPTY_ARR","IS_NON_DIMENSIONAL","currentIndex","currentComponent","prevRaf","currentHook","afterPaintEffects","oldBeforeDiff","options","oldBeforeRender","oldAfterDiff","diffed","oldCommit","oldBeforeUnmount","unmount","getHookState","index","type","hooks","__","__h","length","push","useState","initialState","useReducer","invokeOrReturn","reducer","init","hookState","_reducer","n","nextValue","action","setState","useEffect","callback","args","state","argsChanged","useLayoutEffect","useMemo","factory","flushAfterPaintEffects","forEach","t","component","invokeCleanup","invokeEffect","e","vnode","c","requestAnimationFrame","raf","done","clearTimeout","timeout","HAS_RAF","cancelAnimationFrame","setTimeout","commitQueue","some","filter","cb","hook","comp","oldArgs","newArgs","arg","f","assign","obj","props","i","shallowDiffers","a","b","initialValue","current","ref","createHandle","concat","context","provider","sub","value","formatter","useDebugValue","ControlKeyIcon","React","createElement","width","height","className","d","strokeWidth","stroke","fill","strokeLinecap","SearchIcon","viewBox","fillRule","strokeLinejoin","_excluded","_extends","Object","target","arguments","source","key","prototype","hasOwnProperty","call","apply","this","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","err","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ACTION_KEY_DEFAULT","DocSearchButton","forwardRef","_ref","_ref$translations","translations","_translations$buttonT","buttonText","_translations$buttonA","buttonAriaLabel","_useState2","setKey","navigator","platform","Fragment","debounce","fn","time","timerId","undefined","_len","_key","flatten","values","reduce","autocompleteId","getItemsCount","collections","sum","collection","items","isPrimitive","isEqual","first","second","_Object$keys","noop","userAgents","segment","version","createClickedEvent","item","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_x","_r","return","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","ownKeys","object","enumerableOnly","symbols","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","map","param","_ref2","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","_getOptions","_ref8","onSelect","_ref9","onActive","getOptions","providedInsightsClient","insightsClient","onSelectEvent","onActiveEvent","window","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","async","src","onerror","console","error","body","appendChild","cause","loadInsights","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","createInternalCancelablePromise","promise","then","onfulfilled","onrejected","createCallback","catch","finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getActiveItem","collectionIndex","collectionsCount","activeItemId","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","getItemInputValue","itemUrl","getItemUrl","regex","createStore","onStoreStateChange","list","getState","dispatch","prevState","pendingRequests","add","cancelablePromise","cancelAll","isEmpty","getDefaultProps","pluginSubscribers","_props$id","plugins","debug","openOnFocus","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","sources","id","query","completion","status","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","Boolean","seenSourceIds","resolve","maybeSource","sourceId","includes","Error","JSON","stringify","defaultSource","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigate","location","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","every","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","_request","getItems","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","_excluded3","_excluded4","_excluded5","_excluded6","_excluded7","getPropGetters","getAutocompleteId","instanceId","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","contextNode","parent","child","contains","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","getLabelProps","sourceIndex","htmlFor","getInputProps","_props$environment$na","onFocus","_ref2$maxLength","maxLength","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","enterKeyHint","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","_onKeyDown","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","stateReducer","_nextState","createAutocomplete","subscribers","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","insightsParams","_plugin$subscribe","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","AlgoliaLogo","_translations$searchB","searchByText","href","hostname","rel","xmlns","y","rx","ry","CommandIcon","ariaLabel","children","Footer","_translations$selectT","selectText","_translations$selectK","selectKeyAriaLabel","_translations$navigat","navigateText","_translations$navigat2","navigateUpKeyAriaLabel","_translations$navigat3","navigateDownKeyAriaLabel","_translations$closeTe","closeText","_translations$closeKe","closeKeyAriaLabel","Hit","url","LoadingIcon","strokeOpacity","cx","cy","r","attributeName","to","dur","repeatCount","RecentIcon","ResetIcon","SelectIcon","LvlIcon","SourceIcon","ContentIcon","AnchorIcon","StarIcon","ErrorIcon","NoResultsIcon","ErrorScreen","_translations$titleTe","titleText","_translations$helpTex","helpText","NoResultsScreen","_translations$noResul","noResultsText","_translations$suggest","suggestedQueryText","_translations$reportM","reportMissingResultsText","_translations$reportM2","reportMissingResultsLinkText","searchSuggestions","search","toLowerCase","inputRef","getMissingResultsUrl","getPropertyByPath","path","prev","Snippet","attribute","_ref$tagName","tagName","dangerouslySetInnerHTML","__html","Results","title","Result","join","renderIcon","renderAction","onItemClick","hitComponent","_React$useState2","isDeleting","setIsDeleting","_React$useState4","isFavoriting","setIsFavoriting","useRef","__docsearch_parent","onTransitionEnd","hierarchy","runDeleteTransition","runFavoriteTransition","groupBy","predicate","maxResultsPerGroup","identity","isModifierEvent","button","regexHighlightTags","regexHasHighlightTags","RegExp","removeHighlightTags","_internalDocSearchHit","_hit$_highlightResult","internalDocSearchHit","lvl0","replace","ResultsScreen","_collection$items","resultsFooterComponent","StartScreen","_translations$recentS","recentSearchesTitle","_translations$noRecen","noRecentSearchesText","_translations$saveRec","saveRecentSearchButtonTitle","_translations$removeR","removeRecentSearchButtonTitle","_translations$favorit","favoriteSearchesTitle","_translations$removeF","removeFavoriteSearchButtonTitle","hasCollections","disableUserPersonalization","stopPropagation","favoriteSearches","recentSearches","remove","ScreenState","memo","errorScreen","noResultsScreen","startScreen","_prevProps","nextProps","SearchBox","_translations$resetBu","resetButtonTitle","_translations$resetBu2","resetButtonAriaLabel","_translations$cancelB","cancelButtonText","_translations$cancelB2","cancelButtonAriaLabel","isFromSelection","select","hidden","onClose","createStorage","localStorage","setItem","removeItem","isLocalStorageSupported","getItem","parse","createStoredSearches","_ref$limit","limit","storage","_snippetResult","isQueryAlreadySaved","splice","unshift","getAll","createBrowserLocalStorageCache","namespaceKey","getStorage","getNamespace","setNamespace","namespace","removeOutdatedCacheItems","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","fromEntries","entries","timestamp","filteredNamespaceWithoutExpiredItems","cacheItem","currentTimestamp","Date","getTime","get","defaultValue","events","miss","keyAsString","exists","set","delete","clear","createFallbackableCache","caches","shift","createInMemoryCache","serializable","cache","shuffle","array","Math","floor","random","addMethods","base","methods","encode","format","encodeURIComponent","AuthMode","WithinQueryParameters","WithinHeaders","createMappedRequestOptions","requestOptions","data","queryParameters","cacheable","CallEnum","Read","Write","Any","HostStatusEnum","EXPIRATION_DELAY","createStatefulHost","host","lastUpdate","now","createStatelessHost","protocol","accept","MethodEnum","createRetryableOptions","hostsCache","statelessHosts","statelessHost","statefulHosts","hostsUp","isStatefulHostUp","hostsTimeouted","isStatefulHostTimeouted","hostsAvailable","getTimeout","timeoutsCount","baseTimeout","retryableRequest","transporter","stackTrace","serializeData","serializedHeaders","header","serializeHeaders","dataQueryParameters","retry","hosts","pop","message","transporterStackTrace","stackTraceWithoutCredentials","serializeUrl","connectTimeout","timeouts","connect","responseTimeout","pushToStackTrace","stackFrame","triesLeft","decisions","onSuccess","createDeserializationError","deserializeSuccess","onRetry","isTimedOut","logger","info","stackFrameWithoutCredentials","onFail","createApiError","deserializeFailure","requester","send","outcomes","isNetworkError","isRetryable","retryDecision","reverse","createUserAgent","addedUserAgent","queryParametersAsString","serializeQueryParameters","charAt","substr","parameters","modifiedHeaders","createSearchClient","auth","authMode","credentials","createAuth","requestsCache","responsesCache","read","mappedRequestOptions","createRetryableRequest","reject","write","createTransporter","addAlgoliaAgent","clearCache","customRequest","initIndex","searchIndex","multipleQueries","multipleSearchForFacetValues","facetName","facetQuery","searchForFacetValues","findAnswers","queryLanguages","LogLevelEnum","algoliasearch","logLevel","commonOptions","baseRequester","XMLHttpRequest","setRequestHeader","createTimeout","abort","onreadystatechange","readyState","OPENED","responseText","onload","DocSearchModal","_ref$placeholder","searchParameters","_ref$onClose","_ref$transformItems","transformItems","_ref$hitComponent","_ref$resultsFooterCom","_ref$initialScrollY","initialScrollY","_ref$transformSearchC","transformSearchClient","_ref$disableUserPerso","_ref$initialQuery","initialQuery","initialQueryFromProp","_ref$insights","footerTranslations","footer","searchBoxTranslations","searchBox","screenStateTranslations","containerRef","modalRef","formElementRef","dropdownRef","snippetLength","initialQueryFromSelection","getSelection","client","useSearchClient","saveRecentSearch","useCallback","sendItemClickEvent","insightsItem","insightsClickParams","autocomplete","sourcesState","insightsActive","attributesToRetrieve","attributesToSnippet","snippetEllipsisText","highlightPreTag","highlightPostTag","hitsPerPage","firstResult","nbHits","lvl1","groupedHits","potentialParent","siblingItem","flat","_getEnvironmentProps","addEventListener","removeEventListener","useTouchEvents","focusableElements","querySelectorAll","firstElement","lastElement","trapFocus","useTrapFocus","classList","_window$scrollTo","_window","scrollTo","matchMedia","scrollTop","setFullViewportHeight","vh","innerHeight","style","setProperty","tabIndex","DocSearch","_props$translations","_props$translations2","searchButtonRef","setInitialQuery","onOpen","_event$key","keyCode","element","isContentEditable","isEditingContent","fromCharCode","useDocSearchKeyboardEvents","createPortal","scrollY","modal","render","getHTMLElement"],"mappings":";g+FAAaA,EAAY,GACZC,EAAY,GACZC,EAAqB,6+RCClC,IAAIC,EAGAC,EAsBAC,EAZAC,EAAc,EA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,OAAO8sB,QACvB1E,aAAcA,EACdhyB,aAAcvF,MAAAA,GAAsF,QAA/Cq7B,EAAuBr7B,EAAMuF,oBAAmD,IAAzB81B,OAAkC,EAASA,EAAqBa,MAC5KhR,QAASA,KACNvb,SAASM,cExCT,SAAmBjQ,GACxBm8B,GACEl7B,iBAACk6B,QACKn7B,GACJo3B,sBAAuB,SAAClf,UACtBA,EAAa6c,gBAAgB,eAAgBttB,IAEtCzH,EAAMo3B,sBACTp3B,EAAMo3B,sBAAsBlf,GAC5BA,MAzBZ,SACErX,OACA2O,yDAA6CL,aAExB,iBAAVtO,EACF2O,EAAYG,SAAS2R,cAA2BzgB,GAGlDA,EAoBLu7B,CAAep8B,EAAMmY,UAAWnY,EAAMwP"} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/js/package.json b/paperai-docs/node_modules/@docsearch/js/package.json new file mode 100644 index 00000000..c467ae10 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/js/package.json @@ -0,0 +1,36 @@ +{ + "name": "@docsearch/js", + "description": "JavaScript package for DocSearch, the best search experience for docs.", + "version": "3.5.2", + "license": "MIT", + "homepage": "https://docsearch.algolia.com", + "repository": "algolia/docsearch", + "author": { + "name": "Algolia, Inc.", + "url": "https://www.algolia.com" + }, + "sideEffects": false, + "files": [ + "dist/" + ], + "source": "src/index.ts", + "types": "dist/esm/index.d.ts", + "module": "dist/esm/index.js", + "main": "dist/umd/index.js", + "umd:main": "dist/umd/index.js", + "unpkg": "dist/umd/index.js", + "jsdelivr": "dist/umd/index.js", + "scripts": { + "build:clean": "rm -rf ./dist", + "build:esm": "cross-env BUILD=esm rollup --config", + "build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm", + "build:umd": "cross-env BUILD=umd rollup --config", + "build": "yarn build:clean && yarn build:umd && yarn build:esm && yarn build:types", + "on:change": "concurrently \"yarn build:esm\" \"yarn build:types\"", + "watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\"" + }, + "dependencies": { + "@docsearch/react": "3.5.2", + "preact": "^10.0.0" + } +} diff --git a/paperai-docs/node_modules/@docsearch/react/README.md b/paperai-docs/node_modules/@docsearch/react/README.md new file mode 100644 index 00000000..b13eb61a --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/README.md @@ -0,0 +1,43 @@ +# @docsearch/react + +React package for [DocSearch](http://docsearch.algolia.com/), the best search experience for docs. + +## Installation + +```bash +yarn add @docsearch/react@3 +# or +npm install @docsearch/react@3 +``` + +If you don’t want to use a package manager, you can use a standalone endpoint: + +```html + +``` + +## Get started + +DocSearch generates a fully accessible search box for you. + +```jsx App.js +import { DocSearch } from '@docsearch/react'; + +import '@docsearch/css'; + +function App() { + return ( + + ); +} + +export default App; +``` + +## Documentation + +[Read documentation →](https://docsearch.algolia.com/docs/DocSearch-v3) diff --git a/paperai-docs/node_modules/@docsearch/react/button.js b/paperai-docs/node_modules/@docsearch/react/button.js new file mode 100644 index 00000000..5614c2a7 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/button.js @@ -0,0 +1 @@ +export { DocSearchButton } from './dist/esm/DocSearchButton.js'; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.d.ts new file mode 100644 index 00000000..9c089702 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.d.ts @@ -0,0 +1,8 @@ +declare type AlgoliaLogoTranslations = Partial<{ + searchByText: string; +}>; +declare type AlgoliaLogoProps = { + translations?: AlgoliaLogoTranslations; +}; +export declare function AlgoliaLogo({ translations }: AlgoliaLogoProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js new file mode 100644 index 00000000..893c0e0d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/AlgoliaLogo.js @@ -0,0 +1,54 @@ +import React from 'react'; +export function AlgoliaLogo(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations; + var _translations$searchB = translations.searchByText, + searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB; + return /*#__PURE__*/React.createElement("a", { + href: "https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname, "&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"), + target: "_blank", + rel: "noopener noreferrer" + }, /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Label" + }, searchByText), /*#__PURE__*/React.createElement("svg", { + width: "77", + height: "19", + "aria-label": "Algolia", + role: "img", + id: "Layer_1", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 2196.2 500" + }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("style", null, ".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z" + }), /*#__PURE__*/React.createElement("rect", { + className: "cls-1", + x: "1845.88", + y: "104.73", + width: "62.58", + height: "277.9", + rx: "5.9", + ry: "5.9" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-2", + d: "M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z" + }), /*#__PURE__*/React.createElement("path", { + className: "cls-1", + d: "M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z" + }))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.d.ts new file mode 100644 index 00000000..7cacc5a9 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.d.ts @@ -0,0 +1,36 @@ +import type { AutocompleteState, AutocompleteOptions } from '@algolia/autocomplete-core'; +import type { SearchOptions } from '@algolia/client-search'; +import type { SearchClient } from 'algoliasearch/lite'; +import React from 'react'; +import type { DocSearchHit, InternalDocSearchHit, StoredDocSearchHit } from './types'; +import type { ButtonTranslations, ModalTranslations } from '.'; +export declare type DocSearchTranslations = Partial<{ + button: ButtonTranslations; + modal: ModalTranslations; +}>; +export interface DocSearchProps { + appId: string; + apiKey: string; + indexName: string; + placeholder?: string; + searchParameters?: SearchOptions; + maxResultsPerGroup?: number; + transformItems?: (items: DocSearchHit[]) => DocSearchHit[]; + hitComponent?: (props: { + hit: InternalDocSearchHit | StoredDocSearchHit; + children: React.ReactNode; + }) => JSX.Element; + resultsFooterComponent?: (props: { + state: AutocompleteState; + }) => JSX.Element | null; + transformSearchClient?: (searchClient: SearchClient) => SearchClient; + disableUserPersonalization?: boolean; + initialQuery?: string; + navigator?: AutocompleteOptions['navigator']; + translations?: DocSearchTranslations; + getMissingResultsUrl?: ({ query }: { + query: string; + }) => string; + insights?: AutocompleteOptions['insights']; +} +export declare function DocSearch(props: DocSearchProps): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.js new file mode 100644 index 00000000..5a859f33 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearch.js @@ -0,0 +1,62 @@ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +import React from 'react'; +import { createPortal } from 'react-dom'; +import { DocSearchButton } from './DocSearchButton'; +import { DocSearchModal } from './DocSearchModal'; +import { useDocSearchKeyboardEvents } from './useDocSearchKeyboardEvents'; +export function DocSearch(props) { + var _props$translations, _props$translations2; + + var searchButtonRef = React.useRef(null); + + var _React$useState = React.useState(false), + _React$useState2 = _slicedToArray(_React$useState, 2), + isOpen = _React$useState2[0], + setIsOpen = _React$useState2[1]; + + var _React$useState3 = React.useState((props === null || props === void 0 ? void 0 : props.initialQuery) || undefined), + _React$useState4 = _slicedToArray(_React$useState3, 2), + initialQuery = _React$useState4[0], + setInitialQuery = _React$useState4[1]; + + var onOpen = React.useCallback(function () { + setIsOpen(true); + }, [setIsOpen]); + var onClose = React.useCallback(function () { + setIsOpen(false); + }, [setIsOpen]); + var onInput = React.useCallback(function (event) { + setIsOpen(true); + setInitialQuery(event.key); + }, [setIsOpen, setInitialQuery]); + useDocSearchKeyboardEvents({ + isOpen: isOpen, + onOpen: onOpen, + onClose: onClose, + onInput: onInput, + searchButtonRef: searchButtonRef + }); + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DocSearchButton, { + ref: searchButtonRef, + translations: props === null || props === void 0 || (_props$translations = props.translations) === null || _props$translations === void 0 ? void 0 : _props$translations.button, + onClick: onOpen + }), isOpen && createPortal( /*#__PURE__*/React.createElement(DocSearchModal, _extends({}, props, { + initialScrollY: window.scrollY, + initialQuery: initialQuery, + translations: props === null || props === void 0 || (_props$translations2 = props.translations) === null || _props$translations2 === void 0 ? void 0 : _props$translations2.modal, + onClose: onClose + })), document.body)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.d.ts new file mode 100644 index 00000000..25f088cc --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.d.ts @@ -0,0 +1,9 @@ +import React from 'react'; +export declare type ButtonTranslations = Partial<{ + buttonText: string; + buttonAriaLabel: string; +}>; +export declare type DocSearchButtonProps = React.ComponentProps<'button'> & { + translations?: ButtonTranslations; +}; +export declare const DocSearchButton: React.ForwardRefExoticComponent> & React.RefAttributes>; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.js new file mode 100644 index 00000000..80fd46d6 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchButton.js @@ -0,0 +1,68 @@ +var _excluded = ["translations"]; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import React, { useEffect, useState } from 'react'; +import { ControlKeyIcon } from './icons/ControlKeyIcon'; +import { SearchIcon } from './icons/SearchIcon'; +var ACTION_KEY_DEFAULT = 'Ctrl'; +var ACTION_KEY_APPLE = '⌘'; + +function isAppleDevice() { + return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform); +} + +export var DocSearchButton = React.forwardRef(function (_ref, ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + props = _objectWithoutProperties(_ref, _excluded); + + var _translations$buttonT = translations.buttonText, + buttonText = _translations$buttonT === void 0 ? 'Search' : _translations$buttonT, + _translations$buttonA = translations.buttonAriaLabel, + buttonAriaLabel = _translations$buttonA === void 0 ? 'Search' : _translations$buttonA; + + var _useState = useState(null), + _useState2 = _slicedToArray(_useState, 2), + key = _useState2[0], + setKey = _useState2[1]; + + useEffect(function () { + if (typeof navigator !== 'undefined') { + isAppleDevice() ? setKey(ACTION_KEY_APPLE) : setKey(ACTION_KEY_DEFAULT); + } + }, []); + return /*#__PURE__*/React.createElement("button", _extends({ + type: "button", + className: "DocSearch DocSearch-Button", + "aria-label": buttonAriaLabel + }, props, { + ref: ref + }), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Button-Container" + }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Button-Placeholder" + }, buttonText)), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Button-Keys" + }, key !== null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Button-Key" + }, key === ACTION_KEY_DEFAULT ? /*#__PURE__*/React.createElement(ControlKeyIcon, null) : key), /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Button-Key" + }, "K")))); +}); \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.d.ts new file mode 100644 index 00000000..79be69c7 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.d.ts @@ -0,0 +1,14 @@ +import type { DocSearchProps } from './DocSearch'; +import type { FooterTranslations } from './Footer'; +import type { ScreenStateTranslations } from './ScreenState'; +import type { SearchBoxTranslations } from './SearchBox'; +export declare type ModalTranslations = Partial<{ + searchBox: SearchBoxTranslations; + footer: FooterTranslations; +}> & ScreenStateTranslations; +export declare type DocSearchModalProps = DocSearchProps & { + initialScrollY: number; + onClose?: () => void; + translations?: ModalTranslations; +}; +export declare function DocSearchModal({ appId, apiKey, indexName, placeholder, searchParameters, maxResultsPerGroup, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, }: DocSearchModalProps): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.js new file mode 100644 index 00000000..6e4167f8 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/DocSearchModal.js @@ -0,0 +1,418 @@ +var _excluded = ["footer", "searchBox"]; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import { createAutocomplete } from '@algolia/autocomplete-core'; +import React from 'react'; +import { MAX_QUERY_SIZE } from './constants'; +import { Footer } from './Footer'; +import { Hit } from './Hit'; +import { ScreenState } from './ScreenState'; +import { SearchBox } from './SearchBox'; +import { createStoredSearches } from './stored-searches'; +import { useSearchClient } from './useSearchClient'; +import { useTouchEvents } from './useTouchEvents'; +import { useTrapFocus } from './useTrapFocus'; +import { groupBy, identity, noop, removeHighlightTags, isModifierEvent } from './utils'; +export function DocSearchModal(_ref) { + var appId = _ref.appId, + apiKey = _ref.apiKey, + indexName = _ref.indexName, + _ref$placeholder = _ref.placeholder, + placeholder = _ref$placeholder === void 0 ? 'Search docs' : _ref$placeholder, + searchParameters = _ref.searchParameters, + maxResultsPerGroup = _ref.maxResultsPerGroup, + _ref$onClose = _ref.onClose, + onClose = _ref$onClose === void 0 ? noop : _ref$onClose, + _ref$transformItems = _ref.transformItems, + transformItems = _ref$transformItems === void 0 ? identity : _ref$transformItems, + _ref$hitComponent = _ref.hitComponent, + hitComponent = _ref$hitComponent === void 0 ? Hit : _ref$hitComponent, + _ref$resultsFooterCom = _ref.resultsFooterComponent, + resultsFooterComponent = _ref$resultsFooterCom === void 0 ? function () { + return null; + } : _ref$resultsFooterCom, + navigator = _ref.navigator, + _ref$initialScrollY = _ref.initialScrollY, + initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY, + _ref$transformSearchC = _ref.transformSearchClient, + transformSearchClient = _ref$transformSearchC === void 0 ? identity : _ref$transformSearchC, + _ref$disableUserPerso = _ref.disableUserPersonalization, + disableUserPersonalization = _ref$disableUserPerso === void 0 ? false : _ref$disableUserPerso, + _ref$initialQuery = _ref.initialQuery, + initialQueryFromProp = _ref$initialQuery === void 0 ? '' : _ref$initialQuery, + _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + getMissingResultsUrl = _ref.getMissingResultsUrl, + _ref$insights = _ref.insights, + insights = _ref$insights === void 0 ? false : _ref$insights; + + var footerTranslations = translations.footer, + searchBoxTranslations = translations.searchBox, + screenStateTranslations = _objectWithoutProperties(translations, _excluded); + + var _React$useState = React.useState({ + query: '', + collections: [], + completion: null, + context: {}, + isOpen: false, + activeItemId: null, + status: 'idle' + }), + _React$useState2 = _slicedToArray(_React$useState, 2), + state = _React$useState2[0], + setState = _React$useState2[1]; + + var containerRef = React.useRef(null); + var modalRef = React.useRef(null); + var formElementRef = React.useRef(null); + var dropdownRef = React.useRef(null); + var inputRef = React.useRef(null); + var snippetLength = React.useRef(10); + var initialQueryFromSelection = React.useRef(typeof window !== 'undefined' ? window.getSelection().toString().slice(0, MAX_QUERY_SIZE) : '').current; + var initialQuery = React.useRef(initialQueryFromProp || initialQueryFromSelection).current; + var searchClient = useSearchClient(appId, apiKey, transformSearchClient); + var favoriteSearches = React.useRef(createStoredSearches({ + key: "__DOCSEARCH_FAVORITE_SEARCHES__".concat(indexName), + limit: 10 + })).current; + var recentSearches = React.useRef(createStoredSearches({ + key: "__DOCSEARCH_RECENT_SEARCHES__".concat(indexName), + // We display 7 recent searches and there's no favorites, but only + // 4 when there are favorites. + limit: favoriteSearches.getAll().length === 0 ? 7 : 4 + })).current; + var saveRecentSearch = React.useCallback(function saveRecentSearch(item) { + if (disableUserPersonalization) { + return; + } // We don't store `content` record, but their parent if available. + + + var search = item.type === 'content' ? item.__docsearch_parent : item; // We save the recent search only if it's not favorited. + + if (search && favoriteSearches.getAll().findIndex(function (x) { + return x.objectID === search.objectID; + }) === -1) { + recentSearches.add(search); + } + }, [favoriteSearches, recentSearches, disableUserPersonalization]); + var sendItemClickEvent = React.useCallback(function (item) { + if (!state.context.algoliaInsightsPlugin || !item.__autocomplete_id) return; + var insightsItem = item; + var insightsClickParams = { + eventName: 'Item Selected', + index: insightsItem.__autocomplete_indexName, + items: [insightsItem], + positions: [item.__autocomplete_id], + queryID: insightsItem.__autocomplete_queryID + }; + state.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(insightsClickParams); + }, [state.context.algoliaInsightsPlugin]); + var autocomplete = React.useMemo(function () { + return createAutocomplete({ + id: 'docsearch', + defaultActiveItemId: 0, + placeholder: placeholder, + openOnFocus: true, + initialState: { + query: initialQuery, + context: { + searchSuggestions: [] + } + }, + insights: insights, + navigator: navigator, + onStateChange: function onStateChange(props) { + setState(props.state); + }, + getSources: function getSources(_ref2) { + var query = _ref2.query, + sourcesState = _ref2.state, + setContext = _ref2.setContext, + setStatus = _ref2.setStatus; + + if (!query) { + if (disableUserPersonalization) { + return []; + } + + return [{ + sourceId: 'recentSearches', + onSelect: function onSelect(_ref3) { + var item = _ref3.item, + event = _ref3.event; + saveRecentSearch(item); + + if (!isModifierEvent(event)) { + onClose(); + } + }, + getItemUrl: function getItemUrl(_ref4) { + var item = _ref4.item; + return item.url; + }, + getItems: function getItems() { + return recentSearches.getAll(); + } + }, { + sourceId: 'favoriteSearches', + onSelect: function onSelect(_ref5) { + var item = _ref5.item, + event = _ref5.event; + saveRecentSearch(item); + + if (!isModifierEvent(event)) { + onClose(); + } + }, + getItemUrl: function getItemUrl(_ref6) { + var item = _ref6.item; + return item.url; + }, + getItems: function getItems() { + return favoriteSearches.getAll(); + } + }]; + } + + var insightsActive = Boolean(insights); + return searchClient.search([{ + query: query, + indexName: indexName, + params: _objectSpread({ + attributesToRetrieve: ['hierarchy.lvl0', 'hierarchy.lvl1', 'hierarchy.lvl2', 'hierarchy.lvl3', 'hierarchy.lvl4', 'hierarchy.lvl5', 'hierarchy.lvl6', 'content', 'type', 'url'], + attributesToSnippet: ["hierarchy.lvl1:".concat(snippetLength.current), "hierarchy.lvl2:".concat(snippetLength.current), "hierarchy.lvl3:".concat(snippetLength.current), "hierarchy.lvl4:".concat(snippetLength.current), "hierarchy.lvl5:".concat(snippetLength.current), "hierarchy.lvl6:".concat(snippetLength.current), "content:".concat(snippetLength.current)], + snippetEllipsisText: '…', + highlightPreTag: '', + highlightPostTag: '', + hitsPerPage: 20, + clickAnalytics: insightsActive + }, searchParameters) + }]).catch(function (error) { + // The Algolia `RetryError` happens when all the servers have + // failed, meaning that there's no chance the response comes + // back. This is the right time to display an error. + // See https://github.com/algolia/algoliasearch-client-javascript/blob/2ffddf59bc765cd1b664ee0346b28f00229d6e12/packages/transporter/src/errors/createRetryError.ts#L5 + if (error.name === 'RetryError') { + setStatus('error'); + } + + throw error; + }).then(function (_ref7) { + var results = _ref7.results; + var firstResult = results[0]; + var hits = firstResult.hits, + nbHits = firstResult.nbHits; + var sources = groupBy(hits, function (hit) { + return removeHighlightTags(hit); + }, maxResultsPerGroup); // We store the `lvl0`s to display them as search suggestions + // in the "no results" screen. + + if (sourcesState.context.searchSuggestions.length < Object.keys(sources).length) { + setContext({ + searchSuggestions: Object.keys(sources) + }); + } + + setContext({ + nbHits: nbHits + }); + var insightsParams = {}; + + if (insightsActive) { + insightsParams = { + __autocomplete_indexName: indexName, + __autocomplete_queryID: firstResult.queryID, + __autocomplete_algoliaCredentials: { + appId: appId, + apiKey: apiKey + } + }; + } + + return Object.values(sources).map(function (items, index) { + return { + sourceId: "hits".concat(index), + onSelect: function onSelect(_ref8) { + var item = _ref8.item, + event = _ref8.event; + saveRecentSearch(item); + + if (!isModifierEvent(event)) { + onClose(); + } + }, + getItemUrl: function getItemUrl(_ref9) { + var item = _ref9.item; + return item.url; + }, + getItems: function getItems() { + return Object.values(groupBy(items, function (item) { + return item.hierarchy.lvl1; + }, maxResultsPerGroup)).map(transformItems).map(function (groupedHits) { + return groupedHits.map(function (item) { + var parent = null; + var potentialParent = groupedHits.find(function (siblingItem) { + return siblingItem.type === 'lvl1' && siblingItem.hierarchy.lvl1 === item.hierarchy.lvl1; + }); + + if (item.type !== 'lvl1' && potentialParent) { + parent = potentialParent; + } + + return _objectSpread(_objectSpread({}, item), {}, { + __docsearch_parent: parent + }, insightsParams); + }); + }).flat(); + } + }; + }); + }); + } + }); + }, [indexName, searchParameters, maxResultsPerGroup, searchClient, onClose, recentSearches, favoriteSearches, saveRecentSearch, initialQuery, placeholder, navigator, transformItems, disableUserPersonalization, insights, appId, apiKey]); + var getEnvironmentProps = autocomplete.getEnvironmentProps, + getRootProps = autocomplete.getRootProps, + refresh = autocomplete.refresh; + useTouchEvents({ + getEnvironmentProps: getEnvironmentProps, + panelElement: dropdownRef.current, + formElement: formElementRef.current, + inputElement: inputRef.current + }); + useTrapFocus({ + container: containerRef.current + }); + React.useEffect(function () { + document.body.classList.add('DocSearch--active'); + return function () { + var _window$scrollTo, _window; + + document.body.classList.remove('DocSearch--active'); // IE11 doesn't support `scrollTo` so we check that the method exists + // first. + + (_window$scrollTo = (_window = window).scrollTo) === null || _window$scrollTo === void 0 ? void 0 : _window$scrollTo.call(_window, 0, initialScrollY); + }; // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + React.useEffect(function () { + var isMobileMediaQuery = window.matchMedia('(max-width: 768px)'); + + if (isMobileMediaQuery.matches) { + snippetLength.current = 5; + } + }, []); + React.useEffect(function () { + if (dropdownRef.current) { + dropdownRef.current.scrollTop = 0; + } + }, [state.query]); // We don't focus the input when there's an initial query (i.e. Selection + // Search) because users rather want to see the results directly, without the + // keyboard appearing. + // We therefore need to refresh the autocomplete instance to load all the + // results, which is usually triggered on focus. + + React.useEffect(function () { + if (initialQuery.length > 0) { + refresh(); + + if (inputRef.current) { + inputRef.current.focus(); + } + } + }, [initialQuery, refresh]); // We rely on a CSS property to set the modal height to the full viewport height + // because all mobile browsers don't compute their height the same way. + // See https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ + + React.useEffect(function () { + function setFullViewportHeight() { + if (modalRef.current) { + var vh = window.innerHeight * 0.01; + modalRef.current.style.setProperty('--docsearch-vh', "".concat(vh, "px")); + } + } + + setFullViewportHeight(); + window.addEventListener('resize', setFullViewportHeight); + return function () { + window.removeEventListener('resize', setFullViewportHeight); + }; + }, []); + return /*#__PURE__*/React.createElement("div", _extends({ + ref: containerRef + }, getRootProps({ + 'aria-expanded': true + }), { + className: ['DocSearch', 'DocSearch-Container', state.status === 'stalled' && 'DocSearch-Container--Stalled', state.status === 'error' && 'DocSearch-Container--Errored'].filter(Boolean).join(' '), + role: "button", + tabIndex: 0, + onMouseDown: function onMouseDown(event) { + if (event.target === event.currentTarget) { + onClose(); + } + } + }), /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Modal", + ref: modalRef + }, /*#__PURE__*/React.createElement("header", { + className: "DocSearch-SearchBar", + ref: formElementRef + }, /*#__PURE__*/React.createElement(SearchBox, _extends({}, autocomplete, { + state: state, + autoFocus: initialQuery.length === 0, + inputRef: inputRef, + isFromSelection: Boolean(initialQuery) && initialQuery === initialQueryFromSelection, + translations: searchBoxTranslations, + onClose: onClose + }))), /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Dropdown", + ref: dropdownRef + }, /*#__PURE__*/React.createElement(ScreenState, _extends({}, autocomplete, { + indexName: indexName, + state: state, + hitComponent: hitComponent, + resultsFooterComponent: resultsFooterComponent, + disableUserPersonalization: disableUserPersonalization, + recentSearches: recentSearches, + favoriteSearches: favoriteSearches, + inputRef: inputRef, + translations: screenStateTranslations, + getMissingResultsUrl: getMissingResultsUrl, + onItemClick: function onItemClick(item, event) { + // If insights is active, send insights click event + sendItemClickEvent(item); + saveRecentSearch(item); + + if (!isModifierEvent(event)) { + onClose(); + } + } + }))), /*#__PURE__*/React.createElement("footer", { + className: "DocSearch-Footer" + }, /*#__PURE__*/React.createElement(Footer, { + translations: footerTranslations + })))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.d.ts new file mode 100644 index 00000000..e2cb5145 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.d.ts @@ -0,0 +1,9 @@ +export declare type ErrorScreenTranslations = Partial<{ + titleText: string; + helpText: string; +}>; +declare type ErrorScreenProps = { + translations?: ErrorScreenTranslations; +}; +export declare function ErrorScreen({ translations }: ErrorScreenProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.js new file mode 100644 index 00000000..b8b0920c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ErrorScreen.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { ErrorIcon } from './icons'; +export function ErrorScreen(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations; + var _translations$titleTe = translations.titleText, + titleText = _translations$titleTe === void 0 ? 'Unable to fetch results' : _translations$titleTe, + _translations$helpTex = translations.helpText, + helpText = _translations$helpTex === void 0 ? 'You might want to check your network connection.' : _translations$helpTex; + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-ErrorScreen" + }, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Screen-Icon" + }, /*#__PURE__*/React.createElement(ErrorIcon, null)), /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Title" + }, titleText), /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Help" + }, helpText)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.d.ts new file mode 100644 index 00000000..5f18bdfa --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.d.ts @@ -0,0 +1,15 @@ +export declare type FooterTranslations = Partial<{ + selectText: string; + selectKeyAriaLabel: string; + navigateText: string; + navigateUpKeyAriaLabel: string; + navigateDownKeyAriaLabel: string; + closeText: string; + closeKeyAriaLabel: string; + searchByText: string; +}>; +declare type FooterProps = Partial<{ + translations: FooterTranslations; +}>; +export declare function Footer({ translations }: FooterProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.js new file mode 100644 index 00000000..fee01676 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Footer.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { AlgoliaLogo } from './AlgoliaLogo'; + +function CommandIcon(props) { + return /*#__PURE__*/React.createElement("svg", { + width: "15", + height: "15", + "aria-label": props.ariaLabel, + role: "img" + }, /*#__PURE__*/React.createElement("g", { + fill: "none", + stroke: "currentColor", + strokeLinecap: "round", + strokeLinejoin: "round", + strokeWidth: "1.2" + }, props.children)); +} + +export function Footer(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations; + var _translations$selectT = translations.selectText, + selectText = _translations$selectT === void 0 ? 'to select' : _translations$selectT, + _translations$selectK = translations.selectKeyAriaLabel, + selectKeyAriaLabel = _translations$selectK === void 0 ? 'Enter key' : _translations$selectK, + _translations$navigat = translations.navigateText, + navigateText = _translations$navigat === void 0 ? 'to navigate' : _translations$navigat, + _translations$navigat2 = translations.navigateUpKeyAriaLabel, + navigateUpKeyAriaLabel = _translations$navigat2 === void 0 ? 'Arrow up' : _translations$navigat2, + _translations$navigat3 = translations.navigateDownKeyAriaLabel, + navigateDownKeyAriaLabel = _translations$navigat3 === void 0 ? 'Arrow down' : _translations$navigat3, + _translations$closeTe = translations.closeText, + closeText = _translations$closeTe === void 0 ? 'to close' : _translations$closeTe, + _translations$closeKe = translations.closeKeyAriaLabel, + closeKeyAriaLabel = _translations$closeKe === void 0 ? 'Escape key' : _translations$closeKe, + _translations$searchB = translations.searchByText, + searchByText = _translations$searchB === void 0 ? 'Search by' : _translations$searchB; + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Logo" + }, /*#__PURE__*/React.createElement(AlgoliaLogo, { + translations: { + searchByText: searchByText + } + })), /*#__PURE__*/React.createElement("ul", { + className: "DocSearch-Commands" + }, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Commands-Key" + }, /*#__PURE__*/React.createElement(CommandIcon, { + ariaLabel: selectKeyAriaLabel + }, /*#__PURE__*/React.createElement("path", { + d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3" + }))), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Label" + }, selectText)), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Commands-Key" + }, /*#__PURE__*/React.createElement(CommandIcon, { + ariaLabel: navigateDownKeyAriaLabel + }, /*#__PURE__*/React.createElement("path", { + d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3" + }))), /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Commands-Key" + }, /*#__PURE__*/React.createElement(CommandIcon, { + ariaLabel: navigateUpKeyAriaLabel + }, /*#__PURE__*/React.createElement("path", { + d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3" + }))), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Label" + }, navigateText)), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("kbd", { + className: "DocSearch-Commands-Key" + }, /*#__PURE__*/React.createElement(CommandIcon, { + ariaLabel: closeKeyAriaLabel + }, /*#__PURE__*/React.createElement("path", { + d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956" + }))), /*#__PURE__*/React.createElement("span", { + className: "DocSearch-Label" + }, closeText)))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.d.ts new file mode 100644 index 00000000..b0107363 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.d.ts @@ -0,0 +1,8 @@ +import React from 'react'; +import type { InternalDocSearchHit, StoredDocSearchHit } from './types'; +interface HitProps { + hit: InternalDocSearchHit | StoredDocSearchHit; + children: React.ReactNode; +} +export declare function Hit({ hit, children }: HitProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.js new file mode 100644 index 00000000..00bf82c1 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Hit.js @@ -0,0 +1,8 @@ +import React from 'react'; +export function Hit(_ref) { + var hit = _ref.hit, + children = _ref.children; + return /*#__PURE__*/React.createElement("a", { + href: hit.url + }, children); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.d.ts new file mode 100644 index 00000000..89f84e31 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.d.ts @@ -0,0 +1,13 @@ +import type { ScreenStateProps } from './ScreenState'; +import type { InternalDocSearchHit } from './types'; +export declare type NoResultsScreenTranslations = Partial<{ + noResultsText: string; + suggestedQueryText: string; + reportMissingResultsText: string; + reportMissingResultsLinkText: string; +}>; +declare type NoResultsScreenProps = Omit, 'translations'> & { + translations?: NoResultsScreenTranslations; +}; +export declare function NoResultsScreen({ translations, ...props }: NoResultsScreenProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.js new file mode 100644 index 00000000..1ad1e98c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/NoResultsScreen.js @@ -0,0 +1,67 @@ +var _excluded = ["translations"]; + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import React from 'react'; +import { NoResultsIcon } from './icons'; +export function NoResultsScreen(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + props = _objectWithoutProperties(_ref, _excluded); + + var _translations$noResul = translations.noResultsText, + noResultsText = _translations$noResul === void 0 ? 'No results for' : _translations$noResul, + _translations$suggest = translations.suggestedQueryText, + suggestedQueryText = _translations$suggest === void 0 ? 'Try searching for' : _translations$suggest, + _translations$reportM = translations.reportMissingResultsText, + reportMissingResultsText = _translations$reportM === void 0 ? 'Believe this query should return results?' : _translations$reportM, + _translations$reportM2 = translations.reportMissingResultsLinkText, + reportMissingResultsLinkText = _translations$reportM2 === void 0 ? 'Let us know.' : _translations$reportM2; + var searchSuggestions = props.state.context.searchSuggestions; + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-NoResults" + }, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Screen-Icon" + }, /*#__PURE__*/React.createElement(NoResultsIcon, null)), /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Title" + }, noResultsText, " \"", /*#__PURE__*/React.createElement("strong", null, props.state.query), "\""), searchSuggestions && searchSuggestions.length > 0 && /*#__PURE__*/React.createElement("div", { + className: "DocSearch-NoResults-Prefill-List" + }, /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Help" + }, suggestedQueryText, ":"), /*#__PURE__*/React.createElement("ul", null, searchSuggestions.slice(0, 3).reduce(function (acc, search) { + return [].concat(_toConsumableArray(acc), [/*#__PURE__*/React.createElement("li", { + key: search + }, /*#__PURE__*/React.createElement("button", { + className: "DocSearch-Prefill", + key: search, + type: "button", + onClick: function onClick() { + props.setQuery(search.toLowerCase() + ' '); + props.refresh(); + props.inputRef.current.focus(); + } + }, search))]); + }, []))), props.getMissingResultsUrl && /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Help" + }, "".concat(reportMissingResultsText, " "), /*#__PURE__*/React.createElement("a", { + href: props.getMissingResultsUrl({ + query: props.state.query + }), + target: "_blank", + rel: "noopener noreferrer" + }, reportMissingResultsLinkText))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.d.ts new file mode 100644 index 00000000..119c972a --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.d.ts @@ -0,0 +1,21 @@ +import type { AutocompleteApi, AutocompleteState, BaseItem } from '@algolia/autocomplete-core'; +import React from 'react'; +import type { DocSearchProps } from './DocSearch'; +import type { StoredDocSearchHit } from './types'; +interface ResultsProps extends AutocompleteApi { + title: string; + collection: AutocompleteState['collections'][0]; + renderIcon: (props: { + item: TItem; + index: number; + }) => React.ReactNode; + renderAction: (props: { + item: TItem; + runDeleteTransition: (cb: () => void) => void; + runFavoriteTransition: (cb: () => void) => void; + }) => React.ReactNode; + onItemClick: (item: TItem, event: KeyboardEvent | MouseEvent) => void; + hitComponent: DocSearchProps['hitComponent']; +} +export declare function Results(props: ResultsProps): JSX.Element | null; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.js new file mode 100644 index 00000000..cd156296 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Results.js @@ -0,0 +1,123 @@ +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +import React from 'react'; +import { Snippet } from './Snippet'; +export function Results(props) { + if (!props.collection || props.collection.items.length === 0) { + return null; + } + + return /*#__PURE__*/React.createElement("section", { + className: "DocSearch-Hits" + }, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-source" + }, props.title), /*#__PURE__*/React.createElement("ul", props.getListProps(), props.collection.items.map(function (item, index) { + return /*#__PURE__*/React.createElement(Result, _extends({ + key: [props.title, item.objectID].join(':'), + item: item, + index: index + }, props)); + }))); +} + +function Result(_ref) { + var item = _ref.item, + index = _ref.index, + renderIcon = _ref.renderIcon, + renderAction = _ref.renderAction, + getItemProps = _ref.getItemProps, + onItemClick = _ref.onItemClick, + collection = _ref.collection, + hitComponent = _ref.hitComponent; + + var _React$useState = React.useState(false), + _React$useState2 = _slicedToArray(_React$useState, 2), + isDeleting = _React$useState2[0], + setIsDeleting = _React$useState2[1]; + + var _React$useState3 = React.useState(false), + _React$useState4 = _slicedToArray(_React$useState3, 2), + isFavoriting = _React$useState4[0], + setIsFavoriting = _React$useState4[1]; + + var action = React.useRef(null); + var Hit = hitComponent; + + function runDeleteTransition(cb) { + setIsDeleting(true); + action.current = cb; + } + + function runFavoriteTransition(cb) { + setIsFavoriting(true); + action.current = cb; + } + + return /*#__PURE__*/React.createElement("li", _extends({ + className: ['DocSearch-Hit', item.__docsearch_parent && 'DocSearch-Hit--Child', isDeleting && 'DocSearch-Hit--deleting', isFavoriting && 'DocSearch-Hit--favoriting'].filter(Boolean).join(' '), + onTransitionEnd: function onTransitionEnd() { + if (action.current) { + action.current(); + } + } + }, getItemProps({ + item: item, + source: collection.source, + onClick: function onClick(event) { + onItemClick(item, event); + } + })), /*#__PURE__*/React.createElement(Hit, { + hit: item + }, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-Container" + }, renderIcon({ + item: item, + index: index + }), item.hierarchy[item.type] && item.type === 'lvl1' && /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-content-wrapper" + }, /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-title", + hit: item, + attribute: "hierarchy.lvl1" + }), item.content && /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-path", + hit: item, + attribute: "content" + })), item.hierarchy[item.type] && (item.type === 'lvl2' || item.type === 'lvl3' || item.type === 'lvl4' || item.type === 'lvl5' || item.type === 'lvl6') && /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-content-wrapper" + }, /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-title", + hit: item, + attribute: "hierarchy.".concat(item.type) + }), /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-path", + hit: item, + attribute: "hierarchy.lvl1" + })), item.type === 'content' && /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-content-wrapper" + }, /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-title", + hit: item, + attribute: "content" + }), /*#__PURE__*/React.createElement(Snippet, { + className: "DocSearch-Hit-path", + hit: item, + attribute: "hierarchy.lvl1" + })), renderAction({ + item: item, + runDeleteTransition: runDeleteTransition, + runFavoriteTransition: runFavoriteTransition + })))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.d.ts new file mode 100644 index 00000000..c915e101 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.d.ts @@ -0,0 +1,5 @@ +import type { ScreenStateProps } from './ScreenState'; +import type { InternalDocSearchHit } from './types'; +declare type ResultsScreenProps = Omit, 'translations'>; +export declare function ResultsScreen(props: ResultsScreenProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.js new file mode 100644 index 00000000..27c2bf59 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ResultsScreen.js @@ -0,0 +1,55 @@ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +import React from 'react'; +import { SelectIcon, SourceIcon } from './icons'; +import { Results } from './Results'; +import { removeHighlightTags } from './utils'; +export function ResultsScreen(props) { + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Dropdown-Container" + }, props.state.collections.map(function (collection) { + if (collection.items.length === 0) { + return null; + } + + var title = removeHighlightTags(collection.items[0]); + return /*#__PURE__*/React.createElement(Results, _extends({}, props, { + key: collection.source.sourceId, + title: title, + collection: collection, + renderIcon: function renderIcon(_ref) { + var _collection$items; + + var item = _ref.item, + index = _ref.index; + return /*#__PURE__*/React.createElement(React.Fragment, null, item.__docsearch_parent && /*#__PURE__*/React.createElement("svg", { + className: "DocSearch-Hit-Tree", + viewBox: "0 0 24 54" + }, /*#__PURE__*/React.createElement("g", { + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + }, item.__docsearch_parent !== ((_collection$items = collection.items[index + 1]) === null || _collection$items === void 0 ? void 0 : _collection$items.__docsearch_parent) ? /*#__PURE__*/React.createElement("path", { + d: "M8 6v21M20 27H8.3" + }) : /*#__PURE__*/React.createElement("path", { + d: "M8 6v42M20 27H8.3" + }))), /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-icon" + }, /*#__PURE__*/React.createElement(SourceIcon, { + type: item.type + }))); + }, + renderAction: function renderAction() { + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-action" + }, /*#__PURE__*/React.createElement(SelectIcon, null)); + } + })); + }), props.resultsFooterComponent && /*#__PURE__*/React.createElement("section", { + className: "DocSearch-HitsFooter" + }, /*#__PURE__*/React.createElement(props.resultsFooterComponent, { + state: props.state + }))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.d.ts new file mode 100644 index 00000000..52bdf8e5 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.d.ts @@ -0,0 +1,27 @@ +import type { AutocompleteApi, AutocompleteState, BaseItem } from '@algolia/autocomplete-core'; +import React from 'react'; +import type { DocSearchProps } from './DocSearch'; +import type { ErrorScreenTranslations } from './ErrorScreen'; +import type { NoResultsScreenTranslations } from './NoResultsScreen'; +import type { StartScreenTranslations } from './StartScreen'; +import type { StoredSearchPlugin } from './stored-searches'; +import type { InternalDocSearchHit, StoredDocSearchHit } from './types'; +export declare type ScreenStateTranslations = Partial<{ + errorScreen: ErrorScreenTranslations; + startScreen: StartScreenTranslations; + noResultsScreen: NoResultsScreenTranslations; +}>; +export interface ScreenStateProps extends AutocompleteApi { + state: AutocompleteState; + recentSearches: StoredSearchPlugin; + favoriteSearches: StoredSearchPlugin; + onItemClick: (item: InternalDocSearchHit, event: KeyboardEvent | MouseEvent) => void; + inputRef: React.MutableRefObject; + hitComponent: DocSearchProps['hitComponent']; + indexName: DocSearchProps['indexName']; + disableUserPersonalization: boolean; + resultsFooterComponent: DocSearchProps['resultsFooterComponent']; + translations: ScreenStateTranslations; + getMissingResultsUrl?: DocSearchProps['getMissingResultsUrl']; +} +export declare const ScreenState: React.MemoExoticComponent<({ translations, ...props }: ScreenStateProps) => JSX.Element>; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.js new file mode 100644 index 00000000..1dbf1a4e --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/ScreenState.js @@ -0,0 +1,49 @@ +var _excluded = ["translations"]; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import React from 'react'; +import { ErrorScreen } from './ErrorScreen'; +import { NoResultsScreen } from './NoResultsScreen'; +import { ResultsScreen } from './ResultsScreen'; +import { StartScreen } from './StartScreen'; +export var ScreenState = React.memo(function (_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + props = _objectWithoutProperties(_ref, _excluded); + + if (props.state.status === 'error') { + return /*#__PURE__*/React.createElement(ErrorScreen, { + translations: translations === null || translations === void 0 ? void 0 : translations.errorScreen + }); + } + + var hasCollections = props.state.collections.some(function (collection) { + return collection.items.length > 0; + }); + + if (!props.state.query) { + return /*#__PURE__*/React.createElement(StartScreen, _extends({}, props, { + hasCollections: hasCollections, + translations: translations === null || translations === void 0 ? void 0 : translations.startScreen + })); + } + + if (hasCollections === false) { + return /*#__PURE__*/React.createElement(NoResultsScreen, _extends({}, props, { + translations: translations === null || translations === void 0 ? void 0 : translations.noResultsScreen + })); + } + + return /*#__PURE__*/React.createElement(ResultsScreen, props); +}, function areEqual(_prevProps, nextProps) { + // We don't update the screen when Autocomplete is loading or stalled to + // avoid UI flashes: + // - Empty screen → Results screen + // - NoResults screen → NoResults screen with another query + return nextProps.state.status === 'loading' || nextProps.state.status === 'stalled'; +}); \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.d.ts new file mode 100644 index 00000000..65401a0a --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.d.ts @@ -0,0 +1,20 @@ +import type { AutocompleteApi, AutocompleteState } from '@algolia/autocomplete-core'; +import type { MutableRefObject } from 'react'; +import React from 'react'; +import type { InternalDocSearchHit } from './types'; +export declare type SearchBoxTranslations = Partial<{ + resetButtonTitle: string; + resetButtonAriaLabel: string; + cancelButtonText: string; + cancelButtonAriaLabel: string; +}>; +interface SearchBoxProps extends AutocompleteApi { + state: AutocompleteState; + autoFocus: boolean; + inputRef: MutableRefObject; + onClose: () => void; + isFromSelection: boolean; + translations?: SearchBoxTranslations; +} +export declare function SearchBox({ translations, ...props }: SearchBoxProps): JSX.Element; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.js new file mode 100644 index 00000000..92130258 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/SearchBox.js @@ -0,0 +1,72 @@ +var _excluded = ["translations"]; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import React from 'react'; +import { MAX_QUERY_SIZE } from './constants'; +import { LoadingIcon } from './icons/LoadingIcon'; +import { ResetIcon } from './icons/ResetIcon'; +import { SearchIcon } from './icons/SearchIcon'; +export function SearchBox(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + props = _objectWithoutProperties(_ref, _excluded); + + var _translations$resetBu = translations.resetButtonTitle, + resetButtonTitle = _translations$resetBu === void 0 ? 'Clear the query' : _translations$resetBu, + _translations$resetBu2 = translations.resetButtonAriaLabel, + resetButtonAriaLabel = _translations$resetBu2 === void 0 ? 'Clear the query' : _translations$resetBu2, + _translations$cancelB = translations.cancelButtonText, + cancelButtonText = _translations$cancelB === void 0 ? 'Cancel' : _translations$cancelB, + _translations$cancelB2 = translations.cancelButtonAriaLabel, + cancelButtonAriaLabel = _translations$cancelB2 === void 0 ? 'Cancel' : _translations$cancelB2; + + var _props$getFormProps = props.getFormProps({ + inputElement: props.inputRef.current + }), + onReset = _props$getFormProps.onReset; + + React.useEffect(function () { + if (props.autoFocus && props.inputRef.current) { + props.inputRef.current.focus(); + } + }, [props.autoFocus, props.inputRef]); + React.useEffect(function () { + if (props.isFromSelection && props.inputRef.current) { + props.inputRef.current.select(); + } + }, [props.isFromSelection, props.inputRef]); + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("form", { + className: "DocSearch-Form", + onSubmit: function onSubmit(event) { + event.preventDefault(); + }, + onReset: onReset + }, /*#__PURE__*/React.createElement("label", _extends({ + className: "DocSearch-MagnifierLabel" + }, props.getLabelProps()), /*#__PURE__*/React.createElement(SearchIcon, null)), /*#__PURE__*/React.createElement("div", { + className: "DocSearch-LoadingIndicator" + }, /*#__PURE__*/React.createElement(LoadingIcon, null)), /*#__PURE__*/React.createElement("input", _extends({ + className: "DocSearch-Input", + ref: props.inputRef + }, props.getInputProps({ + inputElement: props.inputRef.current, + autoFocus: props.autoFocus, + maxLength: MAX_QUERY_SIZE + }))), /*#__PURE__*/React.createElement("button", { + type: "reset", + title: resetButtonTitle, + className: "DocSearch-Reset", + "aria-label": resetButtonAriaLabel, + hidden: !props.state.query + }, /*#__PURE__*/React.createElement(ResetIcon, null))), /*#__PURE__*/React.createElement("button", { + className: "DocSearch-Cancel", + type: "reset", + "aria-label": cancelButtonAriaLabel, + onClick: props.onClose + }, cancelButtonText)); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.d.ts new file mode 100644 index 00000000..655e17e8 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.d.ts @@ -0,0 +1,14 @@ +/// +import type { StoredDocSearchHit } from './types'; +interface SnippetProps { + hit: TItem; + attribute: string; + tagName?: string; + [prop: string]: unknown; +} +export declare function Snippet({ hit, attribute, tagName, ...rest }: SnippetProps): import("react").DOMElement<{ + dangerouslySetInnerHTML: { + __html: any; + }; +}, Element>; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.js new file mode 100644 index 00000000..3937093f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/Snippet.js @@ -0,0 +1,35 @@ +var _excluded = ["hit", "attribute", "tagName"]; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import { createElement } from 'react'; + +function getPropertyByPath(object, path) { + var parts = path.split('.'); + return parts.reduce(function (prev, current) { + if (prev !== null && prev !== void 0 && prev[current]) return prev[current]; + return null; + }, object); +} + +export function Snippet(_ref) { + var hit = _ref.hit, + attribute = _ref.attribute, + _ref$tagName = _ref.tagName, + tagName = _ref$tagName === void 0 ? 'span' : _ref$tagName, + rest = _objectWithoutProperties(_ref, _excluded); + + return createElement(tagName, _objectSpread(_objectSpread({}, rest), {}, { + dangerouslySetInnerHTML: { + __html: getPropertyByPath(hit, "_snippetResult.".concat(attribute, ".value")) || getPropertyByPath(hit, attribute) + } + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.d.ts new file mode 100644 index 00000000..7f4f212d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.d.ts @@ -0,0 +1,16 @@ +import type { ScreenStateProps } from './ScreenState'; +import type { InternalDocSearchHit } from './types'; +export declare type StartScreenTranslations = Partial<{ + recentSearchesTitle: string; + noRecentSearchesText: string; + saveRecentSearchButtonTitle: string; + removeRecentSearchButtonTitle: string; + favoriteSearchesTitle: string; + removeFavoriteSearchButtonTitle: string; +}>; +declare type StartScreenProps = Omit, 'translations'> & { + hasCollections: boolean; + translations?: StartScreenTranslations; +}; +export declare function StartScreen({ translations, ...props }: StartScreenProps): JSX.Element | null; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.js new file mode 100644 index 00000000..595ccb55 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/StartScreen.js @@ -0,0 +1,119 @@ +var _excluded = ["translations"]; + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +import React from 'react'; +import { RecentIcon, ResetIcon, StarIcon } from './icons'; +import { Results } from './Results'; +export function StartScreen(_ref) { + var _ref$translations = _ref.translations, + translations = _ref$translations === void 0 ? {} : _ref$translations, + props = _objectWithoutProperties(_ref, _excluded); + + var _translations$recentS = translations.recentSearchesTitle, + recentSearchesTitle = _translations$recentS === void 0 ? 'Recent' : _translations$recentS, + _translations$noRecen = translations.noRecentSearchesText, + noRecentSearchesText = _translations$noRecen === void 0 ? 'No recent searches' : _translations$noRecen, + _translations$saveRec = translations.saveRecentSearchButtonTitle, + saveRecentSearchButtonTitle = _translations$saveRec === void 0 ? 'Save this search' : _translations$saveRec, + _translations$removeR = translations.removeRecentSearchButtonTitle, + removeRecentSearchButtonTitle = _translations$removeR === void 0 ? 'Remove this search from history' : _translations$removeR, + _translations$favorit = translations.favoriteSearchesTitle, + favoriteSearchesTitle = _translations$favorit === void 0 ? 'Favorite' : _translations$favorit, + _translations$removeF = translations.removeFavoriteSearchButtonTitle, + removeFavoriteSearchButtonTitle = _translations$removeF === void 0 ? 'Remove this search from favorites' : _translations$removeF; + + if (props.state.status === 'idle' && props.hasCollections === false) { + if (props.disableUserPersonalization) { + return null; + } + + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-StartScreen" + }, /*#__PURE__*/React.createElement("p", { + className: "DocSearch-Help" + }, noRecentSearchesText)); + } + + if (props.hasCollections === false) { + return null; + } + + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Dropdown-Container" + }, /*#__PURE__*/React.createElement(Results, _extends({}, props, { + title: recentSearchesTitle, + collection: props.state.collections[0], + renderIcon: function renderIcon() { + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-icon" + }, /*#__PURE__*/React.createElement(RecentIcon, null)); + }, + renderAction: function renderAction(_ref2) { + var item = _ref2.item, + runFavoriteTransition = _ref2.runFavoriteTransition, + runDeleteTransition = _ref2.runDeleteTransition; + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-action" + }, /*#__PURE__*/React.createElement("button", { + className: "DocSearch-Hit-action-button", + title: saveRecentSearchButtonTitle, + type: "submit", + onClick: function onClick(event) { + event.preventDefault(); + event.stopPropagation(); + runFavoriteTransition(function () { + props.favoriteSearches.add(item); + props.recentSearches.remove(item); + props.refresh(); + }); + } + }, /*#__PURE__*/React.createElement(StarIcon, null))), /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-action" + }, /*#__PURE__*/React.createElement("button", { + className: "DocSearch-Hit-action-button", + title: removeRecentSearchButtonTitle, + type: "submit", + onClick: function onClick(event) { + event.preventDefault(); + event.stopPropagation(); + runDeleteTransition(function () { + props.recentSearches.remove(item); + props.refresh(); + }); + } + }, /*#__PURE__*/React.createElement(ResetIcon, null)))); + } + })), /*#__PURE__*/React.createElement(Results, _extends({}, props, { + title: favoriteSearchesTitle, + collection: props.state.collections[1], + renderIcon: function renderIcon() { + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-icon" + }, /*#__PURE__*/React.createElement(StarIcon, null)); + }, + renderAction: function renderAction(_ref3) { + var item = _ref3.item, + runDeleteTransition = _ref3.runDeleteTransition; + return /*#__PURE__*/React.createElement("div", { + className: "DocSearch-Hit-action" + }, /*#__PURE__*/React.createElement("button", { + className: "DocSearch-Hit-action-button", + title: removeFavoriteSearchButtonTitle, + type: "submit", + onClick: function onClick(event) { + event.preventDefault(); + event.stopPropagation(); + runDeleteTransition(function () { + props.favoriteSearches.remove(item); + props.refresh(); + }); + } + }, /*#__PURE__*/React.createElement(ResetIcon, null))); + } + }))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/__tests__/api.test.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/__tests__/api.test.js new file mode 100644 index 00000000..797b919d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/__tests__/api.test.js @@ -0,0 +1,461 @@ +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + +import { render, act, fireEvent, screen } from '@testing-library/react'; +import React from 'react'; +import '@testing-library/jest-dom'; +import { DocSearch as DocSearchComponent } from '../DocSearch'; + +function DocSearch(props) { + return /*#__PURE__*/React.createElement(DocSearchComponent, _extends({ + appId: "woo", + apiKey: "foo", + indexName: "bar" + }, props)); +} // mock empty response + + +function noResultSearch(_queries, _requestOptions) { + return new Promise(function (resolve) { + resolve({ + results: [{ + hits: [], + hitsPerPage: 0, + nbHits: 0, + nbPages: 0, + page: 0, + processingTimeMS: 0, + exhaustiveNbHits: true, + params: '', + query: '' + }] + }); + }); +} + +describe('api', function () { + var container; + var docSearchSelector = '.DocSearch'; + beforeEach(function () { + container = document.createElement('div'); + document.body.appendChild(container); + }); + afterEach(function () { + document.body.removeChild(container); + container = null; + }); + it('renders with minimal parameters', function () { + render( /*#__PURE__*/React.createElement(DocSearch, null)); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + }); + describe('translations', function () { + it('overrides the default DocSearchButton text', function () { + render( /*#__PURE__*/React.createElement(DocSearch, { + translations: { + button: { + buttonText: 'Recherche', + buttonAriaLabel: 'Recherche' + } + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Button-Placeholder').innerHTML).toBe('Recherche'); + expect(document.querySelector('.DocSearch-Button').getAttribute('aria-label')).toBe('Recherche'); + }); + it('overrides the default DocSearchModal startScreen text', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() { + return regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + translations: { + modal: { + startScreen: { + noRecentSearchesText: 'Pas de recherche récentes' + } + } + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + _context2.next = 4; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() { + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.t0 = fireEvent; + _context.next = 3; + return screen.findByText('Search'); + + case 3: + _context.t1 = _context.sent; + + _context.t0.click.call(_context.t0, _context.t1); + + case 5: + case "end": + return _context.stop(); + } + }, _callee); + }))); + + case 4: + expect(document.querySelector('.DocSearch-Modal')).toBeInTheDocument(); + expect(screen.getByText('Pas de recherche récentes')).toBeInTheDocument(); + + case 6: + case "end": + return _context2.stop(); + } + }, _callee2); + }))); + it('overrides the default DocSearchModal noResultsScreen text', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() { + return regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + transformSearchClient: function transformSearchClient(searchClient) { + return _objectSpread(_objectSpread({}, searchClient), {}, { + search: noResultSearch + }); + }, + translations: { + modal: { + noResultsScreen: { + noResultsText: 'Pas de résultats pour', + reportMissingResultsText: 'Ouvrez une issue sur docsearch-configs', + reportMissingResultsLinkText: 'Lien du repo' + } + } + }, + getMissingResultsUrl: function getMissingResultsUrl() { + return 'algolia.com'; + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + _context5.next = 4; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() { + return regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.t0 = fireEvent; + _context3.next = 3; + return screen.findByText('Search'); + + case 3: + _context3.t1 = _context3.sent; + + _context3.t0.click.call(_context3.t0, _context3.t1); + + case 5: + case "end": + return _context3.stop(); + } + }, _callee3); + }))); + + case 4: + _context5.next = 6; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() { + return regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.t0 = fireEvent; + _context4.next = 3; + return screen.findByPlaceholderText('Search docs'); + + case 3: + _context4.t1 = _context4.sent; + _context4.t2 = { + target: { + value: 'q' + } + }; + + _context4.t0.input.call(_context4.t0, _context4.t1, _context4.t2); + + case 6: + case "end": + return _context4.stop(); + } + }, _callee4); + }))); + + case 6: + expect(screen.getByText(/Pas de résultats pour/)).toBeInTheDocument(); + expect(screen.getByText(/Ouvrez une issue sur docsearch-configs/)).toBeInTheDocument(); + expect(screen.getByRole('link', { + name: 'Lien du repo' + })).toBeInTheDocument(); + + case 9: + case "end": + return _context5.stop(); + } + }, _callee5); + }))); + it('overrides the default DocSearchModal searchbox text', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() { + return regeneratorRuntime.wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + translations: { + modal: { + searchBox: { + resetButtonTitle: 'Effacer', + resetButtonAriaLabel: 'Effacer', + cancelButtonText: 'Annuler', + cancelButtonAriaLabel: 'Annuler' + } + } + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + _context7.next = 4; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() { + return regeneratorRuntime.wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + _context6.t0 = fireEvent; + _context6.next = 3; + return screen.findByText('Search'); + + case 3: + _context6.t1 = _context6.sent; + + _context6.t0.click.call(_context6.t0, _context6.t1); + + case 5: + case "end": + return _context6.stop(); + } + }, _callee6); + }))); + + case 4: + expect(document.querySelector('.DocSearch-Cancel').innerHTML).toBe('Annuler'); + expect(document.querySelector('.DocSearch-Cancel').getAttribute('aria-label')).toBe('Annuler'); + expect(document.querySelector('.DocSearch-Reset').getAttribute('title')).toBe('Effacer'); + expect(document.querySelector('.DocSearch-Reset').getAttribute('aria-label')).toBe('Effacer'); + + case 8: + case "end": + return _context7.stop(); + } + }, _callee7); + }))); + it('overrides the default DocSearchModal footer text', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() { + return regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + translations: { + modal: { + footer: { + closeText: 'Pour fermer', + closeKeyAriaLabel: "Touche d'échappement", + navigateText: 'Pour naviguer', + navigateUpKeyAriaLabel: 'Flèche vers le haut', + navigateDownKeyAriaLabel: 'Flèche le bas', + searchByText: 'Recherche par', + selectText: 'Pour selectionner', + selectKeyAriaLabel: "Touche d'entrée" + } + } + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + _context9.next = 4; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() { + return regeneratorRuntime.wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + _context8.t0 = fireEvent; + _context8.next = 3; + return screen.findByText('Search'); + + case 3: + _context8.t1 = _context8.sent; + + _context8.t0.click.call(_context8.t0, _context8.t1); + + case 5: + case "end": + return _context8.stop(); + } + }, _callee8); + }))); + + case 4: + expect(screen.getByText('Recherche par')).toBeInTheDocument(); + expect(screen.getByText('Pour fermer')).toBeInTheDocument(); + expect(screen.getByText('Pour naviguer')).toBeInTheDocument(); + expect(screen.getByText('Pour selectionner')).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'échappement"]')).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche vers le haut"]')).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche le bas"]')).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'entrée"]')).toBeInTheDocument(); + + case 12: + case "end": + return _context9.stop(); + } + }, _callee9); + }))); + }); + describe('getMissingResultsUrl', function () { + it('does not render the link to the repository by default', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() { + return regeneratorRuntime.wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + transformSearchClient: function transformSearchClient(searchClient) { + return _objectSpread(_objectSpread({}, searchClient), {}, { + search: noResultSearch + }); + } + })); + expect(document.querySelector(docSearchSelector)).toBeInTheDocument(); + _context12.next = 4; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() { + return regeneratorRuntime.wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { + case 0: + _context10.t0 = fireEvent; + _context10.next = 3; + return screen.findByText('Search'); + + case 3: + _context10.t1 = _context10.sent; + + _context10.t0.click.call(_context10.t0, _context10.t1); + + case 5: + case "end": + return _context10.stop(); + } + }, _callee10); + }))); + + case 4: + _context12.next = 6; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() { + return regeneratorRuntime.wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { + case 0: + _context11.t0 = fireEvent; + _context11.next = 3; + return screen.findByPlaceholderText('Search docs'); + + case 3: + _context11.t1 = _context11.sent; + _context11.t2 = { + target: { + value: 'q' + } + }; + + _context11.t0.input.call(_context11.t0, _context11.t1, _context11.t2); + + case 6: + case "end": + return _context11.stop(); + } + }, _callee11); + }))); + + case 6: + expect(screen.getByText(/No results for/)).toBeInTheDocument(); + expect(document.querySelector('.DocSearch-Help a')).not.toBeInTheDocument(); + + case 8: + case "end": + return _context12.stop(); + } + }, _callee12); + }))); + it('render the link to the repository', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() { + var link; + return regeneratorRuntime.wrap(function _callee15$(_context15) { + while (1) switch (_context15.prev = _context15.next) { + case 0: + render( /*#__PURE__*/React.createElement(DocSearch, { + transformSearchClient: function transformSearchClient(searchClient) { + return _objectSpread(_objectSpread({}, searchClient), {}, { + search: noResultSearch + }); + }, + getMissingResultsUrl: function getMissingResultsUrl(_ref14) { + var query = _ref14.query; + return "https://github.com/algolia/docsearch/issues/new?title=".concat(query); + } + })); + _context15.next = 3; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() { + return regeneratorRuntime.wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { + case 0: + _context13.t0 = fireEvent; + _context13.next = 3; + return screen.findByText('Search'); + + case 3: + _context13.t1 = _context13.sent; + + _context13.t0.click.call(_context13.t0, _context13.t1); + + case 5: + case "end": + return _context13.stop(); + } + }, _callee13); + }))); + + case 3: + _context15.next = 5; + return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() { + return regeneratorRuntime.wrap(function _callee14$(_context14) { + while (1) switch (_context14.prev = _context14.next) { + case 0: + _context14.t0 = fireEvent; + _context14.next = 3; + return screen.findByPlaceholderText('Search docs'); + + case 3: + _context14.t1 = _context14.sent; + _context14.t2 = { + target: { + value: 'q' + } + }; + + _context14.t0.input.call(_context14.t0, _context14.t1, _context14.t2); + + case 6: + case "end": + return _context14.stop(); + } + }, _callee14); + }))); + + case 5: + expect(screen.getByText(/No results for/)).toBeInTheDocument(); + link = document.querySelector('.DocSearch-Help a'); + expect(link).toBeInTheDocument(); + expect(link.getAttribute('href')).toBe('https://github.com/algolia/docsearch/issues/new?title=q'); + + case 9: + case "end": + return _context15.stop(); + } + }, _callee15); + }))); + }); +}); \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.d.ts new file mode 100644 index 00000000..b44c0145 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.d.ts @@ -0,0 +1 @@ +export declare const MAX_QUERY_SIZE = 64; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.js new file mode 100644 index 00000000..9325780c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/constants.js @@ -0,0 +1 @@ +export var MAX_QUERY_SIZE = 64; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.d.ts new file mode 100644 index 00000000..be8fcd02 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.d.ts @@ -0,0 +1 @@ +export declare function ControlKeyIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js new file mode 100644 index 00000000..ee3513dc --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ControlKeyIcon.js @@ -0,0 +1,14 @@ +import React from 'react'; +export function ControlKeyIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "15", + height: "15", + className: "DocSearch-Control-Key-Icon" + }, /*#__PURE__*/React.createElement("path", { + d: "M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953", + strokeWidth: "1.2", + stroke: "currentColor", + fill: "none", + strokeLinecap: "square" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.d.ts new file mode 100644 index 00000000..4fd33100 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.d.ts @@ -0,0 +1 @@ +export declare function ErrorIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js new file mode 100644 index 00000000..dee377d5 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ErrorIcon.js @@ -0,0 +1,15 @@ +import React from 'react'; +export function ErrorIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "40", + height: "40", + viewBox: "0 0 20 20", + fill: "none", + fillRule: "evenodd", + stroke: "currentColor", + strokeLinecap: "round", + strokeLinejoin: "round" + }, /*#__PURE__*/React.createElement("path", { + d: "M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.d.ts new file mode 100644 index 00000000..bef40a3b --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.d.ts @@ -0,0 +1 @@ +export declare function GoToExternal(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.js new file mode 100644 index 00000000..d15deb7f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/GoToExternalIcon.js @@ -0,0 +1,11 @@ +import React from 'react'; +export function GoToExternal() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20" + }, /*#__PURE__*/React.createElement("path", { + d: "M5 6v9h9v-3a1 1 0 112 0v4l-1 1H4l-1-1V5l1-1h4a1 1 0 110 2H5zm5 5a1 1 0 11-1-1l5-6h-3a1 1 0 110-2h6a1 1 0 011 1v6a1 1 0 11-2 0V6l-6 5z", + fill: "currentColor", + fillRule: "nonzero" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.d.ts new file mode 100644 index 00000000..9ed8ffb6 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.d.ts @@ -0,0 +1 @@ +export declare function LoadingIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js new file mode 100644 index 00000000..6aec628f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/LoadingIcon.js @@ -0,0 +1,28 @@ +import React from 'react'; +export function LoadingIcon() { + return /*#__PURE__*/React.createElement("svg", { + viewBox: "0 0 38 38", + stroke: "currentColor", + strokeOpacity: ".5" + }, /*#__PURE__*/React.createElement("g", { + fill: "none", + fillRule: "evenodd" + }, /*#__PURE__*/React.createElement("g", { + transform: "translate(1 1)", + strokeWidth: "2" + }, /*#__PURE__*/React.createElement("circle", { + strokeOpacity: ".3", + cx: "18", + cy: "18", + r: "18" + }), /*#__PURE__*/React.createElement("path", { + d: "M36 18c0-9.94-8.06-18-18-18" + }, /*#__PURE__*/React.createElement("animateTransform", { + attributeName: "transform", + type: "rotate", + from: "0 18 18", + to: "360 18 18", + dur: "1s", + repeatCount: "indefinite" + }))))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.d.ts new file mode 100644 index 00000000..460ef160 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.d.ts @@ -0,0 +1 @@ +export declare function NoResultsIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js new file mode 100644 index 00000000..e5cf4121 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/NoResultsIcon.js @@ -0,0 +1,15 @@ +import React from 'react'; +export function NoResultsIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "40", + height: "40", + viewBox: "0 0 20 20", + fill: "none", + fillRule: "evenodd", + stroke: "currentColor", + strokeLinecap: "round", + strokeLinejoin: "round" + }, /*#__PURE__*/React.createElement("path", { + d: "M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.d.ts new file mode 100644 index 00000000..c10a6984 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.d.ts @@ -0,0 +1 @@ +export declare function RecentIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js new file mode 100644 index 00000000..6670ff61 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/RecentIcon.js @@ -0,0 +1,18 @@ +import React from 'react'; +export function RecentIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("g", { + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + }, /*#__PURE__*/React.createElement("path", { + d: "M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0" + }), /*#__PURE__*/React.createElement("path", { + d: "M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13" + }))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.d.ts new file mode 100644 index 00000000..1c6e4537 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.d.ts @@ -0,0 +1 @@ +export declare function ResetIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js new file mode 100644 index 00000000..be14662d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/ResetIcon.js @@ -0,0 +1,15 @@ +import React from 'react'; +export function ResetIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.d.ts new file mode 100644 index 00000000..87216b7e --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.d.ts @@ -0,0 +1 @@ +export declare function SearchIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js new file mode 100644 index 00000000..ff57b51c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SearchIcon.js @@ -0,0 +1,16 @@ +import React from 'react'; +export function SearchIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + className: "DocSearch-Search-Icon", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.d.ts new file mode 100644 index 00000000..3cf6dc4d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.d.ts @@ -0,0 +1 @@ +export declare function SelectIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js new file mode 100644 index 00000000..83e3ba2f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SelectIcon.js @@ -0,0 +1,19 @@ +import React from 'react'; +export function SelectIcon() { + return /*#__PURE__*/React.createElement("svg", { + className: "DocSearch-Hit-Select-Icon", + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("g", { + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + }, /*#__PURE__*/React.createElement("path", { + d: "M18 3v4c0 2-2 4-4 4H2" + }), /*#__PURE__*/React.createElement("path", { + d: "M8 17l-6-6 6-6" + }))); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.d.ts new file mode 100644 index 00000000..3b645b1e --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.d.ts @@ -0,0 +1,3 @@ +export declare function SourceIcon(props: { + type: string; +}): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js new file mode 100644 index 00000000..22494685 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/SourceIcon.js @@ -0,0 +1,57 @@ +import React from 'react'; + +var LvlIcon = function LvlIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinejoin: "round" + })); +}; + +export function SourceIcon(props) { + switch (props.type) { + case 'lvl1': + return /*#__PURE__*/React.createElement(LvlIcon, null); + + case 'content': + return /*#__PURE__*/React.createElement(ContentIcon, null); + + default: + return /*#__PURE__*/React.createElement(AnchorIcon, null); + } +} + +function AnchorIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinecap: "round", + strokeLinejoin: "round" + })); +} + +function ContentIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M17 5H3h14zm0 5H3h14zm0 5H3h14z", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinejoin: "round" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.d.ts new file mode 100644 index 00000000..2916ccc5 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.d.ts @@ -0,0 +1 @@ +export declare function StarIcon(): JSX.Element; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.js new file mode 100644 index 00000000..62aacc22 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/StarIcon.js @@ -0,0 +1,14 @@ +import React from 'react'; +export function StarIcon() { + return /*#__PURE__*/React.createElement("svg", { + width: "20", + height: "20", + viewBox: "0 0 20 20" + }, /*#__PURE__*/React.createElement("path", { + d: "M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z", + stroke: "currentColor", + fill: "none", + fillRule: "evenodd", + strokeLinejoin: "round" + })); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.d.ts new file mode 100644 index 00000000..b3c85dc9 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.d.ts @@ -0,0 +1,10 @@ +export * from './GoToExternalIcon'; +export * from './LoadingIcon'; +export * from './RecentIcon'; +export * from './ResetIcon'; +export * from './SearchIcon'; +export * from './SelectIcon'; +export * from './SourceIcon'; +export * from './StarIcon'; +export * from './ErrorIcon'; +export * from './NoResultsIcon'; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.js new file mode 100644 index 00000000..969d3808 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/icons/index.js @@ -0,0 +1,10 @@ +export * from './GoToExternalIcon'; +export * from './LoadingIcon'; +export * from './RecentIcon'; +export * from './ResetIcon'; +export * from './SearchIcon'; +export * from './SelectIcon'; +export * from './SourceIcon'; +export * from './StarIcon'; +export * from './ErrorIcon'; +export * from './NoResultsIcon'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/index.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/index.d.ts new file mode 100644 index 00000000..d4e93969 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/index.d.ts @@ -0,0 +1,5 @@ +export * from './DocSearch'; +export * from './DocSearchButton'; +export * from './DocSearchModal'; +export * from './useDocSearchKeyboardEvents'; +export * from './version'; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/index.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/index.js new file mode 100644 index 00000000..9791a574 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/index.js @@ -0,0 +1,5 @@ +export * from './DocSearch'; +export * from './DocSearchButton'; +export * from './DocSearchModal'; +export * from './useDocSearchKeyboardEvents'; +export * from './version'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.d.ts new file mode 100644 index 00000000..d7f2661f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.d.ts @@ -0,0 +1,12 @@ +import type { StoredDocSearchHit } from './types'; +declare type CreateStoredSearchesOptions = { + key: string; + limit?: number; +}; +export declare type StoredSearchPlugin = { + add: (item: TItem) => void; + remove: (item: TItem) => void; + getAll: () => TItem[]; +}; +export declare function createStoredSearches({ key, limit, }: CreateStoredSearchesOptions): StoredSearchPlugin; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.js new file mode 100644 index 00000000..6c1c9d00 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/stored-searches.js @@ -0,0 +1,75 @@ +var _excluded = ["_highlightResult", "_snippetResult"]; + +function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function isLocalStorageSupported() { + var key = '__TEST_KEY__'; + + try { + localStorage.setItem(key, ''); + localStorage.removeItem(key); + return true; + } catch (error) { + return false; + } +} + +function createStorage(key) { + if (isLocalStorageSupported() === false) { + return { + setItem: function setItem() {}, + getItem: function getItem() { + return []; + } + }; + } + + return { + setItem: function setItem(item) { + return window.localStorage.setItem(key, JSON.stringify(item)); + }, + getItem: function getItem() { + var item = window.localStorage.getItem(key); + return item ? JSON.parse(item) : []; + } + }; +} + +export function createStoredSearches(_ref) { + var key = _ref.key, + _ref$limit = _ref.limit, + limit = _ref$limit === void 0 ? 5 : _ref$limit; + var storage = createStorage(key); + var items = storage.getItem().slice(0, limit); + return { + add: function add(item) { + var _ref2 = item, + _highlightResult = _ref2._highlightResult, + _snippetResult = _ref2._snippetResult, + hit = _objectWithoutProperties(_ref2, _excluded); + + var isQueryAlreadySaved = items.findIndex(function (x) { + return x.objectID === hit.objectID; + }); + + if (isQueryAlreadySaved > -1) { + items.splice(isQueryAlreadySaved, 1); + } + + items.unshift(hit); + items = items.slice(0, limit); + storage.setItem(items); + }, + remove: function remove(item) { + items = items.filter(function (x) { + return x.objectID !== item.objectID; + }); + storage.setItem(items); + }, + getAll: function getAll() { + return items; + } + }; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.d.ts new file mode 100644 index 00000000..dc2c84f7 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.d.ts @@ -0,0 +1,75 @@ +declare type ContentType = 'content' | 'lvl0' | 'lvl1' | 'lvl2' | 'lvl3' | 'lvl4' | 'lvl5' | 'lvl6'; +interface DocSearchHitAttributeHighlightResult { + value: string; + matchLevel: 'full' | 'none' | 'partial'; + matchedWords: string[]; + fullyHighlighted?: boolean; +} +interface DocSearchHitHighlightResultHierarchy { + lvl0: DocSearchHitAttributeHighlightResult; + lvl1: DocSearchHitAttributeHighlightResult; + lvl2: DocSearchHitAttributeHighlightResult; + lvl3: DocSearchHitAttributeHighlightResult; + lvl4: DocSearchHitAttributeHighlightResult; + lvl5: DocSearchHitAttributeHighlightResult; + lvl6: DocSearchHitAttributeHighlightResult; +} +interface DocSearchHitHighlightResult { + content: DocSearchHitAttributeHighlightResult; + hierarchy: DocSearchHitHighlightResultHierarchy; + hierarchy_camel: DocSearchHitHighlightResultHierarchy[]; +} +interface DocSearchHitAttributeSnippetResult { + value: string; + matchLevel: 'full' | 'none' | 'partial'; +} +interface DocSearchHitSnippetResult { + content: DocSearchHitAttributeSnippetResult; + hierarchy: DocSearchHitHighlightResultHierarchy; + hierarchy_camel: DocSearchHitHighlightResultHierarchy[]; +} +export declare type DocSearchHit = { + objectID: string; + content: string | null; + url: string; + url_without_anchor: string; + type: ContentType; + anchor: string | null; + hierarchy: { + lvl0: string; + lvl1: string; + lvl2: string | null; + lvl3: string | null; + lvl4: string | null; + lvl5: string | null; + lvl6: string | null; + }; + _highlightResult: DocSearchHitHighlightResult; + _snippetResult: DocSearchHitSnippetResult; + _rankingInfo?: { + promoted: boolean; + nbTypos: number; + firstMatchedWord: number; + proximityDistance?: number; + geoDistance: number; + geoPrecision?: number; + nbExactWords: number; + words: number; + filters: number; + userScore: number; + matchedGeoLocation?: { + lat: number; + lng: number; + distance: number; + }; + }; + _distinctSeqID?: number; + __autocomplete_indexName?: string; + __autocomplete_queryID?: string; + __autocomplete_algoliaCredentials?: { + appId: string; + apiKey: string; + }; + __autocomplete_id?: number; +}; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.d.ts new file mode 100644 index 00000000..6a84019d --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.d.ts @@ -0,0 +1,10 @@ +import type { AutocompleteContext, AutocompleteInsightsApi, AutocompleteState, BaseItem } from '@algolia/autocomplete-core'; +interface DocSearchContext extends AutocompleteContext { + algoliaInsightsPlugin?: { + insights: AutocompleteInsightsApi; + }; +} +export interface DocSearchState extends AutocompleteState { + context: DocSearchContext; +} +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/DocSearchState.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.d.ts new file mode 100644 index 00000000..7c106cce --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.d.ts @@ -0,0 +1,4 @@ +import type { DocSearchHit } from './DocSearchHit'; +export declare type InternalDocSearchHit = DocSearchHit & { + __docsearch_parent: InternalDocSearchHit | null; +}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/InternalDocSearchHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.d.ts new file mode 100644 index 00000000..eb92d472 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.d.ts @@ -0,0 +1,2 @@ +import type { DocSearchHit } from './DocSearchHit'; +export declare type StoredDocSearchHit = Omit; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.js new file mode 100644 index 00000000..8cec2e9c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/StoredDocSearchHit.js @@ -0,0 +1 @@ +export {}; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.d.ts new file mode 100644 index 00000000..37ac8f9a --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.d.ts @@ -0,0 +1,4 @@ +export * from './DocSearchHit'; +export * from './DocSearchState'; +export * from './InternalDocSearchHit'; +export * from './StoredDocSearchHit'; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.js new file mode 100644 index 00000000..aed269fc --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/types/index.js @@ -0,0 +1,4 @@ +export * from './DocSearchHit'; +export * from './DocSearchState'; +export * from './InternalDocSearchHit'; +export * from './StoredDocSearchHit'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.d.ts new file mode 100644 index 00000000..b1e76ace --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.d.ts @@ -0,0 +1,9 @@ +import React from 'react'; +export interface UseDocSearchKeyboardEventsProps { + isOpen: boolean; + onOpen: () => void; + onClose: () => void; + onInput?: (event: KeyboardEvent) => void; + searchButtonRef?: React.RefObject; +} +export declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, onInput, searchButtonRef, }: UseDocSearchKeyboardEventsProps): void; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js new file mode 100644 index 00000000..bdb45713 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useDocSearchKeyboardEvents.js @@ -0,0 +1,55 @@ +import React from 'react'; + +function isEditingContent(event) { + var element = event.target; + var tagName = element.tagName; + return element.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA'; +} + +export function useDocSearchKeyboardEvents(_ref) { + var isOpen = _ref.isOpen, + onOpen = _ref.onOpen, + onClose = _ref.onClose, + onInput = _ref.onInput, + searchButtonRef = _ref.searchButtonRef; + React.useEffect(function () { + function onKeyDown(event) { + var _event$key; + + function open() { + // We check that no other DocSearch modal is showing before opening + // another one. + if (!document.body.classList.contains('DocSearch--active')) { + onOpen(); + } + } + + if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal. + // We need to check for `event.key` because it can be `undefined` with + // Chrome's autofill feature. + // See https://github.com/paperjs/paper.js/issues/1398 + ((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's + // a character. + !isEditingContent(event) && event.key === '/' && !isOpen) { + event.preventDefault(); + + if (isOpen) { + onClose(); + } else if (!document.body.classList.contains('DocSearch--active')) { + open(); + } + } + + if (searchButtonRef && searchButtonRef.current === document.activeElement && onInput) { + if (/[a-zA-Z0-9]/.test(String.fromCharCode(event.keyCode))) { + onInput(event); + } + } + } + + window.addEventListener('keydown', onKeyDown); + return function () { + window.removeEventListener('keydown', onKeyDown); + }; + }, [isOpen, onOpen, onClose, onInput, searchButtonRef]); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.d.ts new file mode 100644 index 00000000..c82166b4 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.d.ts @@ -0,0 +1,2 @@ +import type { SearchClient } from 'algoliasearch/lite'; +export declare function useSearchClient(appId: string, apiKey: string, transformSearchClient: (searchClient: SearchClient) => SearchClient): SearchClient; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.js new file mode 100644 index 00000000..16ead8c2 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useSearchClient.js @@ -0,0 +1,20 @@ +import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser'; +import React from 'react'; +import { version } from './version'; +export function useSearchClient(appId, apiKey, transformSearchClient) { + var searchClient = React.useMemo(function () { + var client = algoliasearch(appId, apiKey); + client.addAlgoliaAgent('docsearch', version); // Since DocSearch.js relies on DocSearch React with an alias to Preact, + // we cannot add the `docsearch-react` user agent by default, otherwise + // it would also be sent on a DocSearch.js integration. + // We therefore only add the `docsearch-react` user agent if `docsearch.js` + // is not present. + + if (/docsearch.js \(.*\)/.test(client.transporter.userAgent.value) === false) { + client.addAlgoliaAgent('docsearch-react', version); + } + + return transformSearchClient(client); + }, [appId, apiKey, transformSearchClient]); + return searchClient; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.d.ts new file mode 100644 index 00000000..ec9108df --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.d.ts @@ -0,0 +1,9 @@ +import type { AutocompleteApi } from '@algolia/autocomplete-core'; +interface UseTouchEventsProps { + getEnvironmentProps: AutocompleteApi['getEnvironmentProps']; + panelElement: HTMLDivElement | null; + formElement: HTMLDivElement | null; + inputElement: HTMLInputElement | null; +} +export declare function useTouchEvents({ getEnvironmentProps, panelElement, formElement, inputElement, }: UseTouchEventsProps): void; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.js new file mode 100644 index 00000000..a35b2c47 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTouchEvents.js @@ -0,0 +1,27 @@ +import React from 'react'; +export function useTouchEvents(_ref) { + var getEnvironmentProps = _ref.getEnvironmentProps, + panelElement = _ref.panelElement, + formElement = _ref.formElement, + inputElement = _ref.inputElement; + React.useEffect(function () { + if (!(panelElement && formElement && inputElement)) { + return undefined; + } + + var _getEnvironmentProps = getEnvironmentProps({ + panelElement: panelElement, + formElement: formElement, + inputElement: inputElement + }), + onTouchStart = _getEnvironmentProps.onTouchStart, + onTouchMove = _getEnvironmentProps.onTouchMove; + + window.addEventListener('touchstart', onTouchStart); + window.addEventListener('touchmove', onTouchMove); + return function () { + window.removeEventListener('touchstart', onTouchStart); + window.removeEventListener('touchmove', onTouchMove); + }; + }, [getEnvironmentProps, panelElement, formElement, inputElement]); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.d.ts new file mode 100644 index 00000000..8d5f45aa --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.d.ts @@ -0,0 +1,5 @@ +interface UseTrapFocusProps { + container: HTMLElement | null; +} +export declare function useTrapFocus({ container }: UseTrapFocusProps): void; +export {}; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.js new file mode 100644 index 00000000..c5b11b84 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/useTrapFocus.js @@ -0,0 +1,34 @@ +import React from 'react'; +export function useTrapFocus(_ref) { + var container = _ref.container; + React.useEffect(function () { + if (!container) { + return undefined; + } + + var focusableElements = container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), input:not([disabled])'); + var firstElement = focusableElements[0]; + var lastElement = focusableElements[focusableElements.length - 1]; + + function trapFocus(event) { + if (event.key !== 'Tab') { + return; + } + + if (event.shiftKey) { + if (document.activeElement === firstElement) { + event.preventDefault(); + lastElement.focus(); + } + } else if (document.activeElement === lastElement) { + event.preventDefault(); + firstElement.focus(); + } + } + + container.addEventListener('keydown', trapFocus); + return function () { + container.removeEventListener('keydown', trapFocus); + }; + }, [container]); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.d.ts new file mode 100644 index 00000000..2d3df1bb --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.d.ts @@ -0,0 +1 @@ +export declare function groupBy>(values: TValue[], predicate: (value: TValue) => string, maxResultsPerGroup?: number): Record; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.js new file mode 100644 index 00000000..f8f063ee --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/groupBy.js @@ -0,0 +1,17 @@ +export function groupBy(values, predicate, maxResultsPerGroup) { + return values.reduce(function (acc, item) { + var key = predicate(item); + + if (!acc.hasOwnProperty(key)) { + acc[key] = []; + } // We limit each section to show 5 hits maximum. + // This acts as a frontend alternative to `distinct`. + + + if (acc[key].length < (maxResultsPerGroup || 5)) { + acc[key].push(item); + } + + return acc; + }, {}); +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.d.ts new file mode 100644 index 00000000..343901ff --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.d.ts @@ -0,0 +1 @@ +export declare function identity(x: TParam): TParam; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.js new file mode 100644 index 00000000..c4c3c779 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/identity.js @@ -0,0 +1,3 @@ +export function identity(x) { + return x; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.d.ts new file mode 100644 index 00000000..a4426836 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.d.ts @@ -0,0 +1,5 @@ +export * from './groupBy'; +export * from './identity'; +export * from './isModifierEvent'; +export * from './noop'; +export * from './removeHighlightTags'; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.js new file mode 100644 index 00000000..3fc41af2 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/index.js @@ -0,0 +1,5 @@ +export * from './groupBy'; +export * from './identity'; +export * from './isModifierEvent'; +export * from './noop'; +export * from './removeHighlightTags'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.d.ts new file mode 100644 index 00000000..3fde0006 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.d.ts @@ -0,0 +1,5 @@ +/** + * Detect when an event is modified with a special key to let the browser + * trigger its default behavior. + */ +export declare function isModifierEvent(event: TEvent): boolean; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.js new file mode 100644 index 00000000..4c816a18 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/isModifierEvent.js @@ -0,0 +1,8 @@ +/** + * Detect when an event is modified with a special key to let the browser + * trigger its default behavior. + */ +export function isModifierEvent(event) { + var isMiddleClick = event.button === 1; + return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.d.ts new file mode 100644 index 00000000..7db19965 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.d.ts @@ -0,0 +1 @@ +export declare function noop(..._args: any[]): void; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.js new file mode 100644 index 00000000..628cbaed --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/noop.js @@ -0,0 +1 @@ +export function noop() {} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.d.ts new file mode 100644 index 00000000..4797720e --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.d.ts @@ -0,0 +1,2 @@ +import type { DocSearchHit, InternalDocSearchHit } from '../types'; +export declare function removeHighlightTags(hit: DocSearchHit | InternalDocSearchHit): string; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js new file mode 100644 index 00000000..db815c2b --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/utils/removeHighlightTags.js @@ -0,0 +1,16 @@ +var regexHighlightTags = /(|<\/mark>)/g; +var regexHasHighlightTags = RegExp(regexHighlightTags.source); +export function removeHighlightTags(hit) { + var _internalDocSearchHit, _hit$_highlightResult; + + var internalDocSearchHit = hit; + + if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) { + return hit.hierarchy.lvl0; + } + + var _ref = (internalDocSearchHit.__docsearch_parent ? (_internalDocSearchHit = internalDocSearchHit.__docsearch_parent) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit._highlightResult) === null || _internalDocSearchHit === void 0 || (_internalDocSearchHit = _internalDocSearchHit.hierarchy) === null || _internalDocSearchHit === void 0 ? void 0 : _internalDocSearchHit.lvl0 : (_hit$_highlightResult = hit._highlightResult) === null || _hit$_highlightResult === void 0 || (_hit$_highlightResult = _hit$_highlightResult.hierarchy) === null || _hit$_highlightResult === void 0 ? void 0 : _hit$_highlightResult.lvl0) || {}, + value = _ref.value; + + return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value; +} \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/version.d.ts b/paperai-docs/node_modules/@docsearch/react/dist/esm/version.d.ts new file mode 100644 index 00000000..0a685399 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/version.d.ts @@ -0,0 +1 @@ +export declare const version = "3.5.2"; diff --git a/paperai-docs/node_modules/@docsearch/react/dist/esm/version.js b/paperai-docs/node_modules/@docsearch/react/dist/esm/version.js new file mode 100644 index 00000000..fd664651 --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/esm/version.js @@ -0,0 +1 @@ +export var version = '3.5.2'; \ No newline at end of file diff --git a/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js b/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js new file mode 100644 index 00000000..4212399c --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js @@ -0,0 +1,3 @@ +/*! @docsearch/react 3.5.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e=e||self)["@docsearch/react"]={},e.React,e.ReactDOM)}(this,(function(e,t,r){"use strict";var n="default"in t?t.default:t;function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(_(r),[{headers:a}]))}else e.apply(void 0,[t].concat(_(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",H(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",H(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",H(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",H(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=T(t,k);return[].concat(_(e),_(M(q(q({},n),{},{objectIDs:(null==r?void 0:r.map((function(e){return e.objectID})))||n.objectIDs})).map((function(e){return{items:r,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return i("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function F(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function U(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function V(e){return V="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},V(e)}function K(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&Y({onItemsChange:n,items:r,insights:c,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;a("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:c}}),r((function(e){var t=e.item,r=e.state,n=e.event;U(t)&&o({state:r,event:n,insights:c,item:t,insightsEvents:[z({eventName:"Item Selected"},P({item:t,items:l.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;U(t)&&i({state:r,event:n,insights:c,item:t,insightsEvents:[z({eventName:"Item Active"},P({item:t,items:l.current}))]})}))},onStateChange:function(e){var t=e.state;u({state:t})},__autocomplete_pluginOptions:e}}function G(e,t){var r=t;return{then:function(t,n){return G(e.then(te(t,r,e),te(n,r,e)),r)},catch:function(t){return G(e.catch(te(t,r,e)),r)},finally:function(t){return t&&r.onCancelList.push(t),G(e.finally(te(t&&function(){return r.onCancelList=[],t()},r,e)),r)},cancel:function(){r.isCanceled=!0;var e=r.onCancelList;r.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===r.isCanceled}}}function ee(e){return G(e,{isCanceled:!1,onCancelList:[]})}function te(e,t,r){return e?function(r){return t.isCanceled?r:e(r)}:r}function re(e,t,r,n){if(!r)return null;if(e<0&&(null===t||null!==n&&0===t))return r+e;var o=(null===t?-1:t)+e;return o<=-1||o>=r?null===n?null:0:o}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oe(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(S++),plugins:o,initialState:Oe({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(be(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:w,onResolve:w};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=oe(oe({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return g(e)})).then((function(e){return e.map((function(e){return Oe(Oe({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:Oe({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function we(e){return we="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},we(e)}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ke,Je,$e,ze=null,Qe=(Ke=-1,Je=-1,$e=void 0,function(e){var t=++Ke;return Promise.resolve(e).then((function(e){return $e&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function rt(e){return rt="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},rt(e)}var nt=["props","refresh","store"],ot=["inputElement","formElement","panelElement"],it=["inputElement"],at=["inputElement","maxLength"],ct=["sourceIndex"],lt=["sourceIndex"],ut=["item","source","sourceIndex"];function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dt(e){var t=e.props,r=e.refresh,n=e.store,o=pt(e,nt),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return ft({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},pt(e,ot))},getRootProps:function(e){return ft({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return ft({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(ft({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(ft({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},pt(e,it))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=pt(r,ct);return ft({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function a(e){(t.openOnFocus||Boolean(n.getState().query))&&We(ft({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var c=e||{},l=(c.inputElement,c.maxLength),u=void 0===l?512:l,s=pt(c,at),f=ce(n.getState()),m=function(e){return Boolean(e&&e.match(le))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),p=null!=f&&f.itemUrl&&!m?"go":"search";return ft({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){We(ft({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=tt(e,Ye);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ce(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(Ge({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?We(Ge({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ce(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(Ge({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(Ge({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(Ge({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});We(Ge({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(Ge({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(ft({event:e,props:t,refresh:r,store:n},o))},onFocus:a,onBlur:w,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||a(r)}},s)},getPanelProps:function(e){return ft({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=pt(r,lt);return ft({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=pt(e,ut);return ft({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ce(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(ft({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():We(ft({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(ft({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}function vt(e){return vt="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},vt(e)}function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t0&&n.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},n.createElement("p",{className:"DocSearch-Help"},u,":"),n.createElement("ul",null,v.slice(0,3).reduce((function(e,t){return[].concat(s(e),[n.createElement("li",{key:t},n.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){o.setQuery(t.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},t))])}),[]))),o.getMissingResultsUrl&&n.createElement("p",{className:"DocSearch-Help"},"".concat(m," "),n.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},d)))}var Wt=["hit","attribute","tagName"];function Zt(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Yt(e){var r=e.hit,n=e.attribute,o=e.tagName,a=void 0===o?"span":o,c=l(e,Wt);return t.createElement(a,i(i({},c),{},{dangerouslySetInnerHTML:{__html:Zt(r,"_snippetResult.".concat(n,".value"))||Zt(r,n)}}))}function Xt(e){return e.collection&&0!==e.collection.items.length?n.createElement("section",{className:"DocSearch-Hits"},n.createElement("div",{className:"DocSearch-Hit-source"},e.title),n.createElement("ul",e.getListProps(),e.collection.items.map((function(t,r){return n.createElement(Gt,c({key:[e.title,t.objectID].join(":"),item:t,index:r},e))})))):null}function Gt(e){var t=e.item,r=e.index,o=e.renderIcon,i=e.renderAction,a=e.getItemProps,l=e.onItemClick,s=e.collection,f=e.hitComponent,m=u(n.useState(!1),2),p=m[0],d=m[1],v=u(n.useState(!1),2),h=v[0],y=v[1],b=n.useRef(null),g=f;return n.createElement("li",c({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",p&&"DocSearch-Hit--deleting",h&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){b.current&&b.current()}},a({item:t,source:s.source,onClick:function(e){l(t,e)}})),n.createElement(g,{hit:t},n.createElement("div",{className:"DocSearch-Hit-Container"},o({item:t,index:r}),t.hierarchy[t.type]&&"lvl1"===t.type&&n.createElement("div",{className:"DocSearch-Hit-content-wrapper"},n.createElement(Yt,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&n.createElement(Yt,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&n.createElement("div",{className:"DocSearch-Hit-content-wrapper"},n.createElement(Yt,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),n.createElement(Yt,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&n.createElement("div",{className:"DocSearch-Hit-content-wrapper"},n.createElement(Yt,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),n.createElement(Yt,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),i({item:t,runDeleteTransition:function(e){d(!0),b.current=e},runFavoriteTransition:function(e){y(!0),b.current=e}}))))}function er(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}function tr(e){return e}function rr(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nr(){}var or=/(|<\/mark>)/g,ir=RegExp(or.source);function ar(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&ir.test(o)?o.replace(or,""):o}function cr(e){return n.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var r=ar(t.items[0]);return n.createElement(Xt,c({},e,{key:t.source.sourceId,title:r,collection:t,renderIcon:function(e){var r,o=e.item,i=e.index;return n.createElement(n.Fragment,null,o.__docsearch_parent&&n.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},n.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},o.__docsearch_parent!==(null===(r=t.items[i+1])||void 0===r?void 0:r.__docsearch_parent)?n.createElement("path",{d:"M8 6v21M20 27H8.3"}):n.createElement("path",{d:"M8 6v42M20 27H8.3"}))),n.createElement("div",{className:"DocSearch-Hit-icon"},n.createElement(Bt,{type:o.type})))},renderAction:function(){return n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement(Mt,null))}}))})),e.resultsFooterComponent&&n.createElement("section",{className:"DocSearch-HitsFooter"},n.createElement(e.resultsFooterComponent,{state:e.state})))}var lr=["translations"];function ur(e){var t=e.translations,r=void 0===t?{}:t,o=l(e,lr),i=r.recentSearchesTitle,a=void 0===i?"Recent":i,u=r.noRecentSearchesText,s=void 0===u?"No recent searches":u,f=r.saveRecentSearchButtonTitle,m=void 0===f?"Save this search":f,p=r.removeRecentSearchButtonTitle,d=void 0===p?"Remove this search from history":p,v=r.favoriteSearchesTitle,h=void 0===v?"Favorite":v,y=r.removeFavoriteSearchButtonTitle,b=void 0===y?"Remove this search from favorites":y;return"idle"===o.state.status&&!1===o.hasCollections?o.disableUserPersonalization?null:n.createElement("div",{className:"DocSearch-StartScreen"},n.createElement("p",{className:"DocSearch-Help"},s)):!1===o.hasCollections?null:n.createElement("div",{className:"DocSearch-Dropdown-Container"},n.createElement(Xt,c({},o,{title:a,collection:o.state.collections[0],renderIcon:function(){return n.createElement("div",{className:"DocSearch-Hit-icon"},n.createElement(qt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,i=e.runDeleteTransition;return n.createElement(n.Fragment,null,n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){o.favoriteSearches.add(t),o.recentSearches.remove(t),o.refresh()}))}},n.createElement(Vt,null))),n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),i((function(){o.recentSearches.remove(t),o.refresh()}))}},n.createElement(Lt,null))))}})),n.createElement(Xt,c({},o,{title:h,collection:o.state.collections[1],renderIcon:function(){return n.createElement("div",{className:"DocSearch-Hit-icon"},n.createElement(Vt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return n.createElement("div",{className:"DocSearch-Hit-action"},n.createElement("button",{className:"DocSearch-Hit-action-button",title:b,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){o.favoriteSearches.remove(t),o.refresh()}))}},n.createElement(Lt,null)))}})))}var sr=["translations"],fr=n.memo((function(e){var t=e.translations,r=void 0===t?{}:t,o=l(e,sr);if("error"===o.state.status)return n.createElement($t,{translations:null==r?void 0:r.errorScreen});var i=o.state.collections.some((function(e){return e.items.length>0}));return o.state.query?!1===i?n.createElement(Qt,c({},o,{translations:null==r?void 0:r.noResultsScreen})):n.createElement(cr,o):n.createElement(ur,c({},o,{hasCollections:i,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),mr=["translations"];function pr(e){var t=e.translations,r=void 0===t?{}:t,o=l(e,mr),i=r.resetButtonTitle,a=void 0===i?"Clear the query":i,u=r.resetButtonAriaLabel,s=void 0===u?"Clear the query":u,f=r.cancelButtonText,m=void 0===f?"Cancel":f,p=r.cancelButtonAriaLabel,v=void 0===p?"Cancel":p,h=o.getFormProps({inputElement:o.inputRef.current}).onReset;return n.useEffect((function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()}),[o.autoFocus,o.inputRef]),n.useEffect((function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()}),[o.isFromSelection,o.inputRef]),n.createElement(n.Fragment,null,n.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:h},n.createElement("label",c({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),n.createElement(d,null)),n.createElement("div",{className:"DocSearch-LoadingIndicator"},n.createElement(Rt,null)),n.createElement("input",c({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:64}))),n.createElement("button",{type:"reset",title:a,className:"DocSearch-Reset","aria-label":s,hidden:!o.state.query},n.createElement(Lt,null))),n.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":v,onClick:o.onClose},m))}var dr=["_highlightResult","_snippetResult"];function vr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function hr(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=vr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,l(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function yr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function br(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>br({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>br({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>br({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>br({caches:t}).clear()))}}function gr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function Sr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function Or(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const jr="4.19.1",wr={WithinQueryParameters:0,WithinHeaders:1};function Ir(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Pr={Read:1,Write:2,Any:3},Dr=1,Ar=2,Cr=3,kr=12e4;function Nr(e,t=Dr){return{...e,status:t,lastUpdate:Date.now()}}function _r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Pr.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Pr.Any}}const xr="GET",Tr="POST";function Rr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Nr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===Dr||Date.now()-e.lastUpdate>kr}(e))),n=e.filter((e=>function(e){return e.status===Cr&&Date.now()-e.lastUpdate<=kr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>_r(e))):t}}))}function qr(e,t,r,n){const o=[],i=function(e,t){if(e.method===xr||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==xr?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Br(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},d=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},v={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=d(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Fr(n)),e.hostsCache.set(m,Nr(m,r.isTimedOut?Cr:Ar))]).then((()=>f(t,l)))},onFail(e){throw d(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Br(o))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e))(e,v)))};return Rr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Br(e){return e.map((e=>Fr(e)))}function Fr(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Ur=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===wr.WithinHeaders?n:{},queryParameters:()=>e===wr.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:wr.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>_r(e))),read(e,t){const r=Ir(t,f.timeouts.read),n=()=>qr(f,f.hosts.filter((e=>0!=(e.accept&Pr.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>qr(f,f.hosts.filter((e=>0!=(e.accept&Pr.Write))),e,Ir(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Pr.Read},{url:`${t}.algolia.net`,accept:Pr.Write}].concat(Sr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return Or(o,e.methods)},Vr=e=>(t,r)=>t.method===xr?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>Or({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),Jr=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:Tr,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},$r=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Wr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:Tr,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Qr=e=>(t,r)=>e.transporter.read({method:Tr,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Wr=e=>(t,r,n)=>e.transporter.read({method:Tr,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr=1,Yr=2,Xr=3;function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Xr,{debug:(e,t)=>(Zr>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Yr>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:gr(),requestsCache:gr({serializable:!1}),hostsCache:br({caches:[yr({key:`4.19.1-${e}`}),gr()]}),userAgent:Lr(jr).add({segment:"Browser",version:"lite"}),authMode:wr.WithinQueryParameters};var o;return Ur({...n,...r,methods:{search:Jr,searchForFacetValues:$r,multipleQueries:Jr,multipleSearchForFacetValues:$r,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Qr,searchForFacetValues:Wr,findAnswers:zr}})}})}Gr.version=jr;var en="3.5.2";var tn=["footer","searchBox"];function rn(e){var t=e.appId,r=e.apiKey,o=e.indexName,a=e.placeholder,s=void 0===a?"Search docs":a,f=e.searchParameters,m=e.maxResultsPerGroup,p=e.onClose,d=void 0===p?nr:p,v=e.transformItems,h=void 0===v?tr:v,y=e.hitComponent,b=void 0===y?Tt:y,g=e.resultsFooterComponent,S=void 0===g?function(){return null}:g,O=e.navigator,E=e.initialScrollY,j=void 0===E?0:E,w=e.transformSearchClient,I=void 0===w?tr:w,P=e.disableUserPersonalization,D=void 0!==P&&P,A=e.initialQuery,C=void 0===A?"":A,k=e.translations,N=void 0===k?{}:k,_=e.getMissingResultsUrl,x=e.insights,T=void 0!==x&&x,R=N.footer,q=N.searchBox,L=l(N,tn),M=u(n.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),H=M[0],B=M[1],F=n.useRef(null),U=n.useRef(null),V=n.useRef(null),K=n.useRef(null),J=n.useRef(null),$=n.useRef(10),z=n.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,Q=n.useRef(C||z).current,W=function(e,t,r){return n.useMemo((function(){var n=Gr(e,t);return n.addAlgoliaAgent("docsearch",en),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",en),r(n)}),[e,t,r])}(t,r,I),Z=n.useRef(hr({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,Y=n.useRef(hr({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:0===Z.getAll().length?7:4})).current,X=n.useCallback((function(e){if(!D){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Z.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Y.add(t)}}),[Z,Y,D]),G=n.useCallback((function(e){if(H.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};H.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[H.context.algoliaInsightsPlugin]),ee=n.useMemo((function(){return kt({id:"docsearch",defaultActiveItemId:0,placeholder:s,openOnFocus:!0,initialState:{query:Q,context:{searchSuggestions:[]}},insights:T,navigator:O,onStateChange:function(e){B(e.state)},getSources:function(e){var n=e.query,a=e.state,c=e.setContext,l=e.setStatus;if(!n)return D?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;X(t),rr(r)||d()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;X(t),rr(r)||d()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}}];var u=Boolean(T);return W.search([{query:n,indexName:o,params:i({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat($.current),"hierarchy.lvl2:".concat($.current),"hierarchy.lvl3:".concat($.current),"hierarchy.lvl4:".concat($.current),"hierarchy.lvl5:".concat($.current),"hierarchy.lvl6:".concat($.current),"content:".concat($.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:u},f)}]).catch((function(e){throw"RetryError"===e.name&&l("error"),e})).then((function(e){var n=e.results[0],l=n.hits,s=n.nbHits,f=er(l,(function(e){return ar(e)}),m);a.context.searchSuggestions.length0&&(ne(),J.current&&J.current.focus())}),[Q,ne]),n.useEffect((function(){function e(){if(U.current){var e=.01*window.innerHeight;U.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),n.createElement("div",c({ref:F},re({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===H.status&&"DocSearch-Container--Stalled","error"===H.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&d()}}),n.createElement("div",{className:"DocSearch-Modal",ref:U},n.createElement("header",{className:"DocSearch-SearchBar",ref:V},n.createElement(pr,c({},ee,{state:H,autoFocus:0===Q.length,inputRef:J,isFromSelection:Boolean(Q)&&Q===z,translations:q,onClose:d}))),n.createElement("div",{className:"DocSearch-Dropdown",ref:K},n.createElement(fr,c({},ee,{indexName:o,state:H,hitComponent:b,resultsFooterComponent:S,disableUserPersonalization:D,recentSearches:Y,favoriteSearches:Z,inputRef:J,translations:L,getMissingResultsUrl:_,onItemClick:function(e,t){G(e),X(e),rr(t)||d()}}))),n.createElement("footer",{className:"DocSearch-Footer"},n.createElement(xt,{translations:R}))))}function nn(e){var t=e.isOpen,r=e.onOpen,o=e.onClose,i=e.onInput,a=e.searchButtonRef;n.useEffect((function(){function e(e){var n;(27===e.keyCode&&t||"k"===(null===(n=e.key)||void 0===n?void 0:n.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,r=t.tagName;return t.isContentEditable||"INPUT"===r||"SELECT"===r||"TEXTAREA"===r}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?o():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||r()),a&&a.current===document.activeElement&&i&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&i(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,r,o,i,a])}e.DocSearch=function(e){var t,o,i=n.useRef(null),a=u(n.useState(!1),2),l=a[0],s=a[1],f=u(n.useState((null==e?void 0:e.initialQuery)||void 0),2),m=f[0],p=f[1],d=n.useCallback((function(){s(!0)}),[s]),v=n.useCallback((function(){s(!1)}),[s]);return nn({isOpen:l,onOpen:d,onClose:v,onInput:n.useCallback((function(e){s(!0),p(e.key)}),[s,p]),searchButtonRef:i}),n.createElement(n.Fragment,null,n.createElement(y,{ref:i,translations:null==e||null===(t=e.translations)||void 0===t?void 0:t.button,onClick:d}),l&&r.createPortal(n.createElement(rn,c({},e,{initialScrollY:window.scrollY,initialQuery:m,translations:null==e||null===(o=e.translations)||void 0===o?void 0:o.modal,onClose:v})),document.body))},e.DocSearchButton=y,e.DocSearchModal=rn,e.useDocSearchKeyboardEvents=nn,e.version=en,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=index.js.map diff --git a/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js.map b/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js.map new file mode 100644 index 00000000..4e33772f --- /dev/null +++ b/paperai-docs/node_modules/@docsearch/react/dist/umd/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../src/icons/ControlKeyIcon.tsx","../../src/icons/SearchIcon.tsx","../../src/DocSearchButton.tsx","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/debounce.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/flatten.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/generateAutocompleteId.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/getItemsCount.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/isEqual.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/noop.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/userAgents.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/version.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","../../../../node_modules/@algolia/autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../../node_modules/@algolia/autocomplete-shared/dist/esm/createRef.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNextActiveItemId.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getNormalizedSources.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/getActiveItem.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isSamsung.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createStore.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getAutocompleteSetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getDefaultProps.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/reshape.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/resolve.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onInput.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/onKeyDown.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getPropGetters.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/utils/isOrContainsNode.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/metadata.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/getCompletion.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/stateReducer.js","../../../../node_modules/@algolia/autocomplete-core/dist/esm/createAutocomplete.js","../../src/AlgoliaLogo.tsx","../../src/Footer.tsx","../../src/Hit.tsx","../../src/icons/LoadingIcon.tsx","../../src/icons/RecentIcon.tsx","../../src/icons/ResetIcon.tsx","../../src/icons/SelectIcon.tsx","../../src/icons/SourceIcon.tsx","../../src/icons/StarIcon.tsx","../../src/icons/ErrorIcon.tsx","../../src/icons/NoResultsIcon.tsx","../../src/ErrorScreen.tsx","../../src/NoResultsScreen.tsx","../../src/Snippet.tsx","../../src/Results.tsx","../../src/utils/groupBy.ts","../../src/utils/identity.ts","../../src/utils/isModifierEvent.ts","../../src/utils/noop.ts","../../src/utils/removeHighlightTags.ts","../../src/ResultsScreen.tsx","../../src/StartScreen.tsx","../../src/ScreenState.tsx","../../src/SearchBox.tsx","../../src/constants.ts","../../src/stored-searches.ts","../../node_modules/algoliasearch/dist/algoliasearch-lite.esm.browser.js","../../src/version.ts","../../src/DocSearchModal.tsx","../../src/useSearchClient.ts","../../src/useTouchEvents.ts","../../src/useTrapFocus.ts","../../src/useDocSearchKeyboardEvents.ts","../../src/DocSearch.tsx"],"sourcesContent":["import React from 'react';\n\nexport function ControlKeyIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function SearchIcon() {\n return (\n \n \n \n );\n}\n","import React, { useEffect, useState } from 'react';\n\nimport { ControlKeyIcon } from './icons/ControlKeyIcon';\nimport { SearchIcon } from './icons/SearchIcon';\n\nexport type ButtonTranslations = Partial<{\n buttonText: string;\n buttonAriaLabel: string;\n}>;\n\nexport type DocSearchButtonProps = React.ComponentProps<'button'> & {\n translations?: ButtonTranslations;\n};\n\nconst ACTION_KEY_DEFAULT = 'Ctrl' as const;\nconst ACTION_KEY_APPLE = '⌘' as const;\n\nfunction isAppleDevice() {\n return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n}\n\nexport const DocSearchButton = React.forwardRef<\n HTMLButtonElement,\n DocSearchButtonProps\n>(({ translations = {}, ...props }, ref) => {\n const { buttonText = 'Search', buttonAriaLabel = 'Search' } = translations;\n\n const [key, setKey] = useState<\n typeof ACTION_KEY_APPLE | typeof ACTION_KEY_DEFAULT | null\n >(null);\n\n useEffect(() => {\n if (typeof navigator !== 'undefined') {\n isAppleDevice() ? setKey(ACTION_KEY_APPLE) : setKey(ACTION_KEY_DEFAULT);\n }\n }, []);\n\n return (\n \n \n \n {buttonText}\n \n\n \n {key !== null && (\n <>\n \n {key === ACTION_KEY_DEFAULT ? : key}\n \n K\n \n )}\n \n \n );\n});\n","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export var version = '1.9.3';","export function createClickedEvent(_ref) {\n var item = _ref.item,\n items = _ref.items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.6.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: {\n clickAnalytics: true\n },\n insights: insights\n }\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: previousItems.current\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: [].concat(_toConsumableArray(event.algoliaSource || []), ['autocomplete-internal'])\n });\n })));\n },\n onActive: noop\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","function createInternalCancelablePromise(promise, initialState) {\n var state = initialState;\n return {\n then: function then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state);\n },\n catch: function _catch(onrejected) {\n return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state);\n },\n finally: function _finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () {\n state.onCancelList = [];\n return onfinally();\n }, state, promise)), state);\n },\n cancel: function cancel() {\n state.isCanceled = true;\n var callbacks = state.onCancelList;\n state.onCancelList = [];\n callbacks.forEach(function (callback) {\n callback();\n });\n },\n isCanceled: function isCanceled() {\n return state.isCanceled === true;\n }\n };\n}\nexport function createCancelablePromise(executor) {\n return createInternalCancelablePromise(new Promise(function (resolve, reject) {\n return executor(resolve, reject);\n }), {\n isCanceled: false,\n onCancelList: []\n });\n}\ncreateCancelablePromise.resolve = function (value) {\n return cancelable(Promise.resolve(value));\n};\ncreateCancelablePromise.reject = function (reason) {\n return cancelable(Promise.reject(reason));\n};\nexport function cancelable(promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: []\n });\n}\nfunction createCallback(onResult, state, fallback) {\n if (!onResult) {\n return fallback;\n }\n return function callback(arg) {\n if (state.isCanceled) {\n return arg;\n }\n return onResult(arg);\n };\n}","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {\n if (!itemCount) {\n return null;\n }\n if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {\n return itemCount + moveAmount;\n }\n var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n return numericIndex;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { invariant, decycle, noop } from '@algolia/autocomplete-shared';\nexport function getNormalizedSources(getSources, params) {\n var seenSourceIds = [];\n return Promise.resolve(getSources(params)).then(function (sources) {\n invariant(Array.isArray(sources), function () {\n return \"The `getSources` function must return an array of sources but returned type \".concat(JSON.stringify(_typeof(sources)), \":\\n\\n\").concat(JSON.stringify(decycle(sources), null, 2));\n });\n return Promise.all(sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter(function (maybeSource) {\n return Boolean(maybeSource);\n }).map(function (source) {\n invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\"[Autocomplete] The `sourceId` \".concat(JSON.stringify(source.sourceId), \" is not unique.\"));\n }\n seenSourceIds.push(source.sourceId);\n var defaultSource = {\n getItemInputValue: function getItemInputValue(_ref) {\n var state = _ref.state;\n return state.query;\n },\n getItemUrl: function getItemUrl() {\n return undefined;\n },\n onSelect: function onSelect(_ref2) {\n var setIsOpen = _ref2.setIsOpen;\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop\n };\n Object.keys(defaultSource).forEach(function (key) {\n defaultSource[key].__default = true;\n });\n var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source);\n return Promise.resolve(normalizedSource);\n }));\n });\n}","// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(state) {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n var accumulatedCollectionsCount = state.collections.map(function (collections) {\n return collections.items.length;\n }).reduce(function (acc, collectionsCount, index) {\n var previousValue = acc[index - 1] || 0;\n var nextValue = previousValue + collectionsCount;\n acc.push(nextValue);\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {\n if (current <= state.activeItemId) {\n return acc + 1;\n }\n return acc;\n }, 0);\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId(_ref) {\n var state = _ref.state,\n collection = _ref.collection;\n var isOffsetFound = false;\n var counter = 0;\n var previousItemsOffset = 0;\n while (isOffsetFound === false) {\n var currentCollection = state.collections[counter];\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n previousItemsOffset += currentCollection.items.length;\n counter++;\n }\n return state.activeItemId - previousItemsOffset;\n}\nexport function getActiveItem(state) {\n var collection = getCollectionFromActiveItemId(state);\n if (!collection) {\n return null;\n }\n var item = collection.items[getRelativeActiveItemId({\n state: state,\n collection: collection\n })];\n var source = collection.source;\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: state\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: state\n });\n return {\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n source: source\n };\n}","var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\nexport function isSamsung(userAgent) {\n return Boolean(userAgent && userAgent.match(regex));\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createCancelablePromiseList } from './utils';\nexport function createStore(reducer, props, onStoreStateChange) {\n var state = props.initialState;\n return {\n getState: function getState() {\n return state;\n },\n dispatch: function dispatch(action, payload) {\n var prevState = _objectSpread({}, state);\n state = reducer(state, {\n type: action,\n props: props,\n payload: payload\n });\n onStoreStateChange({\n state: state,\n prevState: prevState\n });\n },\n pendingRequests: createCancelablePromiseList()\n };\n}","export function createCancelablePromiseList() {\n var list = [];\n return {\n add: function add(cancelablePromise) {\n list.push(cancelablePromise);\n return cancelablePromise.finally(function () {\n list = list.filter(function (item) {\n return item !== cancelablePromise;\n });\n });\n },\n cancelAll: function cancelAll() {\n list.forEach(function (promise) {\n return promise.cancel();\n });\n },\n isEmpty: function isEmpty() {\n return list.length === 0;\n }\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function getAutocompleteSetters(_ref) {\n var store = _ref.store;\n var setActiveItemId = function setActiveItemId(value) {\n store.dispatch('setActiveItemId', value);\n };\n var setQuery = function setQuery(value) {\n store.dispatch('setQuery', value);\n };\n var setCollections = function setCollections(rawValue) {\n var baseItemId = 0;\n var value = rawValue.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items).map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n __autocomplete_id: baseItemId++\n });\n })\n });\n });\n store.dispatch('setCollections', value);\n };\n var setIsOpen = function setIsOpen(value) {\n store.dispatch('setIsOpen', value);\n };\n var setStatus = function setStatus(value) {\n store.dispatch('setStatus', value);\n };\n var setContext = function setContext(value) {\n store.dispatch('setContext', value);\n };\n return {\n setActiveItemId: setActiveItemId,\n setQuery: setQuery,\n setCollections: setCollections,\n setIsOpen: setIsOpen,\n setStatus: setStatus,\n setContext: setContext\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared';\nimport { getNormalizedSources } from './utils';\nexport function getDefaultProps(props, pluginSubscribers) {\n var _props$id;\n /* eslint-disable no-restricted-globals */\n var environment = typeof window !== 'undefined' ? window : {};\n /* eslint-enable no-restricted-globals */\n var plugins = props.plugins || [];\n return _objectSpread(_objectSpread({\n debug: false,\n openOnFocus: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: false,\n environment: environment,\n shouldPanelOpen: function shouldPanelOpen(_ref) {\n var state = _ref.state;\n return getItemsCount(state) > 0;\n },\n reshape: function reshape(_ref2) {\n var sources = _ref2.sources;\n return sources;\n }\n }, props), {}, {\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(),\n plugins: plugins,\n // The following props need to be deeply defaulted.\n initialState: _objectSpread({\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {}\n }, props.initialState),\n onStateChange: function onStateChange(params) {\n var _props$onStateChange;\n (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);\n plugins.forEach(function (x) {\n var _x$onStateChange;\n return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);\n });\n },\n onSubmit: function onSubmit(params) {\n var _props$onSubmit;\n (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);\n plugins.forEach(function (x) {\n var _x$onSubmit;\n return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);\n });\n },\n onReset: function onReset(params) {\n var _props$onReset;\n (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);\n plugins.forEach(function (x) {\n var _x$onReset;\n return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);\n });\n },\n getSources: function getSources(params) {\n return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {\n return plugin.getSources;\n })), [props.getSources]).filter(Boolean).map(function (getSources) {\n return getNormalizedSources(getSources, params);\n })).then(function (nested) {\n return flatten(nested);\n }).then(function (sources) {\n return sources.map(function (source) {\n return _objectSpread(_objectSpread({}, source), {}, {\n onSelect: function onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onSelect;\n return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);\n });\n },\n onActive: function onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onActive;\n return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);\n });\n },\n onResolve: function onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onResolve;\n return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params);\n });\n }\n });\n });\n });\n },\n navigator: _objectSpread({\n navigate: function navigate(_ref3) {\n var itemUrl = _ref3.itemUrl;\n environment.location.assign(itemUrl);\n },\n navigateNewTab: function navigateNewTab(_ref4) {\n var itemUrl = _ref4.itemUrl;\n var windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();\n },\n navigateNewWindow: function navigateNewWindow(_ref5) {\n var itemUrl = _ref5.itemUrl;\n environment.open(itemUrl, '_blank', 'noopener');\n }\n }, props.navigator)\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function reshape(_ref) {\n var collections = _ref.collections,\n props = _ref.props,\n state = _ref.state;\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n var originalSourcesBySourceId = collections.reduce(function (acc, collection) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, {\n getItems: function getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n }\n })));\n }, {});\n var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n }, {\n sourcesBySourceId: originalSourcesBySourceId,\n state: state\n }),\n sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId;\n var reshapeSources = props.reshape({\n sourcesBySourceId: sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state: state\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources).filter(Boolean).map(function (source) {\n return {\n source: source,\n items: source.getItems()\n };\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport { mapToAlgoliaResponse } from './utils';\nfunction isDescription(item) {\n return Boolean(item.execute);\n}\nfunction isRequesterDescription(description) {\n return Boolean(description === null || description === void 0 ? void 0 : description.execute);\n}\nexport function preResolve(itemsOrDescription, sourceId, state) {\n if (isRequesterDescription(itemsOrDescription)) {\n var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) {\n var _state$context$key;\n return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters;\n })))) : {};\n return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {\n requests: itemsOrDescription.queries.map(function (query) {\n return {\n query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, {\n params: _objectSpread(_objectSpread({}, contextParameters), query.params)\n }) : query,\n sourceId: sourceId,\n transformResponse: itemsOrDescription.transformResponse\n };\n })\n });\n }\n return {\n items: itemsOrDescription,\n sourceId: sourceId\n };\n}\nexport function resolve(items) {\n var packed = items.reduce(function (acc, current) {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n var searchClient = current.searchClient,\n execute = current.execute,\n requesterId = current.requesterId,\n requests = current.requests;\n var container = acc.find(function (item) {\n return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId;\n });\n if (container) {\n var _container$items;\n (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));\n } else {\n var request = {\n execute: execute,\n requesterId: requesterId,\n items: requests,\n searchClient: searchClient\n };\n acc.push(request);\n }\n return acc;\n }, []);\n var values = packed.map(function (maybeDescription) {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(maybeDescription);\n }\n var _ref = maybeDescription,\n execute = _ref.execute,\n items = _ref.items,\n searchClient = _ref.searchClient;\n return execute({\n searchClient: searchClient,\n requests: items\n });\n });\n return Promise.all(values).then(function (responses) {\n return flatten(responses);\n });\n}\nexport function postResolve(responses, sources, store) {\n return sources.map(function (source) {\n var matches = responses.filter(function (response) {\n return response.sourceId === source.sourceId;\n });\n var results = matches.map(function (_ref2) {\n var items = _ref2.items;\n return items;\n });\n var transform = matches[0].transformResponse;\n var items = transform ? transform(mapToAlgoliaResponse(results)) : results;\n source.onResolve({\n source: source,\n results: results,\n items: items,\n state: store.getState()\n });\n invariant(Array.isArray(items), function () {\n return \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned type \").concat(JSON.stringify(_typeof(items)), \":\\n\\n\").concat(JSON.stringify(decycle(items), null, 2), \".\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\");\n });\n invariant(items.every(Boolean), \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned \").concat(JSON.stringify(undefined), \".\\n\\nDid you forget to return items?\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\"));\n return {\n source: source,\n items: items\n };\n });\n}","export function mapToAlgoliaResponse(rawResults) {\n return {\n results: rawResults,\n hits: rawResults.map(function (result) {\n return result.hits;\n }).filter(Boolean),\n facetHits: rawResults.map(function (result) {\n var _facetHits;\n return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted\n }\n }\n };\n });\n }).filter(Boolean)\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"nextState\", \"props\", \"query\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport { cancelable, createConcurrentSafePromise, getActiveItem } from './utils';\nvar lastStalledId = null;\nvar runConcurrentSafePromise = createConcurrentSafePromise();\nexport function onInput(_ref) {\n var event = _ref.event,\n _ref$nextState = _ref.nextState,\n nextState = _ref$nextState === void 0 ? {} : _ref$nextState,\n props = _ref.props,\n query = _ref.query,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n var setCollections = setters.setCollections,\n setIsOpen = setters.setIsOpen,\n setQuery = setters.setQuery,\n setActiveItemId = setters.setActiveItemId,\n setStatus = setters.setStatus;\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n if (!query && props.openOnFocus === false) {\n var _nextState$isOpen;\n var collections = store.getState().collections.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n items: []\n });\n });\n setStatus('idle');\n setCollections(collections);\n setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({\n state: store.getState()\n }));\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n var _request = cancelable(runConcurrentSafePromise(collections).then(function () {\n return Promise.resolve();\n }));\n return store.pendingRequests.add(_request);\n }\n setStatus('loading');\n lastStalledId = props.environment.setTimeout(function () {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters)).then(function (sources) {\n return Promise.all(sources.map(function (source) {\n return Promise.resolve(source.getItems(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters))).then(function (itemsOrDescription) {\n return preResolve(itemsOrDescription, source.sourceId, store.getState());\n });\n })).then(resolve).then(function (responses) {\n return postResolve(responses, sources, store);\n }).then(function (collections) {\n return reshape({\n collections: collections,\n props: props,\n state: store.getState()\n });\n });\n }))).then(function (collections) {\n var _nextState$isOpen2;\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n setCollections(collections);\n var isPanelOpen = props.shouldPanelOpen({\n state: store.getState()\n });\n setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }).finally(function () {\n setStatus('idle');\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n return store.pendingRequests.add(request);\n}","/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n var basePromiseId = -1;\n var latestResolvedId = -1;\n var latestResolvedValue = undefined;\n return function runConcurrentSafePromise(promise) {\n basePromiseId++;\n var currentPromiseId = basePromiseId;\n return Promise.resolve(promise).then(function (x) {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var nodeItem = props.environment.document.getElementById(\"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"sourceIndex\"],\n _excluded6 = [\"sourceIndex\"],\n _excluded7 = [\"item\", \"source\", \"sourceIndex\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, isOrContainsNode, isSamsung } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\")\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref2 = providedProps || {},\n inputElement = _ref2.inputElement,\n _ref2$maxLength = _ref2.maxLength,\n maxLength = _ref2$maxLength === void 0 ? 512 : _ref2$maxLength,\n rest = _objectWithoutProperties(_ref2, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search';\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? \"\".concat(props.id, \"-item-\").concat(store.getState().activeItemId) : undefined,\n 'aria-controls': store.getState().isOpen ? \"\".concat(props.id, \"-list\") : undefined,\n 'aria-labelledby': \"\".concat(props.id, \"-label\"),\n value: store.getState().completion || store.getState().query,\n id: \"\".concat(props.id, \"-input\"),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getAutocompleteId = function getAutocompleteId(instanceId, sourceId) {\n return typeof sourceId !== 'undefined' ? \"\".concat(instanceId, \"-\").concat(sourceId) : instanceId;\n };\n var getLabelProps = function getLabelProps(providedProps) {\n var _ref3 = providedProps || {},\n sourceIndex = _ref3.sourceIndex,\n rest = _objectWithoutProperties(_ref3, _excluded5);\n return _objectSpread({\n htmlFor: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-input\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\")\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref4 = providedProps || {},\n sourceIndex = _ref4.sourceIndex,\n rest = _objectWithoutProperties(_ref4, _excluded6);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-label\"),\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-list\")\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n sourceIndex = providedProps.sourceIndex,\n rest = _objectWithoutProperties(providedProps, _excluded7);\n return _objectSpread({\n id: \"\".concat(getAutocompleteId(props.id, sourceIndex), \"-item-\").concat(item.__autocomplete_id),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n if (options.insights && !props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n })) {\n var insightsParams = typeof options.insights === 'boolean' ? {} : options.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n props.plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","import React from 'react';\n\ntype AlgoliaLogoTranslations = Partial<{\n searchByText: string;\n}>;\n\ntype AlgoliaLogoProps = {\n translations?: AlgoliaLogoTranslations;\n};\n\nexport function AlgoliaLogo({ translations = {} }: AlgoliaLogoProps) {\n const { searchByText = 'Search by' } = translations;\n\n return (\n \n {searchByText}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React from 'react';\n\nimport { AlgoliaLogo } from './AlgoliaLogo';\n\nexport type FooterTranslations = Partial<{\n selectText: string;\n selectKeyAriaLabel: string;\n navigateText: string;\n navigateUpKeyAriaLabel: string;\n navigateDownKeyAriaLabel: string;\n closeText: string;\n closeKeyAriaLabel: string;\n searchByText: string;\n}>;\n\ntype FooterProps = Partial<{\n translations: FooterTranslations;\n}>;\n\ninterface CommandIconProps {\n children: React.ReactNode;\n ariaLabel: string;\n}\n\nfunction CommandIcon(props: CommandIconProps) {\n return (\n \n \n {props.children}\n \n \n );\n}\n\nexport function Footer({ translations = {} }: FooterProps) {\n const {\n selectText = 'to select',\n selectKeyAriaLabel = 'Enter key',\n navigateText = 'to navigate',\n navigateUpKeyAriaLabel = 'Arrow up',\n navigateDownKeyAriaLabel = 'Arrow down',\n closeText = 'to close',\n closeKeyAriaLabel = 'Escape key',\n searchByText = 'Search by',\n } = translations;\n\n return (\n <>\n
\n \n
\n
    \n
  • \n \n \n \n \n \n {selectText}\n
  • \n
  • \n \n \n \n \n \n \n \n \n \n \n {navigateText}\n
  • \n
  • \n \n \n \n \n \n {closeText}\n
  • \n
\n \n );\n}\n","import React from 'react';\n\nimport type { InternalDocSearchHit, StoredDocSearchHit } from './types';\n\ninterface HitProps {\n hit: InternalDocSearchHit | StoredDocSearchHit;\n children: React.ReactNode;\n}\n\nexport function Hit({ hit, children }: HitProps) {\n return {children};\n}\n","import React from 'react';\n\nexport function LoadingIcon() {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React from 'react';\n\nexport function RecentIcon() {\n return (\n \n \n \n \n \n \n );\n}\n","import React from 'react';\n\nexport function ResetIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function SelectIcon() {\n return (\n \n \n \n \n \n \n );\n}\n","import React from 'react';\n\nconst LvlIcon: React.FC = () => {\n return (\n \n \n \n );\n};\n\nexport function SourceIcon(props: { type: string }) {\n switch (props.type) {\n case 'lvl1':\n return ;\n case 'content':\n return ;\n default:\n return ;\n }\n}\n\nfunction AnchorIcon() {\n return (\n \n \n \n );\n}\n\nfunction ContentIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function StarIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function ErrorIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nexport function NoResultsIcon() {\n return (\n \n \n \n );\n}\n","import React from 'react';\n\nimport { ErrorIcon } from './icons';\n\nexport type ErrorScreenTranslations = Partial<{\n titleText: string;\n helpText: string;\n}>;\n\ntype ErrorScreenProps = {\n translations?: ErrorScreenTranslations;\n};\n\nexport function ErrorScreen({ translations = {} }: ErrorScreenProps) {\n const {\n titleText = 'Unable to fetch results',\n helpText = 'You might want to check your network connection.',\n } = translations;\n return (\n
\n
\n \n
\n

{titleText}

\n

{helpText}

\n
\n );\n}\n","import React from 'react';\n\nimport { NoResultsIcon } from './icons';\nimport type { ScreenStateProps } from './ScreenState';\nimport type { InternalDocSearchHit } from './types';\n\nexport type NoResultsScreenTranslations = Partial<{\n noResultsText: string;\n suggestedQueryText: string;\n reportMissingResultsText: string;\n reportMissingResultsLinkText: string;\n}>;\n\ntype NoResultsScreenProps = Omit<\n ScreenStateProps,\n 'translations'\n> & {\n translations?: NoResultsScreenTranslations;\n};\n\nexport function NoResultsScreen({\n translations = {},\n ...props\n}: NoResultsScreenProps) {\n const {\n noResultsText = 'No results for',\n suggestedQueryText = 'Try searching for',\n reportMissingResultsText = 'Believe this query should return results?',\n reportMissingResultsLinkText = 'Let us know.',\n } = translations;\n const searchSuggestions: string[] | undefined = props.state.context\n .searchSuggestions as string[];\n\n return (\n
\n
\n \n
\n

\n {noResultsText} \"{props.state.query}\"\n

\n\n {searchSuggestions && searchSuggestions.length > 0 && (\n
\n

{suggestedQueryText}:

\n
    \n {searchSuggestions.slice(0, 3).reduce(\n (acc, search) => [\n ...acc,\n
  • \n {\n props.setQuery(search.toLowerCase() + ' ');\n props.refresh();\n props.inputRef.current!.focus();\n }}\n >\n {search}\n \n
  • ,\n ],\n []\n )}\n
\n
\n )}\n\n {props.getMissingResultsUrl && (\n

\n {`${reportMissingResultsText} `}\n \n {reportMissingResultsLinkText}\n \n

\n )}\n
\n );\n}\n","import { createElement } from 'react';\n\nimport type { StoredDocSearchHit } from './types';\n\nfunction getPropertyByPath(object: Record, path: string): any {\n const parts = path.split('.');\n\n return parts.reduce((prev, current) => {\n if (prev?.[current]) return prev[current];\n return null;\n }, object);\n}\n\ninterface SnippetProps {\n hit: TItem;\n attribute: string;\n tagName?: string;\n [prop: string]: unknown;\n}\n\nexport function Snippet({\n hit,\n attribute,\n tagName = 'span',\n ...rest\n}: SnippetProps) {\n return createElement(tagName, {\n ...rest,\n dangerouslySetInnerHTML: {\n __html:\n getPropertyByPath(hit, `_snippetResult.${attribute}.value`) ||\n getPropertyByPath(hit, attribute),\n },\n });\n}\n","import type {\n AutocompleteApi,\n AutocompleteState,\n BaseItem,\n} from '@algolia/autocomplete-core';\nimport React from 'react';\n\nimport type { DocSearchProps } from './DocSearch';\nimport { Snippet } from './Snippet';\nimport type { InternalDocSearchHit, StoredDocSearchHit } from './types';\n\ninterface ResultsProps\n extends AutocompleteApi<\n TItem,\n React.FormEvent,\n React.MouseEvent,\n React.KeyboardEvent\n > {\n title: string;\n collection: AutocompleteState['collections'][0];\n renderIcon: (props: { item: TItem; index: number }) => React.ReactNode;\n renderAction: (props: {\n item: TItem;\n runDeleteTransition: (cb: () => void) => void;\n runFavoriteTransition: (cb: () => void) => void;\n }) => React.ReactNode;\n onItemClick: (item: TItem, event: KeyboardEvent | MouseEvent) => void;\n hitComponent: DocSearchProps['hitComponent'];\n}\n\nexport function Results(\n props: ResultsProps\n) {\n if (!props.collection || props.collection.items.length === 0) {\n return null;\n }\n\n return (\n
\n
{props.title}
\n\n
    \n {props.collection.items.map((item, index) => {\n return (\n \n );\n })}\n
\n
\n );\n}\n\ninterface ResultProps extends ResultsProps {\n item: TItem;\n index: number;\n}\n\nfunction Result({\n item,\n index,\n renderIcon,\n renderAction,\n getItemProps,\n onItemClick,\n collection,\n hitComponent,\n}: ResultProps) {\n const [isDeleting, setIsDeleting] = React.useState(false);\n const [isFavoriting, setIsFavoriting] = React.useState(false);\n const action = React.useRef<(() => void) | null>(null);\n const Hit = hitComponent!;\n\n function runDeleteTransition(cb: () => void) {\n setIsDeleting(true);\n action.current = cb;\n }\n\n function runFavoriteTransition(cb: () => void) {\n setIsFavoriting(true);\n action.current = cb;\n }\n\n return (\n {\n if (action.current) {\n action.current();\n }\n }}\n {...getItemProps({\n item,\n source: collection.source,\n onClick(event) {\n onItemClick(item, event);\n },\n })}\n >\n \n
\n {renderIcon({ item, index })}\n\n {item.hierarchy[item.type] && item.type === 'lvl1' && (\n
\n \n {item.content && (\n \n )}\n
\n )}\n\n {item.hierarchy[item.type] &&\n (item.type === 'lvl2' ||\n item.type === 'lvl3' ||\n item.type === 'lvl4' ||\n item.type === 'lvl5' ||\n item.type === 'lvl6') && (\n
\n \n \n
\n )}\n\n {item.type === 'content' && (\n
\n \n \n
\n )}\n\n {renderAction({ item, runDeleteTransition, runFavoriteTransition })}\n
\n
\n \n );\n}\n","export function groupBy>(\n values: TValue[],\n predicate: (value: TValue) => string,\n maxResultsPerGroup?: number\n): Record {\n return values.reduce>((acc, item) => {\n const key = predicate(item);\n\n if (!acc.hasOwnProperty(key)) {\n acc[key] = [];\n }\n\n // We limit each section to show 5 hits maximum.\n // This acts as a frontend alternative to `distinct`.\n if (acc[key].length < (maxResultsPerGroup || 5)) {\n acc[key].push(item);\n }\n\n return acc;\n }, {});\n}\n","export function identity(x: TParam): TParam {\n return x;\n}\n","/**\n * Detect when an event is modified with a special key to let the browser\n * trigger its default behavior.\n */\nexport function isModifierEvent(\n event: TEvent\n): boolean {\n const isMiddleClick = (event as MouseEvent).button === 1;\n\n return (\n isMiddleClick ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey\n );\n}\n","export function noop(..._args: any[]): void {}\n","import type { DocSearchHit, InternalDocSearchHit } from '../types';\n\nconst regexHighlightTags = /(|<\\/mark>)/g;\nconst regexHasHighlightTags = RegExp(regexHighlightTags.source);\n\nexport function removeHighlightTags(\n hit: DocSearchHit | InternalDocSearchHit\n): string {\n const internalDocSearchHit = hit as InternalDocSearchHit;\n\n if (!internalDocSearchHit.__docsearch_parent && !hit._highlightResult) {\n return hit.hierarchy.lvl0;\n }\n\n const { value } =\n (internalDocSearchHit.__docsearch_parent\n ? internalDocSearchHit.__docsearch_parent?._highlightResult?.hierarchy\n ?.lvl0\n : hit._highlightResult?.hierarchy?.lvl0) || {};\n\n return value && regexHasHighlightTags.test(value)\n ? value.replace(regexHighlightTags, '')\n : value;\n}\n","import React from 'react';\n\nimport { SelectIcon, SourceIcon } from './icons';\nimport { Results } from './Results';\nimport type { ScreenStateProps } from './ScreenState';\nimport type { InternalDocSearchHit } from './types';\nimport { removeHighlightTags } from './utils';\n\ntype ResultsScreenProps = Omit<\n ScreenStateProps,\n 'translations'\n>;\n\nexport function ResultsScreen(props: ResultsScreenProps) {\n return (\n
\n {props.state.collections.map((collection) => {\n if (collection.items.length === 0) {\n return null;\n }\n\n const title = removeHighlightTags(collection.items[0]);\n\n return (\n (\n <>\n {item.__docsearch_parent && (\n \n \n {item.__docsearch_parent !==\n collection.items[index + 1]?.__docsearch_parent ? (\n \n ) : (\n \n )}\n \n \n )}\n\n
\n \n
\n \n )}\n renderAction={() => (\n
\n \n
\n )}\n />\n );\n })}\n\n {props.resultsFooterComponent && (\n
\n \n
\n )}\n
\n );\n}\n","import React from 'react';\n\nimport { RecentIcon, ResetIcon, StarIcon } from './icons';\nimport { Results } from './Results';\nimport type { ScreenStateProps } from './ScreenState';\nimport type { InternalDocSearchHit } from './types';\n\nexport type StartScreenTranslations = Partial<{\n recentSearchesTitle: string;\n noRecentSearchesText: string;\n saveRecentSearchButtonTitle: string;\n removeRecentSearchButtonTitle: string;\n favoriteSearchesTitle: string;\n removeFavoriteSearchButtonTitle: string;\n}>;\n\ntype StartScreenProps = Omit<\n ScreenStateProps,\n 'translations'\n> & {\n hasCollections: boolean;\n translations?: StartScreenTranslations;\n};\n\nexport function StartScreen({ translations = {}, ...props }: StartScreenProps) {\n const {\n recentSearchesTitle = 'Recent',\n noRecentSearchesText = 'No recent searches',\n saveRecentSearchButtonTitle = 'Save this search',\n removeRecentSearchButtonTitle = 'Remove this search from history',\n favoriteSearchesTitle = 'Favorite',\n removeFavoriteSearchButtonTitle = 'Remove this search from favorites',\n } = translations;\n if (props.state.status === 'idle' && props.hasCollections === false) {\n if (props.disableUserPersonalization) {\n return null;\n }\n\n return (\n
\n

{noRecentSearchesText}

\n
\n );\n }\n\n if (props.hasCollections === false) {\n return null;\n }\n\n return (\n
\n (\n
\n \n
\n )}\n renderAction={({\n item,\n runFavoriteTransition,\n runDeleteTransition,\n }) => (\n <>\n
\n {\n event.preventDefault();\n event.stopPropagation();\n runFavoriteTransition(() => {\n props.favoriteSearches.add(item);\n props.recentSearches.remove(item);\n props.refresh();\n });\n }}\n >\n \n \n
\n
\n {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(() => {\n props.recentSearches.remove(item);\n props.refresh();\n });\n }}\n >\n \n \n
\n \n )}\n />\n\n (\n
\n \n
\n )}\n renderAction={({ item, runDeleteTransition }) => (\n
\n {\n event.preventDefault();\n event.stopPropagation();\n runDeleteTransition(() => {\n props.favoriteSearches.remove(item);\n props.refresh();\n });\n }}\n >\n \n \n
\n )}\n />\n
\n );\n}\n","import type {\n AutocompleteApi,\n AutocompleteState,\n BaseItem,\n} from '@algolia/autocomplete-core';\nimport React from 'react';\n\nimport type { DocSearchProps } from './DocSearch';\nimport type { ErrorScreenTranslations } from './ErrorScreen';\nimport { ErrorScreen } from './ErrorScreen';\nimport type { NoResultsScreenTranslations } from './NoResultsScreen';\nimport { NoResultsScreen } from './NoResultsScreen';\nimport { ResultsScreen } from './ResultsScreen';\nimport type { StartScreenTranslations } from './StartScreen';\nimport { StartScreen } from './StartScreen';\nimport type { StoredSearchPlugin } from './stored-searches';\nimport type { InternalDocSearchHit, StoredDocSearchHit } from './types';\n\nexport type ScreenStateTranslations = Partial<{\n errorScreen: ErrorScreenTranslations;\n startScreen: StartScreenTranslations;\n noResultsScreen: NoResultsScreenTranslations;\n}>;\n\nexport interface ScreenStateProps\n extends AutocompleteApi<\n TItem,\n React.FormEvent,\n React.MouseEvent,\n React.KeyboardEvent\n > {\n state: AutocompleteState;\n recentSearches: StoredSearchPlugin;\n favoriteSearches: StoredSearchPlugin;\n onItemClick: (\n item: InternalDocSearchHit,\n event: KeyboardEvent | MouseEvent\n ) => void;\n inputRef: React.MutableRefObject;\n hitComponent: DocSearchProps['hitComponent'];\n indexName: DocSearchProps['indexName'];\n disableUserPersonalization: boolean;\n resultsFooterComponent: DocSearchProps['resultsFooterComponent'];\n translations: ScreenStateTranslations;\n getMissingResultsUrl?: DocSearchProps['getMissingResultsUrl'];\n}\n\nexport const ScreenState = React.memo(\n ({ translations = {}, ...props }: ScreenStateProps) => {\n if (props.state.status === 'error') {\n return ;\n }\n\n const hasCollections = props.state.collections.some(\n (collection) => collection.items.length > 0\n );\n\n if (!props.state.query) {\n return (\n \n );\n }\n\n if (hasCollections === false) {\n return (\n \n );\n }\n\n return ;\n },\n function areEqual(_prevProps, nextProps) {\n // We don't update the screen when Autocomplete is loading or stalled to\n // avoid UI flashes:\n // - Empty screen → Results screen\n // - NoResults screen → NoResults screen with another query\n return (\n nextProps.state.status === 'loading' ||\n nextProps.state.status === 'stalled'\n );\n }\n);\n","import type {\n AutocompleteApi,\n AutocompleteState,\n} from '@algolia/autocomplete-core';\nimport type { MutableRefObject } from 'react';\nimport React from 'react';\n\nimport { MAX_QUERY_SIZE } from './constants';\nimport { LoadingIcon } from './icons/LoadingIcon';\nimport { ResetIcon } from './icons/ResetIcon';\nimport { SearchIcon } from './icons/SearchIcon';\nimport type { InternalDocSearchHit } from './types';\n\nexport type SearchBoxTranslations = Partial<{\n resetButtonTitle: string;\n resetButtonAriaLabel: string;\n cancelButtonText: string;\n cancelButtonAriaLabel: string;\n}>;\n\ninterface SearchBoxProps\n extends AutocompleteApi<\n InternalDocSearchHit,\n React.FormEvent,\n React.MouseEvent,\n React.KeyboardEvent\n > {\n state: AutocompleteState;\n autoFocus: boolean;\n inputRef: MutableRefObject;\n onClose: () => void;\n isFromSelection: boolean;\n translations?: SearchBoxTranslations;\n}\n\nexport function SearchBox({ translations = {}, ...props }: SearchBoxProps) {\n const {\n resetButtonTitle = 'Clear the query',\n resetButtonAriaLabel = 'Clear the query',\n cancelButtonText = 'Cancel',\n cancelButtonAriaLabel = 'Cancel',\n } = translations;\n const { onReset } = props.getFormProps({\n inputElement: props.inputRef.current,\n });\n\n React.useEffect(() => {\n if (props.autoFocus && props.inputRef.current) {\n props.inputRef.current.focus();\n }\n }, [props.autoFocus, props.inputRef]);\n\n React.useEffect(() => {\n if (props.isFromSelection && props.inputRef.current) {\n props.inputRef.current.select();\n }\n }, [props.isFromSelection, props.inputRef]);\n\n return (\n <>\n {\n event.preventDefault();\n }}\n onReset={onReset}\n >\n \n\n
\n \n
\n\n \n\n