{"version":3,"sources":["webpack://_N_E/../../../next-server/lib/amp.ts","webpack://_N_E/./node_modules/@babel/runtime/helpers/inherits.js","webpack://_N_E/../../../next-server/lib/head.tsx","webpack://_N_E/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://_N_E/../../../next-server/lib/head-manager-context.ts","webpack://_N_E/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://_N_E/../../../next-server/lib/side-effect.tsx","webpack://_N_E/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://_N_E/./public/static/live-black.gif","webpack://_N_E/./node_modules/next/head.js","webpack://_N_E/./public/static/star@3x.png","webpack://_N_E/../../../next-server/lib/amp-context.ts","webpack://_N_E/./components/stars.tsx"],"names":["isInAmpMode","React","AmpStateContext","ampFirst","hybrid","hasQuery","setPrototypeOf","module","exports","subClass","superClass","TypeError","prototype","Object","create","constructor","value","writable","configurable","defaultHead","inAmpMode","head","charSet","name","content","onlyReactElement","child","list","fragmentChild","fragmentList","METATYPES","reduceComponents","headElements","headElementChildren","headElement","props","keys","tags","metaTypes","metaCategories","h","isUnique","key","i","len","metatype","category","categories","unique","c","Head","ampState","useContext","headManager","HeadManagerContext","reduceComponentsToState","iter","Symbol","iterator","Array","from","arrayLikeToArray","arr","isArray","_getPrototypeOf","o","getPrototypeOf","__proto__","self","ReferenceError","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","_hasHeadManager","emitChange","this","Component","_typeof","assertThisInitialized","call","Stars","starIcon","starVacantIcon","score","maxScore","className","starWidth","starHeight","marginRight","stars","push","intersection","Math","ceil","classNames","map","ele","index"],"mappings":"+IAWO,WAEL,OAAOA,EAAYC,qBAAiBC,EA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BI,EA9C3B,cA8C0CC,EA9C1C,gEAmDiBD,GAAa,EAAIK,GAnDlC","file":"static/chunks/bb0dc8f849dcb878a2a78b198a57e71be6359d10.77c945c67a15b14d4ebd.js","sourcesContent":["import React from 'react'\nimport { AmpStateContext } from './amp-context'\n\nexport function isInAmpMode({\n ampFirst = false,\n hybrid = false,\n hasQuery = false,\n} = {}): boolean {\n return ampFirst || (hybrid && hasQuery)\n}\n\nexport function useAmp(): boolean {\n // Don't assign the context value to a variable to save bytes\n return isInAmpMode(React.useContext(AmpStateContext))\n}\n","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","import React, { useContext } from 'react'\nimport Effect from './side-effect'\nimport { AmpStateContext } from './amp-context'\nimport { HeadManagerContext } from './head-manager-context'\nimport { isInAmpMode } from './amp'\n\ntype WithInAmpMode = {\n inAmpMode?: boolean\n}\n\nexport function defaultHead(inAmpMode = false): JSX.Element[] {\n const head = []\n if (!inAmpMode) {\n head.push()\n }\n return head\n}\n\nfunction onlyReactElement(\n list: Array>,\n child: React.ReactChild\n): Array> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n React.Children.toArray(child.props.children).reduce(\n (\n fragmentList: Array>,\n fragmentChild: React.ReactChild\n ): Array> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like \n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n // eslint-disable-next-line default-case\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if (categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headElements List of multiple <Head> instances\n */\nfunction reduceComponents(\n headElements: Array<React.ReactElement<any>>,\n props: WithInAmpMode\n) {\n return headElements\n .reduce(\n (list: React.ReactChild[], headElement: React.ReactElement<any>) => {\n const headElementChildren = React.Children.toArray(\n headElement.props.children\n )\n return list.concat(headElementChildren)\n },\n []\n )\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead(props.inAmpMode))\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.__NEXT_OPTIMIZE_FONTS && !props.inAmpMode) {\n if (\n c.type === 'link' &&\n c.props['href'] &&\n // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.\n ['https://fonts.googleapis.com/css'].some((url) =>\n c.props['href'].startsWith(url)\n )\n ) {\n const newProps = { ...(c.props || {}) }\n newProps['data-href'] = newProps['href']\n newProps['href'] = undefined\n return React.cloneElement(c, newProps)\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const ampState = useContext(AmpStateContext)\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n inAmpMode={isInAmpMode(ampState)}\n >\n {children}\n </Effect>\n )\n}\n\n// TODO: Remove in the next major release\nHead.rewind = () => {}\n\nexport default Head\n","function _nonIterableSpread() {\n 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}\n\nmodule.exports = _nonIterableSpread;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n updateHead?: (state: any) => void\n mountedInstances?: any\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","import React, { Component } from 'react'\n\nconst isServer = typeof window === 'undefined'\n\ntype State = JSX.Element[] | undefined\n\ntype SideEffectProps = {\n reduceComponentsToState: <T>(\n components: Array<React.ReactElement<any>>,\n props: T\n ) => State\n handleStateChange?: (state: State) => void\n headManager: any\n inAmpMode?: boolean\n}\n\nexport default class extends Component<SideEffectProps> {\n private _hasHeadManager: boolean\n\n emitChange = (): void => {\n if (this._hasHeadManager) {\n this.props.headManager.updateHead(\n this.props.reduceComponentsToState(\n [...this.props.headManager.mountedInstances],\n this.props\n )\n )\n }\n }\n\n constructor(props: any) {\n super(props)\n this._hasHeadManager =\n this.props.headManager && this.props.headManager.mountedInstances\n\n if (isServer && this._hasHeadManager) {\n this.props.headManager.mountedInstances.add(this)\n this.emitChange()\n }\n }\n componentDidMount() {\n if (this._hasHeadManager) {\n this.props.headManager.mountedInstances.add(this)\n }\n this.emitChange()\n }\n componentDidUpdate() {\n this.emitChange()\n }\n componentWillUnmount() {\n if (this._hasHeadManager) {\n this.props.headManager.mountedInstances.delete(this)\n }\n this.emitChange()\n }\n\n render() {\n return null\n }\n}\n","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","module.exports = \"https://sf6-scmcdn2-tos.pstatp.com/motor/pc/_next/static/images/live-black-469c982b821b7124bbe7766b509cefb5.gif\";","module.exports = require('./dist/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6TMg3muSW9BXouQsAEy7iKyv1We+Kq6lK19KuY2vDClxluQYRR4wdISDGMMBxpbqXv+DnVNW+TKVj4V0zmQ3LxR1ZDnsjk81wa/7WuTr7m4rKN6ef88E5KH8i9i0lbva8q/lBGY5k3BGJXkn6CaMxSb+upb6JbAb4YP8nJfmR/4skES55sVlhvPnj9oB/4C5S/nO9Lis5UAAAAASUVORK5CYII=\"","import React from 'react'\n\nexport const AmpStateContext: React.Context<any> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n AmpStateContext.displayName = 'AmpStateContext'\n}\n","import classNames from 'classnames'\nimport React from 'react'\n\ninterface IStars {\n starIcon: string\n starVacantIcon?: string\n maxScore?: number\n score: number\n className?: string\n starWidth?: number\n starHeight?: number\n marginRight?: number\n}\n\nexport default function Stars(props: IStars) {\n const {\n starIcon,\n starVacantIcon,\n score,\n maxScore,\n className,\n starWidth = 13,\n starHeight = 12,\n marginRight = 0,\n } = props\n const stars = []\n for (let i = 1; i <= score; i++) {\n stars.push(0)\n }\n const intersection = score % 1\n if (intersection !== 0) {\n stars.push(1)\n }\n\n if (starVacantIcon && maxScore) {\n for (let i = Math.ceil(score); i < maxScore; i++) {\n stars.push(2)\n }\n }\n\n return (\n <div className={classNames(className, 'stars-wrapper')}>\n {stars.map((ele, index) => {\n switch (ele) {\n case 0:\n return <span className=\"star\" key={index} />\n case 1:\n return <span className=\"star-intersected\" key={index} />\n case 2:\n return <span className=\"star-vacant\" key={index} />\n default:\n return null\n }\n })}\n <style jsx>\n {`\n .stars-wrapper {\n display: flex;\n align-items: center;\n }\n .star,\n .star-vacant {\n background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\n width: ${starWidth}px;\n height: ${starHeight}px;\n margin-right: ${marginRight}px;\n }\n .star {\n background-image: url('${starIcon}');\n }\n .star-vacant {\n background-image: url('${starVacantIcon}');\n }\n .star-intersected {\n width: ${starWidth}px;\n height: ${starHeight}px;\n background-position: left;\n background-size: ${starWidth}px ${starHeight}px;\n position: relative;\n background-image: url('${starIcon}');\n }\n .star-intersected::after {\n content: '';\n background-image: url('${starVacantIcon}');\n background-position: right;\n background-size: ${starWidth}px ${starHeight}px;\n position: absolute;\n right: 0;\n top: 0;\n height: 100%;\n width: ${starWidth * (1 - intersection)}px;\n }\n `}\n </style>\n </div>\n )\n}\n"],"sourceRoot":""}