potatejs 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Po**wered by **Ta**gged **Te**mplate.
|
|
8
8
|
|
|
9
|
-
**Note**: This project is a fork of [brahmosjs/brahmos](https://github.com/brahmosjs/brahmos).
|
|
9
|
+
> **Note**: This project is a fork of [brahmosjs/brahmos](https://github.com/brahmosjs/brahmos).
|
|
10
10
|
|
|
11
11
|
Supercharged JavaScript library to build user interfaces with modern React API and native templates.
|
|
12
12
|
|
|
@@ -139,7 +139,7 @@ npm install -D esbuild
|
|
|
139
139
|
|
|
140
140
|
Build your app.
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
> **Note**: This CLI is build-only. For watch / dev usage, use esbuild's JS API directly.
|
|
143
143
|
|
|
144
144
|
``` bash
|
|
145
145
|
npx potatejs src/entry-point.js --outdir dist
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,4 @@ var vo=Object.defineProperty;var Mo=(e,t)=>{for(var n in t)vo(e,n,{get:t[n],enum
|
|
|
2
2
|
`),e=e.parent}return{componentStack:t}}function Xo(e){let{node:{type:t},nodeInstance:n,parent:o}=e,{__ccId:r}=t,s=o.context||{};if(!r)return s;let a=Object.create(s);return a[r]=n,a}function Qo(e,t){return t.reduce((n,{state:o})=>(typeof o=="function"&&(o=o(n)),{...n,...o}),e)}function Gn(e){let{root:t,nodeInstance:n}=e;n[d].isDirty=!0,t.retryFiber=e}function vt(e){let{node:t,part:n,root:o,childFiberError:r}=e,{type:s,nodeType:a,props:i={}}=t,{currentTransition:c}=o,l=o.updateType===y,p=!0,f=!1,m=a===D;Rn(e);let{nodeInstance:u}=e,T=!1;u||(u=m?new s(i):be(s),e.nodeInstance=u,T=!0);let S=u[d],E=Xo(e);if(e.context=E,m){let h=u,g=S,{committedValues:P,memoizedValues:O}=g;T&&(P.state=h.state);let{props:V,state:Ee}=P;O&&c&&c.transitionId===O.transitionId&&({props:V,state:Ee}=O,f=!0),h.props=V,h.state=Ee;let{shouldComponentUpdate:en}=h,H=Ee,mt=me(e);mt.length&&(H=Qo(Ee,mt));let tn=!T&&o.forcedUpdateWith!==u,nn=L(s,"getDerivedStateFromProps",[i,H]),on=r?L(s,"getDerivedStateFromError",[r.error]):void 0;(nn||on)&&(H={...H,...nn,...on}),e.isReactCompat&&h.isPureReactComponent&&tn&&(p=!Ut(H,Ee)||!Ut(i,V)),e.isReactCompat&&en&&p&&tn&&(p=en.call(h,i,H));let{contextType:rn}=s;if(rn){let{id:we,defaultValue:Tt}=rn,Le=E[we],Uo=Le?Le.props.value:Tt;Le&&T&&Le.sub(h),h.context=Uo}h.state=H,h.props=i,mt.forEach(({callback:we})=>{if(we){let{updateSource:Tt}=o;Ae(()=>{I(Tt,()=>we(H))})}}),c&&(g.memoizedValues={state:H,props:i,transitionId:c.transitionId})}if(p){xe(e),S.renderCount+=1;let h=r&&!s.getDerivedStateFromError;try{h?S.nodes=null:u.__render(i)}catch(g){let P=Vo(e);if(typeof g.then=="function"){let O=ct(e);if(!O)throw new Error("Rendering which got suspended can't be used outside of suspense.");O.nodeInstance.handleSuspender(g,O);let V=Wn(O);Gn(V)}else if(P&&!P.childFiberError){let O=qo(e);console.error(g);let V=`The above error occurred in the <${St(t.type)}> component:
|
|
3
3
|
${O.componentStack}`;console.error(V),P.childFiberError={error:g,errorInfo:O},Gn(P)}else throw g;return}finally{xe(null);let g=u[d];if(m&&l){let{committedValues:P}=g;Object.assign(u,P)}}}if(f||p){let{child:h}=e,{nodes:g}=S;!h||h.node!==g?(ne(g,n,h,e,e),R(e,x)):f||te(e)}else te(e)}function Vn(e){let{node:t,alternate:n,isReactCompat:o}=e,r=n&&n.node;(!o||t!==r)&&R(e,x)}function Mt(e,t){let{type:n}=e,o=t?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);return je(o),{fragment:[o],domNodes:[o],parts:[{previousSibling:null,parentNode:o,isNode:!0}]}}function Zo(e){return!!e&&e.nodeType===8&&e.textContent===an}var De=class{constructor(t,n){this.templateResult=t,t.create(n),this.fragment=this.createNode(n),this.parts=this.getParts(),this.domNodes=$(this.fragment.childNodes),this.patched=!1}createNode(t){let{template:n,svgTemplate:o}=this.templateResult,r=t?o:n;return document.importNode(r.content,!0)}getParts(){let{fragment:t,templateResult:n}=this,{partsMeta:o}=n,r=[],s=t.querySelectorAll("*");for(let a=0,i=o.length;a<i;a++){let c=o[a],{isAttribute:l,attrIndex:p,refNodeIndex:f,prevChildIndex:m,hasExpressionSibling:u}=c,T=s[f];if(l)c.tagAttrs||(c.tagAttrs=$(T.attributes)),r.push({isAttribute:!0,tagAttrs:c.tagAttrs,domNode:T,attrIndex:p}),je(T);else{T=T||t;let S=m!==-1,E,h=T.childNodes[m+1];S&&Zo(h)&&Se(h),S?u?E=yn(T,m):E=T.childNodes[m]:E=null,r.push({isNode:!0,parentNode:T,previousSibling:E})}}return r}patchParts(t){let{parts:n}=this,{parentNode:o,previousSibling:r}=t;if(!this.patched){for(let s=0,a=n.length;s<a;s++){let i=n[s];i.isNode&&i.parentNode instanceof DocumentFragment&&(i.parentNode=o,i.previousSibling=i.previousSibling||r)}this.patched=!0}}};function Jo(e,t,n){let o=e.lastIndexOf(t);return n<=o}function er(e,t){return{nodeType:z,props:e,ref:t}}function tr(e,t,n){let o=n,{isReactCompat:r}=n,s=n.child;for(let a=0,i=e.length;a<i;a++){let c=e[a],l=t[a],p;if(c.isAttribute){let{domNode:f}=c,m={},u;for(;c&&f===c.domNode;)(r?Ce:$e)(t[a],(S,E)=>{let h=c,g=!1;if(r){let P=Ke(S);g=Jo(h.tagAttrs,P,h.attrIndex)}!g&&!cn[S]?m[S]=E:S==="ref"&&(u=E)}),c=e[++a];a--,c=e[a],p=er(m,u)}else c.isNode&&(p=l);o=ne(p,c,s,o,n),s=s&&s.sibling}}function wt(e){let{node:t}=e,{part:n,alternate:o,parent:{context:r}}=e,s=o&&o.node,{values:a,nodeType:i}=t,c=i===Z,l=e.isSvgPart||t.type==="svg";e.isSvgPart=l;let{nodeInstance:p}=e;p||(p=c?Mt(t,l):new De(t.template,l),e.nodeInstance=p),c||p.patchParts(n),t!==s?c?ne(t.props.children,p.parts[0],e.child,e,e):tr(p.parts,a,e):te(e),R(e,x),e.context=r}function qn(e,t){let{type:n}=t,o=Ct(t);return ht[e]?ht[e]:/^change(textarea|input)/i.test(e+o)&&!pn.test(n)?"input":e}function Lt(e){let{type:t}=e,n=Ct(e);if(n==="input"&&(t==="radio"||t==="checkbox"))return"checked";if(n==="input"||n==="select"||n==="textarea")return"value"}function Xn(e){let t=Lt(e);if(!t)return;let n=e[`${t}Prop`],o=e[t];n!==void 0&&n!==o&&(e[t]=n)}function Qn(e,t,n,o){e==="checked"?n==="checked"?(t.checked=o,t.checkedProp=o):n==="defaultChecked"&&t.checkedProp===void 0?t.checked=o:t[n]=o:e==="value"&&(n==="value"?(t.value=o,t.valueProp=o):n==="defaultValue"&&t.valueProp===void 0?t.value=o:t[n]=o)}function Zn(e,t,n){let o=e.__brahmosData.events,r=o[t];return r?(r.handler=n,r.patched):(r=o[t]={handler:n,patched:null},r.patched=function(s){r.handler&&Te(()=>{r.handler.call(this,s)})},r.patched)}function eo(e,t,n,o){t=t||{},Ce(e,(r,s)=>{let a=t[r];s!==a&&o(r,s,a)}),Ce(t,(r,s)=>{e[r]===void 0&&s!==void 0&&o(r,n,s)})}function Jn(e,t,n,o,r,s){if(t==="children"||t==="key"||t==="ref")return;if(Tn(t)){let i=!1;s&&(i=t.substr(-7)==="Capture"&&t.substr(-14,7)==="Pointer");let c=hn(t,i);s&&(c=qn(c,e));let l=Zn(e,t,n);!s&&o===void 0?n?e.addEventListener(c,l,i):e.removeEventListener(c,l,i):o&&!n?e.removeEventListener(c,l,i):!o&&n&&e.addEventListener(c,l,i)}else if(t==="style")if(s){let{style:i}=e;eo(n||{},o,"",(c,l)=>{c[0]==="-"?i.setProperty(c,l):i[c]=typeof l=="number"&&dn.test(c)===!1?l+"px":l})}else e.style.cssText=n||"";else if(t==="dangerouslySetInnerHTML"){if(s){let i=o&&o.__html,c=n&&n.__html;c!==i&&(e.innerHTML=c==null?"":c)}}else if(t in e&&!r){let i=s?Lt(e):null;i?Qn(i,e,t,n):e[t]=n==null?"":n}else{s&&(t=Ke(t));let i=t;r&&t.startsWith("xlink")&&(i=t.replace(/^xlink:?/,""));let c=n==null||n===!1;t!==i?(i=i.toLowerCase(),c?e.removeAttributeNS(Et,i):e.setAttributeNS(Et,i,n)):c?e.removeAttribute(t):e.setAttribute(t,n)}}function kt(e,t,n,o,r){r?(eo(t,n,null,(s,a,i)=>{Jn(e,s,a,i,o,r)}),Xn(e)):$e(t,(s,a)=>{Jn(e,s,a,void 0,o,!1)})}function lt(e){function t(n){return e(pe(n,!1),n.ref)}return t.__isForwardRef=!0,t.$$typeof=sn,t}function to(){return{current:null}}function ae(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&(e.current=t)}function nr(e){let{node:t,alternate:n}=e,o=e.part,{parentNode:r,previousSibling:s}=o,a=ue(r,s);n&&a?a.nodeValue=t:ze(r,a,t)}function or(e){for(;e.child&&e.node&&!B(e.node);)e=e.child;return e}function no(e,t){let{domNodes:n}=t;e[He]=n[n.length-1]}function oo(e,t){if(e.isArrayNode&&e.nodeIndex===0)for(;e=e.parentArrayPart;)e.firstDOMNode=t}function ro(e){let{previousSibling:t}=e;if(e.isArrayNode){let{firstDOMNode:n,nodeIndex:o}=e;o>0?t=e.parentNode[He]:e.parentArrayPart&&(t=n?n.previousSibling:e.parentNode[He])}return t}function so(e,t){let{part:n}=e;if(!n.isArrayNode)return;let{nodeIndex:o,parentNode:r}=n,s=t.part.nodeIndex,a=or(e),{nodeInstance:i}=a,c=a!==e&&a.hasUncommittedEffect;if(!(!i||c)){if(o!==s){let{domNodes:l}=i,p=ro(n),f=ue(r,p),m=l[0];m&&m.previousSibling!==p&&m!==f&&ze(r,f,l),oo(n,m)}no(r,i)}}function rr(e){let{nodeInstance:t,alternate:n,node:o}=e,r=e.part,{parentNode:s}=r,a=G(o);if(a&&io(e,t.domNodes[0]),n)so(e,n);else{let i=ro(r),c=ue(s,i),l=ze(s,c,t.fragment);a||(t.domNodes=l),oo(r,l[0]),no(s,t)}}function sr(e){let{node:t,nodeInstance:n,root:o,alternate:r}=e,{updateType:s}=o,{nodeType:a}=t,i=n[d],c=s===y;if(a===D){c&&Object.assign(n,i.memoizedValues);let{props:f,state:m}=i.committedValues;i.lastSnapshot=L(n,"getSnapshotBeforeUpdate",[f,m]);let{ref:u}=t,T=r&&r.node.ref;u!==T&&(e.refCleanup?(e.refCleanup(),e.refCleanup=null):T&&ae(T,null),u&&(e.refCleanup=ae(u,n)))}else at(e,!1);let{transitionId:l}=Q(e,null),p=tt(s);i[p]=c?i[p].filter(f=>f.transitionId!==l):[],i.isDirty=!1,i.renderCount=0,o.postCommitEffects.push(e)}function ir(e){let{node:t,nodeInstance:n,root:o,childFiberError:r}=e,{updateType:s}=o,{nodeType:a}=t,i=n[d];if(a===D){let{props:c,state:l}=n,{committedValues:p,lastSnapshot:f}=i,{props:m,state:u}=p;m?L(n,"componentDidUpdate",[m,u,f]):L(n,"componentDidMount"),r&&(L(n,"componentDidCatch",[r.error,r.errorInfo]),e.childFiberError=null),p.props=c,p.state=l,i.memoizedValues=null}else if(zn(e),s===y){let{syncHooks:c,deferredHooks:l}=n;n.deferredHooks=c,n.syncHooks=l}i.mounted=!0,i.fiber=e}function io(e,t){let{node:n,alternate:o,isSvgPart:r,isReactCompat:s}=e,{props:a,ref:i}=n,c=o&&o.node.props;kt(t,a,c,r,s);let l=o&&o.node.ref;i!==l&&(e.refCleanup?(e.refCleanup(),e.refCleanup=null):l&&ae(l,null),i&&(e.refCleanup=ae(i,t)))}function pt(e){e.tearDownFibers=[],e.postCommitEffects=[],e.hasUncommittedEffect=!1,e.retryFiber=null,e.resetRenderCallbacks()}function ar(e){e.node=null,e.nodeInstance=null,e.child=null,e.sibling=null}function Ht(e){let{currentTransition:t,pendingTransitions:n}=e,o=n.indexOf(t);o!==-1&&n.splice(o,1)}function cr(e){let{node:t,alternate:n}=e,o=t&&_(t);o&&n&&so(e,n),e.hasUncommittedEffect===x&&(Y(t)?nr(e):B(t)?rr(e):o?sr(e):t.nodeType===z&&io(e,e.part.domNode),e.hasUncommittedEffect=Ye),n&&ar(n)}function ao(e){let{updateType:t,wip:n,current:o}=e,r=ee(t),s=e[Re(t)],a=[],i=t===A?o:n;for(;i;){let{createdAt:c,node:l,child:p,hasUncommittedEffect:f}=i,m=i[r],u=c>s,T=f||m>s;if(f&&a.push(i),u&&(p&&p.parent!==i&&(p.parent=i),l&&_(l)&&(i.nodeInstance[d].fiber=i)),p&&T)i=p;else{for(;i!==e&&!i.sibling;)i=i.parent;i=i.sibling}}return a}function Bt(e,t){for(let o=0,r=t.length;o<r;o++)cr(t[o]);let{postCommitEffects:n}=e;for(let o=n.length-1;o>=0;o--)ir(n[o]);Ht(e),pt(e),e.forcedUpdateWith=null}function Yt(e){let{node:t,part:n}=e,o=e,{parentNode:r,previousSibling:s,firstDOMNode:a}=n,i=new Map,c=0,l=e;for(;l=_n(l,e);){let p=xt(l.node,c);i.set(p,l),c++}e.child=null,t.forEach((p,f)=>{let m=xt(p,f),u=i.get(m);u&&i.delete(m);let T=o;o=ne(p,{parentNode:r,previousSibling:s,a:void 0,firstDOMNode:a,isArrayNode:!0,nodeIndex:f,parentArrayPart:n.isArrayNode?n:null},u,T,e),o.sibling=null,u&&u.part.nodeIndex!==f&&(R(o,yt),f!==0&&R(T,yt))}),i.forEach(p=>{oe(p)}),R(e,x)}function co(e,t,n,o){let r=e.part.parentNode!==t.parentNode&&n?!1:o,{node:s}=e;s&&s.portalContainer&&(r=!0),lo(e,r)}function lo(e,t){let{node:n,part:o,nodeInstance:r}=e;if(e.shouldTearDown=!1,!qe(n))return;let s=B(n),{child:a}=e;if(a)for(co(a,o,s,t);a.sibling;)a=a.sibling,co(a,o,s,t);if(Y(n)&&t){let c=ue(o.parentNode,o.previousSibling);c&&Se(c);return}let{ref:i}=n;if(i&&(e.refCleanup?(e.refCleanup(),e.refCleanup=null):ae(i,null)),!!r)if(s){let{domNodes:c}=r;t&&Se(c)}else _(n)&&We(r)&&(r.__unmount.forEach(c=>c()),r.__unmount.clear(),n.nodeType===D?L(r,"componentWillUnmount"):at(e,!0))}function he(e){let{tearDownFibers:t}=e;t.forEach(n=>{n.shouldTearDown&&lo(n,!0)}),e.tearDownFibers=[]}var po=5,lr=30,Kt=16,pr=300,ur=600,fo=0;typeof requestAnimationFrame!="undefined"&&requestAnimationFrame(e=>{fo=e});var jt=()=>performance.now(),uo=()=>!0,mo=(e,t)=>(t=t||Kt,t-(e-fo)%t),$t,Pe;if(typeof MessageChannel!="undefined"){Pe=[];let e=new MessageChannel;e.port1.onmessage=function(){Pe.forEach(t=>t())},$t=e.port2}function dr(e){if(!$t||mo(jt())<1){let t=()=>{r(),e()},n=setTimeout(t,1),o=requestIdleCallback(t),r=()=>{clearTimeout(n),cancelIdleCallback(o)};return r}return Pe.push(e),$t.postMessage(null),()=>{let t=Pe.indexOf(e);t!==-1&&Pe.splice(t,1)}}function zt(e,t,n){let{cancelSchedule:o}=e;if(o&&(o(),e.cancelSchedule=null),t){e.cancelSchedule=dr(()=>{let{currentTransition:r}=e,s=r?r.tryCount:0,a=r===v?pr:ur,i=jt(),c=Math.min(lr,po+s),l=Math.floor(c/Kt)*Kt,p=()=>{let u=jt(),T=mo(u,l),S=i+Math.min(po,T);return u<S},m=s>a?uo:p;n(m)});return}n(uo)}function fr(e){let{node:t,nodeInstance:n}=e;return _(t)&&n?!!me(e).length||n[d].isDirty:!1}function mr(e){let{node:t,alternate:n}=e;if(!qe(t)){n&&oe(n);return}let o=fr(e);if(e.processedTime&&!o){te(e);return}Y(t)?Vn(e):Array.isArray(t)?Yt(e):B(t)?wt(e):_(t)?vt(e):t.nodeType===z&&R(e,x),e.processedTime=j()}function Tr(e){return e.updateType===A?!0:e.currentTransition?e.lastCompleteTime>=e.updateTime&&e.hasUncommittedEffect&&(_e(e.currentTransition)||e.currentTransition.isRunningAsyncAction):!1}var hr={fn:e=>{let{updateType:t,current:n}=e,o=Re(t);he(e);let r=ao(e);e[o]=e.lastCompleteTime=j(),t===y&&(e.current=e.wip,e.wip=n),I(U,()=>Bt(e,r))}};function ut(e,t){let{root:n}=e,{updateType:o,currentTransition:r}=n,s=Re(o),a=ee(o),i=n[s],c=!Fn(n);zt(n,c,l=>{for(;e!==t;)if(l()){mr(e);let{retryFiber:f}=n;f?(e=f,t=n,n.retryFiber=null):e=xn(e,t,i,a)}else{ut(e,t);return}if(n.callRenderCallbacks(),r){let f=e===t&&!n.retryFiber,m=r.transitionState!==le,u=r.isRunningAsyncAction;f&&m&&!u&&(Cn(r),r.tryCount=0),!n.hasUncommittedEffect&&(_e(r)||u)&&Ht(n)}Tr(n)&&hr.fn(n),At(n)&&I(C,()=>{n.updateSource=C,ie(n)})})}function ie(e){let t=At(e);t&&(e.updateType=y,pt(e),e.currentTransition=t,t.tryCount+=1,e.wip=Qe(e.current,e.wip,e,e),ut(e.wip,e))}function dt(e){let{root:t,parent:n}=e;t.updateType=A,t.currentTransition=null,pt(t),ut(e,n)}function w(e){let t=M(e),{root:n}=t,{pendingTransitions:o,batchUpdates:r}=n,s=re(),a=Rt(),i=Fe();if(k(t,i),s===C&&!o.includes(a)&&(a===v?o.unshift(a):o.push(a)),r[s]){r[s]+=1;return}r[s]=1,Ae(()=>{let c=r[s];r[s]=0;let l=s===C;if(!(l&&n.lastCompleteTime<n.updateTime))if(n.updateSource=s,l)ie(n);else{let p=n.updateType===A&&n.cancelSchedule;dt(s===U&&!p&&c===1?t:n.current)}})}var F=class{constructor(t){this.props=t,this.state=void 0,this.context=void 0,this[d]={lastSnapshot:null,pendingSyncUpdates:[],pendingDeferredUpdates:[],fiber:null,nodes:null,mounted:!1,committedValues:{},memoizedValues:null,isDirty:!1,renderCount:0}}setState(t,n){ot(this,r=>({state:t,transitionId:r,callback:n}))&&w(this)}forceUpdate(t){let n=this[d],{fiber:o}=n;o&&(o.root.forcedUpdateWith=this,this[d].isDirty=!0,w(this),t&&t(this.state))}render(){}__render(){let t=this.render();return this[d].nodes=t,t}};F.prototype.isReactComponent=!0;var ce=class extends F{};ce.prototype.isPureReactComponent=!0;function b(e,t,n){if(!e||typeof e!="string"&&typeof e!="function"){let c="Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(e===null?"null":typeof e)+".";throw(typeof e=="undefined"||typeof e=="object"&&e!==null)&&(c+=`
|
|
4
4
|
|
|
5
|
-
You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.`),new Error(c)}let{ref:o}=t;n===void 0&&(n=t.key);let r=typeof e=="function"&&e.prototype&&e.prototype.isReactComponent,s=typeof e=="function"&&!r||e.__isForwardRef;t=pe(t,s);let a=Xe(t,null,n);if(a.type=e,typeof e=="string")return a.nodeType=Z,a.ref=o,a;a.nodeType=r?D:_t,a.ref=r?o:null,e.__loadLazyComponent&&e.__loadLazyComponent();let i=typeof e=="function"&&e.defaultProps;if(i)for(n in i)t[n]===void 0&&(t[n]=i[n]);return a}function To(e,t,n){t=t||{};let r=arguments.length>3?$(arguments,2):n;return r&&(t.children=r),b(e,t,t.key)}function ct(e,t){let{root:n}=e,{nodeInstance:o}=e;for(;!(o instanceof Oe||t&&o instanceof W);){if(e=e.parent,e===n)return null;o=e.nodeInstance}return e}function Wn(e){let t=ct(e.parent,!0);if(!(t&&t.nodeInstance instanceof W))return e;let{nodeInstance:o}=t,{childManagers:r}=o.suspenseManagers[Q(e,null).transitionId],{revealOrder:s}=o.props;return s==="backwards"||s==="together"?(r.forEach(a=>{a.component[d].isDirty=!0}),r[0].fiber):e}function Gt(e){let{parentSuspenseManager:t}=e;return t&&t.isSuspenseList?t:null}function Wt(e,t){let{nodeInstance:n}=e,{suspenseManagers:o}=n,{transitionId:r}=t,s=o[r];return s||(s=o[r]=new Vt(e,t)),t.transitionState===q&&(s.suspender=null),s}function Eo(e){e[d].isDirty=!0}function Er(e){let t=M(e.component);e.isUnresolved()&&t&&(Eo(e.component),k(t,y))}var Vt=class{constructor(t,n){let{nodeInstance:o}=t;this.fiber=t,this.component=o,this.transition=n,this.childManagers=[],this.suspender=null,this.isSuspenseList=o instanceof W;let r=ct(t.parent,!0);this.parentSuspenseManager=r&&Wt(r,n),this.recordChildSuspense(),this.handleSuspense=this.handleSuspense.bind(this)}recordChildSuspense(){let{parentSuspenseManager:t}=this;t?(t.childManagers.push(this),this.rootSuspenseManager=t.rootSuspenseManager):this.rootSuspenseManager=this}addRootToProcess(){let{rootSuspenseManager:t}=this,{root:n}=N();n.afterRender(t.handleSuspense)}suspend(t){this.suspender=t,this.addRootToProcess()}handleSuspense(){let{component:t,suspender:n}=this;return t instanceof W?this.handleSuspenseList():Promise.resolve(n).then(this.resolve.bind(this,n))}isUnresolved(){return this.isSuspenseList?this.childManagers.some(t=>t.isUnresolved()):this.suspender}shouldShowFallback(){let t=Gt(this);if(!t)return!0;let{component:n,childManagers:o}=t,{tail:r}=n.props;if(Gt(t)&&!t.shouldShowFallback())return!1;if(r==="collapsed")for(let a=0,i=o.length;a<i;a++){let c=o[a];if(r==="collapsed"&&c.isUnresolved())return c===this}return r!=="hidden"}shouldRenderChildren(){let t=Gt(this),{suspender:n}=this;if(!t)return!n;if(We(this.component)&&!n)return!0;let{component:{props:{revealOrder:o}},childManagers:r}=t,s=r.indexOf(this);return!r.some((i,c)=>{let{suspender:l}=i;return l?o==="together"||o==="forwards"&&c<=s||o==="backwards"&&c>=s:!1})}resolve(t){let{component:n,transition:o,suspender:r,childManagers:s}=this,a=o.pendingSuspense||[];if(t!==r)return;if(!r){s.forEach(p=>{p.handleSuspense()});return}this.suspender=null,Eo(this.component);let i=o.transitionState===K,c=a.filter(p=>p.suspenseManagers[o.transitionId].suspender).length;!i&&!c&&(o.transitionState=ge);let l=()=>{let p=n;M(n)||(p=this.fiber.root.wip.nodeInstance),w(p)};setTimeout(()=>{i||!a.includes(n)?nt(l):se(o,l)},En()%fn)}getChildrenSuspenders(){let t=[];return this.childManagers.forEach(n=>{n.isSuspenseList?t=t.concat(n.getChildrenSuspenders()):n.suspender&&t.push(n.suspender)}),t}handleSuspenseList(){let{component:t,childManagers:n}=this,{revealOrder:o="together",tail:r}=t.props,s=(i,c)=>i.then(()=>(o==="forwards"&&r==="collapsed"&&Er(c),c.handleSuspense())),a=Promise.all(this.getChildrenSuspenders());if(o==="together")a.then(()=>{n.forEach(i=>i.handleSuspense())});else if(o==="forwards"){let i=Ge;for(let c=0,l=n.length;c<l;c++)i=s(i,n[c])}else if(o==="backwards"){let i=Ge;for(let c=n.length-1;c>=0;c--)i=s(i,n[c])}return a}};function ho(e){let t=N(),n=Q(t,v);return n.transitionState===ge&&!n.pendingSuspense.includes(e)&&(n=v),n}var W=class extends F{constructor(t){super(t),this.suspenseManagers={}}render(){return this.props.children}},Oe=class extends F{constructor(t){super(t),this.suspenseManagers={}}handleSuspender(t,n){let o=ho(this),r=Wt(n,o);_e(o)||(o.pendingSuspense.includes(this)||o.pendingSuspense.push(this),o.transitionState=le),r.suspend(t)}render(){let{fallback:t,children:n}=this.props,o=ho(this),r=N(),s=Wt(r,o);return s.shouldRenderChildren()?n:s.shouldShowFallback()?t:null}},yo=e=>{let t,n=lt((o,r)=>{let s=t.read();return b(s.default,{...o,ref:r})});return n.__loadLazyComponent=()=>{t||(t=gn(e()))},n};function go(e){return e.split(",").map(n=>{let[o,r,s]=n.split("|"),a=o==="0",i=o==="2";return{isAttribute:a,refNodeIndex:r?Number(r):-1,attrIndex:a?Number(s):-1,prevChildIndex:!a&&s?Number(s):-1,hasExpressionSibling:i,tagAttrs:void 0}})}var Ue=class{constructor(t,n){this.strings=t,this.template=null,this.svgTemplate=null,this.partsMeta=[],this.partMetaCode=n}getPartsMeta(){return this.partsMeta.length||(this.partsMeta=go(this.partMetaCode)),this.partsMeta}create(t){t&&this.svgTemplate||this.template||(this.partsMeta.length||(this.partsMeta=go(this.partMetaCode)),this.createTemplate(t))}createTemplate(t){let{strings:n}=this,o=document.createElement("template"),r=n.join("");if(o.innerHTML=t?`<svg>${r}</svg>`:r,t){let{content:a}=o,i=a.firstChild;for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}let s=t?"svgTemplate":"template";this[s]=o}};var Co=new WeakMap;function yr(e,t){let n=Xe(null,t,void 0);return n.nodeType=Nt,n.template=e,n}function So(e,...t){return n=>{let o=Co.get(e);return o||(o=new Ue(e,n),Co.set(e,o)),yr(o,t)}}function qt(e,t){let{__rootFiber:n}=t,o;if(n)o=n.current,o.node.props.children=e,o.processedTime=0,k(o,A);else{let r=b(de,{children:e}),s={parentNode:t,previousSibling:null,isNode:!0};n=Ze(t),o=fe(n,r,s),o.parent=n,n.current=o,t.__rootFiber=n}return Te(()=>{n.updateSource=re(),dt(o)}),e&&e.nodeType===D?o.child.nodeInstance:null}function gr(e,t){return e&&(e.portalContainer=t),e}var Ao=gr;function Cr(e){let{__rootFiber:t}=e;return t?(oe(t.current),he(t),e.__rootFiber=void 0,!0):!1}var No=Cr;var Sr=/<([^\s"'=<>/]+)/g,_o=/\s*([^\s"'=<>/]*)/g,Ar=/[^"]*/g,Nr=/[^"]*/g,_r=/<\/([^\s"'=<>]+)>/g,xr=/[^<]*/g,Rr=/<!--.*?-->/g,Fr=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function Ir(e){let t=[],n=!1,o,r={},s=(l,p)=>{l.children?Array.isArray(l.children)?l.children.push(p):l.children=[l.children,p]:l.children=p},a=l=>{let p=t[t.length-1];s(p?p.props:r,l)},i=()=>{n=!1,a(o),Fr.includes(o.type)||t.push(o)},c=l=>{let p={$$BrahmosDynamicPart:l};o?n?o.props[`$$BrahmosDynamicPart${l}`]=p:s(o.props,p):s(r,p)};return e.forEach((l,p)=>{let f=l.length,m,u=0,T=E=>{E.lastIndex=u;let h=E.exec(l);return h&&(u=E.lastIndex),h},S=E=>{E.lastIndex=u+2;let h=E.exec(l);return u=E.lastIndex+1,h[0]};for(;u<f;){if(l[u]==="<"&&l[u+1]==="/"){t.pop(),T(_r);continue}else if(l[u]==="<"&&l[u+1]==="!"){T(Rr);continue}else if(l[u]==="<"){m=T(Sr)[1],o={$$typeof:ke,type:m,nodeType:Z,props:{}},n=!0;continue}else if(l[u]===" "&&n){_o.lastIndex=u;let E=T(_o),h,g;if(E){h=E[1],l[u]!=="="?g=!0:l[u+1]==='"'?g=S(Ar):l[u+1]==="'"&&(g=S(Nr)),h&&(o.props[h]=g);continue}}else if(l[u]===">"&&n)i();else if(!n){let E=T(xr);a(E[0]);continue}u++}c(p)}),r.children}var{hasOwnProperty:br}=Object.prototype;function xo(e,t){if(e==null||typeof e!="object")return e;let n=new e.constructor;for(var o in e)if(br.call(e,o)){let r=e[o],s=r&&r.$$BrahmosDynamicPart;if(s!==void 0){let a=t[s];o[0]==="$"?n=Object.assign(n,a):n[o]=a}else n[o]=xo(e[o],t)}return n}function ve(e){let{values:t,template:n}=e,{strings:o}=n;return n.staticTree||(n.staticTree=Ir(o)),xo(n.staticTree,t)}function Dr(e){return B(e)&&!e.template.strings.some(Boolean)}function Ro(e){let t=[];return e.forEach(n=>{Array.isArray(n)?t=t.concat(Ro(n)):n&&J(n)?t.push(ve(n)):t.push(n)}),t}function Me(e){if(X(e))return;if(typeof e=="boolean")return[];if(e[d])return e[d];let t=e;return Dr(t)&&(t=t.values),J(t)&&(t=ve(t)),Array.isArray(t)||(t=[t]),t=Ro(t),e[d]=t,t}function Pr(e,t){let n=Me(e);return n?n.map(t):e}function Or(e){return(Me(e)||[]).map((n,o)=>(n&&n.key===void 0&&(n.key=o),n))}function Ur(e,t){(Me(e)||[]).forEach(t)}function vr(e){return Me(e)&&e.length===1}function Mr(e){let t=Me(e);return t?t.length:0}var Fo={map:Pr,toArray:Or,forEach:Ur,only:vr,count:Mr};function Io(e){return e&&(_(e)||G(e))}function Xt(e,t){t=t||{};let n=arguments.length;if(n>2){let o=n>3?$(arguments,2):arguments[2];t.children=o}if(e){if(J(e)){let o=ve(e);return Xt(o,t)}else if(_(e)||G(e)){let o=e.type,r=typeof o=="function"&&o.prototype&&o.prototype.isReactComponent,s=typeof o=="function"&&!r||o.__isForwardRef;return{...e,props:{...e.props,...pe(t,s)},ref:s?null:t.ref}}}return e}function Qt(e,t){class n extends ce{render(){return b(e,this.props)}}return n.displayName=`Memo(${e.displayName||e.name})`,n}function bo(e){let t=e[Be];return t||(t=Ze(e),e[Be]=t),{render(n){let o=t.current;if(o)o.node.props.children=n,o.processedTime=0,k(o,y);else{let s=b(de,{children:n});o=fe(t,s,{parentNode:e,previousSibling:null,isNode:!0}),o.parent=t,t.current=o}let r=v;t.pendingTransitions.includes(r)||t.pendingTransitions.push(r),I(C,()=>{t.updateSource=C,ie(t)})},unmount(){t.cancelSchedule&&(t.cancelSchedule(),t.cancelSchedule=null);let n=t.current;n&&(n.shouldTearDown=!0,t.tearDownFibers.push(n),he(t),t.current=null),delete e[Be]}}}function Zt(e){if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status==="pending"||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})),e)}function Do(e){if(!N())throw new Error("use() must be called during render.");if(e&&typeof e.then=="function")return Zt(e);throw new Error("Unsupported type passed to use()")}function wr(e){let t=Promise.resolve(),n=new Set,o=e(r=>{n.forEach(s=>s(r))});return t._watch={unsubscribe:r=>{r&&n.delete(r),n.size===0&&o&&o()},subscribe:r=>n.add(r)},t}function ft(e){Po(e)}ft.create=wr;ft.sync=e=>{Po(e,{sync:!0})};function Po(e,t={}){Ie(()=>{var r;let n=N(),o=n?n.nodeInstance:null;if(!o)throw new Error("watch() must be called during render.");if(e._watch&&!((r=o.__unmount)!=null&&r.has(e))){let s=()=>{let a=M(o);if(a){let i=t.sync?U:C;I(i,()=>{o[d].isDirty=!0,R(a,x),w(o)})}};e._watch.subscribe(s),o.__unmount.set(e,()=>e._watch.unsubscribe(s))}Zt(e)})}var Oo=e=>e.children,Lr=Oo,kr=Oo;function Hr(e){e()}function Br(e){e.__isReactCompat=!0}var Yr=b,Kr=b,jr=b;var $r={setCurrentComponentFiber:xe,functionalComponentInstance:be};var xc=Jt;export{Fo as Children,F as Component,kr as Fragment,ce as PureComponent,Lr as StrictMode,Oe as Suspense,W as SuspenseList,$r as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xt as cloneElement,It as createContext,To as createElement,Ao as createPortal,to as createRef,bo as createRoot,xc as default,lt as forwardRef,So as html,Io as isValidElement,Yr as jsx,jr as jsxDev,Kr as jsxs,yo as lazy,Qt as memo,Br as reacty,qt as render,Ie as startTransition,No as unmountComponentAtNode,Hr as unstable_batchedUpdates,nt as unstable_deferredUpdates,Te as unstable_syncUpdates,Do as use,kn as useCallback,Kn as useContext,Yn as useDebugValue,$n as useDeferredValue,Ot as useEffect,Bn as useImperativeHandle,it as useLayoutEffect,Pt as useMemo,Ln as useReducer,wn as useRef,Dt as useState,jn as useTransition,ft as watch};
|
|
5
|
+
You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.`),new Error(c)}let{ref:o}=t;n===void 0&&(n=t.key);let r=typeof e=="function"&&e.prototype&&e.prototype.isReactComponent,s=typeof e=="function"&&!r||e.__isForwardRef;t=pe(t,s);let a=Xe(t,null,n);if(a.type=e,typeof e=="string")return a.nodeType=Z,a.ref=o,a;a.nodeType=r?D:_t,a.ref=r?o:null,e.__loadLazyComponent&&e.__loadLazyComponent();let i=typeof e=="function"&&e.defaultProps;if(i)for(n in i)t[n]===void 0&&(t[n]=i[n]);return a}function To(e,t,n){t=t||{};let r=arguments.length>3?$(arguments,2):n;return r&&(t.children=r),b(e,t,t.key)}function ct(e,t){let{root:n}=e,{nodeInstance:o}=e;for(;!(o instanceof Oe||t&&o instanceof W);){if(e=e.parent,e===n)return null;o=e.nodeInstance}return e}function Wn(e){let t=ct(e.parent,!0);if(!(t&&t.nodeInstance instanceof W))return e;let{nodeInstance:o}=t,{childManagers:r}=o.suspenseManagers[Q(e,null).transitionId],{revealOrder:s}=o.props;return s==="backwards"||s==="together"?(r.forEach(a=>{a.component[d].isDirty=!0}),r[0].fiber):e}function Gt(e){let{parentSuspenseManager:t}=e;return t&&t.isSuspenseList?t:null}function Wt(e,t){let{nodeInstance:n}=e,{suspenseManagers:o}=n,{transitionId:r}=t,s=o[r];return s||(s=o[r]=new Vt(e,t)),t.transitionState===q&&(s.suspender=null),s}function Eo(e){e[d].isDirty=!0}function Er(e){let t=M(e.component);e.isUnresolved()&&t&&(Eo(e.component),k(t,y))}var Vt=class{constructor(t,n){let{nodeInstance:o}=t;this.fiber=t,this.component=o,this.transition=n,this.childManagers=[],this.suspender=null,this.isSuspenseList=o instanceof W;let r=ct(t.parent,!0);this.parentSuspenseManager=r&&Wt(r,n),this.recordChildSuspense(),this.handleSuspense=this.handleSuspense.bind(this)}recordChildSuspense(){let{parentSuspenseManager:t}=this;t?(t.childManagers.push(this),this.rootSuspenseManager=t.rootSuspenseManager):this.rootSuspenseManager=this}addRootToProcess(){let{rootSuspenseManager:t}=this,{root:n}=N();n.afterRender(t.handleSuspense)}suspend(t){this.suspender=t,this.addRootToProcess()}handleSuspense(){let{component:t,suspender:n}=this;return t instanceof W?this.handleSuspenseList():Promise.resolve(n).then(this.resolve.bind(this,n))}isUnresolved(){return this.isSuspenseList?this.childManagers.some(t=>t.isUnresolved()):this.suspender}shouldShowFallback(){let t=Gt(this);if(!t)return!0;let{component:n,childManagers:o}=t,{tail:r}=n.props;if(Gt(t)&&!t.shouldShowFallback())return!1;if(r==="collapsed")for(let a=0,i=o.length;a<i;a++){let c=o[a];if(r==="collapsed"&&c.isUnresolved())return c===this}return r!=="hidden"}shouldRenderChildren(){let t=Gt(this),{suspender:n}=this;if(!t)return!n;if(We(this.component)&&!n)return!0;let{component:{props:{revealOrder:o}},childManagers:r}=t,s=r.indexOf(this);return!r.some((i,c)=>{let{suspender:l}=i;return l?o==="together"||o==="forwards"&&c<=s||o==="backwards"&&c>=s:!1})}resolve(t){let{component:n,transition:o,suspender:r,childManagers:s}=this,a=o.pendingSuspense||[];if(t!==r)return;if(!r){s.forEach(p=>{p.handleSuspense()});return}this.suspender=null,Eo(this.component);let i=o.transitionState===K,c=a.filter(p=>p.suspenseManagers[o.transitionId].suspender).length;!i&&!c&&(o.transitionState=ge);let l=()=>{let p=n;M(n)||(p=this.fiber.root.wip.nodeInstance),w(p)};setTimeout(()=>{i||!a.includes(n)?nt(l):se(o,l)},En()%fn)}getChildrenSuspenders(){let t=[];return this.childManagers.forEach(n=>{n.isSuspenseList?t=t.concat(n.getChildrenSuspenders()):n.suspender&&t.push(n.suspender)}),t}handleSuspenseList(){let{component:t,childManagers:n}=this,{revealOrder:o="together",tail:r}=t.props,s=(i,c)=>i.then(()=>(o==="forwards"&&r==="collapsed"&&Er(c),c.handleSuspense())),a=Promise.all(this.getChildrenSuspenders());if(o==="together")a.then(()=>{n.forEach(i=>i.handleSuspense())});else if(o==="forwards"){let i=Ge;for(let c=0,l=n.length;c<l;c++)i=s(i,n[c])}else if(o==="backwards"){let i=Ge;for(let c=n.length-1;c>=0;c--)i=s(i,n[c])}return a}};function ho(e){let t=N(),n=Q(t,v);return n.transitionState===ge&&!n.pendingSuspense.includes(e)&&(n=v),n}var W=class extends F{constructor(t){super(t),this.suspenseManagers={}}render(){return this.props.children}},Oe=class extends F{constructor(t){super(t),this.suspenseManagers={}}handleSuspender(t,n){let o=ho(this),r=Wt(n,o);_e(o)||(o.pendingSuspense.includes(this)||o.pendingSuspense.push(this),o.transitionState=le),r.suspend(t)}render(){let{fallback:t,children:n}=this.props,o=ho(this),r=N(),s=Wt(r,o);return s.shouldRenderChildren()?n:s.shouldShowFallback()?t:null}},yo=e=>{let t,n=lt((o,r)=>{let s=t.read();return b(s.default,{...o,ref:r})});return n.__loadLazyComponent=()=>{t||(t=gn(e()))},n};function go(e){return e.split(",").map(n=>{let[o,r,s]=n.split("|"),a=o==="0",i=o==="2";return{isAttribute:a,refNodeIndex:r?Number(r):-1,attrIndex:a?Number(s):-1,prevChildIndex:!a&&s?Number(s):-1,hasExpressionSibling:i,tagAttrs:void 0}})}var Ue=class{constructor(t,n){this.strings=t,this.template=null,this.svgTemplate=null,this.partsMeta=[],this.partMetaCode=n}getPartsMeta(){return this.partsMeta.length||(this.partsMeta=go(this.partMetaCode)),this.partsMeta}create(t){t&&this.svgTemplate||this.template||(this.partsMeta.length||(this.partsMeta=go(this.partMetaCode)),this.createTemplate(t))}createTemplate(t){let{strings:n}=this,o=document.createElement("template"),r=n.join("");if(o.innerHTML=t?`<svg>${r}</svg>`:r,t){let{content:a}=o,i=a.firstChild;for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}let s=t?"svgTemplate":"template";this[s]=o}};var Co=new WeakMap;function yr(e,t){let n=Xe(null,t,void 0);return n.nodeType=Nt,n.template=e,n}function So(e,...t){return n=>{let o=Co.get(e);return o||(o=new Ue(e,n),Co.set(e,o)),yr(o,t)}}function qt(e,t){let{__rootFiber:n}=t,o;if(n)o=n.current,o.node.props.children=e,o.processedTime=0,k(o,A);else{let r=b(de,{children:e}),s={parentNode:t,previousSibling:null,isNode:!0};n=Ze(t),o=fe(n,r,s),o.parent=n,n.current=o,t.__rootFiber=n}return Te(()=>{n.updateSource=re(),dt(o)}),e&&e.nodeType===D?o.child.nodeInstance:null}function gr(e,t){return e&&(e.portalContainer=t),e}var Ao=gr;function Cr(e){let{__rootFiber:t}=e;return t?(oe(t.current),he(t),e.__rootFiber=void 0,!0):!1}var No=Cr;var Sr=/<([^\s"'=<>/]+)/g,_o=/\s*([^\s"'=<>/]*)/g,Ar=/[^"]*/g,Nr=/[^"]*/g,_r=/<\/([^\s"'=<>]+)>/g,xr=/[^<]*/g,Rr=/<!--.*?-->/g,Fr=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function Ir(e){let t=[],n=!1,o,r={},s=(l,p)=>{l.children?Array.isArray(l.children)?l.children.push(p):l.children=[l.children,p]:l.children=p},a=l=>{let p=t[t.length-1];s(p?p.props:r,l)},i=()=>{n=!1,a(o),Fr.includes(o.type)||t.push(o)},c=l=>{let p={$$BrahmosDynamicPart:l};o?n?o.props[`$$BrahmosDynamicPart${l}`]=p:s(o.props,p):s(r,p)};return e.forEach((l,p)=>{let f=l.length,m,u=0,T=E=>{E.lastIndex=u;let h=E.exec(l);return h&&(u=E.lastIndex),h},S=E=>{E.lastIndex=u+2;let h=E.exec(l);return u=E.lastIndex+1,h[0]};for(;u<f;){if(l[u]==="<"&&l[u+1]==="/"){t.pop(),T(_r);continue}else if(l[u]==="<"&&l[u+1]==="!"){T(Rr);continue}else if(l[u]==="<"){m=T(Sr)[1],o={$$typeof:ke,type:m,nodeType:Z,props:{}},n=!0;continue}else if(l[u]===" "&&n){_o.lastIndex=u;let E=T(_o),h,g;if(E){h=E[1],l[u]!=="="?g=!0:l[u+1]==='"'?g=S(Ar):l[u+1]==="'"&&(g=S(Nr)),h&&(o.props[h]=g);continue}}else if(l[u]===">"&&n)i();else if(!n){let E=T(xr);a(E[0]);continue}u++}c(p)}),r.children}var{hasOwnProperty:br}=Object.prototype;function xo(e,t){if(e==null||typeof e!="object")return e;let n=new e.constructor;for(var o in e)if(br.call(e,o)){let r=e[o],s=r&&r.$$BrahmosDynamicPart;if(s!==void 0){let a=t[s];o[0]==="$"?n=Object.assign(n,a):n[o]=a}else n[o]=xo(e[o],t)}return n}function ve(e){let{values:t,template:n}=e,{strings:o}=n;return n.staticTree||(n.staticTree=Ir(o)),xo(n.staticTree,t)}function Dr(e){return B(e)&&!e.template.strings.some(Boolean)}function Ro(e){let t=[];return e.forEach(n=>{Array.isArray(n)?t=t.concat(Ro(n)):n&&J(n)?t.push(ve(n)):t.push(n)}),t}function Me(e){if(X(e))return;if(typeof e=="boolean")return[];if(e[d])return e[d];let t=e;return Dr(t)&&(t=t.values),J(t)&&(t=ve(t)),Array.isArray(t)||(t=[t]),t=Ro(t),e[d]=t,t}function Pr(e,t){let n=Me(e);return n?n.map(t):e}function Or(e){return(Me(e)||[]).map((n,o)=>(n&&n.key===void 0&&(n.key=o),n))}function Ur(e,t){(Me(e)||[]).forEach(t)}function vr(e){return Me(e)&&e.length===1}function Mr(e){let t=Me(e);return t?t.length:0}var Fo={map:Pr,toArray:Or,forEach:Ur,only:vr,count:Mr};function Io(e){return e&&(_(e)||G(e))}function Xt(e,t){t=t||{};let n=arguments.length;if(n>2){let o=n>3?$(arguments,2):arguments[2];t.children=o}if(e){if(J(e)){let o=ve(e);return Xt(o,t)}else if(_(e)||G(e)){let o=e.type,r=typeof o=="function"&&o.prototype&&o.prototype.isReactComponent,s=typeof o=="function"&&!r||o.__isForwardRef;return{...e,props:{...e.props,...pe(t,s)},ref:s?null:t.ref}}}return e}function Qt(e,t){class n extends ce{render(){return b(e,this.props)}}return n.displayName=`Memo(${e.displayName||e.name})`,n}function bo(e){let t=e[Be];return t||(t=Ze(e),e[Be]=t),{render(n){let o=t.current;if(o)o.node.props.children=n,o.processedTime=0,k(o,y);else{let s=b(de,{children:n});o=fe(t,s,{parentNode:e,previousSibling:null,isNode:!0}),o.parent=t,t.current=o}let r=v;t.pendingTransitions.includes(r)||t.pendingTransitions.push(r),I(C,()=>{t.updateSource=C,ie(t)})},unmount(){t.cancelSchedule&&(t.cancelSchedule(),t.cancelSchedule=null);let n=t.current;n&&(n.shouldTearDown=!0,t.tearDownFibers.push(n),he(t),t.current=null),delete e[Be]}}}function Zt(e){if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status==="pending"||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t})),e)}function Do(e){if(!N())throw new Error("use() must be called during render.");if(e&&typeof e.then=="function")return Zt(e);throw new Error("Unsupported type passed to use()")}function wr(e){let t=Promise.resolve(),n=new Set,o=e(r=>{n.forEach(s=>s(r))});return t._watch={unsubscribe:r=>{r&&n.delete(r),n.size===0&&o&&o()},subscribe:r=>n.add(r)},t}function ft(e){Po(e)}ft.create=wr;ft.sync=e=>{Po(e,{sync:!0})};function Po(e,t={}){Ie(()=>{var r;let n=N(),o=n?n.nodeInstance:null;if(!o)throw new Error("watch() must be called during render.");if(e._watch&&!((r=o.__unmount)!=null&&r.has(e))){let s=()=>{let a=M(o);if(a){let i=t.sync?U:C;I(i,()=>{o[d].isDirty=!0,R(a,x),w(o)})}};e._watch.subscribe(s),o.__unmount.set(e,()=>e._watch.unsubscribe(s))}Zt(e)})}var Oo=e=>e.children,Lr=Oo,kr=Oo;function Hr(e){e()}function Br(...e){e.forEach(t=>{t.__isReactCompat=!0})}var Yr=b,Kr=b,jr=b;var $r={setCurrentComponentFiber:xe,functionalComponentInstance:be};var xc=Jt;export{Fo as Children,F as Component,kr as Fragment,ce as PureComponent,Lr as StrictMode,Oe as Suspense,W as SuspenseList,$r as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xt as cloneElement,It as createContext,To as createElement,Ao as createPortal,to as createRef,bo as createRoot,xc as default,lt as forwardRef,So as html,Io as isValidElement,Yr as jsx,jr as jsxDev,Kr as jsxs,yo as lazy,Qt as memo,Br as reacty,qt as render,Ie as startTransition,No as unmountComponentAtNode,Hr as unstable_batchedUpdates,nt as unstable_deferredUpdates,Te as unstable_syncUpdates,Do as use,kn as useCallback,Kn as useContext,Yn as useDebugValue,$n as useDeferredValue,Ot as useEffect,Bn as useImperativeHandle,it as useLayoutEffect,Pt as useMemo,Ln as useReducer,wn as useRef,Dt as useState,jn as useTransition,ft as watch};
|