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AGI,SAC5EsB,GAAS,GACTpB,EAAOsB,OAAOF,EAAO,KAaHJ,CAAQ3B,GAAU5C,GAAYA,GAAa0C,EAAW1C,IAAY,CAChFoD,KAAiB,MAAXf,OAAkB,EAASA,EAAQ9B,QACzCJ,eAEJ,OAAO4C,QAGX,IAAKN,EAAS,CACV,MAAMqC,EAAmBC,EAAsBC,qBAAoB,IAAItC,GAAW,KAClF,MAAO,IAAQqC,EAAsBE,mBAAmBH,MAGjE,CACClC,EACAL,EACApC,EACAkC,EACAI,IAEJ,MAAMxC,EAAmBvE,EAAQ2E,aAAY,KACzCqC,GAAW,KACZ,IACH,MAAO,CACHG,EACAJ,EACAxC,IAxFR,IAAIvE,EAASjB,EAAQ,MACjBsK,EAAuBtK,EAAQ,IACnC,MAAM+H,EAA0D,oBAAzBsB,qBACjCH,EAAY,IAAIE,IAChBN,EAAS,IAwFiB,oBAApBxJ,EAAQsB,SAAsD,kBAApBtB,EAAQsB,SAA4C,OAApBtB,EAAQsB,UAA4D,qBAA/BtB,EAAQsB,QAAQC,aACzItB,OAAOC,eAAeF,EAAQsB,QAAS,aAAc,CAAEnB,OAAO,IAC9DF,OAAOuB,OAAOxB,EAAQsB,QAAStB,GAC/BD,EAAOC,QAAUA,EAAQsB","sources":["webpack://_N_E/./node_modules/next/link.js","webpack://_N_E/./node_modules/next/dist/client/get-domain-locale.js","webpack://_N_E/./node_modules/next/dist/client/link.js","webpack://_N_E/./node_modules/next/dist/client/normalize-locale-path.js","webpack://_N_E/./node_modules/next/dist/client/use-intersection.js"],"sourcesContent":["module.exports = require('./dist/client/link')\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getDomainLocale = getDomainLocale;\nconst basePath = process.env.__NEXT_ROUTER_BASEPATH || '';\nfunction getDomainLocale(path, locale, locales, domainLocales) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const normalizeLocalePath = require('./normalize-locale-path').normalizeLocalePath;\n const detectDomainLocale = require('./detect-domain-locale').detectDomainLocale;\n const target = locale || normalizeLocalePath(path, locales).detectedLocale;\n const domain = detectDomainLocale(domainLocales, undefined, target);\n if (domain) {\n const proto = `http${domain.http ? '' : 's'}://`;\n const finalLocale = target === domain.defaultLocale ? '' : `/${target}`;\n return `${proto}${domain.domain}${basePath}${finalLocale}${path}`;\n }\n return false;\n } else {\n return false;\n }\n}\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=get-domain-locale.js.map","\"use client\";\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _interop_require_default = require(\"@swc/helpers/lib/_interop_require_default.js\").default;\nvar _object_without_properties_loose = require(\"@swc/helpers/lib/_object_without_properties_loose.js\").default;\nvar _react = _interop_require_default(require(\"react\"));\nvar _router = require(\"../shared/lib/router/router\");\nvar _formatUrl = require(\"../shared/lib/router/utils/format-url\");\nvar _addLocale = require(\"./add-locale\");\nvar _routerContext = require(\"../shared/lib/router-context\");\nvar _appRouterContext = require(\"../shared/lib/app-router-context\");\nvar _useIntersection = require(\"./use-intersection\");\nvar _getDomainLocale = require(\"./get-domain-locale\");\nvar _addBasePath = require(\"./add-base-path\");\n'use client';\nconst prefetched = new Set();\nfunction prefetch(router, href, as, options) {\n if (typeof window === 'undefined') {\n return;\n }\n if (!(0, _router).isLocalURL(href)) {\n return;\n }\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale = // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined' ? options.locale : 'locale' in router ? router.locale : undefined;\n const prefetchedKey = href + '%' + as + '%' + locale;\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return;\n }\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey);\n }\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n Promise.resolve(router.prefetch(href, as, options)).catch((err)=>{\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err;\n }\n });\n}\nfunction isModifiedEvent(event) {\n const { target } = event.currentTarget;\n return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.nativeEvent && event.nativeEvent.which === 2;\n}\nfunction linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled) {\n const { nodeName } = e.currentTarget;\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A';\n if (isAnchorNodeName && (isModifiedEvent(e) || !(0, _router).isLocalURL(href))) {\n // ignore click for browser’s default behavior\n return;\n }\n e.preventDefault();\n const navigate = ()=>{\n // If the router is an NextRouter instance it will have `beforePopState`\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll\n });\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n forceOptimisticNavigation: !prefetchEnabled\n });\n }\n };\n if (isAppRouter) {\n // @ts-expect-error startTransition exists.\n _react.default.startTransition(navigate);\n } else {\n navigate();\n }\n}\nfunction formatStringOrUrl(urlObjOrString) {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString;\n }\n return (0, _formatUrl).formatUrl(urlObjOrString);\n}\n/**\n * React Component that enables client-side transitions between routes.\n */ const Link = /*#__PURE__*/ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args) {\n return new Error(`Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`\\`, but got \\`${args.actual}\\` instead.` + (typeof window !== 'undefined' ? \"\\nOpen your browser's console to view the Component stack trace.\" : ''));\n }\n // TypeScript trick for type-guarding:\n const requiredPropsGuard = {\n href: true\n };\n const requiredProps = Object.keys(requiredPropsGuard);\n requiredProps.forEach((key)=>{\n if (key === 'href') {\n if (props[key] == null || typeof props[key] !== 'string' && typeof props[key] !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key]\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = key;\n }\n });\n // TypeScript trick for type-guarding:\n const optionalPropsGuard = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true\n };\n const optionalProps = Object.keys(optionalPropsGuard);\n optionalProps.forEach((key)=>{\n const valType = typeof props[key];\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType\n });\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType\n });\n }\n } else if (key === 'onClick' || key === 'onMouseEnter' || key === 'onTouchStart') {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType\n });\n }\n } else if (key === 'replace' || key === 'scroll' || key === 'shallow' || key === 'passHref' || key === 'prefetch' || key === 'legacyBehavior') {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType\n });\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _ = key;\n }\n });\n // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const hasWarned = _react.default.useRef(false);\n if (props.prefetch && !hasWarned.current) {\n hasWarned.current = true;\n console.warn('Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated');\n }\n }\n let children;\n const { href: hrefProp , as: asProp , children: childrenProp , prefetch: prefetchProp , passHref , replace , shallow , scroll , locale , onClick , onMouseEnter: onMouseEnterProp , onTouchStart: onTouchStartProp , legacyBehavior =Boolean(process.env.__NEXT_NEW_LINK_BEHAVIOR) !== true } = props, restProps = _object_without_properties_loose(props, [\n \"href\",\n \"as\",\n \"children\",\n \"prefetch\",\n \"passHref\",\n \"replace\",\n \"shallow\",\n \"scroll\",\n \"locale\",\n \"onClick\",\n \"onMouseEnter\",\n \"onTouchStart\",\n \"legacyBehavior\"\n ]);\n children = childrenProp;\n if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) {\n children = /*#__PURE__*/ _react.default.createElement(\"a\", null, children);\n }\n const prefetchEnabled = prefetchProp !== false;\n const pagesRouter = _react.default.useContext(_routerContext.RouterContext);\n const appRouter = _react.default.useContext(_appRouterContext.AppRouterContext);\n const router = pagesRouter != null ? pagesRouter : appRouter;\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter;\n const { href , as } = _react.default.useMemo(()=>{\n if (!pagesRouter) {\n const resolvedHref = formatStringOrUrl(hrefProp);\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref\n };\n }\n const [resolvedHref, resolvedAs] = (0, _router).resolveHref(pagesRouter, hrefProp, true);\n return {\n href: resolvedHref,\n as: asProp ? (0, _router).resolveHref(pagesRouter, asProp) : resolvedAs || resolvedHref\n };\n }, [\n pagesRouter,\n hrefProp,\n asProp\n ]);\n const previousHref = _react.default.useRef(href);\n const previousAs = _react.default.useRef(as);\n // This will return the first child, if multiple are provided it will throw an error\n let child;\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(`\"onClick\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`);\n }\n if (onMouseEnterProp) {\n console.warn(`\"onMouseEnter\" was passed to with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);\n }\n try {\n child = _react.default.Children.only(children);\n } catch (err) {\n if (!children) {\n throw new Error(`No children were passed to with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`);\n }\n throw new Error(`Multiple children were passed to with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== 'undefined' ? \" \\nOpen your browser's console to view the Component stack trace.\" : ''));\n }\n } else {\n child = _react.default.Children.only(children);\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n var ref;\n if (((ref = children) == null ? void 0 : ref.type) === 'a') {\n throw new Error('Invalid with child. Please remove or use .\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor');\n }\n }\n }\n const childRef = legacyBehavior ? child && typeof child === 'object' && child.ref : forwardedRef;\n const [setIntersectionRef, isVisible, resetVisible] = (0, _useIntersection).useIntersection({\n rootMargin: '200px'\n });\n const setRef = _react.default.useCallback((el)=>{\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible();\n previousAs.current = as;\n previousHref.current = href;\n }\n setIntersectionRef(el);\n if (childRef) {\n if (typeof childRef === 'function') childRef(el);\n else if (typeof childRef === 'object') {\n childRef.current = el;\n }\n }\n }, [\n as,\n childRef,\n href,\n resetVisible,\n setIntersectionRef\n ]);\n // Prefetch the URL if we haven't already and it's visible.\n _react.default.useEffect(()=>{\n if (!router) {\n return;\n }\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return;\n }\n // Prefetch the URL.\n prefetch(router, href, as, {\n locale\n });\n }, [\n as,\n href,\n isVisible,\n locale,\n prefetchEnabled,\n pagesRouter == null ? void 0 : pagesRouter.locale,\n router, \n ]);\n const childProps = {\n ref: setRef,\n onClick: (e)=>{\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(`Component rendered inside next/link has to pass click event to \"onClick\" prop.`);\n }\n }\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onClick === 'function') {\n child.props.onClick(e);\n }\n if (!router) {\n return;\n }\n if (e.defaultPrevented) {\n return;\n }\n linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled);\n },\n onMouseEnter: (e)=>{\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onMouseEnter === 'function') {\n child.props.onMouseEnter(e);\n }\n if (!router) {\n return;\n }\n if (!prefetchEnabled && isAppRouter) {\n return;\n }\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true\n });\n },\n onTouchStart: (e)=>{\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e);\n }\n if (legacyBehavior && child.props && typeof child.props.onTouchStart === 'function') {\n child.props.onTouchStart(e);\n }\n if (!router) {\n return;\n }\n if (!prefetchEnabled && isAppRouter) {\n return;\n }\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true\n });\n }\n };\n // If child is an tag and doesn't have a href attribute, or if the 'passHref' property is\n // defined, we specify the current 'href', so that repetition is not needed by the user\n if (!legacyBehavior || passHref || child.type === 'a' && !('href' in child.props)) {\n const curLocale = typeof locale !== 'undefined' ? locale : pagesRouter == null ? void 0 : pagesRouter.locale;\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain = (pagesRouter == null ? void 0 : pagesRouter.isLocaleDomain) && (0, _getDomainLocale).getDomainLocale(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.locales, pagesRouter == null ? void 0 : pagesRouter.domainLocales);\n childProps.href = localeDomain || (0, _addBasePath).addBasePath((0, _addLocale).addLocale(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.defaultLocale));\n }\n return legacyBehavior ? /*#__PURE__*/ _react.default.cloneElement(child, childProps) : /*#__PURE__*/ _react.default.createElement(\"a\", Object.assign({}, restProps, childProps), children);\n});\nvar _default = Link;\nexports.default = _default;\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=link.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.normalizeLocalePath = void 0;\nconst normalizeLocalePath = (pathname, locales)=>{\n if (process.env.__NEXT_I18N_SUPPORT) {\n return require('../shared/lib/i18n/normalize-locale-path').normalizeLocalePath(pathname, locales);\n }\n return {\n pathname,\n detectedLocale: undefined\n };\n};\nexports.normalizeLocalePath = normalizeLocalePath;\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=normalize-locale-path.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useIntersection = useIntersection;\nvar _react = require(\"react\");\nvar _requestIdleCallback = require(\"./request-idle-callback\");\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function';\nconst observers = new Map();\nconst idList = [];\nfunction createObserver(options) {\n const id = {\n root: options.root || null,\n margin: options.rootMargin || ''\n };\n const existing = idList.find((obj)=>obj.root === id.root && obj.margin === id.margin);\n let instance;\n if (existing) {\n instance = observers.get(existing);\n if (instance) {\n return instance;\n }\n }\n const elements = new Map();\n const observer = new IntersectionObserver((entries)=>{\n entries.forEach((entry)=>{\n const callback = elements.get(entry.target);\n const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;\n if (callback && isVisible) {\n callback(isVisible);\n }\n });\n }, options);\n instance = {\n id,\n observer,\n elements\n };\n idList.push(id);\n observers.set(id, instance);\n return instance;\n}\nfunction observe(element, callback, options) {\n const { id , observer , elements } = createObserver(options);\n elements.set(element, callback);\n observer.observe(element);\n return function unobserve() {\n elements.delete(element);\n observer.unobserve(element);\n // Destroy observer when there's nothing left to watch:\n if (elements.size === 0) {\n observer.disconnect();\n observers.delete(id);\n const index = idList.findIndex((obj)=>obj.root === id.root && obj.margin === id.margin);\n if (index > -1) {\n idList.splice(index, 1);\n }\n }\n };\n}\nfunction useIntersection({ rootRef , rootMargin , disabled }) {\n const isDisabled = disabled || !hasIntersectionObserver;\n const [visible, setVisible] = (0, _react).useState(false);\n const [element, setElement] = (0, _react).useState(null);\n (0, _react).useEffect(()=>{\n if (hasIntersectionObserver) {\n if (isDisabled || visible) return;\n if (element && element.tagName) {\n const unobserve = observe(element, (isVisible)=>isVisible && setVisible(isVisible), {\n root: rootRef == null ? void 0 : rootRef.current,\n rootMargin\n });\n return unobserve;\n }\n } else {\n if (!visible) {\n const idleCallback = (0, _requestIdleCallback).requestIdleCallback(()=>setVisible(true));\n return ()=>(0, _requestIdleCallback).cancelIdleCallback(idleCallback);\n }\n }\n }, [\n element,\n isDisabled,\n rootMargin,\n rootRef,\n visible\n ]);\n const resetVisible = (0, _react).useCallback(()=>{\n setVisible(false);\n }, []);\n return [\n setElement,\n visible,\n resetVisible\n ];\n}\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=use-intersection.js.map"],"names":["module","exports","Object","defineProperty","value","getDomainLocale","path","locale","locales","domainLocales","normalizeLocalePath","require","detectDomainLocale","target","detectedLocale","domain","undefined","proto","http","finalLocale","defaultLocale","basePath","process","default","__esModule","assign","_interop_require_default","_object_without_properties_loose","_react","_router","_formatUrl","_addLocale","_routerContext","_appRouterContext","_useIntersection","_getDomainLocale","_addBasePath","prefetched","Set","prefetch","router","href","as","options","isLocalURL","bypassPrefetchedCheck","prefetchedKey","has","add","Promise","resolve","catch","err","formatStringOrUrl","urlObjOrString","formatUrl","_default","forwardRef","props","forwardedRef","children","hrefProp","asProp","childrenProp","prefetchProp","passHref","replace","shallow","scroll","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","Boolean","restProps","createElement","prefetchEnabled","pagesRouter","useContext","RouterContext","appRouter","AppRouterContext","isAppRouter","useMemo","resolvedHref","resolvedAs","resolveHref","previousHref","useRef","previousAs","child","Children","only","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setRef","useCallback","el","current","useEffect","childProps","e","defaultPrevented","nodeName","currentTarget","toUpperCase","event","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","isModifiedEvent","preventDefault","navigate","forceOptimisticNavigation","startTransition","linkClicked","priority","type","curLocale","localeDomain","isLocaleDomain","addBasePath","addLocale","cloneElement","pathname","rootRef","disabled","isDisabled","hasIntersectionObserver","visible","setVisible","useState","element","setElement","tagName","unobserve","callback","id","observer","elements","root","margin","existing","idList","find","obj","instance","observers","get","Map","IntersectionObserver","entries","forEach","entry","isIntersecting","intersectionRatio","push","set","createObserver","observe","delete","size","disconnect","index","findIndex","splice","idleCallback","_requestIdleCallback","requestIdleCallback","cancelIdleCallback"],"sourceRoot":""}