@nextblock-cms/db 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -1,12 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./invariant-error-BhRJVCqp.js");let Re;function kt(n,d,o){var s;const l=I.isBrowser();if(l&&Re)return Re;if(!n||!d)throw new Error(`@supabase/ssr: Your project's URL and API key are required to create a Supabase client!
2
-
3
- Check your Supabase project's API settings to find these values
4
-
5
- https://supabase.com/dashboard/project/_/settings/api`);const{storage:f}=I.createStorageFromOptions({...o,cookieEncoding:"base64url"},!1),p=I.createClient(n,d,{...o,global:{...o==null?void 0:o.global,headers:{...(s=o==null?void 0:o.global)==null?void 0:s.headers,"X-Client-Info":`supabase-ssr/${I.VERSION} createBrowserClient`}},auth:{...o==null?void 0:o.auth,flowType:"pkce",autoRefreshToken:I.isBrowser(),detectSessionInUrl:I.isBrowser(),persistSession:!0,storage:f}});return l&&(Re=p),p}const Nt=()=>{const n=process.env.NEXT_PUBLIC_SUPABASE_URL,d=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!n||!d)throw new Error(`CRITICAL: Supabase URL or Anon Key is missing. Please ensure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set in your production environment. URL_IS_SET: ${!!n}, ANON_KEY_IS_SET: ${!!d}`);return kt(n,d)};async function Ut(n,d){const{data:o,error:l}=await n.from("profiles").select("id, full_name, avatar_url, role, updated_at, username, website").eq("id",d).single();return l||!o?null:o}async function Dt(){const n=Nt(),{data:d,error:o}=await n.from("languages").select("id, code, name, is_default, is_active, created_at, updated_at").order("name",{ascending:!0});return o?[]:d||[]}var be={exports:{}},ve={},Pe={},Ae={},et;function qt(){return et||(et=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"detectDomainLocale",{enumerable:!0,get:function(){return d}});function d(o,l,f){if(o){f&&(f=f.toLowerCase());for(const e of o){var p,s;const h=(p=e.domain)==null?void 0:p.split(":",1)[0].toLowerCase();if(l===h||f===e.defaultLocale.toLowerCase()||(s=e.locales)!=null&&s.some(b=>b.toLowerCase()===f))return e}}}}(Ae)),Ae}var Se={},xe={},tt;function jt(){return tt||(tt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeTrailingSlash",{enumerable:!0,get:function(){return d}});function d(o){return o.replace(/\/$/,"")||"/"}}(xe)),xe}var ye={},Te={},rt;function Ye(){return rt||(rt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"parsePath",{enumerable:!0,get:function(){return d}});function d(o){const l=o.indexOf("#"),f=o.indexOf("?"),p=f>-1&&(l<0||f<l);return p||l>-1?{pathname:o.substring(0,p?f:l),query:p?o.substring(f,l>-1?l:void 0):"",hash:l>-1?o.slice(l):""}:{pathname:o,query:"",hash:""}}}(Te)),Te}var nt;function It(){return nt||(nt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathPrefix",{enumerable:!0,get:function(){return o}});const d=Ye();function o(l,f){if(!l.startsWith("/")||!f)return l;const{pathname:p,query:s,hash:e}=(0,d.parsePath)(l);return""+f+p+s+e}}(ye)),ye}var Ne={},it;function Mt(){return it||(it=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathSuffix",{enumerable:!0,get:function(){return o}});const d=Ye();function o(l,f){if(!l.startsWith("/")||!f)return l;const{pathname:p,query:s,hash:e}=(0,d.parsePath)(l);return""+p+f+s+e}}(Ne)),Ne}var Ie={},Oe={},ot;function Ke(){return ot||(ot=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"pathHasPrefix",{enumerable:!0,get:function(){return o}});const d=Ye();function o(l,f){if(typeof l!="string")return!1;const{pathname:p}=(0,d.parsePath)(l);return p===f||p.startsWith(f+"/")}}(Oe)),Oe}var at;function Xt(){return at||(at=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addLocale",{enumerable:!0,get:function(){return l}});const d=It(),o=Ke();function l(f,p,s,e){if(!p||p===s)return f;const h=f.toLowerCase();return!e&&((0,o.pathHasPrefix)(h,"/api")||(0,o.pathHasPrefix)(h,"/"+p.toLowerCase()))?f:(0,d.addPathPrefix)(f,"/"+p)}}(Ie)),Ie}var st;function Ht(){return st||(st=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"formatNextPathnameInfo",{enumerable:!0,get:function(){return p}});const d=jt(),o=It(),l=Mt(),f=Xt();function p(s){let e=(0,f.addLocale)(s.pathname,s.locale,s.buildId?void 0:s.defaultLocale,s.ignorePrefix);return(s.buildId||!s.trailingSlash)&&(e=(0,d.removeTrailingSlash)(e)),s.buildId&&(e=(0,l.addPathSuffix)((0,o.addPathPrefix)(e,"/_next/data/"+s.buildId),s.pathname==="/"?"index.json":".json")),e=(0,o.addPathPrefix)(e,s.basePath),!s.buildId&&s.trailingSlash?e.endsWith("/")?e:(0,l.addPathSuffix)(e,"/"):(0,d.removeTrailingSlash)(e)}}(Se)),Se}var Ce={},ut;function Ft(){return ut||(ut=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getHostname",{enumerable:!0,get:function(){return d}});function d(o,l){let f;if(l!=null&&l.host&&!Array.isArray(l.host))f=l.host.toString().split(":",1)[0];else if(o.hostname)f=o.hostname;else return;return f.toLowerCase()}}(Ce)),Ce}var Le={},ke={},ct;function Bt(){return ct||(ct=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizeLocalePath",{enumerable:!0,get:function(){return o}});const d=new WeakMap;function o(l,f){if(!f)return{pathname:l};let p=d.get(f);p||(p=f.map(i=>i.toLowerCase()),d.set(f,p));let s;const e=l.split("/",2);if(!e[1])return{pathname:l};const h=e[1].toLowerCase(),b=p.indexOf(h);return b<0?{pathname:l}:(s=f[b],l=l.slice(s.length+1)||"/",{pathname:l,detectedLocale:s})}}(ke)),ke}var Ue={},lt;function Gt(){return lt||(lt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removePathPrefix",{enumerable:!0,get:function(){return o}});const d=Ke();function o(l,f){if(!(0,d.pathHasPrefix)(l,f))return l;const p=l.slice(f.length);return p.startsWith("/")?p:"/"+p}}(Ue)),Ue}var dt;function Wt(){return dt||(dt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getNextPathnameInfo",{enumerable:!0,get:function(){return f}});const d=Bt(),o=Gt(),l=Ke();function f(p,s){var e;const{basePath:h,i18n:b,trailingSlash:i}=(e=s.nextConfig)!=null?e:{},u={pathname:p,trailingSlash:p!=="/"?p.endsWith("/"):i};h&&(0,l.pathHasPrefix)(u.pathname,h)&&(u.pathname=(0,o.removePathPrefix)(u.pathname,h),u.basePath=h);let _=u.pathname;if(u.pathname.startsWith("/_next/data/")&&u.pathname.endsWith(".json")){const E=u.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),x=E[0];u.buildId=x,_=E[1]!=="index"?"/"+E.slice(1).join("/"):"/",s.parseData===!0&&(u.pathname=_)}if(b){let E=s.i18nProvider?s.i18nProvider.analyze(u.pathname):(0,d.normalizeLocalePath)(u.pathname,b.locales);u.locale=E.detectedLocale;var g;u.pathname=(g=E.pathname)!=null?g:u.pathname,!E.detectedLocale&&u.buildId&&(E=s.i18nProvider?s.i18nProvider.analyze(_):(0,d.normalizeLocalePath)(_,b.locales),E.detectedLocale&&(u.locale=E.detectedLocale))}return u}}(Le)),Le}var ft;function Ot(){return ft||(ft=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NextURL",{enumerable:!0,get:function(){return h}});const d=qt(),o=Ht(),l=Ft(),f=Wt(),p=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function s(b,i){return new URL(String(b).replace(p,"localhost"),i&&String(i).replace(p,"localhost"))}const e=Symbol("NextURLInternal");class h{constructor(i,u,_){let g,E;typeof u=="object"&&"pathname"in u||typeof u=="string"?(g=u,E=_||{}):E=_||u||{},this[e]={url:s(i,g??E.base),options:E,basePath:""},this.analyze()}analyze(){var i,u,_,g,E;const x=(0,f.getNextPathnameInfo)(this[e].url.pathname,{nextConfig:this[e].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[e].options.i18nProvider}),t=(0,l.getHostname)(this[e].url,this[e].options.headers);this[e].domainLocale=this[e].options.i18nProvider?this[e].options.i18nProvider.detectDomainLocale(t):(0,d.detectDomainLocale)((u=this[e].options.nextConfig)==null||(i=u.i18n)==null?void 0:i.domains,t);const c=((_=this[e].domainLocale)==null?void 0:_.defaultLocale)||((E=this[e].options.nextConfig)==null||(g=E.i18n)==null?void 0:g.defaultLocale);this[e].url.pathname=x.pathname,this[e].defaultLocale=c,this[e].basePath=x.basePath??"",this[e].buildId=x.buildId,this[e].locale=x.locale??c,this[e].trailingSlash=x.trailingSlash}formatPathname(){return(0,o.formatNextPathnameInfo)({basePath:this[e].basePath,buildId:this[e].buildId,defaultLocale:this[e].options.forceLocale?void 0:this[e].defaultLocale,locale:this[e].locale,pathname:this[e].url.pathname,trailingSlash:this[e].trailingSlash})}formatSearch(){return this[e].url.search}get buildId(){return this[e].buildId}set buildId(i){this[e].buildId=i}get locale(){return this[e].locale??""}set locale(i){var u,_;if(!this[e].locale||!(!((_=this[e].options.nextConfig)==null||(u=_.i18n)==null)&&u.locales.includes(i)))throw Object.defineProperty(new TypeError(`The NextURL configuration includes no locale "${i}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[e].locale=i}get defaultLocale(){return this[e].defaultLocale}get domainLocale(){return this[e].domainLocale}get searchParams(){return this[e].url.searchParams}get host(){return this[e].url.host}set host(i){this[e].url.host=i}get hostname(){return this[e].url.hostname}set hostname(i){this[e].url.hostname=i}get port(){return this[e].url.port}set port(i){this[e].url.port=i}get protocol(){return this[e].url.protocol}set protocol(i){this[e].url.protocol=i}get href(){const i=this.formatPathname(),u=this.formatSearch();return`${this.protocol}//${this.host}${i}${u}${this.hash}`}set href(i){this[e].url=s(i),this.analyze()}get origin(){return this[e].url.origin}get pathname(){return this[e].url.pathname}set pathname(i){this[e].url.pathname=i}get hash(){return this[e].url.hash}set hash(i){this[e].url.hash=i}get search(){return this[e].url.search}set search(i){this[e].url.search=i}get password(){return this[e].url.password}set password(i){this[e].url.password=i}get username(){return this[e].url.username}set username(i){this[e].url.username=i}get basePath(){return this[e].basePath}set basePath(i){this[e].basePath=i.startsWith("/")?i:`/${i}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new h(String(this),this[e].options)}}}(Pe)),Pe}var De={},qe={},ht;function zt(){return ht||(ht=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(oe,M){for(var K in M)Object.defineProperty(oe,K,{enumerable:!0,get:M[K]})}d(n,{ACTION_SUFFIX:function(){return u},APP_DIR_ALIAS:function(){return se},CACHE_ONE_YEAR:function(){return P},DOT_NEXT_ALIAS:function(){return B},ESLINT_DEFAULT_DIRS:function(){return ge},GSP_NO_RETURNED_VALUE:function(){return $},GSSP_COMPONENT_MEMBER_ERROR:function(){return fe},GSSP_NO_RETURNED_VALUE:function(){return ne},INFINITE_CACHE:function(){return v},INSTRUMENTATION_HOOK_FILENAME:function(){return Z},MATCHED_PATH_HEADER:function(){return f},MIDDLEWARE_FILENAME:function(){return O},MIDDLEWARE_LOCATION_REGEXP:function(){return q},NEXT_BODY_SUFFIX:function(){return E},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return D},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return t},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return c},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return C},NEXT_CACHE_TAGS_HEADER:function(){return x},NEXT_CACHE_TAG_MAX_ITEMS:function(){return a},NEXT_CACHE_TAG_MAX_LENGTH:function(){return m},NEXT_DATA_SUFFIX:function(){return _},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return l},NEXT_META_SUFFIX:function(){return g},NEXT_QUERY_PARAM_PREFIX:function(){return o},NEXT_RESUME_HEADER:function(){return r},NON_STANDARD_NODE_ENV:function(){return he},PAGES_DIR_ALIAS:function(){return J},PRERENDER_REVALIDATE_HEADER:function(){return p},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return s},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return ee},ROOT_DIR_ALIAS:function(){return H},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return ce},RSC_ACTION_ENCRYPTION_ALIAS:function(){return z},RSC_ACTION_PROXY_ALIAS:function(){return G},RSC_ACTION_VALIDATE_ALIAS:function(){return j},RSC_CACHE_WRAPPER_ALIAS:function(){return me},RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS:function(){return W},RSC_MOD_REF_PROXY_ALIAS:function(){return ue},RSC_PREFETCH_SUFFIX:function(){return e},RSC_SEGMENTS_DIR_SUFFIX:function(){return h},RSC_SEGMENT_SUFFIX:function(){return b},RSC_SUFFIX:function(){return i},SERVER_PROPS_EXPORT_ERROR:function(){return de},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return le},SERVER_PROPS_SSG_CONFLICT:function(){return V},SERVER_RUNTIME:function(){return Y},SSG_FALLBACK_EXPORT_ERROR:function(){return _e},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return te},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return re},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return ie},WEBPACK_LAYERS:function(){return F},WEBPACK_RESOURCE_QUERIES:function(){return Ee}});const o="nxtP",l="nxtI",f="x-matched-path",p="x-prerender-revalidate",s="x-prerender-revalidate-if-generated",e=".prefetch.rsc",h=".segments",b=".segment.rsc",i=".rsc",u=".action",_=".json",g=".meta",E=".body",x="x-next-cache-tags",t="x-next-revalidated-tags",c="x-next-revalidate-tag-token",r="next-resume",a=128,m=256,C=1024,D="_N_T_",P=31536e3,v=4294967294,O="middleware",q=`(?:src/)?${O}`,Z="instrumentation",J="private-next-pages",B="private-dot-next",H="private-next-root-dir",se="private-next-app-dir",ue="private-next-rsc-mod-ref-proxy",j="private-next-rsc-action-validate",G="private-next-rsc-server-reference",me="private-next-rsc-cache-wrapper",W="private-next-rsc-track-dynamic-import",z="private-next-rsc-action-encryption",ce="private-next-rsc-action-client-wrapper",ee="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",te="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",le="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",V="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",re="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",de="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",$="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",ne="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",ie="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",fe="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",he='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',_e="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",ge=["app","pages","components","lib","src"],Y={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"},F={...N,GROUP:{builtinReact:[N.reactServerComponents,N.actionBrowser],serverOnly:[N.reactServerComponents,N.actionBrowser,N.instrument,N.middleware],neutralTarget:[N.apiNode,N.apiEdge],clientOnly:[N.serverSideRendering,N.appPagesBrowser],bundled:[N.reactServerComponents,N.actionBrowser,N.serverSideRendering,N.appPagesBrowser,N.shared,N.instrument,N.middleware],appPages:[N.reactServerComponents,N.serverSideRendering,N.appPagesBrowser,N.actionBrowser]}},Ee={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}}(qe)),qe}var _t;function Ct(){return _t||(_t=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(h,b){for(var i in b)Object.defineProperty(h,i,{enumerable:!0,get:b[i]})}d(n,{fromNodeOutgoingHttpHeaders:function(){return l},normalizeNextQueryParam:function(){return e},splitCookiesString:function(){return f},toNodeOutgoingHttpHeaders:function(){return p},validateURL:function(){return s}});const o=zt();function l(h){const b=new Headers;for(let[i,u]of Object.entries(h)){const _=Array.isArray(u)?u:[u];for(let g of _)typeof g>"u"||(typeof g=="number"&&(g=g.toString()),b.append(i,g))}return b}function f(h){var b=[],i=0,u,_,g,E,x;function t(){for(;i<h.length&&/\s/.test(h.charAt(i));)i+=1;return i<h.length}function c(){return _=h.charAt(i),_!=="="&&_!==";"&&_!==","}for(;i<h.length;){for(u=i,x=!1;t();)if(_=h.charAt(i),_===","){for(g=i,i+=1,t(),E=i;i<h.length&&c();)i+=1;i<h.length&&h.charAt(i)==="="?(x=!0,i=E,b.push(h.substring(u,g)),u=i):i=g+1}else i+=1;(!x||i>=h.length)&&b.push(h.substring(u,h.length))}return b}function p(h){const b={},i=[];if(h)for(const[u,_]of h.entries())u.toLowerCase()==="set-cookie"?(i.push(...f(_)),b[u]=i.length===1?i[0]:i):b[u]=_;return b}function s(h){try{return String(new URL(String(h)))}catch(b){throw Object.defineProperty(new Error(`URL is malformed "${String(h)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:b}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function e(h){const b=[o.NEXT_QUERY_PARAM_PREFIX,o.NEXT_INTERCEPTION_MARKER_PREFIX];for(const i of b)if(h!==i&&h.startsWith(i))return h.substring(i.length);return null}}(De)),De}var je={},pt;function Vt(){return pt||(pt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(p,s){for(var e in s)Object.defineProperty(p,e,{enumerable:!0,get:s[e]})}d(n,{PageSignatureError:function(){return o},RemovedPageError:function(){return l},RemovedUAError:function(){return f}});class o extends Error{constructor({page:s}){super(`The middleware "${s}" accepts an async API directly with the form:
6
-
7
- export function middleware(request, event) {
8
- return NextResponse.redirect('/new-location')
9
- }
10
-
11
- Read more: https://nextjs.org/docs/messages/middleware-new-signature
12
- `)}}class l extends Error{constructor(){super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ")}}class f extends Error{constructor(){super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ")}}}(je)),je}var bt;function $t(){return bt||(bt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(h,b){for(var i in b)Object.defineProperty(h,i,{enumerable:!0,get:b[i]})}d(n,{INTERNALS:function(){return s},NextRequest:function(){return e}});const o=Ot(),l=Ct(),f=Vt(),p=I.requireCookies(),s=Symbol("internal request");class e extends Request{constructor(b,i={}){const u=typeof b!="string"&&"url"in b?b.url:String(b);(0,l.validateURL)(u),process.env.NEXT_RUNTIME!=="edge"&&i.body&&i.duplex!=="half"&&(i.duplex="half"),b instanceof Request?super(b,i):super(u,i);const _=new o.NextURL(u,{headers:(0,l.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:i.nextConfig});this[s]={cookies:new p.RequestCookies(this.headers),nextUrl:_,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?u:_.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[s].cookies}get nextUrl(){return this[s].nextUrl}get page(){throw new f.RemovedPageError}get ua(){throw new f.RemovedUAError}get url(){return this[s].url}}}(ve)),ve}var Me={},mt;function Yt(){return mt||(mt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NextResponse",{enumerable:!0,get:function(){return b}});const d=I.requireCookies(),o=Ot(),l=Ct(),f=I.requireReflect(),p=I.requireCookies(),s=Symbol("internal response"),e=new Set([301,302,303,307,308]);function h(i,u){var _;if(!(i==null||(_=i.request)==null)&&_.headers){if(!(i.request.headers instanceof Headers))throw Object.defineProperty(new Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});const g=[];for(const[E,x]of i.request.headers)u.set("x-middleware-request-"+E,x),g.push(E);u.set("x-middleware-override-headers",g.join(","))}}class b extends Response{constructor(u,_={}){super(u,_);const g=this.headers,E=new p.ResponseCookies(g),x=new Proxy(E,{get(t,c,r){switch(c){case"delete":case"set":return(...a)=>{const m=Reflect.apply(t[c],t,a),C=new Headers(g);return m instanceof p.ResponseCookies&&g.set("x-middleware-set-cookie",m.getAll().map(D=>(0,d.stringifyCookie)(D)).join(",")),h(_,C),m};default:return f.ReflectAdapter.get(t,c,r)}}});this[s]={cookies:x,url:_.url?new o.NextURL(_.url,{headers:(0,l.toNodeOutgoingHttpHeaders)(g),nextConfig:_.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[s].cookies}static json(u,_){const g=Response.json(u,_);return new b(g.body,g)}static redirect(u,_){const g=typeof _=="number"?_:(_==null?void 0:_.status)??307;if(!e.has(g))throw Object.defineProperty(new RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});const E=typeof _=="object"?_:{},x=new Headers(E==null?void 0:E.headers);return x.set("Location",(0,l.validateURL)(u)),new b(null,{...E,headers:x,status:g})}static rewrite(u,_){const g=new Headers(_==null?void 0:_.headers);return g.set("x-middleware-rewrite",(0,l.validateURL)(u)),h(_,g),new b(null,{..._,headers:g})}static next(u){const _=new Headers(u==null?void 0:u.headers);return _.set("x-middleware-next","1"),h(u,_),new b(null,{...u,headers:_})}}}(Me)),Me}var Xe={},gt;function Kt(){return gt||(gt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageResponse",{enumerable:!0,get:function(){return d}});function d(){throw Object.defineProperty(new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead'),"__NEXT_ERROR_CODE",{value:"E183",enumerable:!1,configurable:!0})}}(Xe)),Xe}var He={},Fe={exports:{}},Et;function Qt(){return Et||(Et=1,(()=>{var n={226:function(f,p){(function(s,e){var h="1.0.35",b="",i="?",u="function",_="undefined",g="object",E="string",x="major",t="model",c="name",r="type",a="vendor",m="version",C="architecture",D="console",P="mobile",v="tablet",O="smarttv",q="wearable",Z="embedded",J=350,B="Amazon",H="Apple",se="ASUS",ue="BlackBerry",j="Browser",G="Chrome",me="Edge",W="Firefox",z="Google",ce="Huawei",ee="LG",te="Microsoft",le="Motorola",V="Opera",re="Samsung",de="Sharp",$="Sony",ne="Xiaomi",ie="Zebra",fe="Facebook",he="Chromium OS",_e="Mac OS",ge=function(A,y){var R={};for(var T in A)y[T]&&y[T].length%2===0?R[T]=y[T].concat(A[T]):R[T]=A[T];return R},Y=function(A){for(var y={},R=0;R<A.length;R++)y[A[R].toUpperCase()]=A[R];return y},N=function(A,y){return typeof A===E?F(y).indexOf(F(A))!==-1:!1},F=function(A){return A.toLowerCase()},Ee=function(A){return typeof A===E?A.replace(/[^\d\.]/g,b).split(".")[0]:e},oe=function(A,y){if(typeof A===E)return A=A.replace(/^\s\s*/,b),typeof y===_?A:A.substring(0,J)},M=function(A,y){for(var R=0,T,X,k,S,w,U;R<y.length&&!w;){var we=y[R],Je=y[R+1];for(T=X=0;T<we.length&&!w&&we[T];)if(w=we[T++].exec(A),w)for(k=0;k<Je.length;k++)U=w[++X],S=Je[k],typeof S===g&&S.length>0?S.length===2?typeof S[1]==u?this[S[0]]=S[1].call(this,U):this[S[0]]=S[1]:S.length===3?typeof S[1]===u&&!(S[1].exec&&S[1].test)?this[S[0]]=U?S[1].call(this,U,S[2]):e:this[S[0]]=U?U.replace(S[1],S[2]):e:S.length===4&&(this[S[0]]=U?S[3].call(this,U.replace(S[1],S[2])):e):this[S]=U||e;R+=2}},K=function(A,y){for(var R in y)if(typeof y[R]===g&&y[R].length>0){for(var T=0;T<y[R].length;T++)if(N(y[R][T],A))return R===i?e:R}else if(N(y[R],A))return R===i?e:R;return A},Lt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Qe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ze={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,m],[/opios[\/ ]+([\w\.]+)/i],[m,[c,V+" Mini"]],[/\bopr\/([\w\.]+)/i],[m,[c,V]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[c,"UC"+j]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[m,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[m,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+j],m],[/\bfocus\/([\w\.]+)/i],[m,[c,W+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[c,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[c,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[c,"MIUI "+j]],[/fxios\/([-\w\.]+)/i],[m,[c,W]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+j]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+j],m],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,m],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,fe],m],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[c,G+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,G+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[c,"Android "+j]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[m,K,Lt]],[/(webkit|khtml)\/([\w\.]+)/i],[c,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[c,W+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c,m],[/(cobalt)\/([\w\.]+)/i],[c,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[C,"amd64"]],[/(ia32(?=;))/i],[[C,F]],[/((?:i[346]|x)86)[;\)]/i],[[C,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[C,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[C,"armhf"]],[/windows (ce|mobile); ppc;/i],[[C,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[C,/ower/,b,F]],[/(sun4\w)[;\)]/i],[[C,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[C,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[a,re],[r,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[t,[a,re],[r,P]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[a,H],[r,P]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[a,H],[r,v]],[/(macintosh);/i],[t,[a,H]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[a,de],[r,P]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[t,[a,ce],[r,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[a,ce],[r,P]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[t,/_/g," "],[a,ne],[r,P]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[t,/_/g," "],[a,ne],[r,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[a,"OPPO"],[r,P]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[a,"Vivo"],[r,P]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[t,[a,"Realme"],[r,P]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[a,le],[r,P]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[a,le],[r,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[a,ee],[r,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[a,ee],[r,P]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[t,[a,"Lenovo"],[r,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[t,/_/g," "],[a,"Nokia"],[r,P]],[/(pixel c)\b/i],[t,[a,z],[r,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[a,z],[r,P]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[a,$],[r,P]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[a,$],[r,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[a,"OnePlus"],[r,P]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[a,B],[r,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[a,B],[r,P]],[/(playbook);[-\w\),; ]+(rim)/i],[t,a,[r,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[a,ue],[r,P]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[a,se],[r,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[a,se],[r,P]],[/(nexus 9)/i],[t,[a,"HTC"],[r,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[t,/_/g," "],[r,P]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[a,"Acer"],[r,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[a,"Meizu"],[r,P]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[a,t,[r,P]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,t,[r,v]],[/(surface duo)/i],[t,[a,te],[r,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[a,"Fairphone"],[r,P]],[/(u304aa)/i],[t,[a,"AT&T"],[r,P]],[/\bsie-(\w*)/i],[t,[a,"Siemens"],[r,P]],[/\b(rct\w+) b/i],[t,[a,"RCA"],[r,v]],[/\b(venue[\d ]{2,7}) b/i],[t,[a,"Dell"],[r,v]],[/\b(q(?:mv|ta)\w+) b/i],[t,[a,"Verizon"],[r,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[t,[a,"Barnes & Noble"],[r,v]],[/\b(tm\d{3}\w+) b/i],[t,[a,"NuVision"],[r,v]],[/\b(k88) b/i],[t,[a,"ZTE"],[r,v]],[/\b(nx\d{3}j) b/i],[t,[a,"ZTE"],[r,P]],[/\b(gen\d{3}) b.+49h/i],[t,[a,"Swiss"],[r,P]],[/\b(zur\d{3}) b/i],[t,[a,"Swiss"],[r,v]],[/\b((zeki)?tb.*\b) b/i],[t,[a,"Zeki"],[r,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],t,[r,v]],[/\b(ns-?\w{0,9}) b/i],[t,[a,"Insignia"],[r,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[t,[a,"NextBook"],[r,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],t,[r,P]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],t,[r,P]],[/\b(ph-1) /i],[t,[a,"Essential"],[r,P]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[t,[a,"Envizen"],[r,v]],[/\b(trio[-\w\. ]+) b/i],[t,[a,"MachSpeed"],[r,v]],[/\btu_(1491) b/i],[t,[a,"Rotor"],[r,v]],[/(shield[\w ]+) b/i],[t,[a,"Nvidia"],[r,v]],[/(sprint) (\w+)/i],[a,t,[r,P]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[a,te],[r,P]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[a,ie],[r,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[a,ie],[r,P]],[/smart-tv.+(samsung)/i],[a,[r,O]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[a,re],[r,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,ee],[r,O]],[/(apple) ?tv/i],[a,[t,H+" TV"],[r,O]],[/crkey/i],[[t,G+"cast"],[a,z],[r,O]],[/droid.+aft(\w)( bui|\))/i],[t,[a,B],[r,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[a,de],[r,O]],[/(bravia[\w ]+)( bui|\))/i],[t,[a,$],[r,O]],[/(mitv-\w{5}) bui/i],[t,[a,ne],[r,O]],[/Hbbtv.*(technisat) (.*);/i],[a,t,[r,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,oe],[t,oe],[r,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[r,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,t,[r,D]],[/droid.+; (shield) bui/i],[t,[a,"Nvidia"],[r,D]],[/(playstation [345portablevi]+)/i],[t,[a,$],[r,D]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[a,te],[r,D]],[/((pebble))app/i],[a,t,[r,q]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[a,H],[r,q]],[/droid.+; (glass) \d/i],[t,[a,z],[r,q]],[/droid.+; (wt63?0{2,3})\)/i],[t,[a,ie],[r,q]],[/(quest( 2| pro)?)/i],[t,[a,fe],[r,q]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[r,Z]],[/(aeobc)\b/i],[t,[a,B],[r,Z]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[t,[r,P]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[t,[r,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[r,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[r,P]],[/(android[-\w\. ]{0,9});.+buil/i],[t,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[c,me+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,m],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[m,K,Qe]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[m,K,Qe]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,_e],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,m],[/\(bb(10);/i],[m,[c,ue]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[c,W+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[c,G+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,he],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,m],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,m]]},L=function(A,y){if(typeof A===g&&(y=A,A=e),!(this instanceof L))return new L(A,y).getResult();var R=typeof s!==_&&s.navigator?s.navigator:e,T=A||(R&&R.userAgent?R.userAgent:b),X=R&&R.userAgentData?R.userAgentData:e,k=y?ge(Ze,y):Ze,S=R&&R.userAgent==T;return this.getBrowser=function(){var w={};return w[c]=e,w[m]=e,M.call(w,T,k.browser),w[x]=Ee(w[m]),S&&R&&R.brave&&typeof R.brave.isBrave==u&&(w[c]="Brave"),w},this.getCPU=function(){var w={};return w[C]=e,M.call(w,T,k.cpu),w},this.getDevice=function(){var w={};return w[a]=e,w[t]=e,w[r]=e,M.call(w,T,k.device),S&&!w[r]&&X&&X.mobile&&(w[r]=P),S&&w[t]=="Macintosh"&&R&&typeof R.standalone!==_&&R.maxTouchPoints&&R.maxTouchPoints>2&&(w[t]="iPad",w[r]=v),w},this.getEngine=function(){var w={};return w[c]=e,w[m]=e,M.call(w,T,k.engine),w},this.getOS=function(){var w={};return w[c]=e,w[m]=e,M.call(w,T,k.os),S&&!w[c]&&X&&X.platform!="Unknown"&&(w[c]=X.platform.replace(/chrome os/i,he).replace(/macos/i,_e)),w},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return T},this.setUA=function(w){return T=typeof w===E&&w.length>J?oe(w,J):w,this},this.setUA(T),this};L.VERSION=h,L.BROWSER=Y([c,m,x]),L.CPU=Y([C]),L.DEVICE=Y([t,a,r,D,P,O,v,q,Z]),L.ENGINE=L.OS=Y([c,m]),typeof p!==_?(f.exports&&(p=f.exports=L),p.UAParser=L):typeof s!==_&&(s.UAParser=L);var Q=typeof s!==_&&(s.jQuery||s.Zepto);if(Q&&!Q.ua){var pe=new L;Q.ua=pe.getResult(),Q.ua.get=function(){return pe.getUA()},Q.ua.set=function(A){pe.setUA(A);var y=pe.getResult();for(var R in y)Q.ua[R]=y[R]}}})(typeof window=="object"?window:this)}},d={};function o(f){var p=d[f];if(p!==void 0)return p.exports;var s=d[f]={exports:{}},e=!0;try{n[f].call(s.exports,s,s.exports,o),e=!1}finally{e&&delete d[f]}return s.exports}typeof o<"u"&&(o.ab=__dirname+"/");var l=o(226);Fe.exports=l})()),Fe.exports}var wt;function Rt(){return wt||(wt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(e,h){for(var b in h)Object.defineProperty(e,b,{enumerable:!0,get:h[b]})}d(n,{isBot:function(){return f},userAgent:function(){return s},userAgentFromString:function(){return p}});const o=l(Qt());function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function p(e){return{...(0,o.default)(e),isBot:e===void 0?!1:f(e)}}function s({headers:e}){return p(e.get("user-agent")||void 0)}}(He)),He}var Be={},vt;function Zt(){return vt||(vt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"URLPattern",{enumerable:!0,get:function(){return d}});const d=typeof URLPattern>"u"?void 0:URLPattern}(Be)),Be}var Ge={},We={},Pt;function Jt(){return Pt||(Pt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"after",{enumerable:!0,get:function(){return o}});const d=I.requireWorkAsyncStorage_external();function o(l){const f=d.workAsyncStorage.getStore();if(!f)throw Object.defineProperty(new Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context"),"__NEXT_ERROR_CODE",{value:"E468",enumerable:!1,configurable:!0});const{afterContext:p}=f;return p.after(l)}}(We)),We}var At;function er(){return At||(At=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),d(Jt(),n);function d(o,l){return Object.keys(o).forEach(function(f){f!=="default"&&!Object.prototype.hasOwnProperty.call(l,f)&&Object.defineProperty(l,f,{enumerable:!0,get:function(){return o[f]}})}),o}}(Ge)),Ge}var ze={},St;function tr(){return St||(St=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"connection",{enumerable:!0,get:function(){return e}});const d=I.requireWorkAsyncStorage_external(),o=I.requireWorkUnitAsyncStorage_external(),l=I.requireDynamicRendering(),f=I.requireStaticGenerationBailout(),p=I.requireDynamicRenderingUtils(),s=I.requireUtils();function e(){const h=d.workAsyncStorage.getStore(),b=o.workUnitAsyncStorage.getStore();if(h){if(b&&b.phase==="after"&&!(0,s.isRequestAPICallableInsideAfter)())throw Object.defineProperty(new Error(`Route ${h.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E186",enumerable:!1,configurable:!0});if(h.forceStatic)return Promise.resolve(void 0);if(b){if(b.type==="cache")throw Object.defineProperty(new Error(`Route ${h.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E111",enumerable:!1,configurable:!0});if(b.type==="unstable-cache")throw Object.defineProperty(new Error(`Route ${h.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E1",enumerable:!1,configurable:!0})}if(h.dynamicShouldError)throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${h.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E562",enumerable:!1,configurable:!0});if(b){if(b.type==="prerender"||b.type==="prerender-client")return(0,p.makeHangingPromise)(b.renderSignal,"`connection()`");b.type==="prerender-ppr"?(0,l.postponeWithTracking)(h.route,"connection",b.dynamicTracking):b.type==="prerender-legacy"&&(0,l.throwToInterruptStaticGeneration)("connection",h,b)}(0,l.trackDynamicDataInDynamicRender)(h,b)}return Promise.resolve(void 0)}}(ze)),ze}var Ve={},$e={},xt;function rr(){return xt||(xt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});function d(s,e){for(var h in e)Object.defineProperty(s,h,{enumerable:!0,get:e[h]})}d(n,{describeHasCheckingStringProperty:function(){return f},describeStringPropertyAccess:function(){return l},wellKnownProperties:function(){return p}});const o=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function l(s,e){return o.test(e)?"`"+s+"."+e+"`":"`"+s+"["+JSON.stringify(e)+"]`"}function f(s,e){const h=JSON.stringify(e);return"`Reflect.has("+s+", "+h+")`, `"+h+" in "+s+"`, or similar"}const p=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","_debugInfo","toJSON","$$typeof","__esModule"])}($e)),$e}var yt;function nr(){return yt||(yt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"unstable_rootParams",{enumerable:!0,get:function(){return h}});const d=I.requireInvariantError(),o=I.requireDynamicRendering(),l=I.requireWorkAsyncStorage_external(),f=I.requireWorkUnitAsyncStorage_external(),p=I.requireDynamicRenderingUtils(),s=rr(),e=new WeakMap;async function h(){const u=l.workAsyncStorage.getStore();if(!u)throw Object.defineProperty(new d.InvariantError("Missing workStore in unstable_rootParams"),"__NEXT_ERROR_CODE",{value:"E615",enumerable:!1,configurable:!0});const _=f.workUnitAsyncStorage.getStore();if(!_)throw Object.defineProperty(new Error(`Route ${u.route} used \`unstable_rootParams()\` in Pages Router. This API is only available within App Router.`),"__NEXT_ERROR_CODE",{value:"E641",enumerable:!1,configurable:!0});switch(_.type){case"unstable-cache":case"cache":throw Object.defineProperty(new Error(`Route ${u.route} used \`unstable_rootParams()\` inside \`"use cache"\` or \`unstable_cache\`. Support for this API inside cache scopes is planned for a future version of Next.js.`),"__NEXT_ERROR_CODE",{value:"E642",enumerable:!1,configurable:!0});case"prerender":case"prerender-client":case"prerender-ppr":case"prerender-legacy":return b(_.rootParams,u,_);default:return Promise.resolve(_.rootParams)}}function b(u,_,g){const E=_.fallbackRouteParams;if(E){let x=!1;for(const t in u)if(E.has(t)){x=!0;break}if(x)switch(g.type){case"prerender":const t=e.get(u);if(t)return t;const c=(0,p.makeHangingPromise)(g.renderSignal,"`unstable_rootParams`");return e.set(u,c),c;case"prerender-client":const r="`unstable_rootParams`";throw Object.defineProperty(new d.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E693",enumerable:!1,configurable:!0});default:return i(u,E,_,g)}}return Promise.resolve(u)}function i(u,_,g,E){const x=e.get(u);if(x)return x;const t={...u},c=Promise.resolve(t);return e.set(u,c),Object.keys(u).forEach(r=>{s.wellKnownProperties.has(r)||(_.has(r)?Object.defineProperty(t,r,{get(){const a=(0,s.describeStringPropertyAccess)("unstable_rootParams",r);E.type==="prerender-ppr"?(0,o.postponeWithTracking)(g.route,a,E.dynamicTracking):(0,o.throwToInterruptStaticGeneration)(a,g,E)},enumerable:!0}):c[r]=u[r])}),c}}(Ve)),Ve}var Tt;function ir(){return Tt||(Tt=1,function(n,d){const o={NextRequest:$t().NextRequest,NextResponse:Yt().NextResponse,ImageResponse:Kt().ImageResponse,userAgentFromString:Rt().userAgentFromString,userAgent:Rt().userAgent,URLPattern:Zt().URLPattern,after:er().after,connection:tr().connection,unstable_rootParams:nr().unstable_rootParams};n.exports=o,d.NextRequest=o.NextRequest,d.NextResponse=o.NextResponse,d.ImageResponse=o.ImageResponse,d.userAgentFromString=o.userAgentFromString,d.userAgent=o.userAgent,d.URLPattern=o.URLPattern,d.after=o.after,d.connection=o.connection,d.unstable_rootParams=o.unstable_rootParams}(be,be.exports)),be.exports}var ae=ir();const or=async n=>{try{let d=ae.NextResponse.next({request:{headers:n.headers}});const o=process.env.NEXT_PUBLIC_SUPABASE_URL,l=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!o||!l)throw new Error("Missing Supabase environment variables");const p=await I.createServerClient(o,l,{cookies:{getAll(){return n.cookies.getAll()},setAll(s){s.forEach(({name:e,value:h})=>n.cookies.set(e,h)),d=ae.NextResponse.next({request:n}),s.forEach(({name:e,value:h,options:b})=>d.cookies.set(e,h,b))}}}).auth.getUser();return n.nextUrl.pathname.startsWith("/protected")&&p.error?ae.NextResponse.redirect(new URL("/sign-in",n.url)):n.nextUrl.pathname==="/"&&!p.error?ae.NextResponse.redirect(new URL("/protected",n.url)):d}catch{return ae.NextResponse.next({request:{headers:n.headers}})}},ar=()=>!process.env.NEXT_PUBLIC_SUPABASE_URL||!process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?(console.warn("Supabase URL or Anon Key is missing for SSG client. Check .env.local"),{}):I.createClient(process.env.NEXT_PUBLIC_SUPABASE_URL,process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY),sr={public:{Enums:{menu_location:["HEADER","FOOTER","SIDEBAR"],page_status:["draft","published","archived"],user_role:["ADMIN","WRITER","USER"]}}};exports.Constants=sr;exports.createClient=Nt;exports.getActiveLanguagesClientSide=Dt;exports.getProfileWithRoleClientSide=Ut;exports.getSsgSupabaseClient=ar;exports.updateSession=or;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@supabase/ssr"),t=require("next/server"),p=require("@supabase/supabase-js"),u=()=>{const e=process.env.NEXT_PUBLIC_SUPABASE_URL,s=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!e||!s)throw new Error(`CRITICAL: Supabase URL or Anon Key is missing. Please ensure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set in your production environment. URL_IS_SET: ${!!e}, ANON_KEY_IS_SET: ${!!s}`);return l.createBrowserClient(e,s)};async function S(e,s){const{data:r,error:n}=await e.from("profiles").select("id, full_name, avatar_url, role, updated_at, username, website").eq("id",s).single();return n||!r?null:r}async function E(){const e=u(),{data:s,error:r}=await e.from("languages").select("id, code, name, is_default, is_active, created_at, updated_at").order("name",{ascending:!0});return r?[]:s||[]}const A=async e=>{try{let s=t.NextResponse.next({request:{headers:e.headers}});const r=process.env.NEXT_PUBLIC_SUPABASE_URL,n=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!r||!n)throw new Error("Missing Supabase environment variables");const i=await l.createServerClient(r,n,{cookies:{getAll(){return e.cookies.getAll()},setAll(c){c.forEach(({name:a,value:o})=>e.cookies.set(a,o)),s=t.NextResponse.next({request:e}),c.forEach(({name:a,value:o,options:_})=>s.cookies.set(a,o,_))}}}).auth.getUser();return e.nextUrl.pathname.startsWith("/protected")&&i.error?t.NextResponse.redirect(new URL("/sign-in",e.url)):e.nextUrl.pathname==="/"&&!i.error?t.NextResponse.redirect(new URL("/protected",e.url)):s}catch{return t.NextResponse.next({request:{headers:e.headers}})}},d=()=>!process.env.NEXT_PUBLIC_SUPABASE_URL||!process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?(console.warn("Supabase URL or Anon Key is missing for SSG client. Check .env.local"),{}):p.createClient(process.env.NEXT_PUBLIC_SUPABASE_URL,process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY),U={public:{Enums:{menu_location:["HEADER","FOOTER","SIDEBAR"],page_status:["draft","published","archived"],revision_type:["snapshot","diff"],user_role:["ADMIN","WRITER","USER"]}}};exports.Constants=U;exports.createClient=u;exports.getActiveLanguagesClientSide=E;exports.getProfileWithRoleClientSide=S;exports.getSsgSupabaseClient=d;exports.updateSession=A;