├── css ├── 2.aa999dc2.chunk.css └── main.78ec42be.chunk.css └── js ├── 2.1b24fd9e.chunk.js ├── 2.1b24fd9e.chunk.js.LICENSE.txt ├── main.e9ac8ad5.chunk.js └── runtime-main.1ca2f4d3.js /css/2.aa999dc2.chunk.css: -------------------------------------------------------------------------------- 1 | .emoji-mart,.emoji-mart *{box-sizing:border-box;line-height:1.15}.emoji-mart{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;font-size:16px;display:inline-block;color:#222427;border:1px solid #d9d9d9;border-radius:5px;background:#fff}.emoji-mart .emoji-mart-emoji{padding:6px}.emoji-mart-bar{border:0 solid #d9d9d9}.emoji-mart-bar:first-child{border-bottom-width:1px;border-top-left-radius:5px;border-top-right-radius:5px}.emoji-mart-bar:last-child{border-top-width:1px;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.emoji-mart-anchors{display:flex;flex-direction:row;justify-content:space-between;padding:0 6px;line-height:0}.emoji-mart-anchor{position:relative;display:block;flex:1 1 auto;color:#858585;text-align:center;padding:12px 4px;overflow:hidden;transition:color .1s ease-out;margin:0;box-shadow:none;background:none;border:none}.emoji-mart-anchor:focus{outline:0}.emoji-mart-anchor-selected,.emoji-mart-anchor:focus,.emoji-mart-anchor:hover{color:#464646}.emoji-mart-anchor-selected .emoji-mart-anchor-bar{bottom:0}.emoji-mart-anchor-bar{position:absolute;bottom:-3px;left:0;width:100%;height:3px;background-color:#464646}.emoji-mart-anchors i{display:inline-block;width:100%;max-width:22px}.emoji-mart-anchors img,.emoji-mart-anchors svg{fill:currentColor;height:18px;width:18px}.emoji-mart-scroll{overflow-y:scroll;overflow-x:hidden;height:270px;padding:0 6px 6px;will-change:transform}.emoji-mart-search{margin-top:6px;padding:0 6px;position:relative}.emoji-mart-search input{font-size:16px;display:block;width:100%;padding:5px 25px 6px 10px;border-radius:5px;border:1px solid #d9d9d9;outline:0}.emoji-mart-search input,.emoji-mart-search input::-webkit-search-cancel-button,.emoji-mart-search input::-webkit-search-decoration,.emoji-mart-search input::-webkit-search-results-button,.emoji-mart-search input::-webkit-search-results-decoration{-webkit-appearance:none}.emoji-mart-search-icon{position:absolute;top:7px;right:11px;z-index:2;padding:2px 5px 1px;border:none;background:none}.emoji-mart-category .emoji-mart-emoji span{z-index:1;position:relative;text-align:center;cursor:default}.emoji-mart-category .emoji-mart-emoji:hover:before{z-index:0;content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f4f4f4;border-radius:100%}.emoji-mart-category-label{z-index:2;position:relative;position:-webkit-sticky;position:sticky;top:0}.emoji-mart-category-label span{display:block;width:100%;font-weight:500;padding:5px 6px;background-color:#fff;background-color:hsla(0,0%,100%,.95)}.emoji-mart-category-list{margin:0;padding:0}.emoji-mart-category-list li{list-style:none;margin:0;padding:0;display:inline-block}.emoji-mart-emoji{position:relative;display:inline-block;font-size:0;margin:0;padding:0;border:none;background:none;box-shadow:none}.emoji-mart-emoji-native{font-family:"Segoe UI Emoji","Segoe UI Symbol","Segoe UI","Apple Color Emoji","Twemoji Mozilla","Noto Color Emoji","Android Emoji"}.emoji-mart-no-results{font-size:14px;text-align:center;padding-top:70px;color:#858585}.emoji-mart-no-results-img{display:block;margin-left:auto;margin-right:auto;width:50%}.emoji-mart-no-results .emoji-mart-category-label{display:none}.emoji-mart-no-results .emoji-mart-no-results-label{margin-top:.2em}.emoji-mart-no-results .emoji-mart-emoji:hover:before{content:none}.emoji-mart-preview{position:relative;height:70px}.emoji-mart-preview-data,.emoji-mart-preview-emoji,.emoji-mart-preview-skins{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.emoji-mart-preview-emoji{left:12px}.emoji-mart-preview-data{left:68px;right:12px;word-break:break-all}.emoji-mart-preview-skins{right:30px;text-align:right}.emoji-mart-preview-skins.custom{right:10px;text-align:right}.emoji-mart-preview-name{font-size:14px}.emoji-mart-preview-shortname{font-size:12px;color:#888}.emoji-mart-preview-emoticon+.emoji-mart-preview-emoticon,.emoji-mart-preview-shortname+.emoji-mart-preview-emoticon,.emoji-mart-preview-shortname+.emoji-mart-preview-shortname{margin-left:.5em}.emoji-mart-preview-emoticon{font-size:11px;color:#bbb}.emoji-mart-title span{display:inline-block;vertical-align:middle}.emoji-mart-title .emoji-mart-emoji{padding:0}.emoji-mart-title-label{color:#999a9c;font-size:26px;font-weight:300}.emoji-mart-skin-swatches{font-size:0;padding:2px 0;border:1px solid #d9d9d9;border-radius:12px;background-color:#fff}.emoji-mart-skin-swatches.custom{font-size:0;border:none;background-color:#fff}.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch{width:16px;padding:0 2px}.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected:after{opacity:.75}.emoji-mart-skin-swatch{display:inline-block;width:0;vertical-align:middle;transition-property:width,padding;transition-duration:.125s;transition-timing-function:ease-out}.emoji-mart-skin-swatch:first-child{transition-delay:0s}.emoji-mart-skin-swatch:nth-child(2){transition-delay:.03s}.emoji-mart-skin-swatch:nth-child(3){transition-delay:.06s}.emoji-mart-skin-swatch:nth-child(4){transition-delay:.09s}.emoji-mart-skin-swatch:nth-child(5){transition-delay:.12s}.emoji-mart-skin-swatch:nth-child(6){transition-delay:.15s}.emoji-mart-skin-swatch.selected{position:relative;width:16px;padding:0 2px}.emoji-mart-skin-swatch.selected:after{content:"";position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;background-color:#fff;border-radius:100%;pointer-events:none;opacity:0;transition:opacity .2s ease-out}.emoji-mart-skin-swatch.custom{display:inline-block;width:0;height:38px;overflow:hidden;vertical-align:middle;transition-property:width,height;transition-duration:.125s;transition-timing-function:ease-out;cursor:default}.emoji-mart-skin-swatch.custom.selected{position:relative;width:36px;height:38px;padding:0 2px 0 0}.emoji-mart-skin-swatch.custom.selected:after{content:"";width:0;height:0}.emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover{background-color:#f4f4f4;border-radius:10%}.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom{width:36px;height:38px;padding:0 2px 0 0}.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected:after{opacity:.75}.emoji-mart-skin-text.opened{display:inline-block;vertical-align:middle;text-align:left;color:#888;font-size:11px;padding:5px 2px;width:95px;height:40px;border-radius:10%;background-color:#fff}.emoji-mart-skin{display:inline-block;width:100%;padding-top:100%;max-width:12px;border-radius:100%}.emoji-mart-skin-tone-1{background-color:#ffc93a}.emoji-mart-skin-tone-2{background-color:#fadcbc}.emoji-mart-skin-tone-3{background-color:#e0bb95}.emoji-mart-skin-tone-4{background-color:#bf8f68}.emoji-mart-skin-tone-5{background-color:#9b643d}.emoji-mart-skin-tone-6{background-color:#594539}.emoji-mart-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.emoji-mart-dark{color:#fff;background-color:#222}.emoji-mart-dark,.emoji-mart-dark .emoji-mart-bar{border-color:#555453}.emoji-mart-dark .emoji-mart-search input{color:#fff;border-color:#555453;background-color:#2f2f2f}.emoji-mart-dark .emoji-mart-search-icon svg{fill:#fff}.emoji-mart-dark .emoji-mart-category .emoji-mart-emoji:hover:before{background-color:#444}.emoji-mart-dark .emoji-mart-category-label span{background-color:#222;color:#fff}.emoji-mart-dark .emoji-mart-skin-swatches{border-color:#555453;background-color:#222}.emoji-mart-dark .emoji-mart-anchor-selected,.emoji-mart-dark .emoji-mart-anchor:focus,.emoji-mart-dark .emoji-mart-anchor:hover{color:#bfbfbf} -------------------------------------------------------------------------------- /css/main.78ec42be.chunk.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800&display=swap);*,body{margin:0}body{font-family:"Inter","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.flex{display:flex}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-end{justify-content:flex-end}.align-items-center{align-items:center}.flex-row-between{display:flex;justify-content:space-between}.gap-5{grid-gap:5px;gap:5px}.gap-10{grid-gap:10px;gap:10px}.gap-15{grid-gap:15px;gap:15px}.gap-20{grid-gap:20px;gap:20px}.fw-400{font-weight:400}.fw-500{font-weight:500}.fw-600{font-weight:600}.gray-primary{color:#74767e}.black-primary{color:#333}.fs-14{font-size:14px}.fs-15{font-size:15px}.fs-16{font-size:16px}.pl-5{padding-left:5px}.ml-5{margin-left:5px}.MuiIconButton-root{background:rgba(0,0,0,.04)}.w-100{width:100%}.h-100{height:100%}.safety-line{flex:1 1;height:1px;background:#eaeaea}.MuiButton-label{font-size:15px;font-family:"Inter";font-weight:700;line-height:1}.text-underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.m-0{margin:0!important}.signin-container,.signup-container{height:100vh;width:100vw;background-color:#316af3}a{text-decoration:none}.signin-card,.signup-card{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-family:sans-serif;width:100%;max-width:350px;margin:38px auto;border-radius:10px!important;background-color:#fff;box-shadow:2px 5px 20px rgba(0,0,0,.1)}.signin-title,.signup-title{text-align:center;font-weight:700;margin:0}.signup-option{background-color:rgba(69,69,185,.2);border-bottom-left-radius:10px;border-bottom-right-radius:10px}.line{text-align:center;font-weight:700;border-bottom:2px solid #f5efef;line-height:2px;margin:25px 0}.error-message{color:red;font-weight:600}.signin-fields,.signup-fields{display:flex;flex-direction:column}.signin-fields label,.signup-fields label{color:#aaa6a6;text-align:left;margin-top:15px}.signin-textbox,.signup-textbox{padding:15px 20px;margin-top:5px;margin-bottom:5px;border:1px solid #ccc;border-radius:8px;box-sizing:border-box;outline:none;font-size:20px}.signin-button,.signup-button{background-color:#4545b9;color:#fff;padding:18px 20px;margin-top:25px;margin-left:auto!important;width:100%;border-radius:10px;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;font-weight:600}.forget-pass{text-align:center;display:block}.signup-question{text-align:center;font-weight:700;margin-top:15px!important;padding:15px}.file-input{color:transparent;margin-bottom:0!important}.file-input::-webkit-file-upload-button{visibility:hidden}.file-input:before{content:"Upload Profile Pic";color:#fff;display:inline-block;background:#fa0261;padding:10px 22px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:10px auto;-webkit-user-select:none;cursor:pointer;font-weight:600;border-radius:2px;outline:none;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.file-input:focus{outline:none!important}.file-input:active:before{-webkit-transform:scale(.9) translateY(2px);transform:scale(.9) translateY(2px);box-shadow:inset 4px 4px 5px 0 rgba(0,0,0,.2)}.btn{width:120px;font-size:16px;font-weight:600;padding:10px 20px;border-radius:5px;border:none}.signin-container{display:flex;justify-content:center;align-items:center;overflow:hidden}.btn-group{display:flex;grid-gap:20px;gap:20px}.signin-content h1{color:#fff;font-size:40px;margin-bottom:20px;text-align:center}.signin-content h3{color:#fff;margin-top:20px;text-align:center}footer{position:absolute;bottom:0;margin-bottom:10px;display:flex;grid-gap:10px;gap:10px}footer span{color:#fff}.home{display:grid;place-items:center;height:100vh;background-color:#0e1012;position:relative;padding:0 50px}.home-components{display:flex;height:95vh;width:100%;margin:auto;background-color:#fff;border-radius:10px;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.menu-open{position:absolute;top:26px;left:-1px}.menu-close,.menu-open{z-index:1000;border-radius:50%}.add-chatroom-icon{position:absolute;top:6%;left:85%;z-index:2000}@media screen and (min-width:768px){.menu-close,.menu-open{display:none}}@media screen and (max-width:768px){.home{overflow:hidden;padding:0}.home-components{height:100vh;width:100vw;border-radius:0}.add-chatroom-icon{position:absolute;top:1%;left:85%}}.btn-send{background:#12a4ff!important;border-radius:30px!important;padding:12px 20px!important;color:#fff!important;font-size:16px}.sidebar-members{width:100%;height:100%}.ScrollbarsCustom-Wrapper{inset:0!important}.ScrollbarsCustom-Track{width:8px!important}.ScrollbarsCustom-Thumb{background:rgba(0,0,0,.2)!important}.sidebar{display:flex;flex-direction:column;border-right:1px solid #eaeaea;width:350px;min-width:350px}.sidebar-top-header{border-bottom:1px solid #eaeaea}.sidebar-mobile-header{display:none}.sidebar-header{display:flex;justify-content:space-between;padding:10px 15px;align-items:center;position:relative}.sidebar-search{background-color:#fff;display:flex;align-items:center;justify-content:flex-start;height:50px;padding:10px;margin-bottom:10px}.sidebar-searchicon{margin-left:15px}.sidebar-search-container{display:flex;align-items:center;border-radius:15px;background-color:#f5f5f5;width:100%}.sidebar-search-container input{border:none;outline:none;height:40px;border-radius:15px;padding:5px 15px;font-size:16px;display:flex;width:100%;margin-right:25px;background-color:#f5f5f5}.user-profile,.user-profile .MuiIconButton-label{width:50px!important}.user-profile-image{height:50px;width:50px;object-fit:cover;border-radius:50%;position:absolute}.logout-mobile-option,.sidebar-mobile-profile-name{display:none}@media screen and (max-width:768px){.sidebar{display:none}.sidebar-header{justify-content:start}.sidebar-mobile-profile-name{display:block;font-size:18px;font-weight:400;margin-left:10px}.sidebar-mobile-header{display:flex;justify-content:space-between;padding-left:15px;padding-right:6px}.sidebar.active{position:relative;width:auto;height:100vh;width:100vw;display:flex;position:fixed;left:0;opacity:1;transition:all .5s ease;background-color:#fff;z-index:100}.user-profile-image{position:absolute}.logout-option{display:none}.logout-mobile-option{display:block;margin-left:10px}}.chatroom{display:flex;flex-direction:column;width:100%;position:relative}.chatroom-header{display:flex;align-items:end;justify-content:space-between;padding:20px;border-bottom:1px solid #eaeaea;border-top-right-radius:10px;z-index:80}.chatroom-chatinfo-right{display:flex;flex-direction:column;grid-gap:3px;gap:3px}.chatroom-chatinfo{display:flex;align-items:center}.chatroom-chatinfo-name{font-size:18px;font-weight:500;color:#333}.chatroom-chatinfo-name p{margin:0}.chatroom-options{display:flex;align-items:center}.chatroom-container{display:flex;flex-direction:row;height:calc(100% - 99px)}.chatroom-messages-container{flex:1 1;padding:20px 0;overflow-y:scroll;overflow-x:hidden}.chatroom-messages-container::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);border-radius:10px;background-color:#f5f5f5}.chatroom-messages-container::-webkit-scrollbar{width:8px;background-color:#f5f5f5}.chatroom-messages-container::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);background-color:rgba(0,0,0,.2)}.chatroom-profile{padding:20px;width:300px;min-width:300px;display:flex;flex-direction:column}.profile-photo{aspect-ratio:1;border-radius:15px;object-fit:cover}.emoji-picker-open{position:absolute;bottom:8.5%;z-index:1000}.emoji-picker-close{display:none}.chatroom-footer{display:flex;align-items:center;border-top:.1px solid #d4d4d4;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;box-shadow:0 -2px 15px rgba(0,0,0,.07);padding:20px 15px;border-top:.1px solid hsla(0,0%,83.1%,.47058823529411764)}.chatroom-plans{display:flex;flex-direction:row}.chatroom-plan{color:#333;font-size:14px}.chatroom-top-header{display:flex;flex-direction:row;grid-gap:5px;gap:5px;color:#74767e;font-size:12px}.chatroom-footer form{flex:1 1;display:flex;flex-direction:row;align-items:center;justify-content:center;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;margin-left:10px}.chatroom-footer form button{display:none}.chatroom-safety{display:flex;flex-direction:column;align-items:center;padding:10px 20px;grid-gap:10px;gap:10px}.chatroom-safety-header{display:flex;align-items:center;color:#74767e;font-weight:500;font-size:16px;grid-gap:5px;gap:5px}.chatroom-safety-text{font-size:12px;color:#74767e;text-align:center}.message-input{flex:1 1;font-family:"Inter",sans-serif;padding:12px 20px;height:15px;outline:none;border:none;border-radius:25px;font-size:17px;background-color:rgba(0,0,0,.04);resize:none;color:#333}.message-input::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);border-radius:10px;background-color:#f5f5f5}.message-input::-webkit-scrollbar{width:8px;background-color:#f5f5f5}.message-input::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);background-color:rgba(0,0,0,.2)}.input-button{display:none}.profile-description{margin-top:10px;display:flex;flex-direction:column}.desc-title{margin-top:20px;font-size:16px;font-weight:600;color:#333}.desc-text{font-size:16px;padding:15px 0;border-bottom:1px solid #eaeaea}.desc-text-value{font-weight:600;color:#333;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.desc-profile-name{color:#333}.chatroom-search-container{display:flex;align-items:center;border-radius:15px;border:1px solid #eaeaea;background:transparent;width:100%}.chatroom-searchicon{margin-left:15px;color:#333}.chatroom-search-container input{border:none;outline:none;height:30px;border-radius:15px;padding:5px 15px;font-size:16px;display:flex;width:100%;margin-right:25px;background-color:initial}.chatroom-footer-righticon{margin-left:10px}.chatroom-footer-lefticons{display:flex;grid-gap:10px;gap:10px}.send-icon{color:#316af3}@media screen and (max-width:1200px){.chatroom-profile,.chatroom-search{display:none}}@media screen and (max-width:768px){.chatroom-search{display:block}.chatroom-footer-lefticons{display:flex}.chatroom{flex:1 1}.message-input{margin-left:-45px}.chatroom-top-header span:nth-child(2),.chatroom-top-header span:nth-child(3){display:none}.chatroom-footer-righticon{margin-left:-40px!important}.chatroom-footer-righticon button{width:48px;height:48px;min-width:48px;padding:0!important}.chatroom-footer-righticon .send-text{display:none}.chatroom-chatinfo{margin-left:30px}}@media screen and (max-width:576px){.chatroom-search{display:none}}.message-received{background-color:#fff;font-weight:500;border-radius:15px;border-radius:10px 10px 10px 0}.message-received,.message-sent{display:flex;flex-direction:column;position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:260px;padding:5px 15px;margin-bottom:25px;font-family:"Inter",sans-serif;font-size:18px}.message-sent{margin-left:auto;border-radius:10px 10px 0 10px;background-color:#445dfa;color:#fff}.message-box{display:flex;flex-direction:row;padding:15px 20px;background-color:#fff;transition:background-color .2s ease-in}.message-box:hover{background-color:#f8f8f8}.message-image{width:50px;height:50px;border-radius:50%;margin-right:10px}.message-header{display:flex;flex-direction:column;margin-bottom:5px;grid-gap:4px;gap:4px}.message-user{font-size:16px;font-weight:500;color:#333}.message-time{font-size:14px;color:#74767e}.message-text{white-space:pre-line;font-size:16px;font-weight:400;line-height:1.5;color:#555;margin:0}.add-amigo-open{width:300px;height:300px;z-index:5000;border-radius:15px;flex-direction:column;background-color:#f5f1ed;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.add-amigo-close{display:none}.close-div{display:flex;justify-content:flex-end;margin:5px}.close-div span{height:20px;width:20px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center}.close-symbol{font-size:15px;font-weight:600;margin:auto auto 3px}.add-amigo-img{height:100px;margin:5px 0}.add-amigo-open form{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.add-amigo-open input{padding:10px;font-size:18px;outline:none;border:none;border-radius:15px;display:flex;align-items:center;justify-content:center;background-color:#fff}.add-amigo-open button{padding:10px;border-radius:8px;outline:none;border:none;margin-top:20px;color:#fff;font-size:16px;font-weight:900;background-color:#316af3;cursor:pointer}.add-amigo-open button:hover{background-color:#fff;color:#316af3;border:1px solid #316af3;transition:all .5s ease}.profile-card-close{display:none}.profile-card-open{max-width:400px;height:500px;padding:10px 30px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;z-index:5000;border-radius:15px;background-color:#f5f1ed;box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.profile-card-open,.profile-card-open form{display:flex;flex-direction:column}.profile-card-open form label{padding-top:15px;padding-bottom:5px}.username-input{padding:10px 8px;margin:10px 0;font-size:18px;outline:none;border:none;border-radius:15px}.profile-card-open button{padding:10px;border-radius:8px;outline:none;border:1px solid #fff;margin-top:20px;color:#fff;font-size:16px;font-weight:900;background-color:#12a4ff;cursor:pointer}.profile-card-open button:hover{background-color:#4cb5f7;transition:all .5s ease}.profile-image{height:200px;width:200px;border-radius:50%;padding:2px;display:flex;object-fit:cover;justify-content:center;align-items:center;margin-left:auto;margin-right:auto}.update-profilepic{color:transparent}.update-profilepic::-webkit-file-upload-button{visibility:hidden}.update-profilepic:before{content:"Update Profile Pic";color:#fff;display:inline-block;background:#fa0261;padding:10px 22px;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;justify-content:center;margin:0 auto;-webkit-user-select:none;cursor:pointer;font-weight:600;border-radius:2px;outline:none;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.update-profilepic:focus{outline:none!important}.update-profilepic:active:before{-webkit-transform:scale(.9) translateY(2px);transform:scale(.9) translateY(2px);box-shadow:inset 4px 4px 5px 0 rgba(0,0,0,.2)}@media screen and (max-width:768px){.profile-card-open{max-width:300px}}.user-input{font-size:20px;padding:10px;background:#fff;border-radius:10px;line-height:1}.sidebarchat{position:relative;display:flex;align-items:center;justify-content:space-between;height:90px;padding:10px 20px 10px 15px;background-color:none;border-bottom:1px solid #eaeaea}.sidebarchat-select{background:#eaf6fe}.sidebarchat:hover{background-color:rgba(234,246,254,.3411764705882353);cursor:pointer}.sidebar-chatoption{margin-top:10px}.online{height:14px;width:14px;border-radius:50%;position:absolute;bottom:14px;left:55px;background-color:#1dbf73;border:3px solid #fff}.profile-online{display:flex;align-items:center;grid-gap:5px;gap:5px;color:#1dbf73}.profile-online span{height:14px;width:14px;border-radius:50%;background-color:#1dbf73}.offline{height:14px;width:14px;border-radius:50%;position:absolute;bottom:14px;left:55px;background-color:#b5b6ba;border:3px solid #fff}.profile-offline{display:flex;align-items:center;grid-gap:5px;gap:5px;color:#b5b6ba}.profile-offline span{height:14px;width:14px;border-radius:50%;background-color:#b5b6ba}.sidebarchat-info-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:16px;font-weight:600;margin:0;width:140px;color:#333}.sidebarchat-plan{color:#74767e;font-size:14px}.amigo-profilepic{height:55px;width:55px}.amigo-profilepic,.chatroom-profilepic{border-radius:50%;object-fit:cover;object-position:center;margin-right:15px}.chatroom-profilepic{height:60px;width:60px}.badge{display:flex;justify-content:center;align-items:center;width:20px;height:20px;background:#1dbf73;color:#fff;border-radius:50%;font-size:15px;line-height:1}.sidebarchat-plans{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:140px;display:flex;flex-direction:column}.btn-favorite{background:transparent;border:none;padding:0}.latest_time{color:#74767e;font-size:13px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;line-height:1.5}.EmptyChatroom img{width:100%;max-width:500px;border-top-right-radius:15px;margin-top:50px}.empty-chatroom-mainhead,.EmptyChatroom img{display:flex;align-items:center;justify-content:center;margin-left:auto;margin-right:auto}.empty-chatroom-mainhead{font-size:35px;font-weight:500;margin-top:20px;text-align:center;line-height:45px;letter-spacing:.8px}.empty-chatroom-subhead{font-size:18px;display:flex;align-items:center;justify-content:center;text-align:center;margin-top:5px;padding:25px;color:#5c5b5b;line-height:35px;letter-spacing:.8px} -------------------------------------------------------------------------------- /js/2.1b24fd9e.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /*! 8 | * The buffer module from node.js, for the browser. 9 | * 10 | * @author Feross Aboukhadijeh 11 | * @license MIT 12 | */ 13 | 14 | /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ 15 | 16 | /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ 17 | 18 | /** 19 | * @license React 20 | * react-is.production.min.js 21 | * 22 | * Copyright (c) Facebook, Inc. and its affiliates. 23 | * 24 | * This source code is licensed under the MIT license found in the 25 | * LICENSE file in the root directory of this source tree. 26 | */ 27 | 28 | /** 29 | * A better abstraction over CSS. 30 | * 31 | * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present 32 | * @website https://github.com/cssinjs/jss 33 | * @license MIT 34 | */ 35 | 36 | /** @license React v0.20.2 37 | * scheduler.production.min.js 38 | * 39 | * Copyright (c) Facebook, Inc. and its affiliates. 40 | * 41 | * This source code is licensed under the MIT license found in the 42 | * LICENSE file in the root directory of this source tree. 43 | */ 44 | 45 | /** @license React v16.13.1 46 | * react-is.production.min.js 47 | * 48 | * Copyright (c) Facebook, Inc. and its affiliates. 49 | * 50 | * This source code is licensed under the MIT license found in the 51 | * LICENSE file in the root directory of this source tree. 52 | */ 53 | 54 | /** @license React v17.0.2 55 | * react-dom.production.min.js 56 | * 57 | * Copyright (c) Facebook, Inc. and its affiliates. 58 | * 59 | * This source code is licensed under the MIT license found in the 60 | * LICENSE file in the root directory of this source tree. 61 | */ 62 | 63 | /** @license React v17.0.2 64 | * react-jsx-runtime.production.min.js 65 | * 66 | * Copyright (c) Facebook, Inc. and its affiliates. 67 | * 68 | * This source code is licensed under the MIT license found in the 69 | * LICENSE file in the root directory of this source tree. 70 | */ 71 | 72 | /** @license React v17.0.2 73 | * react.production.min.js 74 | * 75 | * Copyright (c) Facebook, Inc. and its affiliates. 76 | * 77 | * This source code is licensed under the MIT license found in the 78 | * LICENSE file in the root directory of this source tree. 79 | */ 80 | 81 | //! moment.js 82 | -------------------------------------------------------------------------------- /js/main.e9ac8ad5.chunk.js: -------------------------------------------------------------------------------- 1 | (this.webpackJsonpchatapp=this.webpackJsonpchatapp||[]).push([[0],{113:function(e,t,a){},114:function(e,t,a){},142:function(e,t,a){},143:function(e,t,a){},144:function(e,t,a){},146:function(e,t,a){},147:function(e,t,a){},148:function(e,t,a){},149:function(e,t,a){},155:function(e,t,a){},159:function(e,t,a){"use strict";a.r(t);var c=a(1),n=a(39),s=a.n(n),r=(a(113),a(7)),i=a(18),l=(a(114),a(12)),o=a.n(l),d=a(101),u=a(6),j=function(e,t){switch(t.type){case"LOGIN_START":return{user:t.payload,isLoading:!0,error:!1};case"LOGIN_SUCCESS":return{user:t.payload,isLoading:!1,error:!1};case"LOGIN_FAILURE":return{user:null,isLoading:!1,error:t.payload};default:return e}},m=a(2),b={user:null,isFetching:!1,error:!1},p=Object(c.createContext)(b),h=function(e){var t=e.children,a=Object(c.useReducer)(j,b),n=Object(u.a)(a,2),s=n[0],r=n[1],i=Object(c.useState)(!0),l=Object(u.a)(i,2),o=l[0],d=l[1],h=Object(c.useState)(""),v=Object(u.a)(h,2),O=v[0],f=v[1];return Object(c.useEffect)((function(){"string"!==typeof s.user&&localStorage.setItem("user",JSON.stringify(s.user))}),[s.user]),Object(m.jsx)(p.Provider,{value:{user:s.user,isFetching:s.isFetching,error:s.error,isLoading:o,currentMem:O,setLoading:d,setCurrentMem:f,dispatch:r},children:t})};var v=function(){var e=Object(c.useContext)(p),t=e.dispatch,a=e.setLoading,n=e.setCurrentMem,s="https://api.upit.no/",l={"X-API-KEY":"sk_sb_13585305fc08b12a8939"};Object(c.useEffect)((function(){!function(){try{var e=window.location.search.replace("?",""),a=JSON.parse(atob(e));b(a,t)}catch(c){console.log(c)}}()}),[]);var u=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.a.get("".concat("https://admin.memberstack.com/members","/").concat(t),{headers:l});case 3:return a=e.sent,e.abrupt("return",a.data.data);case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u(t);case 3:return a=e.sent,e.next=6,o.a.post(s+"api/auth/signin",{firstname:a.customFields.fornavn,lastname:a.customFields.etternavn,email:a.auth.email,mem_id:a.id,avatar:a.customFields.profilbilde,plans:a.planConnections});case 6:e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log("Register Err:",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,c){var i,l,d;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:"LOGIN_START"}),e.prev=1,i={email:t.email,mem_id:t.mem_id},e.next=5,u(i.mem_id);case 5:return l=e.sent,e.next=8,o.a.post(s+"api/auth/signin",{firstname:l.customFields.fornavn,lastname:l.customFields.etternavn,email:l.auth.email,mem_id:l.id,avatar:l.customFields.profilbilde,plans:l.planConnections});case 8:if(d=e.sent,null===t||void 0===t||!t.to){e.next=12;break}return e.next=12,j(t.to);case 12:c({type:"LOGIN_SUCCESS",payload:d.data}),a(!1),n(t.to),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(1),console.log("Login Err:",e.t0),c({type:"LOGIN_FAILURE",payload:e.t0});case 21:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t,a){return e.apply(this,arguments)}}();return Object(m.jsx)("div",{className:"signin-container",children:Object(m.jsx)("div",{children:Object(m.jsx)(d.a,{visible:!0,height:"80",width:"80",ariaLabel:"comment-loading",wrapperStyle:{},wrapperClass:"comment-wrapper",color:"#316af3",backgroundColor:"#fff"})})})},O=a(38),f=a(104),x=(a(142),a(143),a(144),a(60)),g=a.n(x);a(146);var N=function(e){var t=e.message,a=e.amigo,n=e.own,s=Object(c.useContext)(p).user,r="https://api.upit.no/";return Object(m.jsxs)("div",{className:"message-box",children:[Object(m.jsx)("img",{className:"message-image",src:n?null!==s&&void 0!==s&&s.avatar?s.avatar:r+"api/images/noavatar.png":null!==a&&void 0!==a&&a.avatar?a.avatar:r+"api/images/noavatar.png",alt:""}),Object(m.jsxs)("div",{children:[Object(m.jsxs)("div",{className:"message-header",children:[Object(m.jsx)("span",{className:"message-user",children:n?"Meg":(null===a||void 0===a?void 0:a.firstname)+" "+(null===a||void 0===a?void 0:a.lastname)}),Object(m.jsx)("span",{className:"message-time",children:g()(t.createdAt).format("MMM DD YYYY, HH:mm")})]}),Object(m.jsx)("p",{className:"message-text",children:t.text})]})]})};a(147);var k=function(e){var t=e.addchattoggler,a=e.addchattoggle,n=Object(c.useState)(),s=Object(u.a)(n,2),l=s[0],d=s[1],j=Object(c.useContext)(p).user,b="https://api.upit.no/",h=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,o.a.get("".concat(b,"api/users/?username=").concat(l));case 4:return a=e.sent,d(""),c={senderId:j._id,receiverId:a.data._id},e.next=9,o.a.post(b+"api/chatrooms",c);case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(1);case 13:window.location.reload();case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}();return Object(m.jsx)("div",{className:"add-amigo-background",children:Object(m.jsxs)("div",{className:a?"add-amigo-open":"add-amigo-close",children:[Object(m.jsx)("div",{className:"close-div",children:Object(m.jsx)("span",{onClick:t,children:Object(m.jsx)("p",{className:"close-symbol",children:"x"})})}),Object(m.jsxs)("form",{children:[Object(m.jsx)("img",{className:"add-amigo-img",src:"assets/addamigo.png",alt:""}),Object(m.jsx)("input",{type:"text",placeholder:"Enter Username of Amigo",value:l,onChange:function(e){d(e.target.value)},required:!0}),Object(m.jsx)("button",{onClick:h,children:"ADD AMIGO"})]})]})})},w=a(61),y=a.n(w);a(148);var S=function(e){var t=e.toggler,a=e.togglestate,n=Object(c.useContext)(p).user,s=Object(c.useState)((null===n||void 0===n?void 0:n.firstname)+" "+(null===n||void 0===n?void 0:n.lastname)),r=Object(u.a)(s,2),i=(r[0],r[1],Object(c.useState)("")),l=Object(u.a)(i,2),o=(l[0],l[1],"https://api.upit.no/");return Object(m.jsx)("div",{className:"profile",children:Object(m.jsxs)("div",{className:a?"profile-card-open":"profile-card-close",children:[Object(m.jsx)("div",{className:"close-div",children:Object(m.jsx)("span",{onClick:t,children:Object(m.jsx)(y.a,{fontSize:"large"})})}),Object(m.jsx)("img",{className:"profile-image",src:null!==n&&void 0!==n&&n.avatar?n.avatar:o+"api/images/noavatar.png",alt:""}),Object(m.jsxs)("form",{children:[Object(m.jsx)("label",{children:"User Name"}),Object(m.jsxs)("div",{className:"user-input",children:[null===n||void 0===n?void 0:n.firstname," ",null===n||void 0===n?void 0:n.lastname]}),Object(m.jsx)("label",{children:"Email"}),Object(m.jsx)("div",{className:"user-input",children:null===n||void 0===n?void 0:n.email}),Object(m.jsx)("button",{type:"button",onClick:t,children:"Close"})]})]})})},C=(a(149),a(64)),_=a(93),I=a(94),E=a(95),L=a(103);var A=function(e){var t=e.chatroomtile,a=e.currentChat,n=e.currentUser,s=Object(c.useState)(null),l=Object(u.a)(s,2),d=l[0],j=l[1],b=Object(c.useState)(!1),p=Object(u.a)(b,2),h=p[0],v=p[1],O=Object(c.useState)(!1),f=Object(u.a)(O,2),x=f[0],g=f[1],N=Object(c.useState)(!1),k=Object(u.a)(N,2),w=k[0],y=k[1],S=Object(c.useState)(""),A=Object(u.a)(S,2),F=A[0],M=A[1],U=Object(c.useRef)(),D="https://api.upit.no/";return Object(c.useEffect)((function(){U.current=Object(C.a)(D)}),[D]),Object(c.useEffect)((function(){var e=t.members.find((function(e){return e!==n._id})),c=null===a||void 0===a?void 0:a.members.find((function(e){return e!==n._id}));v(e===c),U.current.on("getUsers",(function(t){g(t.find((function(t){return t.userId===e})))}));var s=function(){var t=Object(i.a)(Object(r.a)().mark((function t(){var a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.a.get(D+"api/users/"+e);case 3:a=t.sent,j(a.data),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),l=function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var a,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.a.get(D+"api/messages/latest/"+(null===t||void 0===t?void 0:t._id));case 3:a=e.sent,(c=a.data).length>0&&M(Object(L.a)(c[0].createdAt).replace("right now","Akkurat n\xe5").replace("just now","Akkurat n\xe5").replace("seconds","sekunder").replace("minutes","minutter").replace("years","\xe5r").replace("hours","timer").replace("days","dager").replace("weeks","uker").replace("months","m\xe5neder").replace("minute","minutt").replace("hour","time").replace("day","dag").replace("week","uke").replace("month","m\xe5ned").replace("year","\xe5r").replace("in ","").replace(" ago","")),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}();s(),l()}),[n,a,t,x,D]),Object(m.jsxs)("div",{className:h?"sidebarchat sidebarchat-select":"sidebarchat",children:[Object(m.jsxs)("div",{className:"flex align-items-center",children:[Object(m.jsx)("img",{className:"amigo-profilepic",src:null!==d&&void 0!==d&&d.avatar?d.avatar:D+"api/images/noavatar.png",alt:""}),Object(m.jsx)("div",{className:x?"online":"offline"}),Object(m.jsxs)("div",{className:"flex flex-col gap-10",children:[Object(m.jsx)("p",{className:"sidebarchat-info-name",children:d?(null===d||void 0===d?void 0:d.firstname)+" "+(null===d||void 0===d?void 0:d.lastname):""}),Object(m.jsxs)("span",{className:"sidebarchat-plans",children:[1===(null===d||void 0===d?void 0:d.plans.length)&&Object(m.jsx)("span",{className:"sidebarchat-plan",children:d.plans[0].planName}),(null===d||void 0===d?void 0:d.plans.length)>1&&Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("span",{className:"sidebarchat-plan",children:null===d||void 0===d?void 0:d.plans[0].planName}),Object(m.jsxs)("span",{className:"sidebarchat-plan",children:["+",(null===d||void 0===d?void 0:d.plans.length)-1," more"]})]})]})]})]}),Object(m.jsxs)("div",{className:"flex flex-col gap-10",children:[Object(m.jsxs)("div",{className:"flex gap-10 justify-end",children:[Object(m.jsx)("span",{className:"latest_time",children:F?F.replace(" ago",""):"Akkurat n\xe5"}),Object(m.jsx)("button",{name:"favorite",className:"btn-favorite",onClick:function(){return y((function(e){return!e}))},children:w?Object(m.jsx)(_.a,{size:20,color:"#12A4FF"}):Object(m.jsx)(I.a,{size:20,color:"#8f9199"})})]}),Object(m.jsxs)("div",{className:"flex gap-10 justify-end",children:[Object(m.jsx)("span",{className:"badge",children:"1"}),Object(m.jsx)(E.a,{size:20,color:"#8f9199"})]})]})]})};a(155);var F=function(){return Object(m.jsx)("div",{children:Object(m.jsxs)("div",{className:"EmptyChatroom",children:[Object(m.jsx)("img",{className:"emptychatroom-img",src:"https://api.upit.no/api/images/home.png",alt:""}),Object(m.jsx)("p",{className:"empty-chatroom-mainhead",children:"Welcome To Our Upit Chat!"})]})})},M=(a(156),a(102)),U=a(178),D=a(100),R=a(97),Y=a(96),z=a.n(Y),G=a(71),T=a.n(G),J=a(177),K=a(179),H=a(70),P=a.n(H),X=a(99),q=a.n(X),B=a(98),W=a.n(B);var Q=function(){var e,t,a,n=Object(c.useState)([]),s=Object(u.a)(n,2),l=s[0],d=s[1],j=Object(c.useState)(null),b=Object(u.a)(j,2),h=b[0],v=b[1],x=Object(c.useState)([]),w=Object(u.a)(x,2),_=w[0],I=w[1],E=Object(c.useState)(""),L=Object(u.a)(E,2),Y=L[0],G=L[1],H=Object(c.useState)(""),X=Object(u.a)(H,2),B=X[0],Q=X[1],V=Object(c.useState)(!1),Z=Object(u.a)(V,2),$=Z[0],ee=Z[1],te=Object(c.useState)(null),ae=Object(u.a)(te,2),ce=ae[0],ne=ae[1],se=Object(c.useState)(),re=Object(u.a)(se,2),ie=re[0],le=re[1],oe=Object(c.useState)(),de=Object(u.a)(oe,2),ue=de[0],je=de[1],me=Object(c.useState)(!1),be=Object(u.a)(me,2),pe=be[0],he=be[1],ve=Object(c.useContext)(p),Oe=ve.user,fe=ve.currentMem,xe={"X-API-KEY":"sk_sb_13585305fc08b12a8939"},ge=Object(c.useRef)(),Ne=Object(c.useRef)(),ke="https://api.upit.no/";Object(c.useEffect)((function(){Ne.current=Object(C.a)(ke),Ne.current.on("getMessage",(function(e){ne({sender:e.senderId,text:e.text,createdAt:Date.now()})}))}),[ke]),Object(c.useEffect)((function(){ce&&(null===h||void 0===h?void 0:h.members.includes(ce.sender))&&I((function(e){return[].concat(Object(O.a)(e),[ce])}))}),[ce,h]),Object(c.useEffect)((function(){Ne.current.emit("addUser",null===Oe||void 0===Oe?void 0:Oe._id)}),[Oe,l,h,Ne]),Object(c.useEffect)((function(){var e=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a,c,n,s;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=null,!fe){e.next=9;break}return e.next=5,o.a.get("".concat(ke,"api/users/?member=").concat(fe));case 5:return c=e.sent,a={senderId:Oe._id,receiverId:c.data._id},e.next=9,o.a.post(ke+"api/chatrooms",a);case 9:return e.next=11,o.a.get(ke+"api/chatrooms",{params:{user_id:Oe._id}});case 11:if(n=e.sent,d(n.data),!a){e.next=18;break}return e.next=16,o.a.post(ke+"api/chatrooms/get",a);case 16:s=e.sent,v(s.data[0]);case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),console.log(e.t0);case 23:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(t){return e.apply(this,arguments)}}();Object(i.a)(Object(r.a)().mark((function t(){return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e();case 2:case"end":return t.stop()}}),t)})))()}),[null===Oe||void 0===Oe?void 0:Oe._id,fe,ke]),Object(c.useEffect)((function(){var e=null===h||void 0===h?void 0:h.members.find((function(e){return e!==Oe._id}));Ne.current.on("getUsers",(function(t){ee(t.find((function(t){return t.userId===e})))}));var t=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.a.get("".concat("https://admin.memberstack.com/members","/").concat(t),{headers:xe});case 3:return a=e.sent,e.abrupt("return",a.data.data);case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),a=function(){var a=Object(i.a)(Object(r.a)().mark((function a(){var c,n,s;return Object(r.a)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,o.a.get(ke+"api/users/"+e);case 3:return c=a.sent,n=c.data,le(n),a.next=8,t(n.mem_id);case 8:s=a.sent,je(s),a.next=14;break;case 12:a.prev=12,a.t0=a.catch(0);case 14:case"end":return a.stop()}}),a,null,[[0,12]])})));return function(){return a.apply(this,arguments)}}();h&&a()}),[Oe,h,ke]),Object(c.useEffect)((function(){var e=function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.a.get(ke+"api/messages/"+(null===h||void 0===h?void 0:h._id));case 3:t=e.sent,I(t.data),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();h&&e()}),[h,ke]),Object(c.useEffect)((function(){we()}),[_]);var we=function(){var e,t;null===(e=ge.current)||void 0===e||e.scroll({top:null===(t=ge.current)||void 0===t?void 0:t.scrollHeight,behavior:"smooth"})},ye=Object(c.useState)(!1),Se=Object(u.a)(ye,2),Ce=Se[0],_e=Se[1],Ie=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var a,c,n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),Y){e.next=3;break}return e.abrupt("return");case 3:return a={chatroomId:h._id,senderId:Oe._id,text:Y},c=h.members.find((function(e){return e!==Oe._id})),Ne.current.emit("sendMessage",{senderId:Oe._id,receiverId:c,text:Y}),e.prev=6,e.next=9,o.a.post(ke+"api/messages/",a);case 9:n=e.sent,I([].concat(Object(O.a)(_),[n.data])),G(""),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(6),console.log(e.t0);case 17:_e(!1);case 18:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(t){return e.apply(this,arguments)}}(),Ee=function(){localStorage.removeItem("user"),window.location.href="/"},Le=Object(c.useState)(!1),Ae=Object(u.a)(Le,2),Fe=Ae[0],Me=Ae[1],Ue=Object(c.useState)(!1),De=Object(u.a)(Ue,2),Re=De[0],Ye=De[1],ze=function(){Ye(!1===Re)};return Object(m.jsxs)("div",{className:"home",children:[Object(m.jsx)(k,{addchattoggler:function(){Me(!1===Fe),console.log(Fe)},addchattoggle:Fe}),Object(m.jsx)(S,{toggler:function(){ze()},togglestate:Re}),pe?"":Object(m.jsx)("div",{className:"menu-open",onClick:function(){he(!0)},children:Object(m.jsx)(J.a,{children:Object(m.jsx)(z.a,{style:{fontSize:30,color:"#333"}})})}),Object(m.jsxs)("div",{className:"home-components",children:[Object(m.jsxs)("div",{className:pe?"sidebar active":"sidebar",children:[Object(m.jsxs)("div",{className:"sidebar-top-header",children:[Object(m.jsxs)("div",{className:"sidebar-mobile-header",children:[Object(m.jsx)("div",{}),Object(m.jsx)("div",{className:"menu-close",onClick:function(){he(!1)},children:Object(m.jsx)(J.a,{sx:{width:"50px",height:"50px"},children:Object(m.jsx)(y.a,{style:{fontSize:30,color:"#333"}})})})]}),Object(m.jsxs)("div",{className:"sidebar-header",children:[Object(m.jsx)(J.a,{className:"user-profile",onClick:function(){ze()},children:Object(m.jsx)("img",{className:"user-profile-image",src:null!==Oe&&void 0!==Oe&&Oe.avatar?Oe.avatar:ke+"api/images/noavatar.png",alt:""})}),Object(m.jsx)("span",{className:"sidebar-mobile-profile-name",children:(null===Oe||void 0===Oe?void 0:Oe.firstname)+" "+(null===Oe||void 0===Oe?void 0:Oe.lastname)}),Object(m.jsx)("div",{className:"logout-option",children:Object(m.jsx)(J.a,{onClick:Ee,children:Object(m.jsx)(P.a,{})})})]}),Object(m.jsxs)("div",{className:"sidebar-search",children:[Object(m.jsxs)("div",{className:"sidebar-search-container",children:[Object(m.jsx)(T.a,{className:"sidebar-searchicon"}),Object(m.jsx)("input",{type:"text",name:"chat-search",placeholder:"S\xf8k etter brukernavnet...",onChange:function(e){return Q(e.target.value)}})]}),Object(m.jsx)("div",{className:"logout-mobile-option",children:Object(m.jsx)(J.a,{onClick:Ee,children:Object(m.jsx)(P.a,{})})})]})]}),Object(m.jsx)(f.a,{className:"sidebar-members",noScrollX:!0,children:Object(m.jsx)("div",{className:"sidebar-chatoptions",children:l.filter((function(e){if(B){for(var t=0;t