(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1879],{13077:(e,r,n)=>{Promise.resolve().then(n.bind(n,22715)),Promise.resolve().then(n.bind(n,40305))},54979:(e,r,n)=>{"use strict";var t=n(74674);n.o(t,"useParams")&&n.d(r,{useParams:function(){return t.useParams}}),n.o(t,"usePathname")&&n.d(r,{usePathname:function(){return t.usePathname}}),n.o(t,"useRouter")&&n.d(r,{useRouter:function(){return t.useRouter}}),n.o(t,"useSearchParams")&&n.d(r,{useSearchParams:function(){return t.useSearchParams}})},82931:(e,r)=>{"use strict";function n(e,r){var n=e.length;for(e.push(r);0<n;){var t=n-1>>>1,u=e[t];if(0<a(u,r))e[t]=r,e[n]=u,n=t;else break}}function t(e){return 0===e.length?null:e[0]}function u(e){if(0===e.length)return null;var r=e[0],n=e.pop();if(n!==r){e[0]=n;for(var t=0,u=e.length,s=u>>>1;t<s;){var i=2*(t+1)-1,l=e[i],o=i+1,c=e[o];if(0>a(l,n))o<u&&0>a(c,l)?(e[t]=c,e[o]=n,t=o):(e[t]=l,e[i]=n,t=i);else if(o<u&&0>a(c,n))e[t]=c,e[o]=n,t=o;else break}}return r}function a(e,r){var n=e.sortIndex-r.sortIndex;return 0!==n?n:e.id-r.id}if(r.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var s,i=performance;r.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();r.unstable_now=function(){return l.now()-o}}var c=[],f=[],d=1,v=null,b=3,p=!1,m=!1,h=!1,y="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var r=t(f);null!==r;){if(null===r.callback)u(f);else if(r.startTime<=e)u(f),r.sortIndex=r.expirationTime,n(c,r);else break;r=t(f)}}function P(e){if(h=!1,w(e),!m){if(null!==t(c))m=!0,E();else{var r=t(f);null!==r&&N(P,r.startTime-e)}}}var I=!1,g=-1,x=5,S=-1;function T(){return!(r.unstable_now()-S<x)}function U(){if(I){var e=r.unstable_now();S=e;var n=!0;try{e:{m=!1,h&&(h=!1,_(g),g=-1),p=!0;var a=b;try{r:{for(w(e),v=t(c);null!==v&&!(v.expirationTime>e&&T());){var i=v.callback;if("function"==typeof i){v.callback=null,b=v.priorityLevel;var l=i(v.expirationTime<=e);if(e=r.unstable_now(),"function"==typeof l){v.callback=l,w(e),n=!0;break r}v===t(c)&&u(c),w(e)}else u(c);v=t(c)}if(null!==v)n=!0;else{var o=t(f);null!==o&&N(P,o.startTime-e),n=!1}}break e}finally{v=null,b=a,p=!1}n=void 0}}finally{n?s():I=!1}}}if("function"==typeof k)s=function(){k(U)};else if("undefined"!=typeof MessageChannel){var C=new MessageChannel,R=C.port2;C.port1.onmessage=U,s=function(){R.postMessage(null)}}else s=function(){y(U,0)};function E(){I||(I=!0,s())}function N(e,n){g=y(function(){e(r.unstable_now())},n)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(e){e.callback=null},r.unstable_continueExecution=function(){m||p||(m=!0,E())},r.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<e?Math.floor(1e3/e):5},r.unstable_getCurrentPriorityLevel=function(){return b},r.unstable_getFirstCallbackNode=function(){return t(c)},r.unstable_next=function(e){switch(b){case 1:case 2:case 3:var r=3;break;default:r=b}var n=b;b=r;try{return e()}finally{b=n}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(e,r){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=b;b=e;try{return r()}finally{b=n}},r.unstable_scheduleCallback=function(e,u,a){var s=r.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=0x3fffffff;break;case 4:i=1e4;break;default:i=5e3}return i=a+i,e={id:d++,callback:u,priorityLevel:e,startTime:a,expirationTime:i,sortIndex:-1},a>s?(e.sortIndex=a,n(f,e),null===t(c)&&e===t(f)&&(h?(_(g),g=-1):h=!0,N(P,a-s))):(e.sortIndex=i,n(c,e),m||p||(m=!0,E())),e},r.unstable_shouldYield=T,r.unstable_wrapCallback=function(e){var r=b;return function(){var n=b;b=r;try{return e.apply(this,arguments)}finally{b=n}}}},70724:(e,r,n)=>{"use strict";e.exports=n(82931)},22715:(e,r,n)=>{"use strict";n.d(r,{RefreshIfNecessary:()=>i});var t=n(18130),u=n(54979),a=n(2265),s=n(4912);let i=e=>{let r,n;let i=(0,t.c)(9),l=(0,s.useSessionContext)(),o=(0,u.useRouter)();return i[0]!==l.loading||i[1]!==l.userId||i[2]!==e.serverUserId||i[3]!==o?(r=()=>{l.loading||e.serverUserId===l.userId||(console.warn("props.serverUserId !== session.userId"),o.refresh())},i[0]=l.loading,i[1]=l.userId,i[2]=e.serverUserId,i[3]=o,i[4]=r):r=i[4],i[5]!==e.serverUserId||i[6]!==o||i[7]!==l?(n=[e.serverUserId,o,l],i[5]=e.serverUserId,i[6]=o,i[7]=l,i[8]=n):n=i[8],(0,a.useEffect)(r,n),e.children}},40305:(e,r,n)=>{"use strict";n.d(r,{OptionalAuthContextProvider:()=>l,X:()=>i});var t=n(57437),u=n(18130);n(2265);var a=n(50784);let s=(0,a.kr)(void 0);function i(e){return(0,a.Sz)(s,e)}let l=e=>{let r,n;let a=(0,u.c)(6);return a[0]!==e.currentSuperTokensUserId||a[1]!==e.currentUser?(r={currentSuperTokensUserId:e.currentSuperTokensUserId,currentUser:e.currentUser},a[0]=e.currentSuperTokensUserId,a[1]=e.currentUser,a[2]=r):r=a[2],a[3]!==r||a[4]!==e.children?(n=(0,t.jsx)(s.Provider,{value:r,children:e.children}),a[3]=r,a[4]=e.children,a[5]=n):n=a[5],n}},50784:(e,r,n)=>{"use strict";n.d(r,{Sz:()=>f,kr:()=>c});var t=n(2265),u=n(70724);n(25566);let a=Symbol(),s=Symbol(),i="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?t.useEffect:t.useLayoutEffect,l=u.unstable_runWithPriority?e=>{try{(0,u.unstable_runWithPriority)(u.unstable_NormalPriority,e)}catch(r){if("Not implemented."===r.message)e();else throw r}}:e=>e(),o=e=>({value:r,children:n})=>{let u=(0,t.useRef)(r),s=(0,t.useRef)(0),[o,c]=(0,t.useState)(null);o&&(o(r),c(null));let f=(0,t.useRef)();if(!f.current){let e=new Set;f.current={[a]:{v:u,n:s,l:e,u:(r,n)=>{s.current+=1;let t={n:s.current};(null==n?void 0:n.suspense)&&(t.n*=-1,t.p=new Promise(e=>{c(()=>r=>{t.v=r,delete t.p,e(r)})})),e.forEach(e=>e(t)),r()}}}}return i(()=>{u.current=r,s.current+=1,l(()=>{f.current[a].l.forEach(e=>{e({n:s.current,v:r})})})},[r]),(0,t.createElement)(e,{value:f.current},n)};function c(e){let r=(0,t.createContext)({[a]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});return r[s]=r.Provider,r.Provider=o(r.Provider),delete r.Consumer,r}function f(e,r){let{v:{current:n},n:{current:u},l:s}=(0,t.useContext)(e)[a],l=r(n),[o,c]=(0,t.useReducer)((e,t)=>{if(!t)return[n,l];if("p"in t)throw t.p;if(t.n===u)return Object.is(e[1],l)?e:[n,l];try{if("v"in t){if(Object.is(e[0],t.v))return e;let n=r(t.v);if(Object.is(e[1],n))return e;return[t.v,n]}}catch(e){}return[...e]},[n,l]);return Object.is(o[1],l)||c(),i(()=>(s.add(c),()=>{s.delete(c)}),[s]),o[1]}}},e=>{var r=r=>e(e.s=r);e.O(0,[5122,7130,427,1744],()=>r(13077)),_N_E=e.O()}]);
//# sourceMappingURL=layout-d292f1e9cf756562.js.map