UNPKG

next

Version:

The React Framework

74 lines (73 loc) • 26.3 kB
/** * @license React * react-server-dom-webpack-server.node.unbundled.production.min.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react"),da=require("react-dom"),l=null,m=0,p=!0;function r(a,b){a=a.write(b);p=p&&a} function t(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(r(a,l.subarray(0,m)),l=new Uint8Array(2048),m=0),r(a,ea.encode(b));else{var d=l;0<m&&(d=l.subarray(m));d=ea.encodeInto(b,d);var c=d.read;m+=d.written;c<b.length&&(r(a,l.subarray(0,m)),l=new Uint8Array(2048),m=ea.encodeInto(b.slice(c),l).written);2048===m&&(r(a,l),l=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(r(a,l.subarray(0,m)),l=new Uint8Array(2048),m=0),r(a,b)):(d=l.length-m,d<b.byteLength&& (0===d?r(a,l):(l.set(b.subarray(0,d),m),m+=d,r(a,l),b=b.subarray(d)),l=new Uint8Array(2048),m=0),l.set(b,m),m+=b.byteLength,2048===m&&(r(a,l),l=new Uint8Array(2048),m=0)));return p}var ea=new aa.TextEncoder,v=Symbol.for("react.client.reference"),w=Symbol.for("react.server.reference");function x(a,b,d){return Object.defineProperties(a,{$$typeof:{value:v},$$id:{value:b},$$async:{value:d}})}var fa=Function.prototype.bind,ha=Array.prototype.slice; function ia(){var a=fa.apply(this,arguments);if(this.$$typeof===w){var b=ha.call(arguments,1);a.$$typeof=w;a.$$id=this.$$id;a.$$bound=this.$$bound?this.$$bound.concat(b):b}return a} var ja=Promise.prototype,ka={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "$$id":return a.$$id;case "$$async":return a.$$async;case "name":return a.name;case "displayName":return;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");}throw Error("Cannot access "+ (String(a.name)+"."+String(b))+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}},la={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "$$id":return a.$$id;case "$$async":return a.$$async;case "name":return a.name;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive]; case "__esModule":var d=a.$$id;a.default=x(function(){throw Error("Attempted to call the default export of "+d+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},a.$$id+"#",a.$$async);return!0;case "then":if(a.then)return a.then;if(a.$$async)return;var c=x({},a.$$id,!0),e=new Proxy(c,la);a.status="fulfilled";a.value=e;return a.then=x(function(f){return Promise.resolve(f(e))}, a.$$id+"#then",!1)}c=a[b];c||(c=x(function(){throw Error("Attempted to call "+String(b)+"() from the server but "+String(b)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");},a.$$id+"#"+b,a.$$async),Object.defineProperty(c,"name",{value:b}),c=a[b]=new Proxy(c,ka));return c},getPrototypeOf:function(){return ja},set:function(){throw Error("Cannot assign to a client module from a server module."); }},ra={prefetchDNS:ma,preconnect:na,preload:oa,preinit:qa};function ma(a,b){if("string"===typeof a){var d=y();if(d){var c=d.hints,e="D"+a;c.has(e)||(c.add(e),b?z(d,"D",[a,b]):z(d,"D",a),C(d))}}}function na(a,b){if("string"===typeof a){var d=y();if(d){var c=d.hints,e=null==b||"string"!==typeof b.crossOrigin?null:"use-credentials"===b.crossOrigin?"use-credentials":"";e="C"+(null===e?"null":e)+"|"+a;c.has(e)||(c.add(e),b?z(d,"C",[a,b]):z(d,"C",a),C(d))}}} function oa(a,b){if("string"===typeof a){var d=y();if(d){var c=d.hints,e="L"+a;c.has(e)||(c.add(e),z(d,"L",[a,b]),C(d))}}}function qa(a,b){if("string"===typeof a){var d=y();if(d){var c=d.hints,e="I"+a;c.has(e)||(c.add(e),z(d,"I",[a,b]),C(d))}}} var sa=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,ta=new ba.AsyncLocalStorage,D=Symbol.for("react.element"),ua=Symbol.for("react.fragment"),va=Symbol.for("react.provider"),wa=Symbol.for("react.server_context"),xa=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),za=Symbol.for("react.suspense_list"),Aa=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),Ba=Symbol.for("react.default_value"),Ca=Symbol.for("react.memo_cache_sentinel"),Da=Symbol.iterator,F=null; function G(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var d=b.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");G(a,d);b.context._currentValue=b.value}}}function Ea(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&Ea(a)} function Fa(a){var b=a.parent;null!==b&&Fa(b);a.context._currentValue=a.value}function Ga(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):Ga(a,b)} function Ha(a,b){var d=b.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?G(a,d):Ha(a,d);b.context._currentValue=b.value}function Ia(a){var b=F;b!==a&&(null===b?Fa(a):null===a?Ea(b):b.depth===a.depth?G(b,a):b.depth>a.depth?Ga(b,a):Ha(b,a),F=a)}function Ja(a,b){var d=a._currentValue;a._currentValue=b;var c=F;return F=a={parent:c,depth:null===c?0:c.depth+1,context:a,parentValue:d,value:b}}var Ka=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"); function La(){}function Ma(a,b,d){d=a[d];void 0===d?a.push(b):d!==b&&(b.then(La,La),b=d);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(c){if("pending"===b.status){var e=b;e.status="fulfilled";e.value=c}},function(c){if("pending"===b.status){var e=b;e.status="rejected";e.reason=c}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}H=b;throw Ka;}}var H=null; function Na(){if(null===H)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=H;H=null;return a}var I=null,J=0,K=null;function Oa(){var a=K;K=null;return a}function Pa(a){return a._currentValue} var Ta={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:L,useTransition:L,readContext:Pa,useContext:Pa,useReducer:L,useRef:L,useState:L,useInsertionEffect:L,useLayoutEffect:L,useImperativeHandle:L,useEffect:L,useId:Qa,useSyncExternalStore:L,useCacheRefresh:function(){return Ra},useMemoCache:function(a){for(var b=Array(a),d=0;d<a;d++)b[d]=Ca;return b},use:Sa}; function L(){throw Error("This Hook is not supported in Server Components.");}function Ra(){throw Error("Refreshing the cache is not supported in Server Components.");}function Qa(){if(null===I)throw Error("useId can only be used while React is rendering");var a=I.identifierCount++;return":"+I.identifierPrefix+"S"+a.toString(32)+":"} function Sa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=J;J+=1;null===K&&(K=[]);return Ma(K,a,b)}if(a.$$typeof===wa)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function Ua(){return(new AbortController).signal}function Va(){var a=y();return a?a.cache:new Map} var Wa={getCacheSignal:function(){var a=Va(),b=a.get(Ua);void 0===b&&(b=Ua(),a.set(Ua,b));return b},getCacheForType:function(a){var b=Va(),d=b.get(a);void 0===d&&(d=a(),b.set(a,d));return d}},Xa=Array.isArray;function Ya(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(b,d){return d})} function Za(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.slice(0,10)+"...");case "object":if(Xa(a))return"[...]";a=Ya(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} function M(a){if("string"===typeof a)return a;switch(a){case ya:return"Suspense";case za:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case xa:return M(a.render);case Aa:return M(a.type);case E:var b=a._payload;a=a._init;try{return M(a(b))}catch(d){}}return""} function N(a,b){var d=Ya(a);if("Object"!==d&&"Array"!==d)return d;d=-1;var c=0;if(Xa(a)){var e="[";for(var f=0;f<a.length;f++){0<f&&(e+=", ");var g=a[f];g="object"===typeof g&&null!==g?N(g):Za(g);""+f===b?(d=e.length,c=g.length,e+=g):e=10>g.length&&40>e.length+g.length?e+g:e+"..."}e+="]"}else if(a.$$typeof===D)e="<"+M(a.type)+"/>";else{e="{";f=Object.keys(a);for(g=0;g<f.length;g++){0<g&&(e+=", ");var k=f[g],h=JSON.stringify(k);e+=('"'+k+'"'===h?k:h)+": ";h=a[k];h="object"===typeof h&&null!==h?N(h): Za(h);k===b?(d=e.length,c=h.length,e+=h):e=10>h.length&&40>e.length+h.length?e+h:e+"..."}e+="}"}return void 0===b?e:-1<d&&0<c?(a=" ".repeat(d)+"^".repeat(c),"\n "+e+"\n "+a):"\n "+e}var $a=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ab=$a.ContextRegistry,O=JSON.stringify,bb=$a.ReactCurrentDispatcher,cb=$a.ReactCurrentCache;function db(a){console.error(a)} function eb(a,b,d,c,e){if(null!==cb.current&&cb.current!==Wa)throw Error("Currently React only supports one RSC renderer at a time.");sa.current=ra;cb.current=Wa;var f=new Set,g=[],k=new Set,h={status:0,flushScheduled:!1,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,hints:k,abortableTasks:f,pingedTasks:g,completedImportChunks:[],completedHintChunks:[],completedRegularChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map, writtenServerReferences:new Map,writtenProviders:new Map,identifierPrefix:e||"",identifierCount:1,onError:void 0===d?db:d,toJSON:function(q,u){return fb(h,this,q,u)}};h.pendingChunks++;b=gb(c);a=hb(h,a,b,f);g.push(a);return h}var P=null;function y(){if(P)return P;var a=ta.getStore();return a?a:null}var ib={}; function jb(a,b){a.pendingChunks++;var d=hb(a,null,F,a.abortableTasks);switch(b.status){case "fulfilled":return d.model=b.value,kb(a,d),d.id;case "rejected":var c=Q(a,b.reason);R(a,d.id,c);return d.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(e){"pending"===b.status&&(b.status="fulfilled",b.value=e)},function(e){"pending"===b.status&&(b.status="rejected",b.reason=e)}))}b.then(function(e){d.model=e;kb(a,d)},function(e){d.status=4;e=Q(a,e);R(a,d.id,e);null!==a.destination&& S(a,a.destination)});return d.id}function lb(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function mb(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:E,_payload:a,_init:lb}} function T(a,b,d,c,e,f){if(null!==c&&void 0!==c)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[D,b,d,e];J=0;K=f;e=b(e);return"object"===typeof e&&null!==e&&"function"===typeof e.then?"fulfilled"===e.status?e.value:mb(e):e}if("string"===typeof b)return[D,b,d,e];if("symbol"===typeof b)return b===ua?e.children:[D,b,d,e];if(null!=b&&"object"===typeof b){if(b.$$typeof===v)return[D,b,d,e];switch(b.$$typeof){case E:var g= b._init;b=g(b._payload);return T(a,b,d,c,e,f);case xa:return a=b.render,J=0,K=f,a(e,void 0);case Aa:return T(a,b.type,d,c,e,f);case va:return Ja(b._context,e.value),[D,b,d,{value:e.value,children:e.children,__pop:ib}]}}throw Error("Unsupported Server Component type: "+Za(b));}function kb(a,b){var d=a.pingedTasks;d.push(b);1===d.length&&(a.flushScheduled=null!==a.destination,setImmediate(function(){return nb(a)}))} function hb(a,b,d,c){var e={id:a.nextChunkId++,status:0,model:b,context:d,ping:function(){return kb(a,e)},thenableState:null};c.add(e);return e}function U(a){return"$"+a.toString(16)} function ob(a,b,d,c){var e=c.$$async?c.$$id+"#async":c.$$id,f=a.writtenClientReferences,g=f.get(e);if(void 0!==g)return b[0]===D&&"1"===d?"$L"+g.toString(16):U(g);try{var k=a.bundlerConfig,h=c.$$id;g="";var q=k[h];if(q)g=q.name;else{var u=h.lastIndexOf("#");-1!==u&&(g=h.slice(u+1),q=k[h.slice(0,u)]);if(!q)throw Error('Could not find the module "'+h+'" in the React Client Manifest. This is probably a bug in the React Server Components bundler.');}var n={id:q.id,chunks:q.chunks,name:g,async:!!c.$$async}; a.pendingChunks++;var A=a.nextChunkId++,pa=O(n);var B=A.toString(16)+":I"+pa+"\n";a.completedImportChunks.push(B);f.set(e,A);return b[0]===D&&"1"===d?"$L"+A.toString(16):U(A)}catch(Ib){return a.pendingChunks++,b=a.nextChunkId++,d=Q(a,Ib),R(a,b,d),U(b)}}function pb(a,b){a.pendingChunks++;var d=a.nextChunkId++;b=qb(a,d,b);a.completedRegularChunks.push(b);return d} function fb(a,b,d,c){switch(c){case D:return"$"}for(;"object"===typeof c&&null!==c&&(c.$$typeof===D||c.$$typeof===E);)try{switch(c.$$typeof){case D:var e=c;c=T(a,e.type,e.key,e.ref,e.props,null);break;case E:var f=c._init;c=f(c._payload)}}catch(g){d=g===Ka?Na():g;if("object"===typeof d&&null!==d&&"function"===typeof d.then)return a.pendingChunks++,a=hb(a,c,F,a.abortableTasks),c=a.ping,d.then(c,c),a.thenableState=Oa(),"$L"+a.id.toString(16);a.pendingChunks++;c=a.nextChunkId++;d=Q(a,d);R(a,c,d);return"$L"+ c.toString(16)}if(null===c)return null;if("object"===typeof c){if(c.$$typeof===v)return ob(a,b,d,c);if("function"===typeof c.then)return"$@"+jb(a,c).toString(16);if(c.$$typeof===va)return c=c._context._globalName,b=a.writtenProviders,d=b.get(d),void 0===d&&(a.pendingChunks++,d=a.nextChunkId++,b.set(c,d),c=rb(a,d,"$P"+c),a.completedRegularChunks.push(c)),U(d);if(c===ib){a=F;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");c=a.parentValue;a.context._currentValue= c===Ba?a.context._defaultValue:c;F=a.parent;return}return c instanceof Map?"$Q"+pb(a,Array.from(c)).toString(16):c instanceof Set?"$W"+pb(a,Array.from(c)).toString(16):!Xa(c)&&(null===c||"object"!==typeof c?a=null:(a=Da&&c[Da]||c["@@iterator"],a="function"===typeof a?a:null),a)?Array.from(c):c}if("string"===typeof c){if("Z"===c[c.length-1]&&b[d]instanceof Date)return"$D"+c;if(1024<=c.length)return a.pendingChunks+=2,d=a.nextChunkId++,b="string"===typeof c?Buffer.byteLength(c,"utf8"):c.byteLength, b=d.toString(16)+":T"+b.toString(16)+",",a.completedRegularChunks.push(b,c),U(d);a="$"===c[0]?"$"+c:c;return a}if("boolean"===typeof c)return c;if("number"===typeof c)return a=c,Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN";if("undefined"===typeof c)return"$undefined";if("function"===typeof c){if(c.$$typeof===v)return ob(a,b,d,c);if(c.$$typeof===w)return d=a.writtenServerReferences,b=d.get(c),void 0!==b?a="$F"+b.toString(16):(b=c.$$bound, b={id:c.$$id,bound:b?Promise.resolve(b):null},a=pb(a,b),d.set(c,a),a="$F"+a.toString(16)),a;if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to Client Component props."+N(b,d)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".'+N(b,d));}if("symbol"===typeof c){e=a.writtenSymbols;f=e.get(c);if(void 0!==f)return U(f); f=c.description;if(Symbol.for(f)!==c)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(c.description+") cannot be found among global symbols.")+N(b,d));a.pendingChunks++;d=a.nextChunkId++;b=rb(a,d,"$S"+f);a.completedImportChunks.push(b);e.set(c,d);return U(d)}if("bigint"===typeof c)return"$n"+c.toString(10);throw Error("Type "+typeof c+" is not supported in Client Component props."+N(b,d));} function Q(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function sb(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)} function R(a,b,d){d={digest:d};b=b.toString(16)+":E"+O(d)+"\n";a.completedErrorChunks.push(b)}function z(a,b,d){var c=a.nextChunkId++;d=O(d);b="H"+b;c=c.toString(16)+":"+b;a.completedHintChunks.push(c+d+"\n")} function nb(a){var b=bb.current;bb.current=Ta;var d=P;I=P=a;try{var c=a.pingedTasks;a.pingedTasks=[];for(var e=0;e<c.length;e++){var f=c[e];var g=a;if(0===f.status){Ia(f.context);try{var k=f.model;if("object"===typeof k&&null!==k&&k.$$typeof===D){var h=k,q=f.thenableState;f.model=k;k=T(g,h.type,h.key,h.ref,h.props,q);for(f.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===D;)h=k,f.model=k,k=T(g,h.type,h.key,h.ref,h.props,null)}var u=qb(g,f.id,k);g.completedRegularChunks.push(u);g.abortableTasks.delete(f); f.status=1}catch(B){var n=B===Ka?Na():B;if("object"===typeof n&&null!==n&&"function"===typeof n.then){var A=f.ping;n.then(A,A);f.thenableState=Oa()}else{g.abortableTasks.delete(f);f.status=4;var pa=Q(g,n);R(g,f.id,pa)}}}}null!==a.destination&&S(a,a.destination)}catch(B){Q(a,B),sb(a,B)}finally{bb.current=b,I=null,P=d}} function S(a,b){l=new Uint8Array(2048);m=0;p=!0;try{for(var d=a.completedImportChunks,c=0;c<d.length;c++)if(a.pendingChunks--,!t(b,d[c])){a.destination=null;c++;break}d.splice(0,c);var e=a.completedHintChunks;for(c=0;c<e.length;c++)if(!t(b,e[c])){a.destination=null;c++;break}e.splice(0,c);var f=a.completedRegularChunks;for(c=0;c<f.length;c++)if(a.pendingChunks--,!t(b,f[c])){a.destination=null;c++;break}f.splice(0,c);var g=a.completedErrorChunks;for(c=0;c<g.length;c++)if(a.pendingChunks--,!t(b,g[c])){a.destination= null;c++;break}g.splice(0,c)}finally{a.flushScheduled=!1,l&&0<m&&b.write(l.subarray(0,m)),l=null,m=0,p=!0}"function"===typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function tb(a){a.flushScheduled=null!==a.destination;setImmediate(function(){return ta.run(a,nb,a)})}function C(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;setImmediate(function(){return S(a,b)})}} function ub(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{S(a,b)}catch(d){Q(a,d),sb(a,d)}}} function vb(a,b){try{var d=a.abortableTasks;if(0<d.size){var c=Q(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var e=a.nextChunkId++;R(a,e,c);d.forEach(function(f){f.status=3;var g=U(e);f=rb(a,f.id,g);a.completedErrorChunks.push(f)});d.clear()}null!==a.destination&&S(a,a.destination)}catch(f){Q(a,f),sb(a,f)}} function gb(a){if(a){var b=F;Ia(null);for(var d=0;d<a.length;d++){var c=a[d],e=c[0];c=c[1];ab[e]||(ab[e]=ca.createServerContext(e,Ba));Ja(ab[e],c)}a=F;Ia(b);return a}return null}function qb(a,b,d){a=O(d,a.toJSON);return b.toString(16)+":"+a+"\n"}function rb(a,b,d){a=O(d);return b.toString(16)+":"+a+"\n"}function wb(a,b){var d=b.lastIndexOf("#");a=b.slice(0,d);b=b.slice(d+1);return{specifier:a,name:b}}var xb=new Map; function yb(a){var b=xb.get(a.specifier);if(b)return"fulfilled"===b.status?null:b;var d=import(a.specifier);a.async&&(d=d.then(function(c){return c.default}));d.then(function(c){var e=d;e.status="fulfilled";e.value=c},function(c){var e=d;e.status="rejected";e.reason=c});xb.set(a.specifier,d);return d}function V(a){var b=xb.get(a.specifier);if("fulfilled"===b.status)b=b.value;else throw b.reason;return"*"===a.name?b:""===a.name?b.default:b[a.name]} function W(a,b,d,c){this.status=a;this.value=b;this.reason=d;this._response=c}W.prototype=Object.create(Promise.prototype);W.prototype.then=function(a,b){switch(this.status){case "resolved_model":zb(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};function Ab(a,b){for(var d=0;d<a.length;d++)(0,a[d])(b)} function Bb(a,b){if("pending"===a.status||"blocked"===a.status){var d=a.reason;a.status="rejected";a.reason=b;null!==d&&Ab(d,b)}}function Cb(a,b,d,c,e,f){var g=wb(a._bundlerConfig,b);a=yb(g);if(d)d=Promise.all([d,a]).then(function(k){k=k[0];var h=V(g);return h.bind.apply(h,[null].concat(k))});else if(a)d=Promise.resolve(a).then(function(){return V(g)});else return V(g);d.then(Db(c,e,f),Eb(c));return null}var X=null,Y=null; function zb(a){var b=X,d=Y;X=a;Y=null;try{var c=JSON.parse(a.value,a._response._fromJSON);null!==Y&&0<Y.deps?(Y.value=c,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=c)}catch(e){a.status="rejected",a.reason=e}finally{X=b,Y=d}}function Fb(a,b){a._chunks.forEach(function(d){"pending"===d.status&&Bb(d,b)})} function Z(a,b){var d=a._chunks,c=d.get(b);c||(c=a._formData.get(a._prefix+b),c=null!=c?new W("resolved_model",c,null,a):new W("pending",null,null,a),d.set(b,c));return c}function Db(a,b,d){if(Y){var c=Y;c.deps++}else c=Y={deps:1,value:null};return function(e){b[d]=e;c.deps--;0===c.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=c.value,null!==e&&Ab(e,c.value))}}function Eb(a){return function(b){return Bb(a,b)}} function Gb(a,b){a=Z(a,b);"resolved_model"===a.status&&zb(a);if("fulfilled"!==a.status)throw a.reason;return a.value} function Hb(a,b,d,c){if("$"===c[0])switch(c[1]){case "$":return c.slice(1);case "@":return b=parseInt(c.slice(2),16),Z(a,b);case "S":return Symbol.for(c.slice(2));case "F":return c=parseInt(c.slice(2),16),c=Gb(a,c),Cb(a,c.id,c.bound,X,b,d);case "Q":return b=parseInt(c.slice(2),16),a=Gb(a,b),new Map(a);case "W":return b=parseInt(c.slice(2),16),a=Gb(a,b),new Set(a);case "K":b=c.slice(2);var e=a._prefix+b+"_",f=new FormData;a._formData.forEach(function(g,k){k.startsWith(e)&&f.append(k.slice(e.length), g)});return f;case "I":return Infinity;case "-":return"$-0"===c?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(c.slice(2)));case "n":return BigInt(c.slice(2));default:c=parseInt(c.slice(1),16);a=Z(a,c);switch(a.status){case "resolved_model":zb(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return c=X,a.then(Db(c,b,d),Eb(c)),null;default:throw a.reason;}}return c} function Jb(a,b){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:new FormData,c=new Map,e={_bundlerConfig:a,_prefix:b,_formData:d,_chunks:c,_fromJSON:function(f,g){return"string"===typeof g?Hb(e,this,f,g):g}};return e} function Kb(a,b,d){a._formData.append(b,d);var c=a._prefix;if(b.startsWith(c)&&(a=a._chunks,b=+b.slice(c.length),(b=a.get(b))&&"pending"===b.status&&(c=b.value,a=b.reason,b.status="resolved_model",b.value=d,null!==c)))switch(zb(b),b.status){case "fulfilled":Ab(c,b.value);break;case "pending":case "blocked":b.value=c;b.reason=a;break;case "rejected":a&&Ab(a,b.reason)}}function Lb(a){Fb(a,Error("Connection closed."))} function Mb(a,b,d){var c=wb(a,b);a=yb(c);return d?Promise.all([d,a]).then(function(e){e=e[0];var f=V(c);return f.bind.apply(f,[null].concat(e))}):a?Promise.resolve(a).then(function(){return V(c)}):Promise.resolve(V(c))}function Nb(a,b){return function(){return ub(b,a)}}exports.createClientModuleProxy=function(a){a=x({},a,!1);return new Proxy(a,la)}; exports.decodeAction=function(a,b){var d=new FormData,c=null;a.forEach(function(e,f){if(f.startsWith("$ACTION_"))if(f.startsWith("$ACTION_REF_")){e="$ACTION_"+f.slice(12)+":";e=Jb(b,e,a);Lb(e);e=Z(e,0);e.then(function(){});if("fulfilled"!==e.status)throw e.reason;e=e.value;c=Mb(b,e.id,e.bound)}else f.startsWith("$ACTION_ID_")&&(e=f.slice(11),c=Mb(b,e,null));else d.append(f,e)});return null===c?null:c.then(function(e){return e.bind(null,d)})}; exports.decodeReply=function(a,b){if("string"===typeof a){var d=new FormData;d.append("0",a);a=d}a=Jb(b,"",a);Lb(a);return Z(a,0)}; exports.decodeReplyFromBusboy=function(a,b){var d=Jb(b,""),c=0,e=[];a.on("field",function(f,g){0<c?e.push(f,g):Kb(d,f,g)});a.on("file",function(f,g,k){var h=k.filename,q=k.mimeType;if("base64"===k.encoding.toLowerCase())throw Error("React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it.");c++;var u=[];g.on("data",function(n){u.push(n)});g.on("end",function(){var n= new Blob(u,{type:q});d._formData.append(f,n,h);c--;if(0===c){for(n=0;n<e.length;n+=2)Kb(d,e[n],e[n+1]);e.length=0}})});a.on("finish",function(){Lb(d)});a.on("error",function(f){Fb(d,f)});return Z(d,0)};exports.registerClientReference=function(a,b,d){return x(a,b+"#"+d,!1)};exports.registerServerReference=function(a,b,d){return Object.defineProperties(a,{$$typeof:{value:w},$$id:{value:null===d?b:b+"#"+d},$$bound:{value:null},bind:{value:ia}})}; exports.renderToPipeableStream=function(a,b,d){var c=eb(a,b,d?d.onError:void 0,d?d.context:void 0,d?d.identifierPrefix:void 0),e=!1;tb(c);return{pipe:function(f){if(e)throw Error("React currently only supports piping to one writable stream.");e=!0;ub(c,f);f.on("drain",Nb(f,c));return f},abort:function(f){vb(c,f)}}};