PageSourceSearch

https://www.mediabistro.com/_static/errorBoundaries-YsfO7SnY.js

js mediabistro.com collected 2026-09-24 08:04:29 UTC 34,103 bytes, 19 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ec349dd7-600c-53ac-bd63-999e72ef3098")}catch(e){}}();
3(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`25c8561407dd244f755cdf86f82d232b3ffe81b9`}}catch{}})();import{r as e}from"./rolldown-runtime-DS5tZbRp.js";import{n as t}from"./jsx-runtime-mW4NJb5c.js";import{B as n,C as r,F as i,G as a,H as o,I as s,L as c,M as l,N as u,P as d,U as f,Y as p,b as m,c as h,f as g,k as _,w as ee,z as v}from"./components-B0lVdL8R.js";function y(e,t){if(e===!1||e==null)throw Error(t)}var te={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ne=/[&><\u2028\u2029]/g;function b(e){return e.replace(ne,e=>te[e])}var x=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function re(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(`
4`);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}var S=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function C(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return ie.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,ie.call(this,r)}function ie(e){let{hydrated:t,values:n,deferred:r,plugins:a}=this,o,s=[[e,e=>{o=e}]],c=[];for(;s.length>0;){let[e,o]=s.pop();switch(e){case-7:o(void 0);continue;case-5:o(null);continue;case-2:o(NaN);continue;case-6:o(1/0);continue;case-3:o(-1/0);continue;case-4:o(-0);continue}if(t[e]){o(t[e]);continue}let l=n[e];if(!l||typeof l!=`object`){t[e]=l,o(l);continue}if(Array.isArray(l))if(typeof l[0]==`string`){let[n,u,d]=l;switch(n){case`D`:o(t[e]=new Date(u));continue;case`U`:o(t[e]=new URL(u));continue;case`B`:o(t[e]=BigInt(u));continue;case`R`:o(t[e]=new RegExp(u,d));continue;case`Y`:o(t[e]=Symbol.for(u));continue;case`S`:let n=new Set;t[e]=n;for(let e=l.length-1;e>0;e--)s.push([l[e],e=>{n.add(e)}]);o(n);continue;case`M`:let f=new Map;t[e]=f;for(let e=l.length-2;e>0;e-=2){let t=[];s.push([l[e+1],e=>{t[1]=e}]),s.push([l[e],e=>{t[0]=e}]),c.push(()=>{f.set(t[0],t[1])})}o(f);continue;case`N`:let p=Object.create(null);t[e]=p;for(let e of Object.keys(u).reverse()){let t=[];s.push([u[e],e=>{t[1]=e}]),s.push([Number(e.slice(1)),e=>{t[0]=e}]),c.push(()=>{p[t[0]]=t[1]})}o(p);continue;case`P`:if(t[u])o(t[e]=t[u]);else{let n=new x;r[u]=n,o(t[e]=n.promise)}continue;case`E`:let[,m,h]=l,g=h&&S&&i.includes(h)&&h in S&&typeof S[h]==`function`?new S[h](m):Error(m);t[e]=g,o(g);continue;case`Z`:o(t[e]=t[u]);continue;default:if(Array.isArray(a)){let n=[],r=l.slice(1);for(let e=0;e<r.length;e++){let t=r[e];s.push([t,t=>{n[e]=t}])}c.push(()=>{for(let r of a){let i=r(l[0],...n);if(i){o(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<l.length;e++){let t=l[e];t!==-1&&s.push([t,t=>{n[e]=t}])}o(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(l).reverse()){let t=[];s.push([l[e],e=>{t[1]=e}]),s.push([Number(e.slice(1)),e=>{t[0]=e}]),c.push(()=>{n[t[0]]=t[1]})}o(n);continue}}for(;c.length>0;)c.pop()();return o}async function ae(e,t){let{plugins:n}=t??{},r=new x,i=e.pipeThrough(re()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await oe.call(a,i),s=r.promise;return o.done?r.resolve():s=se.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function oe(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:C.call(this,n)}}async function se(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case`P`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=C.call(this,a);r.resolve(o);break}case`E`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=C.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function ce(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var w=e(t(),1),T=Symbol(`SingleFetchRedirect`),le=class extends 
4Error{},ue=new Set([100,101,204,205]);function de(e,t,n,r){let i=fe(e,e=>{let n=t.routes[e.route.id];return y(n,`Route not found in manifest`),{hasLoader:n.hasLoader,hasClientLoader:n.hasClientLoader}},ye,r);return async e=>e.runClientMiddleware(i)}function fe(e,t,n,r,i=()=>!0){return async a=>{let{request:o,matches:s,fetcherKey:c}=a,l=e();if(o.method!==`GET`)return pe(a,n);let u=s.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.shouldCallHandler()&&n&&!r});return!r&&!u?me(a,t,n):c?_e(a,n):he(a,l,t,n,r,i)}}async function pe(e,t){let n=e.matches.find(e=>e.shouldCallHandler());y(n,`No action match found`);let r,i=await n.resolve(async i=>await i(async()=>{let{data:i,status:a}=await t(e,[n.route.id]);return r=a,O(i,n.route.id)}));return u(i.result)||v(i.result)||l(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:c(i.result,r)}}}async function me(e,t,n){let r=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(r.map(r=>r.resolve(async a=>{try{let{hasClientLoader:o}=t(r),s=r.route.id,c=o?await a(async()=>{let{data:t}=await n(e,[s]);return O(t,s)}):await a();i[r.route.id]={type:`data`,result:c}}catch(e){i[r.route.id]={type:`error`,result:e}}}))),i}async function he(e,t,n,r,i,a=()=>!0){let o=new Set,s=!1,c=e.matches.map(()=>k()),l=k(),u={},d=Promise.all(e.matches.map(async(t,i)=>t.resolve(async d=>{c[i].resolve();let f=t.route.id,{hasLoader:p,hasClientLoader:m}=n(t),h=!t.shouldRevalidateArgs||t.shouldRevalidateArgs.actionStatus==null||t.shouldRevalidateArgs.actionStatus<400;if(!t.shouldCallHandler(h)){s||=t.shouldRevalidateArgs!=null&&p;return}if(a(t)&&m){p&&(s=!0);try{u[f]={type:`data`,result:await d(async()=>{let{data:t}=await r(e,[f]);return O(t,f)})}}catch(e){u[f]={type:`error`,result:e}}return}p&&o.add(f);try{u[f]={type:`data`,result:await d(async()=>O(await l.promise,f))}}catch(e){u[f]={type:`error`,result:e}}})));if(await Promise.all(c.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||o.size===0)&&!window.__reactRouterHdrActive)l.resolve({routes:{}});else{let t=i&&s&&o.size>0?[...o.keys()]:void 0;try{let n=await r(e,t);l.resolve(n.data)}catch(e){l.reject(e)}}return await d,await ge(l.promise,e.matches,o,u),u}async function ge(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof le&&(r[e].result=i)})}catch{}}async function _e(e,t){let n=e.matches.find(e=>e.shouldCallHandler());y(n,`No fetcher match found`);let r=n.route.id,i=await n.resolve(async n=>n(async()=>{let{data:n}=await t(e,[r]);return O(n,r)}));return{[n.route.id]:i}}function ve(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function E(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function ye(e,t){let{request:n}=e,r=E(n.url,`data`);n.method===`GET`&&(r=ve(r),t&&r.searchParams.set(`_routes`,t.join(`,`)));let i=await fetch(r,await ce(n));if(i.status>=400&&!i.headers.has(`X-Remix-Response`))throw new d(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has(`X-Remix-Redirect`))return{status:202,data:{redirect:{redirect:i.headers.get(`X-Remix-Redirect`),status:Number(i.headers.get(`X-Remix-Status`)||`302`),revalidate:i.headers.get(`X-Remix-Revalidate`)===`true`,reload:i.headers.get(`X-Remix-Reload-Document`)===`true`,replace:i.headers.get(`X-Remix-Replace`)===`true`}}};if(ue.has(i.status)){let e={};return t&&n.method!==`GET`&&(e[t[0]]={data:void 0}),{status:i.status,data:{routes:e}}}y(i.body,`No response body to decode`);try{let e=await D(i.body,window),r;if(n.method===`GET`){let t=e.value;r=T in t?{redirect:t[T]}:{routes:t}}else{let n=e.value,i=t?.[0];y(i,`No routeId found for single fetch call decoding`),r=`redirect`in n?{redirect:n}:{routes:{[i]:n}}}return{status:i.status,data:r}}catch{throw Error(`Unable to decode turbo-stream response`)}}function D(e,t){return ae(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,a]=n,o=Error;
4e&&i.includes(e)&&e in t&&typeof t[e]==`function`&&(o=t[e]);let s=new o(r);return s.stack=a,{value:s}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new d(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[T]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function O(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:o}=e.redirect;throw a(t,{status:o,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new le(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function k(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var be=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),xe=function(e){return`/`+e},A={},j=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=xe(t,n),t=s(t),t in A)return;A[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:be,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function M(e,t){if(e.id in t)return t[e.id];try{let n=await j(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Se(e,t,n){return ke(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),L(e,n))}function N(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function Ce(e){if(!e.css)return;let t=N(e);await Promise.all(t.map(F))}async function P(e,t){if(!e.css&&!t.links||!Ae())return;let n=[];if(e.css&&n.push(...N(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!I(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(F))}async function F(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function I(e){return e!=null&&typeof e.page==`string`}function we(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Te(e,t,n){return ke((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await M(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(we).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ee(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>
4o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function L(e,t,{includeHydrateFallback:n}={}){return De(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function De(e){return[...new Set(e)]}function Oe(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ke(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!I(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Oe(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var R;function Ae(){if(R!==void 0)return R;let e=document.createElement(`link`);return R=e.relList.supports(`preload`),e=null,R}function je(){let{nonce:e}=J();return w.createElement($,{title:`Loading...`,renderScripts:!0},null)}function Me(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function Ne(e,t,n){let r=Re(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?je:void 0,a=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>w.createElement(ct,{error:m()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:w.createElement(t.Layout,null,w.createElement(r,null))}:{Component:r},...a?{errorElement:w.createElement(t.Layout,null,w.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:w.createElement(t.Layout,null,w.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function Pe(e,t,n,r,i,a){return V(t,n,r,i,a,``,Me(t),e)}function z(e,t){if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction){let n=`You are trying to call ${e===`action`?`serverAction()`:`serverLoader()`} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new d(400,`Bad Request`,Error(n),!0)}}function B(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new d(405,`Method Not Allowed`,Error(r),!0)}function V(e,t,n,r,i,a=``,o=Me(e),s){return(o[a]||[]).map(a=>{let c=t[a.id];function l(e){return y(typeof e==`function`,`No single fetch function available for route handler`),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function d(e){if(!a.hasAction)throw B(`action`,a.id);return l(e)}function f(e){j(()=>import(e),[])}function p(e){e.clientActionModule&&f(e.clientActionModule),e.clientLoaderModule&&f(e.clientLoaderModule)}async function m(e){let n=t[a.id],r=n?P(a,n):Promise.resolve();try{return e()}finally{await r}}let h={id:a.id,index:a.index,path:a.path};if(c){Object.assign(h,{...h,...Ne(a,c,i),middleware:c.clientMiddleware,handle:c.handle,shouldRevalidate:Fe(h.path,c,a,r,s)});let e=n&&n.loaderData&&a.id in n.loaderData,t=e?n?.loaderData?.[a.id]:void 0,o=n&&n.errors&&a.id in n.errors,l=o?n?.errors?.[a.id]:void 0,f=s==null&&(c.clientLoader?.hydrate===!0||!a.hasLoader);h.loader=async({request:n,params:r,context:i,pattern:s,url:d},p)=>{let h=f;return f=!1,await m(async()=>(y(c,"No `routeModule` available for critical-route loader"),c.clientLoader?c.clientLoader({request:n,params:r,context:i,pattern:s,url:d,async serverLoader(){if
4(z(`loader`,a),h){if(e)return t;if(o)throw l}return u(p)}}):u(p)))},h.loader.hydrate=ze(a.id,c.clientLoader,a.hasLoader,i),h.action=({request:e,params:t,context:n,pattern:r,url:o},s)=>m(async()=>{if(y(c,"No `routeModule` available for critical-route action"),!c.clientAction){if(i)throw B(`clientAction`,a.id);return d(s)}return c.clientAction({request:e,params:t,context:n,pattern:r,url:o,async serverAction(){return z(`action`,a),d(s)}})})}else{a.hasClientLoader||(h.loader=(e,t)=>m(()=>u(t))),a.hasClientAction||(h.action=(e,t)=>m(()=>{if(i)throw B(`clientAction`,a.id);return d(t)}));let e;async function n(){return e||=(async()=>{(a.clientLoaderModule||a.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=Le(a,t);return p(a),await e})(),await e}h.lazy={loader:a.hasClientLoader?async()=>{let{clientLoader:e}=a.clientLoaderModule?await j(()=>import(a.clientLoaderModule),[]):await n();return y(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return z(`loader`,a),u(n)}})}:void 0,action:a.hasClientAction?async()=>{let e=a.clientActionModule?j(()=>import(a.clientActionModule),[]):n();p(a);let{clientAction:t}=await e;return y(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return z(`action`,a),d(n)}})}:void 0,middleware:a.hasClientMiddleware?async()=>{let{clientMiddleware:e}=a.clientMiddlewareModule?await j(()=>import(a.clientMiddlewareModule),[]):await n();return y(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await n();return Fe(h.path,e,a,r,s)},handle:async()=>(await n()).handle,Component:async()=>(await n()).Component,ErrorBoundary:a.hasErrorBoundary?async()=>(await n()).ErrorBoundary:void 0}}let g=V(e,t,n,r,i,a.id,o,s);return g.length>0&&(h.children=g),h})}function Fe(e,t,n,r,i){if(i)return Ie(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?s(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}return t.shouldRevalidate}function Ie(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function Le(e,t){let n=M(e,t),r=Ce(e),i=await n;return await Promise.all([r,P(e,i)]),{Component:Re(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function Re(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function ze(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var H=new Set,Be=1e3,U=new Set;function Ve(e){let t=new Set;return e.forEach(e=>{e.startsWith(`/`)||(e=`/${e}`);for(let n=1;n<e.length;n++)e[n]===`/`&&t.add(e.slice(0,n));t.add(e)}),Array.from(t)}function W(e,t){return e.mode===`lazy`&&t===!0}function He({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=f(n.routes,e,n.basename||`/`,!1,n.branches);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function Ue(e,t,n,r,i,a,o){if(W(i,r))return async({path:s,patch:c,signal:l,fetcherKey:u})=>{if(U.has(s))return;let{state:d}=e();await Ke([s],u?window.location.href:p(d.navigation.location||d.location),t,n,r,a,o,i.manifestPath,c,l)}}function We(e,t,n,r,i,a){w.useEffect(()=>{if(!W(i,r)||window.navigator?.connection?.saveData===!0)return;function o(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;U.has(n)||H.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(o);let s=Array.from(H.keys()).filter(e=>U.has(e)?(H.delete(e),!1):!0);if(s.length!==0)try{await Ke(s,null,t,n,r,a,e.basename,i.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}
4let c=Je(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,a,t,n,e,i])}function Ge(e,t){let r=e||`/__manifest`;return t==null?r:n([t,r])}var G=`react-router-manifest-version`;async function Ke(e,t,n,r,i,a,o,s,c,l){e=Ve(e);let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(Ge(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>7680){H.clear();return}let f;try{let e=await fetch(d,{signal:l});if(!e.ok)throw Error(`${e.status} ${e.statusText}`);if(e.status===204&&e.headers.has(`X-Remix-Reload-Document`)){if(!t){console.warn(`Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.`);return}try{if(sessionStorage.getItem(G)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}sessionStorage.setItem(G,n.version)}catch{}window.location.href=t,console.warn(`Detected manifest version mismatch, reloading...`),await new Promise(()=>{})}else if(e.status>=400)throw Error(await e.text());try{sessionStorage.removeItem(G)}catch{}f=await e.json()}catch(e){if(l?.aborted)return;throw e}let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>qe(e,U));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,V(m,r,null,i,a,e)))}function qe(e,t){if(t.size>=Be){let e=t.values().next().value;e!==void 0&&t.delete(e)}t.add(e)}function Je(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Ye(){let e=w.useContext(r);return y(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function K(){let e=w.useContext(ee);return y(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var q=w.createContext(void 0);q.displayName=`FrameworkContext`;function J(){let e=w.useContext(q);return y(e,`You must render this element inside a <HydratedRouter> element`),e}function Xe(e,t){let n=w.useContext(q),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Y(s,p),onBlur:Y(c,m),onMouseEnter:Y(l,p),onMouseLeave:Y(u,m),onTouchStart:Y(d,p)}]:[a,f,{}]:[!1,f,{}]}function Y(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function X(e,t,n){if(n&&!Q)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var Z=`data-react-router-critical-css`;function Ze({nonce:e,crossOrigin:t}){let{isSpaMode:n,manifest:r,routeModules:i,criticalCss:a,nonce:o}=J(),{errors:s,matches:c}=K(),l=X(c,s,n),u=w.useMemo(()=>Se(l,i,r),[l,i,r]);return e==null&&o&&(e=o),w.createElement(w.Fragment,null,typeof a==`string`?w.createElement(`style`,{[Z]:``,nonce:e,dangerouslySetInnerHTML:{__html:a}}):null,typeof a==`object`?w.createElement(`link`,{[Z]:``,rel:`stylesheet`,href:a.href,nonce:e,crossOrigin:t}):null,u.map(({key:n,link:r})=>I(r)?w.createElement(Qe,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t}):w.createElement(`link`,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t})))}function Qe({page:e,...t}){let n=_(),{nonce:r}=J(),{router:i}=Ye(),a=w.useMemo(()=>o(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?w.createElement(et,{page:e,matches:a,...t}):w.createElement(tt,{page:e,matches:a,...t})):null}function $e(e){let{manifest:t,routeModules:n}=J(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return Te(e,t,n).then(e=>{r||i(e)}
4),()=>{r=!0}},[e,t,n]),r}function et({page:e,matches:t,...n}){let r=g(),i=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=E(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return w.createElement(w.Fragment,null,i.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function tt({page:e,matches:t,...n}){let r=g(),{manifest:i,routeModules:a}=J(),{loaderData:o,matches:s}=K(),c=w.useMemo(()=>Ee(e,t,s,i,r,`data`),[e,t,s,i,r]),l=w.useMemo(()=>Ee(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=E(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=w.useMemo(()=>L(l,i),[l,i]),f=$e(l);return w.createElement(w.Fragment,null,u.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function nt(){let{isSpaMode:e,routeModules:t}=J(),{errors:n,matches:r,loaderData:i}=K(),a=g(),o=X(r,n,e),s=null;n&&(s=n[o[o.length-1].route.id]);let c=[],l=null,u=[];for(let e=0;e<o.length;e++){let n=o[e],r=n.route.id,d=i[r],f=n.params,p=t[r],m=[],h={id:r,loaderData:d,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:s};if(u[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({loaderData:d,params:f,location:a,matches:u,error:s}):Array.isArray(p.meta)?[...p.meta]:p.meta:l&&(m=[...l]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
5
6To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);h.meta=m,u[e]=h,c=[...m],l=c}return w.createElement(w.Fragment,null,c.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!rt(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return w.createElement(r,{key:JSON.stringify(n),...n})}if(`title`in e)return w.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?w.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return w.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:b(t)}})}catch{return null}return w.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function rt(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var Q=!1;function it(){Q=!0}function at(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:o,nonce:s}=J(),{router:c,static:l,staticContext:u}=Ye(),{matches:d}=K(),f=_(),p=W(a,o);e.nonce==null&&s&&(e={...e,nonce:s}),i&&(i.didRenderScripts=!0);let m=X(d,null,r);w.useEffect(()=>{it()},[]);let g=w.useMemo(()=>{if(f)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,i=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${p?``:`import ${JSON.stringify(t.url)}`};
7${m.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];y(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(`
8`),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(`
9`)}).join(`
10`)}
11  ${p?`window.__reactRouterManifest = ${JSON.stringify(He(t,c),null,2)};`:``}
12  window.__reactRouterRouteModules = {${m.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
13
14import(${JSON.stringify(t.entry.module)});`:` `;return w.createElement(w.Fragment,null,w.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),w.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),ee=Q||f?[]:[...new Set(t.entry.imports.concat(L(m,t,{includeHydrateFallback:!0})))],v=typeof t.sri==`object`?t.sri:{};return h(!f,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),Q||f?null:w.createElement(w.Fragment,null,typeof t.sri==`object`?w.createElement(`script`,{...e,"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,p?null:w.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),w.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),ee.map(t=>w.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:v[t],nonce:e.nonce,suppressHydrationWarning:!0})),g)}function ot(...e){return t=>
14{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var st=class extends w.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location===e.location?{error:e.error||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?w.createElement(ct,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function ct({error:e,isOutsideRemixApp:t}){let{nonce:n}=J();console.error(e);let r=w.createElement(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:`
15        console.log(
16          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
17        );
18      `}});if(v(e))return w.createElement($,{title:`Unhandled Thrown Response!`},w.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),null);let i;if(e instanceof Error)i=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);i=Error(t)}return w.createElement($,{title:`Application Error!`,isOutsideRemixApp:t},w.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),w.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},i.stack),r)}function $({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=J();return i.root?.Layout&&!n?r:w.createElement(`html`,{lang:`en`},w.createElement(`head`,null,w.createElement(`meta`,{charSet:`utf-8`}),w.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),w.createElement(`title`,null,e)),w.createElement(`body`,null,w.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?w.createElement(at,null):null)))}export{b as _,Qe as a,Xe as c,V as d,Pe as f,de as g,D as h,nt as i,Ue as l,j as m,q as n,at as o,ze as p,Ze as r,ot as s,st as t,We as u};
19//# debugId=ec349dd7-600c-53ac-bd63-999e72ef3098

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.