{"version":3,"file":"landing_page-df-l7YhP.js","sources":["../../src/pages/landing_page/construction_barrier_illustration.tsx","../../src/pages/third_party_auth_page.tsx","../../src/pages/landing_page/landing_page.tsx"],"sourcesContent":["export const ConstructionBarrierIllustration = () => (\n  <svg\n    fill=\"none\"\n    height=\"300\"\n    viewBox=\"0 0 300 300\"\n    width=\"300\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <path\n      d=\"M50.2277 163.302C59.3572 162.835 68.4832 163.112 77.5604 164.424C83.013 165.212 88.4272 165.451 93.8798 165.315C106.791 164.992 119.67 164.015 132.616 164.466C145.825 164.926 158.964 164.191 172.109 163.483C185.25 162.776 198.375 161.828 211.6 162.839C217.043 163.255 222.484 162.865 227.929 162.659C238.233 162.271 248.403 159.442 258.772 161.877C258.976 161.485 259.19 161.269 259.186 161.051C259.082 154.979 259.809 148.9 258.301 142.844C257.937 141.384 258.014 139.819 257.947 138.301C257.859 136.273 257.796 134.243 257.782 132.214C257.771 130.757 257.186 130.135 255.68 130.32C249.276 131.109 242.79 130.771 236.353 131.129C228.264 131.576 220.157 131.867 212.037 131.472C193.494 130.571 175.029 131.576 156.572 132.367C141.148 133.03 125.818 134.931 110.372 135.386C98.8637 135.724 87.3486 136.412 75.7969 134.976C72.0102 134.506 68.1625 134.443 64.402 134.886C56.5917 135.804 48.7622 135.926 40.8873 135.537C37.8988 135.389 37.4788 135.825 38.195 138.766C39.4741 144.027 39.6048 149.321 39.6083 154.648C39.61 156.799 39.8871 158.954 39.976 161.108C40.0282 162.379 40.6503 162.943 41.8737 162.99C44.6583 163.098 47.4622 163.443 50.2277 163.302ZM52.0766 109.104C57.7522 108.719 63.461 108.224 69.1436 108.476C81.4464 109.024 93.7247 108.696 106.017 108.968C121.861 109.32 137.689 108.842 153.536 109.403C154.421 109.435 155.307 109.343 156.192 109.308C170.756 108.755 185.323 109.541 199.893 110.379C207.867 110.838 215.869 111.265 223.799 110.592C228.714 110.175 233.609 109.553 238.551 109.757C245.174 110.031 251.552 107.962 258.178 108.433C259.429 108.522 260.06 107.915 260.138 106.702C260.195 105.821 260.357 104.922 260.244 104.054C259.31 96.8446 259.829 89.6076 259.186 82.3914C258.908 79.2582 259.005 79.3088 255.964 79.4064C243.435 79.8072 230.969 81.0688 218.45 81.4243C196.936 82.0359 175.38 81.7449 153.836 81.4138C130.515 81.0549 107.185 79.8978 83.8703 80.3282C74.3766 80.5042 64.8673 80.3543 55.3736 80.5582C48.5513 80.7046 41.7691 81.5916 34.5983 80.9764C34.8667 84.8154 34.4711 88.2152 34.4571 91.6307C34.438 96.1806 34.1382 100.732 35.027 105.289C35.4225 107.321 36.1388 108.414 38.4094 108.557C42.9663 108.846 47.4953 109.414 52.0766 109.104ZM259.739 201.97C259.155 196.852 256.902 191.921 257.975 186.348C254.476 186.96 251.333 186.967 248.187 186.817C233.988 186.144 219.816 186.01 205.615 186.24C186.123 186.557 166.626 187.362 147.085 186.294C143.039 186.073 138.975 186.261 134.929 186.397C120.505 186.88 106.094 187.625 91.6179 186.383C88.5928 186.123 85.5345 186.228 82.5006 186.336C69.4747 186.801 56.4662 187.746 43.3897 186.32C42.9018 186.266 42.4051 186.329 40.9727 186.352C42.7693 189.133 42.6805 191.682 43.0133 194.176C43.74 199.628 42.8844 205.062 43.3566 210.514C43.4995 212.161 43.9404 212.517 45.6673 212.503C53.0054 212.442 60.3783 211.945 67.692 213.052C76.4172 214.371 85.1616 214.542 93.8781 214.397C103.114 214.244 112.325 213.141 121.584 213.71C130.975 214.287 140.346 214.303 149.708 214.083C166.672 213.684 183.645 213.357 200.621 213.604C219.636 213.881 238.617 213.75 257.576 212.85C260.446 212.714 260.452 212.74 260.551 209.92C260.642 207.244 260.042 204.619 259.739 201.97Z\"\n      fill=\"#FF8C19\"\n    />\n    <path\n      d=\"M47.5506 165.55C50.8023 165.129 54.0802 164.815 57.3615 164.658C59.6896 164.547 62.0439 164.778 64.5096 164.86C64.5131 164.926 64.5166 164.991 64.5218 165.057C65.9734 164.86 67.4268 164.81 68.8783 164.834C68.305 163.037 67.2943 161.494 66.0919 160.011C65.2136 158.925 64.013 158.102 63.0058 157.111C57.3319 151.524 51.6667 145.927 46.0084 140.324C44.4575 138.787 42.9066 137.247 41.4132 135.656C40.3241 134.495 39.2524 134.452 37.9994 135.424C38.2626 137.859 38.5972 139.993 38.6982 142.135C38.8045 144.407 38.6372 146.683 38.686 148.957C38.7557 152.249 38.9213 155.543 39.0276 158.834C39.1844 163.585 42.0963 166.26 47.5506 165.55ZM88.8259 191.895C87.2244 190.236 85.67 188.486 84.3735 186.592C83.2844 185.003 82.0385 184.499 80.2157 184.505C77.3892 184.513 74.5522 184.259 71.6142 184.106C71.5672 184.104 71.5201 184.1 71.4731 184.099C71.4731 184.097 71.4731 184.095 71.4731 184.093C69.4325 183.917 67.3448 184.142 65.6144 183.48C65.6214 183.59 65.6266 183.699 65.6336 183.809C57.5898 184.757 49.5389 184.377 40.8956 185.707C42.5982 187.502 43.6315 188.79 44.8601 189.851C52.8203 196.725 60.939 203.422 68.7668 210.443C72.7713 214.035 77.3247 215.413 82.3574 215.601C89.7024 215.877 97.051 215.997 104.398 216.145C106.458 216.187 108.301 215.608 109.988 213.904C109.026 212.803 108.242 211.818 107.369 210.921C101.19 204.572 94.9738 198.268 88.8259 191.895ZM217.723 163.395C218.545 161.133 216.381 159.467 214.877 157.925C210.846 153.793 206.781 149.696 202.689 145.625C198.505 141.462 194.239 137.383 190.081 133.195C188.496 131.599 186.812 131.179 184.599 131.273C173.122 131.754 161.633 132.056 150.146 132.357C148.911 132.39 147.89 132.434 147.424 134.1C156.662 145.08 168.527 153.645 178.518 164.876C183.982 164.832 189.644 164.723 195.308 164.761C200.872 164.799 206.441 165.045 212.007 165.089C214.082 165.106 216.836 165.838 217.723 163.395ZM119.112 136.045C118.143 134.957 117.157 134.332 115.512 134.403C110.35 134.626 105.171 134.603 99.9977 134.607C92.799 134.612 85.5986 134.522 78.4017 134.574C77.682 134.579 76.9867 135.288 76.1171 135.759C76.7932 136.651 77.2062 137.292 77.7133 137.848C82.7216 143.351 87.6688 148.912 92.7903 154.309C96.1344 157.832 99.7015 161.147 103.253 164.465C103.905 165.073 104.962 165.554 105.83 165.571C114.545 165.759 123.26 165.848 131.974 165.946C134.125 165.97 136.275 165.885 138.426 165.932C140.778 165.984 142.489 165.129 143.307 163.14C138.401 157.653 133.621 152.308 128.845 146.962C125.598 143.325 122.355 139.687 119.112 136.045ZM55.7792 106.065C56.8126 107.182 57.5497 108.356 58.0028 109.688C59.9336 109.625 61.8278 109.777 63.5721 110.449C63.5512 110.319 63.5303 110.19 63.5094 110.059C66.1616 110.132 68.5403 110.17 70.9172 110.268C77.1191 110.524 83.3228 110.793 89.5247 111.089C91.6175 111.188 93.1284 110.453 93.8062 108.942C84.9904 98.8836 76.3855 89.0658 67.8537 79.3299C65.9002 79.5094 64.0635 79.6784 61.9376 79.8753C61.894 79.8875 61.8469 79.9015 61.8051 79.9119C59.172 80.4661 56.5372 80.5793 53.9042 80.5149C47.1115 80.8686 40.629 80.7031 33.4722 81.0063C35.4518 83.4651 36.8058 85.3279 38.3427 87.0252C44.1195 93.4049 49.9363 99.7462 55.7792 106.065ZM164.572 187.765C162.791 185.841 160.694 185.06 158.15 184.98C146.63 184.616 135.108 184.139 123.291 186.022C122.69 187.129 122.794 188.195 123.931 189.257C125.335 190.569 126.625 192.01 127.939 193.418C133.978 199.893 140.041 206.348 146.02 212.879C147.288 214.266 148.632 214.58 150.402 214.556C154.701 214.493 159.013 214.742 163.317 214.747C170.533 214.758 177.747 214.718 184.956 214.58C185.798 214.564 186.715 213.923 187.361 213.32C187.542 213.151 187.042 211.94 186.591 211.45C179.274 203.536 171.892 195.678 164.572 187.765ZM258.323 208.302C252.808 200.51 245.892 194.002 239.402 187.678C239.542 187.12 239.648 186.568 239.726 186.017L234.715 185.587C234.715 185.587 203.311 185.644 197.777 186.136C197.859 186.469 197.834 186.925 198.05 187.167C204.54 194.451 210.963 201.8 217.613 208.938C219.946 211.442 223.789 214.32 223.789 214.32L237.552 214.157L242.384 214.254C244.282 214.307 246.017 214.404 247.748 214.39C250.527 214.369 253.35 214.545 256.074 214.158C261.504 213.392 261.589 212.916 258.323 208.302ZM237.539 129.961L230.89 130.045C228.797 130.181 226.763 130.123 224.822 130.496C223.003 130.845 220.859 129.513 219.141 131.308C231.498 141.949 243.708 152.462 256.105 163.137C256.767 162.931 257.923 162.572 259.202 162.175C260.273 153.762 258.867 134.262 256.802 130.493C250.49 130.318 244.1 130.142 237.539 129.961ZM120.775 104.857C123.495 108.071 126.238 109.824 130.732 109.731C140.078 109.54 149.463 110.177 158.831 110.402C160.797 110.449 162.759 110.179 164.451 110.073C165.542 107.504 164.105 106.323 162.818 105.045C157.267 99.5336 151.856 93.8684 146.144 88.5273C142.66 85.2704 140.261 80.3859 134.315 80.2988C125.459 81.2223 112.647 79.8422 112.647 79.8422C110.235 79.776 105.75 79.7812 105.75 79.7812L99.3163 80.1053C99.752 80.6682 100.109 81.184 100.52 81.6528C107.284 89.3795 114.144 97.0225 120.775 104.857ZM167.095 81.787C167.881 82.714 168.4 83.8833 169.02 83.9565C171.268 84.2249 172.147 86.0006 173.398 87.3912C179.753 94.4435 185.697 101.865 193.044 107.999C195.344 109.92 197.446 111.219 200.494 110.571C202.069 110.237 203.766 110.371 205.411 110.369C211.993 110.366 218.573 110.322 225.157 110.46C226.687 110.491 227.533 110.118 227.952 108.7C224.062 104.219 220.101 99.8682 216.388 95.3183C212.917 91.0646 209.775 86.546 206.326 82.2731C205.641 81.4245 204.23 80.7728 203.13 80.7048C199.464 80.4817 195.788 80.6002 192.117 80.5253C187.44 80.4312 182.761 80.2761 177.692 80.1367C174.29 82.2331 163.484 81.2677 163.484 81.2677C164.068 82.3254 164.561 83.2176 165.232 84.4305C166.058 83.2577 166.551 82.5572 167.095 81.787ZM235.398 85.476C239.287 89.9144 243.079 94.4452 247.084 98.7773C250.128 102.073 253.394 105.169 256.671 108.236C257.304 108.829 258.618 109.296 259.31 109.038C259.942 108.802 260.481 107.527 260.498 106.682C260.561 103.782 260.425 100.87 260.277 97.9653C260.002 92.5266 259.711 87.0862 259.336 81.651C259.146 78.8977 258.236 78.239 255.439 78.3593C249.253 78.6259 243.067 78.8664 236.879 79.0964C235.901 79.133 234.917 79.0511 233.714 79.018L227.344 80.6473C227.344 80.6473 227.997 81.1422 229.919 81.5343C232.404 82.0414 233.878 83.7404 235.398 85.476Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M237.337 127.093C236.653 121.809 236.053 116.514 235.199 111.253C234.744 108.45 234.361 108.351 230.888 108.261V130.045L237.538 129.961C237.463 128.825 237.449 127.954 237.337 127.093Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M65.6128 183.48C67.3449 184.142 69.4325 183.916 71.4714 184.093C70.7029 178.144 69.8386 172.634 69.3384 167.101C69.2652 166.296 69.1049 165.547 68.8783 164.834C67.4268 164.81 65.9734 164.86 64.5218 165.057C64.9 171.444 65.2485 177.332 65.6128 183.48Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M239.726 186.017C240.291 182.056 239.421 178.259 239.394 174.507C239.36 170.116 239.807 165.676 238.252 161.433C234.54 160.424 234.14 160.598 234.188 163.904C234.255 168.459 234.554 173.016 234.704 177.571C234.77 179.577 234.715 185.589 234.715 185.589L239.726 186.017Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M233.714 79.018C233.432 76.0137 233.286 73.2462 232.89 70.5103C232.303 66.4379 231.895 66.1469 227.093 65.5683C227.093 69.6216 227.345 80.6488 227.345 80.6488L233.714 79.018Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M58.0011 109.688C58.2643 110.462 58.4298 111.288 58.5012 112.189C59.0746 119.521 60.554 135.346 60.554 135.346C60.554 135.346 61.3957 135.102 62.8734 135.271C63.8319 135.381 65.8829 135.346 65.8829 135.346C65.8829 135.346 64.9977 119.365 63.5687 110.451C61.8261 109.775 59.9337 109.625 58.0011 109.688Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M141.289 55.1808C140.165 54.7103 139.098 52.8562 138.072 52.309C133.276 49.7457 128.02 51.4046 125.565 56.148C124.256 58.6748 122.469 60.9436 120.885 63.3205C119.781 64.9743 118.433 66.5025 117.589 68.2835C115.843 71.9708 114.36 75.7889 112.647 79.8422C112.647 79.8422 125.459 81.2223 134.315 80.2988C134.885 79.5007 135.095 79.0039 135.47 78.7147C138.192 76.6044 139.431 73.7064 140.079 70.3815C140.658 67.4191 141.426 64.5456 140.856 61.4176C140.529 59.6245 141.196 59.2951 143.617 59.3352C143.765 59.3369 143.911 59.0198 144.099 58.8037C143.723 58.1938 141.841 57.5665 141.43 56.899C142.113 56.331 144.235 55.8099 144.859 55.2906C143.772 54.2015 141.289 55.1808 141.289 55.1808ZM138.924 57.6658C138.8 60.8025 138.324 63.9304 137.79 67.0183C137.408 69.2279 136.943 71.4968 136.033 73.5095C133.863 78.3104 129.556 80.5566 124.492 79.8038C124.605 77.812 125.623 76.3587 126.902 74.935C128.648 72.992 130.281 70.934 131.823 68.8219C132.78 67.5097 133.44 65.9989 132.607 63.8938C131.948 64.2999 131.248 64.5107 130.908 64.983C129.753 66.6001 128.791 68.3584 127.63 69.972C125.72 72.626 123.535 74.9855 120.348 76.1984C119.726 76.4353 119.24 77.0121 118.051 77.9235C119.651 77.8329 120.442 77.7893 121.27 77.7423C119.818 80.2586 119.818 80.2586 116.375 79.3925C119.811 73.879 120.855 67.2065 125.469 62.3604C126.806 60.9576 127.379 58.8525 128.543 57.2476C129.544 55.8692 130.692 54.4333 132.114 53.5654C135.796 51.321 139.096 53.3075 138.924 57.6658Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M155.548 68.541C157.016 69.5256 157.983 70.6635 159.168 68.9209C158.239 67.6575 157.282 67.2654 155.548 68.541Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M190.73 67.6947C189.785 67.4385 188.703 67.2817 187.78 67.4838C184.758 68.1425 181.782 68.9859 178.647 69.7945C175.547 66.6439 171.546 65.7656 167.234 65.8545C164.831 65.9033 162.662 65.6889 160.435 64.1258C157.234 61.8761 153.248 63.2231 151.412 66.5707C150.793 67.6981 150.103 68.7838 149.77 69.3397C151.337 71.3175 152.961 72.8893 153.991 74.7766C155.925 78.3193 158.539 80.5969 162.615 80.9698C162.974 81.0029 163.32 81.212 163.482 81.2713C163.482 81.2713 174.288 82.2367 177.69 80.1403C178.666 79.3579 179.905 78.8578 180.283 77.9725C181.71 74.6267 184.76 74.4699 187.673 73.9419C188.665 73.7624 189.653 73.5759 190.646 73.4034C192.122 73.149 193.393 72.5199 193.495 70.8888C193.614 69.0643 192.303 68.1233 190.73 67.6947ZM189.324 71.8595C188.116 72.1975 186.924 72.6419 185.687 72.8144C182.264 73.2919 179.595 74.5832 176.914 77.0698C172.269 81.3793 165.598 82.106 159.962 77.5508C158 75.965 156.397 73.8809 154.827 71.8717C153.482 70.15 153.841 67.9578 155.409 66.4034C156.808 65.0145 158.614 64.8682 160.492 66.3337C162.04 67.5396 163.552 67.7086 165.434 67.6459C167.919 67.5622 170.47 67.9857 172.941 68.4806C174.463 68.7855 175.724 69.7788 175.851 71.8908C174.557 72.4293 173.245 73.2535 171.816 73.5097C169.378 73.9471 167.05 73.5916 165.337 71.3036C164.786 70.5665 163.885 70.0872 162.918 69.3083C162.041 71.8002 163.376 72.9329 164.83 73.6718C169.132 75.864 173.363 76.5593 177.808 73.9088C181.107 71.9414 184.793 70.5874 188.37 69.1114C188.944 68.8744 190.259 69.1968 190.538 69.662C191.197 70.7651 190.46 71.5388 189.324 71.8595Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M265.365 244.945C258.175 244.744 251.28 246.126 244.616 244.777C243.87 234.587 243.144 224.652 242.382 214.257L237.55 214.16C237.55 214.16 239.725 234.771 238.463 245.009C229.135 243.12 220.298 244.92 211.296 245.701C212.835 248.78 213.173 249.252 216.306 248.48C222.295 247.004 228.241 246.787 234.307 248.238C234.795 248.355 235.318 248.31 235.825 248.324C242.659 248.519 249.494 248.768 256.328 248.883C259.585 248.937 262.84 248.735 266.528 248.639C266.113 247.316 265.756 246.185 265.365 244.945Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M76.1381 244.309C74.8015 244.307 73.4649 244.241 72.0116 244.201C69.9989 233.637 72.0116 223.462 70.1365 213.184C69.2339 213.067 68.2963 212.947 66.9859 212.778C66.9859 216.446 66.9807 219.827 66.9877 223.208C66.9929 226.755 66.9301 230.305 67.0434 233.853C67.1497 237.211 67.4425 240.567 67.6795 244.337C58.137 244.915 49.0493 245.466 39.9617 246.016C39.939 246.274 39.9146 246.534 39.8919 246.792C40.6221 247.156 41.3261 247.715 42.0911 247.846C43.7135 248.125 45.3811 248.359 47.0105 248.301C53.7073 248.062 60.3884 247.559 67.0887 247.431C76.1938 247.259 85.3128 247.353 94.4249 247.309C95.9706 247.302 97.5128 247.177 99.8723 247.067C96.8384 244.34 94.0014 244.418 91.3405 244.335C86.273 244.182 81.2055 244.314 76.1381 244.309Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M134.679 55.195C133.909 56.4201 134.662 57.3018 136.812 56.4724C137.288 55.256 135.449 53.97 134.679 55.195Z\"\n      fill=\"#F7F5F2\"\n    />\n    <path\n      d=\"M53.9007 80.513C56.5337 80.5774 59.1685 80.4642 61.8016 79.91C61.8452 79.8996 61.8905 79.8856 61.9341 79.8734C61.8975 79.8769 61.8644 79.8804 61.8278 79.8839C61.4078 78.57 61.0366 77.744 60.8955 76.8883C60.6271 75.2608 60.5016 73.614 60.2995 71.9777C59.8029 67.9453 59.1651 67.4434 54.7145 67.7048C52.9318 71.6867 54.1551 76.0275 54.3137 80.492C54.1777 80.499 54.0401 80.506 53.9007 80.513Z\"\n      fill=\"#F7F5F2\"\n    />\n  </svg>\n);\n","import React from 'react';\n\nimport {FormattedMessage} from 'react-intl';\nimport {useNavigate} from 'react-router';\nimport styled from 'styled-components';\n\nimport {Text} from '@dropbox/dig-components/typography';\n\nimport {Button} from '~/components/button';\n\nimport {ErrorPage} from './error_page';\nimport {ConstructionBarrierIllustration} from './landing_page/construction_barrier_illustration';\nimport {IllustrationPage} from './landing_page/illustration_page';\nimport {Loader} from '../components/loading';\nimport {useReelAppGlobalState} from '../context';\nimport {redCarpetError} from '../lib/error_reporting';\nimport {LoggingClient} from '../lib/logging/logger';\nimport {useStormcrows} from '../lib/stormcrow';\nimport {\n  newDeviceFlowSession,\n  parseVerificationUrl,\n  pollForCompletedDeviceFlow,\n} from '../lib/third_party_auth';\nimport {openURLInExternalBrowser} from '../lib/utils';\n\nconst Flex = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: flex-start;\n`;\n\nconst FormattedButton = styled.div`\n  margin-top: var(--spacing__unit--4);\n`;\n\nexport const ThirdPartyAuthPage = () => {\n  const [userCode, setUserCode] = React.useState('');\n  const [verificationURI, setVerificationURI] = React.useState('');\n  const [error, setError] = React.useState<Error | null>(null);\n\n  const sessionContext = useReelAppGlobalState();\n  const stormcrows = useStormcrows();\n  const navigate = useNavigate();\n\n  const getUserSignIn = React.useCallback(async () => {\n    const deviceFlowResponse = await newDeviceFlowSession();\n    const {deviceCode, userCode} = deviceFlowResponse;\n    let {verificationUriComplete} = deviceFlowResponse;\n    verificationUriComplete = parseVerificationUrl(verificationUriComplete);\n\n    const params = new URLSearchParams(window.location.search);\n\n    if (params.get('redirectauth') !== 'false') {\n      if (!openURLInExternalBrowser(verificationUriComplete)) {\n        redCarpetError(new Error(`Unable to open verification URL`), ['auth_failed']);\n      }\n    }\n    setVerificationURI(verificationUriComplete);\n    setUserCode(userCode);\n\n    const tokenData = await pollForCompletedDeviceFlow(deviceCode);\n    setUserCode('');\n    return tokenData;\n  }, []);\n\n  const initiateSignIn = React.useCallback(async () => {\n    setUserCode('');\n    const tokenResult = await getUserSignIn();\n    if (sessionContext.status === 'logged out') {\n      try {\n        await sessionContext.onLoginComplete(\n          parseInt(tokenResult.userId, 10),\n          tokenResult.accountId,\n          tokenResult.refreshToken,\n        );\n        const logger = new LoggingClient(stormcrows);\n        // eslint-disable-next-line deprecation/deprecation\n        logger.logEvent('succeed_premiere_device_flow_sign_in');\n        // Redirect to home\n        navigate('/');\n      } catch (e) {\n        setError(e);\n      }\n    }\n  }, [getUserSignIn, navigate, sessionContext, stormcrows]);\n\n  React.useEffect(() => {\n    initiateSignIn();\n  }, [initiateSignIn]);\n\n  if (error) {\n    return <ErrorPage errorToReport={error} />;\n  }\n\n  if (userCode === '') {\n    return <Loader />;\n  }\n\n  return (\n    <IllustrationPage\n      copy={\n        <Flex>\n          <>\n            <Text size=\"large\" tagName=\"p\" variant=\"paragraph\">\n              <FormattedMessage\n                defaultMessage=\"Please continue in your browser window.\"\n                description=\"Instruction to user to continue authorization in their default browser\"\n                id=\"H0526k\"\n              />\n            </Text>\n            <Text size=\"large\" tagName=\"p\" variant=\"paragraph\">\n              <FormattedMessage\n                defaultMessage=\"Confirm that your browser window is displaying the following user code:\"\n                description=\"Instruction to user to confirm code in browser matches the displayed code\"\n                id=\"ENyqoA\"\n              />\n            </Text>\n            <Text isBold={true} size=\"large\" tagName=\"p\" variant=\"paragraph\">\n              {userCode}\n            </Text>\n\n            <FormattedButton>\n              <Button\n                onClick={() => openURLInExternalBrowser(verificationURI)}\n                variant=\"transparent\"\n              >\n                <FormattedMessage\n                  defaultMessage=\"If the browser window doesn't open, click here.\"\n                  description=\"Instruction to user to open URL in their browser if the window doesn't open automatically\"\n                  id=\"IdSIcP\"\n                />\n              </Button>\n            </FormattedButton>\n          </>\n        </Flex>\n      }\n      illustration={<ConstructionBarrierIllustration />}\n    />\n  );\n};\n","import React from 'react';\n\nimport {FormattedMessage} from 'react-intl';\nimport styled from 'styled-components';\n\nimport {Text, Title} from '@dropbox/dig-components/typography';\n\nimport {Button} from '~/components/button';\n\nimport {ATMKeyboardIllustration} from './atm_keyboard_illustration';\nimport {ConstructionBarrierIllustration} from './construction_barrier_illustration';\nimport {IllustrationPage} from './illustration_page';\nimport {useExtensionContext} from '../../components/extension_context';\nimport {Loader} from '../../components/loading';\nimport {useReelAppGlobalState} from '../../context';\nimport {logAggregatePageVisit} from '../../lib/api';\nimport type {ReelPageSourceType} from '../../lib/logging/logger_types';\nimport {useLoggingClient} from '../../lib/use_logging_client';\nimport {useOnce} from '../../lib/use_once';\nimport {useSigninUrl} from '../../lib/use_signin_url';\nimport {getPageContext, getReferrer} from '../../lib/utils';\nimport {isInWebView} from '../../use_extensions';\nimport {ThirdPartyAuthPage} from '../third_party_auth_page';\n\nconst Flex = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: flex-start;\n`;\n\nconst ButtonSection = styled.div`\n  margin-top: 24px;\n  display: flex;\n`;\n\nconst FindYourAdminButton = styled(Button)`\n  margin-right: 10px;\n`;\n\nconst OrText = styled.span`\n  margin-right: 10px;\n`;\n\nexport const NoAccessPage = (props: {handleLogoutClick: () => void}) => {\n  const loggingClient = useLoggingClient();\n  const {redCarpet} = useExtensionContext();\n\n  useOnce(() => {\n    const pageSource: ReelPageSourceType = 'landing_page_no_access';\n\n    // Used to track the health of the auth flow from our marketing campaigns\n    const campaignContext = getPageContext();\n    logAggregatePageVisit(pageSource, campaignContext);\n\n    // eslint-disable-next-line deprecation/deprecation\n    loggingClient.logEvent('failed_reel_access');\n\n    // eslint-disable-next-line deprecation/deprecation\n    loggingClient.logEvent('shown_reel_page', {\n      reel_page_source: pageSource,\n      access_type: 'not_applicable',\n      email_campaign_id: 0,\n      referrer: getReferrer() || '',\n      red_carpet_mode: redCarpet.mode,\n    });\n  });\n\n  return (\n    <IllustrationPage\n      copy={\n        <Flex>\n          <Title size=\"large\">\n            <FormattedMessage\n              defaultMessage=\"Dropbox Replay isn’t enabled for your team\"\n              description=\"Title for page that users see if they try to visit Replay but their account does not qualify for the product\"\n              id=\"rtMx2e\"\n            />\n          </Title>\n          <Text size=\"large\" tagName=\"p\" variant=\"paragraph\">\n            <FormattedMessage\n              defaultMessage=\"Please reach out to a Dropbox Business admin on your team to request access.\"\n              description=\"Subtitle for page that users see if they try to visit Replay but their account does not qualify for the product\"\n              id=\"NIPwZU\"\n            />\n          </Text>\n          <ButtonSection>\n            <FindYourAdminButton href=\"https://www.dropbox.com/team#members\" variant=\"transparent\">\n              <FormattedMessage\n                defaultMessage=\"Find your team admin\"\n                description=\"Text for button that users without access to Replay see, which takes them to a page where they can look up their admin to request access\"\n                id=\"oaLcgz\"\n              />\n            </FindYourAdminButton>\n            <OrText>\n              <FormattedMessage\n                defaultMessage=\"or\"\n                description=\"single word that sits between two buttons. The first button says 'Find your team admin' and the second button says 'Log out'. Users see these buttons if they land on Replay but their account does not have access to the product.\"\n                id=\"+vyQkH\"\n              />\n            </OrText>\n            <Button onClick={props.handleLogoutClick} variant=\"transparent\">\n              <FormattedMessage\n                defaultMessage=\"Log out\"\n                description=\"Button text that logs the user out of Replay\"\n                id=\"7NWfbI\"\n              />\n            </Button>\n          </ButtonSection>\n        </Flex>\n      }\n      illustration={<ConstructionBarrierIllustration />}\n    />\n  );\n};\n\nconst SigninButton = styled(Button)`\n  margin-top: 24px;\n`;\n\nconst LoginPage = (props: {loginButtonProps: React.ButtonHTMLAttributes<HTMLButtonElement>}) => {\n  return (\n    <IllustrationPage\n      copy={\n        <Flex>\n          <Title size=\"large\">\n            <FormattedMessage\n              defaultMessage=\"Sign in to access\"\n              description=\"Title for page asking user to sign in to Replay (using Dropbox) before they can access the requested page\"\n              id=\"qdB8Mu\"\n            />\n          </Title>\n          <Text size=\"large\" tagName=\"p\">\n            <FormattedMessage\n              defaultMessage=\"Please sign in to Replay with your Dropbox account to continue.\"\n              description=\"Subtitle for page asking user to sign in to Replay (using Dropbox) before they can access the requested page\"\n              id=\"89yRe6\"\n            />\n          </Text>\n          <SigninButton variant=\"primary\" {...props.loginButtonProps}>\n            <FormattedMessage\n              defaultMessage=\"Sign in with Dropbox\"\n              description=\"Text for button that takes a logged out user to sign in to Replay with Dropbox\"\n              id=\"AYyu+x\"\n            />\n          </SigninButton>\n        </Flex>\n      }\n      illustration={<ATMKeyboardIllustration />}\n    />\n  );\n};\n\n// How long to wait before sending the user through the oauth flow. Gives the\n// logging calls time to complete. This timeout may not strictly be necessary\n// but we include it to ensure the integrity of the event data as it should be\n// barely perceptible to the user.\nconst REDIRECT_TIMEOUT = 100;\n\nexport const SendThroughSignIn = () => {\n  const sessionContext = useReelAppGlobalState();\n  const {redCarpet} = useExtensionContext();\n\n  const authUrl = useSigninUrl();\n\n  const loggingClient = useLoggingClient();\n\n  const showThirdPartyAuthPage =\n    // TODO(tespejo): Apple won't approve app store distribution without IAP, since our third party auth page shows Dropbox upsells\n    isInWebView() && sessionContext.status === 'logged out';\n\n  useOnce(() => {\n    const pageSource: ReelPageSourceType = showThirdPartyAuthPage\n      ? 'third_party_auth_page'\n      : 'landing_page_redirect_only';\n\n    // Used to track the health of the auth flow from our marketing campaigns\n    const campaignContext = getPageContext();\n    logAggregatePageVisit(pageSource, campaignContext);\n\n    // eslint-disable-next-line deprecation/deprecation\n    loggingClient.logEvent('shown_reel_page', {\n      reel_page_source: pageSource,\n      access_type: 'not_applicable',\n      email_campaign_id: 0,\n      referrer: getReferrer() || '',\n      red_carpet_mode: redCarpet.mode,\n    });\n  });\n\n  if (showThirdPartyAuthPage) {\n    return <ThirdPartyAuthPage />;\n  }\n\n  if (authUrl === null) {\n    return null;\n  }\n\n  // Default case: User is logged out; send them through the auth flow.\n  window.location.href = authUrl;\n  return <Loader />;\n};\n\nexport const SigninPage = () => {\n  const [signinInProgress, setSigninInProgress] = React.useState<boolean>(false);\n\n  const loggingClient = useLoggingClient();\n  const {redCarpet} = useExtensionContext();\n  const authUrl = useSigninUrl();\n\n  useOnce(() => {\n    // eslint-disable-next-line deprecation/deprecation\n    loggingClient.logEvent('shown_reel_page', {\n      reel_page_source: 'sign_in_to_access_page',\n      access_type: 'owner',\n      email_campaign_id: 0,\n      referrer: getReferrer() || '',\n      red_carpet_mode: redCarpet.mode,\n    });\n  });\n\n  const handleSigninClick = React.useCallback(() => {\n    setSigninInProgress(true);\n    // eslint-disable-next-line deprecation/deprecation\n    loggingClient.logEvent('select_sign_in_with_dropbox');\n\n    setTimeout(() => {\n      if (authUrl) {\n        window.location.href = authUrl;\n      }\n    }, REDIRECT_TIMEOUT);\n  }, [authUrl, loggingClient]);\n\n  if (authUrl === null) {\n    return null;\n  }\n\n  return (\n    <LoginPage\n      loginButtonProps={{\n        onClick: handleSigninClick,\n        disabled: signinInProgress,\n      }}\n    />\n  );\n};\n"],"names":["ConstructionBarrierIllustration","jsxs","jsx","Flex","styled","FormattedButton","ThirdPartyAuthPage","userCode","setUserCode","React","verificationURI","setVerificationURI","error","setError","sessionContext","useReelAppGlobalState","stormcrows","useStormcrows","navigate","useNavigate","getUserSignIn","deviceFlowResponse","newDeviceFlowSession","deviceCode","verificationUriComplete","parseVerificationUrl","openURLInExternalBrowser","redCarpetError","tokenData","pollForCompletedDeviceFlow","initiateSignIn","tokenResult","LoggingClient","e","ErrorPage","Loader","IllustrationPage","Fragment","Text","FormattedMessage","Button","ButtonSection","FindYourAdminButton","OrText","NoAccessPage","props","loggingClient","useLoggingClient","redCarpet","useExtensionContext","useOnce","pageSource","campaignContext","getPageContext","logAggregatePageVisit","getReferrer","Title","SigninButton","LoginPage","ATMKeyboardIllustration","REDIRECT_TIMEOUT","SendThroughSignIn","authUrl","useSigninUrl","showThirdPartyAuthPage","isInWebView","SigninPage","signinInProgress","setSigninInProgress","handleSigninClick"],"mappings":"+nBAAO,MAAMA,EAAkC,IAC7CC,EAAA,KAAC,MAAA,CACC,KAAK,OACL,OAAO,MACP,QAAQ,cACR,MAAM,MACN,MAAM,6BAEN,SAAA,CAAAC,EAAA,IAAC,OAAA,CACC,EAAE,6jGACF,KAAK,SAAA,CACP,EACAA,EAAA,IAAC,OAAA,CACC,EAAE,imMACF,KAAK,SAAA,CACP,EACAA,EAAA,IAAC,OAAA,CACC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