UNPKG

@uiw/react-native-doc

Version:
2 lines 216 kB
/*! For license information please see main.8e2bd913.js.LICENSE.txt */ (()=>{"use strict";var e={17732:(e,t,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var a;n.d(t,{Ep:()=>d,J0:()=>i,LX:()=>L,OF:()=>A,RQ:()=>O,WK:()=>B,X3:()=>I,Zn:()=>T,Zq:()=>D,aU:()=>a,cP:()=>f,fp:()=>g,p7:()=>ee,pC:()=>M,q_:()=>l}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(a||(a={}));const o="popstate";function l(e){return void 0===e&&(e={}),p((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),c("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:d(t))}),(function(e,t){u("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function i(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function u(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function s(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,n,a){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n,l){void 0===l&&(l={});let{window:u=document.defaultView,v5Compat:f=!1}=l,p=u.history,h=a.Pop,m=null,v=g();function g(){return(p.state||{idx:null}).idx}function y(){h=a.Pop;let e=g(),t=null==e?null:e-v;v=e,m&&m({action:h,location:w.location,delta:t})}function b(e){let t="null"!==u.location.origin?u.location.origin:u.location.href,n="string"===typeof e?e:d(e);return i(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==v&&(v=0,p.replaceState(r({},p.state,{idx:v}),""));let w={get action(){return h},get location(){return e(u,p)},listen(e){if(m)throw new Error("A history only accepts one active listener");return u.addEventListener(o,y),m=e,()=>{u.removeEventListener(o,y),m=null}},createHref:e=>t(u,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h=a.Push;let r=c(w.location,e,t);n&&n(r,e),v=g()+1;let o=s(r,v),l=w.createHref(r);try{p.pushState(o,"",l)}catch(i){if(i instanceof DOMException&&"DataCloneError"===i.name)throw i;u.location.assign(l)}f&&m&&m({action:h,location:w.location,delta:1})},replace:function(e,t){h=a.Replace;let r=c(w.location,e,t);n&&n(r,e),v=g();let o=s(r,v),l=w.createHref(r);p.replaceState(o,"",l),f&&m&&m({action:h,location:w.location,delta:0})},go:e=>p.go(e)};return w}var h;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(h||(h={}));const m=new Set(["lazy","caseSensitive","path","id","index","children"]);function v(e,t,n,a){return void 0===n&&(n=[]),void 0===a&&(a={}),e.map(((e,o)=>{let l=[...n,o],u="string"===typeof e.id?e.id:l.join("-");if(i(!0!==e.index||!e.children,"Cannot specify children on an index route"),i(!a[u],'Found a route id collision on id "'+u+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=r({},e,t(e),{id:u});return a[u]=n,n}{let n=r({},e,t(e),{id:u,children:void 0});return a[u]=n,e.children&&(n.children=v(e.children,t,l,a)),n}}))}function g(e,t,n){void 0===n&&(n="/");let r=T(("string"===typeof t?f(t):t).pathname||"/",n);if(null==r)return null;let a=y(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let o=null;for(let l=0;null==o&&l<a.length;++l)o=z(a[l],R(r));return o}function y(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let a=(e,a,o)=>{let l={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};l.relativePath.startsWith("/")&&(i(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(r.length));let u=O([r,l.relativePath]),s=n.concat(l);e.children&&e.children.length>0&&(i(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),y(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:_(u,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of b(e.path))a(e,t,r);else a(e,t)})),t}function b(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let l=b(r.join("/")),i=[];return i.push(...l.map((e=>""===e?o:[o,e].join("/")))),a&&i.push(...l),i.map((t=>e.startsWith("/")&&""===t?"/":t))}const w=/^:\w+$/,k=3,S=2,x=1,E=10,C=-2,P=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(P)&&(r+=C),t&&(r+=S),n.filter((e=>!P(e))).reduce(((e,t)=>e+(w.test(t)?k:""===t?x:E)),r)}function z(e,t){let{routesMeta:n}=e,r={},a="/",o=[];for(let l=0;l<n.length;++l){let e=n[l],i=l===n.length-1,u="/"===a?t:t.slice(a.length)||"/",s=L({path:e.relativePath,caseSensitive:e.caseSensitive,end:i},u);if(!s)return null;Object.assign(r,s.params);let c=e.route;o.push({params:r,pathname:O([a,s.pathname]),pathnameBase:F(O([a,s.pathnameBase])),route:c}),"/"!==s.pathnameBase&&(a=O([a,s.pathnameBase]))}return o}function L(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);u("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));e.endsWith("*")?(r.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),i=a.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=i[n]||"";l=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return u(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(i[n]||"",t),e}),{}),pathname:o,pathnameBase:l,pattern:e}}function R(e){try{return decodeURI(e)}catch(t){return u(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function T(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function N(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function D(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function M(e,t,n,a){let o;void 0===a&&(a=!1),"string"===typeof e?o=f(e):(o=r({},e),i(!o.pathname||!o.pathname.includes("?"),N("?","pathname","search",o)),i(!o.pathname||!o.pathname.includes("#"),N("#","pathname","hash",o)),i(!o.search||!o.search.includes("#"),N("#","search","hash",o)));let l,u=""===e||""===o.pathname,s=u?"/":o.pathname;if(a||null==s)l=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}l=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?f(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:U(r),hash:j(a)}}(o,l),d=s&&"/"!==s&&s.endsWith("/"),p=(u||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!p||(c.pathname+="/"),c}const O=e=>e.join("/").replace(/\/\/+/g,"/"),F=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),U=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class I extends Error{}class A{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function B(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const $=["post","put","patch","delete"],W=new Set($),V=["get",...$],H=new Set(V),Q=new Set([301,302,303,307,308]),q=new Set([307,308]),K={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},J={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Y={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},X=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),G="remix-router-transitions";function ee(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,n="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,o=!n;let l;if(i(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;l=e=>({hasErrorBoundary:t(e)})}else l=Z;let s,d={},f=v(e.routes,l,void 0,d),p=e.basename||"/",m=r({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),y=null,b=new Set,w=null,k=null,S=null,x=null!=e.hydrationData,E=g(f,e.history.location,p),C=null;if(null==E){let t=ge(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ve(f);E=n,C={[r.id]:t}}let P,_,z=!E.some((e=>e.route.lazy))&&(!E.some((e=>e.route.loader))||null!=e.hydrationData),L={historyAction:e.history.action,location:e.history.location,matches:E,initialized:z,navigation:K,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},R=a.Pop,N=!1,D=!1,M=new Map,O=null,F=!1,U=!1,j=[],I=[],A=new Map,B=0,$=-1,W=new Map,V=new Set,H=new Map,Q=new Map,ee=new Map,re=!1;function oe(e,t){L=r({},L,e),b.forEach((e=>e(L,{unstable_viewTransitionOpts:t})))}function le(t,n){var o,l;let i,u=null!=L.actionData&&null!=L.navigation.formMethod&&Ce(L.navigation.formMethod)&&"loading"===L.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);i=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:u?L.actionData:null;let c=n.loaderData?he(L.loaderData,n.loaderData,n.matches||[],n.errors):L.loaderData,d=L.blockers;d.size>0&&(d=new Map(d),d.forEach(((e,t)=>d.set(t,Y))));let p,h=!0===N||null!=L.navigation.formMethod&&Ce(L.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(f=s,s=void 0),F||R===a.Pop||(R===a.Push?e.history.push(t,t.state):R===a.Replace&&e.history.replace(t,t.state)),R===a.Pop){let e=M.get(L.location.pathname);e&&e.has(t.pathname)?p={currentLocation:L.location,nextLocation:t}:M.has(t.pathname)&&(p={currentLocation:t,nextLocation:L.location})}else if(D){let e=M.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),M.set(L.location.pathname,e)),p={currentLocation:L.location,nextLocation:t}}oe(r({},n,{actionData:i,loaderData:c,historyAction:R,location:t,initialized:!0,navigation:K,revalidation:"idle",restoreScrollPosition:$e(t,n.matches||L.matches),preventScrollReset:h,blockers:d}),p),R=a.Pop,N=!1,D=!1,F=!1,U=!1,j=[],I=[]}async function ie(t,n,o){_&&_.abort(),_=null,R=t,F=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(w&&S){let n=Be(e,t);w[n]=S()}}(L.location,L.matches),N=!0===(o&&o.preventScrollReset),D=!0===(o&&o.enableViewTransition);let i=s||f,u=o&&o.overrideNavigation,c=g(i,n,p);if(!c){let e=ge(404,{pathname:n.pathname}),{matches:t,route:r}=ve(i);return Ae(),void le(n,{matches:t,loaderData:{},errors:{[r.id]:e}})}if(L.initialized&&!U&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(L.location,n)&&!(o&&o.submission&&Ce(o.submission.formMethod)))return void le(n,{matches:c});_=new AbortController;let m,v,y=se(e.history,n,_.signal,o&&o.submission);if(o&&o.pendingError)v={[me(c).route.id]:o.pendingError};else if(o&&o.submission&&Ce(o.submission.formMethod)){let e=await async function(e,t,n,r,o){void 0===o&&(o={});be();let i,u=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(t,n);oe({navigation:u});let s=Le(r,t);if(s.route.action||s.route.lazy){if(i=await ue("action",e,s,r,d,l,p),e.signal.aborted)return{shortCircuited:!0}}else i={type:h.error,error:ge(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(Se(i)){let e;return e=o&&null!=o.replace?o.replace:i.location===L.location.pathname+L.location.search,await de(L,i,{submission:n,replace:e}),{shortCircuited:!0}}if(ke(i)){let e=me(r,s.route.id);return!0!==(o&&o.replace)&&(R=a.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:i.error}}}if(we(i))throw ge(400,{type:"defer-action"});return{pendingActionData:{[s.route.id]:i.data}}}(y,n,o.submission,c,{replace:o.replace});if(e.shortCircuited)return;m=e.pendingActionData,v=e.pendingActionError,u=Te(n,o.submission),y=new Request(y.url,{signal:y.signal})}let{shortCircuited:b,loaderData:k,errors:x}=await async function(t,n,a,o,l,i,u,c,d){let h=o||Te(n,l),m=l||i||Re(h),v=s||f,[g,y]=ae(e.history,L,a,m,n,U,j,I,H,V,v,p,c,d);if(Ae((e=>!(a&&a.some((t=>t.route.id===e)))||g&&g.some((t=>t.route.id===e)))),$=++B,0===g.length&&0===y.length){let e=Oe();return le(n,r({matches:a,loaderData:{},errors:d||null},c?{actionData:c}:{},e?{fetchers:new Map(L.fetchers)}:{})),{shortCircuited:!0}}if(!F){y.forEach((e=>{let t=L.fetchers.get(e.key),n=Ne(void 0,t?t.data:void 0);L.fetchers.set(e.key,n)}));let e=c||L.actionData;oe(r({navigation:h},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},y.length>0?{fetchers:new Map(L.fetchers)}:{}))}y.forEach((e=>{A.has(e.key)&&ze(e.key),e.controller&&A.set(e.key,e.controller)}));let b=()=>y.forEach((e=>ze(e.key)));_&&_.signal.addEventListener("abort",b);let{results:w,loaderResults:k,fetcherResults:S}=await fe(L.matches,a,g,y,t);if(t.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",b);y.forEach((e=>A.delete(e.key)));let x=ye(w);if(x){if(x.idx>=g.length){let e=y[x.idx-g.length].key;V.add(e)}return await de(L,x.result,{replace:u}),{shortCircuited:!0}}let{loaderData:E,errors:C}=pe(L,a,g,k,d,y,S,Q);Q.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&Q.delete(t)}))}));let P=Oe(),z=Fe($),R=P||z||y.length>0;return r({loaderData:E,errors:C},R?{fetchers:new Map(L.fetchers)}:{})}(y,n,c,u,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,m,v);b||(_=null,le(n,r({matches:c},m?{actionData:m}:{},{loaderData:k,errors:x})))}function ce(e){return L.fetchers.get(e)||J}async function de(o,l,u){let{submission:s,fetcherSubmission:d,replace:f}=void 0===u?{}:u;l.revalidate&&(U=!0);let h=c(o.location,l.location,{_isRedirect:!0});if(i(h,"Expected a location on the redirect navigation"),n){let n=!1;if(l.reloadDocument)n=!0;else if(X.test(l.location)){const r=e.history.createURL(l.location);n=r.origin!==t.location.origin||null==T(r.pathname,p)}if(n)return void(f?t.location.replace(l.location):t.location.assign(l.location))}_=null;let m=!0===f?a.Replace:a.Push,{formMethod:v,formAction:g,formEncType:y}=o.navigation;!s&&!d&&v&&g&&y&&(s=Re(o.navigation));let b=s||d;if(q.has(l.status)&&b&&Ce(b.formMethod))await ie(m,h,{submission:r({},b,{formAction:l.location}),preventScrollReset:N});else{let e=Te(h,s);await ie(m,h,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:N})}}async function fe(t,n,r,a,o){let i=await Promise.all([...r.map((e=>ue("loader",o,e,n,d,l,p))),...a.map((t=>{if(t.matches&&t.match&&t.controller)return ue("loader",se(e.history,t.path,t.controller.signal),t.match,t.matches,d,l,p);return{type:h.error,error:ge(404,{pathname:t.path})}}))]),u=i.slice(0,r.length),s=i.slice(r.length);return await Promise.all([Pe(t,r,u,u.map((()=>o.signal)),!1,L.loaderData),Pe(t,a.map((e=>e.match)),s,a.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:i,loaderResults:u,fetcherResults:s}}function be(){U=!0,j.push(...Ae()),H.forEach(((e,t)=>{A.has(t)&&(I.push(t),ze(t))}))}function xe(e,t,n){let r=me(L.matches,t);Ee(e),oe({errors:{[r.route.id]:n},fetchers:new Map(L.fetchers)})}function Ee(e){let t=L.fetchers.get(e);!A.has(e)||t&&"loading"===t.state&&W.has(e)||ze(e),H.delete(e),W.delete(e),V.delete(e),L.fetchers.delete(e)}function ze(e){let t=A.get(e);i(t,"Expected fetch controller: "+e),t.abort(),A.delete(e)}function Me(e){for(let t of e){let e=De(ce(t).data);L.fetchers.set(t,e)}}function Oe(){let e=[],t=!1;for(let n of V){let r=L.fetchers.get(n);i(r,"Expected fetcher: "+n),"loading"===r.state&&(V.delete(n),e.push(n),t=!0)}return Me(e),t}function Fe(e){let t=[];for(let[n,r]of W)if(r<e){let e=L.fetchers.get(n);i(e,"Expected fetcher: "+n),"loading"===e.state&&(ze(n),W.delete(n),t.push(n))}return Me(t),t.length>0}function Ue(e){L.blockers.delete(e),ee.delete(e)}function je(e,t){let n=L.blockers.get(e)||Y;i("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(L.blockers);r.set(e,t),oe({blockers:r})}function Ie(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===ee.size)return;ee.size>1&&u(!1,"A router only supports one blocker at a time");let a=Array.from(ee.entries()),[o,l]=a[a.length-1],i=L.blockers.get(o);return i&&"proceeding"===i.state?void 0:l({currentLocation:t,nextLocation:n,historyAction:r})?o:void 0}function Ae(e){let t=[];return Q.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),Q.delete(r))})),t}function Be(e,t){if(k){return k(e,t.map((e=>function(e,t){let{route:n,pathname:r,params:a}=e;return{id:n.id,pathname:r,params:a,data:t[n.id],handle:n.handle}}(e,L.loaderData))))||e.key}return e.key}function $e(e,t){if(w){let n=Be(e,t),r=w[n];if("number"===typeof r)return r}return null}return P={get basename(){return p},get state(){return L},get routes(){return f},get window(){return t},initialize:function(){if(y=e.history.listen((t=>{let{action:n,location:r,delta:a}=t;if(re)return void(re=!1);u(0===ee.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Ie({currentLocation:L.location,nextLocation:r,historyAction:n});return o&&null!=a?(re=!0,e.history.go(-1*a),void je(o,{state:"blocked",location:r,proceed(){je(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(a)},reset(){let e=new Map(L.blockers);e.set(o,Y),oe({blockers:e})}})):ie(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(G);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(n){}}(t,M);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(G,JSON.stringify(r))}catch(n){u(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}(t,M);t.addEventListener("pagehide",e),O=()=>t.removeEventListener("pagehide",e)}return L.initialized||ie(a.Pop,L.location),P},subscribe:function(e){return b.add(e),()=>b.delete(e)},enableScrollRestoration:function(e,t,n){if(w=e,S=t,k=n||null,!x&&L.navigation===K){x=!0;let e=$e(L.location,L.matches);null!=e&&oe({restoreScrollPosition:e})}return()=>{w=null,S=null,k=null}},navigate:async function t(n,o){if("number"===typeof n)return void e.history.go(n);let l=te(L.location,L.matches,p,m.v7_prependBasename,n,null==o?void 0:o.fromRouteId,null==o?void 0:o.relative),{path:i,submission:u,error:s}=ne(m.v7_normalizeFormMethod,!1,l,o),d=L.location,f=c(L.location,i,o&&o.state);f=r({},f,e.history.encodeLocation(f));let h=o&&null!=o.replace?o.replace:void 0,v=a.Push;!0===h?v=a.Replace:!1===h||null!=u&&Ce(u.formMethod)&&u.formAction===L.location.pathname+L.location.search&&(v=a.Replace);let g=o&&"preventScrollReset"in o?!0===o.preventScrollReset:void 0,y=Ie({currentLocation:d,nextLocation:f,historyAction:v});if(!y)return await ie(v,f,{submission:u,pendingError:s,preventScrollReset:g,replace:o&&o.replace,enableViewTransition:o&&o.unstable_viewTransition});je(y,{state:"blocked",location:f,proceed(){je(y,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),t(n,o)},reset(){let e=new Map(L.blockers);e.set(y,Y),oe({blockers:e})}})},fetch:function(t,n,a,u){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");A.has(t)&&ze(t);let c=s||f,h=te(L.location,L.matches,p,m.v7_prependBasename,a,n,null==u?void 0:u.relative),v=g(c,h,p);if(!v)return void xe(t,n,ge(404,{pathname:h}));let{path:y,submission:b,error:w}=ne(m.v7_normalizeFormMethod,!0,h,u);if(w)return void xe(t,n,w);let k=Le(v,y);N=!0===(u&&u.preventScrollReset),b&&Ce(b.formMethod)?async function(t,n,a,o,u,c){if(be(),H.delete(t),!o.route.action&&!o.route.lazy){let e=ge(405,{method:c.formMethod,pathname:a,routeId:n});return void xe(t,n,e)}let h=L.fetchers.get(t),m=function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(c,h);L.fetchers.set(t,m),oe({fetchers:new Map(L.fetchers)});let v=new AbortController,y=se(e.history,a,v.signal,c);A.set(t,v);let b=B,w=await ue("action",y,o,u,d,l,p);if(y.signal.aborted)return void(A.get(t)===v&&A.delete(t));if(Se(w)){if(A.delete(t),$>b){let e=De(void 0);return L.fetchers.set(t,e),void oe({fetchers:new Map(L.fetchers)})}{V.add(t);let e=Ne(c);return L.fetchers.set(t,e),oe({fetchers:new Map(L.fetchers)}),de(L,w,{fetcherSubmission:c})}}if(ke(w))return void xe(t,n,w.error);if(we(w))throw ge(400,{type:"defer-action"});let k=L.navigation.location||L.location,S=se(e.history,k,v.signal),x=s||f,E="idle"!==L.navigation.state?g(x,L.navigation.location,p):L.matches;i(E,"Didn't find any matches after fetcher action");let C=++B;W.set(t,C);let P=Ne(c,w.data);L.fetchers.set(t,P);let[z,T]=ae(e.history,L,E,c,k,U,j,I,H,V,x,p,{[o.route.id]:w.data},void 0);T.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=L.fetchers.get(t),r=Ne(void 0,n?n.data:void 0);L.fetchers.set(t,r),A.has(t)&&ze(t),e.controller&&A.set(t,e.controller)})),oe({fetchers:new Map(L.fetchers)});let N=()=>T.forEach((e=>ze(e.key)));v.signal.addEventListener("abort",N);let{results:D,loaderResults:M,fetcherResults:O}=await fe(L.matches,E,z,T,S);if(v.signal.aborted)return;v.signal.removeEventListener("abort",N),W.delete(t),A.delete(t),T.forEach((e=>A.delete(e.key)));let F=ye(D);if(F){if(F.idx>=z.length){let e=T[F.idx-z.length].key;V.add(e)}return de(L,F.result)}let{loaderData:q,errors:K}=pe(L,L.matches,z,M,void 0,T,O,Q);if(L.fetchers.has(t)){let e=De(w.data);L.fetchers.set(t,e)}let J=Fe(C);"loading"===L.navigation.state&&C>$?(i(R,"Expected pending action"),_&&_.abort(),le(L.navigation.location,{matches:E,loaderData:q,errors:K,fetchers:new Map(L.fetchers)})):(oe(r({errors:K,loaderData:he(L.loaderData,q,E,K)},J||T.length>0?{fetchers:new Map(L.fetchers)}:{})),U=!1)}(t,n,y,k,v,b):(H.set(t,{routeId:n,path:y}),async function(t,n,r,a,o,u){let s=L.fetchers.get(t),c=Ne(u,s?s.data:void 0);L.fetchers.set(t,c),oe({fetchers:new Map(L.fetchers)});let f=new AbortController,h=se(e.history,r,f.signal);A.set(t,f);let m=B,v=await ue("loader",h,a,o,d,l,p);we(v)&&(v=await _e(v,h.signal,!0)||v);A.get(t)===f&&A.delete(t);if(h.signal.aborted)return;if(Se(v)){if($>m){let e=De(void 0);return L.fetchers.set(t,e),void oe({fetchers:new Map(L.fetchers)})}return V.add(t),void await de(L,v)}if(ke(v)){let e=me(L.matches,n);return L.fetchers.delete(t),void oe({fetchers:new Map(L.fetchers),errors:{[e.route.id]:v.error}})}i(!we(v),"Unhandled fetcher deferred data");let g=De(v.data);L.fetchers.set(t,g),oe({fetchers:new Map(L.fetchers)})}(t,n,y,k,v,b))},revalidate:function(){be(),oe({revalidation:"loading"}),"submitting"!==L.navigation.state&&("idle"!==L.navigation.state?ie(R||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation}):ie(L.historyAction,L.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ce,deleteFetcher:Ee,dispose:function(){y&&y(),O&&O(),b.clear(),_&&_.abort(),L.fetchers.forEach(((e,t)=>Ee(t))),L.blockers.forEach(((e,t)=>Ue(t)))},getBlocker:function(e,t){let n=L.blockers.get(e)||Y;return ee.get(e)!==t&&ee.set(e,t),n},deleteBlocker:Ue,_internalFetchControllers:A,_internalActiveDeferreds:Q,_internalSetRoutes:function(e){d={},s=v(e,l,void 0,d)}},P}Symbol("deferred");function te(e,t,n,r,a,o,l){let i,u;if(null!=o&&"path"!==l){i=[];for(let e of t)if(i.push(e),e.route.id===o){u=e;break}}else i=t,u=t[t.length-1];let s=M(a||".",D(i).map((e=>e.pathnameBase)),T(e.pathname,n)||e.pathname,"path"===l);return null==a&&(s.search=e.search,s.hash=e.hash),null!=a&&""!==a&&"."!==a||!u||!u.route.index||ze(s.search)||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(s.pathname="/"===s.pathname?n:O([n,s.pathname])),d(s)}function ne(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ee(r.formMethod))return{path:n,error:ge(405,{method:r.formMethod})};let a,o,l=()=>({path:n,error:ge(400,{type:"invalid-body"})}),u=r.formMethod||"get",s=e?u.toUpperCase():u.toLowerCase(),c=be(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Ce(s))return l();let e="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Ce(s))return l();try{let e="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(m){return l()}}}if(i("function"===typeof FormData,"FormData is not available in this environment"),r.formData)a=ce(r.formData),o=r.formData;else if(r.body instanceof FormData)a=ce(r.body),o=r.body;else if(r.body instanceof URLSearchParams)a=r.body,o=de(a);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=de(a)}catch(m){return l()}let p={formMethod:s,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Ce(p.formMethod))return{path:n,submission:p};let h=f(n);return t&&h.search&&ze(h.search)&&a.append("index",""),h.search="?"+a,{path:d(h),submission:p}}function re(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}function ae(e,t,n,a,o,l,i,u,s,c,d,f,p,h){let m=h?Object.values(h)[0]:p?Object.values(p)[0]:void 0,v=e.createURL(t.location),y=e.createURL(o),b=h?Object.keys(h)[0]:void 0,w=re(n,b).filter(((e,n)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){let r=!t||n.route.id!==t.route.id,a=void 0===e[n.route.id];return r||a}(t.loaderData,t.matches[n],e)||i.some((t=>t===e.route.id)))return!0;let o=t.matches[n],u=e;return le(e,r({currentUrl:v,currentParams:o.params,nextUrl:y,nextParams:u.params},a,{actionResult:m,defaultShouldRevalidate:l||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||oe(o,u)}))})),k=[];return s.forEach(((e,o)=>{if(!n.some((t=>t.route.id===e.routeId)))return;let i=g(d,e.path,f);if(!i)return void k.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let s=t.fetchers.get(o),p=Le(i,e.path),h=!1;h=!c.has(o)&&(!!u.includes(o)||(s&&"idle"!==s.state&&void 0===s.data?l:le(p,r({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},a,{actionResult:m,defaultShouldRevalidate:l})))),h&&k.push({key:o,routeId:e.routeId,path:e.path,matches:i,match:p,controller:new AbortController})})),[w,k]}function oe(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function le(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}async function ie(e,t,n){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let o=n[e.id];i(o,"No route found in manifest");let l={};for(let r in a){let e=void 0!==o[r]&&"hasErrorBoundary"!==r;u(!e,'Route "'+o.id+'" has a static property "'+r+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+r+'" will be ignored.'),e||m.has(r)||(l[r]=a[r])}Object.assign(o,l),Object.assign(o,r({},t(o),{lazy:void 0}))}async function ue(e,t,n,r,a,o,l,u){let s,c,d;void 0===u&&(u={});let f=e=>{let r,a=new Promise(((e,t)=>r=t));return d=()=>r(),t.signal.addEventListener("abort",d),Promise.race([e({request:t,params:n.params,context:u.requestContext}),a])};try{let r=n.route[e];if(n.route.lazy)if(r){let e,t=await Promise.all([f(r).catch((t=>{e=t})),ie(n.route,o,a)]);if(e)throw e;c=t[0]}else{if(await ie(n.route,o,a),r=n.route[e],!r){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw ge(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:h.data,data:void 0}}c=await f(r)}else{if(!r){let e=new URL(t.url);throw ge(404,{pathname:e.pathname+e.search})}c=await f(r)}i(void 0!==c,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(v){s=h.error,c=v}finally{d&&t.signal.removeEventListener("abort",d)}if(xe(c)){let e,a=c.status;if(Q.has(a)){let e=c.headers.get("Location");if(i(e,"Redirects returned/thrown from loaders/actions must have a Location header"),X.test(e)){if(!u.isStaticRequest){let n=new URL(t.url),r=e.startsWith("//")?new URL(n.protocol+e):new URL(e),a=null!=T(r.pathname,l);r.origin===n.origin&&a&&(e=r.pathname+r.search+r.hash)}}else e=te(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,e);if(u.isStaticRequest)throw c.headers.set("Location",e),c;return{type:h.redirect,status:a,location:e,revalidate:null!==c.headers.get("X-Remix-Revalidate"),reloadDocument:null!==c.headers.get("X-Remix-Reload-Document")}}if(u.isRouteRequest){throw{type:s===h.error?h.error:h.data,response:c}}let o=c.headers.get("Content-Type");return e=o&&/\bapplication\/json\b/.test(o)?await c.json():await c.text(),s===h.error?{type:s,error:new A(a,c.statusText,e),headers:c.headers}:{type:h.data,data:e,statusCode:c.status,headers:c.headers}}return s===h.error?{type:s,error:c}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(c)?{type:h.deferred,deferredData:c,statusCode:null==(p=c.init)?void 0:p.status,headers:(null==(m=c.init)?void 0:m.headers)&&new Headers(c.init.headers)}:{type:h.data,data:c};var p,m}function se(e,t,n,r){let a=e.createURL(be(t)).toString(),o={signal:n};if(r&&Ce(r.formMethod)){let{formMethod:e,formEncType:t}=r;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(r.json)):"text/plain"===t?o.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?o.body=ce(r.formData):o.body=r.formData}return new Request(a,o)}function ce(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"===typeof r?r:r.name);return t}function de(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function fe(e,t,n,r,a){let o,l={},u=null,s=!1,c={};return n.forEach(((n,d)=>{let f=t[d].route.id;if(i(!Se(n),"Cannot handle redirect results in processLoaderData"),ke(n)){let t=me(e,f),a=n.error;r&&(a=Object.values(r)[0],r=void 0),u=u||{},null==u[t.route.id]&&(u[t.route.id]=a),l[f]=void 0,s||(s=!0,o=B(n.error)?n.error.status:500),n.headers&&(c[f]=n.headers)}else we(n)?(a.set(f,n.deferredData),l[f]=n.deferredData.data):l[f]=n.data,null==n.statusCode||200===n.statusCode||s||(o=n.statusCode),n.headers&&(c[f]=n.headers)})),r&&(u=r,l[Object.keys(r)[0]]=void 0),{loaderData:l,errors:u,statusCode:o||200,loaderHeaders:c}}function pe(e,t,n,a,o,l,u,s){let{loaderData:c,errors:d}=fe(t,n,a,o,s);for(let f=0;f<l.length;f++){let{key:t,match:n,controller:a}=l[f];i(void 0!==u&&void 0!==u[f],"Did not find corresponding fetcher result");let o=u[f];if(!a||!a.signal.aborted)if(ke(o)){let a=me(e.matches,null==n?void 0:n.route.id);d&&d[a.route.id]||(d=r({},d,{[a.route.id]:o.error})),e.fetchers.delete(t)}else if(Se(o))i(!1,"Unhandled fetcher revalidation redirect");else if(we(o))i(!1,"Unhandled fetcher deferred data");else{let n=De(o.data);e.fetchers.set(t,n)}}return{loaderData:c,errors:d}}function he(e,t,n,a){let o=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(o[n]=t[n]):void 0!==e[n]&&r.route.loader&&(o[n]=e[n]),a&&a.hasOwnProperty(n))break}return o}function me(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function ve(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ge(e,t){let{pathname:n,routeId:r,method:a,type:o}=void 0===t?{}:t,l="Unknown Server Error",i="Unknown @remix-run/router error";return 400===e?(l="Bad Request",a&&n&&r?i="You made a "+a+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===o?i="defer() is not supported in actions":"invalid-body"===o&&(i="Unable to encode submission body")):403===e?(l="Forbidden",i='Route "'+r+'" does not match URL "'+n+'"'):404===e?(l="Not Found",i='No route matches URL "'+n+'"'):405===e&&(l="Method Not Allowed",a&&n&&r?i="You made a "+a.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':a&&(i='Invalid request method "'+a.toUpperCase()+'"')),new A(e||500,l,new Error(i),!0)}function ye(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Se(n))return{result:n,idx:t}}}function be(e){return d(r({},"string"===typeof e?f(e):e,{hash:""}))}function we(e){return e.type===h.deferred}function ke(e){return e.type===h.error}function Se(e){return(e&&e.type)===h.redirect}function xe(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function Ee(e){return H.has(e.toLowerCase())}function Ce(e){return W.has(e.toLowerCase())}async function Pe(e,t,n,r,a,o){for(let l=0;l<n.length;l++){let u=n[l],s=t[l];if(!s)continue;let c=e.find((e=>e.route.id===s.route.id)),d=null!=c&&!oe(c,s)&&void 0!==(o&&o[s.route.id]);if(we(u)&&(a||d)){let e=r[l];i(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await _e(u,e,a).then((e=>{e&&(n[l]=e||n[l])}))}}}async function _e(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:h.data,data:e.deferredData.unwrappedData}}catch(r){return{type:h.error,error:r}}return{type:h.data,data:e.deferredData.data}}}function ze(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Le(e,t){let n="string"===typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&ze(n||""))return e[e.length-1];let r=D(e);return r[r.length-1]}function Re(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:o,json:l}=e;if(t&&n&&r)return null!=a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0}:void 0!==l?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}:void 0}function Te(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ne(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function De(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},44978:(e,t,n)=>{var r=n(94599),a=n(79170);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,i={};function u(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(i[e]=t,e=0;e<t.length;e++)l.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function m(e,t,n,r,a,o,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var a=v.hasOwnProperty(t)?v[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!d.call(h,e)||!d.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),S=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),_=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function O(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var F,U=Object.assign;function j(e){if(void 0===F)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var I=!1;function A(e,t){if(!e||I)return"";I=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var a=s.stack.split("\n"),o=r.stack.split("\n"),l=a.length-1,i=o.length-1;1<=l&&0<=i&&a[l]!==o[i];)i--;for(;1<=l&&0<=i;l--,i--)if(a[l]!==o[i]){if(1!==l||1!==i)do{if(l--,0>--i||a[l]!==o[i]){var u="\n"+a[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=l&&0<=i);break}}}finally{I=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function B(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=A(e.type,!1);case 11:return e=A(e.type.render,!1);case 1:return e=A(e.type,!0);default:return""}}function $(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case C:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case z:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:$(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return $(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=H(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Z(e,t){X(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function G(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var