{"version":3,"file":"createRedirectionIntermediary.mjs","sources":["../../../../src/auth/utils/createRedirectionIntermediary.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const createRedirectionIntermediary = ({ redirectTo: redirectOnSignInComplete, }) => createHTML(redirectOnSignInComplete);\n// This HTML does the following:\n// 1. redirect to `redirectTarget` using JavaScript on page load\n// 2. redirect to `redirectTarget` relying on the meta tag if JavaScript is disabled\n// 3. display a link to `redirectTarget` if the redirect does not happen\nconst createHTML = (redirectTarget) => `\n<!DOCTYPE html>\n\t<html>\n\t<head>\n\t\t\t<title>Redirecting...</title>\n\t\t\t<meta http-equiv=\"refresh\" content=\"0; URL='${redirectTarget}'\" />\n\t\t\t<script>window.location.replace(\"${redirectTarget}\")</script>\n\t</head>\n\t<body>\n\t\t\t<p>If you are not redirected automatically, follow this <a href=\"${redirectTarget}\">link to the new page</a>.</p>\n\t</body>\n</html>`;\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,6BAA6B,GAAG,CAAC,EAAE,UAAU,EAAE,wBAAwB,GAAG,KAAK,UAAU,CAAC,wBAAwB;AAC/H;AACA;AACA;AACA;AACA,MAAM,UAAU,GAAG,CAAC,cAAc,KAAK;AACvC;AACA;AACA;AACA;AACA,+CAA+C,EAAE,cAAc,CAAC;AAChE,oCAAoC,EAAE,cAAc,CAAC;AACrD;AACA;AACA,oEAAoE,EAAE,cAAc,CAAC;AACrF;AACA,OAAO,CAAC;;;;"}