From da2c2d9d52cb8b57223ba58b530842f81a766f4b Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Wed, 4 Dec 2024 14:00:28 +0100 Subject: [PATCH] Migrate signup to new lightweight login modal --- package-lock.json | 602 +----------------- package.json | 3 +- src/app/(pricing)/layout.tsx | 2 + src/components/modules/login-modal/index.tsx | 335 ++++++++++ .../components/heading-plan/index.tsx | 2 +- .../plans/components/login-info/index.tsx | 8 +- .../components/login-info/login-info.types.ts | 1 + .../pricing/plans/hooks/get-plan-cta.tsx | 7 +- .../sections/pricing/plans/index.tsx | 15 +- src/lib/store/account-store.ts | 64 +- src/styles/index.ts | 1 + 11 files changed, 407 insertions(+), 633 deletions(-) create mode 100644 src/components/modules/login-modal/index.tsx diff --git a/package-lock.json b/package-lock.json index 6e7de163..5123b237 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "@docsearch/react": "^3.6.0", - "@httptoolkit/accounts": "^2.2.0", + "@httptoolkit/accounts": "^3.0.0", + "@httptoolkit/util": "^0.1.5", "@phosphor-icons/react": "^2.1.4", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.0.6", @@ -2777,12 +2778,11 @@ "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" }, "node_modules/@httptoolkit/accounts": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@httptoolkit/accounts/-/accounts-2.2.0.tgz", - "integrity": "sha512-vIDy4eXySOC7D/73SoBGdLN3fRlW/QKCYdbjCA9e3fmVNlsoyc1pJqz18yuGcBi1CzSBrSfIKmlEc9GkFe788w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@httptoolkit/accounts/-/accounts-3.0.0.tgz", + "integrity": "sha512-noCxqU0nA+pV87iAZyKFC/8F/M+INWSnm4avhNXCqYD8PzWEQukwKvfS9njERRtLAKQsK6wmk8dQ0st9XRzauQ==", "dependencies": { - "@httptoolkit/auth0-lock": "^12.4.1", - "@httptoolkit/util": "^0.1.1", + "@httptoolkit/util": "^0.1.5", "@types/node": "*", "async-mutex": "^0.2.6", "dedent": "^0.7.0", @@ -2790,46 +2790,10 @@ "lodash": "^4.17.21" } }, - "node_modules/@httptoolkit/accounts/node_modules/@httptoolkit/auth0-lock": { - "version": "12.4.1", - "resolved": "https://registry.npmjs.org/@httptoolkit/auth0-lock/-/auth0-lock-12.4.1.tgz", - "integrity": "sha512-PN3vnrkrG/AL5C4ghKhHcV3IF9FtYXCspWLGfrjOwZ0c+pYXFZY9afbzFD7tO8nxpEomVQh4AjfQMixNCvh8AQ==", - "dependencies": { - "auth0-js": "^9.23.3", - "auth0-password-policies": "^1.0.2", - "blueimp-md5": "^2.19.0", - "classnames": "^2.3.2", - "dompurify": "^2.3.12", - "immutable": "^3.7.6", - "jsonp": "^0.2.1", - "password-sheriff": "^1.1.1", - "prop-types": "^15.8.0", - "qs": "^6.10.3", - "react-transition-group": "^2.2.1", - "trim": "^1.0.1", - "url-join": "^1.1.0", - "validator": "^13.6.0" - }, - "peerDependencies": { - "react": "^18.2.0", - "react-dom": "^18.2.0" - } - }, - "node_modules/@httptoolkit/accounts/node_modules/blueimp-md5": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", - "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==" - }, - "node_modules/@httptoolkit/accounts/node_modules/trim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-1.0.1.tgz", - "integrity": "sha512-3JVP2YVqITUisXblCDq/Bi4P9457G/sdEamInkyvCsjbTcXLXIiG7XCb4kGMFWh6JGXesS3TKxOPtrncN/xe8w==", - "deprecated": "Use String.prototype.trim() instead" - }, "node_modules/@httptoolkit/util": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@httptoolkit/util/-/util-0.1.2.tgz", - "integrity": "sha512-TBZNjmKBLsmtdjslBmXPqS5kCMyTtvTZnomvLKrZcIkkXBzrj14GwuH4rLXfTtzMWE3CpsNy8IqsI13EDobmmg==" + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@httptoolkit/util/-/util-0.1.5.tgz", + "integrity": "sha512-1N1DHz3Z3UljqWA9XiHo2nr/bdf9iNV9wcilJbOGCEP+S7jpBTKOESwCv5uYcSEWyyO0+VyVgod86o+CWSKXkA==" }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.2", @@ -3310,9 +3274,9 @@ } }, "node_modules/@next/bundle-analyzer": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-14.2.1.tgz", - "integrity": "sha512-Qwy3Mu/dfnu4rs2xzCy7gKZlwzZzYtiq/rjPcK/7xq3BHSyLthkHf1NAF8NNfjVTouDwo2KchisHrmAamUNWWw==", + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-14.2.18.tgz", + "integrity": "sha512-3tfi//6w3T1JGelYl+CSIwFFLrMui+R7kGc+dRZJNYAPwg7xL9/CBtGnSKZLPgsA/CwwPOdnMrYYBOPZ2BSezQ==", "dev": true, "dependencies": { "webpack-bundle-analyzer": "4.10.1" @@ -4745,11 +4709,6 @@ "node": ">=0.10.0" } }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" - }, "node_modules/astring": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", @@ -4766,39 +4725,6 @@ "tslib": "^2.0.0" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/auth0-js": { - "version": "9.24.1", - "resolved": "https://registry.npmjs.org/auth0-js/-/auth0-js-9.24.1.tgz", - "integrity": "sha512-Zax2BOEP6ZRLWNnG59JiquIHiWkgePOOfNv3UgA30Vm0jMQY4SyNAI6yG2+xr5rBxjs/L38xZAHLJm5lcwwGog==", - "dependencies": { - "base64-js": "^1.5.1", - "idtoken-verifier": "^2.2.4", - "js-cookie": "^2.2.0", - "minimist": "^1.2.5", - "qs": "^6.10.1", - "superagent": "^7.1.5", - "url-join": "^4.0.1", - "winchan": "^0.2.2" - } - }, - "node_modules/auth0-js/node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" - }, - "node_modules/auth0-password-policies": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/auth0-password-policies/-/auth0-password-policies-1.0.2.tgz", - "integrity": "sha512-ZshousKt+Wfv/iIBS3oQfOsH8NBF9IbL15qd2Qur8YfiQrRjrAT0T7VaesnrytYEHEXkUbHcdxWEAlyr16w20A==", - "dependencies": { - "password-sheriff": "^1.1.0" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.8", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz", @@ -4856,25 +4782,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -4935,24 +4842,6 @@ "node": ">=10.16.0" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -5101,11 +4990,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/classnames": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" - }, "node_modules/clean-css": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", @@ -5249,17 +5133,6 @@ "simple-swizzle": "^0.2.2" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -5279,14 +5152,6 @@ "dot-prop": "^5.1.0" } }, - "node_modules/component-emitter": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", - "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/conventional-changelog-angular": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz", @@ -5337,11 +5202,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/cookiejar": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", - "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" - }, "node_modules/copy-to-clipboard": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", @@ -5439,11 +5299,6 @@ "node": ">= 8" } }, - "node_modules/crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" - }, "node_modules/css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", @@ -5645,30 +5500,6 @@ "node": ">=0.10.0" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -5690,15 +5521,6 @@ "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" }, - "node_modules/dezalgo": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", - "dependencies": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", @@ -5707,14 +5529,6 @@ "node": ">=0.3.1" } }, - "node_modules/dom-helpers": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", - "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", - "dependencies": { - "@babel/runtime": "^7.1.2" - } - }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -5756,11 +5570,6 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, - "node_modules/dompurify": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.7.tgz", - "integrity": "sha512-2q4bEI+coQM8f5ez7kt2xclg1XsecaV9ASJk/54vwlfRRNQfDqJz2pzQ8t0Ix/ToBpXlVjrRIx7pFC/o8itG2Q==" - }, "node_modules/domutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", @@ -5838,30 +5647,6 @@ "stackframe": "^1.3.4" } }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -6029,11 +5814,6 @@ "resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.4.tgz", "integrity": "sha512-8dbd3XWoKCTms18ize6JmQF1SFnnfj5s0B7rRry22EofgMu7B6LKHVh+XfFqFGsqnbH54xgeO83PzpKI+ODhlg==" }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" - }, "node_modules/fast-shallow-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz", @@ -6084,33 +5864,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formidable": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", - "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", - "dependencies": { - "dezalgo": "^1.0.4", - "hexoid": "^1.0.0", - "once": "^1.4.0", - "qs": "^6.11.0" - }, - "funding": { - "url": "https://ko-fi.com/tunnckoCore/commissions" - } - }, "node_modules/fs-extra": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", @@ -6125,6 +5878,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6147,24 +5901,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-nonce": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", @@ -6216,17 +5952,6 @@ "node": ">=4" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -6299,43 +6024,11 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasown": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -6352,14 +6045,6 @@ "he": "bin/he" } }, - "node_modules/hexoid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", - "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", - "engines": { - "node": ">=8" - } - }, "node_modules/hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -6431,32 +6116,6 @@ "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" }, - "node_modules/idtoken-verifier": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/idtoken-verifier/-/idtoken-verifier-2.2.4.tgz", - "integrity": "sha512-5t7O8cNHpJBB8FnwLD0qFZqy/+qGICObQKUl0njD6vXKHhpZPLEe8LU7qv/GBWB3Qv5e/wAIFHYVi4SoQwdOxQ==", - "dependencies": { - "base64-js": "^1.5.1", - "crypto-js": "^4.2.0", - "es6-promise": "^4.2.8", - "jsbn": "^1.1.0", - "unfetch": "^4.2.0", - "url-join": "^4.0.1" - } - }, - "node_modules/idtoken-verifier/node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" - }, - "node_modules/immutable": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -6485,7 +6144,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "1.3.8", @@ -6722,11 +6382,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -6753,27 +6408,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/jsonp/-/jsonp-0.2.1.tgz", - "integrity": "sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==", - "dependencies": { - "debug": "^2.1.3" - } - }, - "node_modules/jsonp/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/jsonp/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -7093,14 +6727,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -7113,36 +6739,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -8554,30 +8150,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -8704,11 +8276,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/password-sheriff": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/password-sheriff/-/password-sheriff-1.1.1.tgz", - "integrity": "sha512-bt0ptyUs97Fb2ZXUcdQP0RYrBFjzO6KhGTjq4RkmR388c6wcT3khG0U7Bvvqwq3DyShEZ9IACed9JMVyAxdaCA==" - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -8828,16 +8395,6 @@ "node": ">=6" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/property-information": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.1.tgz", @@ -8866,20 +8423,6 @@ "teleport": ">=0.2.0" } }, - "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -8965,16 +8508,6 @@ } } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, "node_modules/react-plock": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/react-plock/-/react-plock-3.1.0.tgz", @@ -9050,21 +8583,6 @@ } } }, - "node_modules/react-transition-group": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", - "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==", - "dependencies": { - "dom-helpers": "^3.4.0", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2", - "react-lifecycles-compat": "^3.0.4" - }, - "peerDependencies": { - "react": ">=15.0.0", - "react-dom": ">=15.0.0" - } - }, "node_modules/react-universal-interface": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz", @@ -9244,6 +8762,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9491,6 +9010,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -9567,22 +9087,6 @@ "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==" }, - "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", - "dependencies": { - "define-data-property": "^1.1.2", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/set-harmonic-interval": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz", @@ -9681,23 +9185,6 @@ "node": "^12.20.0 || >=14" } }, - "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -9858,6 +9345,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -9998,27 +9486,6 @@ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" }, - "node_modules/superagent": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-7.1.5.tgz", - "integrity": "sha512-HQYyGuDRFGmZ6GNC4hq2f37KnsY9Lr0/R1marNZTgMweVDQLTLJJ6DGQ9Tj/xVVs5HEnop9EMmTbywb5P30aqw==", - "dependencies": { - "component-emitter": "^1.3.0", - "cookiejar": "^2.1.3", - "debug": "^4.3.4", - "fast-safe-stringify": "^2.1.1", - "form-data": "^4.0.0", - "formidable": "^2.0.1", - "methods": "^1.1.2", - "mime": "^2.5.0", - "qs": "^6.10.3", - "readable-stream": "^3.6.0", - "semver": "^7.3.7" - }, - "engines": { - "node": ">=6.4.0 <13 || >=14" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10267,11 +9734,6 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, - "node_modules/unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" - }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -10374,11 +9836,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url-join": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", - "integrity": "sha512-zz1wZk4Lb5PTVwZ3HWDmm8XnlPvmOof6/fjdDPA5yBrUcbtV64U6bV832Zf1BtU2WkBBWaUT46wCs+l0HP5nhg==" - }, "node_modules/use-callback-ref": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.1.tgz", @@ -10431,7 +9888,8 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/uvu": { "version": "0.5.6", @@ -10466,14 +9924,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/vaul": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.9.0.tgz", @@ -10556,16 +10006,6 @@ "node": ">= 8" } }, - "node_modules/winchan": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/winchan/-/winchan-0.2.2.tgz", - "integrity": "sha512-pvN+IFAbRP74n/6mc6phNyCH8oVkzXsto4KCHPJ2AScniAnA1AmeLI03I2BzjePpaClGSI4GUMowzsD3qz5PRQ==" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, "node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", diff --git a/package.json b/package.json index da451ac6..a0518a07 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "homepage": "https://github.com/httptoolkit/httptoolkit-website", "dependencies": { "@docsearch/react": "^3.6.0", - "@httptoolkit/accounts": "^2.2.0", + "@httptoolkit/accounts": "^3.0.0", + "@httptoolkit/util": "^0.1.5", "@phosphor-icons/react": "^2.1.4", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.0.6", diff --git a/src/app/(pricing)/layout.tsx b/src/app/(pricing)/layout.tsx index 38112a74..938e13a0 100644 --- a/src/app/(pricing)/layout.tsx +++ b/src/app/(pricing)/layout.tsx @@ -8,10 +8,12 @@ import { CaretRight } from '@/components/elements/icon'; import { Layout } from '@/components/layout'; import { PricingComparison } from '@/components/sections/pricing/comparison'; import { TextWithAccordion } from '@/components/sections/text-with-accordion'; +import { LoginModal } from '@/components/modules/login-modal'; export default function PricingLayout({ children }: { children: React.ReactNode }) { return ( + {children} theme.screens.lg}) { + width: auto; + max-width: 340px; + } + + background: white; + color: black; + + border-radius: 16px; + padding: 0; + box-shadow: 0 0 0 1px var(--button-border) inset; + + outline: none; + border: none; + + background-color: var(--dark-grey); + + &::backdrop { + opacity: 0.9; + background: radial-gradient(circle, var(--medium-grey), var(--light-grey)); + } +`; + +const CtaButton = styled(Button)` + margin: 20px; + width: calc(100% - 40px); + box-sizing: border-box; +`; + +const CloseDialogButton = styled.button` + position: absolute; + top: 0; + right: 0; + padding: 16px; + + background: none; + border: none; + color: var(--light-grey); + cursor: pointer; + + &:hover { + color: var(--white); + } +`; + +const BackButton = styled.button` + position: absolute; + top: 0; + left: 0; + padding: 16px; + + background: none; + border: none; + color: var(--light-grey); + cursor: pointer; + + &:hover { + color: var(--white); + } +`; + +const Form = styled.form` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +` + +const HeadingLogo = styled(Logo)` + margin: 48px 16px 16px; + width: 30%; + fill: var(--cinnabar-red); +`; + +const Title = styled(Heading)` + margin: 16px 32px; + text-align: center; +`; + +const Subtitle = styled(Heading)` + margin: -16px 32px 16px; + text-align: center; +`; + +const Email = styled.span` + white-space: break-spaces; + word-break: break-word; + hyphens: auto; +`; + +const Input = styled.input` + padding: 16px; + margin: 16px 0 0; + width: 100%; + + border-style: solid; + border-color: var(--medium-grey); + background-color: var(--ink-black); + + border-width: 1px 0 1px 0; + z-index: 1; + + font-size: ${({ theme }) => theme.fontSizes.text.m}; + + &:focus { + border-color: var(--white); + } +`; + +const SmallPrint = styled.p` + margin: 0; + padding: 10px 16px 12px; + width: 100%; + + font-size: ${({ theme }) => theme.fontSizes.text.s}; + font-style: italic; + + background-color: var(--darkish-grey); + color: var(--light-grey); +`; + +const spin = keyframes` + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +`; + +const Spinner = styled.div` + border: 4px solid rgba(0, 0, 0, 0.1); + border-top: 4px solid #007bff; + border-radius: 50%; + width: 24px; + height: 24px; + animation: ${spin} 1s linear infinite; + margin: 10px 0; +`; + +const ErrorMessage = styled.div` + color: red; + margin: 16px 20px 0; +`; + +export const LoginModal = observer(() => { + const handleDialogClose = React.useCallback(() => { + accountStore.endLogin(); + }, []); + + if (!accountStore.loginModalVisible) return null; + + return dialog?.showModal()} + onClose={handleDialogClose} + > + + + + + ; +}); + +const focusInput = (input: HTMLInputElement | null) => { + requestAnimationFrame(() => + input?.focus() + ); +} + +const LoginFields = () => { + const [email, setEmail] = useState(''); + const [code, setCode] = useState(''); + + const [isEmailSent, setIsEmailSent] = useState(false); + const [isLoading, setIsLoading] = useState(false); + const [error, setError] = useState(false); + + const handleEmailSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + setIsLoading(true); + setError(false); + + try { + await sendAuthCode(email, 'website'); + setIsLoading(false); + setIsEmailSent(true); + } catch (e) { + setIsLoading(false); + setError(asErrorLike(e).message || 'An error occurred'); + } + }; + + const handleBackButton = () => { + setIsEmailSent(false); + setError(false); + }; + + const handleCodeSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + setIsLoading(true); + setError(false); + + try { + await loginWithCode(email, code); + await accountStore.finalizeLogin(); + // We never unset isLoading - the modal disappears entirely when the + // account store state is fully updated, and we want to spin till then. + } catch (e) { + setIsLoading(false); + setError(asErrorLike(e).message || 'An error occurred'); + } + }; + + return !isEmailSent + ?
+ + + Enter your email + + setEmail(e.target.value)} + disabled={isLoading} + /> + + {error && + {error} + } + + + {isLoading ? : 'Send Code'} + + + + By creating an account you accept the + Terms of Service + & + Privacy Policy + . + + + : +
+ + + + + + Enter the code + + + sent to you at
+ { email } + +
+ { + const input = e.target.value; + const numberInput = input.replace(/\D/g, '').slice(0, 6); + setCode(numberInput); + }} + disabled={isLoading} + /> + + {error && + {error} + } + + + {isLoading ? : 'Login'} + + + + By creating an account you accept the + Terms of Service + & + Privacy Policy + . + + +}; diff --git a/src/components/sections/pricing/comparison/components/heading-plan/index.tsx b/src/components/sections/pricing/comparison/components/heading-plan/index.tsx index 7d37cb0a..f6c7ff40 100644 --- a/src/components/sections/pricing/comparison/components/heading-plan/index.tsx +++ b/src/components/sections/pricing/comparison/components/heading-plan/index.tsx @@ -17,7 +17,7 @@ export const HeadingPlan = observer(({ id, title, downloadButton }: HeadingPlanP {title} - {getPlanCTA(id, accountStore, accountStore.waitingForPurchase, 'monthly')} + {getPlanCTA(id, accountStore, 'monthly')} ); }); diff --git a/src/components/sections/pricing/plans/components/login-info/index.tsx b/src/components/sections/pricing/plans/components/login-info/index.tsx index 3a6767de..6d4981c1 100644 --- a/src/components/sections/pricing/plans/components/login-info/index.tsx +++ b/src/components/sections/pricing/plans/components/login-info/index.tsx @@ -1,7 +1,5 @@ 'use client'; -import { logOut } from '@httptoolkit/accounts'; - import { StyledLoginInfoWrapper } from './login-info.styles'; import type { LoginInfoProps } from './login-info.types'; @@ -9,7 +7,11 @@ import { Button } from '@/components/elements/button'; import { Link } from '@/components/elements/link'; import { Text } from '@/components/elements/text'; -export const LoginInfo = ({ isLoggedIn, email }: LoginInfoProps) => { +export const LoginInfo = ({ + isLoggedIn, + logOut, + email +}: LoginInfoProps) => { if (!isLoggedIn) { return ( diff --git a/src/components/sections/pricing/plans/components/login-info/login-info.types.ts b/src/components/sections/pricing/plans/components/login-info/login-info.types.ts index f445d305..81e860bc 100644 --- a/src/components/sections/pricing/plans/components/login-info/login-info.types.ts +++ b/src/components/sections/pricing/plans/components/login-info/login-info.types.ts @@ -1,4 +1,5 @@ export interface LoginInfoProps { email?: string; + logOut: () => void; isLoggedIn: boolean; } diff --git a/src/components/sections/pricing/plans/hooks/get-plan-cta.tsx b/src/components/sections/pricing/plans/hooks/get-plan-cta.tsx index a2ad4ed9..5b1422b0 100644 --- a/src/components/sections/pricing/plans/hooks/get-plan-cta.tsx +++ b/src/components/sections/pricing/plans/hooks/get-plan-cta.tsx @@ -17,13 +17,8 @@ import type { AccountStore, Interval } from '@/lib/store/account-store'; export const usePlanCta = (downloadButton?: React.ReactNode) => { const posthog = usePostHog(); - return useCallback((tierCode: string, account: AccountStore, waitingForPurchase: boolean, planCycle: Interval) => { + return useCallback((tierCode: string, account: AccountStore, planCycle: Interval) => { const { paidTier, paidCycle } = account.subscription; - - if (waitingForPurchase) { - return ; - } - if (tierCode === 'free') { return <>{downloadButton}; } diff --git a/src/components/sections/pricing/plans/index.tsx b/src/components/sections/pricing/plans/index.tsx index 53deea25..0a7a1540 100644 --- a/src/components/sections/pricing/plans/index.tsx +++ b/src/components/sections/pricing/plans/index.tsx @@ -21,6 +21,7 @@ import type { PlanId, StyledPricingPlansProps } from './plans.types'; import { Spinner } from '@/components/elements/icon'; import { Text } from '@/components/elements/text'; import { accountStore, Interval } from '@/lib/store/account-store'; +import { LoginModal } from '@/components/modules/login-modal'; const LoadingPrice = () => { return ( @@ -40,7 +41,11 @@ export const PricingPlans = observer(({ $hideFree, downloadButton }: StyledPrici const isAnnual = planCycle === 'annual'; const filteredPlans = $hideFree ? plans.filter(plan => plan.id !== 'free') : plans; - const { isLoggedIn, user, waitingForPurchase } = accountStore; + const { + isLoggedIn, + user, + logOut + } = accountStore; const getPlanMonthlyPrice = useCallback( (planId: PlanId) => { @@ -93,12 +98,16 @@ export const PricingPlans = observer(({ $hideFree, downloadButton }: StyledPrici price={getPlanMonthlyPrice(card.id)} {...card} > - {getPlanCTA(card.id, accountStore, waitingForPurchase, planCycle)} + {getPlanCTA(card.id, accountStore, planCycle)} ))} - + diff --git a/src/lib/store/account-store.ts b/src/lib/store/account-store.ts index 74b4534b..464300f6 100644 --- a/src/lib/store/account-store.ts +++ b/src/lib/store/account-store.ts @@ -1,16 +1,13 @@ import { - showLoginDialog, getLastUserData, getLatestUserData, - loginEvents, goToCheckout, - prefetchCheckout, - initializeAuthUi, loadPlanPricesUntilSuccess, SubscriptionPlans, TierCode, PricedSKU, - User + User, + logOut } from '@httptoolkit/accounts'; import { PostHog } from 'posthog-js'; @@ -19,7 +16,8 @@ import { observable, computed, flow, - action + action, + when } from 'mobx'; import { isSSR } from '../utils'; @@ -28,9 +26,9 @@ import { isSSR } from '../utils'; export type Interval = "monthly" | "annual"; export class AccountStore { + subscriptionPlans: SubscriptionPlans | null = null; - modal: 'login' | null = null; - waitingForPurchase: boolean = false; + loginModalVisible: boolean = false; user: User = !isSSR ? getLastUserData() : { featureFlags: [], banned: false }; @@ -38,8 +36,7 @@ export class AccountStore { constructor() { makeObservable(this, { subscriptionPlans: observable, - modal: observable, - waitingForPurchase: observable, + loginModalVisible: observable, user: observable, isLoggedIn: computed, isPaidUser: computed, @@ -47,26 +44,16 @@ export class AccountStore { }); if (!isSSR) { - initializeAuthUi({ - refreshToken: false, - }); - loadPlanPricesUntilSuccess() .then(action((prices: SubscriptionPlans) => { this.subscriptionPlans = prices; })); } - loginEvents.on('authenticated', async () => { - await this.updateUser(); - loginEvents.emit('user_data_loaded'); - }); - if (!isSSR) { this.updateUser(); setInterval(this.updateUser, 1000 * 60 * 10); } - loginEvents.on('logout', this.updateUser); } getPlanMonthlyPrice(tierCode: TierCode, planCycle: Interval): string | null { @@ -135,9 +122,24 @@ export class AccountStore { login = flow(function* (this: AccountStore) { if (!this.isLoggedIn) { - this.modal = 'login'; - yield showLoginDialog(); - this.modal = null; + this.loginModalVisible = true; + yield when(() => this.loginModalVisible === false); + } + }).bind(this); + + endLogin = flow(function* (this: AccountStore) { + this.loginModalVisible = false; + }).bind(this); + + finalizeLogin = flow(function* (this: AccountStore) { + yield this.updateUser(); + this.loginModalVisible = false; + }).bind(this); + + logOut = flow(function* (this: AccountStore) { + if (this.isLoggedIn) { + yield logOut(); + yield this.updateUser(); } }).bind(this); @@ -146,19 +148,9 @@ export class AccountStore { this.reportPurchaseEvent('Select plan', tierCode, planCycle, posthog); const sku = this.getSKU(tierCode, planCycle); - let loggingIn = true; if (!this.isLoggedIn) { - this.modal = 'login'; - - loginEvents.once('authenticated', async (authResult: { idTokenPayload?: { email?: string } }) => { - const initialEmailResult = authResult?.idTokenPayload?.email; - if (initialEmailResult && loggingIn) { - prefetchCheckout(initialEmailResult, sku, 'web'); - } - }); - this.reportPurchaseEvent('Login started', tierCode, planCycle, posthog); - yield showLoginDialog(); + yield this.login(); if (this.isLoggedIn) { this.reportPurchaseEvent('Login completed', tierCode, planCycle, posthog); } else { @@ -168,10 +160,7 @@ export class AccountStore { this.reportPurchaseEvent('Already logged in', tierCode, planCycle, posthog); } - loggingIn = false; - if (!this.isLoggedIn || this.isPaidUser) { - this.modal = null; return; } @@ -181,7 +170,6 @@ export class AccountStore { } this.reportPurchaseEvent('Checkout started', tierCode, planCycle, posthog); - return goToCheckout(this.user.email!, sku, 'web'); }.bind(this) ); diff --git a/src/styles/index.ts b/src/styles/index.ts index 25b64e9b..4520e55d 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -113,6 +113,7 @@ export const theme = { s: '0.875rem', // 14px / 16px = 0.875 }, button: { + large: '1.5rem', default: '1.125rem', // 18px / 16px = 1.125.5rem small: '1rem', // 16px / 16px = 1rem },