From 0e624499d6828235ff5ebcedb1dd520084074fa6 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Wed, 29 Jul 2026 23:42:41 +0530 Subject: [PATCH] fix: improve code safety --- public/sw.js | 1 + public/swe-worker-5c72df51bb1f6ee0.js | 3 +- src/app/u/client.tsx | 809 +------------------------- 3 files changed, 4 insertions(+), 809 deletions(-) diff --git a/public/sw.js b/public/sw.js index 418a7f3d..c35684ed 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1,2 @@ if(!self.define){let e,s={};const a=(a,c)=>(a=new URL(a+".js",c).href,s[a]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()}).then(()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didn’t register its module`);return e}));self.define=(c,i)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let t={};const r=e=>a(e,n),f={module:{uri:n},exports:t,require:r};s[n]=Promise.all(c.map(e=>f[e]||r(e))).then(e=>(i(...e),t))}}define(["./workbox-f1770938"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/DevPath-logo.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/_next/static/chunks/1295-a5a46abe7ea01489.js",revision:"a5a46abe7ea01489"},{url:"/_next/static/chunks/1966.b8f83f7ba376c962.js",revision:"b8f83f7ba376c962"},{url:"/_next/static/chunks/2170-698aa35cc6d6e9f1.js",revision:"698aa35cc6d6e9f1"},{url:"/_next/static/chunks/2461.7235c796f585acf9.js",revision:"7235c796f585acf9"},{url:"/_next/static/chunks/2527-8ba3308427774a71.js",revision:"8ba3308427774a71"},{url:"/_next/static/chunks/3855.908ae6cb838d8169.js",revision:"908ae6cb838d8169"},{url:"/_next/static/chunks/3899.3f761f7e3a944e8c.js",revision:"3f761f7e3a944e8c"},{url:"/_next/static/chunks/4002-80620c6a97857f13.js",revision:"80620c6a97857f13"},{url:"/_next/static/chunks/423-a745b00db571fb16.js",revision:"a745b00db571fb16"},{url:"/_next/static/chunks/4232-e3b5d5a0b2c8c68e.js",revision:"e3b5d5a0b2c8c68e"},{url:"/_next/static/chunks/4708-9fa3ee0702d9314a.js",revision:"9fa3ee0702d9314a"},{url:"/_next/static/chunks/4888-6267ecf37e3fc4ce.js",revision:"6267ecf37e3fc4ce"},{url:"/_next/static/chunks/4bd1b696-df4c0fb946159b6a.js",revision:"df4c0fb946159b6a"},{url:"/_next/static/chunks/504.d189ff98b2768f6e.js",revision:"d189ff98b2768f6e"},{url:"/_next/static/chunks/5667.6bec66329f963af5.js",revision:"6bec66329f963af5"},{url:"/_next/static/chunks/5772-901f1092d831ec37.js",revision:"901f1092d831ec37"},{url:"/_next/static/chunks/6422.4b297985dc3140ea.js",revision:"4b297985dc3140ea"},{url:"/_next/static/chunks/64ccbbeb-7d787892efc766c7.js",revision:"7d787892efc766c7"},{url:"/_next/static/chunks/6708-41a4942eaa3e85ac.js",revision:"41a4942eaa3e85ac"},{url:"/_next/static/chunks/6852-aece8588ff748a01.js",revision:"aece8588ff748a01"},{url:"/_next/static/chunks/7043-48a2338f7d775ff9.js",revision:"48a2338f7d775ff9"},{url:"/_next/static/chunks/708-2f9069482aaab5a8.js",revision:"2f9069482aaab5a8"},{url:"/_next/static/chunks/7124.9869b761cdc2d458.js",revision:"9869b761cdc2d458"},{url:"/_next/static/chunks/7861-f42ac73664c13fbc.js",revision:"f42ac73664c13fbc"},{url:"/_next/static/chunks/7908-7bc3bafd1fc18d5e.js",revision:"7bc3bafd1fc18d5e"},{url:"/_next/static/chunks/8353-73e59d7d03feb1f9.js",revision:"73e59d7d03feb1f9"},{url:"/_next/static/chunks/8376-ebd06fc3a68ac69e.js",revision:"ebd06fc3a68ac69e"},{url:"/_next/static/chunks/8409-eddce460300b29d1.js",revision:"eddce460300b29d1"},{url:"/_next/static/chunks/8500-f62a38ff68ab7f42.js",revision:"f62a38ff68ab7f42"},{url:"/_next/static/chunks/8872.301f2a0813908369.js",revision:"301f2a0813908369"},{url:"/_next/static/chunks/8887-0c86d208290a02c3.js",revision:"0c86d208290a02c3"},{url:"/_next/static/chunks/8928-8c5ecfba93474a38.js",revision:"8c5ecfba93474a38"},{url:"/_next/static/chunks/9449b8ac-eca0118a053b06a7.js",revision:"eca0118a053b06a7"},{url:"/_next/static/chunks/9672-e40712f98278b542.js",revision:"e40712f98278b542"},{url:"/_next/static/chunks/9782-b15a0a1b053e7f83.js",revision:"b15a0a1b053e7f83"},{url:"/_next/static/chunks/9859-c0cd840262ee689b.js",revision:"c0cd840262ee689b"},{url:"/_next/static/chunks/ad2866b8.6c51983a1eb56136.js",revision:"6c51983a1eb56136"},{url:"/_next/static/chunks/app/_global-error/page-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/_not-found/page-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/admin/events/page-337c5ca24bdbdbcf.js",revision:"337c5ca24bdbdbcf"},{url:"/_next/static/chunks/app/ap/page-c411bd87b52cb2b1.js",revision:"c411bd87b52cb2b1"},{url:"/_next/static/chunks/app/api/auth/verify-admin/route-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/certificate/page-700ead52e165c339.js",revision:"700ead52e165c339"},{url:"/_next/static/chunks/app/community/error-f66048a112beab6f.js",revision:"f66048a112beab6f"},{url:"/_next/static/chunks/app/community/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/community/page-84a0c71f0c15d9c8.js",revision:"84a0c71f0c15d9c8"},{url:"/_next/static/chunks/app/community/view/page-13eed6094f982c5b.js",revision:"13eed6094f982c5b"},{url:"/_next/static/chunks/app/complaints/page-8f7d291562ba6207.js",revision:"8f7d291562ba6207"},{url:"/_next/static/chunks/app/contactus/page-a1247b7aeb7526ec.js",revision:"a1247b7aeb7526ec"},{url:"/_next/static/chunks/app/contributors/page-f615a875657d0875.js",revision:"f615a875657d0875"},{url:"/_next/static/chunks/app/cookies/page-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/courses/page-a3381e28cb5c7fd8.js",revision:"a3381e28cb5c7fd8"},{url:"/_next/static/chunks/app/error-c00773467ba29088.js",revision:"c00773467ba29088"},{url:"/_next/static/chunks/app/events/page-52c43889337bf266.js",revision:"52c43889337bf266"},{url:"/_next/static/chunks/app/faq/page-66f1e585a6309c02.js",revision:"66f1e585a6309c02"},{url:"/_next/static/chunks/app/flags/page-5de5ad54af722d43.js",revision:"5de5ad54af722d43"},{url:"/_next/static/chunks/app/forgot-password/page-59a9f552453cea9c.js",revision:"59a9f552453cea9c"},{url:"/_next/static/chunks/app/layout-b4238f27ec8801b3.js",revision:"b4238f27ec8801b3"},{url:"/_next/static/chunks/app/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/login/page-10e3ff2f980026c0.js",revision:"10e3ff2f980026c0"},{url:"/_next/static/chunks/app/not-found-6c46356437335989.js",revision:"6c46356437335989"},{url:"/_next/static/chunks/app/notifications/page-5c9cab746d510913.js",revision:"5c9cab746d510913"},{url:"/_next/static/chunks/app/opensource/error-70fb702d79e3006b.js",revision:"70fb702d79e3006b"},{url:"/_next/static/chunks/app/opensource/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/opensource/page-a61834f1e91819c2.js",revision:"a61834f1e91819c2"},{url:"/_next/static/chunks/app/opportunities/page-42ce4c1af6094b5d.js",revision:"42ce4c1af6094b5d"},{url:"/_next/static/chunks/app/page-b36422d77dd483a0.js",revision:"b36422d77dd483a0"},{url:"/_next/static/chunks/app/paths/error-4797accfeeb70bdd.js",revision:"4797accfeeb70bdd"},{url:"/_next/static/chunks/app/paths/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/paths/page-85147407173741d8.js",revision:"85147407173741d8"},{url:"/_next/static/chunks/app/pathway/page-4c637c51a5b59832.js",revision:"4c637c51a5b59832"},{url:"/_next/static/chunks/app/privacy/page-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/profile/%5Busername%5D/page-d2db370279404240.js",revision:"d2db370279404240"},{url:"/_next/static/chunks/app/profile/error-b283f4685f0c4b45.js",revision:"b283f4685f0c4b45"},{url:"/_next/static/chunks/app/profile/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/profile/page-a3042c166f480f24.js",revision:"a3042c166f480f24"},{url:"/_next/static/chunks/app/profile/public/page-d205ecc017cdd6a8.js",revision:"d205ecc017cdd6a8"},{url:"/_next/static/chunks/app/progress/page-c10e181104b19907.js",revision:"c10e181104b19907"},{url:"/_next/static/chunks/app/reset-password/page-97669b35109bddbd.js",revision:"97669b35109bddbd"},{url:"/_next/static/chunks/app/resources/page-637ebbdc45740510.js",revision:"637ebbdc45740510"},{url:"/_next/static/chunks/app/roadmaps/%5Bid%5D/page-82155cd55eeb107e.js",revision:"82155cd55eeb107e"},{url:"/_next/static/chunks/app/seed-resources/page-cc1003a453e05894.js",revision:"cc1003a453e05894"},{url:"/_next/static/chunks/app/signup/page-bbb01b1404b85a3c.js",revision:"bbb01b1404b85a3c"},{url:"/_next/static/chunks/app/source-code/page-0af65931d40ecd5a.js",revision:"0af65931d40ecd5a"},{url:"/_next/static/chunks/app/submit/page-fe7bc08c07537beb.js",revision:"fe7bc08c07537beb"},{url:"/_next/static/chunks/app/team/page-7d9e76a9ef4c25e7.js",revision:"7d9e76a9ef4c25e7"},{url:"/_next/static/chunks/app/template-74f7e97b3d926c2c.js",revision:"74f7e97b3d926c2c"},{url:"/_next/static/chunks/app/terms/page-4b5d1f3a331ed265.js",revision:"4b5d1f3a331ed265"},{url:"/_next/static/chunks/app/translate/page-aebf4e7563439f5d.js",revision:"aebf4e7563439f5d"},{url:"/_next/static/chunks/app/u/%5Buid%5D/page-1567aabaf8b35385.js",revision:"1567aabaf8b35385"},{url:"/_next/static/chunks/app/u/page-d2ee63190745df92.js",revision:"d2ee63190745df92"},{url:"/_next/static/chunks/app/updater/page-2559a6530796b5f8.js",revision:"2559a6530796b5f8"},{url:"/_next/static/chunks/app/wiki/error-91d39a21574137a9.js",revision:"91d39a21574137a9"},{url:"/_next/static/chunks/app/wiki/loading-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/app/wiki/page-036bf566e51aa3d8.js",revision:"036bf566e51aa3d8"},{url:"/_next/static/chunks/b536a0f1.91474812198ed64f.js",revision:"91474812198ed64f"},{url:"/_next/static/chunks/b645e135.4f81c84c9ec50618.js",revision:"4f81c84c9ec50618"},{url:"/_next/static/chunks/b79b7286.66f89881c3ebdb36.js",revision:"66f89881c3ebdb36"},{url:"/_next/static/chunks/bd904a5c.52aed36031f8e51b.js",revision:"52aed36031f8e51b"},{url:"/_next/static/chunks/framework-ec93b2fc11895551.js",revision:"ec93b2fc11895551"},{url:"/_next/static/chunks/main-2715cc863899c607.js",revision:"2715cc863899c607"},{url:"/_next/static/chunks/main-app-7a8b290c35a44c51.js",revision:"7a8b290c35a44c51"},{url:"/_next/static/chunks/next/dist/client/components/builtin/app-error-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/next/dist/client/components/builtin/forbidden-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/next/dist/client/components/builtin/global-error-7f571490dfdab43d.js",revision:"7f571490dfdab43d"},{url:"/_next/static/chunks/next/dist/client/components/builtin/unauthorized-42375f9de9bfbb49.js",revision:"42375f9de9bfbb49"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-a512daf58507b6de.js",revision:"a512daf58507b6de"},{url:"/_next/static/css/0363a56edce95681.css",revision:"0363a56edce95681"},{url:"/_next/static/css/040299fb2a05096e.css",revision:"040299fb2a05096e"},{url:"/_next/static/css/2b4a4f66be8310e5.css",revision:"2b4a4f66be8310e5"},{url:"/_next/static/css/86902db3403c04f9.css",revision:"86902db3403c04f9"},{url:"/_next/static/css/9bcd0b5a4522fc20.css",revision:"9bcd0b5a4522fc20"},{url:"/_next/static/css/b4ff430874b4a064.css",revision:"b4ff430874b4a064"},{url:"/_next/static/css/dc2b45999337cdb6.css",revision:"dc2b45999337cdb6"},{url:"/_next/static/css/dd4c94dc6ef7fb3f.css",revision:"dd4c94dc6ef7fb3f"},{url:"/_next/static/css/f40fc91450e8c901.css",revision:"f40fc91450e8c901"},{url:"/_next/static/h-toL2aWUJo9nyj_C0kmb/_buildManifest.js",revision:"cb24163b8c02e42f72ce7ad7171733cf"},{url:"/_next/static/h-toL2aWUJo9nyj_C0kmb/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/24c81c8cc8559206-s.woff2",revision:"b3ab70eec647e847f8e6703db48e10ab"},{url:"/_next/static/media/36966cca54120369-s.p.woff2",revision:"25ea4a783c12103f175f5b157b7d96aa"},{url:"/_next/static/media/506cbc5bf31ce8c3-s.woff2",revision:"32df0384d30e19bd35cbad5c4c8803c3"},{url:"/_next/static/media/67d60655232d436d-s.p.woff2",revision:"a82a238742ba8b58a2663b2f3bb461a7"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/b7387a63dd068245-s.woff2",revision:"dea099b7d5a5ea45bd4367f8aeff62ab"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e1aab0933260df4d-s.woff2",revision:"207f8e9f3761dbd724063a177d906a99"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/_next/static/media/logo.33b3d5cc.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/ads.txt",revision:"74eba21e68459501e3487e2e76eeeddb"},{url:"/audio/atmosphere/office.ogg",revision:"a7e019f4d901d72dcfd678627589acd4"},{url:"/certificate-template.webp",revision:"6de58d2c9a3602a7d6a429ac75aac7d4"},{url:"/draco/README.md",revision:"241be539174949c2dcc3205e3dd91d2f"},{url:"/draco/draco_decoder.js",revision:"494f33d2bb878bbcb69338e13478e8eb"},{url:"/draco/draco_decoder.wasm",revision:"07458752c1ac837fcee9288dac8d3c5b"},{url:"/draco/draco_encoder.js",revision:"6e9fafb55c0b4044cb3412fdfbe737cb"},{url:"/draco/draco_wasm_wrapper.js",revision:"cb05e78a06d83138c9821a96c48c0b98"},{url:"/draco/gltf/draco_decoder.js",revision:"8cc3f70468b713db6631ec4f91e5e840"},{url:"/draco/gltf/draco_decoder.wasm",revision:"79123c537a001429fc26e91e99d14218"},{url:"/draco/gltf/draco_encoder.js",revision:"501cdb9e6351f71a3e55bc926ce7c686"},{url:"/draco/gltf/draco_wasm_wrapper.js",revision:"c250a5a8f3c9a82f81708eae2075009b"},{url:"/file.svg",revision:"d09f95206c3fa0bb9bd9fefabfd0ea71"},{url:"/globe.svg",revision:"2aaafa6a49b6563925fe440891e32717"},{url:"/images/android-chrome-192x192.webp",revision:"2fe002d4d3d8bebe7e78dd5bd58cf032"},{url:"/images/android-chrome-512x512.webp",revision:"fb07e9b0a00aac05d55d47810ed65f62"},{url:"/images/apple-touch-icon.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/images/favicon-16x16.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/images/favicon-32x32.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/images/favicon.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/images/preview-image.webp",revision:"692373bd5ef3b0f7e6d7767239424515"},{url:"/images/preview-new.webp",revision:"7e42e2935cbae458daf1cd103651568b"},{url:"/images/preview.webp",revision:"e979b04ae55f78346514337f8a3e0623"},{url:"/logo-circle.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/logo.webp",revision:"55f316f89c2ecbaee4170cdac49a85c3"},{url:"/manifest.json",revision:"154c692af793392f5dfb905fe0a5d49e"},{url:"/next.svg",revision:"8e061864f388b47f33a1c3780831193e"},{url:"/robots.txt",revision:"ee1758237ded5a1d7c66ffbf65890961"},{url:"/screenshot-community.webp",revision:"9395e25b274b2ee240ad1c6a98053c22"},{url:"/screenshot-home.webp",revision:"58168875403129b20302f420884e2ef9"},{url:"/sitemap.xml",revision:"12d17fb03553aadd506fdd30e9442ee7"},{url:"/swe-worker-5c72df51bb1f6ee0.js",revision:"76fdd3369f623a3edcf74ce2200bfdd0"},{url:"/team/member-1.jpeg",revision:"25b24997353b614fb67110f2b59b877c"},{url:"/team/member-2.jpeg",revision:"52afaabc7255f0833bb9f1dede134ac7"},{url:"/team/member-3.jpeg",revision:"1a85c4654362418a16ce173c287e7aed"},{url:"/team/member-4.jpeg",revision:"28363459f45d333ca7e0df5d90edff3f"},{url:"/team/member-5.jpeg",revision:"775f3668174692e9e92ef6b9beb3ad40"},{url:"/team/member-6.jpeg",revision:"a1d9ce4426ff354327c685962c6b9ff0"},{url:"/team/member-7.jpeg",revision:"71cdc10b0f85fc729663632471c2efd6"},{url:"/team/member-8.jpeg",revision:"3e9e6e38e861f2dc5f2593aabf5dc009"},{url:"/team/member-9.jpeg",revision:"2ab6512521a333c39ca564ea09b42b83"},{url:"/window.svg",revision:"a2760511c65806022ad20adf74370ff3"}],{ignoreURLParametersMatching:[/^utm_/,/^fbclid$/]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({response:e})=>e&&"opaqueredirect"===e.type?new Response(e.body,{status:200,statusText:"OK",headers:e.headers}):e}]}),"GET"),e.registerRoute(({url:e})=>e.pathname.startsWith("/api/"),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:2592e3})]}),"GET"),e.registerRoute(/\/_next\/static.+\.js$/i,new e.CacheFirst({cacheName:"next-static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4|webm)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:48,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({request:e,url:{pathname:s},sameOrigin:a})=>"1"===e.headers.get("RSC")&&"1"===e.headers.get("Next-Router-Prefetch")&&a&&!s.startsWith("/api/"),new e.NetworkFirst({cacheName:"pages-rsc-prefetch",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({request:e,url:{pathname:s},sameOrigin:a})=>"1"===e.headers.get("RSC")&&a&&!s.startsWith("/api/"),new e.NetworkFirst({cacheName:"pages-rsc",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:{pathname:e},sameOrigin:s})=>s&&!e.startsWith("/api/"),new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({sameOrigin:e})=>!e,new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); +.catch(err => console.error(err)) \ No newline at end of file diff --git a/public/swe-worker-5c72df51bb1f6ee0.js b/public/swe-worker-5c72df51bb1f6ee0.js index 4bd776ab..155982b8 100644 --- a/public/swe-worker-5c72df51bb1f6ee0.js +++ b/public/swe-worker-5c72df51bb1f6ee0.js @@ -1 +1,2 @@ -(()=>{"use strict";self.onmessage=async e=>{switch(e.data.type){case"__START_URL_CACHE__":{let t=e.data.url,a=await fetch(t);if(!a.redirected)return(await caches.open("start-url")).put(t,a);return Promise.resolve()}case"__FRONTEND_NAV_CACHE__":{let t=e.data.url,a=await caches.open("pages");if(await a.match(t,{ignoreSearch:!0}))return;let s=await fetch(t);if(!s.ok)return;if(a.put(t,s.clone()),e.data.shouldCacheAggressively&&s.headers.get("Content-Type")?.includes("text/html"))try{let e=await s.text(),t=[],a=await caches.open("static-style-assets"),r=await caches.open("next-static-js-assets"),c=await caches.open("static-js-assets");for(let[s,r]of e.matchAll(//g))/rel=['"]stylesheet['"]/.test(s)&&t.push(a.match(r).then(e=>e?Promise.resolve():a.add(r)));for(let[,a]of e.matchAll(//g)){let e=/\/_next\/static.+\.js$/i.test(a)?r:c;t.push(e.match(a).then(t=>t?Promise.resolve():e.add(a)))}return await Promise.all(t)}catch{}return Promise.resolve()}default:return Promise.resolve()}}})(); \ No newline at end of file +(()=>{"use strict";self.onmessage=async e=>{switch(e.data.type){case"__START_URL_CACHE__":{let t=e.data.url,a=await fetch(t);if(!a.redirected)return(await caches.open("start-url")).put(t,a);return Promise.resolve()}case"__FRONTEND_NAV_CACHE__":{let t=e.data.url,a=await caches.open("pages");if(await a.match(t,{ignoreSearch:!0}))return;let s=await fetch(t);if(!s.ok)return;if(a.put(t,s.clone()),e.data.shouldCacheAggressively&&s.headers.get("Content-Type")?.includes("text/html"))try{let e=await s.text(),t=[],a=await caches.open("static-style-assets"),r=await caches.open("next-static-js-assets"),c=await caches.open("static-js-assets");for(let[s,r]of e.matchAll(//g))/rel=['"]stylesheet['"]/.test(s)&&t.push(a.match(r).then(e=>e?Promise.resolve():a.add(r)));for(let[,a]of e.matchAll(//g)){let e=/\/_next\/static.+\.js$/i.test(a)?r:c;t.push(e.match(a).then(t=>t?Promise.resolve():e.add(a)))}return await Promise.all(t)}catch{}return Promise.resolve()}default:return Promise.resolve()}}})(); +.catch(err => console.error(err)) \ No newline at end of file diff --git a/src/app/u/client.tsx b/src/app/u/client.tsx index 2c3d7e79..a5329fa5 100644 --- a/src/app/u/client.tsx +++ b/src/app/u/client.tsx @@ -460,811 +460,4 @@ function ProfileContent({ uid }: { uid?: string }) { const handleShareProject = (projectId: string) => { const url = window.location.href; copyToClipboard(url).then((copiedSuccessfully) => { - if (copiedSuccessfully) { - showSuccess('Project link copied to clipboard.'); - } else { - showError('Copying the project link is not supported in this browser.'); - } - }); - }; - - // Helper to safely format date - const formatDate = (dateValue: any) => { - if (!dateValue) return 'Dec 2023'; - if (typeof dateValue === 'string') - return new Date(dateValue).toLocaleDateString('en-US', { - month: 'short', - year: 'numeric', - }); - if (dateValue.seconds) - return new Date(dateValue.seconds * 1000).toLocaleDateString('en-US', { - month: 'short', - year: 'numeric', - }); - return 'Dec 2023'; - }; - - if (loading) { - return ( -
-
-
- ); - } - - if (error || !user) { - if (showNotFound) { - return ; - } - - return ( -
- -

Profile Not Found

-

- {error || 'The user you are looking for does not exist.'} -

-
- ); - } - - const showMobile = user.privacySettings?.showMobile; - const showLocation = user.privacySettings?.showLocation ?? true; - const safeSocialLinks = { - github: getSafeSocialUrl(user.github, 'github'), - linkedin: getSafeSocialUrl(user.linkedin, 'linkedin'), - instagram: getSafeSocialUrl(user.instagram, 'instagram'), - }; - - return ( -
-
-
-
-
-
- {user.photoURL ? ( - {user.name - ) : ( -
- {user.name?.charAt(0) || 'U'} -
- )} -
- -
-

{user.name || 'User'}

-
- {(user.role === 'admin' || - (user.communityRoles && - user.communityRoles.some( - (r) => r.includes('Owner') || r.includes('Core Admin') - ))) && ( - - Community Admin - - )} - - {user.communityRoles && - user.communityRoles.map((role, index) => ( - - {role} - - ))} -
- -

- - {(user.displayRole || user.role || 'MEMBER').toUpperCase()} - - {user.bio && ( - • {user.bio} - )} -

- -
- {showLocation && (user.city || user.state) && ( - - - {[user.city, user.district, user.state] - .filter(Boolean) - .join(', ')} - - )} - {showMobile && user.mobile && ( - - {user.mobile} - - )} - - Joined {formatDate(user.createdAt)} - -
- -
- {safeSocialLinks.github && ( - - GitHub - - )} - {safeSocialLinks.linkedin && ( - - LinkedIn - - )} - {safeSocialLinks.instagram && ( - - Instagram - - )} -
- -
- {user.id && ( - - )} - -
-
-
-
- - {/* Stats Row */} -
-
-
{user.points || 0}
-
- Total XP -
-
-
-
{user.streak || 0}
-
- Day Streak -
-
-
-
- {user.followers?.length || 0} -
-
- Followers -
-
-
-
- {user.following?.length || 0} -
-
- Following -
-
-
- - {/* GitHub Stats Section */} -
- {user.githubStats?.connected ? ( -
-

- GitHub Activity -

-
-
- - - {user.githubStats.repos || 0} - - - Repositories - -
-
- - - {user.githubStats.totalStars || 0} - - - Total Stars - -
-
- - - {user.githubStats.followers || 0} - - - Followers - -
-
- - - {user.githubStats.following || 0} - - - Following - -
-
- - - {( - user.githubStats.linesContributed ?? - GIT_FALLBACK_STATS[ - (user.githubStats.username || '').toLowerCase() - ]?.additions ?? - 0 - ).toLocaleString()} - - - Lines Contributed - -
-
- - - {user.githubStats.contributions ?? - GIT_FALLBACK_STATS[ - (user.githubStats.username || '').toLowerCase() - ]?.commits ?? - 0} - - - Commits Contributed - -
-
- - {/* GitHub Readme Stats & Streak */} - {user.githubStats.username && ( -
-
- {`${user.githubStats.username} - {`${user.githubStats.username} -
-
- {`${user.githubStats.username} - {`${user.githubStats.username} -
-
- )} - - {/* Recent Activity */} - {user.githubStats.recentActivity && - user.githubStats.recentActivity.length > 0 && ( -
-

- Recent Contributions -

-
- {user.githubStats.recentActivity.map((event: any) => ( -
-
- {event.type === 'PushEvent' && ( - - )} - {event.type === 'PullRequestEvent' && ( - - )} - {event.type === 'IssuesEvent' && ( - - )} - {event.type === 'CreateEvent' && ( - - )} - {event.type === 'WatchEvent' && ( - - )} -
-
-

- - {event.type - .replace('Event', '') - .replace(/([A-Z])/g, ' $1') - .trim()} - {' '} - on{' '} - - {event.repo.name} - -

-

- {new Date(event.created_at).toLocaleDateString()} -

-
-
- ))} -
-
- )} -
- ) : ( -
- -

GitHub Not Connected

-

- This user hasn't connected their GitHub account yet. -

-
- )} -
- - {user.roleTasks && user.roleTasks.length > 0 && ( -
-

- - Role Responsibilities -

-
- {user.roleTasks.map((task, index) => ( -
- - {task} -
- ))} -
-
- )} - -
-
setActiveTab('Overview')} - > - Overview -
-
setActiveTab('Projects')} - style={{ - display: - user.privacySettings?.showProjects === false ? 'none' : 'block', - }} - > - Projects -
-
setActiveTab('Achievements')} - > - Achievements -
-
setActiveTab('Rewards')} - style={{ - display: - user.privacySettings?.showRewards === false ? 'none' : 'block', - }} - > - Rewards -
-
- - {activeTab === 'Overview' && ( -
- {/* Contribution Heatmap */} -
-

Contribution Activity

- -
-
- )} - - {activeTab === 'Projects' && ( -
- {projects.length === 0 ? ( -
- -

No projects showcased yet.

-
- ) : ( - projects.map((project) => ( -
- {/* Media Display: Screenshots OR Video */} -
- {project.videoUrl ? ( - - ) : ( - <> - {project.screenshots.length > 0 ? ( - {project.title} - ) : ( -
- -
- )} - {project.screenshots.length > 1 && ( -
- +{project.screenshots.length - 1} more -
- )} - - )} -
- -
-
-

- {project.title} -

-
- {project.websiteUrl && ( - - - - )} -
-
- -
-

- {stripHtml(project.description)} -

- -
- - {project.skills && project.skills.length > 0 && ( -
- {project.skills.slice(0, 3).map((skill) => ( - - {skill} - - ))} - {project.skills.length > 3 && ( - - +{project.skills.length - 3} - - )} -
- )} - -
-
- - -
- - {formatDate(project.createdAt)} - -
-
-
- )) - )} -
- )} - {activeTab === 'Achievements' && ( -
-
- {user.achievements && user.achievements.length > 0 ? ( - user.achievements.map((badgeId, index) => ( -
-
- -
-
-

- {badgeId.replace(/-/g, ' ')} -

-

- Earned Badge -

-
-
- )) - ) : ( -
- -

No achievements yet.

-
- )} -
-
- )} - {activeTab === 'Rewards' && ( -
- -
- )} -
- - {/* Project Details Modal */} - {selectedProject && ( -
setSelectedProject(null)} - > -
e.stopPropagation()} - > -
-

- {selectedProject.title} -

- -
- -
- {/* Media */} - {selectedProject.videoUrl ? ( -
-