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AAAA,EAAAA,EAAAA,mBAAAA,EAAoB,IAAMlC,EAAW,KAC1D,MAAO,IAAMmC,CAAAA,EAAAA,EAAAA,kBAAAA,EAAmBF,EAClC,CAGJ,EAAG,CAACnC,EAAYjD,EAAY+C,EAASG,EAASG,EAAWlD,OAAO,CAAC,EAM1D,CAACmD,EAAYJ,EAJChD,CAAAA,EAAAA,EAAAA,WAAAA,EAAY,KAC/BiD,GAAW,EACb,EAAG,EAAE,EAGP,sPCjIO,SAAShB,EACdoD,CAAY,CACZvI,CAAuB,CACvBoF,CAA2B,CAC3BC,CAAuC,EAmBrC,OAAO,CAEX,4FAzBgBF,qCAAAA,OAJ2B","sources":["webpack://_N_E/./node_modules/next/link.js","webpack://_N_E/../client/link.tsx","webpack://_N_E/../client/use-intersection.tsx","webpack://_N_E/../client/get-domain-locale.ts"],"sourcesContent":["module.exports = require('./dist/client/link')\n","'use client'\n\nimport type {\n  NextRouter,\n  PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n  [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n  [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype InternalLinkProps = {\n  /**\n   * The path or URL to navigate to. It can also be an object.\n   *\n   * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n   */\n  href: Url\n  /**\n   * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n   */\n  as?: Url\n  /**\n   * Replace the current `history` state instead of adding a new url into the stack.\n   *\n   * @defaultValue `false`\n   */\n  replace?: boolean\n  /**\n   * Whether to override the default scroll behavior\n   *\n   * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n   *\n   * @defaultValue `true`\n   */\n  scroll?: boolean\n  /**\n   * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n   *\n   * @defaultValue `false`\n   */\n  shallow?: boolean\n  /**\n   * Forces `Link` to send the `href` property to its child.\n   *\n   * @defaultValue `false`\n   */\n  passHref?: boolean\n  /**\n   * Prefetch the page in the background.\n   * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n   * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n   *\n   * In App Router:\n   * - `null` (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n   * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n   * - `false`: This will not prefetch any data, even on hover.\n   *\n   * In Pages Router:\n   * - `true` (default): The full route & its data will be prefetched.\n   * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n   * @defaultValue `true` (pages router) or `null` (app router)\n   */\n  prefetch?: boolean | null\n  /**\n   * The active locale is automatically prepended. `locale` allows for providing a different locale.\n   * When `false` `href` has to include the locale as the default behavior is disabled.\n   * Note: This is only available in the Pages Router.\n   */\n  locale?: string | false\n  /**\n   * Enable legacy link behavior.\n   * @defaultValue `false`\n   * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n   */\n  legacyBehavior?: boolean\n  /**\n   * Optional event handler for when the mouse pointer is moved onto Link\n   */\n  onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n  /**\n   * Optional event handler for when Link is touched.\n   */\n  onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n  /**\n   * Optional event handler for when Link is clicked.\n   */\n  onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when the webpack plugin runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n  /**\n   * bypassPrefetchedCheck will bypass the check to see if the `href` has\n   * already been fetched.\n   */\n  bypassPrefetchedCheck?: boolean\n}\n\nfunction prefetch(\n  router: NextRouter,\n  href: string,\n  as: string,\n  options: PrefetchOptions\n): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  if (!isLocalURL(href)) {\n    return\n  }\n\n  // We should only dedupe requests when experimental.optimisticClientCache is\n  // disabled.\n  if (!options.bypassPrefetchedCheck) {\n    const locale =\n      // Let the link's locale prop override the default router locale.\n      typeof options.locale !== 'undefined'\n        ? options.locale\n        : // Otherwise fallback to the router's locale.\n          'locale' in router\n          ? router.locale\n          : undefined\n\n    const prefetchedKey = href + '%' + as + '%' + locale\n\n    // If we've already fetched the key, then don't prefetch it again!\n    if (prefetched.has(prefetchedKey)) {\n      return\n    }\n\n    // Mark this URL as prefetched.\n    prefetched.add(prefetchedKey)\n  }\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  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}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n  const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n  const target = eventTarget.getAttribute('target')\n  return (\n    (target && target !== '_self') ||\n    event.metaKey ||\n    event.ctrlKey ||\n    event.shiftKey ||\n    event.altKey || // triggers resource download\n    (event.nativeEvent && event.nativeEvent.which === 2)\n  )\n}\n\nfunction linkClicked(\n  e: React.MouseEvent,\n  router: NextRouter | AppRouterInstance,\n  href: string,\n  as: string,\n  replace?: boolean,\n  shallow?: boolean,\n  scroll?: boolean,\n  locale?: string | false\n): void {\n  const { nodeName } = e.currentTarget\n\n  // anchors inside an svg have a lowercase nodeName\n  const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n  if (isAnchorNodeName && (isModifiedEvent(e) || !isLocalURL(href))) {\n    // ignore click for browser’s default behavior\n    return\n  }\n\n  e.preventDefault()\n\n  const navigate = () => {\n    // If the router is an NextRouter instance it will have `beforePopState`\n    const routerScroll = scroll ?? true\n    if ('beforePopState' in router) {\n      router[replace ? 'replace' : 'push'](href, as, {\n        shallow,\n        locale,\n        scroll: routerScroll,\n      })\n    } else {\n      router[replace ? 'replace' : 'push'](as || href, {\n        scroll: routerScroll,\n      })\n    }\n  }\n\n  navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n  Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n    LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n  if (typeof urlObjOrString === 'string') {\n    return urlObjOrString\n  }\n\n  return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n  function LinkComponent(props, forwardedRef) {\n    let children: React.ReactNode\n\n    const {\n      href: hrefProp,\n      as: asProp,\n      children: childrenProp,\n      prefetch: prefetchProp = null,\n      passHref,\n      replace,\n      shallow,\n      scroll,\n      locale,\n      onClick,\n      onMouseEnter: onMouseEnterProp,\n      onTouchStart: onTouchStartProp,\n      legacyBehavior = false,\n      ...restProps\n    } = props\n\n    children = childrenProp\n\n    if (\n      legacyBehavior &&\n      (typeof children === 'string' || typeof children === 'number')\n    ) {\n      children = <a>{children}</a>\n    }\n\n    const router = React.useContext(RouterContext)\n\n    const prefetchEnabled = prefetchProp !== false\n\n    if (process.env.NODE_ENV !== 'production') {\n      function createPropError(args: {\n        key: string\n        expected: string\n        actual: string\n      }) {\n        return new Error(\n          `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n            (typeof window !== 'undefined'\n              ? // TODO: Remove this addendum if Owner Stacks are available\n                \"\\nOpen your browser's console to view the Component stack trace.\"\n              : '')\n        )\n      }\n\n      // TypeScript trick for type-guarding:\n      const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n        href: true,\n      } as const\n      const requiredProps: LinkPropsRequired[] = Object.keys(\n        requiredPropsGuard\n      ) as LinkPropsRequired[]\n      requiredProps.forEach((key: LinkPropsRequired) => {\n        if (key === 'href') {\n          if (\n            props[key] == null ||\n            (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n          ) {\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 _: never = key\n        }\n      })\n\n      // TypeScript trick for type-guarding:\n      const optionalPropsGuard: Record<LinkPropsOptional, true> = {\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      } as const\n      const optionalProps: LinkPropsOptional[] = Object.keys(\n        optionalPropsGuard\n      ) as LinkPropsOptional[]\n      optionalProps.forEach((key: LinkPropsOptional) => {\n        const valType = typeof props[key]\n\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 (\n          key === 'onClick' ||\n          key === 'onMouseEnter' ||\n          key === 'onTouchStart'\n        ) {\n          if (props[key] && valType !== 'function') {\n            throw createPropError({\n              key,\n              expected: '`function`',\n              actual: valType,\n            })\n          }\n        } else if (\n          key === 'replace' ||\n          key === 'scroll' ||\n          key === 'shallow' ||\n          key === 'passHref' ||\n          key === 'prefetch' ||\n          key === 'legacyBehavior'\n        ) {\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 _: never = key\n        }\n      })\n    }\n\n    const { href, as } = React.useMemo(() => {\n      if (!router) {\n        const resolvedHref = formatStringOrUrl(hrefProp)\n        return {\n          href: resolvedHref,\n          as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n        }\n      }\n\n      const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n      return {\n        href: resolvedHref,\n        as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n      }\n    }, [router, hrefProp, asProp])\n\n    const previousHref = React.useRef<string>(href)\n    const previousAs = React.useRef<string>(as)\n\n    // This will return the first child, if multiple are provided it will throw an error\n    let child: any\n    if (legacyBehavior) {\n      if (process.env.NODE_ENV === 'development') {\n        if (onClick) {\n          console.warn(\n            `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n          )\n        }\n        if (onMouseEnterProp) {\n          console.warn(\n            `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n          )\n        }\n        try {\n          child = React.Children.only(children)\n        } catch (err) {\n          if (!children) {\n            throw new Error(\n              `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n            )\n          }\n          throw new Error(\n            `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n              (typeof window !== 'undefined'\n                ? \" \\nOpen your browser's console to view the Component stack trace.\"\n                : '')\n          )\n        }\n      } else {\n        child = React.Children.only(children)\n      }\n    } else {\n      if (process.env.NODE_ENV === 'development') {\n        if ((children as any)?.type === 'a') {\n          throw new Error(\n            'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n          )\n        }\n      }\n    }\n\n    const childRef: any = legacyBehavior\n      ? child && typeof child === 'object' && child.ref\n      : forwardedRef\n\n    const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n      rootMargin: '200px',\n    })\n\n    const setIntersectionWithResetRef = React.useCallback(\n      (el: Element | null) => {\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\n        setIntersectionRef(el)\n      },\n      [as, href, resetVisible, setIntersectionRef]\n    )\n\n    const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n    // Prefetch the URL if we haven't already and it's visible.\n    React.useEffect(() => {\n      // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n      if (process.env.NODE_ENV !== 'production') {\n        return\n      }\n\n      if (!router) {\n        return\n      }\n\n      // If we don't need to prefetch the URL, don't do prefetch.\n      if (!isVisible || !prefetchEnabled) {\n        return\n      }\n\n      // Prefetch the URL.\n      prefetch(router, href, as, { locale })\n    }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n    const childProps: {\n      onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n      onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n      onClick: React.MouseEventHandler<HTMLAnchorElement>\n      href?: string\n      ref?: any\n    } = {\n      ref: setRef,\n      onClick(e) {\n        if (process.env.NODE_ENV !== 'production') {\n          if (!e) {\n            throw new Error(\n              `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n            )\n          }\n        }\n\n        if (!legacyBehavior && typeof onClick === 'function') {\n          onClick(e)\n        }\n\n        if (\n          legacyBehavior &&\n          child.props &&\n          typeof child.props.onClick === 'function'\n        ) {\n          child.props.onClick(e)\n        }\n\n        if (!router) {\n          return\n        }\n\n        if (e.defaultPrevented) {\n          return\n        }\n\n        linkClicked(e, router, href, as, replace, shallow, scroll, locale)\n      },\n      onMouseEnter(e) {\n        if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n          onMouseEnterProp(e)\n        }\n\n        if (\n          legacyBehavior &&\n          child.props &&\n          typeof child.props.onMouseEnter === 'function'\n        ) {\n          child.props.onMouseEnter(e)\n        }\n\n        if (!router) {\n          return\n        }\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: process.env.__NEXT_LINK_NO_TOUCH_START\n        ? undefined\n        : function onTouchStart(e) {\n            if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n              onTouchStartProp(e)\n            }\n\n            if (\n              legacyBehavior &&\n              child.props &&\n              typeof child.props.onTouchStart === 'function'\n            ) {\n              child.props.onTouchStart(e)\n            }\n\n            if (!router) {\n              return\n            }\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\n    // If child is an <a> 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 the url is absolute, we can bypass the logic to prepend the domain and locale.\n    if (isAbsoluteUrl(as)) {\n      childProps.href = as\n    } else if (\n      !legacyBehavior ||\n      passHref ||\n      (child.type === 'a' && !('href' in child.props))\n    ) {\n      const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\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 =\n        router?.isLocaleDomain &&\n        getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n      childProps.href =\n        localeDomain ||\n        addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n    }\n\n    return legacyBehavior ? (\n      React.cloneElement(child, childProps)\n    ) : (\n      <a {...restProps} {...childProps}>\n        {children}\n      </a>\n    )\n  }\n)\n\nexport default Link\n","import { useCallback, useEffect, useRef, useState } from 'react'\nimport {\n  requestIdleCallback,\n  cancelIdleCallback,\n} from './request-idle-callback'\n\ntype UseIntersectionObserverInit = Pick<\n  IntersectionObserverInit,\n  'rootMargin' | 'root'\n>\n\ntype UseIntersection = { disabled?: boolean } & UseIntersectionObserverInit & {\n    rootRef?: React.RefObject<HTMLElement | null> | null\n  }\ntype ObserveCallback = (isVisible: boolean) => void\ntype Identifier = {\n  root: Element | Document | null\n  margin: string\n}\ntype Observer = {\n  id: Identifier\n  observer: IntersectionObserver\n  elements: Map<Element, ObserveCallback>\n}\n\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function'\n\nconst observers = new Map<Identifier, Observer>()\nconst idList: Identifier[] = []\n\nfunction createObserver(options: UseIntersectionObserverInit): Observer {\n  const id = {\n    root: options.root || null,\n    margin: options.rootMargin || '',\n  }\n  const existing = idList.find(\n    (obj) => obj.root === id.root && obj.margin === id.margin\n  )\n  let instance: Observer | undefined\n\n  if (existing) {\n    instance = observers.get(existing)\n    if (instance) {\n      return instance\n    }\n  }\n\n  const elements = new Map<Element, ObserveCallback>()\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\n  idList.push(id)\n  observers.set(id, instance)\n  return instance\n}\n\nfunction observe(\n  element: Element,\n  callback: ObserveCallback,\n  options: UseIntersectionObserverInit\n): () => void {\n  const { id, observer, elements } = createObserver(options)\n  elements.set(element, callback)\n\n  observer.observe(element)\n  return function unobserve(): void {\n    elements.delete(element)\n    observer.unobserve(element)\n\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(\n        (obj) => obj.root === id.root && obj.margin === id.margin\n      )\n      if (index > -1) {\n        idList.splice(index, 1)\n      }\n    }\n  }\n}\n\nexport function useIntersection<T extends Element>({\n  rootRef,\n  rootMargin,\n  disabled,\n}: UseIntersection): [(element: T | null) => void, boolean, () => void] {\n  const isDisabled: boolean = disabled || !hasIntersectionObserver\n\n  const [visible, setVisible] = useState(false)\n  const elementRef = useRef<T | null>(null)\n  const setElement = useCallback((element: T | null) => {\n    elementRef.current = element\n  }, [])\n\n  useEffect(() => {\n    if (hasIntersectionObserver) {\n      if (isDisabled || visible) return\n\n      const element = elementRef.current\n      if (element && element.tagName) {\n        const unobserve = observe(\n          element,\n          (isVisible) => isVisible && setVisible(isVisible),\n          { root: rootRef?.current, rootMargin }\n        )\n\n        return unobserve\n      }\n    } else {\n      if (!visible) {\n        const idleCallback = requestIdleCallback(() => setVisible(true))\n        return () => cancelIdleCallback(idleCallback)\n      }\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isDisabled, rootMargin, rootRef, visible, elementRef.current])\n\n  const resetVisible = useCallback(() => {\n    setVisible(false)\n  }, [])\n\n  return [setElement, visible, resetVisible]\n}\n","import type { DomainLocale } from '../server/config'\nimport type { normalizeLocalePath as NormalizeFn } from './normalize-locale-path'\nimport type { detectDomainLocale as DetectFn } from './detect-domain-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function getDomainLocale(\n  path: string,\n  locale?: string | false,\n  locales?: readonly string[],\n  domainLocales?: readonly DomainLocale[]\n) {\n  if (process.env.__NEXT_I18N_SUPPORT) {\n    const normalizeLocalePath: typeof NormalizeFn =\n      require('./normalize-locale-path').normalizeLocalePath\n    const detectDomainLocale: typeof DetectFn =\n      require('./detect-domain-locale').detectDomainLocale\n\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}${normalizePathTrailingSlash(\n        `${basePath}${finalLocale}${path}`\n      )}`\n    }\n    return false\n  } else {\n    return false\n  }\n}\n"],"names":["prefetched","Set","prefetch","router","href","as","options","isLocalURL","bypassPrefetchedCheck","prefetchedKey","locale","undefined","has","add","catch","formatStringOrUrl","urlObjOrString","formatUrl","React","forwardRef","LinkComponent","forwardedRef","children","child","hrefProp","asProp","childrenProp","prefetchProp","passHref","replace","shallow","scroll","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","restProps","props","a","useContext","RouterContext","prefetchEnabled","useMemo","resolvedHref","resolvedAs","resolveHref","previousHref","useRef","previousAs","only","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setIntersectionWithResetRef","useCallback","current","el","setRef","useMergedRef","useEffect","childProps","e","defaultPrevented","linkClicked","nodeName","currentTarget","toUpperCase","isModifiedEvent","target","event","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","preventDefault","navigate","routerScroll","priority","process","isAbsoluteUrl","type","curLocale","localeDomain","isLocaleDomain","getDomainLocale","locales","domainLocales","addBasePath","addLocale","defaultLocale","cloneElement","hasIntersectionObserver","IntersectionObserver","observers","Map","idList","rootRef","disabled","isDisabled","visible","setVisible","useState","elementRef","setElement","element","tagName","unobserve","observe","callback","id","observer","elements","createObserver","instance","root","margin","existing","find","obj","get","entries","forEach","entry","isIntersecting","intersectionRatio","push","set","delete","size","disconnect","index","findIndex","splice","idleCallback","requestIdleCallback","cancelIdleCallback","path"],"sourceRoot":"","ignoreList":[0]}