1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6695],{71790:function(e,t,r){Promise.resolve().then(r.bind(r,29598))},29598:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(57437),s=r(25922),o=r(99376),i=r(2265),a=r(93448);class l{dot2(e,t){return this.x*e+this.y*t}constructor(e,t,r){this.x=e,this.y=t,this.z=r}}class c{seed(e){e>0&&e<1&&(e*=65536),(e=Math.floor(e))<256&&(e|=e<<8);for(let t=0;t<256;t++){let r=1&t?this.p[t]^255&e:this.p[t]^e>>8&255;this.perm[t]=this.perm[t+256]=r,this.gradP[t]=this.gradP[t+256]=this.grad3[r%12]}}fade(e){return e*e*e*(e*(6*e-15)+10)}lerp(e,t,r){return(1-r)*e+r*t}perlin2(e,t){let r=Math.floor(e),n=Math.floor(t);e-=r,t-=n,r&=255,n&=255;let s=this.gradP[r+this.perm[n]].dot2(e,t),o=this.gradP[r+this.perm[n+1]].dot2(e,t-1),i=this.gradP[r+1+this.perm[n]].dot2(e-1,t),a=this.gradP[r+1+this.perm[n+1]].dot2(e-1,t-1),l=this.fade(e);return this.lerp(this.lerp(s,i,l),this.lerp(o,a,l),this.fade(t))}constructor(e=0){this.grad3=[new l(1,1,0),new l(-1,1,0),new l(1,-1,0),new l(-1,-1,0),new l(1,0,1),new l(-1,0,1),new l(1,0,-1),new l(-1,0,-1),new l(0,1,1),new l(0,-1,1),new l(0,1,-1),new l(0,-1,-1)],this.p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this.perm=Array(512),this.gradP=Array(512),this.seed(e)}}function u(e){let{lineColor:t="hsl(var(--foreground))",backgroundColor:r="transparent",waveSpeedX:s=.0125,waveSpeedY:o=.005,waveAmpX:l=32,waveAmpY:u=16,xGap:d=10,yGap:h=32,friction:m=.925,tension:f=.005,maxCursorMove:v=100,className:p}=e,y=(0,i.useRef)(null),g=(0,i.useRef)(null),x=(0,i.useRef)(null),w=(0,i.useRef)({width:0,height:0,left:0,top:0}),b=(0,i.useRef)(new c(Math.random())),S=(0,i.useRef)([]),E=(0,i.useRef)({x:-10,y:0,lx:0,ly:0,sx:0,sy:0,v:0,vs:0,a:0,set:!1});return(0,i.useEffect)(()=>{let e=g.current,r=y.current;if(e&&r)return x.current=e.getContext("2d"),n(),i(),requestAnimationFrame(function e(r){let n=E.current,i=y.current;if(!i)return;n.sx+=(n.x-n.sx)*.1,n.sy+=(n.y-n.sy)*.1;let c=n.x-n.lx,d=n.y-n.ly,h=Math.hypot(c,d);n.v=h,n.vs+=(h-n.vs)*.1,n.vs=Math.min(100,n.vs),n.lx=n.x,n.ly=n.y,n.a=Math.atan2(d,c),i.style.setProperty("--x","".concat(n.sx,"px")),i.style.setProperty("--y","".concat(n.sy,"px")),function(e){let t=S.current,r=E.current,n=b.current;t.forEach(t=>{t.forEach(t=>{let i=12*n.perlin2((t.x+e*s)*.002,(t.y+e*o)*.0015);t.wave.x=Math.cos(i)*l,t.wave.y=Math.sin(i)*u;let a=Math.hypot(t.x-r.sx,t.y-r.sy),c=Math.max(175,r.vs);if(a<c){let e=Math.cos(.001*a)*(1-a/c);t.cursor.vx+=Math.cos(r.a)*e*c*r.vs*65e-5,t.cursor.vy+=Math.sin(r.a)*e*c*r.vs*65e-5}t.cursor.vx+=(0-t.cursor.x)*f,t.cursor.vy+=(0-t.cursor.y)*f,t.cursor.vx*=m,t.cursor.vy*=m,t.cursor.x+=2*t.cursor.vx,t.cursor.y+=2*t.cursor.vy,t.cursor.x=Math.min(v,Math.max(-v,t.cursor.x)),t.cursor.y=Math.min(v,Math.max(-v,t.cursor.y))})})}(r),function(){let{width:e,height:r}=w.current,n=x.current;n&&(n.clearRect(0,0,e,r),n.beginPath(),n.strokeStyle=t,S.current.forEach(e=>{let t=a(e[0],!1);n.moveTo(t.x,t.y),e.forEach((r,s)=>{let o=s===e.length-1;t=a(r,!o);let i=a(e[s+1]||e[e.length-1],!o);n.lineTo(t.x,t.y),o&&n.moveTo(i.x,i.y)})}),n.stroke())}(),requestAnimationFrame(e)}),window.addEventListener("resize",c),window.addEventListener("mousemove",p),window.addEventListener("touchmove",M,{passive:!1}),()=>{window.removeEventListener("resize",c),window.removeEventListener("mousemove",p),window.removeEventListener("touchmove",M)};function n(){r&&e&&(w.current=r.getBoundingClientRect(),e.width=w.current.width,e.height=w.current.height)}function i(){let{width:e,height:t}=w.current;S.current=[];let r=Math.ceil((e+200)/d),n=Math.ceil((t+30)/h),s=(e-d*r)/2,o=(t-h*n)/2;for(let e=0;e<=r;e++){let t=[];for(let r=0;r<=n;r++)t.push({x:s+d*e,y:o+h*r,wave:{x:0,y:0},cursor:{x:0,y:0,vx:0,vy:0}});S.current.push(t)}}function a(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return{x:Math.round(10*(e.x+e.wave.x+(t?e.cursor.x:0)))/10,y:Math.round(10*(e.y+e.wave.y+(t?e.cursor.y:0)))/10}}function c(){n(),i()}function p(e){j(e.pageX,e.pageY)}function M(e){e.preventDefault();let t=e.touches[0];j(t.clientX,t.clientY)}function j(e,t){let r=E.current,n=w.current;r.x=e-n.left,r.y=t-n.top+window.scrollY,r.set||(r.sx=r.x,r.sy=r.y,r.lx=r.x,r.ly=r.y,r.set=!0)}},[t,r,s,o,l,u,m,f,v,d,h]),(0,n.jsxs)("div",{ref:y,style:{backgroundColor:r},className:(0,a.cn)("absolute top-0 left-0 w-full h-full overflow-hidden",p),children:[(0,n.jsx)("div",{className:(0,a.cn)("absolute top-0 left-0 rounded-full","w-2 h-2 bg-foreground
1/10"),style:{transform:"translate3d(calc(var(--x) - 50%), calc(var(--y) - 50%), 0)",willChange:"transform"}}),(0,n.jsx)("canvas",{ref:g,className:"block w-full h-full"})]})}var d=r(36891),h=r(73329),m=r(38706);function f(e){var t;let{children:r}=e,{theme:a}=(0,s.F)(),l=(0,m.T)("Auth"),c=(0,o.usePathname)(),{data:f,status:v}=(0,h._e)(),p=(0,o.useRouter)();return((0,i.useEffect)(()=>{var e;"authenticated"===v&&(null==f?void 0:null===(e=f.user)||void 0===e?void 0:e.projectIds)&&f.user.projectIds.length>0&&"/pending-approval"!==c&&p.push("/dashboard")},[v,null==f?void 0:null===(t=f.user)||void 0===t?void 0:t.projectIds,c,p]),"loading"===v)?(0,n.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,n.jsx)("div",{className:"animate-pulse text-muted-foreground",children:l("loading")})}):(0,n.jsxs)("div",{className:"min-h-screen bg-background flex flex-col",children:[(0,n.jsx)("div",{className:"fixed inset-0",children:(0,n.jsx)(u,{lineColor:"dark"===a?"rgba(255, 255, 255, 0.2)":"rgba(0, 0, 0, 0.2)",backgroundColor:"transparent",waveSpeedX:.015,waveSpeedY:.01,waveAmpX:35,waveAmpY:20,friction:.95,tension:.008,maxCursorMove:150,xGap:16,yGap:40})}),(0,n.jsxs)("div",{className:"relative flex-1 flex flex-col items-center justify-center gap-8 py-16 px-4",children:["/signin"===c&&(0,n.jsxs)(d.E.div,{className:"text-center space-y-2 w-full max-w-lg mx-auto",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.4},children:[(0,n.jsx)("h1",{className:"text-4xl font-bold tracking-tight",children:"Green Norway"}),(0,n.jsx)("p",{className:"text-muted-foreground whitespace-nowrap",children:l("tagline")})]}),(0,n.jsx)(d.E.div,{className:"w-full max-w-sm mx-auto",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.4,delay:.2},children:r})]})]})}},73329:function(e,t,r){"use strict";r.d(t,{_e:function(){return o},kP:function(){return i},w7:function(){return a}});var n=r(2265),s=r(80605);function o(){let{data:e,status:t,update:r}=(0,s.useSession)();return{data:(0,n.useMemo)(()=>{var t,r,n,s,o,i,a,l,c,u,d,h;return e?{user:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||"",name:null!==(h=null===(r=e.user)||void 0===r?void 0:r.name)&&void 0!==h?h:null,email:(null===(n=e.user)||void 0===n?void 0:n.email)||"",provider:(null===(s=e.user)||void 0===s?void 0:s.provider)||"",userRights:(null===(o=e.user)||void 0===o?void 0:o.userRights)||"",projectIds:(null===(i=e.user)||void 0===i?void 0:i.projectIds)||[],isDemo:(null===(a=e.user)||void 0===a?void 0:a.provider)==="demo",isAdmin:(null===(l=e.user)||void 0===l?void 0:l.isAdmin)||!1,isSuperAdmin:(null===(c=e.user)||void 0===c?void 0:c.isSuperAdmin)||!1,hasMoreProjects:(null===(u=e.user)||void 0===u?void 0:u.hasMoreProjects)||!1,totalProjectCount:(null===(d=e.user)||void 0===d?void 0:d.totalProjectCount)||0},projectIds:e.projectIds||[],userRights:e.userRights||"",expires:e.expires||""}:null},[e]),status:t,update:r}}let i=o;async function a(){try{await (0,s.signOut)({redirect:!0,callbackUrl:"/signin"})}catch(e){console.error("Error signing out:",e),window.location.href="/signin"}}},93448:function(e,t,r){"use strict";r.d(t,{Z8:function(){return a},cn:function(){return o},i8:function(){return i},uf:function(){return l}});var n=r(61994),s=r(53335);function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,n.W)(t))}function i(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(r,"-").concat(n)}function a(e){let t=i(e),r=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0"),o=String(e.getMilliseconds()).padStart(3,"0");return"".concat(t,"T").concat(r,":").concat(n,":").concat(s,".").concat(o)}function l(e){if(null==e||""===e)return"-";let t="string"==typeof e?parseFloat(e):e;return isNaN(t)?"-":t.toLocaleString("nb-NO").replace(/,/g," ")}},38706:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(17637);function s(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let o=s(0,n.T_);s(0,n.Gb)},25922:function(e,t,r){"use strict";r.d(t,{F:function(){return u},f:function(){return d}});var n=r(2265),s=(e,t,r,n,s,o,i,a)=>
1{let l=document.documentElement,c=["light","dark"];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&o?s.map(e=>o[e]||e):s;r?(l.classList.remove(...n),l.classList.add(t)):l.setAttribute(e,t)}),a&&c.includes(t)&&(l.style.colorScheme=t)}if(n)u(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;u(n)}catch(e){}},o=["light","dark"],i="(prefers-color-scheme: dark)",a="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},u=()=>{var e;return null!=(e=n.useContext(l))?e:c},d=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(m,{...e}),h=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:a=!0,storageKey:c="theme",themes:u=h,defaultTheme:d=s?"system":"light",attribute:m="data-theme",value:g,children:x,nonce:w,scriptProps:b}=e,[S,E]=n.useState(()=>v(c,d)),[M,j]=n.useState(()=>v(c)),k=g?Object.values(g):u,C=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=y());let n=g?g[t]:t,i=r?p(w):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...k),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),a){let e=o.includes(d)?d:null,r=o.includes(t)?t:e;l.style.colorScheme=r}null==i||i()},[w]),T=n.useCallback(e=>{let t="function"==typeof e?e(S):e;E(t);try{localStorage.setItem(c,t)}catch(e){}},[S]),N=n.useCallback(e=>{j(y(e)),"system"===S&&s&&!t&&C("system")},[S,t]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(N),N(e),()=>e.removeListener(N)},[N]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?E(e.newValue):T(d))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[T]),n.useEffect(()=>{C(null!=t?t:S)},[t,S]);let P=n.useMemo(()=>({theme:S,setTheme:T,forcedTheme:t,resolvedTheme:"system"===S?M:S,themes:s?[...u,"system"]:u,systemTheme:s?M:void 0}),[S,T,t,M,s,u]);return n.createElement(l.Provider,{value:P},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:m,enableSystem:s,enableColorScheme:a,defaultTheme:d,value:g,themes:u,nonce:w,scriptProps:b}),x)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:o,enableSystem:i,enableColorScheme:a,defaultTheme:l,value:c,themes:u,nonce:d,scriptProps:h}=e,m=JSON.stringify([o,r,l,t,u,c,i,a]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(s.toString(),")(").concat(m,")")}})}),v=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},y=e=>(e||(e=window.matchMedia(i)),e.matches?"dark":"light")}},function(e){e.O(0,[6137,7637,605,1299,2971,2117,1744],function(){return e(e.s=71790)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.