diff --git a/.gitignore b/.gitignore index a547bf3..2b591e0 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ dist-ssr *.njsproj *.sln *.sw? + +S3 diff --git a/S3/assets/1.png b/S3/assets/1.png deleted file mode 100644 index 1acfe4c..0000000 Binary files a/S3/assets/1.png and /dev/null differ diff --git a/S3/assets/2.png b/S3/assets/2.png deleted file mode 100644 index 09dfdb5..0000000 Binary files a/S3/assets/2.png and /dev/null differ diff --git a/S3/assets/3.png b/S3/assets/3.png deleted file mode 100644 index 7b219d4..0000000 Binary files a/S3/assets/3.png and /dev/null differ diff --git a/S3/assets/4.png b/S3/assets/4.png deleted file mode 100644 index 58110de..0000000 Binary files a/S3/assets/4.png and /dev/null differ diff --git a/S3/assets/bg.jpg b/S3/assets/bg.jpg deleted file mode 100644 index 4dcc3fc..0000000 Binary files a/S3/assets/bg.jpg and /dev/null differ diff --git a/S3/assets/favicon.png b/S3/assets/favicon.png deleted file mode 100644 index 21b493e..0000000 Binary files a/S3/assets/favicon.png and /dev/null differ diff --git a/S3/assets/index-BTzaTAIG.css b/S3/assets/index-BTzaTAIG.css deleted file mode 100644 index b8a4444..0000000 --- a/S3/assets/index-BTzaTAIG.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.right-4{right:1rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mt-12{margin-top:-3rem}.-mt-6{margin-top:-1.5rem}.ml-4{margin-left:1rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-20{height:5rem}.h-36{height:9rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.w-10{width:2.5rem}.w-20{width:5rem}.w-6{width:1.5rem}.w-96{width:24rem}.w-full{width:100%}.w-screen{width:100vw}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.border-4{border-width:4px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-20{--tw-bg-opacity: .2}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-60{--tw-bg-opacity: .6}.bg-cover{background-size:cover}.bg-center{background-position:center}.bg-no-repeat{background-repeat:no-repeat}.object-cover{-o-object-fit:cover;object-fit:cover}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-6{padding-bottom:1.5rem}.pt-20{padding-top:5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.opacity-60{opacity:.6}.opacity-80{opacity:.8}html,body{min-height:100%}body{min-width:350px;overflow-x:auto}#spinner{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media only screen and (max-width: 500px){body{padding:0!important;align-items:center!important}section{background-color:transparent!important;color:#fff!important;width:auto!important}section h2{opacity:.8!important}#login-page{padding:.75rem;justify-content:start!important}#requires-container{background:#222222b3!important}.text-gray-light{color:#aeaeae!important}.hello-about{color:#fff}}.shadow-medium{box-shadow:0 8px 30px #00000014}.greeting{margin-top:-50px}.hello-btn{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}@media only screen and (max-width: 640px){.greeting{margin-top:-24px}#update-picture{margin-left:16px}}@media (prefers-color-scheme: light){html{color-scheme:light}body,#login-card,#modal{background-color:#fff;color:#303030}header{background-color:#fff}#profile-page{background-color:#fff}#requires-container{background:#ecececb3}.text-gray-light{color:gray}.hello-about-container{color:#303030}}@media (prefers-color-scheme: dark){html{color-scheme:dark}body,#login-card,#modal{background-color:#151515;color:#d4d4d4}#modal{border:1px solid #808080}#profile-page{background-color:#151515}header{background-color:#303030}#picture{border:4px solid #808080}.card{background-color:#303030;color:#d4d4d4}.metric-card{color:#303030}#requires-container{background:#222222b3}.text-gray-light{color:#aeaeae}.hello-about-container{color:#d4d4d4}}.spinner{position:absolute;left:50%;top:50%;height:40px;width:40px;margin:-26px 0 0 -26px;box-sizing:content-box;animation:rotation 1s infinite linear;border-width:6px;border-style:solid;border-radius:100%}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-color-scheme: dark){.spinner{border-color:#7474744d;border-top-color:#747474}}@media (prefers-color-scheme: light){.spinner{border-color:#4b4b4b4d;border-top-color:#4b4b4b}}@media (min-width: 640px){.sm\:-mt-16{margin-top:-4rem}.sm\:-mt-24{margin-top:-6rem}.sm\:ml-0{margin-left:0}.sm\:h-36{height:9rem}.sm\:h-64{height:16rem}.sm\:w-36{width:9rem}.sm\:max-w-5xl{max-width:64rem}.sm\:items-center{align-items:center}}@media (min-width: 768px){.md\:flex-row{flex-direction:row}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}} diff --git a/S3/assets/index-CsGgHytc.js b/S3/assets/index-CsGgHytc.js deleted file mode 100644 index 22745c5..0000000 --- a/S3/assets/index-CsGgHytc.js +++ /dev/null @@ -1 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();var b=Object.create,y=Object.defineProperty,N=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,C=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty,U=(e,t)=>function(){return t||(0,e[I(e)[0]])((t={exports:{}}).exports,t),t.exports},V=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of I(t))!R.call(e,o)&&o!==n&&y(e,o,{get:()=>t[o],enumerable:!(i=N(t,o))||i.enumerable});return e},M=(e,t,n)=>(n=e!=null?b(C(e)):{},V(!e||!e.__esModule?y(n,"default",{value:e,enumerable:!0}):n,e)),q=U({"../definitions/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.NotLoggedIn=e.VALID_PROVIDER_HINT=e.VALID_RESPONSE_MODE=e.VALID_RESPONSE_TYPE=e.VALID_SCOPES=e.VALID_IDENTITY_CLAIMS=e.ORG_CLAIM=e.VALID_IDENTITY_ACCOUNT_CLAIMS=e.VALID_IDENTITY_STRING_CLAIMS=e.DEFAULT_PATH=e.DEFAULT_RESPONSE_MODE=e.DEFAULT_RESPONSE_TYPE=e.DEFAULT_SCOPE=e.PRODUCTION_WALLET=void 0,e.PRODUCTION_WALLET="https://wallet.hello.coop",e.DEFAULT_SCOPE=["openid","name","email","picture"],e.DEFAULT_RESPONSE_TYPE="code",e.DEFAULT_RESPONSE_MODE="query",e.DEFAULT_PATH="/authorize?",e.VALID_IDENTITY_STRING_CLAIMS=["name","nickname","preferred_username","given_name","family_name","email","phone","picture","ethereum"],e.VALID_IDENTITY_ACCOUNT_CLAIMS=["discord","twitter","github","gitlab"],e.ORG_CLAIM="org",e.VALID_IDENTITY_CLAIMS=[...e.VALID_IDENTITY_STRING_CLAIMS,...e.VALID_IDENTITY_ACCOUNT_CLAIMS,"org","email_verified","phone_verified"],e.VALID_SCOPES=[...e.VALID_IDENTITY_STRING_CLAIMS,...e.VALID_IDENTITY_ACCOUNT_CLAIMS,"profile","openid","profile_update"],e.VALID_RESPONSE_TYPE=["id_token","code"],e.VALID_RESPONSE_MODE=["fragment","query","form_post"],e.VALID_PROVIDER_HINT=["apple","discord","facebook","github","gitlab","google","twitch","twitter","tumblr","mastodon","microsoft","line","wordpress","yahoo","phone","ethereum","qrcode","apple--","microsoft--"],e.NotLoggedIn={isLoggedIn:!1};var t;(function(n){n.STYLES_URL="https://cdn.hello.coop/css/hello-btn.css",n.HOVER_MAPPING={pop:"",glow:"hello-btn-hover-glow",flare:"hello-btn-hover-flare",none:"hello-btn-hover-none"},n.CLASS_MAPPING={black:{"ignore-light":"","ignore-dark":"hello-btn-black-on-dark","aware-invert":"hello-btn-black-and-invert","aware-static":"hello-btn-black-and-static"},white:{"ignore-light":"hello-btn-white-on-light","ignore-dark":"hello-btn-white-on-dark","aware-invert":"hello-btn-white-and-invert","aware-static":"hello-btn-white-and-static"}}})(t||(e.Button=t={}))}});function k(e){return crypto.getRandomValues(new Uint8Array(e))}function F(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let n="";const i=k(e);for(let o=0;o128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=Y(e),n=await j(t);return{code_verifier:t,code_challenge:n}}var a=M(q());function H(e){return a.VALID_SCOPES.includes(e)}function B(e){return e.every(t=>H(t))}async function J(e){if(!e.client_id)throw new Error("client_id is required in the authorization request.");if(!e.redirect_uri)throw new Error("redirect_uri is required in the authorization request.");if(e.scope){if(!B(e.scope))throw new Error("One or more passed scopes are invalid.");e.scope=Array.from(new Set([...e.scope,"openid"]))}if(e.response_type&&!a.VALID_RESPONSE_TYPE.includes(e.response_type))throw new Error("Invalid response_type.");if(e.response_mode&&!a.VALID_RESPONSE_MODE.includes(e.response_mode))throw new Error("Invalid response_mode.");const t=e.nonce||crypto.randomUUID();let n="";const o=(e.scope||a.DEFAULT_SCOPE).join(" "),r={client_id:e.client_id,redirect_uri:e.redirect_uri,scope:o,response_type:e.response_type||a.DEFAULT_RESPONSE_TYPE,response_mode:e.response_mode||a.DEFAULT_RESPONSE_MODE,nonce:t};if(e.prompt&&(r.prompt=e.prompt),r.response_type==="code"){const s=await G();n=s.code_verifier,r.code_challenge=s.code_challenge,r.code_challenge_method="S256"}return e.provider_hint&&(r.provider_hint=e.provider_hint.join(" ")),e.login_hint&&(r.login_hint=e.login_hint),e.domain_hint&&(r.domain_hint=e.domain_hint),{url:(e.wallet||a.PRODUCTION_WALLET)+a.DEFAULT_PATH+new URLSearchParams(r).toString(),nonce:t,code_verifier:n}}var W="/oauth/token";async function $({code:e,code_verifier:t,client_id:n,redirect_uri:i,wallet:o}){const r={code:e,code_verifier:t,client_id:n,redirect_uri:i,grant_type:"authorization_code"},c=new URLSearchParams(r).toString(),s=(o||a.PRODUCTION_WALLET)+W;try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c}),l=await d.json();if(!d.ok){const v=`Fetch ${s} failed with ${d.status}. `+(l.error?l.error+".":"");throw new Error(v)}if(l.error)throw new Error(l.error);if(!l.id_token)throw new Error("No id_token in response.");return l.id_token}catch(d){throw new Error(d)}}function E(e){var t=e.replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)}function z(e){try{const[t,n]=e.split("."),i=E(t),o=E(n);return{header:i,payload:o}}catch(t){throw new Error(t)}}a.DEFAULT_PATH;a.DEFAULT_RESPONSE_MODE;a.DEFAULT_RESPONSE_TYPE;a.DEFAULT_SCOPE;a.PRODUCTION_WALLET;a.VALID_RESPONSE_MODE;a.VALID_RESPONSE_TYPE;a.VALID_SCOPES;const u={client_id:"app_B2BSaaSDemonstrationAppX_HaQ",redirect_uri:"http://localhost:5173/",scope:["openid","profile"],response_mode:"fragment",domain_hint:"managed",wallet:"https://wallet.hello-dev.net/"},h=document.querySelector("#login-btn"),K=document.querySelector("#logout-btn"),f=document.querySelector("#invite-btn"),L=document.querySelector("#profile-page"),S=document.querySelector("#login-page"),T=document.querySelector("#profile-page-content"),O=document.querySelector("#modal-container"),Q=document.querySelector("#error-container"),m=document.querySelector("#error"),X=document.querySelector("#org-domain"),Z=document.querySelector("#org-id"),x=document.querySelector("#full-name"),ee=document.querySelector("#email"),g=document.querySelector("#picture"),te=document.querySelector("#load-spinner"),ne=document.querySelector("#org-container"),oe=document.querySelector("#close-modal-btn");window.addEventListener("load",re);h.addEventListener("click",P);K.addEventListener("click",ie);f.addEventListener("click",se);oe.addEventListener("click",ce);async function re(){const{search:e}=window.location,t=window.location.hash.substring(1),n=new URLSearchParams(e||t),i=n.has("iss"),o=n.has("code"),r=n.has("error"),c=JSON.parse(sessionStorage.getItem("profile"));if(i)return P(null,n);o?ae(n):r?A(n,c):c?w(c):_(),D(),le()}async function P(e,t){h.classList.add("hello-btn-loader"),h.disabled=!0;const{url:n,nonce:i,code_verifier:o}=await J({...u,login_hint:(t==null?void 0:t.get("login_hint"))||void 0,domain_hint:(t==null?void 0:t.get("domain_hint"))||u.domain_hint,wallet:"https://wallet.hello-dev.net/"});sessionStorage.setItem("nonce",i),sessionStorage.setItem("code_verifier",o),await p({u:"/start/login",n:"action"}),window.location.href=n}function ie(){p({u:"/logout",n:"action"}),sessionStorage.clear(),_()}async function ae(e){try{const t=await $({client_id:u.client_id,redirect_uri:u.redirect_uri,code_verifier:sessionStorage.getItem("code_verifier"),nonce:sessionStorage.getItem("nonce"),code:e.get("code"),wallet:"https://wallet.hello-dev.net/"}),{payload:n}=z(t);sessionStorage.clear(),sessionStorage.setItem("profile",JSON.stringify(n)),p({u:"/profile"}),w(n)}catch(t){console.error(t),sessionStorage.clear(),_(),A(e)}finally{D()}}function A(e,t){const n=e.get("error");O.style.display="flex",Q.style.display="block",n==="access_denied"?m.innerText="User cancelled request.":m.innerText="Something went wrong.",t?w(t):_()}function ce(){O.style.display="none"}function D(){window.location.hash&&(window.location.replace("#"),typeof window.history.replaceState=="function"&&history.replaceState({},"",window.location.href.slice(0,-1)))}function le(){te.style.display="none"}function _(){let e="/";window.location.search&&(e+=window.location.search),p({u:e}),S.style.visibility="visible",S.style.position="relative",L.style.display="none",T.style.display="none",document.body.style.backgroundImage="url(/assets/bg.jpg)"}async function p(e){if(localStorage.getItem("plausible_ignore")=="true"||window.location.origin!=="https://www.b2bsaasdemo.com"){console.info("Ignoring Event: localStorage flag");return}const t={w:window.innerWidth,d:"b2bsaasdemo.com",...e,n:e.n||"pageview",r:e.r||document.referrer||null,u:new URL(e.u,"https://www.b2bsaasdemo.com")};try{await fetch("/api/event",{method:"POST",body:JSON.stringify(t)}),console.info(`Event sent: ${t.u} (${t.n})`)}catch(n){console.error(n)}}function w(e){const{name:t,picture:n,email:i,org:o}=e;x.innerText=t,ee.innerText=i,g.src=n,g.style.backgroundImage=`url('${n}')`,o?(X.innerText=o==null?void 0:o.domain,Z.innerText=o==null?void 0:o.id):ne.style.display="none",L.style.display=T.style.display="block"}async function se(){f.classList.add("hello-btn-loader"),f.disabled=!0;const{sub:e}=JSON.parse(sessionStorage.getItem("profile")),t=new URL("https://wallet.hello-dev.net/invite");t.searchParams.append("inviter",e),t.searchParams.append("client_id",u.client_id),t.searchParams.append("initiate_login_uri",window.location.origin),t.searchParams.append("return_uri",window.location.origin),window.location.href=t.href}(function(){window.onpageshow=function(e){e.persisted&&window.location.reload()}})(); diff --git a/S3/assets/logo.png b/S3/assets/logo.png deleted file mode 100644 index 0e7d418..0000000 Binary files a/S3/assets/logo.png and /dev/null differ diff --git a/S3/assets/managed.png b/S3/assets/managed.png deleted file mode 100644 index 37803ea..0000000 Binary files a/S3/assets/managed.png and /dev/null differ diff --git a/S3/index.html b/S3/index.html deleted file mode 100644 index 565746c..0000000 --- a/S3/index.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - B2B SaaS - - - - - - - - - -
- - - - - - - - - - \ No newline at end of file